diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 8a7303a0c..3ddfd21b9 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -16,6 +16,7 @@ updates: - "patch" exclude-patterns: - "prism" + open-pull-requests-limit: 100 - package-ecosystem: "npm" directory: "vscode/" schedule: @@ -29,6 +30,7 @@ updates: update-types: - "minor" - "patch" + open-pull-requests-limit: 100 - package-ecosystem: "gitsubmodule" directory: "/" schedule: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a0a2824d4..4616e8d3a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] - ruby: ["3.0", "3.1", "3.2", "3.3"] + ruby: ["3.1", "3.2", "3.3"] runs-on: ${{ matrix.os }} timeout-minutes: 30 name: Ruby ${{ matrix.ruby }} on ${{ matrix.os }} @@ -86,6 +86,8 @@ jobs: # We need some Ruby installed for the environment activation tests - name: Set up Ruby uses: ruby/setup-ruby@v1 + with: + bundler-cache: true - name: Download shadowenv if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' diff --git a/.github/workflows/require_labels.yml b/.github/workflows/require_labels.yml index bf115962c..33db1a513 100644 --- a/.github/workflows/require_labels.yml +++ b/.github/workflows/require_labels.yml @@ -1,8 +1,10 @@ name: Pull Request Labels on: + pull_request_review: + types: [submitted] pull_request: - types: [opened, synchronize, reopened, labeled, unlabeled] + types: [labeled, unlabeled] jobs: check-labels: diff --git a/.gitignore b/.gitignore index a547fa506..fcf9c2bcd 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ vscode/dist vscode/node_modules vscode/.vscode-test/ vscode/*.vsix +vscode/*.log diff --git a/.vscode/settings.json b/.vscode/settings.json index cfc896113..0e76c4d78 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -45,5 +45,4 @@ ] } ], - "sorbet.highlightUntyped": "everywhere-but-tests" } diff --git a/ADDONS.md b/ADDONS.md index 219473cba..8fd9172fe 100644 --- a/ADDONS.md +++ b/ADDONS.md @@ -61,7 +61,7 @@ module RubyLsp module MyGem class Addon < ::RubyLsp::Addon # Performs any activation that needs to happen once when the language server is booted - def activate(message_queue) + def activate(global_state, message_queue) end # Performs any cleanup when shutting down the server, like terminating a subprocess @@ -131,7 +131,7 @@ following listener implementation. module RubyLsp module MyGem class Addon < ::RubyLsp::Addon - def activate(message_queue) + def activate(global_state, message_queue) @message_queue = message_queue @config = SomeConfiguration.new end @@ -143,7 +143,7 @@ module RubyLsp "Ruby LSP My Gem" end - def create_hover_listener(response_builder, nesting, index, dispatcher) + def create_hover_listener(response_builder, node_context, index, dispatcher) # Use the listener factory methods to instantiate listeners with parameters sent by the LSP combined with any # pre-computed information in the addon. These factory methods are invoked on every request Hover.new(client, response_builder, @config, dispatcher) @@ -249,7 +249,7 @@ interested in using it. module RubyLsp module MyGem class Addon < ::RubyLsp::Addon - def activate(message_queue) + def activate(global_state, message_queue) @message_queue = message_queue end @@ -259,13 +259,13 @@ module RubyLsp "Ruby LSP My Gem" end - def create_hover_listener(response_builder, nesting, index, dispatcher) - MyHoverListener.new(@message_queue, response_builder, nesting, index, dispatcher) + def create_hover_listener(response_builder, node_context, index, dispatcher) + MyHoverListener.new(@message_queue, response_builder, node_context, index, dispatcher) end end class MyHoverListener - def initialize(message_queue, response_builder, nesting, index, dispatcher) + def initialize(message_queue, response_builder, node_context, index, dispatcher) @message_queue = message_queue @message_queue << Notification.new( diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ad429afa2..4a77640bb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -68,7 +68,7 @@ To add a new expectations test runner for a new request handler: ```ruby require "test_helper" -require "expectations/expectations_test_runner" +require_relative "support/expectations_test_runner" class MyRequestExpectationsTest < ExpectationsTestRunner # The first argument is the fully qualified name of the request class @@ -83,7 +83,7 @@ example ```ruby require "test_helper" -require "expectations/expectations_test_runner" +require_relative "support/expectations_test_runner" class MyRequestExpectationsTest < ExpectationsTestRunner expectations_tests RubyLsp::Requests::MyRequest, "my_request" diff --git a/EDITORS.md b/EDITORS.md index 4b549a83c..3d5db228d 100644 --- a/EDITORS.md +++ b/EDITORS.md @@ -7,13 +7,19 @@ Code, use the official [Ruby LSP extension](https://marketplace.visualstudio.com > Some Ruby LSP features may be unavailable or limited due to incomplete implementations of the Language Server > Protocol, such as dynamic feature registration, or [file watching](https://github.com/Shopify/ruby-lsp/issues/1456). +If you need to select particular features to enable or disable, see +[`vscode/package.json`](vscode/package.json) for the full list. + - [Emacs LSP Mode](https://emacs-lsp.github.io/lsp-mode/page/lsp-ruby-lsp/) - [Emacs Eglot](#Emacs-Eglot) -- [Neovim LSP](#Neovim-LSP) +- [Neovim LSP](#Neovim) +- [LazyVim LSP](#lazyvim-lsp) - [Sublime Text LSP](#sublime-text-lsp) +- [Zed](#zed) +- [RubyMine](#RubyMine) ## Emacs Eglot @@ -28,6 +34,8 @@ When you run `eglot` command it will run `ruby-lsp` process for you. ## Neovim +**Note**: Ensure that you are using Neovim 0.10 or newer. + ### nvim-lspconfig The [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig/blob/master/lua/lspconfig/server_configurations/ruby_lsp.lua) @@ -61,103 +69,73 @@ mason_lspconfig.setup_handlers { } ``` -### Neovim Limitations +### Additional setup (optional) -Ruby LSP only supports pull diagnostics, and neovim versions prior to v0.10.0-dev-695+g58f948614 only support [publishDiagnostics](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_publishDiagnostics). -Additional setup is required to enable diagnostics from Ruby LSP to appear in neovim. +`rubyLsp/workspace/dependencies` is a custom method currently supported only in the VS Code plugin. +The following snippet adds `ShowRubyDeps` command to show dependencies in the quickfix list. ```lua --- textDocument/diagnostic support until 0.10.0 is released -_timers = {} -local function setup_diagnostics(client, buffer) - if require("vim.lsp.diagnostic")._enable then - return - end - - local diagnostic_handler = function() - local params = vim.lsp.util.make_text_document_params(buffer) - client.request("textDocument/diagnostic", { textDocument = params }, function(err, result) - if err then - local err_msg = string.format("diagnostics error - %s", vim.inspect(err)) - vim.lsp.log.error(err_msg) - end - local diagnostic_items = {} - if result then - diagnostic_items = result.items +local function add_ruby_deps_command(client, bufnr) + vim.api.nvim_buf_create_user_command(bufnr, "ShowRubyDeps", function(opts) + local params = vim.lsp.util.make_text_document_params() + local showAll = opts.args == "all" + + client.request("rubyLsp/workspace/dependencies", params, function(error, result) + if error then + print("Error showing deps: " .. error) + return end - vim.lsp.diagnostic.on_publish_diagnostics( - nil, - vim.tbl_extend("keep", params, { diagnostics = diagnostic_items }), - { client_id = client.id } - ) - end) - end - - diagnostic_handler() -- to request diagnostics on buffer when first attaching - vim.api.nvim_buf_attach(buffer, false, { - on_lines = function() - if _timers[buffer] then - vim.fn.timer_stop(_timers[buffer]) - end - _timers[buffer] = vim.fn.timer_start(200, diagnostic_handler) - end, - on_detach = function() - if _timers[buffer] then - vim.fn.timer_stop(_timers[buffer]) + local qf_list = {} + for _, item in ipairs(result) do + if showAll or item.dependency then + table.insert(qf_list, { + text = string.format("%s (%s) - %s", item.name, item.version, item.dependency), + filename = item.path + }) + end end - end, - }) -end --- adds ShowRubyDeps command to show dependencies in the quickfix list. --- add the `all` argument to show indirect dependencies as well -local function add_ruby_deps_command(client, bufnr) - vim.api.nvim_buf_create_user_command(bufnr, "ShowRubyDeps", - function(opts) - - local params = vim.lsp.util.make_text_document_params() - - local showAll = opts.args == "all" - - client.request("rubyLsp/workspace/dependencies", params, - function(error, result) - if error then - print("Error showing deps: " .. error) - return - end - - local qf_list = {} - for _, item in ipairs(result) do - if showAll or item.dependency then - table.insert(qf_list, { - text = string.format("%s (%s) - %s", - item.name, - item.version, - item.dependency), - - filename = item.path - }) - end - end - - vim.fn.setqflist(qf_list) - vim.cmd('copen') - end, bufnr) - end, {nargs = "?", complete = function() - return {"all"} - end}) + vim.fn.setqflist(qf_list) + vim.cmd('copen') + end, bufnr) + end, + {nargs = "?", complete = function() return {"all"} end}) end - require("lspconfig").ruby_lsp.setup({ on_attach = function(client, buffer) - setup_diagnostics(client, buffer) add_ruby_deps_command(client, buffer) end, }) ``` +## LazyVim LSP + +For LazyVim, you can add the ruby-lsp by creating a file in your plugins folder (`~/.config/nvim/lua/plugins/ruby_lsp.lua`) and adding the following: + +```lua +-- ~/.config/nvim/lua/plugins/ruby_lsp.lua + +return { + { + "neovim/nvim-lspconfig", + ---@class PluginLspOpts + opts = { + ---@type lspconfig.options + servers = { + -- disable solargraph from auto running when you open ruby files + solargraph = { + autostart = false + }, + -- ruby_lsp will be automatically installed with mason and loaded with lspconfig + ruby_lsp = {}, + }, + }, + }, +} +``` + ## Sublime Text LSP To configure the Ruby LSP using [LSP for Sublime Text](https://github.com/sublimelsp/LSP), add the following configuration to your LSP client configuration: @@ -182,10 +160,18 @@ To configure the Ruby LSP using [LSP for Sublime Text](https://github.com/sublim Restart LSP or Sublime Text and `ruby-lsp` will automatically activate when opening ruby files. -## Zed (partly working) +## Zed + +[Setting up Ruby LSP](https://github.com/zed-industries/zed/blob/main/docs/src/languages/ruby.md#setting-up-ruby-lsp) + +[Zed has added support for Ruby LSP as a alternative language server](https://github.com/zed-industries/zed/pull/11768) in version v0.0.2 of the Ruby extension. + +See https://github.com/zed-industries/zed/issues/4834 for discussion of the limitations. + +## RubyMine -See https://github.com/zed-industries/zed/issues/4834 for discussion. +You can use the Ruby LSP with RubyMine (or IntelliJ IDEA Ultimate) through the following plugin. -## RubyMine (not yet supported) +Note that there might be overlapping functionality when using it with RubyMine, given that the IDE provides similar features as the ones coming from the Ruby LSP. -Although there is overlap between the features provided by RubyMine and Ruby LSP, there may be benefits in using both together. RubyMine has a [LSP API](https://blog.jetbrains.com/ruby/2023/07/the-rubymine-2023-2-beta-updated-ai-assistant-lsp-api-for-plugin-developers-and-more/), so adding support would involve writing a plugin using Kotlin. The [rubymine-sorbet-lsp](https://github.com/simoleone/rubymine-sorbet-lsp) project may be a useful reference for this. +[Ruby LSP plugin](https://plugins.jetbrains.com/plugin/24413-ruby-lsp) \ No newline at end of file diff --git a/Gemfile b/Gemfile index 27d8f0fc8..7f2eca03b 100644 --- a/Gemfile +++ b/Gemfile @@ -4,12 +4,13 @@ source "https://rubygems.org" gemspec +gem "bundler", "~> 2.5" +gem "minitest", "~> 5.23" + group :development do - gem "bundler", "~> 2.5" gem "debug", "~> 1.9", require: false gem "minitest-reporters", "~> 1.6" - gem "minitest", "~> 5.22" - gem "mocha", "~> 2.2" + gem "mocha", "~> 2.3" gem "psych", "~> 5.1", require: false gem "rake", "~> 13.2" gem "rdoc", require: false, github: "Shopify/rdoc", branch: "create_snapper_generator" @@ -18,7 +19,7 @@ group :development do gem "rubocop-rake", "~> 0.6.0", require: false gem "rubocop-shopify", "~> 2.15", require: false gem "rubocop-sorbet", "~> 0.8", require: false - gem "rubocop", "~> 1.63" + gem "rubocop", "~> 1.64" gem "simplecov", require: false gem "syntax_tree", ">= 6.1.1", "< 7" diff --git a/Gemfile.lock b/Gemfile.lock index 97e9aaf58..8396cb19b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -9,9 +9,10 @@ GIT PATH remote: . specs: - ruby-lsp (0.16.7) + ruby-lsp (0.17.4) language_server-protocol (~> 3.17.0) - prism (>= 0.23.0, < 0.28) + prism (>= 0.29.0, < 0.31) + rbs (>= 3, < 4) sorbet-runtime (>= 0.5.10782) GEM @@ -31,34 +32,38 @@ GEM reline (>= 0.4.2) json (2.7.2) language_server-protocol (3.17.0.3) - minitest (5.22.3) + logger (1.6.0) + minitest (5.23.1) minitest-reporters (1.6.1) ansi builder minitest (>= 5.0) ruby-progressbar - mocha (2.2.0) + mocha (2.3.0) ruby2_keywords (>= 0.0.5) netrc (0.11.0) parallel (1.24.0) - parser (3.3.1.0) + parser (3.3.2.0) ast (~> 2.4.1) racc prettier_print (1.2.1) - prism (0.27.0) + prism (0.30.0) psych (5.1.2) stringio - racc (1.7.3) + racc (1.8.0) rainbow (3.1.1) rake (13.2.1) - rbi (0.1.12) - prism (>= 0.18.0, < 0.28) + rbi (0.1.13) + prism (>= 0.18.0, < 1.0.0) sorbet-runtime (>= 0.5.9204) - regexp_parser (2.9.0) + rbs (3.5.1) + logger + regexp_parser (2.9.2) reline (0.5.0) io-console (~> 0.5) - rexml (3.2.6) - rubocop (1.63.4) + rexml (3.2.8) + strscan (>= 3.0.9) + rubocop (1.64.1) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) @@ -69,8 +74,8 @@ GEM rubocop-ast (>= 1.31.1, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.31.2) - parser (>= 3.3.0.4) + rubocop-ast (1.31.3) + parser (>= 3.3.1.0) rubocop-md (1.2.2) rubocop (>= 1.0) rubocop-minitest (0.35.0) @@ -90,20 +95,21 @@ GEM simplecov_json_formatter (~> 0.1) simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) - sorbet (0.5.11368) - sorbet-static (= 0.5.11368) - sorbet-runtime (0.5.11368) - sorbet-static (0.5.11368-universal-darwin) - sorbet-static (0.5.11368-x86_64-linux) - sorbet-static-and-runtime (0.5.11368) - sorbet (= 0.5.11368) - sorbet-runtime (= 0.5.11368) + sorbet (0.5.11406) + sorbet-static (= 0.5.11406) + sorbet-runtime (0.5.11406) + sorbet-static (0.5.11406-universal-darwin) + sorbet-static (0.5.11406-x86_64-linux) + sorbet-static-and-runtime (0.5.11406) + sorbet (= 0.5.11406) + sorbet-runtime (= 0.5.11406) spoom (1.3.0) erubi (>= 1.10.0) prism (>= 0.19.0) sorbet-static-and-runtime (>= 0.5.10187) thor (>= 0.19.2) stringio (3.1.0) + strscan (3.1.0) syntax_tree (6.2.0) prettier_print (>= 1.2.0) tapioca (0.13.3) @@ -132,13 +138,13 @@ PLATFORMS DEPENDENCIES bundler (~> 2.5) debug (~> 1.9) - minitest (~> 5.22) + minitest (~> 5.23) minitest-reporters (~> 1.6) - mocha (~> 2.2) + mocha (~> 2.3) psych (~> 5.1) rake (~> 13.2) rdoc! - rubocop (~> 1.63) + rubocop (~> 1.64) rubocop-md (~> 1.2.0) rubocop-minitest (~> 0.35.0) rubocop-rake (~> 0.6.0) @@ -151,4 +157,4 @@ DEPENDENCIES tapioca (~> 0.13) BUNDLED WITH - 2.5.6 + 2.5.10 diff --git a/README.md b/README.md index 919f072d9..571f22613 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ The Ruby LSP features include - Completion for classes, modules, constants and require paths - Fuzzy search classes, modules and constants anywhere in the project and its dependencies (workspace symbol) -Adding method support for definition, completion, hover and workspace symbol is planned, but not yet completed. +Adding method support for definition, completion, hover and workspace symbol is partially supported, but not yet complete. Follow progress in https://github.com/Shopify/ruby-lsp/issues/899 See complete information about features [here](https://shopify.github.io/ruby-lsp/RubyLsp/Requests.html). @@ -48,9 +48,11 @@ If using VS Code, all you have to do is install the [Ruby LSP extension](https://marketplace.visualstudio.com/items?itemName=Shopify.ruby-lsp) to get the extra features in the editor. Do not install the `ruby-lsp` gem manually. +For more information on using and configuring the extension, see [vscode/README.md](vscode/README.md). + ### With other editors -See [editors](EDITORS.md) for community instructions on setting up the Ruby LSP. +See [editors](EDITORS.md) for community instructions on setting up the Ruby LSP, which current includes Emacs, Neovim, Sublime Text, and Zed. The gem can be installed by doing ```shell diff --git a/TROUBLESHOOTING.md b/TROUBLESHOOTING.md index 83a1c789b..fc2c9700d 100644 --- a/TROUBLESHOOTING.md +++ b/TROUBLESHOOTING.md @@ -28,7 +28,8 @@ project. That directory contains another `Gemfile`, that includes the `ruby-lsp` dependencies. This approach allows us to automatically detect which formatter your project uses and which gems we need to index for features such as go to definition. -> **Note**: we are working with the rubygems/bundler team to have this type of mechanism properly supported from within +> ![NOTE] +> We are working with the RubyGems/Bundler team to have this type of mechanism properly supported from within > Bundler itself, which is currently being experimented with in a plugin called `bundler-compose`. Once > `bundler-compose`is production ready, the entire custom bundle created under the `.ruby-lsp` directory will go away > and we'll rely on Bundler to compose the LOAD_PATH including the `ruby-lsp` gem. @@ -98,6 +99,47 @@ that prevents it from responding to new requests coming from the editor. If you report [here](https://github.com/Shopify/ruby-lsp/issues/new?labels=bug&template=bug_template.yml) including the steps that led to the server getting stuck. +### Gem installation locations and permissions + +To launch the Ruby LSP server, the `ruby-lsp` gem must be installed. And in order to automatically index your project's +dependencies, they must also be installed so that we can read, parse and analyze their source files. The `ruby-lsp` gem +is installed via `gem install` (using RubyGems). The project dependencies are installed via `bundle install` (using +Bundler). + +If you use a non-default path to install your gems, please remember that RubyGems and Bundler require separate +configurations to achieve that. + +For example, if you configure `BUNDLE_PATH` to point to `vendor/bundle` so that gems are installed inside the same +directory as your project, `bundle install` will automatically pick that up and install them in the right place. But +`gem install` will not as it requires a different setting to achieve it. + +You can apply your prefered installed locations for RubyGems by using the `~/.gemrc` file. In that file, you can decide +to either install it with `--user-install` or select a specific installation directory with `--install-dir`. + +```yaml +gem: --user-install +# Or +gem: --install-dir /my/preferred/path/for/gem/install +``` + +One scenario where this is useful is if the user doesn't have permissions for the default gem installation directory and +`gem install` fails. For example, when using the system Ruby on certain Linux distributions. + +> ![NOTE] +> Using non-default gem installation paths may lead to other integration issues with version managers. For example, for +> Ruby 3.3.1 the default `GEM_HOME` is `~/.gem/ruby/3.3.0` (without the patch part of the version). However, `chruby` +> (and potentially other version managers) override `GEM_HOME` to include the version patch resulting in +> `~/.gem/ruby/3.3.1`. When you install a gem using `gem install --user-install`, RubyGems ignores the `GEM_HOME` +> override and installs the gem inside `~/.gem/ruby/3.3.0`. This results in executables not being found because `chruby` +> modified the `PATH` to only include executables installed under `~/.gem/ruby/3.3.1`. +> +> Similarly, the majority of version managers don't read your `~/.gemrc` configurations. If you use a custom +> installation with `--install-dir`, it's unlikely that the version manager will know about it. This may result in the +> gem executables not being found. +> +> Incompatibilities between RubyGems and version managers like this one are beyond the scope of the Ruby LSP and should +> be reported either to RubyGems or the respective version manager. + ### Developing on containers See the [documentation](vscode/README.md#developing-on-containers). diff --git a/VERSION b/VERSION index 427cda05d..44e33a411 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.16.7 +0.17.4 diff --git a/VERSION_MANAGERS.md b/VERSION_MANAGERS.md index 5cba1927d..402519899 100644 --- a/VERSION_MANAGERS.md +++ b/VERSION_MANAGERS.md @@ -5,6 +5,7 @@ This document contains information and tips to help Ruby LSP's VS Code extension ## asdf If you use `asdf` and the VS Code extension fails to activate the environment (as described in [this issue](https://github.com/Shopify/ruby-lsp/issues/1985)), you may resolve it by updating `asdf` to the latest version with `asdf update`, and then restart VS Code. +If `asdf` was installed through Homebrew then you may need to first run `brew upgrade asdf`. ## Chruby diff --git a/bin/test b/bin/test index c039b4e47..dfa37a078 100755 --- a/bin/test +++ b/bin/test @@ -1,13 +1,5 @@ #!/usr/bin/env bash -PRISM_FIXTURES_DIR=test/fixtures/prism/test/prism/fixtures - -if [ ! -d "$PRISM_FIXTURES_DIR" ]; then - echo "$PRISM_FIXTURES_DIR does not exist." - echo "Please run 'git submodule update --init' to pull submodule fixtures." - exit 1 -fi - if [[ 2 -eq $# ]]; then bundle exec rake TEST="$1" TESTOPTS="-n='/$2/'" elif [[ 1 -eq $# ]]; then diff --git a/lib/core_ext/uri.rb b/lib/core_ext/uri.rb index 2f3d02386..43997393f 100644 --- a/lib/core_ext/uri.rb +++ b/lib/core_ext/uri.rb @@ -11,6 +11,9 @@ def from_path(path:, fragment: nil, scheme: "file") # On Windows, if the path begins with the disk name, we need to add a leading slash to make it a valid URI escaped_path = if /^[A-Z]:/i.match?(path) DEFAULT_PARSER.escape("/#{path}") + elsif path.start_with?("//?/") + # Some paths on Windows start with "//?/". This is a special prefix that allows for long file paths + DEFAULT_PARSER.escape(path.delete_prefix("//?")) else DEFAULT_PARSER.escape(path) end diff --git a/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb b/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb index c4fbf51cb..3393c636d 100644 --- a/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb +++ b/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb @@ -5,12 +5,16 @@ module RubyIndexer class DeclarationListener extend T::Sig + OBJECT_NESTING = T.let(["Object"].freeze, T::Array[String]) + BASIC_OBJECT_NESTING = T.let(["BasicObject"].freeze, T::Array[String]) + sig do params(index: Index, dispatcher: Prism::Dispatcher, parse_result: Prism::ParseResult, file_path: String).void end def initialize(index, dispatcher, parse_result, file_path) @index = index @file_path = file_path + @visibility_stack = T.let([Entry::Visibility::PUBLIC], T::Array[Entry::Visibility]) @comments_by_line = T.let( parse_result.comments.to_h do |c| [c.location.start_line, c] @@ -32,9 +36,12 @@ def initialize(index, dispatcher, parse_result, file_path) :on_class_node_leave, :on_module_node_enter, :on_module_node_leave, + :on_singleton_class_node_enter, + :on_singleton_class_node_leave, :on_def_node_enter, :on_def_node_leave, :on_call_node_enter, + :on_call_node_leave, :on_multi_write_node_enter, :on_constant_path_write_node_enter, :on_constant_path_or_write_node_enter, @@ -45,23 +52,45 @@ def initialize(index, dispatcher, parse_result, file_path) :on_constant_or_write_node_enter, :on_constant_and_write_node_enter, :on_constant_operator_write_node_enter, + :on_instance_variable_write_node_enter, + :on_instance_variable_and_write_node_enter, + :on_instance_variable_operator_write_node_enter, + :on_instance_variable_or_write_node_enter, + :on_instance_variable_target_node_enter, + :on_alias_method_node_enter, ) end sig { params(node: Prism::ClassNode).void } def on_class_node_enter(node) + @visibility_stack.push(Entry::Visibility::PUBLIC) name = node.constant_path.location.slice comments = collect_comments(node) superclass = node.superclass + + nesting = name.start_with?("::") ? [name.delete_prefix("::")] : @stack + [name.delete_prefix("::")] + parent_class = case superclass when Prism::ConstantReadNode, Prism::ConstantPathNode superclass.slice + else + case nesting + when OBJECT_NESTING + # When Object is reopened, its parent class should still be the top-level BasicObject + "::BasicObject" + when BASIC_OBJECT_NESTING + # When BasicObject is reopened, its parent class should still be nil + nil + else + # Otherwise, the parent class should be the top-level Object + "::Object" + end end entry = Entry::Class.new( - fully_qualify_name(name), + nesting, @file_path, node.location, comments, @@ -69,7 +98,7 @@ def on_class_node_enter(node) ) @owner_stack << entry - @index << entry + @index.add(entry) @stack << name end @@ -77,17 +106,21 @@ def on_class_node_enter(node) def on_class_node_leave(node) @stack.pop @owner_stack.pop + @visibility_stack.pop end sig { params(node: Prism::ModuleNode).void } def on_module_node_enter(node) + @visibility_stack.push(Entry::Visibility::PUBLIC) name = node.constant_path.location.slice comments = collect_comments(node) - entry = Entry::Module.new(fully_qualify_name(name), @file_path, node.location, comments) + + nesting = name.start_with?("::") ? [name.delete_prefix("::")] : @stack + [name.delete_prefix("::")] + entry = Entry::Module.new(nesting, @file_path, node.location, comments) @owner_stack << entry - @index << entry + @index.add(entry) @stack << name end @@ -95,6 +128,38 @@ def on_module_node_enter(node) def on_module_node_leave(node) @stack.pop @owner_stack.pop + @visibility_stack.pop + end + + sig { params(node: Prism::SingletonClassNode).void } + def on_singleton_class_node_enter(node) + @visibility_stack.push(Entry::Visibility::PUBLIC) + + current_owner = @owner_stack.last + + if current_owner + expression = node.expression + @stack << (expression.is_a?(Prism::SelfNode) ? "" : "") + + existing_entries = T.cast(@index[@stack.join("::")], T.nilable(T::Array[Entry::SingletonClass])) + + if existing_entries + entry = T.must(existing_entries.first) + entry.update_singleton_information(node.location, collect_comments(node)) + else + entry = Entry::SingletonClass.new(@stack, @file_path, node.location, collect_comments(node), nil) + @index.add(entry, skip_prefix_tree: true) + end + + @owner_stack << entry + end + end + + sig { params(node: Prism::SingletonClassNode).void } + def on_singleton_class_node_leave(node) + @stack.pop + @owner_stack.pop + @visibility_stack.pop end sig { params(node: Prism::MultiWriteNode).void } @@ -194,10 +259,29 @@ def on_call_node_enter(node) handle_attribute(node, reader: false, writer: true) when :attr_accessor handle_attribute(node, reader: true, writer: true) - when :include - handle_module_operation(node, :included_modules) - when :prepend - handle_module_operation(node, :prepended_modules) + when :alias_method + handle_alias_method(node) + when :include, :prepend, :extend + handle_module_operation(node, message) + when :public + @visibility_stack.push(Entry::Visibility::PUBLIC) + when :protected + @visibility_stack.push(Entry::Visibility::PROTECTED) + when :private + @visibility_stack.push(Entry::Visibility::PRIVATE) + end + end + + sig { params(node: Prism::CallNode).void } + def on_call_node_leave(node) + message = node.name + case message + when :public, :protected, :private + # We want to restore the visibility stack when we leave a method definition with a visibility modifier + # e.g. `private def foo; end` + if node.arguments&.arguments&.first&.is_a?(Prism::DefNode) + @visibility_stack.pop + end end end @@ -206,35 +290,113 @@ def on_def_node_enter(node) @inside_def = true method_name = node.name.to_s comments = collect_comments(node) + case node.receiver when nil - @index << Entry::InstanceMethod.new( + @index.add(Entry::Method.new( method_name, @file_path, node.location, comments, - node.parameters, + list_params(node.parameters), + current_visibility, @owner_stack.last, - ) + )) when Prism::SelfNode - @index << Entry::SingletonMethod.new( + singleton = singleton_klass + + @index.add(Entry::Method.new( method_name, @file_path, node.location, comments, - node.parameters, - @owner_stack.last, - ) + list_params(node.parameters), + current_visibility, + singleton, + )) + + if singleton + @owner_stack << singleton + @stack << "" + end end end sig { params(node: Prism::DefNode).void } def on_def_node_leave(node) @inside_def = false + + if node.receiver.is_a?(Prism::SelfNode) + @owner_stack.pop + @stack.pop + end + end + + sig { params(node: Prism::InstanceVariableWriteNode).void } + def on_instance_variable_write_node_enter(node) + handle_instance_variable(node, node.name_loc) + end + + sig { params(node: Prism::InstanceVariableAndWriteNode).void } + def on_instance_variable_and_write_node_enter(node) + handle_instance_variable(node, node.name_loc) + end + + sig { params(node: Prism::InstanceVariableOperatorWriteNode).void } + def on_instance_variable_operator_write_node_enter(node) + handle_instance_variable(node, node.name_loc) + end + + sig { params(node: Prism::InstanceVariableOrWriteNode).void } + def on_instance_variable_or_write_node_enter(node) + handle_instance_variable(node, node.name_loc) + end + + sig { params(node: Prism::InstanceVariableTargetNode).void } + def on_instance_variable_target_node_enter(node) + handle_instance_variable(node, node.location) + end + + sig { params(node: Prism::AliasMethodNode).void } + def on_alias_method_node_enter(node) + method_name = node.new_name.slice + comments = collect_comments(node) + @index.add( + Entry::UnresolvedMethodAlias.new( + method_name, + node.old_name.slice, + @owner_stack.last, + @file_path, + node.new_name.location, + comments, + ), + ) end private + sig do + params( + node: T.any( + Prism::InstanceVariableAndWriteNode, + Prism::InstanceVariableOperatorWriteNode, + Prism::InstanceVariableOrWriteNode, + Prism::InstanceVariableTargetNode, + Prism::InstanceVariableWriteNode, + ), + loc: Prism::Location, + ).void + end + def handle_instance_variable(node, loc) + name = node.name.to_s + return if name == "@" + + # When instance variables are declared inside the class body, they turn into class instance variables rather than + # regular instance variables + owner = @inside_def ? @owner_stack.last : singleton_klass + @index.add(Entry::InstanceVariable.new(name, @file_path, loc, collect_comments(node), owner)) + end + sig { params(node: Prism::CallNode).void } def handle_private_constant(node) arguments = node.arguments&.arguments @@ -257,7 +419,46 @@ def handle_private_constant(node) # The private_constant method does not resolve the constant name. It always points to a constant that needs to # exist in the current namespace entries = @index[fully_qualify_name(name)] - entries&.each { |entry| entry.visibility = :private } + entries&.each { |entry| entry.visibility = Entry::Visibility::PRIVATE } + end + + sig { params(node: Prism::CallNode).void } + def handle_alias_method(node) + arguments = node.arguments&.arguments + return unless arguments + + new_name, old_name = arguments + return unless new_name && old_name + + new_name_value = case new_name + when Prism::StringNode + new_name.content + when Prism::SymbolNode + new_name.value + end + + return unless new_name_value + + old_name_value = case old_name + when Prism::StringNode + old_name.content + when Prism::SymbolNode + old_name.value + end + + return unless old_name_value + + comments = collect_comments(node) + @index.add( + Entry::UnresolvedMethodAlias.new( + new_name_value, + old_name_value, + @owner_stack.last, + @file_path, + new_name.location, + comments, + ), + ) end sig do @@ -282,22 +483,24 @@ def add_constant(node, name, value = nil) value = node.value unless node.is_a?(Prism::ConstantTargetNode) || node.is_a?(Prism::ConstantPathTargetNode) comments = collect_comments(node) - @index << case value - when Prism::ConstantReadNode, Prism::ConstantPathNode - Entry::UnresolvedAlias.new(value.slice, @stack.dup, name, @file_path, node.location, comments) - when Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, + @index.add( + case value + when Prism::ConstantReadNode, Prism::ConstantPathNode + Entry::UnresolvedAlias.new(value.slice, @stack.dup, name, @file_path, node.location, comments) + when Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode - # If the right hand side is another constant assignment, we need to visit it because that constant has to be - # indexed too - Entry::UnresolvedAlias.new(value.name.to_s, @stack.dup, name, @file_path, node.location, comments) - when Prism::ConstantPathWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode, + # If the right hand side is another constant assignment, we need to visit it because that constant has to be + # indexed too + Entry::UnresolvedAlias.new(value.name.to_s, @stack.dup, name, @file_path, node.location, comments) + when Prism::ConstantPathWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode, Prism::ConstantPathAndWriteNode - Entry::UnresolvedAlias.new(value.target.slice, @stack.dup, name, @file_path, node.location, comments) - else - Entry::Constant.new(name, @file_path, node.location, comments) - end + Entry::UnresolvedAlias.new(value.target.slice, @stack.dup, name, @file_path, node.location, comments) + else + Entry::Constant.new(name, @file_path, node.location, comments) + end, + ) end sig { params(node: Prism::Node).returns(T::Array[String]) } @@ -354,8 +557,20 @@ def handle_attribute(node, reader:, writer:) next unless name && loc - @index << Entry::Accessor.new(name, @file_path, loc, comments, @owner_stack.last) if reader - @index << Entry::Accessor.new("#{name}=", @file_path, loc, comments, @owner_stack.last) if writer + if reader + @index.add(Entry::Accessor.new(name, @file_path, loc, comments, current_visibility, @owner_stack.last)) + end + + next unless writer + + @index.add(Entry::Accessor.new( + "#{name}=", + @file_path, + loc, + comments, + current_visibility, + @owner_stack.last, + )) end end @@ -369,17 +584,129 @@ def handle_module_operation(node, operation) arguments = node.arguments&.arguments return unless arguments - names = arguments.filter_map do |node| - if node.is_a?(Prism::ConstantReadNode) || node.is_a?(Prism::ConstantPathNode) - node.full_name + arguments.each do |node| + next unless node.is_a?(Prism::ConstantReadNode) || node.is_a?(Prism::ConstantPathNode) + + case operation + when :include + owner.mixin_operations << Entry::Include.new(node.full_name) + when :prepend + owner.mixin_operations << Entry::Prepend.new(node.full_name) + when :extend + owner.mixin_operations << Entry::Extend.new(node.full_name) + end + rescue Prism::ConstantPathNode::DynamicPartsInConstantPathError, + Prism::ConstantPathNode::MissingNodesInConstantPathError + # Do nothing + end + end + + sig { returns(Entry::Visibility) } + def current_visibility + T.must(@visibility_stack.last) + end + + sig { params(parameters_node: T.nilable(Prism::ParametersNode)).returns(T::Array[Entry::Parameter]) } + def list_params(parameters_node) + return [] unless parameters_node + + parameters = [] + + parameters_node.requireds.each do |required| + name = parameter_name(required) + next unless name + + parameters << Entry::RequiredParameter.new(name: name) + end + + parameters_node.optionals.each do |optional| + name = parameter_name(optional) + next unless name + + parameters << Entry::OptionalParameter.new(name: name) + end + + rest = parameters_node.rest + + if rest.is_a?(Prism::RestParameterNode) + rest_name = rest.name || Entry::RestParameter::DEFAULT_NAME + parameters << Entry::RestParameter.new(name: rest_name) + end + + parameters_node.keywords.each do |keyword| + name = parameter_name(keyword) + next unless name + + case keyword + when Prism::RequiredKeywordParameterNode + parameters << Entry::KeywordParameter.new(name: name) + when Prism::OptionalKeywordParameterNode + parameters << Entry::OptionalKeywordParameter.new(name: name) end - rescue Prism::ConstantPathNode::DynamicPartsInConstantPathError - # TO DO: add MissingNodesInConstantPathError when released in Prism - # If a constant path reference is dynamic or missing parts, we can't - # index it end - collection = operation == :included_modules ? owner.included_modules : owner.prepended_modules - collection.concat(names) + + keyword_rest = parameters_node.keyword_rest + + if keyword_rest.is_a?(Prism::KeywordRestParameterNode) + keyword_rest_name = parameter_name(keyword_rest) || Entry::KeywordRestParameter::DEFAULT_NAME + parameters << Entry::KeywordRestParameter.new(name: keyword_rest_name) + end + + parameters_node.posts.each do |post| + name = parameter_name(post) + next unless name + + parameters << Entry::RequiredParameter.new(name: name) + end + + block = parameters_node.block + parameters << Entry::BlockParameter.new(name: block.name || Entry::BlockParameter::DEFAULT_NAME) if block + + parameters + end + + sig { params(node: T.nilable(Prism::Node)).returns(T.nilable(Symbol)) } + def parameter_name(node) + case node + when Prism::RequiredParameterNode, Prism::OptionalParameterNode, + Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode, + Prism::RestParameterNode, Prism::KeywordRestParameterNode + node.name + when Prism::MultiTargetNode + names = node.lefts.map { |parameter_node| parameter_name(parameter_node) } + + rest = node.rest + if rest.is_a?(Prism::SplatNode) + name = rest.expression&.slice + names << (rest.operator == "*" ? "*#{name}".to_sym : name&.to_sym) + end + + names << nil if rest.is_a?(Prism::ImplicitRestNode) + + names.concat(node.rights.map { |parameter_node| parameter_name(parameter_node) }) + + names_with_commas = names.join(", ") + :"(#{names_with_commas})" + end + end + + sig { returns(T.nilable(Entry::Class)) } + def singleton_klass + attached_class = @owner_stack.last + return unless attached_class + + # Return the existing singleton class if available + owner = T.cast( + @index["#{attached_class.name}::"], + T.nilable(T::Array[Entry::SingletonClass]), + ) + return owner.first if owner + + # If not available, create the singleton class lazily + nesting = @stack + [""] + entry = Entry::SingletonClass.new(nesting, @file_path, attached_class.location, [], nil) + @index.add(entry, skip_prefix_tree: true) + entry end end end diff --git a/lib/ruby_indexer/lib/ruby_indexer/entry.rb b/lib/ruby_indexer/lib/ruby_indexer/entry.rb index df1be9d08..066c6f07b 100644 --- a/lib/ruby_indexer/lib/ruby_indexer/entry.rb +++ b/lib/ruby_indexer/lib/ruby_indexer/entry.rb @@ -3,6 +3,14 @@ module RubyIndexer class Entry + class Visibility < T::Enum + enums do + PUBLIC = new(:public) + PROTECTED = new(:protected) + PRIVATE = new(:private) + end + end + extend T::Sig sig { returns(String) } @@ -17,7 +25,7 @@ class Entry sig { returns(T::Array[String]) } attr_reader :comments - sig { returns(Symbol) } + sig { returns(Visibility) } attr_accessor :visibility sig do @@ -32,7 +40,7 @@ def initialize(name, file_path, location, comments) @name = name @file_path = file_path @comments = comments - @visibility = T.let(:public, Symbol) + @visibility = T.let(Visibility::PUBLIC, Visibility) @location = T.let( if location.is_a?(Prism::Location) @@ -49,11 +57,35 @@ def initialize(name, file_path, location, comments) ) end + sig { returns(T::Boolean) } + def private? + visibility == Visibility::PRIVATE + end + sig { returns(String) } def file_name File.basename(@file_path) end + class ModuleOperation + extend T::Sig + extend T::Helpers + + abstract! + + sig { returns(String) } + attr_reader :module_name + + sig { params(module_name: String).void } + def initialize(module_name) + @module_name = module_name + end + end + + class Include < ModuleOperation; end + class Prepend < ModuleOperation; end + class Extend < ModuleOperation; end + class Namespace < Entry extend T::Sig extend T::Helpers @@ -61,13 +93,40 @@ class Namespace < Entry abstract! sig { returns(T::Array[String]) } - def included_modules - @included_modules ||= T.let([], T.nilable(T::Array[String])) + attr_reader :nesting + + sig do + params( + nesting: T::Array[String], + file_path: String, + location: T.any(Prism::Location, RubyIndexer::Location), + comments: T::Array[String], + ).void + end + def initialize(nesting, file_path, location, comments) + @name = T.let(nesting.join("::"), String) + # The original nesting where this namespace was discovered + @nesting = nesting + + super(@name, file_path, location, comments) end sig { returns(T::Array[String]) } - def prepended_modules - @prepended_modules ||= T.let([], T.nilable(T::Array[String])) + def mixin_operation_module_names + mixin_operations.map(&:module_name) + end + + # Stores all explicit prepend, include and extend operations in the exact order they were discovered in the source + # code. Maintaining the order is essential to linearize ancestors the right way when a module is both included + # and prepended + sig { returns(T::Array[ModuleOperation]) } + def mixin_operations + @mixin_operations ||= T.let([], T.nilable(T::Array[ModuleOperation])) + end + + sig { returns(Integer) } + def ancestor_hash + mixin_operation_module_names.hash end end @@ -84,16 +143,37 @@ class Class < Namespace sig do params( - name: String, + nesting: T::Array[String], file_path: String, location: T.any(Prism::Location, RubyIndexer::Location), comments: T::Array[String], parent_class: T.nilable(String), ).void end - def initialize(name, file_path, location, comments, parent_class) - super(name, file_path, location, comments) - @parent_class = T.let(parent_class, T.nilable(String)) + def initialize(nesting, file_path, location, comments, parent_class) + super(nesting, file_path, location, comments) + @parent_class = parent_class + end + + sig { override.returns(Integer) } + def ancestor_hash + [mixin_operation_module_names, @parent_class].hash + end + end + + class SingletonClass < Class + extend T::Sig + + sig { params(location: Prism::Location, comments: T::Array[String]).void } + def update_singleton_information(location, comments) + # Create a new RubyIndexer::Location object from the Prism location + @location = Location.new( + location.start_line, + location.end_line, + location.start_column, + location.end_column, + ) + @comments.concat(comments) end end @@ -125,6 +205,10 @@ class RequiredParameter < Parameter # An optional method parameter, e.g. `def foo(a = 123)` class OptionalParameter < Parameter + sig { override.returns(Symbol) } + def decorated_name + :"#{@name} = " + end end # An required keyword method parameter, e.g. `def foo(a:)` @@ -139,7 +223,7 @@ def decorated_name class OptionalKeywordParameter < Parameter sig { override.returns(Symbol) } def decorated_name - :"#{@name}:" + :"#{@name}: " end end @@ -188,11 +272,13 @@ class Member < Entry file_path: String, location: T.any(Prism::Location, RubyIndexer::Location), comments: T::Array[String], + visibility: Visibility, owner: T.nilable(Entry::Namespace), ).void end - def initialize(name, file_path, location, comments, owner) + def initialize(name, file_path, location, comments, visibility, owner) # rubocop:disable Metrics/ParameterLists super(name, file_path, location, comments) + @visibility = visibility @owner = owner end @@ -213,9 +299,6 @@ def parameters class Method < Member extend T::Sig - extend T::Helpers - - abstract! sig { override.returns(T::Array[Parameter]) } attr_reader :parameters @@ -226,109 +309,17 @@ class Method < Member file_path: String, location: T.any(Prism::Location, RubyIndexer::Location), comments: T::Array[String], - parameters_node: T.nilable(Prism::ParametersNode), + parameters: T::Array[Parameter], + visibility: Visibility, owner: T.nilable(Entry::Namespace), ).void end - def initialize(name, file_path, location, comments, parameters_node, owner) # rubocop:disable Metrics/ParameterLists - super(name, file_path, location, comments, owner) - - @parameters = T.let(list_params(parameters_node), T::Array[Parameter]) - end - - private - - sig { params(parameters_node: T.nilable(Prism::ParametersNode)).returns(T::Array[Parameter]) } - def list_params(parameters_node) - return [] unless parameters_node - - parameters = [] - - parameters_node.requireds.each do |required| - name = parameter_name(required) - next unless name - - parameters << RequiredParameter.new(name: name) - end - - parameters_node.optionals.each do |optional| - name = parameter_name(optional) - next unless name - - parameters << OptionalParameter.new(name: name) - end - - parameters_node.keywords.each do |keyword| - name = parameter_name(keyword) - next unless name - - case keyword - when Prism::RequiredKeywordParameterNode - parameters << KeywordParameter.new(name: name) - when Prism::OptionalKeywordParameterNode - parameters << OptionalKeywordParameter.new(name: name) - end - end - - rest = parameters_node.rest - - if rest.is_a?(Prism::RestParameterNode) - rest_name = rest.name || RestParameter::DEFAULT_NAME - parameters << RestParameter.new(name: rest_name) - end - - keyword_rest = parameters_node.keyword_rest - - if keyword_rest.is_a?(Prism::KeywordRestParameterNode) - keyword_rest_name = parameter_name(keyword_rest) || KeywordRestParameter::DEFAULT_NAME - parameters << KeywordRestParameter.new(name: keyword_rest_name) - end - - parameters_node.posts.each do |post| - name = parameter_name(post) - next unless name - - parameters << RequiredParameter.new(name: name) - end - - block = parameters_node.block - parameters << BlockParameter.new(name: block.name || BlockParameter::DEFAULT_NAME) if block - - parameters - end - - sig { params(node: T.nilable(Prism::Node)).returns(T.nilable(Symbol)) } - def parameter_name(node) - case node - when Prism::RequiredParameterNode, Prism::OptionalParameterNode, - Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode, - Prism::RestParameterNode, Prism::KeywordRestParameterNode - node.name - when Prism::MultiTargetNode - names = node.lefts.map { |parameter_node| parameter_name(parameter_node) } - - rest = node.rest - if rest.is_a?(Prism::SplatNode) - name = rest.expression&.slice - names << (rest.operator == "*" ? "*#{name}".to_sym : name&.to_sym) - end - - names << nil if rest.is_a?(Prism::ImplicitRestNode) - - names.concat(node.rights.map { |parameter_node| parameter_name(parameter_node) }) - - names_with_commas = names.join(", ") - :"(#{names_with_commas})" - end + def initialize(name, file_path, location, comments, parameters, visibility, owner) # rubocop:disable Metrics/ParameterLists + super(name, file_path, location, comments, visibility, owner) + @parameters = parameters end end - class SingletonMethod < Method - end - - class InstanceMethod < Method - end - # An UnresolvedAlias points to a constant alias with a right hand side that has not yet been resolved. For # example, if we find # @@ -377,8 +368,57 @@ class Alias < Entry def initialize(target, unresolved_alias) super(unresolved_alias.name, unresolved_alias.file_path, unresolved_alias.location, unresolved_alias.comments) + @visibility = unresolved_alias.visibility @target = target end end + + # Represents an instance variable e.g.: @a = 1 + class InstanceVariable < Entry + sig { returns(T.nilable(Entry::Namespace)) } + attr_reader :owner + + sig do + params( + name: String, + file_path: String, + location: T.any(Prism::Location, RubyIndexer::Location), + comments: T::Array[String], + owner: T.nilable(Entry::Namespace), + ).void + end + def initialize(name, file_path, location, comments, owner) + super(name, file_path, location, comments) + @owner = owner + end + end + + class UnresolvedMethodAlias < Entry + extend T::Sig + + sig { returns(String) } + attr_reader :new_name, :old_name + + sig { returns(T.nilable(Entry::Namespace)) } + attr_reader :owner + + sig do + params( + new_name: String, + old_name: String, + owner: T.nilable(Entry::Namespace), + file_path: String, + location: Prism::Location, + comments: T::Array[String], + ).void + end + def initialize(new_name, old_name, owner, file_path, location, comments) # rubocop:disable Metrics/ParameterLists + super(new_name, file_path, location, comments) + + @new_name = new_name + @old_name = old_name + @owner = owner + end + end end end diff --git a/lib/ruby_indexer/lib/ruby_indexer/index.rb b/lib/ruby_indexer/lib/ruby_indexer/index.rb index 363a376a2..1cb992dc2 100644 --- a/lib/ruby_indexer/lib/ruby_indexer/index.rb +++ b/lib/ruby_indexer/lib/ruby_indexer/index.rb @@ -6,6 +6,7 @@ class Index extend T::Sig class UnresolvableAliasError < StandardError; end + class NonExistingNamespaceError < StandardError; end # The minimum Jaro-Winkler similarity score for an entry to be considered a match for a given fuzzy search query ENTRY_SIMILARITY_THRESHOLD = 0.7 @@ -31,6 +32,9 @@ def initialize # Holds all require paths for every indexed item so that we can provide autocomplete for requires @require_paths_tree = T.let(PrefixTree[IndexablePath].new, PrefixTree[IndexablePath]) + + # Holds the linearized ancestors list for every namespace + @ancestors = T.let({}, T::Hash[String, T::Array[String]]) end sig { params(indexable: IndexablePath).void } @@ -61,13 +65,13 @@ def delete(indexable) @require_paths_tree.delete(require_path) if require_path end - sig { params(entry: Entry).void } - def <<(entry) + sig { params(entry: Entry, skip_prefix_tree: T::Boolean).void } + def add(entry, skip_prefix_tree: false) name = entry.name (@entries[name] ||= []) << entry (@files_to_entries[entry.file_path] ||= []) << entry - @entries_tree.insert(name, T.must(@entries[name])) + @entries_tree.insert(name, T.must(@entries[name])) unless skip_prefix_tree end sig { params(fully_qualified_name: String).returns(T.nilable(T::Array[Entry])) } @@ -114,11 +118,21 @@ def prefix_search(query, nesting = nil) # Fuzzy searches index entries based on Jaro-Winkler similarity. If no query is provided, all entries are returned sig { params(query: T.nilable(String)).returns(T::Array[Entry]) } def fuzzy_search(query) - return @entries.flat_map { |_name, entries| entries } unless query + unless query + entries = @entries.filter_map do |_name, entries| + next if entries.first.is_a?(Entry::SingletonClass) + + entries + end + + return entries.flatten + end normalized_query = query.gsub("::", "").downcase results = @entries.filter_map do |name, entries| + next if entries.first.is_a?(Entry::SingletonClass) + similarity = DidYouMean::JaroWinkler.distance(name.gsub("::", "").downcase, normalized_query) [entries, -similarity] if similarity > ENTRY_SIMILARITY_THRESHOLD end @@ -126,35 +140,58 @@ def fuzzy_search(query) results.flat_map(&:first) end - # Try to find the entry based on the nesting from the most specific to the least specific. For example, if we have - # the nesting as ["Foo", "Bar"] and the name as "Baz", we will try to find it in this order: - # 1. Foo::Bar::Baz - # 2. Foo::Baz - # 3. Baz - sig { params(name: String, nesting: T::Array[String]).returns(T.nilable(T::Array[Entry])) } - def resolve(name, nesting) + sig { params(name: String, receiver_name: String).returns(T::Array[Entry]) } + def method_completion_candidates(name, receiver_name) + ancestors = linearized_ancestors_of(receiver_name) + candidates = prefix_search(name).flatten + candidates.select! do |entry| + entry.is_a?(RubyIndexer::Entry::Member) && ancestors.any?(entry.owner&.name) + end + candidates + end + + # Resolve a constant to its declaration based on its name and the nesting where the reference was found. Parameter + # documentation: + # + # name: the name of the reference how it was found in the source code (qualified or not) + # nesting: the nesting structure where the reference was found (e.g.: ["Foo", "Bar"]) + # seen_names: this parameter should not be used by consumers of the api. It is used to avoid infinite recursion when + # resolving circular references + sig do + params( + name: String, + nesting: T::Array[String], + seen_names: T::Array[String], + ).returns(T.nilable(T::Array[Entry])) + end + def resolve(name, nesting, seen_names = []) + # If we have a top level reference, then we just search for it straight away ignoring the nesting if name.start_with?("::") - name = name.delete_prefix("::") - results = @entries[name] || @entries[follow_aliased_namespace(name)] - return results&.map { |e| e.is_a?(Entry::UnresolvedAlias) ? resolve_alias(e) : e } + entries = direct_or_aliased_constant(name.delete_prefix("::"), seen_names) + return entries if entries end - nesting.length.downto(0).each do |i| - namespace = T.must(nesting[0...i]).join("::") - full_name = namespace.empty? ? name : "#{namespace}::#{name}" + # Non qualified reference path + full_name = nesting.any? ? "#{nesting.join("::")}::#{name}" : name - # If we find an entry with `full_name` directly, then we can already return it, even if it contains aliases - - # because the user might be trying to jump to the alias definition. - # - # However, if we don't find it, then we need to search for possible aliases in the namespace. For example, in - # the LSP itself we alias `RubyLsp::Interface` to `LanguageServer::Protocol::Interface`, which means doing - # `RubyLsp::Interface::Location` is allowed. For these cases, we need some way to realize that the - # `RubyLsp::Interface` part is an alias, that has to be resolved - entries = @entries[full_name] || @entries[follow_aliased_namespace(full_name)] - return entries.map { |e| e.is_a?(Entry::UnresolvedAlias) ? resolve_alias(e) : e } if entries - end + # When the name is not qualified with any namespaces, Ruby will take several steps to try to the resolve the + # constant. First, it will try to find the constant in the exact namespace where the reference was found + entries = direct_or_aliased_constant(full_name, seen_names) + return entries if entries - nil + # If the constant is not found yet, then Ruby will try to find the constant in the enclosing lexical scopes, + # unwrapping each level one by one. Important note: the top level is not included because that's the fallback of + # the algorithm after every other possibility has been exhausted + entries = lookup_enclosing_scopes(name, nesting, seen_names) + return entries if entries + + # If the constant does not exist in any enclosing scopes, then Ruby will search for it in the ancestors of the + # specific namespace where the reference was found + entries = lookup_ancestor_chain(name, nesting, seen_names) + return entries if entries + + # Finally, as a fallback, Ruby will search for the constant in the top level namespace + search_top_level(name, seen_names) rescue UnresolvableAliasError nil end @@ -196,6 +233,12 @@ def index_single(indexable_path, source = nil) rescue Errno::EISDIR, Errno::ENOENT # If `path` is a directory, just ignore it and continue indexing. If the file doesn't exist, then we also ignore # it + rescue SystemStackError => e + if e.backtrace&.first&.include?("prism") + $stderr.puts "Prism error indexing #{indexable_path.full_path}: #{e.message}" + else + raise + end end # Follows aliases in a namespace. The algorithm keeps checking if the name is an alias and then recursively follows @@ -208,8 +251,8 @@ def index_single(indexable_path, source = nil) # If we find an alias, then we want to follow its target. In the same example, if `Foo::Bar` is an alias to # `Something::Else`, then we first discover `Something::Else::Baz`. But `Something::Else::Baz` might contain other # aliases, so we have to invoke `follow_aliased_namespace` again to check until we only return a real name - sig { params(name: String).returns(String) } - def follow_aliased_namespace(name) + sig { params(name: String, seen_names: T::Array[String]).returns(String) } + def follow_aliased_namespace(name, seen_names = []) return name if @entries[name] parts = name.split("::") @@ -222,16 +265,16 @@ def follow_aliased_namespace(name) case entry when Entry::Alias target = entry.target - return follow_aliased_namespace("#{target}::#{real_parts.join("::")}") + return follow_aliased_namespace("#{target}::#{real_parts.join("::")}", seen_names) when Entry::UnresolvedAlias - resolved = resolve_alias(entry) + resolved = resolve_alias(entry, seen_names) if resolved.is_a?(Entry::UnresolvedAlias) raise UnresolvableAliasError, "The constant #{resolved.name} is an alias to a non existing constant" end target = resolved.target - return follow_aliased_namespace("#{target}::#{real_parts.join("::")}") + return follow_aliased_namespace("#{target}::#{real_parts.join("::")}", seen_names) else real_parts.unshift(T.must(parts[i])) end @@ -245,38 +288,300 @@ def follow_aliased_namespace(name) sig { params(method_name: String, receiver_name: String).returns(T.nilable(T::Array[Entry::Member])) } def resolve_method(method_name, receiver_name) method_entries = self[method_name] - owner_entries = self[receiver_name] - return unless owner_entries && method_entries - - owner_name = T.must(owner_entries.first).name - T.cast( - method_entries.grep(Entry::Member).select do |entry| - T.cast(entry, Entry::Member).owner&.name == owner_name - end, - T::Array[Entry::Member], - ) + ancestors = linearized_ancestors_of(receiver_name.delete_prefix("::")) + return unless method_entries + + ancestors.each do |ancestor| + found = method_entries.select do |entry| + next unless entry.is_a?(Entry::Member) + + entry.owner&.name == ancestor + end + + return T.cast(found, T::Array[Entry::Member]) if found.any? + end + + nil + rescue NonExistingNamespaceError + nil + end + + # Linearizes the ancestors for a given name, returning the order of namespaces in which Ruby will search for method + # or constant declarations. + # + # When we add an ancestor in Ruby, that namespace might have ancestors of its own. Therefore, we need to linearize + # everything recursively to ensure that we are placing ancestors in the right order. For example, if you include a + # module that prepends another module, then the prepend module appears before the included module. + # + # The order of ancestors is [linearized_prepends, self, linearized_includes, linearized_superclass] + sig { params(fully_qualified_name: String).returns(T::Array[String]) } + def linearized_ancestors_of(fully_qualified_name) + # If we already computed the ancestors for this namespace, return it straight away + cached_ancestors = @ancestors[fully_qualified_name] + return cached_ancestors if cached_ancestors + + # If we don't have an entry for `name`, raise + entries = self[fully_qualified_name] + raise NonExistingNamespaceError, "No entry found for #{fully_qualified_name}" unless entries + + ancestors = [fully_qualified_name] + + # Cache the linearized ancestors array eagerly. This is important because we might have circular dependencies and + # this will prevent us from falling into an infinite recursion loop. Because we mutate the ancestors array later, + # the cache will reflect the final result + @ancestors[fully_qualified_name] = ancestors + + # If none of the entries for `name` are namespaces, raise + namespaces = entries.filter_map do |entry| + case entry + when Entry::Namespace + entry + when Entry::Alias + self[entry.target]&.grep(Entry::Namespace) + end + end.flatten + + raise NonExistingNamespaceError, + "None of the entries for #{fully_qualified_name} are modules or classes" if namespaces.empty? + + mixin_operations = namespaces.flat_map(&:mixin_operations) + main_namespace_index = 0 + + # The original nesting where we discovered this namespace, so that we resolve the correct names of the + # included/prepended/extended modules and parent classes + nesting = T.must(namespaces.first).nesting + + mixin_operations.each do |operation| + resolved_module = resolve(operation.module_name, nesting) + next unless resolved_module + + module_fully_qualified_name = T.must(resolved_module.first).name + + case operation + when Entry::Prepend + # When a module is prepended, Ruby checks if it hasn't been prepended already to prevent adding it in front of + # the actual namespace twice. However, it does not check if it has been included because you are allowed to + # prepend the same module after it has already been included + linearized_prepends = linearized_ancestors_of(module_fully_qualified_name) + + # When there are duplicate prepended modules, we have to insert the new prepends after the existing ones. For + # example, if the current ancestors are `["A", "Foo"]` and we try to prepend `["A", "B"]`, then `"B"` has to + # be inserted after `"A` + uniq_prepends = linearized_prepends - T.must(ancestors[0...main_namespace_index]) + insert_position = linearized_prepends.length - uniq_prepends.length + + T.unsafe(ancestors).insert( + insert_position, + *(linearized_prepends - T.must(ancestors[0...main_namespace_index])), + ) + + main_namespace_index += linearized_prepends.length + when Entry::Include + # When including a module, Ruby will always prevent duplicate entries in case the module has already been + # prepended or included + linearized_includes = linearized_ancestors_of(module_fully_qualified_name) + T.unsafe(ancestors).insert(main_namespace_index + 1, *(linearized_includes - ancestors)) + end + end + + # Find the first class entry that has a parent class. Notice that if the developer makes a mistake and inherits + # from two diffent classes in different files, we simply ignore it + superclass = T.cast(namespaces.find { |n| n.is_a?(Entry::Class) && n.parent_class }, T.nilable(Entry::Class)) + + if superclass + # If the user makes a mistake and creates a class that inherits from itself, this method would throw a stack + # error. We need to ensure that this isn't the case + parent_class = T.must(superclass.parent_class) + + resolved_parent_class = resolve(parent_class, nesting) + parent_class_name = resolved_parent_class&.first&.name + + if parent_class_name && fully_qualified_name != parent_class_name + ancestors.concat(linearized_ancestors_of(parent_class_name)) + end + end + + ancestors + end + + # Resolves an instance variable name for a given owner name. This method will linearize the ancestors of the owner + # and find inherited instance variables as well + sig { params(variable_name: String, owner_name: String).returns(T.nilable(T::Array[Entry::InstanceVariable])) } + def resolve_instance_variable(variable_name, owner_name) + entries = T.cast(self[variable_name], T.nilable(T::Array[Entry::InstanceVariable])) + return unless entries + + ancestors = linearized_ancestors_of(owner_name) + return if ancestors.empty? + + entries.select { |e| ancestors.include?(e.owner&.name) } + end + + # Returns a list of possible candidates for completion of instance variables for a given owner name. The name must + # include the `@` prefix + sig { params(name: String, owner_name: String).returns(T::Array[Entry::InstanceVariable]) } + def instance_variable_completion_candidates(name, owner_name) + entries = T.cast(prefix_search(name).flatten, T::Array[Entry::InstanceVariable]) + ancestors = linearized_ancestors_of(owner_name) + + variables = entries.select { |e| ancestors.any?(e.owner&.name) } + variables.uniq!(&:name) + variables + end + + # Synchronizes a change made to the given indexable path. This method will ensure that new declarations are indexed, + # removed declarations removed and that the ancestor linearization cache is cleared if necessary + sig { params(indexable: IndexablePath).void } + def handle_change(indexable) + original_entries = @files_to_entries[indexable.full_path] + + delete(indexable) + index_single(indexable) + + updated_entries = @files_to_entries[indexable.full_path] + + return unless original_entries && updated_entries + + # A change in one ancestor may impact several different others, which could be including that ancestor through + # indirect means like including a module that than includes the ancestor. Trying to figure out exactly which + # ancestors need to be deleted is too expensive. Therefore, if any of the namespace entries has a change to their + # ancestor hash, we clear all ancestors and start linearizing lazily again from scratch + original_map = T.cast( + original_entries.select { |e| e.is_a?(Entry::Namespace) }, + T::Array[Entry::Namespace], + ).to_h { |e| [e.name, e.ancestor_hash] } + + updated_map = T.cast( + updated_entries.select { |e| e.is_a?(Entry::Namespace) }, + T::Array[Entry::Namespace], + ).to_h { |e| [e.name, e.ancestor_hash] } + + @ancestors.clear if original_map.any? { |name, hash| updated_map[name] != hash } end private # Attempts to resolve an UnresolvedAlias into a resolved Alias. If the unresolved alias is pointing to a constant # that doesn't exist, then we return the same UnresolvedAlias - sig { params(entry: Entry::UnresolvedAlias).returns(T.any(Entry::Alias, Entry::UnresolvedAlias)) } - def resolve_alias(entry) - target = resolve(entry.target, entry.nesting) + sig do + params( + entry: Entry::UnresolvedAlias, + seen_names: T::Array[String], + ).returns(T.any(Entry::Alias, Entry::UnresolvedAlias)) + end + def resolve_alias(entry, seen_names) + alias_name = entry.name + return entry if seen_names.include?(alias_name) + + seen_names << alias_name + + target = resolve(entry.target, entry.nesting, seen_names) return entry unless target target_name = T.must(target.first).name resolved_alias = Entry::Alias.new(target_name, entry) # Replace the UnresolvedAlias by a resolved one so that we don't have to do this again later - original_entries = T.must(@entries[entry.name]) + original_entries = T.must(@entries[alias_name]) original_entries.delete(entry) original_entries << resolved_alias - @entries_tree.insert(entry.name, original_entries) + @entries_tree.insert(alias_name, original_entries) resolved_alias end + + sig do + params( + name: String, + nesting: T::Array[String], + seen_names: T::Array[String], + ).returns(T.nilable(T::Array[Entry])) + end + def lookup_enclosing_scopes(name, nesting, seen_names) + nesting.length.downto(1).each do |i| + namespace = T.must(nesting[0...i]).join("::") + + # If we find an entry with `full_name` directly, then we can already return it, even if it contains aliases - + # because the user might be trying to jump to the alias definition. + # + # However, if we don't find it, then we need to search for possible aliases in the namespace. For example, in + # the LSP itself we alias `RubyLsp::Interface` to `LanguageServer::Protocol::Interface`, which means doing + # `RubyLsp::Interface::Location` is allowed. For these cases, we need some way to realize that the + # `RubyLsp::Interface` part is an alias, that has to be resolved + entries = direct_or_aliased_constant("#{namespace}::#{name}", seen_names) + return entries if entries + end + + nil + end + + sig do + params( + name: String, + nesting: T::Array[String], + seen_names: T::Array[String], + ).returns(T.nilable(T::Array[Entry])) + end + def lookup_ancestor_chain(name, nesting, seen_names) + *nesting_parts, constant_name = build_non_redundant_full_name(name, nesting).split("::") + return if T.must(nesting_parts).empty? + + namespace_entries = resolve(T.must(nesting_parts).join("::"), [], seen_names) + return unless namespace_entries + + ancestors = T.must(nesting_parts).empty? ? [] : linearized_ancestors_of(T.must(namespace_entries.first).name) + + ancestors.each do |ancestor_name| + entries = direct_or_aliased_constant("#{ancestor_name}::#{constant_name}", seen_names) + return entries if entries + end + + nil + rescue NonExistingNamespaceError + nil + end + + # Removes redudancy from a constant reference's full name. For example, if we find a reference to `A::B::Foo` inside + # of the ["A", "B"] nesting, then we should not concatenate the nesting with the name or else we'll end up with + # `A::B::A::B::Foo`. This method will remove any redundant parts from the final name based on the reference and the + # nesting + sig { params(name: String, nesting: T::Array[String]).returns(String) } + def build_non_redundant_full_name(name, nesting) + return name if nesting.empty? + + namespace = nesting.join("::") + + # If the name is not qualified, we can just concatenate the nesting and the name + return "#{namespace}::#{name}" unless name.include?("::") + + name_parts = name.split("::") + + # Find the first part of the name that is not in the nesting + index = name_parts.index { |part| !nesting.include?(part) } + + if index.nil? + # All parts of the nesting are redundant because they are already present in the name. We can return the name + # directly + name + elsif index == 0 + # No parts of the nesting are in the name, we can concatenate the namespace and the name + "#{namespace}::#{name}" + else + # The name includes some parts of the nesting. We need to remove the redundant parts + "#{namespace}::#{T.must(name_parts[index..-1]).join("::")}" + end + end + + sig { params(full_name: String, seen_names: T::Array[String]).returns(T.nilable(T::Array[Entry])) } + def direct_or_aliased_constant(full_name, seen_names) + entries = @entries[full_name] || @entries[follow_aliased_namespace(full_name)] + entries&.map { |e| e.is_a?(Entry::UnresolvedAlias) ? resolve_alias(e, seen_names) : e } + end + + sig { params(name: String, seen_names: T::Array[String]).returns(T.nilable(T::Array[Entry])) } + def search_top_level(name, seen_names) + @entries[name]&.map { |e| e.is_a?(Entry::UnresolvedAlias) ? resolve_alias(e, seen_names) : e } + end end end diff --git a/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb b/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb new file mode 100644 index 000000000..d02f63c5d --- /dev/null +++ b/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb @@ -0,0 +1,147 @@ +# typed: strict +# frozen_string_literal: true + +module RubyIndexer + class RBSIndexer + extend T::Sig + + sig { params(index: Index).void } + def initialize(index) + @index = index + end + + sig { void } + def index_ruby_core + loader = RBS::EnvironmentLoader.new + RBS::Environment.from_loader(loader).resolve_type_names + + loader.each_signature do |source, pathname, _buffer, declarations, _directives| + process_signature(source, pathname, declarations) + end + end + + private + + sig { params(source: T.untyped, pathname: Pathname, declarations: T::Array[RBS::AST::Declarations::Base]).void } + def process_signature(source, pathname, declarations) + declarations.each do |declaration| + process_declaration(declaration, pathname) + end + end + + sig { params(declaration: RBS::AST::Declarations::Base, pathname: Pathname).void } + def process_declaration(declaration, pathname) + case declaration + when RBS::AST::Declarations::Class + handle_class_declaration(declaration, pathname) + when RBS::AST::Declarations::Module + handle_module_declaration(declaration, pathname) + else # rubocop:disable Style/EmptyElse + # Other kinds not yet handled + end + end + + sig { params(declaration: RBS::AST::Declarations::Class, pathname: Pathname).void } + def handle_class_declaration(declaration, pathname) + nesting = [declaration.name.name.to_s] + file_path = pathname.to_s + location = to_ruby_indexer_location(declaration.location) + comments = Array(declaration.comment&.string) + parent_class = declaration.super_class&.name&.name&.to_s + class_entry = Entry::Class.new(nesting, file_path, location, comments, parent_class) + add_declaration_mixins_to_entry(declaration, class_entry) + @index.add(class_entry) + declaration.members.each do |member| + next unless member.is_a?(RBS::AST::Members::MethodDefinition) + + handle_method(member, class_entry) + end + end + + sig { params(declaration: RBS::AST::Declarations::Module, pathname: Pathname).void } + def handle_module_declaration(declaration, pathname) + nesting = [declaration.name.name.to_s] + file_path = pathname.to_s + location = to_ruby_indexer_location(declaration.location) + comments = Array(declaration.comment&.string) + module_entry = Entry::Module.new(nesting, file_path, location, comments) + add_declaration_mixins_to_entry(declaration, module_entry) + @index.add(module_entry) + declaration.members.each do |member| + next unless member.is_a?(RBS::AST::Members::MethodDefinition) + + handle_method(member, module_entry) + end + end + + sig { params(rbs_location: RBS::Location).returns(RubyIndexer::Location) } + def to_ruby_indexer_location(rbs_location) + RubyIndexer::Location.new( + rbs_location.start_line, + rbs_location.end_line, + rbs_location.start_column, + rbs_location.end_column, + ) + end + + sig do + params( + declaration: T.any(RBS::AST::Declarations::Class, RBS::AST::Declarations::Module), + entry: Entry::Namespace, + ).void + end + def add_declaration_mixins_to_entry(declaration, entry) + declaration.each_mixin do |mixin| + name = mixin.name.name.to_s + mixin_operation = + case mixin + when RBS::AST::Members::Include + Entry::Include.new(name) + when RBS::AST::Members::Extend + Entry::Extend.new(name) + when RBS::AST::Members::Prepend + Entry::Prepend.new(name) + end + entry.mixin_operations << mixin_operation if mixin_operation + end + end + + sig { params(member: RBS::AST::Members::MethodDefinition, owner: Entry::Namespace).void } + def handle_method(member, owner) + name = member.name.name + file_path = member.location.buffer.name + location = to_ruby_indexer_location(member.location) + comments = Array(member.comment&.string) + + visibility = case member.visibility + when :private + Entry::Visibility::PRIVATE + when :protected + Entry::Visibility::PROTECTED + else + Entry::Visibility::PUBLIC + end + + real_owner = member.singleton? ? existing_or_new_singleton_klass(owner) : owner + @index.add(Entry::Method.new(name, file_path, location, comments, [], visibility, real_owner)) + end + + sig { params(owner: Entry::Namespace).returns(T.nilable(Entry::Class)) } + def existing_or_new_singleton_klass(owner) + *_parts, name = owner.name.split("::") + + # Return the existing singleton class if available + singleton_entries = T.cast( + @index["#{owner.name}::"], + T.nilable(T::Array[Entry::SingletonClass]), + ) + return singleton_entries.first if singleton_entries + + # If not available, create the singleton class lazily + nesting = owner.nesting + [""] + entry = Entry::SingletonClass.new(nesting, owner.file_path, owner.location, [], nil) + @index.add(entry, skip_prefix_tree: true) + entry + end + end +end diff --git a/lib/ruby_indexer/ruby_indexer.rb b/lib/ruby_indexer/ruby_indexer.rb index d85facf79..17b25c049 100644 --- a/lib/ruby_indexer/ruby_indexer.rb +++ b/lib/ruby_indexer/ruby_indexer.rb @@ -11,6 +11,7 @@ require "ruby_indexer/lib/ruby_indexer/configuration" require "ruby_indexer/lib/ruby_indexer/prefix_tree" require "ruby_indexer/lib/ruby_indexer/location" +require "ruby_indexer/lib/ruby_indexer/rbs_indexer" module RubyIndexer @configuration = T.let(Configuration.new, Configuration) diff --git a/lib/ruby_indexer/test/classes_and_modules_test.rb b/lib/ruby_indexer/test/classes_and_modules_test.rb index d18cb1b02..ff3a17cb3 100644 --- a/lib/ruby_indexer/test/classes_and_modules_test.rb +++ b/lib/ruby_indexer/test/classes_and_modules_test.rb @@ -191,7 +191,8 @@ class Foo @index.delete(IndexablePath.new(nil, "/fake/path/foo.rb")) refute_entry("Foo") - assert_empty(@index.instance_variable_get(:@files_to_entries)) + + assert_no_indexed_entries end def test_comments_can_be_attached_to_a_class @@ -290,13 +291,13 @@ class D; end RUBY b_const = @index["A::B"].first - assert_equal(:private, b_const.visibility) + assert_equal(Entry::Visibility::PRIVATE, b_const.visibility) c_const = @index["A::C"].first - assert_equal(:private, c_const.visibility) + assert_equal(Entry::Visibility::PRIVATE, c_const.visibility) d_const = @index["A::D"].first - assert_equal(:public, d_const.visibility) + assert_equal(Entry::Visibility::PUBLIC, d_const.visibility) end def test_keeping_track_of_super_classes @@ -323,7 +324,7 @@ class FinalThing < Something::Baz assert_equal("Bar", foo.parent_class) baz = T.must(@index["Baz"].first) - assert_nil(baz.parent_class) + assert_equal("::Object", baz.parent_class) qux = T.must(@index["Something::Qux"].first) assert_equal("::Baz", qux.parent_class) @@ -369,13 +370,13 @@ class ConstantPathReferences RUBY foo = T.must(@index["Foo"][0]) - assert_equal(["A1", "A2", "A3", "A4", "A5", "A6"], foo.included_modules) + assert_equal(["A1", "A2", "A3", "A4", "A5", "A6"], foo.mixin_operation_module_names) qux = T.must(@index["Foo::Qux"][0]) - assert_equal(["Corge", "Corge", "Baz"], qux.included_modules) + assert_equal(["Corge", "Corge", "Baz"], qux.mixin_operation_module_names) constant_path_references = T.must(@index["ConstantPathReferences"][0]) - assert_equal(["Foo::Bar", "Foo::Bar2"], constant_path_references.included_modules) + assert_equal(["Foo::Bar", "Foo::Bar2"], constant_path_references.mixin_operation_module_names) end def test_keeping_track_of_prepended_modules @@ -415,13 +416,105 @@ class ConstantPathReferences RUBY foo = T.must(@index["Foo"][0]) - assert_equal(["A1", "A2", "A3", "A4", "A5", "A6"], foo.prepended_modules) + assert_equal(["A1", "A2", "A3", "A4", "A5", "A6"], foo.mixin_operation_module_names) + + qux = T.must(@index["Foo::Qux"][0]) + assert_equal(["Corge", "Corge", "Baz"], qux.mixin_operation_module_names) + + constant_path_references = T.must(@index["ConstantPathReferences"][0]) + assert_equal(["Foo::Bar", "Foo::Bar2"], constant_path_references.mixin_operation_module_names) + end + + def test_keeping_track_of_extended_modules + index(<<~RUBY) + class Foo + # valid syntaxes that we can index + extend A1 + self.extend A2 + extend A3, A4 + self.extend A5, A6 + + # valid syntaxes that we cannot index because of their dynamic nature + extend some_variable_or_method_call + self.extend some_variable_or_method_call + + def something + extend A7 # We should not index this because of this dynamic nature + end + + # Valid inner class syntax definition with its own modules prepended + class Qux + extend Corge + self.extend Corge + extend Baz + + extend some_variable_or_method_call + end + end + + class ConstantPathReferences + extend Foo::Bar + self.extend Foo::Bar2 + + extend dynamic::Bar + extend Foo:: + end + RUBY + + foo = T.must(@index["Foo"][0]) + assert_equal(["A1", "A2", "A3", "A4", "A5", "A6"], foo.mixin_operation_module_names) qux = T.must(@index["Foo::Qux"][0]) - assert_equal(["Corge", "Corge", "Baz"], qux.prepended_modules) + assert_equal(["Corge", "Corge", "Baz"], qux.mixin_operation_module_names) constant_path_references = T.must(@index["ConstantPathReferences"][0]) - assert_equal(["Foo::Bar", "Foo::Bar2"], constant_path_references.prepended_modules) + assert_equal(["Foo::Bar", "Foo::Bar2"], constant_path_references.mixin_operation_module_names) + end + + def test_tracking_singleton_classes + index(<<~RUBY) + class Foo; end + class Foo + # Some extra comments + class << self + end + end + RUBY + + foo = T.must(@index["Foo::"].first) + assert_equal(4, foo.location.start_line) + assert_equal("Some extra comments", foo.comments.join("\n")) + end + + def test_dynamic_singleton_class_blocks + index(<<~RUBY) + class Foo + # Some extra comments + class << bar + end + end + RUBY + + singleton = T.must(@index["Foo::"].first) + + # Even though this is not correct, we consider any dynamic singleton class block as a regular singleton class. + # That pattern cannot be properly analyzed statically and assuming that it's always a regular singleton simplifies + # the implementation considerably. + assert_equal(3, singleton.location.start_line) + assert_equal("Some extra comments", singleton.comments.join("\n")) + end + + def test_namespaces_inside_singleton_blocks + index(<<~RUBY) + class Foo + class << self + class Bar + end + end + end + RUBY + + assert_entry("Foo::::Bar", Entry::Class, "/fake/path/foo.rb:2-4:3-7") end end end diff --git a/lib/ruby_indexer/test/configuration_test.rb b/lib/ruby_indexer/test/configuration_test.rb index e7e774e6e..4ebffc7f1 100644 --- a/lib/ruby_indexer/test/configuration_test.rb +++ b/lib/ruby_indexer/test/configuration_test.rb @@ -54,7 +54,7 @@ def test_indexables_includes_default_gems assert_includes(indexables, "#{RbConfig::CONFIG["rubylibdir"]}/pathname.rb") assert_includes(indexables, "#{RbConfig::CONFIG["rubylibdir"]}/ipaddr.rb") - assert_includes(indexables, "#{RbConfig::CONFIG["rubylibdir"]}/abbrev.rb") + assert_includes(indexables, "#{RbConfig::CONFIG["rubylibdir"]}/erb.rb") end def test_indexables_includes_project_files @@ -68,12 +68,11 @@ def test_indexables_includes_project_files end def test_indexables_avoids_duplicates_if_bundle_path_is_inside_project - Bundler.settings.set_global("path", "vendor/bundle") - config = Configuration.new + Bundler.settings.temporary(path: "vendor/bundle") do + config = Configuration.new - assert_includes(config.instance_variable_get(:@excluded_patterns), "#{Dir.pwd}/vendor/bundle/**/*.rb") - ensure - Bundler.settings.set_global("path", nil) + assert_includes(config.instance_variable_get(:@excluded_patterns), "#{Dir.pwd}/vendor/bundle/**/*.rb") + end end def test_indexables_does_not_include_gems_own_installed_files diff --git a/lib/ruby_indexer/test/constant_test.rb b/lib/ruby_indexer/test/constant_test.rb index 44839ffa3..702ae8e36 100644 --- a/lib/ruby_indexer/test/constant_test.rb +++ b/lib/ruby_indexer/test/constant_test.rb @@ -105,7 +105,7 @@ def test_variable_path_constants_are_ignored self.class::FOO = 1 RUBY - assert_no_entries + assert_no_indexed_entries end def test_private_constant_indexing @@ -122,13 +122,13 @@ class A RUBY b_const = @index["A::B"].first - assert_equal(:private, b_const.visibility) + assert_equal(Entry::Visibility::PRIVATE, b_const.visibility) c_const = @index["A::C"].first - assert_equal(:private, c_const.visibility) + assert_equal(Entry::Visibility::PRIVATE, c_const.visibility) d_const = @index["A::D"].first - assert_equal(:public, d_const.visibility) + assert_equal(Entry::Visibility::PUBLIC, d_const.visibility) end def test_marking_constants_as_private_reopening_namespaces @@ -155,13 +155,13 @@ module B RUBY a_const = @index["A::B::CONST_A"].first - assert_equal(:private, a_const.visibility) + assert_equal(Entry::Visibility::PRIVATE, a_const.visibility) b_const = @index["A::B::CONST_B"].first - assert_equal(:private, b_const.visibility) + assert_equal(Entry::Visibility::PRIVATE, b_const.visibility) c_const = @index["A::B::CONST_C"].first - assert_equal(:private, c_const.visibility) + assert_equal(Entry::Visibility::PRIVATE, c_const.visibility) end def test_marking_constants_as_private_with_receiver @@ -179,10 +179,10 @@ module B RUBY a_const = @index["A::B::CONST_A"].first - assert_equal(:private, a_const.visibility) + assert_equal(Entry::Visibility::PRIVATE, a_const.visibility) b_const = @index["A::B::CONST_B"].first - assert_equal(:private, b_const.visibility) + assert_equal(Entry::Visibility::PRIVATE, b_const.visibility) end def test_indexing_constant_aliases diff --git a/lib/ruby_indexer/test/index_test.rb b/lib/ruby_indexer/test/index_test.rb index 6f759471a..5f7d5fcfa 100644 --- a/lib/ruby_indexer/test/index_test.rb +++ b/lib/ruby_indexer/test/index_test.rb @@ -93,30 +93,30 @@ class Something def test_fuzzy_search @index.index_single(IndexablePath.new(nil, "/fake/path/foo.rb"), <<~RUBY) - class Bar; end + class Zws; end - module Foo - class Bar + module Qtl + class Zws end - class Baz + class Zwo class Something end end end RUBY - result = @index.fuzzy_search("Bar") - assert_equal(1, result.length) - assert_equal(@index["Bar"].first, result.first) + result = @index.fuzzy_search("Zws") + assert_equal(2, result.length) + assert_equal(["Zws", "Qtl::Zwo::Something"], result.map(&:name)) - result = @index.fuzzy_search("foobarsomeking") + result = @index.fuzzy_search("qtlzwssomeking") assert_equal(5, result.length) - assert_equal(["Foo::Baz::Something", "Foo::Bar", "Foo::Baz", "Foo", "Bar"], result.map(&:name)) + assert_equal(["Qtl::Zwo::Something", "Qtl::Zws", "Qtl::Zwo", "Qtl", "Zws"], result.map(&:name)) - result = @index.fuzzy_search("FooBaz") + result = @index.fuzzy_search("QltZwo") assert_equal(4, result.length) - assert_equal(["Foo::Baz", "Foo::Bar", "Foo", "Foo::Baz::Something"], result.map(&:name)) + assert_equal(["Qtl::Zwo", "Qtl::Zws", "Qtl::Zwo::Something", "Qtl"], result.map(&:name)) end def test_index_single_ignores_directories @@ -141,22 +141,22 @@ class Foo def test_searching_for_entries_based_on_prefix @index.index_single(IndexablePath.new("/fake", "/fake/path/foo.rb"), <<~RUBY) - class Foo::Bar + class Foo::Bizw end RUBY @index.index_single(IndexablePath.new("/fake", "/fake/path/other_foo.rb"), <<~RUBY) - class Foo::Bar + class Foo::Bizw end - class Foo::Baz + class Foo::Bizt end RUBY results = @index.prefix_search("Foo", []).map { |entries| entries.map(&:name) } - assert_equal([["Foo::Bar", "Foo::Bar"], ["Foo::Baz"]], results) + assert_equal([["Foo::Bizw", "Foo::Bizw"], ["Foo::Bizt"]], results) - results = @index.prefix_search("Ba", ["Foo"]).map { |entries| entries.map(&:name) } - assert_equal([["Foo::Bar", "Foo::Bar"], ["Foo::Baz"]], results) + results = @index.prefix_search("Biz", ["Foo"]).map { |entries| entries.map(&:name) } + assert_equal([["Foo::Bizw", "Foo::Bizw"], ["Foo::Bizt"]], results) end def test_resolve_normalizes_top_level_names @@ -181,6 +181,9 @@ class Bar; end def test_resolving_aliases_to_non_existing_constants_with_conflicting_names @index.index_single(IndexablePath.new("/fake", "/fake/path/foo.rb"), <<~RUBY) + class Float + end + module Foo class Float < self INFINITY = ::Float::INFINITY @@ -286,19 +289,23 @@ def test_prefix_search_for_methods index(<<~RUBY) module Foo module Bar - def baz; end + def qzx; end end end RUBY - entries = @index.prefix_search("ba") + entries = @index.prefix_search("qz") refute_empty(entries) - entry = T.must(entries.first).first - assert_equal("baz", entry.name) + entry = T.must(T.must(entries.first).first) + assert_equal("qzx", entry.name) end def test_indexing_prism_fixtures_succeeds + unless Dir.exist?("test/fixtures/prism/test/prism/fixtures") + raise "Prism fixtures not found. Run `git submodule update --init` to fetch them." + end + fixtures = Dir.glob("test/fixtures/prism/test/prism/fixtures/**/*.txt") fixtures.each do |fixture| @@ -311,7 +318,1038 @@ def test_indexing_prism_fixtures_succeeds def test_index_single_does_not_fail_for_non_existing_file @index.index_single(IndexablePath.new(nil, "/fake/path/foo.rb")) - assert_empty(@index.instance_variable_get(:@entries)) + entries_after_indexing = @index.instance_variable_get(:@entries).keys + assert_equal(@default_indexed_entries.keys, entries_after_indexing) + end + + def test_linearized_ancestors_basic_ordering + index(<<~RUBY) + module A; end + module B; end + + class Foo + prepend A + prepend B + end + + class Bar + include A + include B + end + RUBY + + assert_equal( + [ + "B", + "A", + "Foo", + "Object", + "Kernel", + "BasicObject", + ], + @index.linearized_ancestors_of("Foo"), + ) + + assert_equal( + [ + "Bar", + "B", + "A", + "Object", + "Kernel", + "BasicObject", + ], + @index.linearized_ancestors_of("Bar"), + ) + end + + def test_linearized_ancestors + index(<<~RUBY) + module A; end + module B; end + module C; end + + module D + include A + end + + module E + prepend B + end + + module F + include C + include A + end + + class Bar + prepend F + end + + class Foo < Bar + include E + prepend D + end + RUBY + + # Object, Kernel and BasicObject are intentionally commented out for now until we develop a strategy for indexing + # declarations made in C code + assert_equal( + [ + "D", + "A", + "Foo", + "B", + "E", + "F", + "A", + "C", + "Bar", + "Object", + "Kernel", + "BasicObject", + ], + @index.linearized_ancestors_of("Foo"), + ) + end + + def test_linearized_ancestors_duplicates + index(<<~RUBY) + module A; end + module B + include A + end + + class Foo + include B + include A + end + + class Bar + prepend B + prepend A + end + RUBY + + assert_equal( + [ + "Foo", + "B", + "A", + "Object", + "Kernel", + "BasicObject", + ], + @index.linearized_ancestors_of("Foo"), + ) + + assert_equal( + [ + "B", + "A", + "Bar", + "Object", + "Kernel", + "BasicObject", + ], + @index.linearized_ancestors_of("Bar"), + ) + end + + def test_linearizing_ancestors_is_cached + index(<<~RUBY) + module C; end + module A; end + module B + include A + end + + class Foo + include B + include A + end + RUBY + + @index.linearized_ancestors_of("Foo") + ancestors = @index.instance_variable_get(:@ancestors) + assert(ancestors.key?("Foo")) + assert(ancestors.key?("A")) + assert(ancestors.key?("B")) + refute(ancestors.key?("C")) + end + + def test_duplicate_prepend_include + index(<<~RUBY) + module A; end + + class Foo + prepend A + include A + end + + class Bar + include A + prepend A + end + RUBY + + assert_equal( + [ + "A", + "Foo", + "Object", + "Kernel", + "BasicObject", + ], + @index.linearized_ancestors_of("Foo"), + ) + + assert_equal( + [ + "A", + "Bar", + "A", + "Object", + "Kernel", + "BasicObject", + ], + @index.linearized_ancestors_of("Bar"), + ) + end + + def test_linearizing_ancestors_handles_circular_parent_class + index(<<~RUBY) + class Foo < Foo + end + RUBY + + assert_equal(["Foo"], @index.linearized_ancestors_of("Foo")) + end + + def test_ancestors_linearization_complex_prepend_duplication + index(<<~RUBY) + module A; end + module B + prepend A + end + module C + prepend B + end + + class Foo + prepend A + prepend C + end + RUBY + + assert_equal( + [ + "A", + "B", + "C", + "Foo", + "Object", + "Kernel", + "BasicObject", + ], + @index.linearized_ancestors_of("Foo"), + ) + end + + def test_ancestors_linearization_complex_include_duplication + index(<<~RUBY) + module A; end + module B + include A + end + module C + include B + end + + class Foo + include A + include C + end + RUBY + + assert_equal( + [ + "Foo", + "C", + "B", + "A", + "Object", + "Kernel", + "BasicObject", + ], + @index.linearized_ancestors_of("Foo"), + ) + end + + def test_linearizing_ancestors_that_need_to_be_resolved + index(<<~RUBY) + module Foo + module Baz + end + module Qux + end + + class Something; end + + class Bar < Something + include Baz + prepend Qux + end + end + RUBY + + assert_equal( + [ + "Foo::Qux", + "Foo::Bar", + "Foo::Baz", + "Foo::Something", + "Object", + "Kernel", + "BasicObject", + ], + @index.linearized_ancestors_of("Foo::Bar"), + ) + end + + def test_linearizing_ancestors_for_non_existing_namespaces + index(<<~RUBY) + def Bar(a); end + RUBY + + assert_raises(Index::NonExistingNamespaceError) do + @index.linearized_ancestors_of("Foo") + end + + assert_raises(Index::NonExistingNamespaceError) do + @index.linearized_ancestors_of("Bar") + end + end + + def test_linearizing_circular_ancestors + index(<<~RUBY) + module M1 + include M2 + end + + module M2 + include M1 + end + + module A1 + include A2 + end + + module A2 + include A3 + end + + module A3 + include A1 + end + + class Foo < Foo + include Foo + end + + module Bar + include Bar + end + RUBY + + assert_equal(["M2", "M1"], @index.linearized_ancestors_of("M2")) + assert_equal(["A3", "A1", "A2"], @index.linearized_ancestors_of("A3")) + assert_equal(["Foo"], @index.linearized_ancestors_of("Foo")) + assert_equal(["Bar"], @index.linearized_ancestors_of("Bar")) + end + + def test_linearizing_circular_aliased_dependency + index(<<~RUBY) + module A + end + + ALIAS = A + + module A + include ALIAS + end + RUBY + + assert_equal(["A", "ALIAS"], @index.linearized_ancestors_of("A")) + end + + def test_resolving_an_inherited_method + index(<<~RUBY) + module Foo + def baz; end + end + + class Bar + def qux; end + end + + class Wow < Bar + include Foo + end + RUBY + + entry = T.must(@index.resolve_method("baz", "Wow")&.first) + assert_equal("baz", entry.name) + assert_equal("Foo", T.must(entry.owner).name) + + entry = T.must(@index.resolve_method("qux", "Wow")&.first) + assert_equal("qux", entry.name) + assert_equal("Bar", T.must(entry.owner).name) + end + + def test_resolving_an_inherited_method_lands_on_first_match + index(<<~RUBY) + module Foo + def qux; end + end + + class Bar + def qux; end + end + + class Wow < Bar + prepend Foo + + def qux; end + end + RUBY + + entries = T.must(@index.resolve_method("qux", "Wow")) + assert_equal(1, entries.length) + + entry = T.must(entries.first) + assert_equal("qux", entry.name) + assert_equal("Foo", T.must(entry.owner).name) + end + + def test_handle_change_clears_ancestor_cache_if_tree_changed + Dir.mktmpdir do |dir| + Dir.chdir(dir) do + # Write the original file + File.write(File.join(dir, "foo.rb"), <<~RUBY) + module Foo + end + + class Bar + include Foo + end + RUBY + + indexable_path = IndexablePath.new(nil, File.join(dir, "foo.rb")) + @index.index_single(indexable_path) + + assert_equal(["Bar", "Foo", "Object", "Kernel", "BasicObject"], @index.linearized_ancestors_of("Bar")) + + # Remove include to invalidate the ancestor tree + File.write(File.join(dir, "foo.rb"), <<~RUBY) + module Foo + end + + class Bar + end + RUBY + + @index.handle_change(indexable_path) + assert_empty(@index.instance_variable_get(:@ancestors)) + assert_equal(["Bar", "Object", "Kernel", "BasicObject"], @index.linearized_ancestors_of("Bar")) + end + end + end + + def test_handle_change_does_not_clear_ancestor_cache_if_tree_not_changed + Dir.mktmpdir do |dir| + Dir.chdir(dir) do + # Write the original file + File.write(File.join(dir, "foo.rb"), <<~RUBY) + module Foo + end + + class Bar + include Foo + end + RUBY + + indexable_path = IndexablePath.new(nil, File.join(dir, "foo.rb")) + @index.index_single(indexable_path) + + assert_equal(["Bar", "Foo", "Object", "Kernel", "BasicObject"], @index.linearized_ancestors_of("Bar")) + + # Remove include to invalidate the ancestor tree + File.write(File.join(dir, "foo.rb"), <<~RUBY) + module Foo + end + + class Bar + include Foo + + def baz; end + end + RUBY + + @index.handle_change(indexable_path) + refute_empty(@index.instance_variable_get(:@ancestors)) + assert_equal(["Bar", "Foo", "Object", "Kernel", "BasicObject"], @index.linearized_ancestors_of("Bar")) + end + end + end + + def test_handle_change_clears_ancestor_cache_if_parent_class_changed + Dir.mktmpdir do |dir| + Dir.chdir(dir) do + # Write the original file + File.write(File.join(dir, "foo.rb"), <<~RUBY) + class Foo + end + + class Bar < Foo + end + RUBY + + indexable_path = IndexablePath.new(nil, File.join(dir, "foo.rb")) + @index.index_single(indexable_path) + + assert_equal(["Bar", "Foo", "Object", "Kernel", "BasicObject"], @index.linearized_ancestors_of("Bar")) + + # Remove include to invalidate the ancestor tree + File.write(File.join(dir, "foo.rb"), <<~RUBY) + class Foo + end + + class Bar + end + RUBY + + @index.handle_change(indexable_path) + assert_empty(@index.instance_variable_get(:@ancestors)) + assert_equal(["Bar", "Object", "Kernel", "BasicObject"], @index.linearized_ancestors_of("Bar")) + end + end + end + + def test_resolving_inherited_constants + index(<<~RUBY) + module Foo + CONST = 1 + end + + module Baz + CONST = 2 + end + + module Qux + include Foo + end + + module Namespace + CONST = 3 + + include Baz + + class Bar + include Qux + end + end + + CONST = 4 + RUBY + + entry = T.must(@index.resolve("CONST", ["Namespace", "Bar"])&.first) + assert_equal(14, entry.location.start_line) + end + + def test_resolving_inherited_alised_namespace + index(<<~RUBY) + module Bar + TARGET = 123 + end + + module Foo + CONST = Bar + end + + module Namespace + class Bar + include Foo + end + end + RUBY + + entry = T.must(@index.resolve("Foo::CONST::TARGET", [])&.first) + assert_equal(2, entry.location.start_line) + + entry = T.must(@index.resolve("Namespace::Bar::CONST::TARGET", [])&.first) + assert_equal(2, entry.location.start_line) + end + + def test_resolving_same_constant_from_different_scopes + index(<<~RUBY) + module Namespace + CONST = 123 + + class Parent + CONST = 321 + end + + class Child < Parent + end + end + RUBY + + entry = T.must(@index.resolve("CONST", ["Namespace", "Child"])&.first) + assert_equal(2, entry.location.start_line) + + entry = T.must(@index.resolve("Namespace::Child::CONST", [])&.first) + assert_equal(5, entry.location.start_line) + end + + def test_resolving_prepended_constants + index(<<~RUBY) + module Included + CONST = 123 + end + + module Prepended + CONST = 321 + end + + class Foo + include Included + prepend Prepended + end + + class Bar + CONST = 456 + include Included + prepend Prepended + end + RUBY + + entry = T.must(@index.resolve("CONST", ["Foo"])&.first) + assert_equal(6, entry.location.start_line) + + entry = T.must(@index.resolve("Foo::CONST", [])&.first) + assert_equal(6, entry.location.start_line) + + entry = T.must(@index.resolve("Bar::CONST", [])&.first) + assert_equal(15, entry.location.start_line) + end + + def test_resolving_constants_favors_ancestors_over_top_level + index(<<~RUBY) + module Value1 + CONST = 1 + end + + module Value2 + CONST = 2 + end + + CONST = 3 + module First + include Value1 + + module Second + include Value2 + end + end + RUBY + + entry = T.must(@index.resolve("CONST", ["First", "Second"])&.first) + assert_equal(6, entry.location.start_line) + end + + def test_resolving_circular_alias + index(<<~RUBY) + module Namespace + FOO = BAR + BAR = FOO + end + RUBY + + foo_entry = T.must(@index.resolve("FOO", ["Namespace"])&.first) + assert_equal(2, foo_entry.location.start_line) + assert_instance_of(Entry::Alias, foo_entry) + + bar_entry = T.must(@index.resolve("BAR", ["Namespace"])&.first) + assert_equal(3, bar_entry.location.start_line) + assert_instance_of(Entry::Alias, bar_entry) + end + + def test_resolving_circular_alias_three_levels + index(<<~RUBY) + module Namespace + FOO = BAR + BAR = BAZ + BAZ = FOO + end + RUBY + + foo_entry = T.must(@index.resolve("FOO", ["Namespace"])&.first) + assert_equal(2, foo_entry.location.start_line) + assert_instance_of(Entry::Alias, foo_entry) + + bar_entry = T.must(@index.resolve("BAR", ["Namespace"])&.first) + assert_equal(3, bar_entry.location.start_line) + assert_instance_of(Entry::Alias, bar_entry) + + baz_entry = T.must(@index.resolve("BAZ", ["Namespace"])&.first) + assert_equal(4, baz_entry.location.start_line) + assert_instance_of(Entry::Alias, baz_entry) + end + + def test_resolving_top_level_compact_reference + index(<<~RUBY) + class Foo::Bar + end + RUBY + + foo_entry = T.must(@index.resolve("Foo::Bar", [])&.first) + assert_equal(1, foo_entry.location.start_line) + assert_instance_of(Entry::Class, foo_entry) + end + + def test_resolving_references_with_redundant_namespaces + index(<<~RUBY) + module Bar + CONST = 1 + end + + module A + CONST = 2 + + module B + CONST = 3 + + class Foo + include Bar + end + + A::B::Foo::CONST + end + end + RUBY + + foo_entry = T.must(@index.resolve("A::B::Foo::CONST", ["A", "B"])&.first) + assert_equal(2, foo_entry.location.start_line) + end + + def test_resolving_qualified_references + index(<<~RUBY) + module Namespace + class Entry + CONST = 1 + end + end + + module Namespace + class Index + end + end + RUBY + + foo_entry = T.must(@index.resolve("Entry::CONST", ["Namespace", "Index"])&.first) + assert_equal(3, foo_entry.location.start_line) + end + + def test_resolving_unqualified_references + index(<<~RUBY) + module Foo + CONST = 1 + end + + module Namespace + CONST = 2 + + class Index + include Foo + end + end + RUBY + + foo_entry = T.must(@index.resolve("CONST", ["Namespace", "Index"])&.first) + assert_equal(6, foo_entry.location.start_line) + end + + def test_resolving_references_with_only_top_level_declaration + index(<<~RUBY) + CONST = 1 + + module Foo; end + + module Namespace + class Index + include Foo + end + end + RUBY + + foo_entry = T.must(@index.resolve("CONST", ["Namespace", "Index"])&.first) + assert_equal(1, foo_entry.location.start_line) + end + + def test_instance_variables_completions_from_different_owners_with_conflicting_names + index(<<~RUBY) + class Foo + def initialize + @bar = 1 + end + end + + class Bar + def initialize + @bar = 2 + end + end + RUBY + + entry = T.must(@index.instance_variable_completion_candidates("@", "Bar")&.first) + assert_equal("@bar", entry.name) + assert_equal("Bar", T.must(entry.owner).name) + end + + def test_resolving_a_qualified_reference + index(<<~RUBY) + class Base + module Third + CONST = 1 + end + end + + class Foo + module Third + CONST = 2 + end + + class Second < Base + end + end + RUBY + + foo_entry = T.must(@index.resolve("Third::CONST", ["Foo"])&.first) + assert_equal(9, foo_entry.location.start_line) + end + + def test_resolving_unindexed_constant_with_no_nesting + assert_nil(@index.resolve("RSpec", [])) + end + + def test_object_superclass_indexing_and_resolution_with_reopened_object_class + index(<<~RUBY) + class Object; end + RUBY + + entries = @index["Object"] + assert_equal(2, entries.length) + reopened_entry = entries.last + assert_equal("::BasicObject", reopened_entry.parent_class) + assert_equal(["Object", "Kernel", "BasicObject"], @index.linearized_ancestors_of("Object")) + end + + def test_object_superclass_indexing_and_resolution_with_reopened_basic_object_class + index(<<~RUBY) + class BasicObject; end + RUBY + + entries = @index["BasicObject"] + assert_equal(2, entries.length) + reopened_entry = entries.last + assert_nil(reopened_entry.parent_class) + assert_equal(["BasicObject"], @index.linearized_ancestors_of("BasicObject")) + end + + def test_object_superclass_resolution + index(<<~RUBY) + module Foo + class Object; end + + class Bar; end + class Baz < Object; end + end + RUBY + + assert_equal(["Foo::Bar", "Object", "Kernel", "BasicObject"], @index.linearized_ancestors_of("Foo::Bar")) + assert_equal( + ["Foo::Baz", "Foo::Object", "Object", "Kernel", "BasicObject"], + @index.linearized_ancestors_of("Foo::Baz"), + ) + end + + def test_basic_object_superclass_resolution + index(<<~RUBY) + module Foo + class BasicObject; end + + class Bar; end + class Baz < BasicObject; end + end + RUBY + + assert_equal(["Foo::Bar", "Object", "Kernel", "BasicObject"], @index.linearized_ancestors_of("Foo::Bar")) + assert_equal( + ["Foo::Baz", "Foo::BasicObject", "Object", "Kernel", "BasicObject"], + @index.linearized_ancestors_of("Foo::Baz"), + ) + end + + def test_top_level_object_superclass_resolution + index(<<~RUBY) + module Foo + class Object; end + + class Bar < ::Object; end + end + RUBY + + assert_equal(["Foo::Bar", "Object", "Kernel", "BasicObject"], @index.linearized_ancestors_of("Foo::Bar")) + end + + def test_top_level_basic_object_superclass_resolution + index(<<~RUBY) + module Foo + class BasicObject; end + + class Bar < ::BasicObject; end + end + RUBY + + assert_equal(["Foo::Bar", "BasicObject"], @index.linearized_ancestors_of("Foo::Bar")) + end + + def test_resolving_method_inside_singleton_context + @index.index_single(IndexablePath.new(nil, "/fake/path/foo.rb"), <<~RUBY) + module Foo + class Bar + class << self + class Baz + class << self + def found_me!; end + end + end + end + end + end + RUBY + + entry = @index.resolve_method("found_me!", "Foo::Bar::::Baz::")&.first + refute_nil(entry) + + assert_equal("found_me!", T.must(entry).name) + end + + def test_resolving_constants_in_singleton_contexts + @index.index_single(IndexablePath.new(nil, "/fake/path/foo.rb"), <<~RUBY) + module Foo + class Bar + CONST = 3 + + class << self + CONST = 2 + + class Baz + CONST = 1 + + class << self + end + end + end + end + end + RUBY + + entry = @index.resolve("CONST", ["Foo", "Bar", "", "Baz", ""])&.first + refute_nil(entry) + assert_equal(9, T.must(entry).location.start_line) + end + + def test_resolving_instance_variables_in_singleton_contexts + @index.index_single(IndexablePath.new(nil, "/fake/path/foo.rb"), <<~RUBY) + module Foo + class Bar + @a = 123 + + class << self + def hello + @b = 123 + end + + @c = 123 + end + end + end + RUBY + + entry = @index.resolve_instance_variable("@a", "Foo::Bar::")&.first + refute_nil(entry) + assert_equal("@a", T.must(entry).name) + + entry = @index.resolve_instance_variable("@b", "Foo::Bar::")&.first + refute_nil(entry) + assert_equal("@b", T.must(entry).name) + + entry = @index.resolve_instance_variable("@c", "Foo::Bar::::>")&.first + refute_nil(entry) + assert_equal("@c", T.must(entry).name) + end + + def test_instance_variable_completion_in_singleton_contexts + @index.index_single(IndexablePath.new(nil, "/fake/path/foo.rb"), <<~RUBY) + module Foo + class Bar + @a = 123 + + class << self + def hello + @b = 123 + end + + @c = 123 + end + end + end + RUBY + + entries = @index.instance_variable_completion_candidates("@", "Foo::Bar::").map(&:name) + assert_includes(entries, "@a") + assert_includes(entries, "@b") + + assert_includes( + @index.instance_variable_completion_candidates("@", "Foo::Bar::::>").map(&:name), + "@c", + ) + end + + def test_singletons_are_excluded_from_prefix_search + index(<<~RUBY) + class Zwq + class << self + end + end + RUBY + + assert_empty(@index.prefix_search("Zwq::", owner.name) + + assert_entry("@b", Entry::InstanceVariable, "/fake/path/foo.rb:6-8:6-10") + + entry = T.must(@index["@b"]&.first) + owner = T.must(entry.owner) + assert_instance_of(Entry::SingletonClass, owner) + assert_equal("Foo::Bar::", owner.name) + + assert_entry("@c", Entry::InstanceVariable, "/fake/path/foo.rb:9-6:9-8") + + entry = T.must(@index["@c"]&.first) + owner = T.must(entry.owner) + assert_instance_of(Entry::SingletonClass, owner) + assert_equal("Foo::Bar::::>", owner.name) + end + + def test_top_level_instance_variables + index(<<~RUBY) + @a = 123 + RUBY + + entry = T.must(@index["@a"]&.first) + assert_nil(entry.owner) + end + + def test_class_instance_variables_inside_self_method + index(<<~RUBY) + class Foo + def self.bar + @a = 123 + end + end + RUBY + + entry = T.must(@index["@a"]&.first) + owner = T.must(entry.owner) + assert_instance_of(Entry::SingletonClass, owner) + assert_equal("Foo::", owner.name) + end + + def test_instance_variable_inside_dynamic_method_declaration + index(<<~RUBY) + class Foo + def something.bar + @a = 123 + end + end + RUBY + + # If the surrounding method is beind defined on any dynamic value that isn't `self`, then we attribute the + # instance variable to the wrong owner since there's no way to understand that statically + entry = T.must(@index["@a"]&.first) + owner = T.must(entry.owner) + assert_instance_of(Entry::Class, owner) + assert_equal("Foo", owner.name) + end + end +end diff --git a/lib/ruby_indexer/test/method_test.rb b/lib/ruby_indexer/test/method_test.rb index ff1245fa6..b92de59ee 100644 --- a/lib/ruby_indexer/test/method_test.rb +++ b/lib/ruby_indexer/test/method_test.rb @@ -13,7 +13,7 @@ def bar end RUBY - assert_entry("bar", Entry::InstanceMethod, "/fake/path/foo.rb:1-2:2-5") + assert_entry("bar", Entry::Method, "/fake/path/foo.rb:1-2:2-5") end def test_conditional_method @@ -24,7 +24,7 @@ def bar end RUBY - assert_entry("bar", Entry::InstanceMethod, "/fake/path/foo.rb:1-2:2-5") + assert_entry("bar", Entry::Method, "/fake/path/foo.rb:1-2:2-5") end def test_singleton_method_using_self_receiver @@ -35,7 +35,12 @@ def self.bar end RUBY - assert_entry("bar", Entry::SingletonMethod, "/fake/path/foo.rb:1-2:2-5") + assert_entry("bar", Entry::Method, "/fake/path/foo.rb:1-2:2-5") + + entry = T.must(@index["bar"].first) + owner = T.must(entry.owner) + assert_equal("Foo::", owner.name) + assert_instance_of(Entry::SingletonClass, owner) end def test_singleton_method_using_other_receiver_is_not_indexed @@ -71,6 +76,43 @@ def bar assert_equal("Bar", second_entry.owner.name) end + def test_visibility_tracking + index(<<~RUBY) + private def foo + end + + def bar; end + + protected + + def baz; end + RUBY + + assert_entry("foo", Entry::Method, "/fake/path/foo.rb:0-8:1-3", visibility: Entry::Visibility::PRIVATE) + assert_entry("bar", Entry::Method, "/fake/path/foo.rb:3-0:3-12", visibility: Entry::Visibility::PUBLIC) + assert_entry("baz", Entry::Method, "/fake/path/foo.rb:7-0:7-12", visibility: Entry::Visibility::PROTECTED) + end + + def test_visibility_tracking_with_nested_class_or_modules + index(<<~RUBY) + class Foo + private + + def foo; end + + class Bar + def bar; end + end + + def baz; end + end + RUBY + + assert_entry("foo", Entry::Method, "/fake/path/foo.rb:3-2:3-14", visibility: Entry::Visibility::PRIVATE) + assert_entry("bar", Entry::Method, "/fake/path/foo.rb:6-4:6-16", visibility: Entry::Visibility::PUBLIC) + assert_entry("baz", Entry::Method, "/fake/path/foo.rb:9-2:9-14", visibility: Entry::Visibility::PRIVATE) + end + def test_method_with_parameters index(<<~RUBY) class Foo @@ -79,7 +121,7 @@ def bar(a) end RUBY - assert_entry("bar", Entry::InstanceMethod, "/fake/path/foo.rb:1-2:2-5") + assert_entry("bar", Entry::Method, "/fake/path/foo.rb:1-2:2-5") entry = T.must(@index["bar"].first) assert_equal(1, entry.parameters.length) parameter = entry.parameters.first @@ -95,7 +137,7 @@ def bar((a, (b, ))) end RUBY - assert_entry("bar", Entry::InstanceMethod, "/fake/path/foo.rb:1-2:2-5") + assert_entry("bar", Entry::Method, "/fake/path/foo.rb:1-2:2-5") entry = T.must(@index["bar"].first) assert_equal(1, entry.parameters.length) parameter = entry.parameters.first @@ -111,7 +153,7 @@ def bar(a = 123) end RUBY - assert_entry("bar", Entry::InstanceMethod, "/fake/path/foo.rb:1-2:2-5") + assert_entry("bar", Entry::Method, "/fake/path/foo.rb:1-2:2-5") entry = T.must(@index["bar"].first) assert_equal(1, entry.parameters.length) parameter = entry.parameters.first @@ -127,7 +169,7 @@ def bar(a:, b: 123) end RUBY - assert_entry("bar", Entry::InstanceMethod, "/fake/path/foo.rb:1-2:2-5") + assert_entry("bar", Entry::Method, "/fake/path/foo.rb:1-2:2-5") entry = T.must(@index["bar"].first) assert_equal(2, entry.parameters.length) a, b = entry.parameters @@ -147,7 +189,7 @@ def bar(*a, **b) end RUBY - assert_entry("bar", Entry::InstanceMethod, "/fake/path/foo.rb:1-2:2-5") + assert_entry("bar", Entry::Method, "/fake/path/foo.rb:1-2:2-5") entry = T.must(@index["bar"].first) assert_equal(2, entry.parameters.length) a, b = entry.parameters @@ -172,7 +214,7 @@ def qux(*a, (b, c)) end RUBY - assert_entry("bar", Entry::InstanceMethod, "/fake/path/foo.rb:1-2:2-5") + assert_entry("bar", Entry::Method, "/fake/path/foo.rb:1-2:2-5") entry = T.must(@index["bar"].first) assert_equal(2, entry.parameters.length) a, b = entry.parameters @@ -209,7 +251,7 @@ def bar((a, *b)) end RUBY - assert_entry("bar", Entry::InstanceMethod, "/fake/path/foo.rb:1-2:2-5") + assert_entry("bar", Entry::Method, "/fake/path/foo.rb:1-2:2-5") entry = T.must(@index["bar"].first) assert_equal(1, entry.parameters.length) param = entry.parameters.first @@ -250,7 +292,7 @@ def bar(*, **) end RUBY - assert_entry("bar", Entry::InstanceMethod, "/fake/path/foo.rb:1-2:2-5") + assert_entry("bar", Entry::Method, "/fake/path/foo.rb:1-2:2-5") entry = T.must(@index["bar"].first) assert_equal(2, entry.parameters.length) first, second = entry.parameters @@ -270,7 +312,7 @@ def bar(**nil) end RUBY - assert_entry("bar", Entry::InstanceMethod, "/fake/path/foo.rb:1-2:2-5") + assert_entry("bar", Entry::Method, "/fake/path/foo.rb:1-2:2-5") entry = T.must(@index["bar"].first) assert_empty(entry.parameters) end @@ -322,24 +364,69 @@ class Foo def test_properly_tracks_multiple_levels_of_nesting index(<<~RUBY) module Foo - def first; end + def first_method; end module Bar - def second; end + def second_method; end end - def third; end + def third_method; end end RUBY - entry = T.must(@index["first"]&.first) + entry = T.cast(@index["first_method"]&.first, Entry::Method) assert_equal("Foo", T.must(entry.owner).name) - entry = T.must(@index["second"]&.first) + entry = T.cast(@index["second_method"]&.first, Entry::Method) assert_equal("Foo::Bar", T.must(entry.owner).name) - entry = T.must(@index["third"]&.first) + entry = T.cast(@index["third_method"]&.first, Entry::Method) assert_equal("Foo", T.must(entry.owner).name) end + + def test_keeps_track_of_aliases + index(<<~RUBY) + class Foo + alias whatever to_s + alias_method :foo, :to_a + alias_method "bar", "to_a" + + # These two are not indexed because they are dynamic or incomplete + alias_method baz, :to_a + alias_method :baz + end + RUBY + + assert_entry("whatever", Entry::UnresolvedMethodAlias, "/fake/path/foo.rb:1-8:1-16") + assert_entry("foo", Entry::UnresolvedMethodAlias, "/fake/path/foo.rb:2-15:2-19") + assert_entry("bar", Entry::UnresolvedMethodAlias, "/fake/path/foo.rb:3-15:3-20") + # Foo plus 3 valid aliases + assert_equal(4, @index.instance_variable_get(:@entries).length - @default_indexed_entries.length) + end + + def test_singleton_methods + index(<<~RUBY) + class Foo + def self.bar; end + + class << self + def baz; end + end + end + RUBY + + assert_entry("bar", Entry::Method, "/fake/path/foo.rb:1-2:1-19") + assert_entry("baz", Entry::Method, "/fake/path/foo.rb:4-4:4-16") + + bar_owner = T.must(T.must(@index["bar"].first).owner) + baz_owner = T.must(T.must(@index["baz"].first).owner) + + assert_instance_of(Entry::SingletonClass, bar_owner) + assert_instance_of(Entry::SingletonClass, baz_owner) + + # Regardless of whether the method was added through `self.something` or `class << self`, the owner object must be + # the exact same + assert_same(bar_owner, baz_owner) + end end end diff --git a/lib/ruby_indexer/test/rbs_indexer_test.rb b/lib/ruby_indexer/test/rbs_indexer_test.rb new file mode 100644 index 000000000..a73653b96 --- /dev/null +++ b/lib/ruby_indexer/test/rbs_indexer_test.rb @@ -0,0 +1,67 @@ +# typed: true +# frozen_string_literal: true + +require_relative "test_case" + +module RubyIndexer + class RBSIndexerTest < TestCase + def test_index_core_classes + entries = @index["Array"] + refute_nil(entries) + # Array is a class but also an instance method on Kernel + assert_equal(2, entries.length) + entry = entries.find { |entry| entry.is_a?(RubyIndexer::Entry::Class) } + assert_match(%r{/gems/rbs-.*/core/array.rbs}, entry.file_path) + assert_equal("array.rbs", entry.file_name) + assert_equal("Object", entry.parent_class) + assert_equal(1, entry.mixin_operations.length) + enumerable_include = entry.mixin_operations.first + assert_equal("Enumerable", enumerable_include.module_name) + + # Using fixed positions would be fragile, so let's just check some basics. + assert_operator(entry.location.start_line, :>, 0) + assert_operator(entry.location.end_line, :>, entry.location.start_line) + assert_equal(0, entry.location.start_column) + assert_operator(entry.location.end_column, :>, 0) + end + + def test_index_core_modules + entries = @index["Kernel"] + refute_nil(entries) + assert_equal(1, entries.length) + entry = entries.first + assert_match(%r{/gems/rbs-.*/core/kernel.rbs}, entry.file_path) + assert_equal("kernel.rbs", entry.file_name) + + # Using fixed positions would be fragile, so let's just check some basics. + assert_operator(entry.location.start_line, :>, 0) + assert_operator(entry.location.end_line, :>, entry.location.start_line) + assert_equal(0, entry.location.start_column) + assert_operator(entry.location.end_column, :>, 0) + end + + def test_index_methods + entries = @index["initialize"] + refute_nil(entries) + entry = entries.find { |entry| entry.owner.name == "Array" } + assert_match(%r{/gems/rbs-.*/core/array.rbs}, entry.file_path) + assert_equal("array.rbs", entry.file_name) + assert_equal(Entry::Visibility::PUBLIC, entry.visibility) + + # Using fixed positions would be fragile, so let's just check some basics. + assert_operator(entry.location.start_line, :>, 0) + assert_operator(entry.location.end_line, :>, entry.location.start_line) + assert_equal(2, entry.location.start_column) + assert_operator(entry.location.end_column, :>, 0) + end + + def test_attaches_correct_owner_to_singleton_methods + entries = @index["basename"] + refute_nil(entries) + + owner = entries.first.owner + assert_instance_of(Entry::SingletonClass, owner) + assert_equal("File::", owner.name) + end + end +end diff --git a/lib/ruby_indexer/test/test_case.rb b/lib/ruby_indexer/test/test_case.rb index cf666cb4e..60e4e44d1 100644 --- a/lib/ruby_indexer/test/test_case.rb +++ b/lib/ruby_indexer/test/test_case.rb @@ -7,6 +7,8 @@ module RubyIndexer class TestCase < Minitest::Test def setup @index = Index.new + RBSIndexer.new(@index).index_ruby_core + @default_indexed_entries = @index.instance_variable_get(:@entries).dup end private @@ -15,8 +17,9 @@ def index(source) @index.index_single(IndexablePath.new(nil, "/fake/path/foo.rb"), source) end - def assert_entry(expected_name, type, expected_location) + def assert_entry(expected_name, type, expected_location, visibility: nil) entries = @index[expected_name] + refute_nil(entries, "Expected #{expected_name} to be indexed") refute_empty(entries, "Expected #{expected_name} to be indexed") entry = entries.first @@ -28,6 +31,8 @@ def assert_entry(expected_name, type, expected_location) ":#{location.end_line - 1}-#{location.end_column}" assert_equal(expected_location, location_string) + + assert_equal(visibility, entry.visibility) if visibility end def refute_entry(expected_name) @@ -39,6 +44,10 @@ def assert_no_entries assert_empty(@index.instance_variable_get(:@entries), "Expected nothing to be indexed") end + def assert_no_indexed_entries + assert_equal(@default_indexed_entries, @index.instance_variable_get(:@entries)) + end + def assert_no_entry(entry) refute(@index.instance_variable_get(:@entries).key?(entry), "Expected '#{entry}' to not be indexed") end diff --git a/lib/ruby_lsp/addon.rb b/lib/ruby_lsp/addon.rb index 598b9a616..15987f756 100644 --- a/lib/ruby_lsp/addon.rb +++ b/lib/ruby_lsp/addon.rb @@ -99,8 +99,8 @@ def formatted_errors end sig { returns(String) } - def backtraces - @errors.filter_map(&:backtrace).join("\n\n") + def errors_details + @errors.map(&:full_message).join("\n\n") end # Each addon should implement `MyAddon#activate` and use to perform any sort of initialization, such as @@ -131,11 +131,11 @@ def create_code_lens_listener(response_builder, uri, dispatcher); end sig do overridable.params( response_builder: ResponseBuilders::Hover, - nesting: T::Array[String], + node_context: NodeContext, dispatcher: Prism::Dispatcher, ).void end - def create_hover_listener(response_builder, nesting, dispatcher); end + def create_hover_listener(response_builder, node_context, dispatcher); end # Creates a new DocumentSymbol listener. This method is invoked on every DocumentSymbol request sig do @@ -159,21 +159,21 @@ def create_semantic_highlighting_listener(response_builder, dispatcher); end overridable.params( response_builder: ResponseBuilders::CollectionResponseBuilder[Interface::Location], uri: URI::Generic, - nesting: T::Array[String], + node_context: NodeContext, dispatcher: Prism::Dispatcher, ).void end - def create_definition_listener(response_builder, uri, nesting, dispatcher); end + def create_definition_listener(response_builder, uri, node_context, dispatcher); end # Creates a new Completion listener. This method is invoked on every Completion request sig do overridable.params( response_builder: ResponseBuilders::CollectionResponseBuilder[Interface::CompletionItem], - nesting: T::Array[String], + node_context: NodeContext, dispatcher: Prism::Dispatcher, uri: URI::Generic, ).void end - def create_completion_listener(response_builder, nesting, dispatcher, uri); end + def create_completion_listener(response_builder, node_context, dispatcher, uri); end end end diff --git a/lib/ruby_lsp/document.rb b/lib/ruby_lsp/document.rb index b8b18de6a..9e4a8ac20 100644 --- a/lib/ruby_lsp/document.rb +++ b/lib/ruby_lsp/document.rb @@ -110,7 +110,7 @@ def create_scanner params( position: T::Hash[Symbol, T.untyped], node_types: T::Array[T.class_of(Prism::Node)], - ).returns([T.nilable(Prism::Node), T.nilable(Prism::Node), T::Array[String]]) + ).returns(NodeContext) end def locate_node(position, node_types: []) locate(@parse_result.value, create_scanner.find_char_position(position), node_types: node_types) @@ -121,13 +121,17 @@ def locate_node(position, node_types: []) node: Prism::Node, char_position: Integer, node_types: T::Array[T.class_of(Prism::Node)], - ).returns([T.nilable(Prism::Node), T.nilable(Prism::Node), T::Array[String]]) + ).returns(NodeContext) end def locate(node, char_position, node_types: []) queue = T.let(node.child_nodes.compact, T::Array[T.nilable(Prism::Node)]) closest = node parent = T.let(nil, T.nilable(Prism::Node)) - nesting = T.let([], T::Array[T.any(Prism::ClassNode, Prism::ModuleNode)]) + nesting_nodes = T.let( + [], + T::Array[T.any(Prism::ClassNode, Prism::ModuleNode, Prism::SingletonClassNode, Prism::DefNode)], + ) + call_node = T.let(nil, T.nilable(Prism::CallNode)) until queue.empty? candidate = queue.shift @@ -150,13 +154,27 @@ def locate(node, char_position, node_types: []) # If the candidate starts after the end of the previous nesting level, then we've exited that nesting level and # need to pop the stack - previous_level = nesting.last - nesting.pop if previous_level && loc.start_offset > previous_level.location.end_offset + previous_level = nesting_nodes.last + nesting_nodes.pop if previous_level && loc.start_offset > previous_level.location.end_offset # Keep track of the nesting where we found the target. This is used to determine the fully qualified name of the # target when it is a constant - if candidate.is_a?(Prism::ClassNode) || candidate.is_a?(Prism::ModuleNode) - nesting << candidate + case candidate + when Prism::ClassNode, Prism::ModuleNode + nesting_nodes << candidate + when Prism::SingletonClassNode + nesting_nodes << candidate + when Prism::DefNode + nesting_nodes << candidate + end + + if candidate.is_a?(Prism::CallNode) + arg_loc = candidate.arguments&.location + blk_loc = candidate.block&.location + if (arg_loc && (arg_loc.start_offset...arg_loc.end_offset).cover?(char_position)) || + (blk_loc && (blk_loc.start_offset...blk_loc.end_offset).cover?(char_position)) + call_node = candidate + end end # If there are node types to filter by, and the current node is not one of those types, then skip it @@ -170,7 +188,41 @@ def locate(node, char_position, node_types: []) end end - [closest, parent, nesting.map { |n| n.constant_path.location.slice }] + # When targeting the constant part of a class/module definition, we do not want the nesting to be duplicated. That + # is, when targeting Bar in the following example: + # + # ```ruby + # class Foo::Bar; end + # ``` + # The correct target is `Foo::Bar` with an empty nesting. `Foo::Bar` should not appear in the nesting stack, even + # though the class/module node does indeed enclose the target, because it would lead to incorrect behavior + if closest.is_a?(Prism::ConstantReadNode) || closest.is_a?(Prism::ConstantPathNode) + last_level = nesting_nodes.last + + if (last_level.is_a?(Prism::ModuleNode) || last_level.is_a?(Prism::ClassNode)) && + last_level.constant_path == closest + nesting_nodes.pop + end + end + + nesting = [] + surrounding_method = T.let(nil, T.nilable(String)) + + nesting_nodes.each do |node| + case node + when Prism::ClassNode, Prism::ModuleNode + nesting << node.constant_path.slice + when Prism::SingletonClassNode + nesting << "" + when Prism::DefNode + surrounding_method = node.name.to_s + next unless node.receiver.is_a?(Prism::SelfNode) + + nesting << "" + end + end + + NodeContext.new(closest, parent, nesting, call_node, surrounding_method) end sig { returns(T::Boolean) } diff --git a/lib/ruby_lsp/global_state.rb b/lib/ruby_lsp/global_state.rb index 9fabc2142..9ca549f54 100644 --- a/lib/ruby_lsp/global_state.rb +++ b/lib/ruby_lsp/global_state.rb @@ -12,7 +12,7 @@ class GlobalState attr_accessor :formatter sig { returns(T::Boolean) } - attr_reader :typechecker + attr_reader :has_type_checker sig { returns(RubyIndexer::Index) } attr_reader :index @@ -23,6 +23,9 @@ class GlobalState sig { returns(T::Boolean) } attr_reader :supports_watching_files + sig { returns(TypeInferrer) } + attr_reader :type_inferrer + sig { void } def initialize @workspace_uri = T.let(URI::Generic.from_path(path: Dir.pwd), URI::Generic) @@ -31,8 +34,9 @@ def initialize @formatter = T.let("auto", String) @linters = T.let([], T::Array[String]) @test_library = T.let("minitest", String) - @typechecker = T.let(true, T::Boolean) + @has_type_checker = T.let(true, T::Boolean) @index = T.let(RubyIndexer::Index.new, RubyIndexer::Index) + @type_inferrer = T.let(TypeInferrer.new(@index), TypeInferrer) @supported_formatters = T.let({}, T::Hash[String, Requests::Support::Formatter]) @supports_watching_files = T.let(false, T::Boolean) end @@ -54,18 +58,19 @@ def active_linters sig { params(options: T::Hash[Symbol, T.untyped]).void } def apply_options(options) - dependencies = gather_dependencies + direct_dependencies = gather_direct_dependencies + all_dependencies = gather_direct_and_indirect_dependencies workspace_uri = options.dig(:workspaceFolders, 0, :uri) @workspace_uri = URI(workspace_uri) if workspace_uri specified_formatter = options.dig(:initializationOptions, :formatter) @formatter = specified_formatter if specified_formatter - @formatter = detect_formatter(dependencies) if @formatter == "auto" + @formatter = detect_formatter(direct_dependencies, all_dependencies) if @formatter == "auto" specified_linters = options.dig(:initializationOptions, :linters) - @linters = specified_linters || detect_linters(dependencies) - @test_library = detect_test_library(dependencies) - @typechecker = detect_typechecker(dependencies) + @linters = specified_linters || detect_linters(direct_dependencies) + @test_library = detect_test_library(direct_dependencies) + @has_type_checker = detect_typechecker(direct_dependencies) encodings = options.dig(:capabilities, :general, :positionEncodings) @encoding = if !encodings || encodings.empty? @@ -103,16 +108,18 @@ def encoding_name private - sig { params(dependencies: T::Array[String]).returns(String) } - def detect_formatter(dependencies) + sig { params(direct_dependencies: T::Array[String], all_dependencies: T::Array[String]).returns(String) } + def detect_formatter(direct_dependencies, all_dependencies) # NOTE: Intentionally no $ at end, since we want to match rubocop-shopify, etc. - if dependencies.any?(/^rubocop/) - "rubocop" - elsif dependencies.any?(/^syntax_tree$/) - "syntax_tree" - else - "none" - end + return "rubocop" if direct_dependencies.any?(/^rubocop/) + + syntax_tree_is_direct_dependency = direct_dependencies.include?("syntax_tree") + return "syntax_tree" if syntax_tree_is_direct_dependency + + rubocop_is_transitive_dependency = all_dependencies.include?("rubocop") + return "rubocop" if dot_rubocop_yml_present && rubocop_is_transitive_dependency + + "none" end # Try to detect if there are linters in the project's dependencies. For auto-detection, we always only consider a @@ -132,7 +139,7 @@ def detect_test_library(dependencies) # by ruby-lsp-rails. A Rails app doesn't need to depend on the rails gem itself, individual components like # activestorage may be added to the gemfile so that other components aren't downloaded. Check for the presence # of bin/rails to support these cases. - elsif File.exist?(File.join(workspace_path, "bin/rails")) + elsif bin_rails_present "rails" # NOTE: Intentionally ends with $ to avoid mis-matching minitest-reporters, etc. in a Rails app. elsif dependencies.any?(/^minitest$/) @@ -162,8 +169,18 @@ def detect_typechecker(dependencies) false end + sig { returns(T::Boolean) } + def bin_rails_present + File.exist?(File.join(workspace_path, "bin/rails")) + end + + sig { returns(T::Boolean) } + def dot_rubocop_yml_present + File.exist?(File.join(workspace_path, ".rubocop.yml")) + end + sig { returns(T::Array[String]) } - def gather_dependencies + def gather_direct_dependencies Bundler.with_original_env { Bundler.default_gemfile } Bundler.locked_gems.dependencies.keys + gemspec_dependencies rescue Bundler::GemfileNotFound @@ -176,5 +193,13 @@ def gemspec_dependencies .grep(Bundler::Source::Gemspec) .flat_map { _1.gemspec&.dependencies&.map(&:name) } end + + sig { returns(T::Array[String]) } + def gather_direct_and_indirect_dependencies + Bundler.with_original_env { Bundler.default_gemfile } + Bundler.locked_gems.specs.map(&:name) + rescue Bundler::GemfileNotFound + [] + end end end diff --git a/lib/ruby_lsp/internal.rb b/lib/ruby_lsp/internal.rb index 7aa48b34f..366994f07 100644 --- a/lib/ruby_lsp/internal.rb +++ b/lib/ruby_lsp/internal.rb @@ -18,6 +18,7 @@ require "prism" require "prism/visitor" require "language_server-protocol" +require "rbs" require "ruby-lsp" require "ruby_lsp/base_server" @@ -27,8 +28,10 @@ require "ruby_lsp/parameter_scope" require "ruby_lsp/global_state" require "ruby_lsp/server" +require "ruby_lsp/type_inferrer" require "ruby_lsp/requests" require "ruby_lsp/response_builders" +require "ruby_lsp/node_context" require "ruby_lsp/document" require "ruby_lsp/ruby_document" require "ruby_lsp/store" diff --git a/lib/ruby_lsp/listeners/code_lens.rb b/lib/ruby_lsp/listeners/code_lens.rb index bb4ce05a0..fac7c120c 100644 --- a/lib/ruby_lsp/listeners/code_lens.rb +++ b/lib/ruby_lsp/listeners/code_lens.rb @@ -42,6 +42,8 @@ def initialize(response_builder, global_state, uri, dispatcher) @group_stack = T.let([], T::Array[String]) @group_id = T.let(1, Integer) @group_id_stack = T.let([], T::Array[Integer]) + # We want to avoid adding code lenses for nested definitions + @def_depth = T.let(0, Integer) dispatcher.register( self, @@ -50,6 +52,7 @@ def initialize(response_builder, global_state, uri, dispatcher) :on_module_node_enter, :on_module_node_leave, :on_def_node_enter, + :on_def_node_leave, :on_call_node_enter, :on_call_node_leave, ) @@ -88,6 +91,9 @@ def on_class_node_leave(node) sig { params(node: Prism::DefNode).void } def on_def_node_enter(node) + @def_depth += 1 + return if @def_depth > 1 + class_name = @group_stack.last return unless class_name&.end_with?("Test") @@ -105,6 +111,11 @@ def on_def_node_enter(node) end end + sig { params(node: Prism::DefNode).void } + def on_def_node_leave(node) + @def_depth -= 1 + end + sig { params(node: Prism::ModuleNode).void } def on_module_node_enter(node) if (path = namespace_constant_name(node)) @@ -225,7 +236,7 @@ def generate_test_command(group_stack: [], spec_name: nil, method_name: nil) # so there must be something to the left of the available path. group_stack = T.must(group_stack[last_dynamic_reference_index + 1..]) if method_name - " --name " + "/::#{Shellwords.escape(group_stack.join("::") + "#" + method_name)}$/" + " --name " + "/::#{Shellwords.escape(group_stack.join("::")) + "#" + Shellwords.escape(method_name)}$/" else # When clicking on a CodeLens for `Test`, `(#|::)` will match all tests # that are registered on the class itself (matches after `#`) and all tests @@ -234,7 +245,7 @@ def generate_test_command(group_stack: [], spec_name: nil, method_name: nil) end elsif method_name # We know the entire path, do an exact match - " --name " + Shellwords.escape(group_stack.join("::") + "#" + method_name) + " --name " + Shellwords.escape(group_stack.join("::")) + "#" + Shellwords.escape(method_name) elsif spec_name " --name " + "/#{Shellwords.escape(spec_name)}/" else diff --git a/lib/ruby_lsp/listeners/completion.rb b/lib/ruby_lsp/listeners/completion.rb index e7aff969a..001a34f64 100644 --- a/lib/ruby_lsp/listeners/completion.rb +++ b/lib/ruby_lsp/listeners/completion.rb @@ -11,17 +11,17 @@ class Completion params( response_builder: ResponseBuilders::CollectionResponseBuilder[Interface::CompletionItem], global_state: GlobalState, - nesting: T::Array[String], + node_context: NodeContext, typechecker_enabled: T::Boolean, dispatcher: Prism::Dispatcher, uri: URI::Generic, ).void end - def initialize(response_builder, global_state, nesting, typechecker_enabled, dispatcher, uri) # rubocop:disable Metrics/ParameterLists + def initialize(response_builder, global_state, node_context, typechecker_enabled, dispatcher, uri) # rubocop:disable Metrics/ParameterLists @response_builder = response_builder @global_state = global_state @index = T.let(global_state.index, RubyIndexer::Index) - @nesting = nesting + @node_context = node_context @typechecker_enabled = typechecker_enabled @uri = uri @@ -30,24 +30,30 @@ def initialize(response_builder, global_state, nesting, typechecker_enabled, dis :on_constant_path_node_enter, :on_constant_read_node_enter, :on_call_node_enter, + :on_instance_variable_read_node_enter, + :on_instance_variable_write_node_enter, + :on_instance_variable_and_write_node_enter, + :on_instance_variable_operator_write_node_enter, + :on_instance_variable_or_write_node_enter, + :on_instance_variable_target_node_enter, ) end # Handle completion on regular constant references (e.g. `Bar`) sig { params(node: Prism::ConstantReadNode).void } def on_constant_read_node_enter(node) - return if @global_state.typechecker + return if @global_state.has_type_checker name = constant_name(node) return if name.nil? - candidates = @index.prefix_search(name, @nesting) + candidates = @index.prefix_search(name, @node_context.nesting) candidates.each do |entries| complete_name = T.must(entries.first).name @response_builder << build_entry_completion( complete_name, name, - node, + range_from_location(node.location), entries, top_level?(complete_name), ) @@ -57,11 +63,88 @@ def on_constant_read_node_enter(node) # Handle completion on namespaced constant references (e.g. `Foo::Bar`) sig { params(node: Prism::ConstantPathNode).void } def on_constant_path_node_enter(node) - return if @global_state.typechecker + return if @global_state.has_type_checker name = constant_name(node) return if name.nil? + constant_path_completion(name, range_from_location(node.location)) + end + + sig { params(node: Prism::CallNode).void } + def on_call_node_enter(node) + receiver = node.receiver + + # When writing `Foo::`, the AST assigns a method call node (because you can use that syntax to invoke singleton + # methods). However, in addition to providing method completion, we also need to show possible constant + # completions + if (receiver.is_a?(Prism::ConstantReadNode) || receiver.is_a?(Prism::ConstantPathNode)) && + node.call_operator == "::" + + name = constant_name(receiver) + + if name + start_loc = node.location + end_loc = T.must(node.call_operator_loc) + + constant_path_completion( + "#{name}::", + Interface::Range.new( + start: Interface::Position.new(line: start_loc.start_line - 1, character: start_loc.start_column), + end: Interface::Position.new(line: end_loc.end_line - 1, character: end_loc.end_column), + ), + ) + return + end + end + + name = node.message + return unless name + + case name + when "require" + complete_require(node) + when "require_relative" + complete_require_relative(node) + else + complete_self_receiver_method(node, name) if !@typechecker_enabled && self_receiver?(node) + end + end + + sig { params(node: Prism::InstanceVariableReadNode).void } + def on_instance_variable_read_node_enter(node) + handle_instance_variable_completion(node.name.to_s, node.location) + end + + sig { params(node: Prism::InstanceVariableWriteNode).void } + def on_instance_variable_write_node_enter(node) + handle_instance_variable_completion(node.name.to_s, node.name_loc) + end + + sig { params(node: Prism::InstanceVariableAndWriteNode).void } + def on_instance_variable_and_write_node_enter(node) + handle_instance_variable_completion(node.name.to_s, node.name_loc) + end + + sig { params(node: Prism::InstanceVariableOperatorWriteNode).void } + def on_instance_variable_operator_write_node_enter(node) + handle_instance_variable_completion(node.name.to_s, node.name_loc) + end + + sig { params(node: Prism::InstanceVariableOrWriteNode).void } + def on_instance_variable_or_write_node_enter(node) + handle_instance_variable_completion(node.name.to_s, node.name_loc) + end + + sig { params(node: Prism::InstanceVariableTargetNode).void } + def on_instance_variable_target_node_enter(node) + handle_instance_variable_completion(node.name.to_s, node.location) + end + + private + + sig { params(name: String, range: Interface::Range).void } + def constant_path_completion(name, range) top_level_reference = if name.start_with?("::") name = name.delete_prefix("::") true @@ -71,54 +154,63 @@ def on_constant_path_node_enter(node) # If we're trying to provide completion for an aliased namespace, we need to first discover it's real name in # order to find which possible constants match the desired search - *namespace, incomplete_name = name.split("::") - aliased_namespace = T.must(namespace).join("::") - namespace_entries = @index.resolve(aliased_namespace, @nesting) + aliased_namespace = if name.end_with?("::") + name.delete_suffix("::") + else + *namespace, incomplete_name = name.split("::") + T.must(namespace).join("::") + end + + nesting = @node_context.nesting + namespace_entries = @index.resolve(aliased_namespace, nesting) return unless namespace_entries real_namespace = @index.follow_aliased_namespace(T.must(namespace_entries.first).name) candidates = @index.prefix_search( "#{real_namespace}::#{incomplete_name}", - top_level_reference ? [] : @nesting, + top_level_reference ? [] : nesting, ) candidates.each do |entries| # The only time we may have a private constant reference from outside of the namespace is if we're dealing # with ConstantPath and the entry name doesn't start with the current nesting first_entry = T.must(entries.first) - next if first_entry.visibility == :private && !first_entry.name.start_with?("#{@nesting}::") - - constant_name = T.must(first_entry.name.split("::").last) + next if first_entry.private? && !first_entry.name.start_with?("#{nesting}::") + constant_name = first_entry.name.delete_prefix("#{real_namespace}::") full_name = aliased_namespace.empty? ? constant_name : "#{aliased_namespace}::#{constant_name}" @response_builder << build_entry_completion( full_name, name, - node, + range, entries, top_level_reference || top_level?(T.must(entries.first).name), ) end end - sig { params(node: Prism::CallNode).void } - def on_call_node_enter(node) - name = node.message - return unless name - - case name - when "require" - complete_require(node) - when "require_relative" - complete_require_relative(node) - else - complete_self_receiver_method(node, name) if !@typechecker_enabled && self_receiver?(node) + sig { params(name: String, location: Prism::Location).void } + def handle_instance_variable_completion(name, location) + @index.instance_variable_completion_candidates(name, @node_context.fully_qualified_name).each do |entry| + variable_name = entry.name + + @response_builder << Interface::CompletionItem.new( + label: variable_name, + text_edit: Interface::TextEdit.new( + range: range_from_location(location), + new_text: variable_name, + ), + kind: Constant::CompletionItemKind::FIELD, + data: { + owner_name: entry.owner&.name, + }, + ) end + rescue RubyIndexer::Index::NonExistingNamespaceError + # If by any chance we haven't indexed the owner, then there's no way to find the right declaration end - private - sig { params(node: Prism::CallNode).void } def complete_require(node) arguments_node = node.arguments @@ -166,15 +258,12 @@ def complete_require_relative(node) sig { params(node: Prism::CallNode, name: String).void } def complete_self_receiver_method(node, name) - receiver_entries = @index[@nesting.join("::")] + receiver_entries = @index[@node_context.fully_qualified_name] return unless receiver_entries receiver = T.must(receiver_entries.first) - @index.prefix_search(name).each do |entries| - entry = entries.find { |e| e.is_a?(RubyIndexer::Entry::Member) && e.owner&.name == receiver.name } - next unless entry - + @index.method_completion_candidates(name, receiver.name).each do |entry| @response_builder << build_method_completion(T.cast(entry, RubyIndexer::Entry::Member), node) end end @@ -223,12 +312,12 @@ def build_completion(label, node) params( real_name: String, incomplete_name: String, - node: Prism::Node, + range: Interface::Range, entries: T::Array[RubyIndexer::Entry], top_level: T::Boolean, ).returns(Interface::CompletionItem) end - def build_entry_completion(real_name, incomplete_name, node, entries, top_level) + def build_entry_completion(real_name, incomplete_name, range, entries, top_level) first_entry = T.must(entries.first) kind = case first_entry when RubyIndexer::Entry::Class @@ -263,20 +352,23 @@ def build_entry_completion(real_name, incomplete_name, node, entries, top_level) # # Foo::B # --> completion inserts `Bar` instead of `Foo::Bar` # end - @nesting.each do |namespace| - prefix = "#{namespace}::" - shortened_name = insertion_text.delete_prefix(prefix) - - # If a different entry exists for the shortened name, then there's a conflict and we should not shorten it - conflict_name = "#{@nesting.join("::")}::#{shortened_name}" - break if real_name != conflict_name && @index[conflict_name] - - insertion_text = shortened_name - - # If the user is typing a fully qualified name `Foo::Bar::Baz`, then we should not use the short name (e.g.: - # `Baz`) as filtering. So we only shorten the filter text if the user is not including the namespaces in their - # typing - filter_text.delete_prefix!(prefix) unless incomplete_name.start_with?(prefix) + nesting = @node_context.nesting + unless @node_context.fully_qualified_name.start_with?(incomplete_name) + nesting.each do |namespace| + prefix = "#{namespace}::" + shortened_name = insertion_text.delete_prefix(prefix) + + # If a different entry exists for the shortened name, then there's a conflict and we should not shorten it + conflict_name = "#{@node_context.fully_qualified_name}::#{shortened_name}" + break if real_name != conflict_name && @index[conflict_name] + + insertion_text = shortened_name + + # If the user is typing a fully qualified name `Foo::Bar::Baz`, then we should not use the short name (e.g.: + # `Baz`) as filtering. So we only shorten the filter text if the user is not including the namespaces in + # their typing + filter_text.delete_prefix!(prefix) unless incomplete_name.start_with?(prefix) + end end # When using a top level constant reference (e.g.: `::Bar`), the editor includes the `::` as part of the filter. @@ -286,7 +378,7 @@ def build_entry_completion(real_name, incomplete_name, node, entries, top_level) label: real_name, filter_text: filter_text, text_edit: Interface::TextEdit.new( - range: range_from_node(node), + range: range, new_text: insertion_text, ), kind: kind, @@ -309,8 +401,9 @@ def build_entry_completion(real_name, incomplete_name, node, entries, top_level) # ``` sig { params(entry_name: String).returns(T::Boolean) } def top_level?(entry_name) - @nesting.length.downto(0).each do |i| - prefix = T.must(@nesting[0...i]).join("::") + nesting = @node_context.nesting + nesting.length.downto(0).each do |i| + prefix = T.must(nesting[0...i]).join("::") full_name = prefix.empty? ? entry_name : "#{prefix}::#{entry_name}" next if full_name == entry_name diff --git a/lib/ruby_lsp/listeners/definition.rb b/lib/ruby_lsp/listeners/definition.rb index c224f7dc3..5a1dca2e9 100644 --- a/lib/ruby_lsp/listeners/definition.rb +++ b/lib/ruby_lsp/listeners/definition.rb @@ -14,17 +14,17 @@ class Definition response_builder: ResponseBuilders::CollectionResponseBuilder[Interface::Location], global_state: GlobalState, uri: URI::Generic, - nesting: T::Array[String], + node_context: NodeContext, dispatcher: Prism::Dispatcher, typechecker_enabled: T::Boolean, ).void end - def initialize(response_builder, global_state, uri, nesting, dispatcher, typechecker_enabled) # rubocop:disable Metrics/ParameterLists + def initialize(response_builder, global_state, uri, node_context, dispatcher, typechecker_enabled) # rubocop:disable Metrics/ParameterLists @response_builder = response_builder @global_state = global_state @index = T.let(global_state.index, RubyIndexer::Index) @uri = uri - @nesting = nesting + @node_context = node_context @typechecker_enabled = typechecker_enabled dispatcher.register( @@ -33,12 +33,21 @@ def initialize(response_builder, global_state, uri, nesting, dispatcher, typeche :on_block_argument_node_enter, :on_constant_read_node_enter, :on_constant_path_node_enter, + :on_instance_variable_read_node_enter, + :on_instance_variable_write_node_enter, + :on_instance_variable_and_write_node_enter, + :on_instance_variable_operator_write_node_enter, + :on_instance_variable_or_write_node_enter, + :on_instance_variable_target_node_enter, + :on_string_node_enter, ) end sig { params(node: Prism::CallNode).void } def on_call_node_enter(node) - message = node.name + message = node.message + return unless message + if message == :require || message == :require_relative handle_require_definition(node) @@ -47,6 +56,18 @@ def on_call_node_enter(node) else handle_method_definition(message.to_s, self_receiver?(node)) end + handle_method_definition(message, self_receiver?(node)) + end + + sig { params(node: Prism::StringNode).void } + def on_string_node_enter(node) + enclosing_call = @node_context.call_node + return unless enclosing_call + + name = enclosing_call.name + return unless name == :require || name == :require_relative + + handle_require_definition(node, name) end sig { params(node: Prism::BlockArgumentNode).void } @@ -76,12 +97,62 @@ def on_constant_read_node_enter(node) find_in_index(name) end + sig { params(node: Prism::InstanceVariableReadNode).void } + def on_instance_variable_read_node_enter(node) + handle_instance_variable_definition(node.name.to_s) + end + + sig { params(node: Prism::InstanceVariableWriteNode).void } + def on_instance_variable_write_node_enter(node) + handle_instance_variable_definition(node.name.to_s) + end + + sig { params(node: Prism::InstanceVariableAndWriteNode).void } + def on_instance_variable_and_write_node_enter(node) + handle_instance_variable_definition(node.name.to_s) + end + + sig { params(node: Prism::InstanceVariableOperatorWriteNode).void } + def on_instance_variable_operator_write_node_enter(node) + handle_instance_variable_definition(node.name.to_s) + end + + sig { params(node: Prism::InstanceVariableOrWriteNode).void } + def on_instance_variable_or_write_node_enter(node) + handle_instance_variable_definition(node.name.to_s) + end + + sig { params(node: Prism::InstanceVariableTargetNode).void } + def on_instance_variable_target_node_enter(node) + handle_instance_variable_definition(node.name.to_s) + end + private + sig { params(name: String).void } + def handle_instance_variable_definition(name) + entries = @index.resolve_instance_variable(name, @node_context.fully_qualified_name) + return unless entries + + entries.each do |entry| + location = entry.location + + @response_builder << Interface::Location.new( + uri: URI::Generic.from_path(path: entry.file_path).to_s, + range: Interface::Range.new( + start: Interface::Position.new(line: location.start_line - 1, character: location.start_column), + end: Interface::Position.new(line: location.end_line - 1, character: location.end_column), + ), + ) + end + rescue RubyIndexer::Index::NonExistingNamespaceError + # If by any chance we haven't indexed the owner, then there's no way to find the right declaration + end + sig { params(message: String, self_receiver: T::Boolean).void } def handle_method_definition(message, self_receiver) methods = if self_receiver - @index.resolve_method(message, @nesting.join("::")) + @index.resolve_method(message, @node_context.fully_qualified_name) else # If the method doesn't have a receiver, then we provide a few candidates to jump to # But we don't want to provide too many candidates, as it can be overwhelming @@ -105,19 +176,12 @@ def handle_method_definition(message, self_receiver) end end - sig { params(node: Prism::CallNode).void } - def handle_require_definition(node) - message = node.name - arguments = node.arguments - return unless arguments - - argument = arguments.arguments.first - return unless argument.is_a?(Prism::StringNode) - + sig { params(node: Prism::StringNode, message: Symbol).void } + def handle_require_definition(node, message) case message when :require - entry = @index.search_require_paths(argument.content).find do |indexable_path| - indexable_path.require_path == argument.content + entry = @index.search_require_paths(node.content).find do |indexable_path| + indexable_path.require_path == node.content end if entry @@ -132,7 +196,7 @@ def handle_require_definition(node) ) end when :require_relative - required_file = "#{argument.content}.rb" + required_file = "#{node.content}.rb" path = @uri.to_standardized_path current_folder = path ? Pathname.new(CGI.unescape(path)).dirname : Dir.pwd candidate = File.expand_path(File.join(current_folder, required_file)) @@ -159,13 +223,13 @@ def handle_autoload_definition(node) sig { params(value: String).void } def find_in_index(value) - entries = @index.resolve(value, @nesting) + entries = @index.resolve(value, @node_context.nesting) return unless entries # We should only allow jumping to the definition of private constants if the constant is defined in the same # namespace as the reference first_entry = T.must(entries.first) - return if first_entry.visibility == :private && first_entry.name != "#{@nesting.join("::")}::#{value}" + return if first_entry.private? && first_entry.name != "#{@node_context.fully_qualified_name}::#{value}" entries.each do |entry| location = entry.location diff --git a/lib/ruby_lsp/listeners/document_highlight.rb b/lib/ruby_lsp/listeners/document_highlight.rb index 3952d5161..89ddb59e8 100644 --- a/lib/ruby_lsp/listeners/document_highlight.rb +++ b/lib/ruby_lsp/listeners/document_highlight.rb @@ -271,7 +271,7 @@ def on_local_variable_read_node_enter(node) def on_constant_path_node_enter(node) return unless matches?(node, CONSTANT_PATH_NODES) - add_highlight(Constant::DocumentHighlightKind::READ, node.location) + add_highlight(Constant::DocumentHighlightKind::READ, node.name_loc) end sig { params(node: Prism::ConstantReadNode).void } diff --git a/lib/ruby_lsp/listeners/document_link.rb b/lib/ruby_lsp/listeners/document_link.rb index f53140743..6c1b2d738 100644 --- a/lib/ruby_lsp/listeners/document_link.rb +++ b/lib/ruby_lsp/listeners/document_link.rb @@ -30,7 +30,7 @@ def gem_paths lookup[spec.name] = {} lookup[spec.name][spec.version.to_s] = {} - Dir.glob("**/*.rb", base: "#{spec.full_gem_path}/").each do |path| + Dir.glob("**/*.rb", base: "#{spec.full_gem_path.delete_prefix("//?/")}/").each do |path| lookup[spec.name][spec.version.to_s][path] = "#{spec.full_gem_path}/#{path}" end end diff --git a/lib/ruby_lsp/listeners/hover.rb b/lib/ruby_lsp/listeners/hover.rb index 7b5b102ce..57fc5996c 100644 --- a/lib/ruby_lsp/listeners/hover.rb +++ b/lib/ruby_lsp/listeners/hover.rb @@ -13,6 +13,14 @@ class Hover Prism::ConstantReadNode, Prism::ConstantWriteNode, Prism::ConstantPathNode, + Prism::InstanceVariableReadNode, + Prism::InstanceVariableAndWriteNode, + Prism::InstanceVariableOperatorWriteNode, + Prism::InstanceVariableOrWriteNode, + Prism::InstanceVariableTargetNode, + Prism::InstanceVariableWriteNode, + Prism::SymbolNode, + Prism::StringNode, ], T::Array[T.class_of(Prism::Node)], ) @@ -30,17 +38,17 @@ class Hover response_builder: ResponseBuilders::Hover, global_state: GlobalState, uri: URI::Generic, - nesting: T::Array[String], + node_context: NodeContext, dispatcher: Prism::Dispatcher, typechecker_enabled: T::Boolean, ).void end - def initialize(response_builder, global_state, uri, nesting, dispatcher, typechecker_enabled) # rubocop:disable Metrics/ParameterLists + def initialize(response_builder, global_state, uri, node_context, dispatcher, typechecker_enabled) # rubocop:disable Metrics/ParameterLists @response_builder = response_builder @global_state = global_state @index = T.let(global_state.index, RubyIndexer::Index) @path = T.let(uri.to_standardized_path, T.nilable(String)) - @nesting = nesting + @node_context = node_context @typechecker_enabled = typechecker_enabled dispatcher.register( @@ -49,6 +57,12 @@ def initialize(response_builder, global_state, uri, nesting, dispatcher, typeche :on_constant_write_node_enter, :on_constant_path_node_enter, :on_call_node_enter, + :on_instance_variable_read_node_enter, + :on_instance_variable_write_node_enter, + :on_instance_variable_and_write_node_enter, + :on_instance_variable_operator_write_node_enter, + :on_instance_variable_or_write_node_enter, + :on_instance_variable_target_node_enter, ) end @@ -64,14 +78,14 @@ def on_constant_read_node_enter(node) sig { params(node: Prism::ConstantWriteNode).void } def on_constant_write_node_enter(node) - return if @global_state.typechecker + return if @global_state.has_type_checker generate_hover(node.name.to_s, node.name_loc) end sig { params(node: Prism::ConstantPathNode).void } def on_constant_path_node_enter(node) - return if @global_state.typechecker + return if @global_state.has_type_checker name = constant_name(node) return if name.nil? @@ -93,25 +107,69 @@ def on_call_node_enter(node) message = node.message return unless message - methods = @index.resolve_method(message, @nesting.join("::")) + methods = @index.resolve_method(message, @node_context.fully_qualified_name) return unless methods - categorized_markdown_from_index_entries(message, methods).each do |category, content| + title = "#{message}(#{T.must(methods.first).parameters.map(&:decorated_name).join(", ")})" + + categorized_markdown_from_index_entries(title, methods).each do |category, content| @response_builder.push(content, category: category) end end + sig { params(node: Prism::InstanceVariableReadNode).void } + def on_instance_variable_read_node_enter(node) + handle_instance_variable_hover(node.name.to_s) + end + + sig { params(node: Prism::InstanceVariableWriteNode).void } + def on_instance_variable_write_node_enter(node) + handle_instance_variable_hover(node.name.to_s) + end + + sig { params(node: Prism::InstanceVariableAndWriteNode).void } + def on_instance_variable_and_write_node_enter(node) + handle_instance_variable_hover(node.name.to_s) + end + + sig { params(node: Prism::InstanceVariableOperatorWriteNode).void } + def on_instance_variable_operator_write_node_enter(node) + handle_instance_variable_hover(node.name.to_s) + end + + sig { params(node: Prism::InstanceVariableOrWriteNode).void } + def on_instance_variable_or_write_node_enter(node) + handle_instance_variable_hover(node.name.to_s) + end + + sig { params(node: Prism::InstanceVariableTargetNode).void } + def on_instance_variable_target_node_enter(node) + handle_instance_variable_hover(node.name.to_s) + end + private + sig { params(name: String).void } + def handle_instance_variable_hover(name) + entries = @index.resolve_instance_variable(name, @node_context.fully_qualified_name) + return unless entries + + categorized_markdown_from_index_entries(name, entries).each do |category, content| + @response_builder.push(content, category: category) + end + rescue RubyIndexer::Index::NonExistingNamespaceError + # If by any chance we haven't indexed the owner, then there's no way to find the right declaration + end + sig { params(name: String, location: Prism::Location).void } def generate_hover(name, location) - entries = @index.resolve(name, @nesting) + entries = @index.resolve(name, @node_context.nesting) return unless entries # We should only show hover for private constants if the constant is defined in the same namespace as the # reference first_entry = T.must(entries.first) - return if first_entry.visibility == :private && first_entry.name != "#{@nesting.join("::")}::#{name}" + return if first_entry.private? && first_entry.name != "#{@node_context.fully_qualified_name}::#{name}" categorized_markdown_from_index_entries(name, entries).each do |category, content| @response_builder.push(content, category: category) diff --git a/lib/ruby_lsp/listeners/semantic_highlighting.rb b/lib/ruby_lsp/listeners/semantic_highlighting.rb index 744f4754a..42f317c1f 100644 --- a/lib/ruby_lsp/listeners/semantic_highlighting.rb +++ b/lib/ruby_lsp/listeners/semantic_highlighting.rb @@ -58,6 +58,7 @@ def initialize(dispatcher, response_builder, range: nil) :on_constant_operator_write_node_enter, :on_constant_or_write_node_enter, :on_constant_target_node_enter, + :on_constant_path_node_enter, :on_local_variable_and_write_node_enter, :on_local_variable_operator_write_node_enter, :on_local_variable_or_write_node_enter, @@ -302,17 +303,64 @@ def on_local_variable_target_node_enter(node) def on_class_node_enter(node) return unless visible?(node, @range) - @response_builder.add_token(node.constant_path.location, :class, [:declaration]) + constant_path = node.constant_path + + if constant_path.is_a?(Prism::ConstantReadNode) + @response_builder.add_token(constant_path.location, :class, [:declaration]) + else + each_constant_path_part(constant_path) do |part| + loc = case part + when Prism::ConstantPathNode + part.name_loc + when Prism::ConstantReadNode + part.location + end + next unless loc + + @response_builder.add_token(loc, :class, [:declaration]) + end + end superclass = node.superclass - @response_builder.add_token(superclass.location, :class) if superclass + + if superclass.is_a?(Prism::ConstantReadNode) + @response_builder.add_token(superclass.location, :class) + elsif superclass + each_constant_path_part(superclass) do |part| + loc = case part + when Prism::ConstantPathNode + part.name_loc + when Prism::ConstantReadNode + part.location + end + next unless loc + + @response_builder.add_token(loc, :class) + end + end end sig { params(node: Prism::ModuleNode).void } def on_module_node_enter(node) return unless visible?(node, @range) - @response_builder.add_token(node.constant_path.location, :namespace, [:declaration]) + constant_path = node.constant_path + + if constant_path.is_a?(Prism::ConstantReadNode) + @response_builder.add_token(constant_path.location, :namespace, [:declaration]) + else + each_constant_path_part(constant_path) do |part| + loc = case part + when Prism::ConstantPathNode + part.name_loc + when Prism::ConstantReadNode + part.location + end + next unless loc + + @response_builder.add_token(loc, :namespace, [:declaration]) + end + end end sig { params(node: Prism::ImplicitNode).void } @@ -327,6 +375,14 @@ def on_implicit_node_leave(node) @inside_implicit_node = false end + sig { params(node: Prism::ConstantPathNode).void } + def on_constant_path_node_enter(node) + return if @inside_implicit_node + return unless visible?(node, @range) + + @response_builder.add_token(node.name_loc, :namespace) + end + private # Textmate provides highlighting for a subset of these special Ruby-specific methods. We want to utilize that diff --git a/lib/ruby_lsp/listeners/signature_help.rb b/lib/ruby_lsp/listeners/signature_help.rb index 413a79f02..ceada7bdf 100644 --- a/lib/ruby_lsp/listeners/signature_help.rb +++ b/lib/ruby_lsp/listeners/signature_help.rb @@ -11,17 +11,17 @@ class SignatureHelp params( response_builder: ResponseBuilders::SignatureHelp, global_state: GlobalState, - nesting: T::Array[String], + node_context: NodeContext, dispatcher: Prism::Dispatcher, typechecker_enabled: T::Boolean, ).void end - def initialize(response_builder, global_state, nesting, dispatcher, typechecker_enabled) + def initialize(response_builder, global_state, node_context, dispatcher, typechecker_enabled) @typechecker_enabled = typechecker_enabled @response_builder = response_builder @global_state = global_state @index = T.let(global_state.index, RubyIndexer::Index) - @nesting = nesting + @node_context = node_context dispatcher.register(self, :on_call_node_enter) end @@ -33,7 +33,7 @@ def on_call_node_enter(node) message = node.message return unless message - methods = @index.resolve_method(message, @nesting.join("::")) + methods = @index.resolve_method(message, @node_context.fully_qualified_name) return unless methods target_method = methods.first diff --git a/lib/ruby_lsp/node_context.rb b/lib/ruby_lsp/node_context.rb new file mode 100644 index 000000000..6dfc57de7 --- /dev/null +++ b/lib/ruby_lsp/node_context.rb @@ -0,0 +1,44 @@ +# typed: strict +# frozen_string_literal: true + +module RubyLsp + # This class allows listeners to access contextual information about a node in the AST, such as its parent, + # its namespace nesting, and the surrounding CallNode (e.g. a method call). + class NodeContext + extend T::Sig + + sig { returns(T.nilable(Prism::Node)) } + attr_reader :node, :parent + + sig { returns(T::Array[String]) } + attr_reader :nesting + + sig { returns(T.nilable(Prism::CallNode)) } + attr_reader :call_node + + sig { returns(T.nilable(String)) } + attr_reader :surrounding_method + + sig do + params( + node: T.nilable(Prism::Node), + parent: T.nilable(Prism::Node), + nesting: T::Array[String], + call_node: T.nilable(Prism::CallNode), + surrounding_method: T.nilable(String), + ).void + end + def initialize(node, parent, nesting, call_node, surrounding_method) + @node = node + @parent = parent + @nesting = nesting + @call_node = call_node + @surrounding_method = surrounding_method + end + + sig { returns(String) } + def fully_qualified_name + @fully_qualified_name ||= T.let(@nesting.join("::"), T.nilable(String)) + end + end +end diff --git a/lib/ruby_lsp/requests/code_action_resolve.rb b/lib/ruby_lsp/requests/code_action_resolve.rb index 5d6c9b310..dd3b38bb1 100644 --- a/lib/ruby_lsp/requests/code_action_resolve.rb +++ b/lib/ruby_lsp/requests/code_action_resolve.rb @@ -24,6 +24,7 @@ module Requests class CodeActionResolve < Request extend T::Sig NEW_VARIABLE_NAME = "new_variable" + NEW_METHOD_NAME = "new_method" class CodeActionError < StandardError; end @@ -31,6 +32,7 @@ class Error < ::T::Enum enums do EmptySelection = new InvalidTargetRange = new + UnknownCodeAction = new end end @@ -43,6 +45,18 @@ def initialize(document, code_action) sig { override.returns(T.any(Interface::CodeAction, Error)) } def perform + case @code_action[:title] + when CodeActions::EXTRACT_TO_VARIABLE_TITLE + refactor_variable + when CodeActions::EXTRACT_TO_METHOD_TITLE + refactor_method + else + Error::UnknownCodeAction + end + end + + sig { returns(T.any(Interface::CodeAction, Error)) } + def refactor_variable return Error::EmptySelection if @document.source.empty? source_range = @code_action.dig(:data, :range) @@ -54,9 +68,11 @@ def perform extracted_source = T.must(@document.source[start_index...end_index]) # Find the closest statements node, so that we place the refactor in a valid position - closest_statements, parent_statements = @document + node_context = @document .locate(@document.tree, start_index, node_types: [Prism::StatementsNode, Prism::BlockNode]) + closest_statements = node_context.node + parent_statements = node_context.parent return Error::InvalidTargetRange if closest_statements.nil? || closest_statements.child_nodes.compact.empty? # Find the node with the end line closest to the requested position, so that we can place the refactor @@ -117,7 +133,7 @@ def perform end Interface::CodeAction.new( - title: "Refactor: Extract Variable", + title: CodeActions::EXTRACT_TO_VARIABLE_TITLE, edit: Interface::WorkspaceEdit.new( document_changes: [ Interface::TextDocumentEdit.new( @@ -135,6 +151,61 @@ def perform ) end + sig { returns(T.any(Interface::CodeAction, Error)) } + def refactor_method + return Error::EmptySelection if @document.source.empty? + + source_range = @code_action.dig(:data, :range) + return Error::EmptySelection if source_range[:start] == source_range[:end] + + scanner = @document.create_scanner + start_index = scanner.find_char_position(source_range[:start]) + end_index = scanner.find_char_position(source_range[:end]) + extracted_source = T.must(@document.source[start_index...end_index]) + + # Find the closest method declaration node, so that we place the refactor in a valid position + node_context = @document.locate(@document.tree, start_index, node_types: [Prism::DefNode]) + closest_def = T.cast(node_context.node, Prism::DefNode) + return Error::InvalidTargetRange if closest_def.nil? + + end_keyword_loc = closest_def.end_keyword_loc + return Error::InvalidTargetRange if end_keyword_loc.nil? + + end_line = end_keyword_loc.end_line - 1 + character = end_keyword_loc.end_column + indentation = " " * end_keyword_loc.start_column + target_range = { + start: { line: end_line, character: character }, + end: { line: end_line, character: character }, + } + + new_method_source = <<~RUBY.chomp + + + #{indentation}def #{NEW_METHOD_NAME} + #{indentation} #{extracted_source} + #{indentation}end + RUBY + + Interface::CodeAction.new( + title: CodeActions::EXTRACT_TO_METHOD_TITLE, + edit: Interface::WorkspaceEdit.new( + document_changes: [ + Interface::TextDocumentEdit.new( + text_document: Interface::OptionalVersionedTextDocumentIdentifier.new( + uri: @code_action.dig(:data, :uri), + version: nil, + ), + edits: [ + create_text_edit(target_range, new_method_source), + create_text_edit(source_range, NEW_METHOD_NAME), + ], + ), + ], + ), + ) + end + private sig { params(range: T::Hash[Symbol, T.untyped], new_text: String).returns(Interface::TextEdit) } diff --git a/lib/ruby_lsp/requests/code_actions.rb b/lib/ruby_lsp/requests/code_actions.rb index 7ee995dfb..da6b83a71 100644 --- a/lib/ruby_lsp/requests/code_actions.rb +++ b/lib/ruby_lsp/requests/code_actions.rb @@ -19,6 +19,9 @@ module Requests class CodeActions < Request extend T::Sig + EXTRACT_TO_VARIABLE_TITLE = "Refactor: Extract Variable" + EXTRACT_TO_METHOD_TITLE = "Refactor: Extract Method" + class << self extend T::Sig @@ -52,22 +55,20 @@ def perform end # Only add refactor actions if there's a non empty selection in the editor - code_actions << refactor_code_action(@range, @uri) unless @range.dig(:start) == @range.dig(:end) - code_actions - end - - private + unless @range.dig(:start) == @range.dig(:end) + code_actions << Interface::CodeAction.new( + title: EXTRACT_TO_VARIABLE_TITLE, + kind: Constant::CodeActionKind::REFACTOR_EXTRACT, + data: { range: @range, uri: @uri.to_s }, + ) + code_actions << Interface::CodeAction.new( + title: EXTRACT_TO_METHOD_TITLE, + kind: Constant::CodeActionKind::REFACTOR_EXTRACT, + data: { range: @range, uri: @uri.to_s }, + ) + end - sig { params(range: T::Hash[Symbol, T.untyped], uri: URI::Generic).returns(Interface::CodeAction) } - def refactor_code_action(range, uri) - Interface::CodeAction.new( - title: "Refactor: Extract Variable", - kind: Constant::CodeActionKind::REFACTOR_EXTRACT, - data: { - range: range, - uri: uri.to_s, - }, - ) + code_actions end end end diff --git a/lib/ruby_lsp/requests/completion.rb b/lib/ruby_lsp/requests/completion.rb index 2ceda099a..c895820cf 100644 --- a/lib/ruby_lsp/requests/completion.rb +++ b/lib/ruby_lsp/requests/completion.rb @@ -17,6 +17,7 @@ module Requests # - Constants # - Require paths # - Methods invoked on self only + # - Instance variables # # # Example # @@ -35,7 +36,7 @@ class << self def provider Interface::CompletionOptions.new( resolve_provider: true, - trigger_characters: ["/", "\"", "'"], + trigger_characters: ["/", "\"", "'", ":", "@"], completion_item: { labelDetailsSupport: true, }, @@ -59,10 +60,20 @@ def initialize(document, global_state, position, typechecker_enabled, dispatcher # Completion always receives the position immediately after the character that was just typed. Here we adjust it # back by 1, so that we find the right node char_position = document.create_scanner.find_char_position(position) - 1 - matched, parent, nesting = document.locate( + node_context = document.locate( document.tree, char_position, - node_types: [Prism::CallNode, Prism::ConstantReadNode, Prism::ConstantPathNode], + node_types: [ + Prism::CallNode, + Prism::ConstantReadNode, + Prism::ConstantPathNode, + Prism::InstanceVariableReadNode, + Prism::InstanceVariableAndWriteNode, + Prism::InstanceVariableOperatorWriteNode, + Prism::InstanceVariableOrWriteNode, + Prism::InstanceVariableTargetNode, + Prism::InstanceVariableWriteNode, + ], ) @response_builder = T.let( ResponseBuilders::CollectionResponseBuilder[Interface::CompletionItem].new, @@ -72,27 +83,24 @@ def initialize(document, global_state, position, typechecker_enabled, dispatcher Listeners::Completion.new( @response_builder, global_state, - nesting, + node_context, typechecker_enabled, dispatcher, document.uri, ) Addon.addons.each do |addon| - addon.create_completion_listener(@response_builder, nesting, dispatcher, document.uri) + addon.create_completion_listener(@response_builder, node_context, dispatcher, document.uri) end + matched = node_context.node + parent = node_context.parent return unless matched && parent - @target = case matched - when Prism::CallNode + @target = if parent.is_a?(Prism::ConstantPathNode) && matched.is_a?(Prism::ConstantReadNode) + parent + else matched - when Prism::ConstantReadNode, Prism::ConstantPathNode - if parent.is_a?(Prism::ConstantPathNode) && matched.is_a?(Prism::ConstantReadNode) - parent - else - matched - end end end diff --git a/lib/ruby_lsp/requests/completion_resolve.rb b/lib/ruby_lsp/requests/completion_resolve.rb index 0a9b55748..d2538778b 100644 --- a/lib/ruby_lsp/requests/completion_resolve.rb +++ b/lib/ruby_lsp/requests/completion_resolve.rb @@ -47,6 +47,15 @@ def perform label = @item[:label] entries = @index[label] || [] + owner_name = @item.dig(:data, :owner_name) + + if owner_name + entries = entries.select do |entry| + (entry.is_a?(RubyIndexer::Entry::Member) || entry.is_a?(RubyIndexer::Entry::InstanceVariable)) && + entry.owner&.name == owner_name + end + end + @item[:labelDetails] = Interface::CompletionItemLabelDetails.new( description: entries.take(MAX_DOCUMENTATION_ENTRIES).map(&:file_name).join(","), ) diff --git a/lib/ruby_lsp/requests/definition.rb b/lib/ruby_lsp/requests/definition.rb index 09116bdb7..a5af5a08b 100644 --- a/lib/ruby_lsp/requests/definition.rb +++ b/lib/ruby_lsp/requests/definition.rb @@ -17,8 +17,8 @@ module Requests # - Modules # - Constants # - Require paths - # - Methods invoked on self only - # - Autoloaded constants + # - Methods invoked on self only and on receivers where the type is unknown + # - Instance variables # # # Example # @@ -47,11 +47,27 @@ def initialize(document, global_state, position, dispatcher, typechecker_enabled ) @dispatcher = dispatcher - target, parent, nesting = document.locate_node( + node_context = document.locate_node( position, - node_types: [Prism::CallNode, Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::BlockArgumentNode], + node_types: [ + Prism::CallNode, + Prism::ConstantReadNode, + Prism::ConstantPathNode, + Prism::BlockArgumentNode, + Prism::InstanceVariableReadNode, + Prism::InstanceVariableAndWriteNode, + Prism::InstanceVariableOperatorWriteNode, + Prism::InstanceVariableOrWriteNode, + Prism::InstanceVariableTargetNode, + Prism::InstanceVariableWriteNode, + Prism::SymbolNode, + Prism::StringNode, + ], ) + target = node_context.node + parent = node_context.parent + if target.is_a?(Prism::ConstantReadNode) && parent.is_a?(Prism::ConstantPathNode) # If the target is part of a constant path node, we need to find the exact portion of the constant that the # user is requesting to go to definition for @@ -65,6 +81,9 @@ def initialize(document, global_state, position, dispatcher, typechecker_enabled # If the target is a method call, we need to ensure that the requested position is exactly on top of the # method identifier. Otherwise, we risk showing definitions for unrelated things target = nil + # For methods with block arguments using symbol-to-proc + elsif target.is_a?(Prism::SymbolNode) && parent.is_a?(Prism::BlockArgumentNode) + target = parent end if target @@ -72,13 +91,13 @@ def initialize(document, global_state, position, dispatcher, typechecker_enabled @response_builder, global_state, document.uri, - nesting, + node_context, dispatcher, typechecker_enabled, ) Addon.addons.each do |addon| - addon.create_definition_listener(@response_builder, document.uri, nesting, dispatcher) + addon.create_definition_listener(@response_builder, document.uri, node_context, dispatcher) end end diff --git a/lib/ruby_lsp/requests/document_highlight.rb b/lib/ruby_lsp/requests/document_highlight.rb index bec32dc99..c8efafe68 100644 --- a/lib/ruby_lsp/requests/document_highlight.rb +++ b/lib/ruby_lsp/requests/document_highlight.rb @@ -36,12 +36,12 @@ class DocumentHighlight < Request end def initialize(document, position, dispatcher) super() - target, parent = document.locate_node(position) + node_context = document.locate_node(position) @response_builder = T.let( ResponseBuilders::CollectionResponseBuilder[Interface::DocumentHighlight].new, ResponseBuilders::CollectionResponseBuilder[Interface::DocumentHighlight], ) - Listeners::DocumentHighlight.new(@response_builder, target, parent, dispatcher) + Listeners::DocumentHighlight.new(@response_builder, node_context.node, node_context.parent, dispatcher) end sig { override.returns(T::Array[Interface::DocumentHighlight]) } diff --git a/lib/ruby_lsp/requests/hover.rb b/lib/ruby_lsp/requests/hover.rb index e75f2f804..23291f21b 100644 --- a/lib/ruby_lsp/requests/hover.rb +++ b/lib/ruby_lsp/requests/hover.rb @@ -41,10 +41,9 @@ def provider end def initialize(document, global_state, position, dispatcher, typechecker_enabled) super() - target, parent, nesting = document.locate_node( - position, - node_types: Listeners::Hover::ALLOWED_TARGETS, - ) + node_context = document.locate_node(position, node_types: Listeners::Hover::ALLOWED_TARGETS) + target = node_context.node + parent = node_context.parent if (Listeners::Hover::ALLOWED_TARGETS.include?(parent.class) && !Listeners::Hover::ALLOWED_TARGETS.include?(target.class)) || @@ -66,9 +65,9 @@ def initialize(document, global_state, position, dispatcher, typechecker_enabled @target = T.let(target, T.nilable(Prism::Node)) uri = document.uri @response_builder = T.let(ResponseBuilders::Hover.new, ResponseBuilders::Hover) - Listeners::Hover.new(@response_builder, global_state, uri, nesting, dispatcher, typechecker_enabled) + Listeners::Hover.new(@response_builder, global_state, uri, node_context, dispatcher, typechecker_enabled) Addon.addons.each do |addon| - addon.create_hover_listener(@response_builder, nesting, dispatcher) + addon.create_hover_listener(@response_builder, node_context, dispatcher) end @dispatcher = dispatcher diff --git a/lib/ruby_lsp/requests/on_type_formatting.rb b/lib/ruby_lsp/requests/on_type_formatting.rb index 9d6887e96..0831388f8 100644 --- a/lib/ruby_lsp/requests/on_type_formatting.rb +++ b/lib/ruby_lsp/requests/on_type_formatting.rb @@ -213,12 +213,13 @@ def find_indentation(line) sig { void } def auto_indent_after_end_keyword current_line = @lines[@position[:line]] - return unless current_line&.strip == "end" + return unless current_line && current_line.strip == "end" - target, _parent, _nesting = @document.locate_node({ + node_context = @document.locate_node({ line: @position[:line], character: @position[:character] - 1, }) + target = node_context.node statements = case target when Prism::IfNode, Prism::UnlessNode, Prism::ForNode, Prism::WhileNode, Prism::UntilNode @@ -226,11 +227,14 @@ def auto_indent_after_end_keyword end return unless statements + current_indentation = find_indentation(current_line) statements.body.each do |node| loc = node.location - next unless loc.start_column == @indentation + next unless loc.start_column == current_indentation - add_edit_with_text(" ", { line: loc.start_line - 1, character: 0 }) + (loc.start_line..loc.end_line).each do |line| + add_edit_with_text(" ", { line: line - 1, character: 0 }) + end end move_cursor_to(@position[:line], @position[:character]) diff --git a/lib/ruby_lsp/requests/signature_help.rb b/lib/ruby_lsp/requests/signature_help.rb index f453e6e03..3c36950df 100644 --- a/lib/ruby_lsp/requests/signature_help.rb +++ b/lib/ruby_lsp/requests/signature_help.rb @@ -51,17 +51,17 @@ def provider end def initialize(document, global_state, position, context, dispatcher, typechecker_enabled) # rubocop:disable Metrics/ParameterLists super() - target, parent, nesting = document.locate_node( + node_context = document.locate_node( { line: position[:line], character: position[:character] }, node_types: [Prism::CallNode], ) - target = adjust_for_nested_target(target, parent, position) + target = adjust_for_nested_target(node_context.node, node_context.parent, position) @target = T.let(target, T.nilable(Prism::Node)) @dispatcher = dispatcher @response_builder = T.let(ResponseBuilders::SignatureHelp.new, ResponseBuilders::SignatureHelp) - Listeners::SignatureHelp.new(@response_builder, global_state, nesting, dispatcher, typechecker_enabled) + Listeners::SignatureHelp.new(@response_builder, global_state, node_context, dispatcher, typechecker_enabled) end sig { override.returns(T.nilable(Interface::SignatureHelp)) } diff --git a/lib/ruby_lsp/requests/support/common.rb b/lib/ruby_lsp/requests/support/common.rb index 135bd469b..602bc3c53 100644 --- a/lib/ruby_lsp/requests/support/common.rb +++ b/lib/ruby_lsp/requests/support/common.rb @@ -155,7 +155,8 @@ def markdown_from_index_entries(title, entries, max_entries = nil) end def constant_name(node) node.full_name - rescue Prism::ConstantPathNode::DynamicPartsInConstantPathError + rescue Prism::ConstantPathNode::DynamicPartsInConstantPathError, + Prism::ConstantPathNode::MissingNodesInConstantPathError nil end @@ -167,6 +168,24 @@ def namespace_constant_name(node) constant_name(path) end end + + # Iterates over each part of a constant path, so that we can easily push response items for each section of the + # name. For example, for `Foo::Bar::Baz`, this method will invoke the block with `Foo`, then `Bar` and finally + # `Baz`. + sig do + params( + node: Prism::Node, + block: T.proc.params(part: Prism::Node).void, + ).void + end + def each_constant_path_part(node, &block) + current = T.let(node, T.nilable(Prism::Node)) + + while current.is_a?(Prism::ConstantPathNode) + block.call(current) + current = current.parent + end + end end end end diff --git a/lib/ruby_lsp/requests/support/rubocop_diagnostic.rb b/lib/ruby_lsp/requests/support/rubocop_diagnostic.rb index 12a7a515e..3a9c7026e 100644 --- a/lib/ruby_lsp/requests/support/rubocop_diagnostic.rb +++ b/lib/ruby_lsp/requests/support/rubocop_diagnostic.rb @@ -19,6 +19,16 @@ class RuboCopDiagnostic T::Hash[Symbol, Integer], ) + ENHANCED_DOC_URL = T.let( + begin + gem("rubocop", ">= 1.64.0") + true + rescue LoadError + false + end, + T::Boolean, + ) + # TODO: avoid passing document once we have alternative ways to get at # encoding and file source sig { params(document: Document, offense: RuboCop::Cop::Offense, uri: URI::Generic).void } @@ -32,14 +42,14 @@ def initialize(document, offense, uri) def to_lsp_code_actions code_actions = [] - code_actions << autocorrect_action if @offense.correctable? + code_actions << autocorrect_action if correctable? code_actions << disable_line_action code_actions end - sig { returns(Interface::Diagnostic) } - def to_lsp_diagnostic + sig { params(config: RuboCop::Config).returns(Interface::Diagnostic) } + def to_lsp_diagnostic(config) # highlighted_area contains the begin and end position of the first line # This ensures that multiline offenses don't clutter the editor highlighted = @offense.highlighted_area @@ -47,7 +57,7 @@ def to_lsp_diagnostic message: message, source: "RuboCop", code: @offense.cop_name, - code_description: code_description, + code_description: code_description(config), severity: severity, range: Interface::Range.new( start: Interface::Position.new( @@ -60,7 +70,7 @@ def to_lsp_diagnostic ), ), data: { - correctable: @offense.correctable?, + correctable: correctable?, code_actions: to_lsp_code_actions, }, ) @@ -71,7 +81,7 @@ def to_lsp_diagnostic sig { returns(String) } def message message = @offense.message - message += "\n\nThis offense is not auto-correctable.\n" unless @offense.correctable? + message += "\n\nThis offense is not auto-correctable.\n" unless correctable? message end @@ -80,9 +90,16 @@ def severity RUBOCOP_TO_LSP_SEVERITY[@offense.severity.name] end - sig { returns(T.nilable(Interface::CodeDescription)) } - def code_description - doc_url = RuboCopRunner.find_cop_by_name(@offense.cop_name)&.documentation_url + sig { params(config: RuboCop::Config).returns(T.nilable(Interface::CodeDescription)) } + def code_description(config) + cop = RuboCopRunner.find_cop_by_name(@offense.cop_name) + return unless cop + + doc_url = if ENHANCED_DOC_URL + cop.documentation_url(config) + else + cop.documentation_url + end Interface::CodeDescription.new(href: doc_url) if doc_url end @@ -98,7 +115,7 @@ def autocorrect_action uri: @uri.to_s, version: nil, ), - edits: @offense.correctable? ? offense_replacements : [], + edits: correctable? ? offense_replacements : [], ), ], ), @@ -176,6 +193,14 @@ def length_of_line(line) line.length end end + + # When `RuboCop::LSP.enable` is called, contextual autocorrect will not offer itself + # as `correctable?` to prevent annoying changes while typing. Instead check if + # a corrector is present. If it is, then that means some code transformation can be applied. + sig { returns(T::Boolean) } + def correctable? + !@offense.corrector.nil? + end end end end diff --git a/lib/ruby_lsp/requests/support/rubocop_formatter.rb b/lib/ruby_lsp/requests/support/rubocop_formatter.rb index d11355f6a..62454c2f0 100644 --- a/lib/ruby_lsp/requests/support/rubocop_formatter.rb +++ b/lib/ruby_lsp/requests/support/rubocop_formatter.rb @@ -38,7 +38,11 @@ def run_diagnostic(uri, document) @diagnostic_runner.run(filename, document.source) @diagnostic_runner.offenses.map do |offense| - Support::RuboCopDiagnostic.new(document, offense, uri).to_lsp_diagnostic + Support::RuboCopDiagnostic.new( + document, + offense, + uri, + ).to_lsp_diagnostic(@diagnostic_runner.config_for_working_directory) end end end diff --git a/lib/ruby_lsp/requests/support/rubocop_runner.rb b/lib/ruby_lsp/requests/support/rubocop_runner.rb index 53001d3a1..bdac24dab 100644 --- a/lib/ruby_lsp/requests/support/rubocop_runner.rb +++ b/lib/ruby_lsp/requests/support/rubocop_runner.rb @@ -50,6 +50,9 @@ class ConfigurationError < StandardError; end sig { returns(T::Array[RuboCop::Cop::Offense]) } attr_reader :offenses + sig { returns(::RuboCop::Config) } + attr_reader :config_for_working_directory + DEFAULT_ARGS = T.let( [ "--stderr", # Print any output to stderr so that our stdout does not get polluted @@ -78,6 +81,7 @@ def initialize(*args) args += DEFAULT_ARGS rubocop_options = ::RuboCop::Options.new.parse(args).first config_store = ::RuboCop::ConfigStore.new + @config_for_working_directory = T.let(config_store.for_pwd, ::RuboCop::Config) super(rubocop_options, config_store) end diff --git a/lib/ruby_lsp/requests/workspace_symbol.rb b/lib/ruby_lsp/requests/workspace_symbol.rb index b3217a8df..f0a198c11 100644 --- a/lib/ruby_lsp/requests/workspace_symbol.rb +++ b/lib/ruby_lsp/requests/workspace_symbol.rb @@ -33,13 +33,14 @@ def initialize(global_state, query) sig { override.returns(T::Array[Interface::WorkspaceSymbol]) } def perform @index.fuzzy_search(@query).filter_map do |entry| - # If the project is using Sorbet, we let Sorbet handle symbols defined inside the project itself and RBIs, but - # we still return entries defined in gems to allow developers to jump directly to the source file_path = entry.file_path - next if @global_state.typechecker && not_in_dependencies?(file_path) + + # We only show symbols declared in the workspace + in_dependencies = !not_in_dependencies?(file_path) + next if in_dependencies # We should never show private symbols when searching the entire workspace - next if entry.visibility == :private + next if entry.private? kind = kind_for_entry(entry) loc = entry.location @@ -79,6 +80,8 @@ def kind_for_entry(entry) entry.name == "initialize" ? Constant::SymbolKind::CONSTRUCTOR : Constant::SymbolKind::METHOD when RubyIndexer::Entry::Accessor Constant::SymbolKind::PROPERTY + when RubyIndexer::Entry::InstanceVariable + Constant::SymbolKind::FIELD end end end diff --git a/lib/ruby_lsp/server.rb b/lib/ruby_lsp/server.rb index 6c53c4825..52fc6c575 100644 --- a/lib/ruby_lsp/server.rb +++ b/lib/ruby_lsp/server.rb @@ -76,6 +76,16 @@ def process_message(message) text_document_show_syntax_tree(message) when "rubyLsp/workspace/dependencies" workspace_dependencies(message) + when "rubyLsp/workspace/addons" + send_message( + Result.new( + id: message[:id], + response: + Addon.addons.map do |addon| + { name: addon.name, errored: addon.error? } + end, + ), + ) when "$/cancelRequest" @mutex.synchronize { @cancelled_requests << message[:params][:id] } end @@ -104,7 +114,7 @@ def load_addons ), ) - $stderr.puts(errored_addons.map(&:backtraces).join("\n\n")) + $stderr.puts(errored_addons.map(&:errors_details).join("\n\n")) unless @test_mode end end @@ -134,7 +144,7 @@ def run_initialize(message) when Hash # If the configuration is already a hash, merge it with a default value of `true`. That way clients don't have # to opt-in to every single feature - Hash.new(true).merge!(configured_features) + Hash.new(true).merge!(configured_features.transform_keys(&:to_s)) else # If no configuration was passed by the client, just enable every feature Hash.new(true) @@ -175,8 +185,11 @@ def run_initialize(message) completion_provider: completion_provider, code_lens_provider: code_lens_provider, definition_provider: enabled_features["definition"], - workspace_symbol_provider: enabled_features["workspaceSymbol"], + workspace_symbol_provider: enabled_features["workspaceSymbol"] && !@global_state.has_type_checker, signature_help_provider: signature_help_provider, + experimental: { + addon_detection: true, + }, ), serverInfo: { name: "Ruby LSP", @@ -449,7 +462,7 @@ def text_document_hover(message) sig { params(document: Document).returns(T::Boolean) } def typechecker_enabled?(document) - @global_state.typechecker && document.sorbet_sigil_is_true_or_higher + @global_state.has_type_checker && document.sorbet_sigil_is_true_or_higher end sig { params(message: T::Hash[Symbol, T.untyped]).void } @@ -498,6 +511,13 @@ def code_action_resolve(message) ), ) raise Requests::CodeActionResolve::CodeActionError + when Requests::CodeActionResolve::Error::UnknownCodeAction + send_message( + Notification.window_show_error( + "Unknown code action", + ), + ) + raise Requests::CodeActionResolve::CodeActionError else send_message(Result.new(id: message[:id], response: result)) end @@ -619,8 +639,7 @@ def workspace_did_change_watched_files(message) when Constant::FileChangeType::CREATED index.index_single(indexable) when Constant::FileChangeType::CHANGED - index.delete(indexable) - index.index_single(indexable) + index.handle_change(indexable) when Constant::FileChangeType::DELETED index.delete(indexable) end @@ -690,6 +709,8 @@ def perform_initial_indexing(config_hash) Thread.new do begin + RubyIndexer::RBSIndexer.new(@global_state.index).index_ruby_core + @global_state.index.index_all do |percentage| progress("indexing-progress", percentage) true diff --git a/lib/ruby_lsp/test_helper.rb b/lib/ruby_lsp/test_helper.rb index ccf428721..c7f08766d 100644 --- a/lib/ruby_lsp/test_helper.rb +++ b/lib/ruby_lsp/test_helper.rb @@ -20,7 +20,8 @@ module TestHelper def with_server(source = nil, uri = Kernel.URI("file:///fake.rb"), stub_no_typechecker: false, load_addons: true, &block) server = RubyLsp::Server.new(test_mode: true) - server.global_state.stubs(:typechecker).returns(false) if stub_no_typechecker + server.global_state.stubs(:has_type_checker).returns(false) if stub_no_typechecker + server.global_state.apply_options({}) if source server.process_message({ diff --git a/lib/ruby_lsp/type_inferrer.rb b/lib/ruby_lsp/type_inferrer.rb new file mode 100644 index 000000000..f209d3c29 --- /dev/null +++ b/lib/ruby_lsp/type_inferrer.rb @@ -0,0 +1,86 @@ +# typed: strict +# frozen_string_literal: true + +module RubyLsp + # A minimalistic type checker to try to resolve types that can be inferred without requiring a type system or + # annotations + class TypeInferrer + extend T::Sig + + sig { params(index: RubyIndexer::Index).void } + def initialize(index) + @index = index + end + + sig { params(node_context: NodeContext).returns(T.nilable(String)) } + def infer_receiver_type(node_context) + node = node_context.node + + case node + when Prism::CallNode + infer_receiver_for_call_node(node, node_context) + when Prism::InstanceVariableReadNode, Prism::InstanceVariableAndWriteNode, Prism::InstanceVariableWriteNode, + Prism::InstanceVariableOperatorWriteNode, Prism::InstanceVariableOrWriteNode, Prism::InstanceVariableTargetNode + nesting = node_context.nesting + # If we're at the top level, then the invocation is happening on `
`, which is a special singleton that + # inherits from Object + return "Object" if nesting.empty? + + fully_qualified_name = node_context.fully_qualified_name + return fully_qualified_name if node_context.surrounding_method + + "#{fully_qualified_name}::" + end + end + + private + + sig { params(node: Prism::CallNode, node_context: NodeContext).returns(T.nilable(String)) } + def infer_receiver_for_call_node(node, node_context) + receiver = node.receiver + + case receiver + when Prism::SelfNode, nil + nesting = node_context.nesting + # If we're at the top level, then the invocation is happening on `
`, which is a special singleton that + # inherits from Object + return "Object" if nesting.empty? + return node_context.fully_qualified_name if node_context.surrounding_method + + # If we're not inside a method, then we're inside the body of a class or module, which is a singleton + # context + "#{nesting.join("::")}::" + when Prism::ConstantPathNode, Prism::ConstantReadNode + # When the receiver is a constant reference, we have to try to resolve it to figure out the right + # receiver. But since the invocation is directly on the constant, that's the singleton context of that + # class/module + receiver_name = constant_name(receiver) + return unless receiver_name + + resolved_receiver = @index.resolve(receiver_name, node_context.nesting) + name = resolved_receiver&.first&.name + return unless name + + *parts, last = name.split("::") + return "#{last}::" if T.must(parts).empty? + + "#{T.must(parts).join("::")}::#{last}::" + end + end + + sig do + params( + node: T.any( + Prism::ConstantPathNode, + Prism::ConstantReadNode, + ), + ).returns(T.nilable(String)) + end + def constant_name(node) + node.full_name + rescue Prism::ConstantPathNode::DynamicPartsInConstantPathError, + Prism::ConstantPathNode::MissingNodesInConstantPathError + nil + end + end +end diff --git a/ruby-lsp.gemspec b/ruby-lsp.gemspec index 7632cfdeb..ff703831a 100644 --- a/ruby-lsp.gemspec +++ b/ruby-lsp.gemspec @@ -19,7 +19,8 @@ Gem::Specification.new do |s| s.require_paths = ["lib"] s.add_dependency("language_server-protocol", "~> 3.17.0") - s.add_dependency("prism", ">= 0.23.0", "< 0.28") + s.add_dependency("prism", ">= 0.29.0", "< 0.31") + s.add_dependency("rbs", ">= 3", "< 4") s.add_dependency("sorbet-runtime", ">= 0.5.10782") s.required_ruby_version = ">= 3.0" diff --git a/sorbet/config b/sorbet/config index aaf95280c..733ffe146 100644 --- a/sorbet/config +++ b/sorbet/config @@ -2,4 +2,5 @@ . --ignore=vendor/ --ignore=test/fixtures/ +--ignore=test/expectations/ --enable-experimental-requires-ancestor diff --git a/sorbet/rbi/gems/minitest@5.22.3.rbi b/sorbet/rbi/gems/minitest@5.23.1.rbi similarity index 86% rename from sorbet/rbi/gems/minitest@5.22.3.rbi rename to sorbet/rbi/gems/minitest@5.23.1.rbi index a78f7d6c2..a9c1d0cd3 100644 --- a/sorbet/rbi/gems/minitest@5.22.3.rbi +++ b/sorbet/rbi/gems/minitest@5.23.1.rbi @@ -43,7 +43,7 @@ module Minitest # source://minitest//lib/minitest.rb#18 def cattr_accessor(name); end - # source://minitest//lib/minitest.rb#1146 + # source://minitest//lib/minitest.rb#1178 def clock_time; end # source://minitest//lib/minitest.rb#177 @@ -55,7 +55,7 @@ module Minitest # source://minitest//lib/minitest.rb#19 def extensions=(_arg0); end - # source://minitest//lib/minitest.rb#292 + # source://minitest//lib/minitest.rb#306 def filter_backtrace(bt); end # source://minitest//lib/minitest.rb#19 @@ -104,7 +104,7 @@ module Minitest # source://minitest//lib/minitest.rb#143 def run(args = T.unsafe(nil)); end - # source://minitest//lib/minitest.rb#1137 + # source://minitest//lib/minitest.rb#1169 def run_one_method(klass, method_name); end # source://minitest//lib/minitest.rb#19 @@ -118,24 +118,24 @@ end # Defines the API for Reporters. Subclass this and override whatever # you want. Go nuts. # -# source://minitest//lib/minitest.rb#638 +# source://minitest//lib/minitest.rb#652 class Minitest::AbstractReporter # @return [AbstractReporter] a new instance of AbstractReporter # - # source://minitest//lib/minitest.rb#640 + # source://minitest//lib/minitest.rb#654 def initialize; end # Did this run pass? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#675 + # source://minitest//lib/minitest.rb#689 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#654 + # source://minitest//lib/minitest.rb#668 def prerecord(klass, name); end # Output and record the result of the test. Call @@ -143,43 +143,43 @@ class Minitest::AbstractReporter # result character string. Stores the result of the run if the run # did not pass. # - # source://minitest//lib/minitest.rb#663 + # source://minitest//lib/minitest.rb#677 def record(result); end # Outputs the summary of the run. # - # source://minitest//lib/minitest.rb#669 + # source://minitest//lib/minitest.rb#683 def report; end # Starts reporting on the run. # - # source://minitest//lib/minitest.rb#647 + # source://minitest//lib/minitest.rb#661 def start; end - # source://minitest//lib/minitest.rb#679 + # source://minitest//lib/minitest.rb#693 def synchronize(&block); end end # Represents run failures. # -# source://minitest//lib/minitest.rb#962 +# source://minitest//lib/minitest.rb#985 class Minitest::Assertion < ::Exception - # source://minitest//lib/minitest.rb#965 + # source://minitest//lib/minitest.rb#988 def error; end # Where was this run before an assertion was raised? # - # source://minitest//lib/minitest.rb#972 + # source://minitest//lib/minitest.rb#995 def location; end - # source://minitest//lib/minitest.rb#980 + # source://minitest//lib/minitest.rb#1003 def result_code; end - # source://minitest//lib/minitest.rb#984 + # source://minitest//lib/minitest.rb#1007 def result_label; end end -# source://minitest//lib/minitest.rb#963 +# source://minitest//lib/minitest.rb#986 Minitest::Assertion::RE = T.let(T.unsafe(nil), Regexp) # Minitest Assertions. All assertion methods accept a +msg+ which is @@ -626,77 +626,77 @@ Minitest::Assertions::UNDEFINED = T.let(T.unsafe(nil), Object) # # See Minitest.backtrace_filter=. # -# source://minitest//lib/minitest.rb#1108 +# source://minitest//lib/minitest.rb#1140 class Minitest::BacktraceFilter # @return [BacktraceFilter] a new instance of BacktraceFilter # - # source://minitest//lib/minitest.rb#1114 + # source://minitest//lib/minitest.rb#1146 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#1122 + # source://minitest//lib/minitest.rb#1154 def filter(bt); end # Returns the value of attribute regexp. # - # source://minitest//lib/minitest.rb#1112 + # source://minitest//lib/minitest.rb#1144 def regexp; end # Sets the attribute regexp # # @param value the value to set the attribute regexp to. # - # source://minitest//lib/minitest.rb#1112 + # source://minitest//lib/minitest.rb#1144 def regexp=(_arg0); end end -# source://minitest//lib/minitest.rb#1110 +# source://minitest//lib/minitest.rb#1142 Minitest::BacktraceFilter::MT_RE = T.let(T.unsafe(nil), Regexp) # Dispatch to multiple reporters as one. # -# source://minitest//lib/minitest.rb#911 +# source://minitest//lib/minitest.rb#934 class Minitest::CompositeReporter < ::Minitest::AbstractReporter # @return [CompositeReporter] a new instance of CompositeReporter # - # source://minitest//lib/minitest.rb#917 + # source://minitest//lib/minitest.rb#940 def initialize(*reporters); end # Add another reporter to the mix. # - # source://minitest//lib/minitest.rb#929 + # source://minitest//lib/minitest.rb#952 def <<(reporter); end - # source://minitest//lib/minitest.rb#922 + # source://minitest//lib/minitest.rb#945 def io; end # @return [Boolean] # - # source://minitest//lib/minitest.rb#933 + # source://minitest//lib/minitest.rb#956 def passed?; end - # source://minitest//lib/minitest.rb#941 + # source://minitest//lib/minitest.rb#964 def prerecord(klass, name); end - # source://minitest//lib/minitest.rb#948 + # source://minitest//lib/minitest.rb#971 def record(result); end - # source://minitest//lib/minitest.rb#954 + # source://minitest//lib/minitest.rb#977 def report; end # The list of reporters to dispatch to. # - # source://minitest//lib/minitest.rb#915 + # source://minitest//lib/minitest.rb#938 def reporters; end # The list of reporters to dispatch to. # - # source://minitest//lib/minitest.rb#915 + # source://minitest//lib/minitest.rb#938 def reporters=(_arg0); end - # source://minitest//lib/minitest.rb#937 + # source://minitest//lib/minitest.rb#960 def start; end end @@ -725,48 +725,48 @@ end # # ... lots of test methods ... # end # -# source://minitest//lib/minitest.rb#1052 +# source://minitest//lib/minitest.rb#1084 module Minitest::Guard # Is this running on jruby? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#1057 + # source://minitest//lib/minitest.rb#1089 def jruby?(platform = T.unsafe(nil)); end # Is this running on maglev? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#1064 + # source://minitest//lib/minitest.rb#1096 def maglev?(platform = T.unsafe(nil)); end # Is this running on mri? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#1074 + # source://minitest//lib/minitest.rb#1106 def mri?(platform = T.unsafe(nil)); end # Is this running on macOS? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#1081 + # source://minitest//lib/minitest.rb#1113 def osx?(platform = T.unsafe(nil)); end # Is this running on rubinius? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#1088 + # source://minitest//lib/minitest.rb#1120 def rubinius?(platform = T.unsafe(nil)); end # Is this running on windows? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#1098 + # source://minitest//lib/minitest.rb#1130 def windows?(platform = T.unsafe(nil)); end end @@ -829,36 +829,36 @@ end # plugin, pull this out of the composite and replace it with your # own. # -# source://minitest//lib/minitest.rb#710 +# source://minitest//lib/minitest.rb#724 class Minitest::ProgressReporter < ::Minitest::Reporter - # source://minitest//lib/minitest.rb#711 + # source://minitest//lib/minitest.rb#725 def prerecord(klass, name); end - # source://minitest//lib/minitest.rb#718 + # source://minitest//lib/minitest.rb#732 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#532 +# source://minitest//lib/minitest.rb#546 module Minitest::Reportable # @raise [NotImplementedError] # - # source://minitest//lib/minitest.rb#554 + # source://minitest//lib/minitest.rb#568 def class_name; end # Did this run error? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#575 + # source://minitest//lib/minitest.rb#589 def error?; end # The location identifier of this test. Depends on a method # existing called class_name. # - # source://minitest//lib/minitest.rb#549 + # source://minitest//lib/minitest.rb#563 def location; end # Did this run pass? @@ -868,50 +868,50 @@ module Minitest::Reportable # # @return [Boolean] # - # source://minitest//lib/minitest.rb#539 + # source://minitest//lib/minitest.rb#553 def passed?; end # Returns ".", "F", or "E" based on the result of the run. # - # source://minitest//lib/minitest.rb#561 + # source://minitest//lib/minitest.rb#575 def result_code; end # Was this run skipped? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#568 + # source://minitest//lib/minitest.rb#582 def skipped?; end end -# source://minitest//lib/minitest.rb#543 +# source://minitest//lib/minitest.rb#557 Minitest::Reportable::BASE_DIR = T.let(T.unsafe(nil), String) -# source://minitest//lib/minitest.rb#686 +# source://minitest//lib/minitest.rb#700 class Minitest::Reporter < ::Minitest::AbstractReporter # @return [Reporter] a new instance of Reporter # - # source://minitest//lib/minitest.rb#695 + # source://minitest//lib/minitest.rb#709 def initialize(io = T.unsafe(nil), options = T.unsafe(nil)); end # The IO used to report. # - # source://minitest//lib/minitest.rb#688 + # source://minitest//lib/minitest.rb#702 def io; end # The IO used to report. # - # source://minitest//lib/minitest.rb#688 + # source://minitest//lib/minitest.rb#702 def io=(_arg0); end # Command-line options for this run. # - # source://minitest//lib/minitest.rb#693 + # source://minitest//lib/minitest.rb#707 def options; end # Command-line options for this run. # - # source://minitest//lib/minitest.rb#693 + # source://minitest//lib/minitest.rb#707 def options=(_arg0); end end @@ -921,80 +921,80 @@ end # blow up. By using Result.from(a_test) you can be reasonably sure # that the test result can be marshalled. # -# source://minitest//lib/minitest.rb#587 +# source://minitest//lib/minitest.rb#601 class Minitest::Result < ::Minitest::Runnable include ::Minitest::Reportable - # source://minitest//lib/minitest.rb#621 + # source://minitest//lib/minitest.rb#635 def class_name; end # The class name of the test result. # - # source://minitest//lib/minitest.rb#596 + # source://minitest//lib/minitest.rb#610 def klass; end # The class name of the test result. # - # source://minitest//lib/minitest.rb#596 + # source://minitest//lib/minitest.rb#610 def klass=(_arg0); end # The location of the test method. # - # source://minitest//lib/minitest.rb#601 + # source://minitest//lib/minitest.rb#615 def source_location; end # The location of the test method. # - # source://minitest//lib/minitest.rb#601 + # source://minitest//lib/minitest.rb#615 def source_location=(_arg0); end - # source://minitest//lib/minitest.rb#625 + # source://minitest//lib/minitest.rb#639 def to_s; end class << self # Create a new test result from a Runnable instance. # - # source://minitest//lib/minitest.rb#606 + # source://minitest//lib/minitest.rb#620 def from(runnable); end end end # re-open # -# source://minitest//lib/minitest.rb#305 +# source://minitest//lib/minitest.rb#319 class Minitest::Runnable # @return [Runnable] a new instance of Runnable # - # source://minitest//lib/minitest.rb#463 + # source://minitest//lib/minitest.rb#477 def initialize(name); end # Number of assertions executed in this run. # - # source://minitest//lib/minitest.rb#309 + # source://minitest//lib/minitest.rb#323 def assertions; end # Number of assertions executed in this run. # - # source://minitest//lib/minitest.rb#309 + # source://minitest//lib/minitest.rb#323 def assertions=(_arg0); end - # source://minitest//lib/minitest.rb#459 + # source://minitest//lib/minitest.rb#473 def failure; end # An assertion raised during the run, if any. # - # source://minitest//lib/minitest.rb#314 + # source://minitest//lib/minitest.rb#328 def failures; end # An assertion raised during the run, if any. # - # source://minitest//lib/minitest.rb#314 + # source://minitest//lib/minitest.rb#328 def failures=(_arg0); end - # source://minitest//lib/minitest.rb#445 + # source://minitest//lib/minitest.rb#459 def marshal_dump; end - # source://minitest//lib/minitest.rb#455 + # source://minitest//lib/minitest.rb#469 def marshal_load(ary); end # Metadata you attach to the test results that get sent to the reporter. @@ -1004,29 +1004,29 @@ class Minitest::Runnable # NOTE: this data *must* be plain (read: marshal-able) data! # Hashes! Arrays! Strings! # - # source://minitest//lib/minitest.rb#478 + # source://minitest//lib/minitest.rb#492 def metadata; end # Sets metadata, mainly used for +Result.from+. # - # source://minitest//lib/minitest.rb#485 + # source://minitest//lib/minitest.rb#499 def metadata=(_arg0); end # Returns true if metadata exists. # # @return [Boolean] # - # source://minitest//lib/minitest.rb#490 + # source://minitest//lib/minitest.rb#504 def metadata?; end # Name of the run. # - # source://minitest//lib/minitest.rb#332 + # source://minitest//lib/minitest.rb#346 def name; end # Set the name of the run. # - # source://minitest//lib/minitest.rb#339 + # source://minitest//lib/minitest.rb#353 def name=(o); end # Did this run pass? @@ -1037,7 +1037,7 @@ class Minitest::Runnable # @raise [NotImplementedError] # @return [Boolean] # - # source://minitest//lib/minitest.rb#507 + # source://minitest//lib/minitest.rb#521 def passed?; end # Returns a single character string to print based on the result @@ -1046,14 +1046,14 @@ class Minitest::Runnable # # @raise [NotImplementedError] # - # source://minitest//lib/minitest.rb#516 + # source://minitest//lib/minitest.rb#530 def result_code; end # Runs a single method. Needs to return self. # # @raise [NotImplementedError] # - # source://minitest//lib/minitest.rb#497 + # source://minitest//lib/minitest.rb#511 def run; end # Was this run skipped? See #passed? for more information. @@ -1061,42 +1061,42 @@ class Minitest::Runnable # @raise [NotImplementedError] # @return [Boolean] # - # source://minitest//lib/minitest.rb#523 + # source://minitest//lib/minitest.rb#537 def skipped?; end # The time it took to run. # - # source://minitest//lib/minitest.rb#319 + # source://minitest//lib/minitest.rb#333 def time; end # The time it took to run. # - # source://minitest//lib/minitest.rb#319 + # source://minitest//lib/minitest.rb#333 def time=(_arg0); end - # source://minitest//lib/minitest.rb#321 + # source://minitest//lib/minitest.rb#335 def time_it; end class << self - # source://minitest//lib/minitest.rb#1156 + # source://minitest//lib/minitest.rb#1188 def inherited(klass); end # Returns all instance methods matching the pattern +re+. # - # source://minitest//lib/minitest.rb#346 + # source://minitest//lib/minitest.rb#360 def methods_matching(re); end - # source://minitest//lib/minitest.rb#415 + # source://minitest//lib/minitest.rb#429 def on_signal(name, action); end - # source://minitest//lib/minitest.rb#350 + # source://minitest//lib/minitest.rb#364 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#361 + # source://minitest//lib/minitest.rb#375 def run(reporter, options = T.unsafe(nil)); end # Runs a single method and has the reporter record the result. @@ -1104,7 +1104,7 @@ class Minitest::Runnable # that subclasses can specialize the running of an individual # test. See Minitest::ParallelTest::ClassMethods for an example. # - # source://minitest//lib/minitest.rb#387 + # source://minitest//lib/minitest.rb#401 def run_one_method(klass, method_name, reporter); end # Each subclass of Runnable is responsible for overriding this @@ -1112,33 +1112,33 @@ class Minitest::Runnable # # @raise [NotImplementedError] # - # source://minitest//lib/minitest.rb#432 + # source://minitest//lib/minitest.rb#446 def runnable_methods; end # Returns all subclasses of Runnable. # - # source://minitest//lib/minitest.rb#439 + # source://minitest//lib/minitest.rb#453 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#396 + # source://minitest//lib/minitest.rb#410 def test_order; end - # source://minitest//lib/minitest.rb#400 + # source://minitest//lib/minitest.rb#414 def with_info_handler(reporter, &block); end end end -# source://minitest//lib/minitest.rb#413 +# source://minitest//lib/minitest.rb#427 Minitest::Runnable::SIGNALS = T.let(T.unsafe(nil), Hash) # Assertion raised when skipping a run. # -# source://minitest//lib/minitest.rb#992 +# source://minitest//lib/minitest.rb#1015 class Minitest::Skip < ::Minitest::Assertion - # source://minitest//lib/minitest.rb#993 + # source://minitest//lib/minitest.rb#1016 def result_label; end end @@ -1162,114 +1162,124 @@ end # end # end # -# source://minitest//lib/minitest.rb#746 +# source://minitest//lib/minitest.rb#760 class Minitest::StatisticsReporter < ::Minitest::Reporter # @return [StatisticsReporter] a new instance of StatisticsReporter # - # source://minitest//lib/minitest.rb#790 + # source://minitest//lib/minitest.rb#809 def initialize(io = T.unsafe(nil), options = T.unsafe(nil)); end # Total number of assertions. # - # source://minitest//lib/minitest.rb#750 + # source://minitest//lib/minitest.rb#764 def assertions; end # Total number of assertions. # - # source://minitest//lib/minitest.rb#750 + # source://minitest//lib/minitest.rb#764 def assertions=(_arg0); end # Total number of test cases. # - # source://minitest//lib/minitest.rb#755 + # source://minitest//lib/minitest.rb#769 def count; end # Total number of test cases. # - # source://minitest//lib/minitest.rb#755 + # source://minitest//lib/minitest.rb#769 def count=(_arg0); end # Total number of tests that erred. # - # source://minitest//lib/minitest.rb#783 + # source://minitest//lib/minitest.rb#797 def errors; end # Total number of tests that erred. # - # source://minitest//lib/minitest.rb#783 + # source://minitest//lib/minitest.rb#797 def errors=(_arg0); end # Total number of tests that failed. # - # source://minitest//lib/minitest.rb#778 + # source://minitest//lib/minitest.rb#792 def failures; end # Total number of tests that failed. # - # source://minitest//lib/minitest.rb#778 + # source://minitest//lib/minitest.rb#792 def failures=(_arg0); end # @return [Boolean] # - # source://minitest//lib/minitest.rb#803 + # source://minitest//lib/minitest.rb#823 def passed?; end - # source://minitest//lib/minitest.rb#811 + # source://minitest//lib/minitest.rb#831 def record(result); end # Report on the tracked statistics. # - # source://minitest//lib/minitest.rb#821 + # source://minitest//lib/minitest.rb#841 def report; end # An +Array+ of test cases that failed or were skipped. # - # source://minitest//lib/minitest.rb#760 + # source://minitest//lib/minitest.rb#774 def results; end # An +Array+ of test cases that failed or were skipped. # - # source://minitest//lib/minitest.rb#760 + # source://minitest//lib/minitest.rb#774 def results=(_arg0); end # Total number of tests that where skipped. # - # source://minitest//lib/minitest.rb#788 + # source://minitest//lib/minitest.rb#807 def skips; end # Total number of tests that where skipped. # - # source://minitest//lib/minitest.rb#788 + # source://minitest//lib/minitest.rb#807 def skips=(_arg0); end - # source://minitest//lib/minitest.rb#807 + # source://minitest//lib/minitest.rb#827 def start; end # Time the test run started. If available, the monotonic clock is # used and this is a +Float+, otherwise it's an instance of # +Time+. # - # source://minitest//lib/minitest.rb#767 + # source://minitest//lib/minitest.rb#781 def start_time; end # Time the test run started. If available, the monotonic clock is # used and this is a +Float+, otherwise it's an instance of # +Time+. # - # source://minitest//lib/minitest.rb#767 + # source://minitest//lib/minitest.rb#781 def start_time=(_arg0); end # Test run time. If available, the monotonic clock is used and # this is a +Float+, otherwise it's an instance of +Time+. # - # source://minitest//lib/minitest.rb#773 + # source://minitest//lib/minitest.rb#787 def total_time; end # Test run time. If available, the monotonic clock is used and # this is a +Float+, otherwise it's an instance of +Time+. # - # source://minitest//lib/minitest.rb#773 + # source://minitest//lib/minitest.rb#787 def total_time=(_arg0); end + + # Total number of tests that warned. + # + # source://minitest//lib/minitest.rb#802 + def warnings; end + + # Total number of tests that warned. + # + # source://minitest//lib/minitest.rb#802 + def warnings=(_arg0); end end # A reporter that prints the header, summary, and failure details at @@ -1280,48 +1290,48 @@ end # plugin, pull this out of the composite and replace it with your # own. # -# source://minitest//lib/minitest.rb#841 +# source://minitest//lib/minitest.rb#862 class Minitest::SummaryReporter < ::Minitest::StatisticsReporter - # source://minitest//lib/minitest.rb#876 + # source://minitest//lib/minitest.rb#897 def aggregated_results(io); end # Returns the value of attribute old_sync. # - # source://minitest//lib/minitest.rb#844 + # source://minitest//lib/minitest.rb#865 def old_sync; end # Sets the attribute old_sync # # @param value the value to set the attribute old_sync to. # - # source://minitest//lib/minitest.rb#844 + # source://minitest//lib/minitest.rb#865 def old_sync=(_arg0); end - # source://minitest//lib/minitest.rb#859 + # source://minitest//lib/minitest.rb#880 def report; end # :startdoc: # - # source://minitest//lib/minitest.rb#847 + # source://minitest//lib/minitest.rb#868 def start; end - # source://minitest//lib/minitest.rb#871 + # source://minitest//lib/minitest.rb#892 def statistics; end - # source://minitest//lib/minitest.rb#896 + # source://minitest//lib/minitest.rb#917 def summary; end # :stopdoc: # - # source://minitest//lib/minitest.rb#843 + # source://minitest//lib/minitest.rb#864 def sync; end # :stopdoc: # - # source://minitest//lib/minitest.rb#843 + # source://minitest//lib/minitest.rb#864 def sync=(_arg0); end - # source://minitest//lib/minitest.rb#892 + # source://minitest//lib/minitest.rb#913 def to_s; end end @@ -1503,37 +1513,45 @@ Minitest::Test::TEARDOWN_METHODS = T.let(T.unsafe(nil), Array) # Assertion wrapping an unexpected error that was raised during a run. # -# source://minitest//lib/minitest.rb#1001 +# source://minitest//lib/minitest.rb#1024 class Minitest::UnexpectedError < ::Minitest::Assertion include ::Minitest::Compress # @return [UnexpectedError] a new instance of UnexpectedError # - # source://minitest//lib/minitest.rb#1007 + # source://minitest//lib/minitest.rb#1030 def initialize(error); end - # source://minitest//lib/minitest.rb#1020 + # source://minitest//lib/minitest.rb#1043 def backtrace; end # TODO: figure out how to use `cause` instead # - # source://minitest//lib/minitest.rb#1005 + # source://minitest//lib/minitest.rb#1028 def error; end # TODO: figure out how to use `cause` instead # - # source://minitest//lib/minitest.rb#1005 + # source://minitest//lib/minitest.rb#1028 def error=(_arg0); end - # source://minitest//lib/minitest.rb#1026 + # source://minitest//lib/minitest.rb#1049 def message; end - # source://minitest//lib/minitest.rb#1032 + # source://minitest//lib/minitest.rb#1055 def result_label; end end -# source://minitest//lib/minitest.rb#1024 +# source://minitest//lib/minitest.rb#1047 Minitest::UnexpectedError::BASE_RE = T.let(T.unsafe(nil), Regexp) +# Assertion raised on warning when running in -Werror mode. +# +# source://minitest//lib/minitest.rb#1063 +class Minitest::UnexpectedWarning < ::Minitest::Assertion + # source://minitest//lib/minitest.rb#1064 + def result_label; end +end + # source://minitest//lib/minitest.rb#12 Minitest::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/mocha@2.2.0.rbi b/sorbet/rbi/gems/mocha@2.3.0.rbi similarity index 99% rename from sorbet/rbi/gems/mocha@2.2.0.rbi rename to sorbet/rbi/gems/mocha@2.3.0.rbi index 513b1ce56..9946b051e 100644 --- a/sorbet/rbi/gems/mocha@2.2.0.rbi +++ b/sorbet/rbi/gems/mocha@2.3.0.rbi @@ -3521,31 +3521,31 @@ class Mocha::ParameterMatchers::PositionalOrKeywordHash < ::Mocha::ParameterMatc # source://mocha//lib/mocha/parameter_matchers/positional_or_keyword_hash.rb#14 def matches?(available_parameters); end - # source://mocha//lib/mocha/parameter_matchers/positional_or_keyword_hash.rb#27 + # source://mocha//lib/mocha/parameter_matchers/positional_or_keyword_hash.rb#28 def mocha_inspect; end private - # source://mocha//lib/mocha/parameter_matchers/positional_or_keyword_hash.rb#41 + # source://mocha//lib/mocha/parameter_matchers/positional_or_keyword_hash.rb#42 def deprecation_warning(actual, expected); end - # source://mocha//lib/mocha/parameter_matchers/positional_or_keyword_hash.rb#57 + # source://mocha//lib/mocha/parameter_matchers/positional_or_keyword_hash.rb#58 def expectation_definition; end - # source://mocha//lib/mocha/parameter_matchers/positional_or_keyword_hash.rb#33 + # source://mocha//lib/mocha/parameter_matchers/positional_or_keyword_hash.rb#34 def extract_parameter(available_parameters); end - # source://mocha//lib/mocha/parameter_matchers/positional_or_keyword_hash.rb#49 + # source://mocha//lib/mocha/parameter_matchers/positional_or_keyword_hash.rb#50 def hash_type(hash); end # @return [Boolean] # - # source://mocha//lib/mocha/parameter_matchers/positional_or_keyword_hash.rb#53 + # source://mocha//lib/mocha/parameter_matchers/positional_or_keyword_hash.rb#54 def ruby2_keywords_hash?(hash); end # @return [Boolean] # - # source://mocha//lib/mocha/parameter_matchers/positional_or_keyword_hash.rb#37 + # source://mocha//lib/mocha/parameter_matchers/positional_or_keyword_hash.rb#38 def same_type_of_hash?(actual, expected); end end diff --git a/sorbet/rbi/gems/parser@3.3.1.0.rbi b/sorbet/rbi/gems/parser@3.3.2.0.rbi similarity index 100% rename from sorbet/rbi/gems/parser@3.3.1.0.rbi rename to sorbet/rbi/gems/parser@3.3.2.0.rbi diff --git a/sorbet/rbi/gems/prism@0.27.0.rbi b/sorbet/rbi/gems/prism@0.30.0.rbi similarity index 80% rename from sorbet/rbi/gems/prism@0.27.0.rbi rename to sorbet/rbi/gems/prism@0.30.0.rbi index 36267480b..bdf0292ca 100644 --- a/sorbet/rbi/gems/prism@0.27.0.rbi +++ b/sorbet/rbi/gems/prism@0.30.0.rbi @@ -17,18 +17,10 @@ # if you are looking to modify the template # =end -# We keep these shims in here because our client libraries might not have -# ast/parser in their bundle. -module AST; end - -class AST::Node; end - # We keep these shims in here because our client libraries might not have parser # in their bundle. module Parser; end -module Parser::AST; end -class Parser::AST::Node < AST::Node; end class Parser::Base; end # The Prism Ruby parser. @@ -57,7 +49,7 @@ module Prism # # For supported options, see Prism::parse. # - # source://prism//lib/prism.rb#47 + # 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 @@ -71,7 +63,7 @@ module Prism # returns the same tokens. Raises SyntaxError if the syntax in source is # invalid. # - # source://prism//lib/prism.rb#57 + # source://prism//lib/prism.rb#55 sig { params(source: String).returns(T::Array[T.untyped]) } def lex_ripper(source); end @@ -80,7 +72,7 @@ module Prism # # Load the serialized AST using the source as a reference into a tree. # - # source://prism//lib/prism.rb#65 + # source://prism//lib/prism.rb#63 sig { params(source: String, serialized: String).returns(Prism::ParseResult) } def load(source, serialized); end @@ -128,21 +120,66 @@ module Prism # # @return [Boolean] def parse_success?(*_arg0); end + + # Mirror the Prism.profile API by using the serialization API. + def profile(*_arg0); end + + # Mirror the Prism.profile_file API by using the serialization API. + def profile_file(*_arg0); end end end +# Specialized version of Prism::Source for source code that includes ASCII +# characters only. This class is used to apply performance optimizations that +# cannot be applied to sources that include multibyte characters. Sources that +# include multibyte characters are represented by the Prism::Source class. +# +# source://prism//lib/prism/parse_result.rb#126 +class Prism::ASCIISource < ::Prism::Source + # Return the column number in characters for the given byte offset. + # + # source://prism//lib/prism/parse_result.rb#133 + sig { params(byte_offset: Integer).returns(Integer) } + def character_column(byte_offset); end + + # Return the character offset for the given byte offset. + # + # source://prism//lib/prism/parse_result.rb#128 + sig { params(byte_offset: Integer).returns(Integer) } + def character_offset(byte_offset); end + + # Specialized version of `code_units_column` that does not depend on + # `code_units_offset`, which is a more expensive operation. This is + # essentialy the same as `Prism::Source#column`. + # + # source://prism//lib/prism/parse_result.rb#150 + sig { params(byte_offset: Integer, encoding: Encoding).returns(Integer) } + def code_units_column(byte_offset, encoding); end + + # Returns the offset from the start of the file for the given byte offset + # counting in code units for the given encoding. + # + # This method is tested with UTF-8, UTF-16, and UTF-32. If there is the + # concept of code units that differs from the number of characters in other + # encodings, it is not captured here. + # + # source://prism//lib/prism/parse_result.rb#143 + sig { params(byte_offset: Integer, encoding: Encoding).returns(Integer) } + def code_units_offset(byte_offset, encoding); end +end + # Represents the use of the `alias` keyword to alias a global variable. # # alias $foo $bar # ^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#135 +# source://prism//lib/prism/node.rb#176 class Prism::AliasGlobalVariableNode < ::Prism::Node # def initialize: (Prism::node new_name, Prism::node old_name, Location keyword_loc, Location location) -> void # # @return [AliasGlobalVariableNode] a new instance of AliasGlobalVariableNode # - # source://prism//lib/prism/node.rb#137 + # source://prism//lib/prism/node.rb#178 sig do params( source: Prism::Source, @@ -157,36 +194,36 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#247 + # source://prism//lib/prism/node.rb#281 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#147 + # source://prism//lib/prism/node.rb#187 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#152 + # source://prism//lib/prism/node.rb#192 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#162 + # source://prism//lib/prism/node.rb#202 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#157 + # source://prism//lib/prism/node.rb#197 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?new_name: Prism::node, ?old_name: Prism::node, ?keyword_loc: Location, ?location: Location) -> AliasGlobalVariableNode # - # source://prism//lib/prism/node.rb#167 + # source://prism//lib/prism/node.rb#207 sig do params( new_name: Prism::Node, @@ -200,28 +237,28 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#152 + # source://prism//lib/prism/node.rb#192 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { new_name: Prism::node, old_name: Prism::node, keyword_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#175 + # source://prism//lib/prism/node.rb#215 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#207 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#247 + sig { override.returns(String) } + def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#202 + # source://prism//lib/prism/node.rb#242 sig { returns(String) } def keyword; end @@ -230,7 +267,7 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # alias $foo $bar # ^^^^^ # - # source://prism//lib/prism/node.rb#195 + # source://prism//lib/prism/node.rb#235 sig { returns(Prism::Location) } def keyword_loc; end @@ -239,7 +276,7 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # alias $foo $bar # ^^^^ # - # source://prism//lib/prism/node.rb#183 + # source://prism//lib/prism/node.rb#223 sig { returns(Prism::Node) } def new_name; end @@ -248,7 +285,7 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # alias $foo $bar # ^^^^ # - # source://prism//lib/prism/node.rb#189 + # source://prism//lib/prism/node.rb#229 sig { returns(Prism::Node) } def old_name; end @@ -267,7 +304,7 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#231 + # source://prism//lib/prism/node.rb#265 sig { override.returns(Symbol) } def type; end @@ -279,7 +316,7 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#241 + # source://prism//lib/prism/node.rb#275 def type; end end end @@ -289,13 +326,13 @@ end # alias foo bar # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#259 +# source://prism//lib/prism/node.rb#293 class Prism::AliasMethodNode < ::Prism::Node # def initialize: (Prism::node new_name, Prism::node old_name, Location keyword_loc, Location location) -> void # # @return [AliasMethodNode] a new instance of AliasMethodNode # - # source://prism//lib/prism/node.rb#261 + # source://prism//lib/prism/node.rb#295 sig do params( source: Prism::Source, @@ -310,36 +347,36 @@ class Prism::AliasMethodNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#362 + # source://prism//lib/prism/node.rb#389 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#271 + # source://prism//lib/prism/node.rb#304 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#276 + # source://prism//lib/prism/node.rb#309 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#286 + # source://prism//lib/prism/node.rb#319 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#281 + # source://prism//lib/prism/node.rb#314 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?new_name: Prism::node, ?old_name: Prism::node, ?keyword_loc: Location, ?location: Location) -> AliasMethodNode # - # source://prism//lib/prism/node.rb#291 + # source://prism//lib/prism/node.rb#324 sig do params( new_name: Prism::Node, @@ -353,46 +390,46 @@ class Prism::AliasMethodNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#276 + # source://prism//lib/prism/node.rb#309 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { new_name: Prism::node, old_name: Prism::node, keyword_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#299 + # source://prism//lib/prism/node.rb#332 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#322 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#355 + sig { override.returns(String) } + def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#317 + # source://prism//lib/prism/node.rb#350 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#310 + # source://prism//lib/prism/node.rb#343 sig { returns(Prism::Location) } def keyword_loc; end # attr_reader new_name: Prism::node # - # source://prism//lib/prism/node.rb#304 + # source://prism//lib/prism/node.rb#337 sig { returns(Prism::Node) } def new_name; end # attr_reader old_name: Prism::node # - # source://prism//lib/prism/node.rb#307 + # source://prism//lib/prism/node.rb#340 sig { returns(Prism::Node) } def old_name; end @@ -411,7 +448,7 @@ class Prism::AliasMethodNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#346 + # source://prism//lib/prism/node.rb#373 sig { override.returns(Symbol) } def type; end @@ -423,7 +460,7 @@ class Prism::AliasMethodNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#356 + # source://prism//lib/prism/node.rb#383 def type; end end end @@ -433,13 +470,13 @@ end # foo => bar | baz # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#374 +# source://prism//lib/prism/node.rb#401 class Prism::AlternationPatternNode < ::Prism::Node # def initialize: (Prism::node left, Prism::node right, Location operator_loc, Location location) -> void # # @return [AlternationPatternNode] a new instance of AlternationPatternNode # - # source://prism//lib/prism/node.rb#376 + # source://prism//lib/prism/node.rb#403 sig do params( source: Prism::Source, @@ -454,36 +491,36 @@ class Prism::AlternationPatternNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#477 + # source://prism//lib/prism/node.rb#497 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#386 + # source://prism//lib/prism/node.rb#412 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#391 + # source://prism//lib/prism/node.rb#417 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#401 + # source://prism//lib/prism/node.rb#427 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#396 + # source://prism//lib/prism/node.rb#422 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?left: Prism::node, ?right: Prism::node, ?operator_loc: Location, ?location: Location) -> AlternationPatternNode # - # source://prism//lib/prism/node.rb#406 + # source://prism//lib/prism/node.rb#432 sig do params( left: Prism::Node, @@ -497,46 +534,46 @@ class Prism::AlternationPatternNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#391 + # source://prism//lib/prism/node.rb#417 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { left: Prism::node, right: Prism::node, operator_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#414 + # source://prism//lib/prism/node.rb#440 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#437 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#463 + sig { override.returns(String) } + def inspect; end # attr_reader left: Prism::node # - # source://prism//lib/prism/node.rb#419 + # source://prism//lib/prism/node.rb#445 sig { returns(Prism::Node) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#432 + # source://prism//lib/prism/node.rb#458 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#425 + # source://prism//lib/prism/node.rb#451 sig { returns(Prism::Location) } def operator_loc; end # attr_reader right: Prism::node # - # source://prism//lib/prism/node.rb#422 + # source://prism//lib/prism/node.rb#448 sig { returns(Prism::Node) } def right; end @@ -555,7 +592,7 @@ class Prism::AlternationPatternNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#461 + # source://prism//lib/prism/node.rb#481 sig { override.returns(Symbol) } def type; end @@ -567,7 +604,7 @@ class Prism::AlternationPatternNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#471 + # source://prism//lib/prism/node.rb#491 def type; end end end @@ -577,13 +614,13 @@ end # left and right # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#489 +# source://prism//lib/prism/node.rb#509 class Prism::AndNode < ::Prism::Node # def initialize: (Prism::node left, Prism::node right, Location operator_loc, Location location) -> void # # @return [AndNode] a new instance of AndNode # - # source://prism//lib/prism/node.rb#491 + # source://prism//lib/prism/node.rb#511 sig do params( source: Prism::Source, @@ -598,36 +635,36 @@ class Prism::AndNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#607 + # source://prism//lib/prism/node.rb#620 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#501 + # source://prism//lib/prism/node.rb#520 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#506 + # source://prism//lib/prism/node.rb#525 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#516 + # source://prism//lib/prism/node.rb#535 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#511 + # source://prism//lib/prism/node.rb#530 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?left: Prism::node, ?right: Prism::node, ?operator_loc: Location, ?location: Location) -> AndNode # - # source://prism//lib/prism/node.rb#521 + # source://prism//lib/prism/node.rb#540 sig do params( left: Prism::Node, @@ -641,24 +678,24 @@ class Prism::AndNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#506 + # source://prism//lib/prism/node.rb#525 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { left: Prism::node, right: Prism::node, operator_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#529 + # source://prism//lib/prism/node.rb#548 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#567 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#586 + 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). # @@ -668,13 +705,13 @@ class Prism::AndNode < ::Prism::Node # 1 && 2 # ^ # - # source://prism//lib/prism/node.rb#540 + # source://prism//lib/prism/node.rb#559 sig { returns(Prism::Node) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#562 + # source://prism//lib/prism/node.rb#581 sig { returns(String) } def operator; end @@ -683,7 +720,7 @@ class Prism::AndNode < ::Prism::Node # left and right # ^^^ # - # source://prism//lib/prism/node.rb#555 + # source://prism//lib/prism/node.rb#574 sig { returns(Prism::Location) } def operator_loc; end @@ -695,7 +732,7 @@ class Prism::AndNode < ::Prism::Node # 1 and 2 # ^ # - # source://prism//lib/prism/node.rb#549 + # source://prism//lib/prism/node.rb#568 sig { returns(Prism::Node) } def right; end @@ -714,7 +751,7 @@ class Prism::AndNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#591 + # source://prism//lib/prism/node.rb#604 sig { override.returns(Symbol) } def type; end @@ -726,7 +763,7 @@ class Prism::AndNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#601 + # source://prism//lib/prism/node.rb#614 def type; end end end @@ -736,13 +773,13 @@ end # return foo, bar, baz # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#619 +# source://prism//lib/prism/node.rb#632 class Prism::ArgumentsNode < ::Prism::Node # def initialize: (Integer flags, Array[Prism::node] arguments, Location location) -> void # # @return [ArgumentsNode] a new instance of ArgumentsNode # - # source://prism//lib/prism/node.rb#621 + # source://prism//lib/prism/node.rb#634 sig do params( source: Prism::Source, @@ -756,36 +793,36 @@ class Prism::ArgumentsNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#713 + # source://prism//lib/prism/node.rb#726 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#630 + # source://prism//lib/prism/node.rb#642 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#667 + # source://prism//lib/prism/node.rb#679 sig { returns(T::Array[Prism::Node]) } def arguments; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#635 + # source://prism//lib/prism/node.rb#647 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#645 + # source://prism//lib/prism/node.rb#657 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#640 + # source://prism//lib/prism/node.rb#652 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end @@ -793,13 +830,21 @@ class Prism::ArgumentsNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#670 + # source://prism//lib/prism/node.rb#687 sig { returns(T::Boolean) } def contains_keyword_splat?; end + # def contains_keywords?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#682 + sig { returns(T::Boolean) } + def contains_keywords?; end + # def copy: (?flags: Integer, ?arguments: Array[Prism::node], ?location: Location) -> ArgumentsNode # - # source://prism//lib/prism/node.rb#650 + # source://prism//lib/prism/node.rb#662 sig do params( flags: Integer, @@ -812,24 +857,24 @@ class Prism::ArgumentsNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#635 + # source://prism//lib/prism/node.rb#647 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, arguments: Array[Prism::node], location: Location } # - # source://prism//lib/prism/node.rb#658 + # source://prism//lib/prism/node.rb#670 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#675 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#692 + sig { override.returns(String) } + def inspect; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by @@ -846,7 +891,7 @@ class Prism::ArgumentsNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#697 + # source://prism//lib/prism/node.rb#710 sig { override.returns(Symbol) } def type; end @@ -854,7 +899,7 @@ class Prism::ArgumentsNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#663 + # source://prism//lib/prism/node.rb#675 sig { returns(Integer) } def flags; end @@ -866,19 +911,24 @@ class Prism::ArgumentsNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#707 + # source://prism//lib/prism/node.rb#720 def type; end end end # Flags for arguments nodes. # -# source://prism//lib/prism/node.rb#20337 +# source://prism//lib/prism/node.rb#19127 module Prism::ArgumentsNodeFlags; end +# if arguments contain keywords +# +# source://prism//lib/prism/node.rb#19129 +Prism::ArgumentsNodeFlags::CONTAINS_KEYWORDS = T.let(T.unsafe(nil), Integer) + # if arguments contain keyword splat # -# source://prism//lib/prism/node.rb#20339 +# source://prism//lib/prism/node.rb#19132 Prism::ArgumentsNodeFlags::CONTAINS_KEYWORD_SPLAT = T.let(T.unsafe(nil), Integer) # Represents an array literal. This can be a regular array using brackets or a special array using % like %w or %i. @@ -886,13 +936,13 @@ Prism::ArgumentsNodeFlags::CONTAINS_KEYWORD_SPLAT = T.let(T.unsafe(nil), Integer # [1, 2, 3] # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#725 +# source://prism//lib/prism/node.rb#738 class Prism::ArrayNode < ::Prism::Node # def initialize: (Integer flags, Array[Prism::node] elements, Location? opening_loc, Location? closing_loc, Location location) -> void # # @return [ArrayNode] a new instance of ArrayNode # - # source://prism//lib/prism/node.rb#727 + # source://prism//lib/prism/node.rb#740 sig do params( source: Prism::Source, @@ -908,24 +958,24 @@ class Prism::ArrayNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#869 + # source://prism//lib/prism/node.rb#875 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#738 + # source://prism//lib/prism/node.rb#750 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#743 + # source://prism//lib/prism/node.rb#755 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#824 + # source://prism//lib/prism/node.rb#836 sig { returns(T.nilable(String)) } def closing; end @@ -936,19 +986,19 @@ class Prism::ArrayNode < ::Prism::Node # %I(apple orange banana) # ")" # foo = 1, 2, 3 # nil # - # source://prism//lib/prism/node.rb#801 + # source://prism//lib/prism/node.rb#813 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#753 + # source://prism//lib/prism/node.rb#765 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#748 + # source://prism//lib/prism/node.rb#760 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end @@ -956,13 +1006,13 @@ class Prism::ArrayNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#814 + # source://prism//lib/prism/node.rb#826 sig { returns(T::Boolean) } def contains_splat?; end # def copy: (?flags: Integer, ?elements: Array[Prism::node], ?opening_loc: Location?, ?closing_loc: Location?, ?location: Location) -> ArrayNode # - # source://prism//lib/prism/node.rb#758 + # source://prism//lib/prism/node.rb#770 sig do params( flags: Integer, @@ -977,34 +1027,34 @@ class Prism::ArrayNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#743 + # source://prism//lib/prism/node.rb#755 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, elements: Array[Prism::node], opening_loc: Location?, closing_loc: Location?, location: Location } # - # source://prism//lib/prism/node.rb#766 + # source://prism//lib/prism/node.rb#778 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#775 + # source://prism//lib/prism/node.rb#787 sig { returns(T::Array[Prism::Node]) } def elements; end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#829 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#841 + sig { override.returns(String) } + def inspect; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#819 + # source://prism//lib/prism/node.rb#831 sig { returns(T.nilable(String)) } def opening; end @@ -1015,7 +1065,7 @@ class Prism::ArrayNode < ::Prism::Node # %I(apple orange banana) # "%I(" # foo = 1, 2, 3 # nil # - # source://prism//lib/prism/node.rb#783 + # source://prism//lib/prism/node.rb#795 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end @@ -1034,7 +1084,7 @@ class Prism::ArrayNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#853 + # source://prism//lib/prism/node.rb#859 sig { override.returns(Symbol) } def type; end @@ -1042,7 +1092,7 @@ class Prism::ArrayNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#771 + # source://prism//lib/prism/node.rb#783 sig { returns(Integer) } def flags; end @@ -1054,19 +1104,19 @@ class Prism::ArrayNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#863 + # source://prism//lib/prism/node.rb#869 def type; end end end # Flags for array nodes. # -# source://prism//lib/prism/node.rb#20343 +# source://prism//lib/prism/node.rb#19136 module Prism::ArrayNodeFlags; end # if array contains splat nodes # -# source://prism//lib/prism/node.rb#20345 +# source://prism//lib/prism/node.rb#19138 Prism::ArrayNodeFlags::CONTAINS_SPLAT = T.let(T.unsafe(nil), Integer) # Represents an array pattern in pattern matching. @@ -1086,13 +1136,13 @@ Prism::ArrayNodeFlags::CONTAINS_SPLAT = T.let(T.unsafe(nil), Integer) # foo in Bar[1, 2, 3] # ^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#895 +# source://prism//lib/prism/node.rb#901 class Prism::ArrayPatternNode < ::Prism::Node # def initialize: (Prism::node? constant, Array[Prism::node] requireds, Prism::node? rest, Array[Prism::node] posts, Location? opening_loc, Location? closing_loc, Location location) -> void # # @return [ArrayPatternNode] a new instance of ArrayPatternNode # - # source://prism//lib/prism/node.rb#897 + # source://prism//lib/prism/node.rb#903 sig do params( source: Prism::Source, @@ -1110,54 +1160,54 @@ class Prism::ArrayPatternNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#1047 + # source://prism//lib/prism/node.rb#1035 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#910 + # source://prism//lib/prism/node.rb#915 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#915 + # source://prism//lib/prism/node.rb#920 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#991 + # source://prism//lib/prism/node.rb#996 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#973 + # source://prism//lib/prism/node.rb#978 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#930 + # source://prism//lib/prism/node.rb#935 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#920 + # source://prism//lib/prism/node.rb#925 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader constant: Prism::node? # - # source://prism//lib/prism/node.rb#948 + # source://prism//lib/prism/node.rb#953 sig { returns(T.nilable(Prism::Node)) } def constant; end # def copy: (?constant: Prism::node?, ?requireds: Array[Prism::node], ?rest: Prism::node?, ?posts: Array[Prism::node], ?opening_loc: Location?, ?closing_loc: Location?, ?location: Location) -> ArrayPatternNode # - # source://prism//lib/prism/node.rb#935 + # source://prism//lib/prism/node.rb#940 sig do params( constant: T.nilable(Prism::Node), @@ -1174,52 +1224,52 @@ class Prism::ArrayPatternNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#915 + # source://prism//lib/prism/node.rb#920 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { constant: Prism::node?, requireds: Array[Prism::node], rest: Prism::node?, posts: Array[Prism::node], opening_loc: Location?, closing_loc: Location?, location: Location } # - # source://prism//lib/prism/node.rb#943 + # source://prism//lib/prism/node.rb#948 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#996 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#1001 + sig { override.returns(String) } + def inspect; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#986 + # source://prism//lib/prism/node.rb#991 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#960 + # source://prism//lib/prism/node.rb#965 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader posts: Array[Prism::node] # - # source://prism//lib/prism/node.rb#957 + # source://prism//lib/prism/node.rb#962 sig { returns(T::Array[Prism::Node]) } def posts; end # attr_reader requireds: Array[Prism::node] # - # source://prism//lib/prism/node.rb#951 + # source://prism//lib/prism/node.rb#956 sig { returns(T::Array[Prism::Node]) } def requireds; end # attr_reader rest: Prism::node? # - # source://prism//lib/prism/node.rb#954 + # source://prism//lib/prism/node.rb#959 sig { returns(T.nilable(Prism::Node)) } def rest; end @@ -1238,7 +1288,7 @@ class Prism::ArrayPatternNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#1031 + # source://prism//lib/prism/node.rb#1019 sig { override.returns(Symbol) } def type; end @@ -1250,7 +1300,7 @@ class Prism::ArrayPatternNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#1041 + # source://prism//lib/prism/node.rb#1029 def type; end end end @@ -1260,13 +1310,13 @@ end # { a => b } # ^^^^^^ # -# source://prism//lib/prism/node.rb#1064 +# source://prism//lib/prism/node.rb#1052 class Prism::AssocNode < ::Prism::Node # def initialize: (Prism::node key, Prism::node value, Location? operator_loc, Location location) -> void # # @return [AssocNode] a new instance of AssocNode # - # source://prism//lib/prism/node.rb#1066 + # source://prism//lib/prism/node.rb#1054 sig do params( source: Prism::Source, @@ -1281,36 +1331,36 @@ class Prism::AssocNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#1191 + # source://prism//lib/prism/node.rb#1172 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1076 + # source://prism//lib/prism/node.rb#1063 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#1081 + # source://prism//lib/prism/node.rb#1068 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1091 + # source://prism//lib/prism/node.rb#1078 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1086 + # source://prism//lib/prism/node.rb#1073 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?key: Prism::node, ?value: Prism::node, ?operator_loc: Location?, ?location: Location) -> AssocNode # - # source://prism//lib/prism/node.rb#1096 + # source://prism//lib/prism/node.rb#1083 sig do params( key: Prism::Node, @@ -1324,24 +1374,24 @@ class Prism::AssocNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1081 + # source://prism//lib/prism/node.rb#1068 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { key: Prism::node, value: Prism::node, operator_loc: Location?, location: Location } # - # source://prism//lib/prism/node.rb#1104 + # source://prism//lib/prism/node.rb#1091 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#1151 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#1138 + 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). # @@ -1354,13 +1404,13 @@ class Prism::AssocNode < ::Prism::Node # { def a; end => 1 } # ^^^^^^^^^^ # - # source://prism//lib/prism/node.rb#1118 + # source://prism//lib/prism/node.rb#1105 sig { returns(Prism::Node) } def key; end # def operator: () -> String? # - # source://prism//lib/prism/node.rb#1146 + # source://prism//lib/prism/node.rb#1133 sig { returns(T.nilable(String)) } def operator; end @@ -1369,7 +1419,7 @@ class Prism::AssocNode < ::Prism::Node # { foo => bar } # ^^ # - # source://prism//lib/prism/node.rb#1133 + # source://prism//lib/prism/node.rb#1120 sig { returns(T.nilable(Prism::Location)) } def operator_loc; end @@ -1388,7 +1438,7 @@ class Prism::AssocNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#1175 + # source://prism//lib/prism/node.rb#1156 sig { override.returns(Symbol) } def type; end @@ -1400,7 +1450,7 @@ class Prism::AssocNode < ::Prism::Node # { x: 1 } # ^ # - # source://prism//lib/prism/node.rb#1127 + # source://prism//lib/prism/node.rb#1114 sig { returns(Prism::Node) } def value; end @@ -1412,7 +1462,7 @@ class Prism::AssocNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#1185 + # source://prism//lib/prism/node.rb#1166 def type; end end end @@ -1422,13 +1472,13 @@ end # { **foo } # ^^^^^ # -# source://prism//lib/prism/node.rb#1203 +# source://prism//lib/prism/node.rb#1184 class Prism::AssocSplatNode < ::Prism::Node # def initialize: (Prism::node? value, Location operator_loc, Location location) -> void # # @return [AssocSplatNode] a new instance of AssocSplatNode # - # source://prism//lib/prism/node.rb#1205 + # source://prism//lib/prism/node.rb#1186 sig do params( source: Prism::Source, @@ -1442,36 +1492,36 @@ class Prism::AssocSplatNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#1312 + # source://prism//lib/prism/node.rb#1284 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1214 + # source://prism//lib/prism/node.rb#1194 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#1219 + # source://prism//lib/prism/node.rb#1199 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1231 + # source://prism//lib/prism/node.rb#1211 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1224 + # source://prism//lib/prism/node.rb#1204 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?value: Prism::node?, ?operator_loc: Location, ?location: Location) -> AssocSplatNode # - # source://prism//lib/prism/node.rb#1236 + # source://prism//lib/prism/node.rb#1216 sig do params( value: T.nilable(Prism::Node), @@ -1484,28 +1534,28 @@ class Prism::AssocSplatNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1219 + # source://prism//lib/prism/node.rb#1199 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::node?, operator_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#1244 + # source://prism//lib/prism/node.rb#1224 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#1270 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#1250 + sig { override.returns(String) } + def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#1265 + # source://prism//lib/prism/node.rb#1245 sig { returns(String) } def operator; end @@ -1514,7 +1564,7 @@ class Prism::AssocSplatNode < ::Prism::Node # { **x } # ^^ # - # source://prism//lib/prism/node.rb#1258 + # source://prism//lib/prism/node.rb#1238 sig { returns(Prism::Location) } def operator_loc; end @@ -1533,7 +1583,7 @@ class Prism::AssocSplatNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#1296 + # source://prism//lib/prism/node.rb#1268 sig { override.returns(Symbol) } def type; end @@ -1542,7 +1592,7 @@ class Prism::AssocSplatNode < ::Prism::Node # { **foo } # ^^^ # - # source://prism//lib/prism/node.rb#1252 + # source://prism//lib/prism/node.rb#1232 sig { returns(T.nilable(Prism::Node)) } def value; end @@ -1554,14 +1604,14 @@ class Prism::AssocSplatNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#1306 + # source://prism//lib/prism/node.rb#1278 def type; end end end # The FFI backend is used on other Ruby implementations. # -# source://prism//lib/prism.rb#84 +# 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. @@ -1569,73 +1619,73 @@ Prism::BACKEND = T.let(T.unsafe(nil), Symbol) # $' # ^^ # -# source://prism//lib/prism/node.rb#1323 +# source://prism//lib/prism/node.rb#1295 class Prism::BackReferenceReadNode < ::Prism::Node # def initialize: (Symbol name, Location location) -> void # # @return [BackReferenceReadNode] a new instance of BackReferenceReadNode # - # source://prism//lib/prism/node.rb#1325 + # source://prism//lib/prism/node.rb#1297 sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } def initialize(source, name, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#1409 + # source://prism//lib/prism/node.rb#1378 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1333 + # source://prism//lib/prism/node.rb#1304 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#1338 + # source://prism//lib/prism/node.rb#1309 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1348 + # source://prism//lib/prism/node.rb#1319 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1343 + # source://prism//lib/prism/node.rb#1314 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?location: Location) -> BackReferenceReadNode # - # source://prism//lib/prism/node.rb#1353 + # source://prism//lib/prism/node.rb#1324 sig { params(name: Symbol, location: Prism::Location).returns(Prism::BackReferenceReadNode) } def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1338 + # source://prism//lib/prism/node.rb#1309 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } # - # source://prism//lib/prism/node.rb#1361 + # source://prism//lib/prism/node.rb#1332 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#1373 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#1344 + sig { override.returns(String) } + def inspect; end # The name of the back-reference variable, including the leading `$`. # @@ -1643,7 +1693,7 @@ class Prism::BackReferenceReadNode < ::Prism::Node # # $+ # name `:$+` # - # source://prism//lib/prism/node.rb#1370 + # source://prism//lib/prism/node.rb#1341 sig { returns(Symbol) } def name; end @@ -1662,7 +1712,7 @@ class Prism::BackReferenceReadNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#1393 + # source://prism//lib/prism/node.rb#1362 sig { override.returns(Symbol) } def type; end @@ -1674,7 +1724,7 @@ class Prism::BackReferenceReadNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#1403 + # source://prism//lib/prism/node.rb#1372 def type; end end end @@ -1713,13 +1763,13 @@ end # end # ^^^^^ # -# source://prism//lib/prism/node.rb#1421 +# source://prism//lib/prism/node.rb#1390 class Prism::BeginNode < ::Prism::Node # def initialize: (Location? begin_keyword_loc, StatementsNode? statements, RescueNode? rescue_clause, ElseNode? else_clause, EnsureNode? ensure_clause, Location? end_keyword_loc, Location location) -> void # # @return [BeginNode] a new instance of BeginNode # - # source://prism//lib/prism/node.rb#1423 + # source://prism//lib/prism/node.rb#1392 sig do params( source: Prism::Source, @@ -1737,48 +1787,48 @@ class Prism::BeginNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#1587 + # source://prism//lib/prism/node.rb#1524 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1436 + # source://prism//lib/prism/node.rb#1404 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def begin_keyword: () -> String? # - # source://prism//lib/prism/node.rb#1516 + # source://prism//lib/prism/node.rb#1480 sig { returns(T.nilable(String)) } def begin_keyword; end # attr_reader begin_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#1478 + # source://prism//lib/prism/node.rb#1442 sig { returns(T.nilable(Prism::Location)) } def begin_keyword_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1445 + # source://prism//lib/prism/node.rb#1409 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1460 + # source://prism//lib/prism/node.rb#1424 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1450 + # source://prism//lib/prism/node.rb#1414 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?begin_keyword_loc: Location?, ?statements: StatementsNode?, ?rescue_clause: RescueNode?, ?else_clause: ElseNode?, ?ensure_clause: EnsureNode?, ?end_keyword_loc: Location?, ?location: Location) -> BeginNode # - # source://prism//lib/prism/node.rb#1465 + # source://prism//lib/prism/node.rb#1429 sig do params( begin_keyword_loc: T.nilable(Prism::Location), @@ -1795,61 +1845,61 @@ class Prism::BeginNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1445 + # source://prism//lib/prism/node.rb#1409 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { begin_keyword_loc: Location?, statements: StatementsNode?, rescue_clause: RescueNode?, else_clause: ElseNode?, ensure_clause: EnsureNode?, end_keyword_loc: Location?, location: Location } # - # source://prism//lib/prism/node.rb#1473 + # source://prism//lib/prism/node.rb#1437 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#1497 + # source://prism//lib/prism/node.rb#1461 sig { returns(T.nilable(Prism::ElseNode)) } def else_clause; end # def end_keyword: () -> String? # - # source://prism//lib/prism/node.rb#1521 + # source://prism//lib/prism/node.rb#1485 sig { returns(T.nilable(String)) } def end_keyword; end # attr_reader end_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#1503 + # source://prism//lib/prism/node.rb#1467 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end # attr_reader ensure_clause: EnsureNode? # - # source://prism//lib/prism/node.rb#1500 + # source://prism//lib/prism/node.rb#1464 sig { returns(T.nilable(Prism::EnsureNode)) } def ensure_clause; end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#1526 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#1490 + sig { override.returns(String) } + def inspect; end + + # source://prism//lib/prism/parse_result/newlines.rb#79 + def newline!(lines); end # attr_reader rescue_clause: RescueNode? # - # source://prism//lib/prism/node.rb#1494 + # source://prism//lib/prism/node.rb#1458 sig { returns(T.nilable(Prism::RescueNode)) } def rescue_clause; end - # source://prism//lib/prism/node.rb#1440 - def set_newline_flag(newline_marked); end - # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#1491 + # source://prism//lib/prism/node.rb#1455 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -1868,7 +1918,7 @@ class Prism::BeginNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#1571 + # source://prism//lib/prism/node.rb#1508 sig { override.returns(Symbol) } def type; end @@ -1880,7 +1930,7 @@ class Prism::BeginNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#1581 + # source://prism//lib/prism/node.rb#1518 def type; end end end @@ -1890,13 +1940,13 @@ end # bar(&args) # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#1602 +# source://prism//lib/prism/node.rb#1539 class Prism::BlockArgumentNode < ::Prism::Node # def initialize: (Prism::node? expression, Location operator_loc, Location location) -> void # # @return [BlockArgumentNode] a new instance of BlockArgumentNode # - # source://prism//lib/prism/node.rb#1604 + # source://prism//lib/prism/node.rb#1541 sig do params( source: Prism::Source, @@ -1910,36 +1960,36 @@ class Prism::BlockArgumentNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#1705 + # source://prism//lib/prism/node.rb#1633 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1613 + # source://prism//lib/prism/node.rb#1549 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#1618 + # source://prism//lib/prism/node.rb#1554 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1630 + # source://prism//lib/prism/node.rb#1566 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1623 + # source://prism//lib/prism/node.rb#1559 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?expression: Prism::node?, ?operator_loc: Location, ?location: Location) -> BlockArgumentNode # - # source://prism//lib/prism/node.rb#1635 + # source://prism//lib/prism/node.rb#1571 sig do params( expression: T.nilable(Prism::Node), @@ -1952,40 +2002,40 @@ class Prism::BlockArgumentNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1618 + # source://prism//lib/prism/node.rb#1554 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { expression: Prism::node?, operator_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#1643 + # source://prism//lib/prism/node.rb#1579 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#1648 + # source://prism//lib/prism/node.rb#1584 sig { returns(T.nilable(Prism::Node)) } def expression; end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#1663 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#1599 + sig { override.returns(String) } + def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#1658 + # source://prism//lib/prism/node.rb#1594 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#1651 + # source://prism//lib/prism/node.rb#1587 sig { returns(Prism::Location) } def operator_loc; end @@ -2004,7 +2054,7 @@ class Prism::BlockArgumentNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#1689 + # source://prism//lib/prism/node.rb#1617 sig { override.returns(Symbol) } def type; end @@ -2016,7 +2066,7 @@ class Prism::BlockArgumentNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#1699 + # source://prism//lib/prism/node.rb#1627 def type; end end end @@ -2026,77 +2076,77 @@ end # a { |; b| } # ^ # -# source://prism//lib/prism/node.rb#1716 +# source://prism//lib/prism/node.rb#1644 class Prism::BlockLocalVariableNode < ::Prism::Node # def initialize: (Integer flags, Symbol name, Location location) -> void # # @return [BlockLocalVariableNode] a new instance of BlockLocalVariableNode # - # source://prism//lib/prism/node.rb#1718 + # source://prism//lib/prism/node.rb#1646 sig { params(source: Prism::Source, flags: Integer, name: Symbol, location: Prism::Location).void } def initialize(source, flags, name, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#1810 + # source://prism//lib/prism/node.rb#1733 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1727 + # source://prism//lib/prism/node.rb#1654 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#1732 + # source://prism//lib/prism/node.rb#1659 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1742 + # source://prism//lib/prism/node.rb#1669 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1737 + # source://prism//lib/prism/node.rb#1664 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?name: Symbol, ?location: Location) -> BlockLocalVariableNode # - # source://prism//lib/prism/node.rb#1747 + # source://prism//lib/prism/node.rb#1674 sig { params(flags: Integer, name: Symbol, location: Prism::Location).returns(Prism::BlockLocalVariableNode) } def copy(flags: T.unsafe(nil), name: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1732 + # source://prism//lib/prism/node.rb#1659 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, location: Location } # - # source://prism//lib/prism/node.rb#1755 + # source://prism//lib/prism/node.rb#1682 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#1772 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#1699 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#1764 + # source://prism//lib/prism/node.rb#1691 sig { returns(Symbol) } def name; end @@ -2104,7 +2154,7 @@ class Prism::BlockLocalVariableNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#1767 + # source://prism//lib/prism/node.rb#1694 sig { returns(T::Boolean) } def repeated_parameter?; end @@ -2123,7 +2173,7 @@ class Prism::BlockLocalVariableNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#1794 + # source://prism//lib/prism/node.rb#1717 sig { override.returns(Symbol) } def type; end @@ -2131,7 +2181,7 @@ class Prism::BlockLocalVariableNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#1760 + # source://prism//lib/prism/node.rb#1687 sig { returns(Integer) } def flags; end @@ -2143,7 +2193,7 @@ class Prism::BlockLocalVariableNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#1804 + # source://prism//lib/prism/node.rb#1727 def type; end end end @@ -2153,13 +2203,13 @@ end # [1, 2, 3].each { |i| puts x } # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#1821 +# source://prism//lib/prism/node.rb#1744 class Prism::BlockNode < ::Prism::Node # def initialize: (Array[Symbol] locals, Prism::node? parameters, Prism::node? body, Location opening_loc, Location closing_loc, Location location) -> void # # @return [BlockNode] a new instance of BlockNode # - # source://prism//lib/prism/node.rb#1823 + # source://prism//lib/prism/node.rb#1746 sig do params( source: Prism::Source, @@ -2176,54 +2226,54 @@ class Prism::BlockNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#1954 + # source://prism//lib/prism/node.rb#1860 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1835 + # source://prism//lib/prism/node.rb#1757 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: Prism::node? # - # source://prism//lib/prism/node.rb#1877 + # source://prism//lib/prism/node.rb#1799 sig { returns(T.nilable(Prism::Node)) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1840 + # source://prism//lib/prism/node.rb#1762 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#1899 + # source://prism//lib/prism/node.rb#1821 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#1887 + # source://prism//lib/prism/node.rb#1809 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1853 + # source://prism//lib/prism/node.rb#1775 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1845 + # source://prism//lib/prism/node.rb#1767 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?locals: Array[Symbol], ?parameters: Prism::node?, ?body: Prism::node?, ?opening_loc: Location, ?closing_loc: Location, ?location: Location) -> BlockNode # - # source://prism//lib/prism/node.rb#1858 + # source://prism//lib/prism/node.rb#1780 sig do params( locals: T::Array[Symbol], @@ -2239,46 +2289,46 @@ class Prism::BlockNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1840 + # source://prism//lib/prism/node.rb#1762 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], parameters: Prism::node?, body: Prism::node?, opening_loc: Location, closing_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#1866 + # source://prism//lib/prism/node.rb#1788 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#1904 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#1826 + sig { override.returns(String) } + def inspect; end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#1871 + # source://prism//lib/prism/node.rb#1793 sig { returns(T::Array[Symbol]) } def locals; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#1894 + # source://prism//lib/prism/node.rb#1816 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#1880 + # source://prism//lib/prism/node.rb#1802 sig { returns(Prism::Location) } def opening_loc; end # attr_reader parameters: Prism::node? # - # source://prism//lib/prism/node.rb#1874 + # source://prism//lib/prism/node.rb#1796 sig { returns(T.nilable(Prism::Node)) } def parameters; end @@ -2297,7 +2347,7 @@ class Prism::BlockNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#1938 + # source://prism//lib/prism/node.rb#1844 sig { override.returns(Symbol) } def type; end @@ -2309,7 +2359,7 @@ class Prism::BlockNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#1948 + # source://prism//lib/prism/node.rb#1854 def type; end end end @@ -2320,13 +2370,13 @@ end # ^^ # end # -# source://prism//lib/prism/node.rb#1970 +# source://prism//lib/prism/node.rb#1876 class Prism::BlockParameterNode < ::Prism::Node # def initialize: (Integer flags, Symbol? name, Location? name_loc, Location operator_loc, Location location) -> void # # @return [BlockParameterNode] a new instance of BlockParameterNode # - # source://prism//lib/prism/node.rb#1972 + # source://prism//lib/prism/node.rb#1878 sig do params( source: Prism::Source, @@ -2342,36 +2392,36 @@ class Prism::BlockParameterNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#2097 + # source://prism//lib/prism/node.rb#1992 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1983 + # source://prism//lib/prism/node.rb#1888 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#1988 + # source://prism//lib/prism/node.rb#1893 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1998 + # source://prism//lib/prism/node.rb#1903 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1993 + # source://prism//lib/prism/node.rb#1898 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location, ?location: Location) -> BlockParameterNode # - # source://prism//lib/prism/node.rb#2003 + # source://prism//lib/prism/node.rb#1908 sig do params( flags: Integer, @@ -2386,46 +2436,46 @@ class Prism::BlockParameterNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1988 + # source://prism//lib/prism/node.rb#1893 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#2011 + # source://prism//lib/prism/node.rb#1916 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#2053 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#1958 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol? # - # source://prism//lib/prism/node.rb#2020 + # source://prism//lib/prism/node.rb#1925 sig { returns(T.nilable(Symbol)) } def name; end # attr_reader name_loc: Location? # - # source://prism//lib/prism/node.rb#2023 + # source://prism//lib/prism/node.rb#1928 sig { returns(T.nilable(Prism::Location)) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#2048 + # source://prism//lib/prism/node.rb#1953 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#2036 + # source://prism//lib/prism/node.rb#1941 sig { returns(Prism::Location) } def operator_loc; end @@ -2433,7 +2483,7 @@ class Prism::BlockParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2043 + # source://prism//lib/prism/node.rb#1948 sig { returns(T::Boolean) } def repeated_parameter?; end @@ -2452,7 +2502,7 @@ class Prism::BlockParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#2081 + # source://prism//lib/prism/node.rb#1976 sig { override.returns(Symbol) } def type; end @@ -2460,7 +2510,7 @@ class Prism::BlockParameterNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#2016 + # source://prism//lib/prism/node.rb#1921 sig { returns(Integer) } def flags; end @@ -2472,7 +2522,7 @@ class Prism::BlockParameterNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#2091 + # source://prism//lib/prism/node.rb#1986 def type; end end end @@ -2486,13 +2536,13 @@ end # ^^^^^^^^^^^^^^^^^ # end # -# source://prism//lib/prism/node.rb#2114 +# source://prism//lib/prism/node.rb#2009 class Prism::BlockParametersNode < ::Prism::Node # def initialize: (ParametersNode? parameters, Array[BlockLocalVariableNode] locals, Location? opening_loc, Location? closing_loc, Location location) -> void # # @return [BlockParametersNode] a new instance of BlockParametersNode # - # source://prism//lib/prism/node.rb#2116 + # source://prism//lib/prism/node.rb#2011 sig do params( source: Prism::Source, @@ -2508,48 +2558,48 @@ class Prism::BlockParametersNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#2249 + # source://prism//lib/prism/node.rb#2133 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2127 + # source://prism//lib/prism/node.rb#2021 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#2132 + # source://prism//lib/prism/node.rb#2026 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#2200 + # source://prism//lib/prism/node.rb#2094 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#2182 + # source://prism//lib/prism/node.rb#2076 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#2145 + # source://prism//lib/prism/node.rb#2039 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#2137 + # source://prism//lib/prism/node.rb#2031 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?parameters: ParametersNode?, ?locals: Array[BlockLocalVariableNode], ?opening_loc: Location?, ?closing_loc: Location?, ?location: Location) -> BlockParametersNode # - # source://prism//lib/prism/node.rb#2150 + # source://prism//lib/prism/node.rb#2044 sig do params( parameters: T.nilable(Prism::ParametersNode), @@ -2564,46 +2614,46 @@ class Prism::BlockParametersNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2132 + # source://prism//lib/prism/node.rb#2026 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { parameters: ParametersNode?, locals: Array[BlockLocalVariableNode], opening_loc: Location?, closing_loc: Location?, location: Location } # - # source://prism//lib/prism/node.rb#2158 + # source://prism//lib/prism/node.rb#2052 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#2205 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#2099 + sig { override.returns(String) } + def inspect; end # attr_reader locals: Array[BlockLocalVariableNode] # - # source://prism//lib/prism/node.rb#2166 + # source://prism//lib/prism/node.rb#2060 sig { returns(T::Array[Prism::BlockLocalVariableNode]) } def locals; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#2195 + # source://prism//lib/prism/node.rb#2089 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#2169 + # source://prism//lib/prism/node.rb#2063 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader parameters: ParametersNode? # - # source://prism//lib/prism/node.rb#2163 + # source://prism//lib/prism/node.rb#2057 sig { returns(T.nilable(Prism::ParametersNode)) } def parameters; end @@ -2622,7 +2672,7 @@ class Prism::BlockParametersNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#2233 + # source://prism//lib/prism/node.rb#2117 sig { override.returns(Symbol) } def type; end @@ -2634,7 +2684,7 @@ class Prism::BlockParametersNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#2243 + # source://prism//lib/prism/node.rb#2127 def type; end end end @@ -2644,13 +2694,13 @@ end # break foo # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#2263 +# source://prism//lib/prism/node.rb#2147 class Prism::BreakNode < ::Prism::Node # def initialize: (ArgumentsNode? arguments, Location keyword_loc, Location location) -> void # # @return [BreakNode] a new instance of BreakNode # - # source://prism//lib/prism/node.rb#2265 + # source://prism//lib/prism/node.rb#2149 sig do params( source: Prism::Source, @@ -2664,12 +2714,12 @@ class Prism::BreakNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#2372 + # source://prism//lib/prism/node.rb#2247 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2274 + # source://prism//lib/prism/node.rb#2157 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -2678,31 +2728,31 @@ class Prism::BreakNode < ::Prism::Node # break foo # ^^^ # - # source://prism//lib/prism/node.rb#2312 + # source://prism//lib/prism/node.rb#2195 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2279 + # source://prism//lib/prism/node.rb#2162 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#2291 + # source://prism//lib/prism/node.rb#2174 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#2284 + # source://prism//lib/prism/node.rb#2167 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?arguments: ArgumentsNode?, ?keyword_loc: Location, ?location: Location) -> BreakNode # - # source://prism//lib/prism/node.rb#2296 + # source://prism//lib/prism/node.rb#2179 sig do params( arguments: T.nilable(Prism::ArgumentsNode), @@ -2715,28 +2765,28 @@ class Prism::BreakNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2279 + # source://prism//lib/prism/node.rb#2162 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { arguments: ArgumentsNode?, keyword_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#2304 + # source://prism//lib/prism/node.rb#2187 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#2330 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#2213 + sig { override.returns(String) } + def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#2325 + # source://prism//lib/prism/node.rb#2208 sig { returns(String) } def keyword; end @@ -2745,7 +2795,7 @@ class Prism::BreakNode < ::Prism::Node # break foo # ^^^^^ # - # source://prism//lib/prism/node.rb#2318 + # source://prism//lib/prism/node.rb#2201 sig { returns(Prism::Location) } def keyword_loc; end @@ -2764,7 +2814,7 @@ class Prism::BreakNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#2356 + # source://prism//lib/prism/node.rb#2231 sig { override.returns(Symbol) } def type; end @@ -2776,7 +2826,7 @@ class Prism::BreakNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#2366 + # source://prism//lib/prism/node.rb#2241 def type; end end end @@ -2786,13 +2836,13 @@ end # foo.bar &&= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#2383 +# source://prism//lib/prism/node.rb#2258 class Prism::CallAndWriteNode < ::Prism::Node # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location? message_loc, Symbol read_name, Symbol write_name, Location operator_loc, Prism::node value, Location location) -> void # # @return [CallAndWriteNode] a new instance of CallAndWriteNode # - # source://prism//lib/prism/node.rb#2385 + # source://prism//lib/prism/node.rb#2260 sig do params( source: Prism::Source, @@ -2812,12 +2862,12 @@ class Prism::CallAndWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#2570 + # source://prism//lib/prism/node.rb#2428 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2400 + # source://prism//lib/prism/node.rb#2274 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -2825,43 +2875,43 @@ class Prism::CallAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2495 + # source://prism//lib/prism/node.rb#2369 sig { returns(T::Boolean) } def attribute_write?; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#2505 + # source://prism//lib/prism/node.rb#2379 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#2443 + # source://prism//lib/prism/node.rb#2317 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2405 + # source://prism//lib/prism/node.rb#2279 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#2418 + # source://prism//lib/prism/node.rb#2292 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#2410 + # source://prism//lib/prism/node.rb#2284 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> CallAndWriteNode # - # source://prism//lib/prism/node.rb#2423 + # source://prism//lib/prism/node.rb#2297 sig do params( flags: Integer, @@ -2880,13 +2930,13 @@ class Prism::CallAndWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2405 + # source://prism//lib/prism/node.rb#2279 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#2431 + # source://prism//lib/prism/node.rb#2305 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -2897,49 +2947,49 @@ class Prism::CallAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2500 + # source://prism//lib/prism/node.rb#2374 sig { returns(T::Boolean) } def ignore_visibility?; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#2520 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#2394 + sig { override.returns(String) } + def inspect; end # def message: () -> String? # - # source://prism//lib/prism/node.rb#2510 + # source://prism//lib/prism/node.rb#2384 sig { returns(T.nilable(String)) } def message; end # attr_reader message_loc: Location? # - # source://prism//lib/prism/node.rb#2456 + # source://prism//lib/prism/node.rb#2330 sig { returns(T.nilable(Prism::Location)) } def message_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#2515 + # source://prism//lib/prism/node.rb#2389 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#2475 + # source://prism//lib/prism/node.rb#2349 sig { returns(Prism::Location) } def operator_loc; end # attr_reader read_name: Symbol # - # source://prism//lib/prism/node.rb#2469 + # source://prism//lib/prism/node.rb#2343 sig { returns(Symbol) } def read_name; end # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#2440 + # source://prism//lib/prism/node.rb#2314 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -2947,7 +2997,7 @@ class Prism::CallAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2485 + # source://prism//lib/prism/node.rb#2359 sig { returns(T::Boolean) } def safe_navigation?; end @@ -2966,13 +3016,13 @@ class Prism::CallAndWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#2554 + # source://prism//lib/prism/node.rb#2412 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#2482 + # source://prism//lib/prism/node.rb#2356 sig { returns(Prism::Node) } def value; end @@ -2980,13 +3030,13 @@ class Prism::CallAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2490 + # source://prism//lib/prism/node.rb#2364 sig { returns(T::Boolean) } def variable_call?; end # attr_reader write_name: Symbol # - # source://prism//lib/prism/node.rb#2472 + # source://prism//lib/prism/node.rb#2346 sig { returns(Symbol) } def write_name; end @@ -2994,7 +3044,7 @@ class Prism::CallAndWriteNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#2436 + # source://prism//lib/prism/node.rb#2310 sig { returns(Integer) } def flags; end @@ -3006,7 +3056,7 @@ class Prism::CallAndWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#2564 + # source://prism//lib/prism/node.rb#2422 def type; end end end @@ -3031,13 +3081,13 @@ end # foo&.bar # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#2602 +# source://prism//lib/prism/node.rb#2460 class Prism::CallNode < ::Prism::Node # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Symbol name, Location? message_loc, Location? opening_loc, ArgumentsNode? arguments, Location? closing_loc, Prism::node? block, Location location) -> void # # @return [CallNode] a new instance of CallNode # - # source://prism//lib/prism/node.rb#2604 + # source://prism//lib/prism/node.rb#2462 sig do params( source: Prism::Source, @@ -3058,18 +3108,18 @@ class Prism::CallNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#2834 + # source://prism//lib/prism/node.rb#2665 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2620 + # source://prism//lib/prism/node.rb#2477 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#2715 + # source://prism//lib/prism/node.rb#2572 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end @@ -3077,61 +3127,61 @@ class Prism::CallNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2744 + # source://prism//lib/prism/node.rb#2601 sig { returns(T::Boolean) } def attribute_write?; end # attr_reader block: Prism::node? # - # source://prism//lib/prism/node.rb#2731 + # source://prism//lib/prism/node.rb#2588 sig { returns(T.nilable(Prism::Node)) } def block; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#2754 + # source://prism//lib/prism/node.rb#2611 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#2673 + # source://prism//lib/prism/node.rb#2530 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2625 + # source://prism//lib/prism/node.rb#2482 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#2769 + # source://prism//lib/prism/node.rb#2626 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#2718 + # source://prism//lib/prism/node.rb#2575 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#2639 + # source://prism//lib/prism/node.rb#2496 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#2630 + # source://prism//lib/prism/node.rb#2487 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?name: Symbol, ?message_loc: Location?, ?opening_loc: Location?, ?arguments: ArgumentsNode?, ?closing_loc: Location?, ?block: Prism::node?, ?location: Location) -> CallNode # - # source://prism//lib/prism/node.rb#2644 + # source://prism//lib/prism/node.rb#2501 sig do params( flags: Integer, @@ -3151,60 +3201,74 @@ class Prism::CallNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2625 + # source://prism//lib/prism/node.rb#2482 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, name: Symbol, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, block: Prism::node?, location: Location } # - # source://prism//lib/prism/node.rb#2652 + # source://prism//lib/prism/node.rb#2509 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#315 + sig { returns(T.nilable(Prism::Location)) } + def full_message_loc; end + # def ignore_visibility?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2749 + # source://prism//lib/prism/node.rb#2606 sig { returns(T::Boolean) } def ignore_visibility?; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#2774 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#2631 + sig { override.returns(String) } + def inspect; end # def message: () -> String? # - # source://prism//lib/prism/node.rb#2759 + # source://prism//lib/prism/node.rb#2616 sig { returns(T.nilable(String)) } def message; end # attr_reader message_loc: Location? # - # source://prism//lib/prism/node.rb#2689 + # source://prism//lib/prism/node.rb#2546 sig { returns(T.nilable(Prism::Location)) } def message_loc; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#2686 + # source://prism//lib/prism/node.rb#2543 sig { returns(Symbol) } def name; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#2764 + # source://prism//lib/prism/node.rb#2621 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#2702 + # source://prism//lib/prism/node.rb#2559 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end @@ -3219,7 +3283,7 @@ class Prism::CallNode < ::Prism::Node # foo + bar # ^^^ # - # source://prism//lib/prism/node.rb#2670 + # source://prism//lib/prism/node.rb#2527 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -3227,7 +3291,7 @@ class Prism::CallNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2734 + # source://prism//lib/prism/node.rb#2591 sig { returns(T::Boolean) } def safe_navigation?; end @@ -3246,7 +3310,7 @@ class Prism::CallNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#2818 + # source://prism//lib/prism/node.rb#2649 sig { override.returns(Symbol) } def type; end @@ -3254,7 +3318,7 @@ class Prism::CallNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2739 + # source://prism//lib/prism/node.rb#2596 sig { returns(T::Boolean) } def variable_call?; end @@ -3262,7 +3326,7 @@ class Prism::CallNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#2657 + # source://prism//lib/prism/node.rb#2514 sig { returns(Integer) } def flags; end @@ -3274,34 +3338,34 @@ class Prism::CallNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#2828 + # source://prism//lib/prism/node.rb#2659 def type; end end end # Flags for call nodes. # -# source://prism//lib/prism/node.rb#20349 +# source://prism//lib/prism/node.rb#19142 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#20357 +# source://prism//lib/prism/node.rb#19150 Prism::CallNodeFlags::ATTRIBUTE_WRITE = T.let(T.unsafe(nil), Integer) # a call that ignores method visibility # -# source://prism//lib/prism/node.rb#20360 +# source://prism//lib/prism/node.rb#19153 Prism::CallNodeFlags::IGNORE_VISIBILITY = T.let(T.unsafe(nil), Integer) # &. operator # -# source://prism//lib/prism/node.rb#20351 +# source://prism//lib/prism/node.rb#19144 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#20354 +# source://prism//lib/prism/node.rb#19147 Prism::CallNodeFlags::VARIABLE_CALL = T.let(T.unsafe(nil), Integer) # Represents the use of an assignment operator on a call. @@ -3309,13 +3373,13 @@ Prism::CallNodeFlags::VARIABLE_CALL = T.let(T.unsafe(nil), Integer) # foo.bar += baz # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#2852 +# source://prism//lib/prism/node.rb#2683 class Prism::CallOperatorWriteNode < ::Prism::Node - # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location? message_loc, Symbol read_name, Symbol write_name, Symbol operator, Location operator_loc, Prism::node value, Location location) -> void + # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location? message_loc, Symbol read_name, Symbol write_name, Symbol binary_operator, Location binary_operator_loc, Prism::node value, Location location) -> void # # @return [CallOperatorWriteNode] a new instance of CallOperatorWriteNode # - # source://prism//lib/prism/node.rb#2854 + # source://prism//lib/prism/node.rb#2685 sig do params( source: Prism::Source, @@ -3325,23 +3389,23 @@ class Prism::CallOperatorWriteNode < ::Prism::Node message_loc: T.nilable(Prism::Location), read_name: Symbol, write_name: Symbol, - operator: Symbol, - operator_loc: Prism::Location, + binary_operator: Symbol, + binary_operator_loc: Prism::Location, value: Prism::Node, location: Prism::Location ).void end - def initialize(source, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator, operator_loc, value, location); end + def initialize(source, flags, receiver, call_operator_loc, message_loc, read_name, write_name, binary_operator, binary_operator_loc, value, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#3039 + # source://prism//lib/prism/node.rb#2852 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2870 + # source://prism//lib/prism/node.rb#2700 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -3349,43 +3413,55 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2968 + # source://prism//lib/prism/node.rb#2798 sig { returns(T::Boolean) } def attribute_write?; end + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#2775 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#2778 + sig { returns(Prism::Location) } + def binary_operator_loc; end + # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#2978 + # source://prism//lib/prism/node.rb#2808 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#2913 + # source://prism//lib/prism/node.rb#2743 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2875 + # source://prism//lib/prism/node.rb#2705 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#2888 + # source://prism//lib/prism/node.rb#2718 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#2880 + # source://prism//lib/prism/node.rb#2710 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?operator: Symbol, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> CallOperatorWriteNode + # def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?binary_operator: Symbol, ?binary_operator_loc: Location, ?value: Prism::node, ?location: Location) -> CallOperatorWriteNode # - # source://prism//lib/prism/node.rb#2893 + # source://prism//lib/prism/node.rb#2723 sig do params( flags: Integer, @@ -3394,24 +3470,24 @@ class Prism::CallOperatorWriteNode < ::Prism::Node message_loc: T.nilable(Prism::Location), read_name: Symbol, write_name: Symbol, - operator: Symbol, - operator_loc: Prism::Location, + binary_operator: Symbol, + binary_operator_loc: Prism::Location, value: Prism::Node, location: Prism::Location ).returns(Prism::CallOperatorWriteNode) end - def copy(flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), message_loc: T.unsafe(nil), read_name: T.unsafe(nil), write_name: T.unsafe(nil), operator: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), message_loc: T.unsafe(nil), read_name: T.unsafe(nil), write_name: T.unsafe(nil), binary_operator: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2875 + # source://prism//lib/prism/node.rb#2705 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator: Symbol, operator_loc: Location, value: Prism::node, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, binary_operator: Symbol, binary_operator_loc: Location, value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#2901 + # source://prism//lib/prism/node.rb#2731 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -3422,49 +3498,49 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2973 + # source://prism//lib/prism/node.rb#2803 sig { returns(T::Boolean) } def ignore_visibility?; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#2988 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#2818 + sig { override.returns(String) } + def inspect; end # def message: () -> String? # - # source://prism//lib/prism/node.rb#2983 + # source://prism//lib/prism/node.rb#2813 sig { returns(T.nilable(String)) } def message; end # attr_reader message_loc: Location? # - # source://prism//lib/prism/node.rb#2926 + # source://prism//lib/prism/node.rb#2756 sig { returns(T.nilable(Prism::Location)) } def message_loc; end - # attr_reader operator: Symbol + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. # - # source://prism//lib/prism/node.rb#2945 - sig { returns(Symbol) } + # source://prism//lib/prism/node_ext.rb#323 def operator; end - # attr_reader operator_loc: Location + # 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.rb#2948 - sig { returns(Prism::Location) } + # source://prism//lib/prism/node_ext.rb#330 def operator_loc; end # attr_reader read_name: Symbol # - # source://prism//lib/prism/node.rb#2939 + # source://prism//lib/prism/node.rb#2769 sig { returns(Symbol) } def read_name; end # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#2910 + # source://prism//lib/prism/node.rb#2740 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -3472,7 +3548,7 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2958 + # source://prism//lib/prism/node.rb#2788 sig { returns(T::Boolean) } def safe_navigation?; end @@ -3491,13 +3567,13 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#3023 + # source://prism//lib/prism/node.rb#2836 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#2955 + # source://prism//lib/prism/node.rb#2785 sig { returns(Prism::Node) } def value; end @@ -3505,13 +3581,13 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2963 + # source://prism//lib/prism/node.rb#2793 sig { returns(T::Boolean) } def variable_call?; end # attr_reader write_name: Symbol # - # source://prism//lib/prism/node.rb#2942 + # source://prism//lib/prism/node.rb#2772 sig { returns(Symbol) } def write_name; end @@ -3519,7 +3595,7 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#2906 + # source://prism//lib/prism/node.rb#2736 sig { returns(Integer) } def flags; end @@ -3531,7 +3607,7 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#3033 + # source://prism//lib/prism/node.rb#2846 def type; end end end @@ -3541,13 +3617,13 @@ end # foo.bar ||= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3057 +# source://prism//lib/prism/node.rb#2870 class Prism::CallOrWriteNode < ::Prism::Node # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location? message_loc, Symbol read_name, Symbol write_name, Location operator_loc, Prism::node value, Location location) -> void # # @return [CallOrWriteNode] a new instance of CallOrWriteNode # - # source://prism//lib/prism/node.rb#3059 + # source://prism//lib/prism/node.rb#2872 sig do params( source: Prism::Source, @@ -3567,12 +3643,12 @@ class Prism::CallOrWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#3244 + # source://prism//lib/prism/node.rb#3040 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3074 + # source://prism//lib/prism/node.rb#2886 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -3580,43 +3656,43 @@ class Prism::CallOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3169 + # source://prism//lib/prism/node.rb#2981 sig { returns(T::Boolean) } def attribute_write?; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#3179 + # source://prism//lib/prism/node.rb#2991 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#3117 + # source://prism//lib/prism/node.rb#2929 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3079 + # source://prism//lib/prism/node.rb#2891 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3092 + # source://prism//lib/prism/node.rb#2904 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3084 + # source://prism//lib/prism/node.rb#2896 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> CallOrWriteNode # - # source://prism//lib/prism/node.rb#3097 + # source://prism//lib/prism/node.rb#2909 sig do params( flags: Integer, @@ -3635,13 +3711,13 @@ class Prism::CallOrWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3079 + # source://prism//lib/prism/node.rb#2891 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#3105 + # source://prism//lib/prism/node.rb#2917 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -3652,49 +3728,49 @@ class Prism::CallOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3174 + # source://prism//lib/prism/node.rb#2986 sig { returns(T::Boolean) } def ignore_visibility?; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#3194 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#3006 + sig { override.returns(String) } + def inspect; end # def message: () -> String? # - # source://prism//lib/prism/node.rb#3184 + # source://prism//lib/prism/node.rb#2996 sig { returns(T.nilable(String)) } def message; end # attr_reader message_loc: Location? # - # source://prism//lib/prism/node.rb#3130 + # source://prism//lib/prism/node.rb#2942 sig { returns(T.nilable(Prism::Location)) } def message_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#3189 + # source://prism//lib/prism/node.rb#3001 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#3149 + # source://prism//lib/prism/node.rb#2961 sig { returns(Prism::Location) } def operator_loc; end # attr_reader read_name: Symbol # - # source://prism//lib/prism/node.rb#3143 + # source://prism//lib/prism/node.rb#2955 sig { returns(Symbol) } def read_name; end # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#3114 + # source://prism//lib/prism/node.rb#2926 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -3702,7 +3778,7 @@ class Prism::CallOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3159 + # source://prism//lib/prism/node.rb#2971 sig { returns(T::Boolean) } def safe_navigation?; end @@ -3721,13 +3797,13 @@ class Prism::CallOrWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#3228 + # source://prism//lib/prism/node.rb#3024 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#3156 + # source://prism//lib/prism/node.rb#2968 sig { returns(Prism::Node) } def value; end @@ -3735,13 +3811,13 @@ class Prism::CallOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3164 + # source://prism//lib/prism/node.rb#2976 sig { returns(T::Boolean) } def variable_call?; end # attr_reader write_name: Symbol # - # source://prism//lib/prism/node.rb#3146 + # source://prism//lib/prism/node.rb#2958 sig { returns(Symbol) } def write_name; end @@ -3749,7 +3825,7 @@ class Prism::CallOrWriteNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#3110 + # source://prism//lib/prism/node.rb#2922 sig { returns(Integer) } def flags; end @@ -3761,7 +3837,7 @@ class Prism::CallOrWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#3238 + # source://prism//lib/prism/node.rb#3034 def type; end end end @@ -3779,13 +3855,13 @@ end # for foo.bar in baz do end # ^^^^^^^ # -# source://prism//lib/prism/node.rb#3269 +# source://prism//lib/prism/node.rb#3065 class Prism::CallTargetNode < ::Prism::Node # def initialize: (Integer flags, Prism::node receiver, Location call_operator_loc, Symbol name, Location message_loc, Location location) -> void # # @return [CallTargetNode] a new instance of CallTargetNode # - # source://prism//lib/prism/node.rb#3271 + # source://prism//lib/prism/node.rb#3067 sig do params( source: Prism::Source, @@ -3802,12 +3878,12 @@ class Prism::CallTargetNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#3412 + # source://prism//lib/prism/node.rb#3199 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3283 + # source://prism//lib/prism/node.rb#3078 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -3815,43 +3891,43 @@ class Prism::CallTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3350 + # source://prism//lib/prism/node.rb#3145 sig { returns(T::Boolean) } def attribute_write?; end # def call_operator: () -> String # - # source://prism//lib/prism/node.rb#3360 + # source://prism//lib/prism/node.rb#3155 sig { returns(String) } def call_operator; end # attr_reader call_operator_loc: Location # - # source://prism//lib/prism/node.rb#3323 + # source://prism//lib/prism/node.rb#3118 sig { returns(Prism::Location) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3288 + # source://prism//lib/prism/node.rb#3083 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3298 + # source://prism//lib/prism/node.rb#3093 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3293 + # source://prism//lib/prism/node.rb#3088 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?receiver: Prism::node, ?call_operator_loc: Location, ?name: Symbol, ?message_loc: Location, ?location: Location) -> CallTargetNode # - # source://prism//lib/prism/node.rb#3303 + # source://prism//lib/prism/node.rb#3098 sig do params( flags: Integer, @@ -3867,13 +3943,13 @@ class Prism::CallTargetNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3288 + # source://prism//lib/prism/node.rb#3083 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node, call_operator_loc: Location, name: Symbol, message_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#3311 + # source://prism//lib/prism/node.rb#3106 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -3884,37 +3960,37 @@ class Prism::CallTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3355 + # source://prism//lib/prism/node.rb#3150 sig { returns(T::Boolean) } def ignore_visibility?; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#3370 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#3165 + sig { override.returns(String) } + def inspect; end # def message: () -> String # - # source://prism//lib/prism/node.rb#3365 + # source://prism//lib/prism/node.rb#3160 sig { returns(String) } def message; end # attr_reader message_loc: Location # - # source://prism//lib/prism/node.rb#3333 + # source://prism//lib/prism/node.rb#3128 sig { returns(Prism::Location) } def message_loc; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#3330 + # source://prism//lib/prism/node.rb#3125 sig { returns(Symbol) } def name; end # attr_reader receiver: Prism::node # - # source://prism//lib/prism/node.rb#3320 + # source://prism//lib/prism/node.rb#3115 sig { returns(Prism::Node) } def receiver; end @@ -3922,7 +3998,7 @@ class Prism::CallTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3340 + # source://prism//lib/prism/node.rb#3135 sig { returns(T::Boolean) } def safe_navigation?; end @@ -3941,7 +4017,7 @@ class Prism::CallTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#3396 + # source://prism//lib/prism/node.rb#3183 sig { override.returns(Symbol) } def type; end @@ -3949,7 +4025,7 @@ class Prism::CallTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3345 + # source://prism//lib/prism/node.rb#3140 sig { returns(T::Boolean) } def variable_call?; end @@ -3957,7 +4033,7 @@ class Prism::CallTargetNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#3316 + # source://prism//lib/prism/node.rb#3111 sig { returns(Integer) } def flags; end @@ -3969,7 +4045,7 @@ class Prism::CallTargetNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#3406 + # source://prism//lib/prism/node.rb#3193 def type; end end end @@ -3979,13 +4055,13 @@ end # foo => [bar => baz] # ^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3426 +# source://prism//lib/prism/node.rb#3213 class Prism::CapturePatternNode < ::Prism::Node # def initialize: (Prism::node value, Prism::node target, Location operator_loc, Location location) -> void # # @return [CapturePatternNode] a new instance of CapturePatternNode # - # source://prism//lib/prism/node.rb#3428 + # source://prism//lib/prism/node.rb#3215 sig do params( source: Prism::Source, @@ -4000,36 +4076,36 @@ class Prism::CapturePatternNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#3529 + # source://prism//lib/prism/node.rb#3309 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3438 + # source://prism//lib/prism/node.rb#3224 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#3443 + # source://prism//lib/prism/node.rb#3229 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3453 + # source://prism//lib/prism/node.rb#3239 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3448 + # source://prism//lib/prism/node.rb#3234 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?value: Prism::node, ?target: Prism::node, ?operator_loc: Location, ?location: Location) -> CapturePatternNode # - # source://prism//lib/prism/node.rb#3458 + # source://prism//lib/prism/node.rb#3244 sig do params( value: Prism::Node, @@ -4043,40 +4119,40 @@ class Prism::CapturePatternNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3443 + # source://prism//lib/prism/node.rb#3229 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::node, target: Prism::node, operator_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#3466 + # source://prism//lib/prism/node.rb#3252 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#3489 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#3275 + sig { override.returns(String) } + def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#3484 + # source://prism//lib/prism/node.rb#3270 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#3477 + # source://prism//lib/prism/node.rb#3263 sig { returns(Prism::Location) } def operator_loc; end # attr_reader target: Prism::node # - # source://prism//lib/prism/node.rb#3474 + # source://prism//lib/prism/node.rb#3260 sig { returns(Prism::Node) } def target; end @@ -4095,13 +4171,13 @@ class Prism::CapturePatternNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#3513 + # source://prism//lib/prism/node.rb#3293 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#3471 + # source://prism//lib/prism/node.rb#3257 sig { returns(Prism::Node) } def value; end @@ -4113,7 +4189,7 @@ class Prism::CapturePatternNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#3523 + # source://prism//lib/prism/node.rb#3303 def type; end end end @@ -4125,13 +4201,13 @@ end # end # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3543 +# source://prism//lib/prism/node.rb#3323 class Prism::CaseMatchNode < ::Prism::Node # def initialize: (Prism::node? predicate, Array[Prism::node] conditions, ElseNode? consequent, Location case_keyword_loc, Location end_keyword_loc, Location location) -> void # # @return [CaseMatchNode] a new instance of CaseMatchNode # - # source://prism//lib/prism/node.rb#3545 + # source://prism//lib/prism/node.rb#3325 sig do params( source: Prism::Source, @@ -4148,60 +4224,60 @@ class Prism::CaseMatchNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#3677 + # source://prism//lib/prism/node.rb#3440 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3557 + # source://prism//lib/prism/node.rb#3336 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def case_keyword: () -> String # - # source://prism//lib/prism/node.rb#3617 + # source://prism//lib/prism/node.rb#3396 sig { returns(String) } def case_keyword; end # attr_reader case_keyword_loc: Location # - # source://prism//lib/prism/node.rb#3603 + # source://prism//lib/prism/node.rb#3382 sig { returns(Prism::Location) } def case_keyword_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3562 + # source://prism//lib/prism/node.rb#3341 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3576 + # source://prism//lib/prism/node.rb#3355 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3567 + # source://prism//lib/prism/node.rb#3346 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader conditions: Array[Prism::node] # - # source://prism//lib/prism/node.rb#3597 + # source://prism//lib/prism/node.rb#3376 sig { returns(T::Array[Prism::Node]) } def conditions; end # attr_reader consequent: ElseNode? # - # source://prism//lib/prism/node.rb#3600 + # source://prism//lib/prism/node.rb#3379 sig { returns(T.nilable(Prism::ElseNode)) } def consequent; end # def copy: (?predicate: Prism::node?, ?conditions: Array[Prism::node], ?consequent: ElseNode?, ?case_keyword_loc: Location, ?end_keyword_loc: Location, ?location: Location) -> CaseMatchNode # - # source://prism//lib/prism/node.rb#3581 + # source://prism//lib/prism/node.rb#3360 sig do params( predicate: T.nilable(Prism::Node), @@ -4217,40 +4293,40 @@ class Prism::CaseMatchNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3562 + # source://prism//lib/prism/node.rb#3341 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { predicate: Prism::node?, conditions: Array[Prism::node], consequent: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#3589 + # source://prism//lib/prism/node.rb#3368 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#3622 + # source://prism//lib/prism/node.rb#3401 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#3610 + # source://prism//lib/prism/node.rb#3389 sig { returns(Prism::Location) } def end_keyword_loc; end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#3627 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#3406 + sig { override.returns(String) } + def inspect; end # attr_reader predicate: Prism::node? # - # source://prism//lib/prism/node.rb#3594 + # source://prism//lib/prism/node.rb#3373 sig { returns(T.nilable(Prism::Node)) } def predicate; end @@ -4269,7 +4345,7 @@ class Prism::CaseMatchNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#3661 + # source://prism//lib/prism/node.rb#3424 sig { override.returns(Symbol) } def type; end @@ -4281,7 +4357,7 @@ class Prism::CaseMatchNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#3671 + # source://prism//lib/prism/node.rb#3434 def type; end end end @@ -4293,13 +4369,13 @@ end # end # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3694 +# source://prism//lib/prism/node.rb#3457 class Prism::CaseNode < ::Prism::Node # def initialize: (Prism::node? predicate, Array[Prism::node] conditions, ElseNode? consequent, Location case_keyword_loc, Location end_keyword_loc, Location location) -> void # # @return [CaseNode] a new instance of CaseNode # - # source://prism//lib/prism/node.rb#3696 + # source://prism//lib/prism/node.rb#3459 sig do params( source: Prism::Source, @@ -4316,60 +4392,60 @@ class Prism::CaseNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#3828 + # source://prism//lib/prism/node.rb#3574 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3708 + # source://prism//lib/prism/node.rb#3470 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def case_keyword: () -> String # - # source://prism//lib/prism/node.rb#3768 + # source://prism//lib/prism/node.rb#3530 sig { returns(String) } def case_keyword; end # attr_reader case_keyword_loc: Location # - # source://prism//lib/prism/node.rb#3754 + # source://prism//lib/prism/node.rb#3516 sig { returns(Prism::Location) } def case_keyword_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3713 + # source://prism//lib/prism/node.rb#3475 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3727 + # source://prism//lib/prism/node.rb#3489 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3718 + # source://prism//lib/prism/node.rb#3480 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader conditions: Array[Prism::node] # - # source://prism//lib/prism/node.rb#3748 + # source://prism//lib/prism/node.rb#3510 sig { returns(T::Array[Prism::Node]) } def conditions; end # attr_reader consequent: ElseNode? # - # source://prism//lib/prism/node.rb#3751 + # source://prism//lib/prism/node.rb#3513 sig { returns(T.nilable(Prism::ElseNode)) } def consequent; end # def copy: (?predicate: Prism::node?, ?conditions: Array[Prism::node], ?consequent: ElseNode?, ?case_keyword_loc: Location, ?end_keyword_loc: Location, ?location: Location) -> CaseNode # - # source://prism//lib/prism/node.rb#3732 + # source://prism//lib/prism/node.rb#3494 sig do params( predicate: T.nilable(Prism::Node), @@ -4385,40 +4461,40 @@ class Prism::CaseNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3713 + # source://prism//lib/prism/node.rb#3475 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { predicate: Prism::node?, conditions: Array[Prism::node], consequent: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#3740 + # source://prism//lib/prism/node.rb#3502 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#3773 + # source://prism//lib/prism/node.rb#3535 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#3761 + # source://prism//lib/prism/node.rb#3523 sig { returns(Prism::Location) } def end_keyword_loc; end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#3778 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#3540 + sig { override.returns(String) } + def inspect; end # attr_reader predicate: Prism::node? # - # source://prism//lib/prism/node.rb#3745 + # source://prism//lib/prism/node.rb#3507 sig { returns(T.nilable(Prism::Node)) } def predicate; end @@ -4437,7 +4513,7 @@ class Prism::CaseNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#3812 + # source://prism//lib/prism/node.rb#3558 sig { override.returns(Symbol) } def type; end @@ -4449,7 +4525,7 @@ class Prism::CaseNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#3822 + # source://prism//lib/prism/node.rb#3568 def type; end end end @@ -4459,13 +4535,13 @@ end # class Foo end # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3843 +# source://prism//lib/prism/node.rb#3589 class Prism::ClassNode < ::Prism::Node # def initialize: (Array[Symbol] locals, Location class_keyword_loc, Prism::node constant_path, Location? inheritance_operator_loc, Prism::node? superclass, Prism::node? body, Location end_keyword_loc, Symbol name, Location location) -> void # # @return [ClassNode] a new instance of ClassNode # - # source://prism//lib/prism/node.rb#3845 + # source://prism//lib/prism/node.rb#3591 sig do params( source: Prism::Source, @@ -4485,60 +4561,60 @@ class Prism::ClassNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#4008 + # source://prism//lib/prism/node.rb#3733 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3860 + # source://prism//lib/prism/node.rb#3605 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: Prism::node? # - # source://prism//lib/prism/node.rb#3926 + # source://prism//lib/prism/node.rb#3671 sig { returns(T.nilable(Prism::Node)) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3865 + # source://prism//lib/prism/node.rb#3610 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def class_keyword: () -> String # - # source://prism//lib/prism/node.rb#3939 + # source://prism//lib/prism/node.rb#3684 sig { returns(String) } def class_keyword; end # attr_reader class_keyword_loc: Location # - # source://prism//lib/prism/node.rb#3900 + # source://prism//lib/prism/node.rb#3645 sig { returns(Prism::Location) } def class_keyword_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3879 + # source://prism//lib/prism/node.rb#3624 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3870 + # source://prism//lib/prism/node.rb#3615 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader constant_path: Prism::node # - # source://prism//lib/prism/node.rb#3907 + # source://prism//lib/prism/node.rb#3652 sig { returns(Prism::Node) } def constant_path; end # def copy: (?locals: Array[Symbol], ?class_keyword_loc: Location, ?constant_path: Prism::node, ?inheritance_operator_loc: Location?, ?superclass: Prism::node?, ?body: Prism::node?, ?end_keyword_loc: Location, ?name: Symbol, ?location: Location) -> ClassNode # - # source://prism//lib/prism/node.rb#3884 + # source://prism//lib/prism/node.rb#3629 sig do params( locals: T::Array[Symbol], @@ -4557,25 +4633,25 @@ class Prism::ClassNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3865 + # source://prism//lib/prism/node.rb#3610 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], class_keyword_loc: Location, constant_path: Prism::node, inheritance_operator_loc: Location?, superclass: Prism::node?, body: Prism::node?, end_keyword_loc: Location, name: Symbol, location: Location } # - # source://prism//lib/prism/node.rb#3892 + # source://prism//lib/prism/node.rb#3637 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#3949 + # source://prism//lib/prism/node.rb#3694 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#3929 + # source://prism//lib/prism/node.rb#3674 sig { returns(Prism::Location) } def end_keyword_loc; end @@ -4584,37 +4660,37 @@ class Prism::ClassNode < ::Prism::Node # def inheritance_operator: () -> String? # - # source://prism//lib/prism/node.rb#3944 + # source://prism//lib/prism/node.rb#3689 sig { returns(T.nilable(String)) } def inheritance_operator; end # attr_reader inheritance_operator_loc: Location? # - # source://prism//lib/prism/node.rb#3910 + # source://prism//lib/prism/node.rb#3655 sig { returns(T.nilable(Prism::Location)) } def inheritance_operator_loc; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#3954 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#3699 + sig { override.returns(String) } + def inspect; end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#3897 + # source://prism//lib/prism/node.rb#3642 sig { returns(T::Array[Symbol]) } def locals; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#3936 + # source://prism//lib/prism/node.rb#3681 sig { returns(Symbol) } def name; end # attr_reader superclass: Prism::node? # - # source://prism//lib/prism/node.rb#3923 + # source://prism//lib/prism/node.rb#3668 sig { returns(T.nilable(Prism::Node)) } def superclass; end @@ -4633,7 +4709,7 @@ class Prism::ClassNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#3992 + # source://prism//lib/prism/node.rb#3717 sig { override.returns(Symbol) } def type; end @@ -4645,7 +4721,7 @@ class Prism::ClassNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#4002 + # source://prism//lib/prism/node.rb#3727 def type; end end end @@ -4655,13 +4731,13 @@ end # @@target &&= value # ^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4026 +# source://prism//lib/prism/node.rb#3751 class Prism::ClassVariableAndWriteNode < ::Prism::Node # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void # # @return [ClassVariableAndWriteNode] a new instance of ClassVariableAndWriteNode # - # source://prism//lib/prism/node.rb#4028 + # source://prism//lib/prism/node.rb#3753 sig do params( source: Prism::Source, @@ -4677,36 +4753,36 @@ class Prism::ClassVariableAndWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#4137 + # source://prism//lib/prism/node.rb#3855 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4039 + # source://prism//lib/prism/node.rb#3763 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#4044 + # source://prism//lib/prism/node.rb#3768 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4054 + # source://prism//lib/prism/node.rb#3778 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4049 + # source://prism//lib/prism/node.rb#3773 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ClassVariableAndWriteNode # - # source://prism//lib/prism/node.rb#4059 + # source://prism//lib/prism/node.rb#3783 sig do params( name: Symbol, @@ -4721,13 +4797,13 @@ class Prism::ClassVariableAndWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4044 + # source://prism//lib/prism/node.rb#3768 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#4067 + # source://prism//lib/prism/node.rb#3791 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -4737,33 +4813,33 @@ class Prism::ClassVariableAndWriteNode < ::Prism::Node sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#4097 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#3821 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4072 + # source://prism//lib/prism/node.rb#3796 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#4075 + # source://prism//lib/prism/node.rb#3799 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#4092 + # source://prism//lib/prism/node.rb#3816 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#4082 + # source://prism//lib/prism/node.rb#3806 sig { returns(Prism::Location) } def operator_loc; end @@ -4782,13 +4858,13 @@ class Prism::ClassVariableAndWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#4121 + # source://prism//lib/prism/node.rb#3839 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#4089 + # source://prism//lib/prism/node.rb#3813 sig { returns(Prism::Node) } def value; end @@ -4800,7 +4876,7 @@ class Prism::ClassVariableAndWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#4131 + # source://prism//lib/prism/node.rb#3849 def type; end end end @@ -4810,81 +4886,93 @@ end # @@target += value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4150 +# source://prism//lib/prism/node.rb#3868 class Prism::ClassVariableOperatorWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Symbol operator, Location location) -> void + # def initialize: (Symbol name, Location name_loc, Location binary_operator_loc, Prism::node value, Symbol binary_operator, Location location) -> void # # @return [ClassVariableOperatorWriteNode] a new instance of ClassVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#4152 + # source://prism//lib/prism/node.rb#3870 sig do params( source: Prism::Source, name: Symbol, name_loc: Prism::Location, - operator_loc: Prism::Location, + binary_operator_loc: Prism::Location, value: Prism::Node, - operator: Symbol, + binary_operator: Symbol, location: Prism::Location ).void end - def initialize(source, name, name_loc, operator_loc, value, operator, location); end + def initialize(source, name, name_loc, binary_operator_loc, value, binary_operator, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#4261 + # source://prism//lib/prism/node.rb#3971 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4164 + # source://prism//lib/prism/node.rb#3881 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#3934 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#3924 + sig { returns(Prism::Location) } + def binary_operator_loc; end + # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4169 + # source://prism//lib/prism/node.rb#3886 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4179 + # source://prism//lib/prism/node.rb#3896 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4174 + # source://prism//lib/prism/node.rb#3891 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?operator: Symbol, ?location: Location) -> ClassVariableOperatorWriteNode + # def copy: (?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol, ?location: Location) -> ClassVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#4184 + # source://prism//lib/prism/node.rb#3901 sig do params( name: Symbol, name_loc: Prism::Location, - operator_loc: Prism::Location, + binary_operator_loc: Prism::Location, value: Prism::Node, - operator: Symbol, + binary_operator: Symbol, location: Prism::Location ).returns(Prism::ClassVariableOperatorWriteNode) end - def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), operator: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4169 + # source://prism//lib/prism/node.rb#3886 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, operator: Symbol, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol, location: Location } # - # source://prism//lib/prism/node.rb#4192 + # source://prism//lib/prism/node.rb#3909 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -4894,34 +4982,34 @@ class Prism::ClassVariableOperatorWriteNode < ::Prism::Node sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#4220 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#3937 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4197 + # source://prism//lib/prism/node.rb#3914 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#4200 + # source://prism//lib/prism/node.rb#3917 sig { returns(Prism::Location) } def name_loc; end - # attr_reader operator: Symbol + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. # - # source://prism//lib/prism/node.rb#4217 - sig { returns(Symbol) } + # source://prism//lib/prism/node_ext.rb#339 def operator; end - # attr_reader operator_loc: Location + # 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.rb#4207 - sig { returns(Prism::Location) } + # source://prism//lib/prism/node_ext.rb#346 def operator_loc; end # Sometimes you want to check an instance of a node against a list of @@ -4939,13 +5027,13 @@ class Prism::ClassVariableOperatorWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#4245 + # source://prism//lib/prism/node.rb#3955 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#4214 + # source://prism//lib/prism/node.rb#3931 sig { returns(Prism::Node) } def value; end @@ -4957,7 +5045,7 @@ class Prism::ClassVariableOperatorWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#4255 + # source://prism//lib/prism/node.rb#3965 def type; end end end @@ -4967,13 +5055,13 @@ end # @@target ||= value # ^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4275 +# source://prism//lib/prism/node.rb#3985 class Prism::ClassVariableOrWriteNode < ::Prism::Node # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void # # @return [ClassVariableOrWriteNode] a new instance of ClassVariableOrWriteNode # - # source://prism//lib/prism/node.rb#4277 + # source://prism//lib/prism/node.rb#3987 sig do params( source: Prism::Source, @@ -4989,36 +5077,36 @@ class Prism::ClassVariableOrWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#4386 + # source://prism//lib/prism/node.rb#4089 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4288 + # source://prism//lib/prism/node.rb#3997 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#4293 + # source://prism//lib/prism/node.rb#4002 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4303 + # source://prism//lib/prism/node.rb#4012 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4298 + # source://prism//lib/prism/node.rb#4007 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ClassVariableOrWriteNode # - # source://prism//lib/prism/node.rb#4308 + # source://prism//lib/prism/node.rb#4017 sig do params( name: Symbol, @@ -5033,13 +5121,13 @@ class Prism::ClassVariableOrWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4293 + # source://prism//lib/prism/node.rb#4002 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#4316 + # source://prism//lib/prism/node.rb#4025 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -5049,33 +5137,33 @@ class Prism::ClassVariableOrWriteNode < ::Prism::Node sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#4346 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#4055 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4321 + # source://prism//lib/prism/node.rb#4030 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#4324 + # source://prism//lib/prism/node.rb#4033 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#4341 + # source://prism//lib/prism/node.rb#4050 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#4331 + # source://prism//lib/prism/node.rb#4040 sig { returns(Prism::Location) } def operator_loc; end @@ -5094,13 +5182,13 @@ class Prism::ClassVariableOrWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#4370 + # source://prism//lib/prism/node.rb#4073 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#4338 + # source://prism//lib/prism/node.rb#4047 sig { returns(Prism::Node) } def value; end @@ -5112,7 +5200,7 @@ class Prism::ClassVariableOrWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#4380 + # source://prism//lib/prism/node.rb#4083 def type; end end end @@ -5122,73 +5210,73 @@ end # @@foo # ^^^^^ # -# source://prism//lib/prism/node.rb#4399 +# source://prism//lib/prism/node.rb#4102 class Prism::ClassVariableReadNode < ::Prism::Node # def initialize: (Symbol name, Location location) -> void # # @return [ClassVariableReadNode] a new instance of ClassVariableReadNode # - # source://prism//lib/prism/node.rb#4401 + # source://prism//lib/prism/node.rb#4104 sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } def initialize(source, name, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#4485 + # source://prism//lib/prism/node.rb#4185 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4409 + # source://prism//lib/prism/node.rb#4111 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#4414 + # source://prism//lib/prism/node.rb#4116 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4424 + # source://prism//lib/prism/node.rb#4126 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4419 + # source://prism//lib/prism/node.rb#4121 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?location: Location) -> ClassVariableReadNode # - # source://prism//lib/prism/node.rb#4429 + # source://prism//lib/prism/node.rb#4131 sig { params(name: Symbol, location: Prism::Location).returns(Prism::ClassVariableReadNode) } def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4414 + # source://prism//lib/prism/node.rb#4116 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } # - # source://prism//lib/prism/node.rb#4437 + # source://prism//lib/prism/node.rb#4139 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#4449 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#4151 + 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). # @@ -5196,7 +5284,7 @@ class Prism::ClassVariableReadNode < ::Prism::Node # # @@_test # name `:@@_test` # - # source://prism//lib/prism/node.rb#4446 + # source://prism//lib/prism/node.rb#4148 sig { returns(Symbol) } def name; end @@ -5215,7 +5303,7 @@ class Prism::ClassVariableReadNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#4469 + # source://prism//lib/prism/node.rb#4169 sig { override.returns(Symbol) } def type; end @@ -5227,7 +5315,7 @@ class Prism::ClassVariableReadNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#4479 + # source://prism//lib/prism/node.rb#4179 def type; end end end @@ -5237,77 +5325,77 @@ end # @@foo, @@bar = baz # ^^^^^ ^^^^^ # -# source://prism//lib/prism/node.rb#4495 +# source://prism//lib/prism/node.rb#4195 class Prism::ClassVariableTargetNode < ::Prism::Node # def initialize: (Symbol name, Location location) -> void # # @return [ClassVariableTargetNode] a new instance of ClassVariableTargetNode # - # source://prism//lib/prism/node.rb#4497 + # source://prism//lib/prism/node.rb#4197 sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } def initialize(source, name, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#4577 + # source://prism//lib/prism/node.rb#4274 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4505 + # source://prism//lib/prism/node.rb#4204 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#4510 + # source://prism//lib/prism/node.rb#4209 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4520 + # source://prism//lib/prism/node.rb#4219 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4515 + # source://prism//lib/prism/node.rb#4214 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?location: Location) -> ClassVariableTargetNode # - # source://prism//lib/prism/node.rb#4525 + # source://prism//lib/prism/node.rb#4224 sig { params(name: Symbol, location: Prism::Location).returns(Prism::ClassVariableTargetNode) } def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4510 + # source://prism//lib/prism/node.rb#4209 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } # - # source://prism//lib/prism/node.rb#4533 + # source://prism//lib/prism/node.rb#4232 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#4541 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#4240 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4538 + # source://prism//lib/prism/node.rb#4237 sig { returns(Symbol) } def name; end @@ -5326,7 +5414,7 @@ class Prism::ClassVariableTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#4561 + # source://prism//lib/prism/node.rb#4258 sig { override.returns(Symbol) } def type; end @@ -5338,7 +5426,7 @@ class Prism::ClassVariableTargetNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#4571 + # source://prism//lib/prism/node.rb#4268 def type; end end end @@ -5348,13 +5436,13 @@ end # @@foo = 1 # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4587 +# source://prism//lib/prism/node.rb#4284 class Prism::ClassVariableWriteNode < ::Prism::Node # def initialize: (Symbol name, Location name_loc, Prism::node value, Location operator_loc, Location location) -> void # # @return [ClassVariableWriteNode] a new instance of ClassVariableWriteNode # - # source://prism//lib/prism/node.rb#4589 + # source://prism//lib/prism/node.rb#4286 sig do params( source: Prism::Source, @@ -5370,36 +5458,36 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#4714 + # source://prism//lib/prism/node.rb#4404 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4600 + # source://prism//lib/prism/node.rb#4296 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#4605 + # source://prism//lib/prism/node.rb#4301 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4615 + # source://prism//lib/prism/node.rb#4311 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4610 + # source://prism//lib/prism/node.rb#4306 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location, ?location: Location) -> ClassVariableWriteNode # - # source://prism//lib/prism/node.rb#4620 + # source://prism//lib/prism/node.rb#4316 sig do params( name: Symbol, @@ -5414,24 +5502,24 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4605 + # source://prism//lib/prism/node.rb#4301 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#4628 + # source://prism//lib/prism/node.rb#4324 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#4674 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#4370 + 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). # @@ -5439,7 +5527,7 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # # @@_test = :test # name `@@_test` # - # source://prism//lib/prism/node.rb#4637 + # source://prism//lib/prism/node.rb#4333 sig { returns(Symbol) } def name; end @@ -5448,13 +5536,13 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # @@foo = :bar # ^^^^^ # - # source://prism//lib/prism/node.rb#4643 + # source://prism//lib/prism/node.rb#4339 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#4669 + # source://prism//lib/prism/node.rb#4365 sig { returns(String) } def operator; end @@ -5463,7 +5551,7 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # @@foo = :bar # ^ # - # source://prism//lib/prism/node.rb#4662 + # source://prism//lib/prism/node.rb#4358 sig { returns(Prism::Location) } def operator_loc; end @@ -5482,7 +5570,7 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#4698 + # source://prism//lib/prism/node.rb#4388 sig { override.returns(Symbol) } def type; end @@ -5494,7 +5582,7 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # @@_xyz = 123 # ^^^ # - # source://prism//lib/prism/node.rb#4656 + # source://prism//lib/prism/node.rb#4352 sig { returns(Prism::Node) } def value; end @@ -5506,7 +5594,7 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#4708 + # source://prism//lib/prism/node.rb#4398 def type; end end end @@ -5514,7 +5602,7 @@ 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#288 +# source://prism//lib/prism/parse_result.rb#366 class Prism::Comment abstract! @@ -5522,25 +5610,25 @@ class Prism::Comment # # @return [Comment] a new instance of Comment # - # source://prism//lib/prism/parse_result.rb#293 + # source://prism//lib/prism/parse_result.rb#371 sig { params(location: Prism::Location).void } def initialize(location); end # Implement the hash pattern matching interface for Comment. # - # source://prism//lib/prism/parse_result.rb#298 + # source://prism//lib/prism/parse_result.rb#376 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # The location of this comment in the source. # - # source://prism//lib/prism/parse_result.rb#290 + # source://prism//lib/prism/parse_result.rb#368 sig { returns(Prism::Location) } def location; end # Returns the content of the comment by slicing it from the source code. # - # source://prism//lib/prism/parse_result.rb#303 + # source://prism//lib/prism/parse_result.rb#381 sig { returns(String) } def slice; end @@ -5570,7 +5658,7 @@ 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.nilable(Result)) } + sig { params(node: T.nilable(Prism::Node)).returns(T.untyped) } def visit(node); end # Visit the child nodes of the given node. @@ -5588,7 +5676,7 @@ class Prism::Compiler < ::Prism::Visitor # 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.nilable(Result)]) } + 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. @@ -5732,7 +5820,7 @@ class Prism::Compiler < ::Prism::Visitor # Visit the child nodes of the given node. # # source://prism//lib/prism/compiler.rb#39 - sig { params(node: Prism::Node).returns(T::Array[T.nilable(Result)]) } + sig { params(node: Prism::Node).returns(T::Array[T.untyped]) } def visit_child_nodes(node); end # Visit the child nodes of the given node. @@ -6107,6 +6195,12 @@ class Prism::Compiler < ::Prism::Visitor # 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 # @@ -6484,8 +6578,6 @@ class Prism::Compiler < ::Prism::Visitor # # source://prism//lib/prism/compiler.rb#39 def visit_yield_node(node); end - - Result = type_member end # Represents the use of the `&&=` operator for assignment to a constant. @@ -6493,13 +6585,13 @@ end # Target &&= value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4727 +# source://prism//lib/prism/node.rb#4417 class Prism::ConstantAndWriteNode < ::Prism::Node # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void # # @return [ConstantAndWriteNode] a new instance of ConstantAndWriteNode # - # source://prism//lib/prism/node.rb#4729 + # source://prism//lib/prism/node.rb#4419 sig do params( source: Prism::Source, @@ -6515,36 +6607,36 @@ class Prism::ConstantAndWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#4838 + # source://prism//lib/prism/node.rb#4521 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4740 + # source://prism//lib/prism/node.rb#4429 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#4745 + # source://prism//lib/prism/node.rb#4434 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4755 + # source://prism//lib/prism/node.rb#4444 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4750 + # source://prism//lib/prism/node.rb#4439 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ConstantAndWriteNode # - # source://prism//lib/prism/node.rb#4760 + # source://prism//lib/prism/node.rb#4449 sig do params( name: Symbol, @@ -6559,13 +6651,13 @@ class Prism::ConstantAndWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4745 + # source://prism//lib/prism/node.rb#4434 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#4768 + # source://prism//lib/prism/node.rb#4457 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -6575,33 +6667,33 @@ class Prism::ConstantAndWriteNode < ::Prism::Node sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#4798 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#4487 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4773 + # source://prism//lib/prism/node.rb#4462 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#4776 + # source://prism//lib/prism/node.rb#4465 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#4793 + # source://prism//lib/prism/node.rb#4482 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#4783 + # source://prism//lib/prism/node.rb#4472 sig { returns(Prism::Location) } def operator_loc; end @@ -6620,13 +6712,13 @@ class Prism::ConstantAndWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#4822 + # source://prism//lib/prism/node.rb#4505 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#4790 + # source://prism//lib/prism/node.rb#4479 sig { returns(Prism::Node) } def value; end @@ -6638,7 +6730,7 @@ class Prism::ConstantAndWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#4832 + # source://prism//lib/prism/node.rb#4515 def type; end end end @@ -6648,81 +6740,93 @@ end # Target += value # ^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4851 +# source://prism//lib/prism/node.rb#4534 class Prism::ConstantOperatorWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Symbol operator, Location location) -> void + # def initialize: (Symbol name, Location name_loc, Location binary_operator_loc, Prism::node value, Symbol binary_operator, Location location) -> void # # @return [ConstantOperatorWriteNode] a new instance of ConstantOperatorWriteNode # - # source://prism//lib/prism/node.rb#4853 + # source://prism//lib/prism/node.rb#4536 sig do params( source: Prism::Source, name: Symbol, name_loc: Prism::Location, - operator_loc: Prism::Location, + binary_operator_loc: Prism::Location, value: Prism::Node, - operator: Symbol, + binary_operator: Symbol, location: Prism::Location ).void end - def initialize(source, name, name_loc, operator_loc, value, operator, location); end + def initialize(source, name, name_loc, binary_operator_loc, value, binary_operator, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#4962 + # source://prism//lib/prism/node.rb#4637 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4865 + # source://prism//lib/prism/node.rb#4547 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#4600 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#4590 + sig { returns(Prism::Location) } + def binary_operator_loc; end + # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4870 + # source://prism//lib/prism/node.rb#4552 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4880 + # source://prism//lib/prism/node.rb#4562 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4875 + # source://prism//lib/prism/node.rb#4557 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?operator: Symbol, ?location: Location) -> ConstantOperatorWriteNode + # def copy: (?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol, ?location: Location) -> ConstantOperatorWriteNode # - # source://prism//lib/prism/node.rb#4885 + # source://prism//lib/prism/node.rb#4567 sig do params( name: Symbol, name_loc: Prism::Location, - operator_loc: Prism::Location, + binary_operator_loc: Prism::Location, value: Prism::Node, - operator: Symbol, + binary_operator: Symbol, location: Prism::Location ).returns(Prism::ConstantOperatorWriteNode) end - def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), operator: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4870 + # source://prism//lib/prism/node.rb#4552 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, operator: Symbol, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol, location: Location } # - # source://prism//lib/prism/node.rb#4893 + # source://prism//lib/prism/node.rb#4575 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -6732,34 +6836,34 @@ class Prism::ConstantOperatorWriteNode < ::Prism::Node sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#4921 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#4603 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4898 + # source://prism//lib/prism/node.rb#4580 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#4901 + # source://prism//lib/prism/node.rb#4583 sig { returns(Prism::Location) } def name_loc; end - # attr_reader operator: Symbol + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. # - # source://prism//lib/prism/node.rb#4918 - sig { returns(Symbol) } + # source://prism//lib/prism/node_ext.rb#355 def operator; end - # attr_reader operator_loc: Location + # 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.rb#4908 - sig { returns(Prism::Location) } + # source://prism//lib/prism/node_ext.rb#362 def operator_loc; end # Sometimes you want to check an instance of a node against a list of @@ -6777,13 +6881,13 @@ class Prism::ConstantOperatorWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#4946 + # source://prism//lib/prism/node.rb#4621 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#4915 + # source://prism//lib/prism/node.rb#4597 sig { returns(Prism::Node) } def value; end @@ -6795,7 +6899,7 @@ class Prism::ConstantOperatorWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#4956 + # source://prism//lib/prism/node.rb#4631 def type; end end end @@ -6805,13 +6909,13 @@ end # Target ||= value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4976 +# source://prism//lib/prism/node.rb#4651 class Prism::ConstantOrWriteNode < ::Prism::Node # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void # # @return [ConstantOrWriteNode] a new instance of ConstantOrWriteNode # - # source://prism//lib/prism/node.rb#4978 + # source://prism//lib/prism/node.rb#4653 sig do params( source: Prism::Source, @@ -6827,36 +6931,36 @@ class Prism::ConstantOrWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#5087 + # source://prism//lib/prism/node.rb#4755 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4989 + # source://prism//lib/prism/node.rb#4663 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#4994 + # source://prism//lib/prism/node.rb#4668 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5004 + # source://prism//lib/prism/node.rb#4678 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4999 + # source://prism//lib/prism/node.rb#4673 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ConstantOrWriteNode # - # source://prism//lib/prism/node.rb#5009 + # source://prism//lib/prism/node.rb#4683 sig do params( name: Symbol, @@ -6871,13 +6975,13 @@ class Prism::ConstantOrWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4994 + # source://prism//lib/prism/node.rb#4668 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#5017 + # source://prism//lib/prism/node.rb#4691 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -6887,33 +6991,33 @@ class Prism::ConstantOrWriteNode < ::Prism::Node sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#5047 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#4721 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#5022 + # source://prism//lib/prism/node.rb#4696 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#5025 + # source://prism//lib/prism/node.rb#4699 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#5042 + # source://prism//lib/prism/node.rb#4716 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#5032 + # source://prism//lib/prism/node.rb#4706 sig { returns(Prism::Location) } def operator_loc; end @@ -6932,13 +7036,13 @@ class Prism::ConstantOrWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#5071 + # source://prism//lib/prism/node.rb#4739 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#5039 + # source://prism//lib/prism/node.rb#4713 sig { returns(Prism::Node) } def value; end @@ -6950,7 +7054,7 @@ class Prism::ConstantOrWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#5081 + # source://prism//lib/prism/node.rb#4749 def type; end end end @@ -6960,13 +7064,13 @@ end # Parent::Child &&= value # ^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#5100 +# source://prism//lib/prism/node.rb#4768 class Prism::ConstantPathAndWriteNode < ::Prism::Node # def initialize: (ConstantPathNode target, Location operator_loc, Prism::node value, Location location) -> void # # @return [ConstantPathAndWriteNode] a new instance of ConstantPathAndWriteNode # - # source://prism//lib/prism/node.rb#5102 + # source://prism//lib/prism/node.rb#4770 sig do params( source: Prism::Source, @@ -6981,36 +7085,36 @@ class Prism::ConstantPathAndWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#5203 + # source://prism//lib/prism/node.rb#4864 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5112 + # source://prism//lib/prism/node.rb#4779 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#5117 + # source://prism//lib/prism/node.rb#4784 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5127 + # source://prism//lib/prism/node.rb#4794 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5122 + # source://prism//lib/prism/node.rb#4789 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ConstantPathAndWriteNode # - # source://prism//lib/prism/node.rb#5132 + # source://prism//lib/prism/node.rb#4799 sig do params( target: Prism::ConstantPathNode, @@ -7024,40 +7128,40 @@ class Prism::ConstantPathAndWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5117 + # source://prism//lib/prism/node.rb#4784 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#5140 + # source://prism//lib/prism/node.rb#4807 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#5163 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#4830 + sig { override.returns(String) } + def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#5158 + # source://prism//lib/prism/node.rb#4825 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#5148 + # source://prism//lib/prism/node.rb#4815 sig { returns(Prism::Location) } def operator_loc; end # attr_reader target: ConstantPathNode # - # source://prism//lib/prism/node.rb#5145 + # source://prism//lib/prism/node.rb#4812 sig { returns(Prism::ConstantPathNode) } def target; end @@ -7076,13 +7180,13 @@ class Prism::ConstantPathAndWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#5187 + # source://prism//lib/prism/node.rb#4848 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#5155 + # source://prism//lib/prism/node.rb#4822 sig { returns(Prism::Node) } def value; end @@ -7094,7 +7198,7 @@ class Prism::ConstantPathAndWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#5197 + # source://prism//lib/prism/node.rb#4858 def type; end end end @@ -7104,99 +7208,92 @@ end # Foo::Bar # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#5215 +# source://prism//lib/prism/node.rb#4876 class Prism::ConstantPathNode < ::Prism::Node - # def initialize: (Prism::node? parent, ConstantReadNode | MissingNode child, Location delimiter_loc, Location location) -> void + # def initialize: (Prism::node? parent, Symbol? name, Location delimiter_loc, Location name_loc, Location location) -> void # # @return [ConstantPathNode] a new instance of ConstantPathNode # - # source://prism//lib/prism/node.rb#5217 + # source://prism//lib/prism/node.rb#4878 sig do params( source: Prism::Source, parent: T.nilable(Prism::Node), - child: T.any(Prism::ConstantReadNode, Prism::MissingNode), + name: T.nilable(Symbol), delimiter_loc: Prism::Location, + name_loc: Prism::Location, location: Prism::Location ).void end - def initialize(source, parent, child, delimiter_loc, location); end + def initialize(source, parent, name, delimiter_loc, name_loc, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#5350 + # source://prism//lib/prism/node.rb#5003 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5227 + # source://prism//lib/prism/node.rb#4888 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # The right-hand node of the path. Always a `ConstantReadNode` in a - # valid Ruby syntax tree. + # 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. # - # ::Foo - # ^^^ - # - # self::Test - # ^^^^ - # - # a.b::C - # ^ - # - # source://prism//lib/prism/node.rb#5285 - sig { returns(T.any(Prism::ConstantReadNode, Prism::MissingNode)) } + # source://prism//lib/prism/node_ext.rb#196 def child; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5232 + # source://prism//lib/prism/node.rb#4893 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5245 + # source://prism//lib/prism/node.rb#4905 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5237 + # source://prism//lib/prism/node.rb#4898 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?parent: Prism::node?, ?child: ConstantReadNode | MissingNode, ?delimiter_loc: Location, ?location: Location) -> ConstantPathNode + # def copy: (?parent: Prism::node?, ?name: Symbol?, ?delimiter_loc: Location, ?name_loc: Location, ?location: Location) -> ConstantPathNode # - # source://prism//lib/prism/node.rb#5250 + # source://prism//lib/prism/node.rb#4910 sig do params( parent: T.nilable(Prism::Node), - child: T.any(Prism::ConstantReadNode, Prism::MissingNode), + name: T.nilable(Symbol), delimiter_loc: Prism::Location, + name_loc: Prism::Location, location: Prism::Location ).returns(Prism::ConstantPathNode) end - def copy(parent: T.unsafe(nil), child: T.unsafe(nil), delimiter_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(parent: T.unsafe(nil), name: T.unsafe(nil), delimiter_loc: T.unsafe(nil), name_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5232 + # source://prism//lib/prism/node.rb#4893 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { parent: Prism::node?, child: ConstantReadNode | MissingNode, delimiter_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { parent: Prism::node?, name: Symbol?, delimiter_loc: Location, name_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#5258 + # source://prism//lib/prism/node.rb#4918 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#5301 + # source://prism//lib/prism/node.rb#4964 sig { returns(String) } def delimiter; end @@ -7208,7 +7305,7 @@ class Prism::ConstantPathNode < ::Prism::Node # One::Two # ^^ # - # source://prism//lib/prism/node.rb#5294 + # source://prism//lib/prism/node.rb#4944 sig { returns(Prism::Location) } def delimiter_loc; end @@ -7217,22 +7314,40 @@ class Prism::ConstantPathNode < ::Prism::Node # Returns the full name of this constant path. For example: "Foo::Bar" # - # source://prism//lib/prism/node_ext.rb#162 + # source://prism//lib/prism/node_ext.rb#189 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#141 + # source://prism//lib/prism/node_ext.rb#167 sig { returns(T::Array[Symbol]) } def full_name_parts; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String + # + # source://prism//lib/prism/node.rb#4969 + 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#4935 + sig { returns(T.nilable(Symbol)) } + def name; end + + # The location of the name of the constant. + # + # ::Foo + # ^^^ # - # source://prism//lib/prism/node.rb#5306 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # One::Two + # ^^^ + # + # source://prism//lib/prism/node.rb#4957 + 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. # @@ -7245,7 +7360,7 @@ class Prism::ConstantPathNode < ::Prism::Node # a.b::C # ^^^ # - # source://prism//lib/prism/node.rb#5272 + # source://prism//lib/prism/node.rb#4932 sig { returns(T.nilable(Prism::Node)) } def parent; end @@ -7264,7 +7379,7 @@ class Prism::ConstantPathNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#5334 + # source://prism//lib/prism/node.rb#4987 sig { override.returns(Symbol) } def type; end @@ -7276,7 +7391,7 @@ class Prism::ConstantPathNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#5344 + # source://prism//lib/prism/node.rb#4997 def type; end end end @@ -7288,14 +7403,14 @@ end # var::Bar::Baz -> raises because the first part of the constant path is a # local variable # -# source://prism//lib/prism/node_ext.rb#132 +# source://prism//lib/prism/node_ext.rb#158 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#137 +# source://prism//lib/prism/node_ext.rb#163 class Prism::ConstantPathNode::MissingNodesInConstantPathError < ::StandardError; end # Represents assigning to a constant path using an operator that isn't `=`. @@ -7303,106 +7418,118 @@ class Prism::ConstantPathNode::MissingNodesInConstantPathError < ::StandardError # Parent::Child += value # ^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#5362 +# source://prism//lib/prism/node.rb#5016 class Prism::ConstantPathOperatorWriteNode < ::Prism::Node - # def initialize: (ConstantPathNode target, Location operator_loc, Prism::node value, Symbol operator, Location location) -> void + # def initialize: (ConstantPathNode target, Location binary_operator_loc, Prism::node value, Symbol binary_operator, Location location) -> void # # @return [ConstantPathOperatorWriteNode] a new instance of ConstantPathOperatorWriteNode # - # source://prism//lib/prism/node.rb#5364 + # source://prism//lib/prism/node.rb#5018 sig do params( source: Prism::Source, target: Prism::ConstantPathNode, - operator_loc: Prism::Location, + binary_operator_loc: Prism::Location, value: Prism::Node, - operator: Symbol, + binary_operator: Symbol, location: Prism::Location ).void end - def initialize(source, target, operator_loc, value, operator, location); end + def initialize(source, target, binary_operator_loc, value, binary_operator, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#5465 + # source://prism//lib/prism/node.rb#5111 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5375 + # source://prism//lib/prism/node.rb#5028 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#5074 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#5064 + sig { returns(Prism::Location) } + def binary_operator_loc; end + # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5380 + # source://prism//lib/prism/node.rb#5033 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5390 + # source://prism//lib/prism/node.rb#5043 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5385 + # source://prism//lib/prism/node.rb#5038 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node, ?operator: Symbol, ?location: Location) -> ConstantPathOperatorWriteNode + # def copy: (?target: ConstantPathNode, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol, ?location: Location) -> ConstantPathOperatorWriteNode # - # source://prism//lib/prism/node.rb#5395 + # source://prism//lib/prism/node.rb#5048 sig do params( target: Prism::ConstantPathNode, - operator_loc: Prism::Location, + binary_operator_loc: Prism::Location, value: Prism::Node, - operator: Symbol, + binary_operator: Symbol, location: Prism::Location ).returns(Prism::ConstantPathOperatorWriteNode) end - def copy(target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), operator: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(target: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5380 + # source://prism//lib/prism/node.rb#5033 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Prism::node, operator: Symbol, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol, location: Location } # - # source://prism//lib/prism/node.rb#5403 + # source://prism//lib/prism/node.rb#5056 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#5424 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#5077 + sig { override.returns(String) } + def inspect; end - # attr_reader operator: Symbol + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. # - # source://prism//lib/prism/node.rb#5421 - sig { returns(Symbol) } + # source://prism//lib/prism/node_ext.rb#371 def operator; end - # attr_reader operator_loc: Location + # 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.rb#5411 - sig { returns(Prism::Location) } + # source://prism//lib/prism/node_ext.rb#378 def operator_loc; end # attr_reader target: ConstantPathNode # - # source://prism//lib/prism/node.rb#5408 + # source://prism//lib/prism/node.rb#5061 sig { returns(Prism::ConstantPathNode) } def target; end @@ -7421,13 +7548,13 @@ class Prism::ConstantPathOperatorWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#5449 + # source://prism//lib/prism/node.rb#5095 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#5418 + # source://prism//lib/prism/node.rb#5071 sig { returns(Prism::Node) } def value; end @@ -7439,7 +7566,7 @@ class Prism::ConstantPathOperatorWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#5459 + # source://prism//lib/prism/node.rb#5105 def type; end end end @@ -7449,13 +7576,13 @@ end # Parent::Child ||= value # ^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#5478 +# source://prism//lib/prism/node.rb#5124 class Prism::ConstantPathOrWriteNode < ::Prism::Node # def initialize: (ConstantPathNode target, Location operator_loc, Prism::node value, Location location) -> void # # @return [ConstantPathOrWriteNode] a new instance of ConstantPathOrWriteNode # - # source://prism//lib/prism/node.rb#5480 + # source://prism//lib/prism/node.rb#5126 sig do params( source: Prism::Source, @@ -7470,36 +7597,36 @@ class Prism::ConstantPathOrWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#5581 + # source://prism//lib/prism/node.rb#5220 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5490 + # source://prism//lib/prism/node.rb#5135 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#5495 + # source://prism//lib/prism/node.rb#5140 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5505 + # source://prism//lib/prism/node.rb#5150 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5500 + # source://prism//lib/prism/node.rb#5145 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ConstantPathOrWriteNode # - # source://prism//lib/prism/node.rb#5510 + # source://prism//lib/prism/node.rb#5155 sig do params( target: Prism::ConstantPathNode, @@ -7513,40 +7640,40 @@ class Prism::ConstantPathOrWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5495 + # source://prism//lib/prism/node.rb#5140 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#5518 + # source://prism//lib/prism/node.rb#5163 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#5541 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#5186 + sig { override.returns(String) } + def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#5536 + # source://prism//lib/prism/node.rb#5181 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#5526 + # source://prism//lib/prism/node.rb#5171 sig { returns(Prism::Location) } def operator_loc; end # attr_reader target: ConstantPathNode # - # source://prism//lib/prism/node.rb#5523 + # source://prism//lib/prism/node.rb#5168 sig { returns(Prism::ConstantPathNode) } def target; end @@ -7565,13 +7692,13 @@ class Prism::ConstantPathOrWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#5565 + # source://prism//lib/prism/node.rb#5204 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#5533 + # source://prism//lib/prism/node.rb#5178 sig { returns(Prism::Node) } def value; end @@ -7583,7 +7710,7 @@ class Prism::ConstantPathOrWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#5575 + # source://prism//lib/prism/node.rb#5214 def type; end end end @@ -7593,95 +7720,98 @@ end # Foo::Foo, Bar::Bar = baz # ^^^^^^^^ ^^^^^^^^ # -# source://prism//lib/prism/node.rb#5593 +# source://prism//lib/prism/node.rb#5232 class Prism::ConstantPathTargetNode < ::Prism::Node - # def initialize: (Prism::node? parent, ConstantReadNode | MissingNode child, Location delimiter_loc, Location location) -> void + # def initialize: (Prism::node? parent, Symbol? name, Location delimiter_loc, Location name_loc, Location location) -> void # # @return [ConstantPathTargetNode] a new instance of ConstantPathTargetNode # - # source://prism//lib/prism/node.rb#5595 + # source://prism//lib/prism/node.rb#5234 sig do params( source: Prism::Source, parent: T.nilable(Prism::Node), - child: T.any(Prism::ConstantReadNode, Prism::MissingNode), + name: T.nilable(Symbol), delimiter_loc: Prism::Location, + name_loc: Prism::Location, location: Prism::Location ).void end - def initialize(source, parent, child, delimiter_loc, location); end + def initialize(source, parent, name, delimiter_loc, name_loc, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#5703 + # source://prism//lib/prism/node.rb#5338 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5605 + # source://prism//lib/prism/node.rb#5244 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # attr_reader child: ConstantReadNode | MissingNode + # 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.rb#5644 - sig { returns(T.any(Prism::ConstantReadNode, Prism::MissingNode)) } + # source://prism//lib/prism/node_ext.rb#232 def child; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5610 + # source://prism//lib/prism/node.rb#5249 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5623 + # source://prism//lib/prism/node.rb#5261 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5615 + # source://prism//lib/prism/node.rb#5254 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?parent: Prism::node?, ?child: ConstantReadNode | MissingNode, ?delimiter_loc: Location, ?location: Location) -> ConstantPathTargetNode + # def copy: (?parent: Prism::node?, ?name: Symbol?, ?delimiter_loc: Location, ?name_loc: Location, ?location: Location) -> ConstantPathTargetNode # - # source://prism//lib/prism/node.rb#5628 + # source://prism//lib/prism/node.rb#5266 sig do params( parent: T.nilable(Prism::Node), - child: T.any(Prism::ConstantReadNode, Prism::MissingNode), + name: T.nilable(Symbol), delimiter_loc: Prism::Location, + name_loc: Prism::Location, location: Prism::Location ).returns(Prism::ConstantPathTargetNode) end - def copy(parent: T.unsafe(nil), child: T.unsafe(nil), delimiter_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(parent: T.unsafe(nil), name: T.unsafe(nil), delimiter_loc: T.unsafe(nil), name_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5610 + # source://prism//lib/prism/node.rb#5249 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { parent: Prism::node?, child: ConstantReadNode | MissingNode, delimiter_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { parent: Prism::node?, name: Symbol?, delimiter_loc: Location, name_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#5636 + # source://prism//lib/prism/node.rb#5274 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#5654 + # source://prism//lib/prism/node.rb#5299 sig { returns(String) } def delimiter; end # attr_reader delimiter_loc: Location # - # source://prism//lib/prism/node.rb#5647 + # source://prism//lib/prism/node.rb#5285 sig { returns(Prism::Location) } def delimiter_loc; end @@ -7690,26 +7820,38 @@ class Prism::ConstantPathTargetNode < ::Prism::Node # Returns the full name of this constant path. For example: "Foo::Bar" # - # source://prism//lib/prism/node_ext.rb#190 + # source://prism//lib/prism/node_ext.rb#225 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#170 + # source://prism//lib/prism/node_ext.rb#205 sig { returns(T::Array[Symbol]) } def full_name_parts; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String + # + # source://prism//lib/prism/node.rb#5304 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol? + # + # source://prism//lib/prism/node.rb#5282 + sig { returns(T.nilable(Symbol)) } + def name; end + + # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#5659 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#5292 + sig { returns(Prism::Location) } + def name_loc; end # attr_reader parent: Prism::node? # - # source://prism//lib/prism/node.rb#5641 + # source://prism//lib/prism/node.rb#5279 sig { returns(T.nilable(Prism::Node)) } def parent; end @@ -7728,7 +7870,7 @@ class Prism::ConstantPathTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#5687 + # source://prism//lib/prism/node.rb#5322 sig { override.returns(Symbol) } def type; end @@ -7740,7 +7882,7 @@ class Prism::ConstantPathTargetNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#5697 + # source://prism//lib/prism/node.rb#5332 def type; end end end @@ -7756,13 +7898,13 @@ end # ::Foo::Bar = 1 # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#5721 +# source://prism//lib/prism/node.rb#5357 class Prism::ConstantPathWriteNode < ::Prism::Node # def initialize: (ConstantPathNode target, Location operator_loc, Prism::node value, Location location) -> void # # @return [ConstantPathWriteNode] a new instance of ConstantPathWriteNode # - # source://prism//lib/prism/node.rb#5723 + # source://prism//lib/prism/node.rb#5359 sig do params( source: Prism::Source, @@ -7777,36 +7919,36 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#5836 + # source://prism//lib/prism/node.rb#5465 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5733 + # source://prism//lib/prism/node.rb#5368 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#5738 + # source://prism//lib/prism/node.rb#5373 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5748 + # source://prism//lib/prism/node.rb#5383 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5743 + # source://prism//lib/prism/node.rb#5378 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ConstantPathWriteNode # - # source://prism//lib/prism/node.rb#5753 + # source://prism//lib/prism/node.rb#5388 sig do params( target: Prism::ConstantPathNode, @@ -7820,28 +7962,28 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5738 + # source://prism//lib/prism/node.rb#5373 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#5761 + # source://prism//lib/prism/node.rb#5396 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#5796 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#5431 + sig { override.returns(String) } + def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#5791 + # source://prism//lib/prism/node.rb#5426 sig { returns(String) } def operator; end @@ -7850,7 +7992,7 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # ::ABC = 123 # ^ # - # source://prism//lib/prism/node.rb#5778 + # source://prism//lib/prism/node.rb#5413 sig { returns(Prism::Location) } def operator_loc; end @@ -7862,7 +8004,7 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # ::Foo = :abc # ^^^^^ # - # source://prism//lib/prism/node.rb#5772 + # source://prism//lib/prism/node.rb#5407 sig { returns(Prism::ConstantPathNode) } def target; end @@ -7881,7 +8023,7 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#5820 + # source://prism//lib/prism/node.rb#5449 sig { override.returns(Symbol) } def type; end @@ -7890,7 +8032,7 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # FOO::BAR = :abc # ^^^^ # - # source://prism//lib/prism/node.rb#5788 + # source://prism//lib/prism/node.rb#5423 sig { returns(Prism::Node) } def value; end @@ -7902,7 +8044,7 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#5830 + # source://prism//lib/prism/node.rb#5459 def type; end end end @@ -7912,62 +8054,62 @@ end # Foo # ^^^ # -# source://prism//lib/prism/node.rb#5848 +# source://prism//lib/prism/node.rb#5477 class Prism::ConstantReadNode < ::Prism::Node # def initialize: (Symbol name, Location location) -> void # # @return [ConstantReadNode] a new instance of ConstantReadNode # - # source://prism//lib/prism/node.rb#5850 + # source://prism//lib/prism/node.rb#5479 sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } def initialize(source, name, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#5934 + # source://prism//lib/prism/node.rb#5560 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5858 + # source://prism//lib/prism/node.rb#5486 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#5863 + # source://prism//lib/prism/node.rb#5491 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5873 + # source://prism//lib/prism/node.rb#5501 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5868 + # source://prism//lib/prism/node.rb#5496 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?location: Location) -> ConstantReadNode # - # source://prism//lib/prism/node.rb#5878 + # source://prism//lib/prism/node.rb#5506 sig { params(name: Symbol, location: Prism::Location).returns(Prism::ConstantReadNode) } def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5863 + # source://prism//lib/prism/node.rb#5491 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } # - # source://prism//lib/prism/node.rb#5886 + # source://prism//lib/prism/node.rb#5514 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -7976,22 +8118,22 @@ class Prism::ConstantReadNode < ::Prism::Node # Returns the full name of this constant. For example: "Foo" # - # source://prism//lib/prism/node_ext.rb#107 + # source://prism//lib/prism/node_ext.rb#133 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#102 + # source://prism//lib/prism/node_ext.rb#128 sig { returns(T::Array[Symbol]) } def full_name_parts; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#5898 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#5526 + sig { override.returns(String) } + def inspect; end # The name of the [constant](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#constants). # @@ -7999,7 +8141,7 @@ class Prism::ConstantReadNode < ::Prism::Node # # SOME_CONSTANT # name `:SOME_CONSTANT` # - # source://prism//lib/prism/node.rb#5895 + # source://prism//lib/prism/node.rb#5523 sig { returns(Symbol) } def name; end @@ -8018,7 +8160,7 @@ class Prism::ConstantReadNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#5918 + # source://prism//lib/prism/node.rb#5544 sig { override.returns(Symbol) } def type; end @@ -8030,7 +8172,7 @@ class Prism::ConstantReadNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#5928 + # source://prism//lib/prism/node.rb#5554 def type; end end end @@ -8040,62 +8182,62 @@ end # Foo, Bar = baz # ^^^ ^^^ # -# source://prism//lib/prism/node.rb#5944 +# source://prism//lib/prism/node.rb#5570 class Prism::ConstantTargetNode < ::Prism::Node # def initialize: (Symbol name, Location location) -> void # # @return [ConstantTargetNode] a new instance of ConstantTargetNode # - # source://prism//lib/prism/node.rb#5946 + # source://prism//lib/prism/node.rb#5572 sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } def initialize(source, name, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#6026 + # source://prism//lib/prism/node.rb#5649 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5954 + # source://prism//lib/prism/node.rb#5579 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#5959 + # source://prism//lib/prism/node.rb#5584 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5969 + # source://prism//lib/prism/node.rb#5594 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5964 + # source://prism//lib/prism/node.rb#5589 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?location: Location) -> ConstantTargetNode # - # source://prism//lib/prism/node.rb#5974 + # source://prism//lib/prism/node.rb#5599 sig { params(name: Symbol, location: Prism::Location).returns(Prism::ConstantTargetNode) } def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5959 + # source://prism//lib/prism/node.rb#5584 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } # - # source://prism//lib/prism/node.rb#5982 + # source://prism//lib/prism/node.rb#5607 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -8104,26 +8246,26 @@ class Prism::ConstantTargetNode < ::Prism::Node # Returns the full name of this constant. For example: "Foo" # - # source://prism//lib/prism/node_ext.rb#203 + # source://prism//lib/prism/node_ext.rb#246 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#198 + # source://prism//lib/prism/node_ext.rb#241 sig { returns(T::Array[Symbol]) } def full_name_parts; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#5990 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#5615 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#5987 + # source://prism//lib/prism/node.rb#5612 sig { returns(Symbol) } def name; end @@ -8142,7 +8284,7 @@ class Prism::ConstantTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#6010 + # source://prism//lib/prism/node.rb#5633 sig { override.returns(Symbol) } def type; end @@ -8154,7 +8296,7 @@ class Prism::ConstantTargetNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#6020 + # source://prism//lib/prism/node.rb#5643 def type; end end end @@ -8164,13 +8306,13 @@ end # Foo = 1 # ^^^^^^^ # -# source://prism//lib/prism/node.rb#6036 +# source://prism//lib/prism/node.rb#5659 class Prism::ConstantWriteNode < ::Prism::Node # def initialize: (Symbol name, Location name_loc, Prism::node value, Location operator_loc, Location location) -> void # # @return [ConstantWriteNode] a new instance of ConstantWriteNode # - # source://prism//lib/prism/node.rb#6038 + # source://prism//lib/prism/node.rb#5661 sig do params( source: Prism::Source, @@ -8186,36 +8328,36 @@ class Prism::ConstantWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#6163 + # source://prism//lib/prism/node.rb#5779 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6049 + # source://prism//lib/prism/node.rb#5671 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#6054 + # source://prism//lib/prism/node.rb#5676 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6064 + # source://prism//lib/prism/node.rb#5686 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6059 + # source://prism//lib/prism/node.rb#5681 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location, ?location: Location) -> ConstantWriteNode # - # source://prism//lib/prism/node.rb#6069 + # source://prism//lib/prism/node.rb#5691 sig do params( name: Symbol, @@ -8230,13 +8372,13 @@ class Prism::ConstantWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6054 + # source://prism//lib/prism/node.rb#5676 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#6077 + # source://prism//lib/prism/node.rb#5699 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -8245,22 +8387,22 @@ class Prism::ConstantWriteNode < ::Prism::Node # Returns the full name of this constant. For example: "Foo" # - # source://prism//lib/prism/node_ext.rb#120 + # source://prism//lib/prism/node_ext.rb#146 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#115 + # source://prism//lib/prism/node_ext.rb#141 sig { returns(T::Array[Symbol]) } def full_name_parts; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#6123 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#5745 + sig { override.returns(String) } + def inspect; end # The name of the [constant](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#constants). # @@ -8268,7 +8410,7 @@ class Prism::ConstantWriteNode < ::Prism::Node # # XYZ = 1 # name `:XYZ` # - # source://prism//lib/prism/node.rb#6086 + # source://prism//lib/prism/node.rb#5708 sig { returns(Symbol) } def name; end @@ -8277,13 +8419,13 @@ class Prism::ConstantWriteNode < ::Prism::Node # FOO = 1 # ^^^ # - # source://prism//lib/prism/node.rb#6092 + # source://prism//lib/prism/node.rb#5714 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#6118 + # source://prism//lib/prism/node.rb#5740 sig { returns(String) } def operator; end @@ -8292,7 +8434,7 @@ class Prism::ConstantWriteNode < ::Prism::Node # FOO = :bar # ^ # - # source://prism//lib/prism/node.rb#6111 + # source://prism//lib/prism/node.rb#5733 sig { returns(Prism::Location) } def operator_loc; end @@ -8311,7 +8453,7 @@ class Prism::ConstantWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#6147 + # source://prism//lib/prism/node.rb#5763 sig { override.returns(Symbol) } def type; end @@ -8323,7 +8465,7 @@ class Prism::ConstantWriteNode < ::Prism::Node # MyClass = Class.new # ^^^^^^^^^ # - # source://prism//lib/prism/node.rb#6105 + # source://prism//lib/prism/node.rb#5727 sig { returns(Prism::Node) } def value; end @@ -8335,7 +8477,7 @@ class Prism::ConstantWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#6157 + # source://prism//lib/prism/node.rb#5773 def type; end end end @@ -8343,7 +8485,7 @@ end # The DSL module provides a set of methods that can be used to create prism # nodes in a more concise manner. For example, instead of writing: # -# source = Prism::Source.new("[1]") +# source = Prism::Source.for("[1]") # # Prism::ArrayNode.new( # [ @@ -8361,7 +8503,7 @@ end # # you could instead write: # -# source = Prism::Source.new("[1]") +# source = Prism::Source.for("[1]") # # ArrayNode( # IntegerNode(Prism::IntegerBaseFlags::DECIMAL, 1, Location(source, 1, 1)), source), @@ -8475,7 +8617,7 @@ module Prism::DSL # Create a new CallOperatorWriteNode node # # source://prism//lib/prism/dsl.rb#146 - def CallOperatorWriteNode(flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + def CallOperatorWriteNode(flags, receiver, call_operator_loc, message_loc, read_name, write_name, binary_operator, binary_operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new CallOrWriteNode node # @@ -8515,7 +8657,7 @@ module Prism::DSL # Create a new ClassVariableOperatorWriteNode node # # source://prism//lib/prism/dsl.rb#186 - def ClassVariableOperatorWriteNode(name, name_loc, operator_loc, value, operator, source = T.unsafe(nil), location = T.unsafe(nil)); end + def ClassVariableOperatorWriteNode(name, name_loc, binary_operator_loc, value, binary_operator, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ClassVariableOrWriteNode node # @@ -8545,7 +8687,7 @@ module Prism::DSL # Create a new ConstantOperatorWriteNode node # # source://prism//lib/prism/dsl.rb#216 - def ConstantOperatorWriteNode(name, name_loc, operator_loc, value, operator, source = T.unsafe(nil), location = T.unsafe(nil)); end + def ConstantOperatorWriteNode(name, name_loc, binary_operator_loc, value, binary_operator, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ConstantOrWriteNode node # @@ -8560,12 +8702,12 @@ module Prism::DSL # Create a new ConstantPathNode node # # source://prism//lib/prism/dsl.rb#231 - def ConstantPathNode(parent, child, delimiter_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + def ConstantPathNode(parent, name, delimiter_loc, name_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ConstantPathOperatorWriteNode node # # source://prism//lib/prism/dsl.rb#236 - def ConstantPathOperatorWriteNode(target, operator_loc, value, operator, source = T.unsafe(nil), location = T.unsafe(nil)); end + def ConstantPathOperatorWriteNode(target, binary_operator_loc, value, binary_operator, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ConstantPathOrWriteNode node # @@ -8575,7 +8717,7 @@ module Prism::DSL # Create a new ConstantPathTargetNode node # # source://prism//lib/prism/dsl.rb#246 - def ConstantPathTargetNode(parent, child, delimiter_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + def ConstantPathTargetNode(parent, name, delimiter_loc, name_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ConstantPathWriteNode node # @@ -8675,7 +8817,7 @@ module Prism::DSL # Create a new GlobalVariableOperatorWriteNode node # # source://prism//lib/prism/dsl.rb#346 - def GlobalVariableOperatorWriteNode(name, name_loc, operator_loc, value, operator, source = T.unsafe(nil), location = T.unsafe(nil)); end + def GlobalVariableOperatorWriteNode(name, name_loc, binary_operator_loc, value, binary_operator, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new GlobalVariableOrWriteNode node # @@ -8740,7 +8882,7 @@ module Prism::DSL # Create a new IndexOperatorWriteNode node # # source://prism//lib/prism/dsl.rb#411 - def IndexOperatorWriteNode(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + def IndexOperatorWriteNode(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, binary_operator, binary_operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new IndexOrWriteNode node # @@ -8760,7 +8902,7 @@ module Prism::DSL # Create a new InstanceVariableOperatorWriteNode node # # source://prism//lib/prism/dsl.rb#431 - def InstanceVariableOperatorWriteNode(name, name_loc, operator_loc, value, operator, source = T.unsafe(nil), location = T.unsafe(nil)); end + def InstanceVariableOperatorWriteNode(name, name_loc, binary_operator_loc, value, binary_operator, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new InstanceVariableOrWriteNode node # @@ -8812,54 +8954,59 @@ module Prism::DSL # source://prism//lib/prism/dsl.rb#481 def InterpolatedXStringNode(opening_loc, parts, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end - # Create a new ItParametersNode node + # Create a new ItLocalVariableReadNode node # # source://prism//lib/prism/dsl.rb#486 + def ItLocalVariableReadNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ItParametersNode node + # + # source://prism//lib/prism/dsl.rb#491 def ItParametersNode(source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new KeywordHashNode node # - # source://prism//lib/prism/dsl.rb#491 + # source://prism//lib/prism/dsl.rb#496 def KeywordHashNode(flags, elements, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new KeywordRestParameterNode node # - # source://prism//lib/prism/dsl.rb#496 + # source://prism//lib/prism/dsl.rb#501 def KeywordRestParameterNode(flags, name, name_loc, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new LambdaNode node # - # source://prism//lib/prism/dsl.rb#501 + # source://prism//lib/prism/dsl.rb#506 def LambdaNode(locals, operator_loc, opening_loc, closing_loc, parameters, body, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new LocalVariableAndWriteNode node # - # source://prism//lib/prism/dsl.rb#506 + # source://prism//lib/prism/dsl.rb#511 def LocalVariableAndWriteNode(name_loc, operator_loc, value, name, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new LocalVariableOperatorWriteNode node # - # source://prism//lib/prism/dsl.rb#511 - def LocalVariableOperatorWriteNode(name_loc, operator_loc, value, name, operator, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#516 + def LocalVariableOperatorWriteNode(name_loc, binary_operator_loc, value, name, binary_operator, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new LocalVariableOrWriteNode node # - # source://prism//lib/prism/dsl.rb#516 + # source://prism//lib/prism/dsl.rb#521 def LocalVariableOrWriteNode(name_loc, operator_loc, value, name, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new LocalVariableReadNode node # - # source://prism//lib/prism/dsl.rb#521 + # source://prism//lib/prism/dsl.rb#526 def LocalVariableReadNode(name, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new LocalVariableTargetNode node # - # source://prism//lib/prism/dsl.rb#526 + # source://prism//lib/prism/dsl.rb#531 def LocalVariableTargetNode(name, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new LocalVariableWriteNode node # - # source://prism//lib/prism/dsl.rb#531 + # source://prism//lib/prism/dsl.rb#536 def LocalVariableWriteNode(name, depth, name_loc, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new Location object @@ -8869,425 +9016,283 @@ module Prism::DSL # Create a new MatchLastLineNode node # - # source://prism//lib/prism/dsl.rb#536 + # source://prism//lib/prism/dsl.rb#541 def MatchLastLineNode(flags, opening_loc, content_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new MatchPredicateNode node # - # source://prism//lib/prism/dsl.rb#541 + # source://prism//lib/prism/dsl.rb#546 def MatchPredicateNode(value, pattern, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new MatchRequiredNode node # - # source://prism//lib/prism/dsl.rb#546 + # source://prism//lib/prism/dsl.rb#551 def MatchRequiredNode(value, pattern, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new MatchWriteNode node # - # source://prism//lib/prism/dsl.rb#551 + # source://prism//lib/prism/dsl.rb#556 def MatchWriteNode(call, targets, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new MissingNode node # - # source://prism//lib/prism/dsl.rb#556 + # source://prism//lib/prism/dsl.rb#561 def MissingNode(source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ModuleNode node # - # source://prism//lib/prism/dsl.rb#561 + # source://prism//lib/prism/dsl.rb#566 def ModuleNode(locals, module_keyword_loc, constant_path, body, end_keyword_loc, name, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new MultiTargetNode node # - # source://prism//lib/prism/dsl.rb#566 + # source://prism//lib/prism/dsl.rb#571 def MultiTargetNode(lefts, rest, rights, lparen_loc, rparen_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new MultiWriteNode node # - # source://prism//lib/prism/dsl.rb#571 + # source://prism//lib/prism/dsl.rb#576 def MultiWriteNode(lefts, rest, rights, lparen_loc, rparen_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new NextNode node # - # source://prism//lib/prism/dsl.rb#576 + # source://prism//lib/prism/dsl.rb#581 def NextNode(arguments, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new NilNode node # - # source://prism//lib/prism/dsl.rb#581 + # source://prism//lib/prism/dsl.rb#586 def NilNode(source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new NoKeywordsParameterNode node # - # source://prism//lib/prism/dsl.rb#586 + # source://prism//lib/prism/dsl.rb#591 def NoKeywordsParameterNode(operator_loc, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new NumberedParametersNode node # - # source://prism//lib/prism/dsl.rb#591 + # source://prism//lib/prism/dsl.rb#596 def NumberedParametersNode(maximum, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new NumberedReferenceReadNode node # - # source://prism//lib/prism/dsl.rb#596 + # source://prism//lib/prism/dsl.rb#601 def NumberedReferenceReadNode(number, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new OptionalKeywordParameterNode node # - # source://prism//lib/prism/dsl.rb#601 + # source://prism//lib/prism/dsl.rb#606 def OptionalKeywordParameterNode(flags, name, name_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new OptionalParameterNode node # - # source://prism//lib/prism/dsl.rb#606 + # source://prism//lib/prism/dsl.rb#611 def OptionalParameterNode(flags, name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new OrNode node # - # source://prism//lib/prism/dsl.rb#611 + # source://prism//lib/prism/dsl.rb#616 def OrNode(left, right, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ParametersNode node # - # source://prism//lib/prism/dsl.rb#616 + # source://prism//lib/prism/dsl.rb#621 def ParametersNode(requireds, optionals, rest, posts, keywords, keyword_rest, block, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ParenthesesNode node # - # source://prism//lib/prism/dsl.rb#621 + # source://prism//lib/prism/dsl.rb#626 def ParenthesesNode(body, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new PinnedExpressionNode node # - # source://prism//lib/prism/dsl.rb#626 + # source://prism//lib/prism/dsl.rb#631 def PinnedExpressionNode(expression, operator_loc, lparen_loc, rparen_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new PinnedVariableNode node # - # source://prism//lib/prism/dsl.rb#631 + # source://prism//lib/prism/dsl.rb#636 def PinnedVariableNode(variable, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new PostExecutionNode node # - # source://prism//lib/prism/dsl.rb#636 + # source://prism//lib/prism/dsl.rb#641 def PostExecutionNode(statements, keyword_loc, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new PreExecutionNode node # - # source://prism//lib/prism/dsl.rb#641 + # source://prism//lib/prism/dsl.rb#646 def PreExecutionNode(statements, keyword_loc, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ProgramNode node # - # source://prism//lib/prism/dsl.rb#646 + # source://prism//lib/prism/dsl.rb#651 def ProgramNode(locals, statements, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new RangeNode node # - # source://prism//lib/prism/dsl.rb#651 + # source://prism//lib/prism/dsl.rb#656 def RangeNode(flags, left, right, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new RationalNode node # - # source://prism//lib/prism/dsl.rb#656 - def RationalNode(numeric, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#661 + def RationalNode(flags, numerator, denominator, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new RedoNode node # - # source://prism//lib/prism/dsl.rb#661 + # source://prism//lib/prism/dsl.rb#666 def RedoNode(source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new RegularExpressionNode node # - # source://prism//lib/prism/dsl.rb#666 + # source://prism//lib/prism/dsl.rb#671 def RegularExpressionNode(flags, opening_loc, content_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new RequiredKeywordParameterNode node # - # source://prism//lib/prism/dsl.rb#671 + # source://prism//lib/prism/dsl.rb#676 def RequiredKeywordParameterNode(flags, name, name_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new RequiredParameterNode node # - # source://prism//lib/prism/dsl.rb#676 + # source://prism//lib/prism/dsl.rb#681 def RequiredParameterNode(flags, name, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new RescueModifierNode node # - # source://prism//lib/prism/dsl.rb#681 + # source://prism//lib/prism/dsl.rb#686 def RescueModifierNode(expression, keyword_loc, rescue_expression, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new RescueNode node # - # source://prism//lib/prism/dsl.rb#686 + # source://prism//lib/prism/dsl.rb#691 def RescueNode(keyword_loc, exceptions, operator_loc, reference, statements, consequent, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new RestParameterNode node # - # source://prism//lib/prism/dsl.rb#691 + # source://prism//lib/prism/dsl.rb#696 def RestParameterNode(flags, name, name_loc, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new RetryNode node # - # source://prism//lib/prism/dsl.rb#696 + # source://prism//lib/prism/dsl.rb#701 def RetryNode(source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ReturnNode node # - # source://prism//lib/prism/dsl.rb#701 - def ReturnNode(keyword_loc, arguments, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#706 + def ReturnNode(flags, keyword_loc, arguments, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new SelfNode node # - # source://prism//lib/prism/dsl.rb#706 + # source://prism//lib/prism/dsl.rb#711 def SelfNode(source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ShareableConstantNode node # - # source://prism//lib/prism/dsl.rb#711 + # source://prism//lib/prism/dsl.rb#716 def ShareableConstantNode(flags, write, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new SingletonClassNode node # - # source://prism//lib/prism/dsl.rb#716 + # source://prism//lib/prism/dsl.rb#721 def SingletonClassNode(locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new SourceEncodingNode node # - # source://prism//lib/prism/dsl.rb#721 + # source://prism//lib/prism/dsl.rb#726 def SourceEncodingNode(source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new SourceFileNode node # - # source://prism//lib/prism/dsl.rb#726 + # source://prism//lib/prism/dsl.rb#731 def SourceFileNode(flags, filepath, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new SourceLineNode node # - # source://prism//lib/prism/dsl.rb#731 + # source://prism//lib/prism/dsl.rb#736 def SourceLineNode(source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new SplatNode node # - # source://prism//lib/prism/dsl.rb#736 + # source://prism//lib/prism/dsl.rb#741 def SplatNode(operator_loc, expression, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new StatementsNode node # - # source://prism//lib/prism/dsl.rb#741 + # source://prism//lib/prism/dsl.rb#746 def StatementsNode(body, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new StringNode node # - # source://prism//lib/prism/dsl.rb#746 + # source://prism//lib/prism/dsl.rb#751 def StringNode(flags, opening_loc, content_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new SuperNode node # - # source://prism//lib/prism/dsl.rb#751 + # source://prism//lib/prism/dsl.rb#756 def SuperNode(keyword_loc, lparen_loc, arguments, rparen_loc, block, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new SymbolNode node # - # source://prism//lib/prism/dsl.rb#756 + # source://prism//lib/prism/dsl.rb#761 def SymbolNode(flags, opening_loc, value_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new TrueNode node # - # source://prism//lib/prism/dsl.rb#761 + # source://prism//lib/prism/dsl.rb#766 def TrueNode(source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new UndefNode node # - # source://prism//lib/prism/dsl.rb#766 + # source://prism//lib/prism/dsl.rb#771 def UndefNode(names, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new UnlessNode node # - # source://prism//lib/prism/dsl.rb#771 + # source://prism//lib/prism/dsl.rb#776 def UnlessNode(keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new UntilNode node # - # source://prism//lib/prism/dsl.rb#776 + # source://prism//lib/prism/dsl.rb#781 def UntilNode(flags, keyword_loc, closing_loc, predicate, statements, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new WhenNode node # - # source://prism//lib/prism/dsl.rb#781 + # source://prism//lib/prism/dsl.rb#786 def WhenNode(keyword_loc, conditions, then_keyword_loc, statements, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new WhileNode node # - # source://prism//lib/prism/dsl.rb#786 + # source://prism//lib/prism/dsl.rb#791 def WhileNode(flags, keyword_loc, closing_loc, predicate, statements, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new XStringNode node # - # source://prism//lib/prism/dsl.rb#791 + # source://prism//lib/prism/dsl.rb#796 def XStringNode(flags, opening_loc, content_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new YieldNode node # - # source://prism//lib/prism/dsl.rb#796 + # source://prism//lib/prism/dsl.rb#801 def YieldNode(keyword_loc, lparen_loc, arguments, rparen_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end end -# This module is used for testing and debugging and is not meant to be used by -# consumers of this library. -# -# source://prism//lib/prism/debug.rb#6 -module Prism::Debug - class << self - # :call-seq: - # Debug::cruby_locals(source) -> Array - # - # For the given source, compiles with CRuby and returns a list of all of the - # sets of local variables that were encountered. - # - # source://prism//lib/prism/debug.rb#54 - def cruby_locals(source); end - - def format_errors(_arg0, _arg1); end - def inspect_node(_arg0); end - def integer_parse(_arg0); end - def memsize(_arg0); end - def named_captures(_arg0); end - - # :call-seq: - # Debug::newlines(source) -> Array - # - # For the given source string, return the byte offsets of every newline in - # the source. - # - # source://prism//lib/prism/debug.rb#202 - def newlines(source); end - - # :call-seq: - # Debug::prism_locals(source) -> Array - # - # For the given source, parses with prism and returns a list of all of the - # sets of local variables that were encountered. - # - # source://prism//lib/prism/debug.rb#98 - def prism_locals(source); end - - def profile_file(_arg0); end - def static_inspect(*_arg0); end - end -end - -# Used to hold the place of a local that will be in the local table but -# cannot be accessed directly from the source code. For example, the -# iteration variable in a for loop or the positional parameter on a method -# definition that is destructured. -# -# source://prism//lib/prism/debug.rb#90 -Prism::Debug::AnonymousLocal = T.let(T.unsafe(nil), Object) - -# A wrapping around prism's internal encoding data structures. This is used -# for reflection and debugging purposes. -# -# source://prism//lib/prism/debug.rb#208 -class Prism::Debug::Encoding - # Initialize a new encoding with the given name and whether or not it is - # a multibyte encoding. - # - # @return [Encoding] a new instance of Encoding - # - # source://prism//lib/prism/debug.rb#214 - def initialize(name, multibyte); end - - # Returns true if the first character in the source string is a valid - # alphanumeric character for the encoding. - # - # @return [Boolean] - # - # source://prism//lib/prism/debug.rb#232 - def alnum?(source); end - - # Returns true if the first character in the source string is a valid - # alphabetic character for the encoding. - # - # @return [Boolean] - # - # source://prism//lib/prism/debug.rb#238 - def alpha?(source); end - - # Whether or not the encoding is a multibyte encoding. - # - # @return [Boolean] - # - # source://prism//lib/prism/debug.rb#220 - def multibyte?; end - - # The name of the encoding, that can be passed to Encoding.find. - # - # source://prism//lib/prism/debug.rb#210 - def name; end - - # Returns true if the first character in the source string is a valid - # uppercase character for the encoding. - # - # @return [Boolean] - # - # source://prism//lib/prism/debug.rb#244 - def upper?(source); end - - # Returns the number of bytes of the first character in the source string, - # if it is valid for the encoding. Otherwise, returns 0. - # - # source://prism//lib/prism/debug.rb#226 - def width(source); end - - class << self - def _alnum?(_arg0, _arg1); end - def _alpha?(_arg0, _arg1); end - def _upper?(_arg0, _arg1); end - def _width(_arg0, _arg1); end - def all; end - end -end - -# A wrapper around a RubyVM::InstructionSequence that provides a more -# convenient interface for accessing parts of the iseq. -# -# source://prism//lib/prism/debug.rb#9 -class Prism::Debug::ISeq - # @return [ISeq] a new instance of ISeq - # - # source://prism//lib/prism/debug.rb#12 - def initialize(parts); end - - # source://prism//lib/prism/debug.rb#28 - def each_child; end - - # source://prism//lib/prism/debug.rb#24 - def instructions; end - - # source://prism//lib/prism/debug.rb#20 - def local_table; end - - # source://prism//lib/prism/debug.rb#10 - def parts; end - - # source://prism//lib/prism/debug.rb#16 - def type; end -end - # Represents a method definition. # # def method # end # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#6177 +# source://prism//lib/prism/node.rb#5793 class Prism::DefNode < ::Prism::Node # def initialize: (Symbol name, Location name_loc, Prism::node? receiver, ParametersNode? parameters, Prism::node? body, Array[Symbol] locals, Location def_keyword_loc, Location? operator_loc, Location? lparen_loc, Location? rparen_loc, Location? equal_loc, Location? end_keyword_loc, Location location) -> void # # @return [DefNode] a new instance of DefNode # - # source://prism//lib/prism/node.rb#6179 + # source://prism//lib/prism/node.rb#5795 sig do params( source: Prism::Source, @@ -9311,42 +9316,42 @@ class Prism::DefNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#6421 + # source://prism//lib/prism/node.rb#6008 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6198 + # source://prism//lib/prism/node.rb#5813 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: Prism::node? # - # source://prism//lib/prism/node.rb#6251 + # source://prism//lib/prism/node.rb#5866 sig { returns(T.nilable(Prism::Node)) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6203 + # source://prism//lib/prism/node.rb#5818 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6217 + # source://prism//lib/prism/node.rb#5832 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6208 + # source://prism//lib/prism/node.rb#5823 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?name_loc: Location, ?receiver: Prism::node?, ?parameters: ParametersNode?, ?body: Prism::node?, ?locals: Array[Symbol], ?def_keyword_loc: Location, ?operator_loc: Location?, ?lparen_loc: Location?, ?rparen_loc: Location?, ?equal_loc: Location?, ?end_keyword_loc: Location?, ?location: Location) -> DefNode # - # source://prism//lib/prism/node.rb#6222 + # source://prism//lib/prism/node.rb#5837 sig do params( name: Symbol, @@ -9369,124 +9374,124 @@ class Prism::DefNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6203 + # source://prism//lib/prism/node.rb#5818 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, receiver: Prism::node?, parameters: ParametersNode?, body: Prism::node?, locals: Array[Symbol], def_keyword_loc: Location, operator_loc: Location?, lparen_loc: Location?, rparen_loc: Location?, equal_loc: Location?, end_keyword_loc: Location?, location: Location } # - # source://prism//lib/prism/node.rb#6230 + # source://prism//lib/prism/node.rb#5845 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#6329 + # source://prism//lib/prism/node.rb#5944 sig { returns(String) } def def_keyword; end # attr_reader def_keyword_loc: Location # - # source://prism//lib/prism/node.rb#6257 + # source://prism//lib/prism/node.rb#5872 sig { returns(Prism::Location) } def def_keyword_loc; end # def end_keyword: () -> String? # - # source://prism//lib/prism/node.rb#6354 + # source://prism//lib/prism/node.rb#5969 sig { returns(T.nilable(String)) } def end_keyword; end # attr_reader end_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#6316 + # source://prism//lib/prism/node.rb#5931 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end # def equal: () -> String? # - # source://prism//lib/prism/node.rb#6349 + # source://prism//lib/prism/node.rb#5964 sig { returns(T.nilable(String)) } def equal; end # attr_reader equal_loc: Location? # - # source://prism//lib/prism/node.rb#6303 + # source://prism//lib/prism/node.rb#5918 sig { returns(T.nilable(Prism::Location)) } def equal_loc; end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#6359 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#5974 + sig { override.returns(String) } + def inspect; end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#6254 + # source://prism//lib/prism/node.rb#5869 sig { returns(T::Array[Symbol]) } def locals; end # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#6339 + # source://prism//lib/prism/node.rb#5954 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#6277 + # source://prism//lib/prism/node.rb#5892 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#6235 + # source://prism//lib/prism/node.rb#5850 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#6238 + # source://prism//lib/prism/node.rb#5853 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String? # - # source://prism//lib/prism/node.rb#6334 + # source://prism//lib/prism/node.rb#5949 sig { returns(T.nilable(String)) } def operator; end # attr_reader operator_loc: Location? # - # source://prism//lib/prism/node.rb#6264 + # source://prism//lib/prism/node.rb#5879 sig { returns(T.nilable(Prism::Location)) } def operator_loc; end # attr_reader parameters: ParametersNode? # - # source://prism//lib/prism/node.rb#6248 + # source://prism//lib/prism/node.rb#5863 sig { returns(T.nilable(Prism::ParametersNode)) } def parameters; end # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#6245 + # source://prism//lib/prism/node.rb#5860 sig { returns(T.nilable(Prism::Node)) } def receiver; end # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#6344 + # source://prism//lib/prism/node.rb#5959 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#6290 + # source://prism//lib/prism/node.rb#5905 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end @@ -9505,7 +9510,7 @@ class Prism::DefNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#6405 + # source://prism//lib/prism/node.rb#5992 sig { override.returns(Symbol) } def type; end @@ -9517,7 +9522,7 @@ class Prism::DefNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#6415 + # source://prism//lib/prism/node.rb#6002 def type; end end end @@ -9527,13 +9532,13 @@ end # defined?(a) # ^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#6443 +# source://prism//lib/prism/node.rb#6030 class Prism::DefinedNode < ::Prism::Node # def initialize: (Location? lparen_loc, Prism::node value, Location? rparen_loc, Location keyword_loc, Location location) -> void # # @return [DefinedNode] a new instance of DefinedNode # - # source://prism//lib/prism/node.rb#6445 + # source://prism//lib/prism/node.rb#6032 sig do params( source: Prism::Source, @@ -9549,36 +9554,36 @@ class Prism::DefinedNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#6580 + # source://prism//lib/prism/node.rb#6160 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6456 + # source://prism//lib/prism/node.rb#6042 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#6461 + # source://prism//lib/prism/node.rb#6047 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6471 + # source://prism//lib/prism/node.rb#6057 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6466 + # source://prism//lib/prism/node.rb#6052 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?lparen_loc: Location?, ?value: Prism::node, ?rparen_loc: Location?, ?keyword_loc: Location, ?location: Location) -> DefinedNode # - # source://prism//lib/prism/node.rb#6476 + # source://prism//lib/prism/node.rb#6062 sig do params( lparen_loc: T.nilable(Prism::Location), @@ -9593,58 +9598,58 @@ class Prism::DefinedNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6461 + # source://prism//lib/prism/node.rb#6047 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { lparen_loc: Location?, value: Prism::node, rparen_loc: Location?, keyword_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#6484 + # source://prism//lib/prism/node.rb#6070 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#6540 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#6126 + sig { override.returns(String) } + def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#6535 + # source://prism//lib/prism/node.rb#6121 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#6518 + # source://prism//lib/prism/node.rb#6104 sig { returns(Prism::Location) } def keyword_loc; end # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#6525 + # source://prism//lib/prism/node.rb#6111 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#6489 + # source://prism//lib/prism/node.rb#6075 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#6530 + # source://prism//lib/prism/node.rb#6116 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#6505 + # source://prism//lib/prism/node.rb#6091 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end @@ -9663,13 +9668,13 @@ class Prism::DefinedNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#6564 + # source://prism//lib/prism/node.rb#6144 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#6502 + # source://prism//lib/prism/node.rb#6088 sig { returns(Prism::Node) } def value; end @@ -9681,7 +9686,7 @@ class Prism::DefinedNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#6574 + # source://prism//lib/prism/node.rb#6154 def type; end end end @@ -9729,8 +9734,6 @@ end # # source://prism//lib/prism/desugar_compiler.rb#218 class Prism::DesugarCompiler < ::Prism::MutationCompiler - Result = type_member { { fixed: Prism::Node } } - # @@foo &&= bar # # becomes @@ -10557,1145 +10560,1156 @@ class Prism::Dispatcher < ::Prism::Visitor # source://prism//lib/prism/dispatcher.rb#759 def visit_interpolated_x_string_node(node); end - # Dispatch enter and leave events for ItParametersNode nodes and continue + # Dispatch enter and leave events for ItLocalVariableReadNode nodes and continue # walking the tree. # # source://prism//lib/prism/dispatcher.rb#767 + 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#775 def visit_it_parameters_node(node); end # Dispatch enter and leave events for KeywordHashNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#775 + # source://prism//lib/prism/dispatcher.rb#783 def visit_keyword_hash_node(node); end # Dispatch enter and leave events for KeywordRestParameterNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#783 + # source://prism//lib/prism/dispatcher.rb#791 def visit_keyword_rest_parameter_node(node); end # Dispatch enter and leave events for LambdaNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#791 + # source://prism//lib/prism/dispatcher.rb#799 def visit_lambda_node(node); end # Dispatch enter and leave events for LocalVariableAndWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#799 + # source://prism//lib/prism/dispatcher.rb#807 def visit_local_variable_and_write_node(node); end # Dispatch enter and leave events for LocalVariableOperatorWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#807 + # source://prism//lib/prism/dispatcher.rb#815 def visit_local_variable_operator_write_node(node); end # Dispatch enter and leave events for LocalVariableOrWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#815 + # source://prism//lib/prism/dispatcher.rb#823 def visit_local_variable_or_write_node(node); end # Dispatch enter and leave events for LocalVariableReadNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#823 + # source://prism//lib/prism/dispatcher.rb#831 def visit_local_variable_read_node(node); end # Dispatch enter and leave events for LocalVariableTargetNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#831 + # source://prism//lib/prism/dispatcher.rb#839 def visit_local_variable_target_node(node); end # Dispatch enter and leave events for LocalVariableWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#839 + # source://prism//lib/prism/dispatcher.rb#847 def visit_local_variable_write_node(node); end # Dispatch enter and leave events for MatchLastLineNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#847 + # source://prism//lib/prism/dispatcher.rb#855 def visit_match_last_line_node(node); end # Dispatch enter and leave events for MatchPredicateNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#855 + # source://prism//lib/prism/dispatcher.rb#863 def visit_match_predicate_node(node); end # Dispatch enter and leave events for MatchRequiredNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#863 + # source://prism//lib/prism/dispatcher.rb#871 def visit_match_required_node(node); end # Dispatch enter and leave events for MatchWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#871 + # source://prism//lib/prism/dispatcher.rb#879 def visit_match_write_node(node); end # Dispatch enter and leave events for MissingNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#879 + # source://prism//lib/prism/dispatcher.rb#887 def visit_missing_node(node); end # Dispatch enter and leave events for ModuleNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#887 + # source://prism//lib/prism/dispatcher.rb#895 def visit_module_node(node); end # Dispatch enter and leave events for MultiTargetNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#895 + # source://prism//lib/prism/dispatcher.rb#903 def visit_multi_target_node(node); end # Dispatch enter and leave events for MultiWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#903 + # source://prism//lib/prism/dispatcher.rb#911 def visit_multi_write_node(node); end # Dispatch enter and leave events for NextNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#911 + # source://prism//lib/prism/dispatcher.rb#919 def visit_next_node(node); end # Dispatch enter and leave events for NilNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#919 + # source://prism//lib/prism/dispatcher.rb#927 def visit_nil_node(node); end # Dispatch enter and leave events for NoKeywordsParameterNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#927 + # source://prism//lib/prism/dispatcher.rb#935 def visit_no_keywords_parameter_node(node); end # Dispatch enter and leave events for NumberedParametersNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#935 + # source://prism//lib/prism/dispatcher.rb#943 def visit_numbered_parameters_node(node); end # Dispatch enter and leave events for NumberedReferenceReadNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#943 + # source://prism//lib/prism/dispatcher.rb#951 def visit_numbered_reference_read_node(node); end # Dispatch enter and leave events for OptionalKeywordParameterNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#951 + # source://prism//lib/prism/dispatcher.rb#959 def visit_optional_keyword_parameter_node(node); end # Dispatch enter and leave events for OptionalParameterNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#959 + # source://prism//lib/prism/dispatcher.rb#967 def visit_optional_parameter_node(node); end # Dispatch enter and leave events for OrNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#967 + # source://prism//lib/prism/dispatcher.rb#975 def visit_or_node(node); end # Dispatch enter and leave events for ParametersNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#975 + # source://prism//lib/prism/dispatcher.rb#983 def visit_parameters_node(node); end # Dispatch enter and leave events for ParenthesesNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#983 + # source://prism//lib/prism/dispatcher.rb#991 def visit_parentheses_node(node); end # Dispatch enter and leave events for PinnedExpressionNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#991 + # source://prism//lib/prism/dispatcher.rb#999 def visit_pinned_expression_node(node); end # Dispatch enter and leave events for PinnedVariableNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#999 + # source://prism//lib/prism/dispatcher.rb#1007 def visit_pinned_variable_node(node); end # Dispatch enter and leave events for PostExecutionNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1007 + # source://prism//lib/prism/dispatcher.rb#1015 def visit_post_execution_node(node); end # Dispatch enter and leave events for PreExecutionNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1015 + # source://prism//lib/prism/dispatcher.rb#1023 def visit_pre_execution_node(node); end # Dispatch enter and leave events for ProgramNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1023 + # source://prism//lib/prism/dispatcher.rb#1031 def visit_program_node(node); end # Dispatch enter and leave events for RangeNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1031 + # source://prism//lib/prism/dispatcher.rb#1039 def visit_range_node(node); end # Dispatch enter and leave events for RationalNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1039 + # source://prism//lib/prism/dispatcher.rb#1047 def visit_rational_node(node); end # Dispatch enter and leave events for RedoNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1047 + # source://prism//lib/prism/dispatcher.rb#1055 def visit_redo_node(node); end # Dispatch enter and leave events for RegularExpressionNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1055 + # source://prism//lib/prism/dispatcher.rb#1063 def visit_regular_expression_node(node); end # Dispatch enter and leave events for RequiredKeywordParameterNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1063 + # source://prism//lib/prism/dispatcher.rb#1071 def visit_required_keyword_parameter_node(node); end # Dispatch enter and leave events for RequiredParameterNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1071 + # source://prism//lib/prism/dispatcher.rb#1079 def visit_required_parameter_node(node); end # Dispatch enter and leave events for RescueModifierNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1079 + # source://prism//lib/prism/dispatcher.rb#1087 def visit_rescue_modifier_node(node); end # Dispatch enter and leave events for RescueNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1087 + # source://prism//lib/prism/dispatcher.rb#1095 def visit_rescue_node(node); end # Dispatch enter and leave events for RestParameterNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1095 + # source://prism//lib/prism/dispatcher.rb#1103 def visit_rest_parameter_node(node); end # Dispatch enter and leave events for RetryNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1103 + # source://prism//lib/prism/dispatcher.rb#1111 def visit_retry_node(node); end # Dispatch enter and leave events for ReturnNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1111 + # source://prism//lib/prism/dispatcher.rb#1119 def visit_return_node(node); end # Dispatch enter and leave events for SelfNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1119 + # source://prism//lib/prism/dispatcher.rb#1127 def visit_self_node(node); end # Dispatch enter and leave events for ShareableConstantNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1127 + # source://prism//lib/prism/dispatcher.rb#1135 def visit_shareable_constant_node(node); end # Dispatch enter and leave events for SingletonClassNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1135 + # source://prism//lib/prism/dispatcher.rb#1143 def visit_singleton_class_node(node); end # Dispatch enter and leave events for SourceEncodingNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1143 + # source://prism//lib/prism/dispatcher.rb#1151 def visit_source_encoding_node(node); end # Dispatch enter and leave events for SourceFileNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1151 + # source://prism//lib/prism/dispatcher.rb#1159 def visit_source_file_node(node); end # Dispatch enter and leave events for SourceLineNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1159 + # source://prism//lib/prism/dispatcher.rb#1167 def visit_source_line_node(node); end # Dispatch enter and leave events for SplatNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1167 + # source://prism//lib/prism/dispatcher.rb#1175 def visit_splat_node(node); end # Dispatch enter and leave events for StatementsNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1175 + # source://prism//lib/prism/dispatcher.rb#1183 def visit_statements_node(node); end # Dispatch enter and leave events for StringNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1183 + # source://prism//lib/prism/dispatcher.rb#1191 def visit_string_node(node); end # Dispatch enter and leave events for SuperNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1191 + # source://prism//lib/prism/dispatcher.rb#1199 def visit_super_node(node); end # Dispatch enter and leave events for SymbolNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1199 + # source://prism//lib/prism/dispatcher.rb#1207 def visit_symbol_node(node); end # Dispatch enter and leave events for TrueNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1207 + # source://prism//lib/prism/dispatcher.rb#1215 def visit_true_node(node); end # Dispatch enter and leave events for UndefNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1215 + # source://prism//lib/prism/dispatcher.rb#1223 def visit_undef_node(node); end # Dispatch enter and leave events for UnlessNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1223 + # source://prism//lib/prism/dispatcher.rb#1231 def visit_unless_node(node); end # Dispatch enter and leave events for UntilNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1231 + # source://prism//lib/prism/dispatcher.rb#1239 def visit_until_node(node); end # Dispatch enter and leave events for WhenNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1239 + # source://prism//lib/prism/dispatcher.rb#1247 def visit_when_node(node); end # Dispatch enter and leave events for WhileNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1247 + # source://prism//lib/prism/dispatcher.rb#1255 def visit_while_node(node); end # Dispatch enter and leave events for XStringNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1255 + # source://prism//lib/prism/dispatcher.rb#1263 def visit_x_string_node(node); end # Dispatch enter and leave events for YieldNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1263 + # source://prism//lib/prism/dispatcher.rb#1271 def visit_yield_node(node); end end -# source://prism//lib/prism/dispatcher.rb#1269 +# source://prism//lib/prism/dispatcher.rb#1277 class Prism::Dispatcher::DispatchOnce < ::Prism::Visitor # @return [DispatchOnce] a new instance of DispatchOnce # - # source://prism//lib/prism/dispatcher.rb#1272 + # source://prism//lib/prism/dispatcher.rb#1280 def initialize(listeners); end # Returns the value of attribute listeners. # - # source://prism//lib/prism/dispatcher.rb#1270 + # source://prism//lib/prism/dispatcher.rb#1278 def listeners; end # Dispatch enter and leave events for AliasGlobalVariableNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1277 + # source://prism//lib/prism/dispatcher.rb#1285 def visit_alias_global_variable_node(node); end # Dispatch enter and leave events for AliasMethodNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1283 + # source://prism//lib/prism/dispatcher.rb#1291 def visit_alias_method_node(node); end # Dispatch enter and leave events for AlternationPatternNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1289 + # source://prism//lib/prism/dispatcher.rb#1297 def visit_alternation_pattern_node(node); end # Dispatch enter and leave events for AndNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1295 + # source://prism//lib/prism/dispatcher.rb#1303 def visit_and_node(node); end # Dispatch enter and leave events for ArgumentsNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1301 + # source://prism//lib/prism/dispatcher.rb#1309 def visit_arguments_node(node); end # Dispatch enter and leave events for ArrayNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1307 + # source://prism//lib/prism/dispatcher.rb#1315 def visit_array_node(node); end # Dispatch enter and leave events for ArrayPatternNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1313 + # source://prism//lib/prism/dispatcher.rb#1321 def visit_array_pattern_node(node); end # Dispatch enter and leave events for AssocNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1319 + # source://prism//lib/prism/dispatcher.rb#1327 def visit_assoc_node(node); end # Dispatch enter and leave events for AssocSplatNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1325 + # source://prism//lib/prism/dispatcher.rb#1333 def visit_assoc_splat_node(node); end # Dispatch enter and leave events for BackReferenceReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1331 + # source://prism//lib/prism/dispatcher.rb#1339 def visit_back_reference_read_node(node); end # Dispatch enter and leave events for BeginNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1337 + # source://prism//lib/prism/dispatcher.rb#1345 def visit_begin_node(node); end # Dispatch enter and leave events for BlockArgumentNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1343 + # source://prism//lib/prism/dispatcher.rb#1351 def visit_block_argument_node(node); end # Dispatch enter and leave events for BlockLocalVariableNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1349 + # source://prism//lib/prism/dispatcher.rb#1357 def visit_block_local_variable_node(node); end # Dispatch enter and leave events for BlockNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1355 + # source://prism//lib/prism/dispatcher.rb#1363 def visit_block_node(node); end # Dispatch enter and leave events for BlockParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1361 + # source://prism//lib/prism/dispatcher.rb#1369 def visit_block_parameter_node(node); end # Dispatch enter and leave events for BlockParametersNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1367 + # source://prism//lib/prism/dispatcher.rb#1375 def visit_block_parameters_node(node); end # Dispatch enter and leave events for BreakNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1373 + # source://prism//lib/prism/dispatcher.rb#1381 def visit_break_node(node); end # Dispatch enter and leave events for CallAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1379 + # source://prism//lib/prism/dispatcher.rb#1387 def visit_call_and_write_node(node); end # Dispatch enter and leave events for CallNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1385 + # source://prism//lib/prism/dispatcher.rb#1393 def visit_call_node(node); end # Dispatch enter and leave events for CallOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1391 + # source://prism//lib/prism/dispatcher.rb#1399 def visit_call_operator_write_node(node); end # Dispatch enter and leave events for CallOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1397 + # source://prism//lib/prism/dispatcher.rb#1405 def visit_call_or_write_node(node); end # Dispatch enter and leave events for CallTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1403 + # source://prism//lib/prism/dispatcher.rb#1411 def visit_call_target_node(node); end # Dispatch enter and leave events for CapturePatternNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1409 + # source://prism//lib/prism/dispatcher.rb#1417 def visit_capture_pattern_node(node); end # Dispatch enter and leave events for CaseMatchNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1415 + # source://prism//lib/prism/dispatcher.rb#1423 def visit_case_match_node(node); end # Dispatch enter and leave events for CaseNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1421 + # source://prism//lib/prism/dispatcher.rb#1429 def visit_case_node(node); end # Dispatch enter and leave events for ClassNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1427 + # source://prism//lib/prism/dispatcher.rb#1435 def visit_class_node(node); end # Dispatch enter and leave events for ClassVariableAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1433 + # source://prism//lib/prism/dispatcher.rb#1441 def visit_class_variable_and_write_node(node); end # Dispatch enter and leave events for ClassVariableOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1439 + # source://prism//lib/prism/dispatcher.rb#1447 def visit_class_variable_operator_write_node(node); end # Dispatch enter and leave events for ClassVariableOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1445 + # source://prism//lib/prism/dispatcher.rb#1453 def visit_class_variable_or_write_node(node); end # Dispatch enter and leave events for ClassVariableReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1451 + # source://prism//lib/prism/dispatcher.rb#1459 def visit_class_variable_read_node(node); end # Dispatch enter and leave events for ClassVariableTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1457 + # source://prism//lib/prism/dispatcher.rb#1465 def visit_class_variable_target_node(node); end # Dispatch enter and leave events for ClassVariableWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1463 + # source://prism//lib/prism/dispatcher.rb#1471 def visit_class_variable_write_node(node); end # Dispatch enter and leave events for ConstantAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1469 + # source://prism//lib/prism/dispatcher.rb#1477 def visit_constant_and_write_node(node); end # Dispatch enter and leave events for ConstantOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1475 + # source://prism//lib/prism/dispatcher.rb#1483 def visit_constant_operator_write_node(node); end # Dispatch enter and leave events for ConstantOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1481 + # source://prism//lib/prism/dispatcher.rb#1489 def visit_constant_or_write_node(node); end # Dispatch enter and leave events for ConstantPathAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1487 + # source://prism//lib/prism/dispatcher.rb#1495 def visit_constant_path_and_write_node(node); end # Dispatch enter and leave events for ConstantPathNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1493 + # source://prism//lib/prism/dispatcher.rb#1501 def visit_constant_path_node(node); end # Dispatch enter and leave events for ConstantPathOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1499 + # source://prism//lib/prism/dispatcher.rb#1507 def visit_constant_path_operator_write_node(node); end # Dispatch enter and leave events for ConstantPathOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1505 + # source://prism//lib/prism/dispatcher.rb#1513 def visit_constant_path_or_write_node(node); end # Dispatch enter and leave events for ConstantPathTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1511 + # source://prism//lib/prism/dispatcher.rb#1519 def visit_constant_path_target_node(node); end # Dispatch enter and leave events for ConstantPathWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1517 + # source://prism//lib/prism/dispatcher.rb#1525 def visit_constant_path_write_node(node); end # Dispatch enter and leave events for ConstantReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1523 + # source://prism//lib/prism/dispatcher.rb#1531 def visit_constant_read_node(node); end # Dispatch enter and leave events for ConstantTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1529 + # source://prism//lib/prism/dispatcher.rb#1537 def visit_constant_target_node(node); end # Dispatch enter and leave events for ConstantWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1535 + # source://prism//lib/prism/dispatcher.rb#1543 def visit_constant_write_node(node); end # Dispatch enter and leave events for DefNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1541 + # source://prism//lib/prism/dispatcher.rb#1549 def visit_def_node(node); end # Dispatch enter and leave events for DefinedNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1547 + # source://prism//lib/prism/dispatcher.rb#1555 def visit_defined_node(node); end # Dispatch enter and leave events for ElseNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1553 + # source://prism//lib/prism/dispatcher.rb#1561 def visit_else_node(node); end # Dispatch enter and leave events for EmbeddedStatementsNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1559 + # source://prism//lib/prism/dispatcher.rb#1567 def visit_embedded_statements_node(node); end # Dispatch enter and leave events for EmbeddedVariableNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1565 + # source://prism//lib/prism/dispatcher.rb#1573 def visit_embedded_variable_node(node); end # Dispatch enter and leave events for EnsureNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1571 + # source://prism//lib/prism/dispatcher.rb#1579 def visit_ensure_node(node); end # Dispatch enter and leave events for FalseNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1577 + # source://prism//lib/prism/dispatcher.rb#1585 def visit_false_node(node); end # Dispatch enter and leave events for FindPatternNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1583 + # source://prism//lib/prism/dispatcher.rb#1591 def visit_find_pattern_node(node); end # Dispatch enter and leave events for FlipFlopNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1589 + # source://prism//lib/prism/dispatcher.rb#1597 def visit_flip_flop_node(node); end # Dispatch enter and leave events for FloatNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1595 + # source://prism//lib/prism/dispatcher.rb#1603 def visit_float_node(node); end # Dispatch enter and leave events for ForNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1601 + # source://prism//lib/prism/dispatcher.rb#1609 def visit_for_node(node); end # Dispatch enter and leave events for ForwardingArgumentsNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1607 + # source://prism//lib/prism/dispatcher.rb#1615 def visit_forwarding_arguments_node(node); end # Dispatch enter and leave events for ForwardingParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1613 + # source://prism//lib/prism/dispatcher.rb#1621 def visit_forwarding_parameter_node(node); end # Dispatch enter and leave events for ForwardingSuperNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1619 + # source://prism//lib/prism/dispatcher.rb#1627 def visit_forwarding_super_node(node); end # Dispatch enter and leave events for GlobalVariableAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1625 + # source://prism//lib/prism/dispatcher.rb#1633 def visit_global_variable_and_write_node(node); end # Dispatch enter and leave events for GlobalVariableOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1631 + # source://prism//lib/prism/dispatcher.rb#1639 def visit_global_variable_operator_write_node(node); end # Dispatch enter and leave events for GlobalVariableOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1637 + # source://prism//lib/prism/dispatcher.rb#1645 def visit_global_variable_or_write_node(node); end # Dispatch enter and leave events for GlobalVariableReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1643 + # source://prism//lib/prism/dispatcher.rb#1651 def visit_global_variable_read_node(node); end # Dispatch enter and leave events for GlobalVariableTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1649 + # source://prism//lib/prism/dispatcher.rb#1657 def visit_global_variable_target_node(node); end # Dispatch enter and leave events for GlobalVariableWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1655 + # source://prism//lib/prism/dispatcher.rb#1663 def visit_global_variable_write_node(node); end # Dispatch enter and leave events for HashNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1661 + # source://prism//lib/prism/dispatcher.rb#1669 def visit_hash_node(node); end # Dispatch enter and leave events for HashPatternNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1667 + # source://prism//lib/prism/dispatcher.rb#1675 def visit_hash_pattern_node(node); end # Dispatch enter and leave events for IfNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1673 + # source://prism//lib/prism/dispatcher.rb#1681 def visit_if_node(node); end # Dispatch enter and leave events for ImaginaryNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1679 + # source://prism//lib/prism/dispatcher.rb#1687 def visit_imaginary_node(node); end # Dispatch enter and leave events for ImplicitNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1685 + # source://prism//lib/prism/dispatcher.rb#1693 def visit_implicit_node(node); end # Dispatch enter and leave events for ImplicitRestNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1691 + # source://prism//lib/prism/dispatcher.rb#1699 def visit_implicit_rest_node(node); end # Dispatch enter and leave events for InNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1697 + # source://prism//lib/prism/dispatcher.rb#1705 def visit_in_node(node); end # Dispatch enter and leave events for IndexAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1703 + # source://prism//lib/prism/dispatcher.rb#1711 def visit_index_and_write_node(node); end # Dispatch enter and leave events for IndexOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1709 + # source://prism//lib/prism/dispatcher.rb#1717 def visit_index_operator_write_node(node); end # Dispatch enter and leave events for IndexOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1715 + # source://prism//lib/prism/dispatcher.rb#1723 def visit_index_or_write_node(node); end # Dispatch enter and leave events for IndexTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1721 + # source://prism//lib/prism/dispatcher.rb#1729 def visit_index_target_node(node); end # Dispatch enter and leave events for InstanceVariableAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1727 + # source://prism//lib/prism/dispatcher.rb#1735 def visit_instance_variable_and_write_node(node); end # Dispatch enter and leave events for InstanceVariableOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1733 + # source://prism//lib/prism/dispatcher.rb#1741 def visit_instance_variable_operator_write_node(node); end # Dispatch enter and leave events for InstanceVariableOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1739 + # source://prism//lib/prism/dispatcher.rb#1747 def visit_instance_variable_or_write_node(node); end # Dispatch enter and leave events for InstanceVariableReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1745 + # source://prism//lib/prism/dispatcher.rb#1753 def visit_instance_variable_read_node(node); end # Dispatch enter and leave events for InstanceVariableTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1751 + # source://prism//lib/prism/dispatcher.rb#1759 def visit_instance_variable_target_node(node); end # Dispatch enter and leave events for InstanceVariableWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1757 + # source://prism//lib/prism/dispatcher.rb#1765 def visit_instance_variable_write_node(node); end # Dispatch enter and leave events for IntegerNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1763 + # source://prism//lib/prism/dispatcher.rb#1771 def visit_integer_node(node); end # Dispatch enter and leave events for InterpolatedMatchLastLineNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1769 + # source://prism//lib/prism/dispatcher.rb#1777 def visit_interpolated_match_last_line_node(node); end # Dispatch enter and leave events for InterpolatedRegularExpressionNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1775 + # source://prism//lib/prism/dispatcher.rb#1783 def visit_interpolated_regular_expression_node(node); end # Dispatch enter and leave events for InterpolatedStringNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1781 + # source://prism//lib/prism/dispatcher.rb#1789 def visit_interpolated_string_node(node); end # Dispatch enter and leave events for InterpolatedSymbolNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1787 + # source://prism//lib/prism/dispatcher.rb#1795 def visit_interpolated_symbol_node(node); end # Dispatch enter and leave events for InterpolatedXStringNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1793 + # source://prism//lib/prism/dispatcher.rb#1801 def visit_interpolated_x_string_node(node); end + # Dispatch enter and leave events for ItLocalVariableReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1807 + def visit_it_local_variable_read_node(node); end + # Dispatch enter and leave events for ItParametersNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1799 + # source://prism//lib/prism/dispatcher.rb#1813 def visit_it_parameters_node(node); end # Dispatch enter and leave events for KeywordHashNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1805 + # source://prism//lib/prism/dispatcher.rb#1819 def visit_keyword_hash_node(node); end # Dispatch enter and leave events for KeywordRestParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1811 + # source://prism//lib/prism/dispatcher.rb#1825 def visit_keyword_rest_parameter_node(node); end # Dispatch enter and leave events for LambdaNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1817 + # source://prism//lib/prism/dispatcher.rb#1831 def visit_lambda_node(node); end # Dispatch enter and leave events for LocalVariableAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1823 + # source://prism//lib/prism/dispatcher.rb#1837 def visit_local_variable_and_write_node(node); end # Dispatch enter and leave events for LocalVariableOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1829 + # source://prism//lib/prism/dispatcher.rb#1843 def visit_local_variable_operator_write_node(node); end # Dispatch enter and leave events for LocalVariableOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1835 + # source://prism//lib/prism/dispatcher.rb#1849 def visit_local_variable_or_write_node(node); end # Dispatch enter and leave events for LocalVariableReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1841 + # source://prism//lib/prism/dispatcher.rb#1855 def visit_local_variable_read_node(node); end # Dispatch enter and leave events for LocalVariableTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1847 + # source://prism//lib/prism/dispatcher.rb#1861 def visit_local_variable_target_node(node); end # Dispatch enter and leave events for LocalVariableWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1853 + # source://prism//lib/prism/dispatcher.rb#1867 def visit_local_variable_write_node(node); end # Dispatch enter and leave events for MatchLastLineNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1859 + # source://prism//lib/prism/dispatcher.rb#1873 def visit_match_last_line_node(node); end # Dispatch enter and leave events for MatchPredicateNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1865 + # source://prism//lib/prism/dispatcher.rb#1879 def visit_match_predicate_node(node); end # Dispatch enter and leave events for MatchRequiredNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1871 + # source://prism//lib/prism/dispatcher.rb#1885 def visit_match_required_node(node); end # Dispatch enter and leave events for MatchWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1877 + # source://prism//lib/prism/dispatcher.rb#1891 def visit_match_write_node(node); end # Dispatch enter and leave events for MissingNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1883 + # source://prism//lib/prism/dispatcher.rb#1897 def visit_missing_node(node); end # Dispatch enter and leave events for ModuleNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1889 + # source://prism//lib/prism/dispatcher.rb#1903 def visit_module_node(node); end # Dispatch enter and leave events for MultiTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1895 + # source://prism//lib/prism/dispatcher.rb#1909 def visit_multi_target_node(node); end # Dispatch enter and leave events for MultiWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1901 + # source://prism//lib/prism/dispatcher.rb#1915 def visit_multi_write_node(node); end # Dispatch enter and leave events for NextNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1907 + # source://prism//lib/prism/dispatcher.rb#1921 def visit_next_node(node); end # Dispatch enter and leave events for NilNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1913 + # source://prism//lib/prism/dispatcher.rb#1927 def visit_nil_node(node); end # Dispatch enter and leave events for NoKeywordsParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1919 + # source://prism//lib/prism/dispatcher.rb#1933 def visit_no_keywords_parameter_node(node); end # Dispatch enter and leave events for NumberedParametersNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1925 + # source://prism//lib/prism/dispatcher.rb#1939 def visit_numbered_parameters_node(node); end # Dispatch enter and leave events for NumberedReferenceReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1931 + # source://prism//lib/prism/dispatcher.rb#1945 def visit_numbered_reference_read_node(node); end # Dispatch enter and leave events for OptionalKeywordParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1937 + # source://prism//lib/prism/dispatcher.rb#1951 def visit_optional_keyword_parameter_node(node); end # Dispatch enter and leave events for OptionalParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1943 + # source://prism//lib/prism/dispatcher.rb#1957 def visit_optional_parameter_node(node); end # Dispatch enter and leave events for OrNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1949 + # source://prism//lib/prism/dispatcher.rb#1963 def visit_or_node(node); end # Dispatch enter and leave events for ParametersNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1955 + # source://prism//lib/prism/dispatcher.rb#1969 def visit_parameters_node(node); end # Dispatch enter and leave events for ParenthesesNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1961 + # source://prism//lib/prism/dispatcher.rb#1975 def visit_parentheses_node(node); end # Dispatch enter and leave events for PinnedExpressionNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1967 + # source://prism//lib/prism/dispatcher.rb#1981 def visit_pinned_expression_node(node); end # Dispatch enter and leave events for PinnedVariableNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1973 + # source://prism//lib/prism/dispatcher.rb#1987 def visit_pinned_variable_node(node); end # Dispatch enter and leave events for PostExecutionNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1979 + # source://prism//lib/prism/dispatcher.rb#1993 def visit_post_execution_node(node); end # Dispatch enter and leave events for PreExecutionNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1985 + # source://prism//lib/prism/dispatcher.rb#1999 def visit_pre_execution_node(node); end # Dispatch enter and leave events for ProgramNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1991 + # source://prism//lib/prism/dispatcher.rb#2005 def visit_program_node(node); end # Dispatch enter and leave events for RangeNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1997 + # source://prism//lib/prism/dispatcher.rb#2011 def visit_range_node(node); end # Dispatch enter and leave events for RationalNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2003 + # source://prism//lib/prism/dispatcher.rb#2017 def visit_rational_node(node); end # Dispatch enter and leave events for RedoNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2009 + # source://prism//lib/prism/dispatcher.rb#2023 def visit_redo_node(node); end # Dispatch enter and leave events for RegularExpressionNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2015 + # source://prism//lib/prism/dispatcher.rb#2029 def visit_regular_expression_node(node); end # Dispatch enter and leave events for RequiredKeywordParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2021 + # source://prism//lib/prism/dispatcher.rb#2035 def visit_required_keyword_parameter_node(node); end # Dispatch enter and leave events for RequiredParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2027 + # source://prism//lib/prism/dispatcher.rb#2041 def visit_required_parameter_node(node); end # Dispatch enter and leave events for RescueModifierNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2033 + # source://prism//lib/prism/dispatcher.rb#2047 def visit_rescue_modifier_node(node); end # Dispatch enter and leave events for RescueNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2039 + # source://prism//lib/prism/dispatcher.rb#2053 def visit_rescue_node(node); end # Dispatch enter and leave events for RestParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2045 + # source://prism//lib/prism/dispatcher.rb#2059 def visit_rest_parameter_node(node); end # Dispatch enter and leave events for RetryNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2051 + # source://prism//lib/prism/dispatcher.rb#2065 def visit_retry_node(node); end # Dispatch enter and leave events for ReturnNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2057 + # source://prism//lib/prism/dispatcher.rb#2071 def visit_return_node(node); end # Dispatch enter and leave events for SelfNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2063 + # source://prism//lib/prism/dispatcher.rb#2077 def visit_self_node(node); end # Dispatch enter and leave events for ShareableConstantNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2069 + # source://prism//lib/prism/dispatcher.rb#2083 def visit_shareable_constant_node(node); end # Dispatch enter and leave events for SingletonClassNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2075 + # source://prism//lib/prism/dispatcher.rb#2089 def visit_singleton_class_node(node); end # Dispatch enter and leave events for SourceEncodingNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2081 + # source://prism//lib/prism/dispatcher.rb#2095 def visit_source_encoding_node(node); end # Dispatch enter and leave events for SourceFileNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2087 + # source://prism//lib/prism/dispatcher.rb#2101 def visit_source_file_node(node); end # Dispatch enter and leave events for SourceLineNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2093 + # source://prism//lib/prism/dispatcher.rb#2107 def visit_source_line_node(node); end # Dispatch enter and leave events for SplatNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2099 + # source://prism//lib/prism/dispatcher.rb#2113 def visit_splat_node(node); end # Dispatch enter and leave events for StatementsNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2105 + # source://prism//lib/prism/dispatcher.rb#2119 def visit_statements_node(node); end # Dispatch enter and leave events for StringNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2111 + # source://prism//lib/prism/dispatcher.rb#2125 def visit_string_node(node); end # Dispatch enter and leave events for SuperNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2117 + # source://prism//lib/prism/dispatcher.rb#2131 def visit_super_node(node); end # Dispatch enter and leave events for SymbolNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2123 + # source://prism//lib/prism/dispatcher.rb#2137 def visit_symbol_node(node); end # Dispatch enter and leave events for TrueNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2129 + # source://prism//lib/prism/dispatcher.rb#2143 def visit_true_node(node); end # Dispatch enter and leave events for UndefNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2135 + # source://prism//lib/prism/dispatcher.rb#2149 def visit_undef_node(node); end # Dispatch enter and leave events for UnlessNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2141 + # source://prism//lib/prism/dispatcher.rb#2155 def visit_unless_node(node); end # Dispatch enter and leave events for UntilNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2147 + # source://prism//lib/prism/dispatcher.rb#2161 def visit_until_node(node); end # Dispatch enter and leave events for WhenNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2153 + # source://prism//lib/prism/dispatcher.rb#2167 def visit_when_node(node); end # Dispatch enter and leave events for WhileNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2159 + # source://prism//lib/prism/dispatcher.rb#2173 def visit_while_node(node); end # Dispatch enter and leave events for XStringNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2165 + # source://prism//lib/prism/dispatcher.rb#2179 def visit_x_string_node(node); end # Dispatch enter and leave events for YieldNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2171 + # source://prism//lib/prism/dispatcher.rb#2185 def visit_yield_node(node); end end @@ -11908,567 +11922,572 @@ class Prism::DotVisitor < ::Prism::Visitor # Visit a ConstantPathOperatorWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1307 + # 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#1335 + # 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#1360 + # 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#1387 + # 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#1412 + # 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#1429 + # 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#1446 + # 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#1473 + # 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#1542 + # 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#1573 + # 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#1601 + # 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#1627 + # 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#1648 + # 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#1674 + # 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#1688 + # 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#1739 + # 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#1771 + # 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#1788 + # 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#1830 + # 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#1844 + # 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#1858 + # 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#1878 + # 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#1905 + # 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#1935 + # 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#1962 + # 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#1979 + # 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#1996 + # 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#2023 + # 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#2056 + # 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#2105 + # 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#2150 + # 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#2168 + # 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#2186 + # 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#2200 + # 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#2232 + # 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#2285 + # 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#2341 + # 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#2394 + # 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#2433 + # 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#2460 + # 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#2490 + # 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#2517 + # 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#2534 + # 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#2551 + # 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#2578 + # 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#2598 + # 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#2634 + # 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#2670 + # 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#2710 + # 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#2747 + # 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#2780 + # 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#2794 + # 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#2824 + # 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#2852 + # 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#2890 + # 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#2920 + # 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#2953 + # 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#2983 + # 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#3003 + # 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#3023 + # 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#3053 + # 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#3082 + # 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#3107 + # 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#3132 + # 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#3163 + # 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#3177 + # 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#3213 + # 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#3269 + # 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#3332 + # 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#3355 + # 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#3369 + # 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#3389 + # 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#3406 + # 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#3423 + # 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#3450 + # 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#3480 + # 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#3505 + # 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#3589 + # 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#3615 + # 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#3642 + # 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#3663 + # 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#3692 + # 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#3721 + # 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#3742 + # 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#3774 + # 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#3792 + # 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#3806 + # 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#3835 + # 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#3858 + # 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#3878 + # 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#3903 + # 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#3956 + # 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#3984 + # 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#3998 + # 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#4021 + # source://prism//lib/prism/dot_visitor.rb#4047 def visit_self_node(node); end # Visit a ShareableConstantNode node. # - # source://prism//lib/prism/dot_visitor.rb#4035 + # source://prism//lib/prism/dot_visitor.rb#4061 def visit_shareable_constant_node(node); end # Visit a SingletonClassNode node. # - # source://prism//lib/prism/dot_visitor.rb#4056 + # source://prism//lib/prism/dot_visitor.rb#4082 def visit_singleton_class_node(node); end # Visit a SourceEncodingNode node. # - # source://prism//lib/prism/dot_visitor.rb#4092 + # source://prism//lib/prism/dot_visitor.rb#4118 def visit_source_encoding_node(node); end # Visit a SourceFileNode node. # - # source://prism//lib/prism/dot_visitor.rb#4106 + # source://prism//lib/prism/dot_visitor.rb#4132 def visit_source_file_node(node); end # Visit a SourceLineNode node. # - # source://prism//lib/prism/dot_visitor.rb#4126 + # source://prism//lib/prism/dot_visitor.rb#4152 def visit_source_line_node(node); end # Visit a SplatNode node. # - # source://prism//lib/prism/dot_visitor.rb#4140 + # source://prism//lib/prism/dot_visitor.rb#4166 def visit_splat_node(node); end # Visit a StatementsNode node. # - # source://prism//lib/prism/dot_visitor.rb#4163 + # source://prism//lib/prism/dot_visitor.rb#4189 def visit_statements_node(node); end # Visit a StringNode node. # - # source://prism//lib/prism/dot_visitor.rb#4190 + # source://prism//lib/prism/dot_visitor.rb#4216 def visit_string_node(node); end # Visit a SuperNode node. # - # source://prism//lib/prism/dot_visitor.rb#4223 + # source://prism//lib/prism/dot_visitor.rb#4249 def visit_super_node(node); end # Visit a SymbolNode node. # - # source://prism//lib/prism/dot_visitor.rb#4262 + # source://prism//lib/prism/dot_visitor.rb#4288 def visit_symbol_node(node); end # Visit a TrueNode node. # - # source://prism//lib/prism/dot_visitor.rb#4297 + # source://prism//lib/prism/dot_visitor.rb#4323 def visit_true_node(node); end # Visit a UndefNode node. # - # source://prism//lib/prism/dot_visitor.rb#4311 + # source://prism//lib/prism/dot_visitor.rb#4337 def visit_undef_node(node); end # Visit a UnlessNode node. # - # source://prism//lib/prism/dot_visitor.rb#4341 + # source://prism//lib/prism/dot_visitor.rb#4367 def visit_unless_node(node); end # Visit a UntilNode node. # - # source://prism//lib/prism/dot_visitor.rb#4384 + # source://prism//lib/prism/dot_visitor.rb#4410 def visit_until_node(node); end # Visit a WhenNode node. # - # source://prism//lib/prism/dot_visitor.rb#4419 + # source://prism//lib/prism/dot_visitor.rb#4445 def visit_when_node(node); end # Visit a WhileNode node. # - # source://prism//lib/prism/dot_visitor.rb#4460 + # source://prism//lib/prism/dot_visitor.rb#4486 def visit_while_node(node); end # Visit a XStringNode node. # - # source://prism//lib/prism/dot_visitor.rb#4495 + # source://prism//lib/prism/dot_visitor.rb#4521 def visit_x_string_node(node); end # Visit a YieldNode node. # - # source://prism//lib/prism/dot_visitor.rb#4524 + # source://prism//lib/prism/dot_visitor.rb#4550 def visit_yield_node(node); end private @@ -12476,95 +12495,101 @@ class Prism::DotVisitor < ::Prism::Visitor # 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#4570 + # source://prism//lib/prism/dot_visitor.rb#4596 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#4578 + # 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#4586 + # 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#4597 + # 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#4606 + # 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#4617 + # 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#4626 + # 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#4564 + # source://prism//lib/prism/dot_visitor.rb#4590 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#4634 + # 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#4559 + # source://prism//lib/prism/dot_visitor.rb#4585 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#4642 + # 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#4650 + # 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#4658 + # source://prism//lib/prism/dot_visitor.rb#4685 def regular_expression_flags_inspect(node); end + # Inspect a node that has return_node_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4703 + def return_node_flags_inspect(node); end + # Inspect a node that has shareable_constant_node_flags flags to display the flags as a # comma-separated list. # - # source://prism//lib/prism/dot_visitor.rb#4676 + # source://prism//lib/prism/dot_visitor.rb#4711 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#4686 + # source://prism//lib/prism/dot_visitor.rb#4721 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#4697 + # source://prism//lib/prism/dot_visitor.rb#4732 def symbol_flags_inspect(node); end end @@ -12658,13 +12683,13 @@ end # if a then b else c end # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#6593 +# source://prism//lib/prism/node.rb#6173 class Prism::ElseNode < ::Prism::Node # def initialize: (Location else_keyword_loc, StatementsNode? statements, Location? end_keyword_loc, Location location) -> void # # @return [ElseNode] a new instance of ElseNode # - # source://prism//lib/prism/node.rb#6595 + # source://prism//lib/prism/node.rb#6175 sig do params( source: Prism::Source, @@ -12679,36 +12704,36 @@ class Prism::ElseNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#6716 + # source://prism//lib/prism/node.rb#6286 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6605 + # source://prism//lib/prism/node.rb#6184 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#6610 + # source://prism//lib/prism/node.rb#6189 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6622 + # source://prism//lib/prism/node.rb#6201 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6615 + # source://prism//lib/prism/node.rb#6194 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?else_keyword_loc: Location, ?statements: StatementsNode?, ?end_keyword_loc: Location?, ?location: Location) -> ElseNode # - # source://prism//lib/prism/node.rb#6627 + # source://prism//lib/prism/node.rb#6206 sig do params( else_keyword_loc: Prism::Location, @@ -12722,52 +12747,52 @@ class Prism::ElseNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6610 + # source://prism//lib/prism/node.rb#6189 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { else_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location?, location: Location } # - # source://prism//lib/prism/node.rb#6635 + # source://prism//lib/prism/node.rb#6214 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#6663 + # source://prism//lib/prism/node.rb#6242 sig { returns(String) } def else_keyword; end # attr_reader else_keyword_loc: Location # - # source://prism//lib/prism/node.rb#6640 + # source://prism//lib/prism/node.rb#6219 sig { returns(Prism::Location) } def else_keyword_loc; end # def end_keyword: () -> String? # - # source://prism//lib/prism/node.rb#6668 + # source://prism//lib/prism/node.rb#6247 sig { returns(T.nilable(String)) } def end_keyword; end # attr_reader end_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#6650 + # source://prism//lib/prism/node.rb#6229 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#6673 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#6252 + sig { override.returns(String) } + def inspect; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#6647 + # source://prism//lib/prism/node.rb#6226 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -12786,7 +12811,7 @@ class Prism::ElseNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#6700 + # source://prism//lib/prism/node.rb#6270 sig { override.returns(Symbol) } def type; end @@ -12798,7 +12823,7 @@ class Prism::ElseNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#6710 + # source://prism//lib/prism/node.rb#6280 def type; end end end @@ -12806,11 +12831,11 @@ end # EmbDocComment objects correspond to comments that are surrounded by =begin # and =end. # -# source://prism//lib/prism/parse_result.rb#325 +# source://prism//lib/prism/parse_result.rb#403 class Prism::EmbDocComment < ::Prism::Comment # Returns a string representation of this comment. # - # source://prism//lib/prism/parse_result.rb#332 + # source://prism//lib/prism/parse_result.rb#410 sig { returns(String) } def inspect; end @@ -12818,7 +12843,7 @@ class Prism::EmbDocComment < ::Prism::Comment # # @return [Boolean] # - # source://prism//lib/prism/parse_result.rb#327 + # source://prism//lib/prism/parse_result.rb#405 sig { override.returns(T::Boolean) } def trailing?; end end @@ -12828,13 +12853,13 @@ end # "foo #{bar}" # ^^^^^^ # -# source://prism//lib/prism/node.rb#6728 +# source://prism//lib/prism/node.rb#6298 class Prism::EmbeddedStatementsNode < ::Prism::Node # def initialize: (Location opening_loc, StatementsNode? statements, Location closing_loc, Location location) -> void # # @return [EmbeddedStatementsNode] a new instance of EmbeddedStatementsNode # - # source://prism//lib/prism/node.rb#6730 + # source://prism//lib/prism/node.rb#6300 sig do params( source: Prism::Source, @@ -12849,48 +12874,48 @@ class Prism::EmbeddedStatementsNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#6845 + # source://prism//lib/prism/node.rb#6405 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6740 + # source://prism//lib/prism/node.rb#6309 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#6745 + # source://prism//lib/prism/node.rb#6314 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#6797 + # source://prism//lib/prism/node.rb#6366 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#6785 + # source://prism//lib/prism/node.rb#6354 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6757 + # source://prism//lib/prism/node.rb#6326 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6750 + # source://prism//lib/prism/node.rb#6319 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?opening_loc: Location, ?statements: StatementsNode?, ?closing_loc: Location, ?location: Location) -> EmbeddedStatementsNode # - # source://prism//lib/prism/node.rb#6762 + # source://prism//lib/prism/node.rb#6331 sig do params( opening_loc: Prism::Location, @@ -12904,40 +12929,40 @@ class Prism::EmbeddedStatementsNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6745 + # source://prism//lib/prism/node.rb#6314 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location, statements: StatementsNode?, closing_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#6770 + # source://prism//lib/prism/node.rb#6339 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#6802 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#6371 + sig { override.returns(String) } + def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#6792 + # source://prism//lib/prism/node.rb#6361 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#6775 + # source://prism//lib/prism/node.rb#6344 sig { returns(Prism::Location) } def opening_loc; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#6782 + # source://prism//lib/prism/node.rb#6351 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -12956,7 +12981,7 @@ class Prism::EmbeddedStatementsNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#6829 + # source://prism//lib/prism/node.rb#6389 sig { override.returns(Symbol) } def type; end @@ -12968,7 +12993,7 @@ class Prism::EmbeddedStatementsNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#6839 + # source://prism//lib/prism/node.rb#6399 def type; end end end @@ -12978,13 +13003,13 @@ end # "foo #@bar" # ^^^^^ # -# source://prism//lib/prism/node.rb#6857 +# source://prism//lib/prism/node.rb#6417 class Prism::EmbeddedVariableNode < ::Prism::Node # def initialize: (Location operator_loc, Prism::node variable, Location location) -> void # # @return [EmbeddedVariableNode] a new instance of EmbeddedVariableNode # - # source://prism//lib/prism/node.rb#6859 + # source://prism//lib/prism/node.rb#6419 sig do params( source: Prism::Source, @@ -12998,36 +13023,36 @@ class Prism::EmbeddedVariableNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#6954 + # source://prism//lib/prism/node.rb#6509 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6868 + # source://prism//lib/prism/node.rb#6427 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#6873 + # source://prism//lib/prism/node.rb#6432 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6883 + # source://prism//lib/prism/node.rb#6442 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6878 + # source://prism//lib/prism/node.rb#6437 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?operator_loc: Location, ?variable: Prism::node, ?location: Location) -> EmbeddedVariableNode # - # source://prism//lib/prism/node.rb#6888 + # source://prism//lib/prism/node.rb#6447 sig do params( operator_loc: Prism::Location, @@ -13040,34 +13065,34 @@ class Prism::EmbeddedVariableNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6873 + # source://prism//lib/prism/node.rb#6432 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { operator_loc: Location, variable: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#6896 + # source://prism//lib/prism/node.rb#6455 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#6916 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#6475 + sig { override.returns(String) } + def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#6911 + # source://prism//lib/prism/node.rb#6470 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#6901 + # source://prism//lib/prism/node.rb#6460 sig { returns(Prism::Location) } def operator_loc; end @@ -13086,13 +13111,13 @@ class Prism::EmbeddedVariableNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#6938 + # source://prism//lib/prism/node.rb#6493 sig { override.returns(Symbol) } def type; end # attr_reader variable: Prism::node # - # source://prism//lib/prism/node.rb#6908 + # source://prism//lib/prism/node.rb#6467 sig { returns(Prism::Node) } def variable; end @@ -13104,24 +13129,24 @@ class Prism::EmbeddedVariableNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#6948 + # source://prism//lib/prism/node.rb#6503 def type; end end end # Flags for nodes that have unescaped content. # -# source://prism//lib/prism/node.rb#20364 +# source://prism//lib/prism/node.rb#19157 module Prism::EncodingFlags; end # internal bytes forced the encoding to binary # -# source://prism//lib/prism/node.rb#20369 +# source://prism//lib/prism/node.rb#19162 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#20366 +# source://prism//lib/prism/node.rb#19159 Prism::EncodingFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # Represents an `ensure` clause in a `begin` statement. @@ -13133,13 +13158,13 @@ Prism::EncodingFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # bar # end # -# source://prism//lib/prism/node.rb#6969 +# source://prism//lib/prism/node.rb#6524 class Prism::EnsureNode < ::Prism::Node # def initialize: (Location ensure_keyword_loc, StatementsNode? statements, Location end_keyword_loc, Location location) -> void # # @return [EnsureNode] a new instance of EnsureNode # - # source://prism//lib/prism/node.rb#6971 + # source://prism//lib/prism/node.rb#6526 sig do params( source: Prism::Source, @@ -13154,36 +13179,36 @@ class Prism::EnsureNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#7086 + # source://prism//lib/prism/node.rb#6631 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6981 + # source://prism//lib/prism/node.rb#6535 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#6986 + # source://prism//lib/prism/node.rb#6540 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6998 + # source://prism//lib/prism/node.rb#6552 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6991 + # source://prism//lib/prism/node.rb#6545 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?ensure_keyword_loc: Location, ?statements: StatementsNode?, ?end_keyword_loc: Location, ?location: Location) -> EnsureNode # - # source://prism//lib/prism/node.rb#7003 + # source://prism//lib/prism/node.rb#6557 sig do params( ensure_keyword_loc: Prism::Location, @@ -13197,52 +13222,52 @@ class Prism::EnsureNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6986 + # source://prism//lib/prism/node.rb#6540 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { ensure_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#7011 + # source://prism//lib/prism/node.rb#6565 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#7038 + # source://prism//lib/prism/node.rb#6592 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#7026 + # source://prism//lib/prism/node.rb#6580 sig { returns(Prism::Location) } def end_keyword_loc; end # def ensure_keyword: () -> String # - # source://prism//lib/prism/node.rb#7033 + # source://prism//lib/prism/node.rb#6587 sig { returns(String) } def ensure_keyword; end # attr_reader ensure_keyword_loc: Location # - # source://prism//lib/prism/node.rb#7016 + # source://prism//lib/prism/node.rb#6570 sig { returns(Prism::Location) } def ensure_keyword_loc; end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#7043 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#6597 + sig { override.returns(String) } + def inspect; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#7023 + # source://prism//lib/prism/node.rb#6577 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -13261,7 +13286,7 @@ class Prism::EnsureNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#7070 + # source://prism//lib/prism/node.rb#6615 sig { override.returns(Symbol) } def type; end @@ -13273,7 +13298,7 @@ class Prism::EnsureNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#7080 + # source://prism//lib/prism/node.rb#6625 def type; end end end @@ -13283,73 +13308,73 @@ end # false # ^^^^^ # -# source://prism//lib/prism/node.rb#7098 +# source://prism//lib/prism/node.rb#6643 class Prism::FalseNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [FalseNode] a new instance of FalseNode # - # source://prism//lib/prism/node.rb#7100 + # source://prism//lib/prism/node.rb#6645 sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#7175 + # source://prism//lib/prism/node.rb#6718 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7107 + # source://prism//lib/prism/node.rb#6651 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#7112 + # source://prism//lib/prism/node.rb#6656 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7122 + # source://prism//lib/prism/node.rb#6666 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7117 + # source://prism//lib/prism/node.rb#6661 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?location: Location) -> FalseNode # - # source://prism//lib/prism/node.rb#7127 + # source://prism//lib/prism/node.rb#6671 sig { params(location: Prism::Location).returns(Prism::FalseNode) } def copy(location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7112 + # source://prism//lib/prism/node.rb#6656 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } # - # source://prism//lib/prism/node.rb#7135 + # source://prism//lib/prism/node.rb#6679 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#7140 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#6684 + sig { override.returns(String) } + def inspect; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by @@ -13366,7 +13391,7 @@ class Prism::FalseNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#7159 + # source://prism//lib/prism/node.rb#6702 sig { override.returns(Symbol) } def type; end @@ -13378,7 +13403,7 @@ class Prism::FalseNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#7169 + # source://prism//lib/prism/node.rb#6712 def type; end end end @@ -13394,13 +13419,13 @@ end # foo in Foo(*bar, baz, *qux) # ^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#7190 +# source://prism//lib/prism/node.rb#6733 class Prism::FindPatternNode < ::Prism::Node # def initialize: (Prism::node? constant, Prism::node left, Array[Prism::node] requireds, Prism::node right, Location? opening_loc, Location? closing_loc, Location location) -> void # # @return [FindPatternNode] a new instance of FindPatternNode # - # source://prism//lib/prism/node.rb#7192 + # source://prism//lib/prism/node.rb#6735 sig do params( source: Prism::Source, @@ -13418,54 +13443,54 @@ class Prism::FindPatternNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#7339 + # source://prism//lib/prism/node.rb#6867 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7205 + # source://prism//lib/prism/node.rb#6747 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#7210 + # source://prism//lib/prism/node.rb#6752 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#7286 + # source://prism//lib/prism/node.rb#6828 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#7268 + # source://prism//lib/prism/node.rb#6810 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7225 + # source://prism//lib/prism/node.rb#6767 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7215 + # source://prism//lib/prism/node.rb#6757 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader constant: Prism::node? # - # source://prism//lib/prism/node.rb#7243 + # source://prism//lib/prism/node.rb#6785 sig { returns(T.nilable(Prism::Node)) } def constant; end # def copy: (?constant: Prism::node?, ?left: Prism::node, ?requireds: Array[Prism::node], ?right: Prism::node, ?opening_loc: Location?, ?closing_loc: Location?, ?location: Location) -> FindPatternNode # - # source://prism//lib/prism/node.rb#7230 + # source://prism//lib/prism/node.rb#6772 sig do params( constant: T.nilable(Prism::Node), @@ -13482,52 +13507,52 @@ class Prism::FindPatternNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7210 + # source://prism//lib/prism/node.rb#6752 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { constant: Prism::node?, left: Prism::node, requireds: Array[Prism::node], right: Prism::node, opening_loc: Location?, closing_loc: Location?, location: Location } # - # source://prism//lib/prism/node.rb#7238 + # source://prism//lib/prism/node.rb#6780 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#7291 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#6833 + sig { override.returns(String) } + def inspect; end # attr_reader left: Prism::node # - # source://prism//lib/prism/node.rb#7246 + # source://prism//lib/prism/node.rb#6788 sig { returns(Prism::Node) } def left; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#7281 + # source://prism//lib/prism/node.rb#6823 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#7255 + # source://prism//lib/prism/node.rb#6797 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader requireds: Array[Prism::node] # - # source://prism//lib/prism/node.rb#7249 + # source://prism//lib/prism/node.rb#6791 sig { returns(T::Array[Prism::Node]) } def requireds; end # attr_reader right: Prism::node # - # source://prism//lib/prism/node.rb#7252 + # source://prism//lib/prism/node.rb#6794 sig { returns(Prism::Node) } def right; end @@ -13546,7 +13571,7 @@ class Prism::FindPatternNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#7323 + # source://prism//lib/prism/node.rb#6851 sig { override.returns(Symbol) } def type; end @@ -13558,7 +13583,7 @@ class Prism::FindPatternNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#7333 + # source://prism//lib/prism/node.rb#6861 def type; end end end @@ -13568,13 +13593,13 @@ end # baz if foo .. bar # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#7355 +# source://prism//lib/prism/node.rb#6883 class Prism::FlipFlopNode < ::Prism::Node # def initialize: (Integer flags, Prism::node? left, Prism::node? right, Location operator_loc, Location location) -> void # # @return [FlipFlopNode] a new instance of FlipFlopNode # - # source://prism//lib/prism/node.rb#7357 + # source://prism//lib/prism/node.rb#6885 sig do params( source: Prism::Source, @@ -13590,36 +13615,36 @@ class Prism::FlipFlopNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#7481 + # source://prism//lib/prism/node.rb#6992 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7368 + # source://prism//lib/prism/node.rb#6895 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#7373 + # source://prism//lib/prism/node.rb#6900 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7386 + # source://prism//lib/prism/node.rb#6913 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7378 + # source://prism//lib/prism/node.rb#6905 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?left: Prism::node?, ?right: Prism::node?, ?operator_loc: Location, ?location: Location) -> FlipFlopNode # - # source://prism//lib/prism/node.rb#7391 + # source://prism//lib/prism/node.rb#6918 sig do params( flags: Integer, @@ -13634,13 +13659,13 @@ class Prism::FlipFlopNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7373 + # source://prism//lib/prism/node.rb#6900 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, left: Prism::node?, right: Prism::node?, operator_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#7399 + # source://prism//lib/prism/node.rb#6926 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -13648,40 +13673,40 @@ class Prism::FlipFlopNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#7421 + # source://prism//lib/prism/node.rb#6948 sig { returns(T::Boolean) } def exclude_end?; end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#7431 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#6958 + sig { override.returns(String) } + def inspect; end # attr_reader left: Prism::node? # - # source://prism//lib/prism/node.rb#7408 + # source://prism//lib/prism/node.rb#6935 sig { returns(T.nilable(Prism::Node)) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#7426 + # source://prism//lib/prism/node.rb#6953 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#7414 + # source://prism//lib/prism/node.rb#6941 sig { returns(Prism::Location) } def operator_loc; end # attr_reader right: Prism::node? # - # source://prism//lib/prism/node.rb#7411 + # source://prism//lib/prism/node.rb#6938 sig { returns(T.nilable(Prism::Node)) } def right; end @@ -13700,7 +13725,7 @@ class Prism::FlipFlopNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#7465 + # source://prism//lib/prism/node.rb#6976 sig { override.returns(Symbol) } def type; end @@ -13708,7 +13733,7 @@ class Prism::FlipFlopNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#7404 + # source://prism//lib/prism/node.rb#6931 sig { returns(Integer) } def flags; end @@ -13720,7 +13745,7 @@ class Prism::FlipFlopNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#7475 + # source://prism//lib/prism/node.rb#6986 def type; end end end @@ -13730,73 +13755,73 @@ end # 1.0 # ^^^ # -# source://prism//lib/prism/node.rb#7494 +# source://prism//lib/prism/node.rb#7005 class Prism::FloatNode < ::Prism::Node # def initialize: (Float value, Location location) -> void # # @return [FloatNode] a new instance of FloatNode # - # source://prism//lib/prism/node.rb#7496 + # source://prism//lib/prism/node.rb#7007 sig { params(source: Prism::Source, value: Float, location: Prism::Location).void } def initialize(source, value, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#7576 + # source://prism//lib/prism/node.rb#7084 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7504 + # source://prism//lib/prism/node.rb#7014 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#7509 + # source://prism//lib/prism/node.rb#7019 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7519 + # source://prism//lib/prism/node.rb#7029 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7514 + # source://prism//lib/prism/node.rb#7024 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?value: Float, ?location: Location) -> FloatNode # - # source://prism//lib/prism/node.rb#7524 + # source://prism//lib/prism/node.rb#7034 sig { params(value: Float, location: Prism::Location).returns(Prism::FloatNode) } def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7509 + # source://prism//lib/prism/node.rb#7019 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { value: Float, location: Location } # - # source://prism//lib/prism/node.rb#7532 + # source://prism//lib/prism/node.rb#7042 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#7540 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#7050 + sig { override.returns(String) } + def inspect; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by @@ -13813,13 +13838,13 @@ class Prism::FloatNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#7560 + # source://prism//lib/prism/node.rb#7068 sig { override.returns(Symbol) } def type; end # The value of the floating point number as a Float. # - # source://prism//lib/prism/node.rb#7537 + # source://prism//lib/prism/node.rb#7047 sig { returns(Float) } def value; end @@ -13831,7 +13856,7 @@ class Prism::FloatNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#7570 + # source://prism//lib/prism/node.rb#7078 def type; end end end @@ -13841,13 +13866,13 @@ end # for i in a end # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#7586 +# source://prism//lib/prism/node.rb#7094 class Prism::ForNode < ::Prism::Node # def initialize: (Prism::node index, Prism::node collection, StatementsNode? statements, Location for_keyword_loc, Location in_keyword_loc, Location? do_keyword_loc, Location end_keyword_loc, Location location) -> void # # @return [ForNode] a new instance of ForNode # - # source://prism//lib/prism/node.rb#7588 + # source://prism//lib/prism/node.rb#7096 sig do params( source: Prism::Source, @@ -13866,42 +13891,45 @@ class Prism::ForNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#7751 + # source://prism//lib/prism/node.rb#7266 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7602 + # source://prism//lib/prism/node.rb#7109 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#7607 + # source://prism//lib/prism/node.rb#7114 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end - # attr_reader collection: Prism::node + # The collection to iterate over. + # + # for i in a end + # ^ # - # source://prism//lib/prism/node.rb#7642 + # source://prism//lib/prism/node.rb#7155 sig { returns(Prism::Node) } def collection; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7621 + # source://prism//lib/prism/node.rb#7128 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7612 + # source://prism//lib/prism/node.rb#7119 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?index: Prism::node, ?collection: Prism::node, ?statements: StatementsNode?, ?for_keyword_loc: Location, ?in_keyword_loc: Location, ?do_keyword_loc: Location?, ?end_keyword_loc: Location, ?location: Location) -> ForNode # - # source://prism//lib/prism/node.rb#7626 + # source://prism//lib/prism/node.rb#7133 sig do params( index: Prism::Node, @@ -13919,37 +13947,43 @@ class Prism::ForNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7607 + # source://prism//lib/prism/node.rb#7114 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { index: Prism::node, collection: Prism::node, statements: StatementsNode?, for_keyword_loc: Location, in_keyword_loc: Location, do_keyword_loc: Location?, end_keyword_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#7634 + # source://prism//lib/prism/node.rb#7141 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#7692 + # source://prism//lib/prism/node.rb#7222 sig { returns(T.nilable(String)) } def do_keyword; end - # attr_reader do_keyword_loc: Location? + # The location of the `do` keyword, if present. + # + # for i in a do end + # ^^ # - # source://prism//lib/prism/node.rb#7662 + # source://prism//lib/prism/node.rb#7189 sig { returns(T.nilable(Prism::Location)) } def do_keyword_loc; end # def end_keyword: () -> String # - # source://prism//lib/prism/node.rb#7697 + # source://prism//lib/prism/node.rb#7227 sig { returns(String) } def end_keyword; end - # attr_reader end_keyword_loc: Location + # The location of the `end` keyword. + # + # for i in a end + # ^^^ # - # source://prism//lib/prism/node.rb#7675 + # source://prism//lib/prism/node.rb#7205 sig { returns(Prism::Location) } def end_keyword_loc; end @@ -13958,43 +13992,57 @@ class Prism::ForNode < ::Prism::Node # def for_keyword: () -> String # - # source://prism//lib/prism/node.rb#7682 + # source://prism//lib/prism/node.rb#7212 sig { returns(String) } def for_keyword; end - # attr_reader for_keyword_loc: Location + # The location of the `for` keyword. # - # source://prism//lib/prism/node.rb#7648 + # for i in a end + # ^^^ + # + # source://prism//lib/prism/node.rb#7169 sig { returns(Prism::Location) } def for_keyword_loc; end # def in_keyword: () -> String # - # source://prism//lib/prism/node.rb#7687 + # source://prism//lib/prism/node.rb#7217 sig { returns(String) } def in_keyword; end - # attr_reader in_keyword_loc: Location + # The location of the `in` keyword. # - # source://prism//lib/prism/node.rb#7655 + # for i in a end + # ^^ + # + # source://prism//lib/prism/node.rb#7179 sig { returns(Prism::Location) } def in_keyword_loc; end - # attr_reader index: Prism::node + # The index expression for `for` loops. # - # source://prism//lib/prism/node.rb#7639 + # for i in a end + # ^ + # + # source://prism//lib/prism/node.rb#7149 sig { returns(Prism::Node) } def index; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#7702 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#7232 + sig { override.returns(String) } + def inspect; end - # attr_reader statements: StatementsNode? + # Represents the body of statements to execute for each iteration of the loop. # - # source://prism//lib/prism/node.rb#7645 + # for i in a + # foo(i) + # ^^^^^^ + # end + # + # source://prism//lib/prism/node.rb#7163 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -14013,7 +14061,7 @@ class Prism::ForNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#7735 + # source://prism//lib/prism/node.rb#7250 sig { override.returns(Symbol) } def type; end @@ -14025,7 +14073,7 @@ class Prism::ForNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#7745 + # source://prism//lib/prism/node.rb#7260 def type; end end end @@ -14037,73 +14085,73 @@ end # ^^^ # end # -# source://prism//lib/prism/node.rb#7769 +# source://prism//lib/prism/node.rb#7284 class Prism::ForwardingArgumentsNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [ForwardingArgumentsNode] a new instance of ForwardingArgumentsNode # - # source://prism//lib/prism/node.rb#7771 + # source://prism//lib/prism/node.rb#7286 sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#7846 + # source://prism//lib/prism/node.rb#7359 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7778 + # source://prism//lib/prism/node.rb#7292 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#7783 + # source://prism//lib/prism/node.rb#7297 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7793 + # source://prism//lib/prism/node.rb#7307 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7788 + # source://prism//lib/prism/node.rb#7302 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?location: Location) -> ForwardingArgumentsNode # - # source://prism//lib/prism/node.rb#7798 + # source://prism//lib/prism/node.rb#7312 sig { params(location: Prism::Location).returns(Prism::ForwardingArgumentsNode) } def copy(location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7783 + # source://prism//lib/prism/node.rb#7297 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } # - # source://prism//lib/prism/node.rb#7806 + # source://prism//lib/prism/node.rb#7320 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#7811 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#7325 + sig { override.returns(String) } + def inspect; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by @@ -14120,7 +14168,7 @@ class Prism::ForwardingArgumentsNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#7830 + # source://prism//lib/prism/node.rb#7343 sig { override.returns(Symbol) } def type; end @@ -14132,7 +14180,7 @@ class Prism::ForwardingArgumentsNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#7840 + # source://prism//lib/prism/node.rb#7353 def type; end end end @@ -14143,73 +14191,73 @@ end # ^^^ # end # -# source://prism//lib/prism/node.rb#7856 +# source://prism//lib/prism/node.rb#7369 class Prism::ForwardingParameterNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [ForwardingParameterNode] a new instance of ForwardingParameterNode # - # source://prism//lib/prism/node.rb#7858 + # source://prism//lib/prism/node.rb#7371 sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#7933 + # source://prism//lib/prism/node.rb#7444 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7865 + # source://prism//lib/prism/node.rb#7377 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#7870 + # source://prism//lib/prism/node.rb#7382 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7880 + # source://prism//lib/prism/node.rb#7392 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7875 + # source://prism//lib/prism/node.rb#7387 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?location: Location) -> ForwardingParameterNode # - # source://prism//lib/prism/node.rb#7885 + # source://prism//lib/prism/node.rb#7397 sig { params(location: Prism::Location).returns(Prism::ForwardingParameterNode) } def copy(location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7870 + # source://prism//lib/prism/node.rb#7382 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } # - # source://prism//lib/prism/node.rb#7893 + # source://prism//lib/prism/node.rb#7405 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#7898 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#7410 + sig { override.returns(String) } + def inspect; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by @@ -14226,7 +14274,7 @@ class Prism::ForwardingParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#7917 + # source://prism//lib/prism/node.rb#7428 sig { override.returns(Symbol) } def type; end @@ -14238,7 +14286,7 @@ class Prism::ForwardingParameterNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#7927 + # source://prism//lib/prism/node.rb#7438 def type; end end end @@ -14248,79 +14296,79 @@ end # super # ^^^^^ # -# source://prism//lib/prism/node.rb#7942 +# source://prism//lib/prism/node.rb#7453 class Prism::ForwardingSuperNode < ::Prism::Node # def initialize: (BlockNode? block, Location location) -> void # # @return [ForwardingSuperNode] a new instance of ForwardingSuperNode # - # source://prism//lib/prism/node.rb#7944 + # source://prism//lib/prism/node.rb#7455 sig { params(source: Prism::Source, block: T.nilable(Prism::BlockNode), location: Prism::Location).void } def initialize(source, block, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#8031 + # source://prism//lib/prism/node.rb#7534 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7952 + # source://prism//lib/prism/node.rb#7462 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader block: BlockNode? # - # source://prism//lib/prism/node.rb#7987 + # source://prism//lib/prism/node.rb#7497 sig { returns(T.nilable(Prism::BlockNode)) } def block; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7957 + # source://prism//lib/prism/node.rb#7467 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7969 + # source://prism//lib/prism/node.rb#7479 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7962 + # source://prism//lib/prism/node.rb#7472 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?block: BlockNode?, ?location: Location) -> ForwardingSuperNode # - # source://prism//lib/prism/node.rb#7974 + # source://prism//lib/prism/node.rb#7484 sig { params(block: T.nilable(Prism::BlockNode), location: Prism::Location).returns(Prism::ForwardingSuperNode) } def copy(block: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7957 + # source://prism//lib/prism/node.rb#7467 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { block: BlockNode?, location: Location } # - # source://prism//lib/prism/node.rb#7982 + # source://prism//lib/prism/node.rb#7492 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#7990 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#7500 + sig { override.returns(String) } + def inspect; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by @@ -14337,7 +14385,7 @@ class Prism::ForwardingSuperNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#8015 + # source://prism//lib/prism/node.rb#7518 sig { override.returns(Symbol) } def type; end @@ -14349,7 +14397,7 @@ class Prism::ForwardingSuperNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#8025 + # source://prism//lib/prism/node.rb#7528 def type; end end end @@ -14359,13 +14407,13 @@ end # $target &&= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#8041 +# source://prism//lib/prism/node.rb#7544 class Prism::GlobalVariableAndWriteNode < ::Prism::Node # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void # # @return [GlobalVariableAndWriteNode] a new instance of GlobalVariableAndWriteNode # - # source://prism//lib/prism/node.rb#8043 + # source://prism//lib/prism/node.rb#7546 sig do params( source: Prism::Source, @@ -14381,36 +14429,36 @@ class Prism::GlobalVariableAndWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#8152 + # source://prism//lib/prism/node.rb#7648 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8054 + # source://prism//lib/prism/node.rb#7556 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#8059 + # source://prism//lib/prism/node.rb#7561 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8069 + # source://prism//lib/prism/node.rb#7571 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8064 + # source://prism//lib/prism/node.rb#7566 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> GlobalVariableAndWriteNode # - # source://prism//lib/prism/node.rb#8074 + # source://prism//lib/prism/node.rb#7576 sig do params( name: Symbol, @@ -14425,13 +14473,13 @@ class Prism::GlobalVariableAndWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8059 + # source://prism//lib/prism/node.rb#7561 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#8082 + # source://prism//lib/prism/node.rb#7584 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -14441,33 +14489,33 @@ class Prism::GlobalVariableAndWriteNode < ::Prism::Node sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#8112 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#7614 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#8087 + # source://prism//lib/prism/node.rb#7589 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#8090 + # source://prism//lib/prism/node.rb#7592 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#8107 + # source://prism//lib/prism/node.rb#7609 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#8097 + # source://prism//lib/prism/node.rb#7599 sig { returns(Prism::Location) } def operator_loc; end @@ -14486,13 +14534,13 @@ class Prism::GlobalVariableAndWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#8136 + # source://prism//lib/prism/node.rb#7632 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#8104 + # source://prism//lib/prism/node.rb#7606 sig { returns(Prism::Node) } def value; end @@ -14504,7 +14552,7 @@ class Prism::GlobalVariableAndWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#8146 + # source://prism//lib/prism/node.rb#7642 def type; end end end @@ -14514,81 +14562,93 @@ end # $target += value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#8165 +# source://prism//lib/prism/node.rb#7661 class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Symbol operator, Location location) -> void + # def initialize: (Symbol name, Location name_loc, Location binary_operator_loc, Prism::node value, Symbol binary_operator, Location location) -> void # # @return [GlobalVariableOperatorWriteNode] a new instance of GlobalVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#8167 + # source://prism//lib/prism/node.rb#7663 sig do params( source: Prism::Source, name: Symbol, name_loc: Prism::Location, - operator_loc: Prism::Location, + binary_operator_loc: Prism::Location, value: Prism::Node, - operator: Symbol, + binary_operator: Symbol, location: Prism::Location ).void end - def initialize(source, name, name_loc, operator_loc, value, operator, location); end + def initialize(source, name, name_loc, binary_operator_loc, value, binary_operator, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#8276 + # source://prism//lib/prism/node.rb#7764 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8179 + # source://prism//lib/prism/node.rb#7674 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#7727 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#7717 + sig { returns(Prism::Location) } + def binary_operator_loc; end + # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8184 + # source://prism//lib/prism/node.rb#7679 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8194 + # source://prism//lib/prism/node.rb#7689 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8189 + # source://prism//lib/prism/node.rb#7684 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?operator: Symbol, ?location: Location) -> GlobalVariableOperatorWriteNode + # def copy: (?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol, ?location: Location) -> GlobalVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#8199 + # source://prism//lib/prism/node.rb#7694 sig do params( name: Symbol, name_loc: Prism::Location, - operator_loc: Prism::Location, + binary_operator_loc: Prism::Location, value: Prism::Node, - operator: Symbol, + binary_operator: Symbol, location: Prism::Location ).returns(Prism::GlobalVariableOperatorWriteNode) end - def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), operator: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8184 + # source://prism//lib/prism/node.rb#7679 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, operator: Symbol, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol, location: Location } # - # source://prism//lib/prism/node.rb#8207 + # source://prism//lib/prism/node.rb#7702 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -14598,34 +14658,34 @@ class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#8235 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#7730 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#8212 + # source://prism//lib/prism/node.rb#7707 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#8215 + # source://prism//lib/prism/node.rb#7710 sig { returns(Prism::Location) } def name_loc; end - # attr_reader operator: Symbol + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. # - # source://prism//lib/prism/node.rb#8232 - sig { returns(Symbol) } + # source://prism//lib/prism/node_ext.rb#387 def operator; end - # attr_reader operator_loc: Location + # 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.rb#8222 - sig { returns(Prism::Location) } + # source://prism//lib/prism/node_ext.rb#394 def operator_loc; end # Sometimes you want to check an instance of a node against a list of @@ -14643,13 +14703,13 @@ class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#8260 + # source://prism//lib/prism/node.rb#7748 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#8229 + # source://prism//lib/prism/node.rb#7724 sig { returns(Prism::Node) } def value; end @@ -14661,7 +14721,7 @@ class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#8270 + # source://prism//lib/prism/node.rb#7758 def type; end end end @@ -14671,13 +14731,13 @@ end # $target ||= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#8290 +# source://prism//lib/prism/node.rb#7778 class Prism::GlobalVariableOrWriteNode < ::Prism::Node # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void # # @return [GlobalVariableOrWriteNode] a new instance of GlobalVariableOrWriteNode # - # source://prism//lib/prism/node.rb#8292 + # source://prism//lib/prism/node.rb#7780 sig do params( source: Prism::Source, @@ -14693,36 +14753,36 @@ class Prism::GlobalVariableOrWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#8401 + # source://prism//lib/prism/node.rb#7882 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8303 + # source://prism//lib/prism/node.rb#7790 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#8308 + # source://prism//lib/prism/node.rb#7795 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8318 + # source://prism//lib/prism/node.rb#7805 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8313 + # source://prism//lib/prism/node.rb#7800 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> GlobalVariableOrWriteNode # - # source://prism//lib/prism/node.rb#8323 + # source://prism//lib/prism/node.rb#7810 sig do params( name: Symbol, @@ -14737,13 +14797,13 @@ class Prism::GlobalVariableOrWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8308 + # source://prism//lib/prism/node.rb#7795 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#8331 + # source://prism//lib/prism/node.rb#7818 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -14753,33 +14813,33 @@ class Prism::GlobalVariableOrWriteNode < ::Prism::Node sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#8361 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#7848 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#8336 + # source://prism//lib/prism/node.rb#7823 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#8339 + # source://prism//lib/prism/node.rb#7826 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#8356 + # source://prism//lib/prism/node.rb#7843 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#8346 + # source://prism//lib/prism/node.rb#7833 sig { returns(Prism::Location) } def operator_loc; end @@ -14798,13 +14858,13 @@ class Prism::GlobalVariableOrWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#8385 + # source://prism//lib/prism/node.rb#7866 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#8353 + # source://prism//lib/prism/node.rb#7840 sig { returns(Prism::Node) } def value; end @@ -14816,7 +14876,7 @@ class Prism::GlobalVariableOrWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#8395 + # source://prism//lib/prism/node.rb#7876 def type; end end end @@ -14826,73 +14886,73 @@ end # $foo # ^^^^ # -# source://prism//lib/prism/node.rb#8414 +# source://prism//lib/prism/node.rb#7895 class Prism::GlobalVariableReadNode < ::Prism::Node # def initialize: (Symbol name, Location location) -> void # # @return [GlobalVariableReadNode] a new instance of GlobalVariableReadNode # - # source://prism//lib/prism/node.rb#8416 + # source://prism//lib/prism/node.rb#7897 sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } def initialize(source, name, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#8500 + # source://prism//lib/prism/node.rb#7978 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8424 + # source://prism//lib/prism/node.rb#7904 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#8429 + # source://prism//lib/prism/node.rb#7909 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8439 + # source://prism//lib/prism/node.rb#7919 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8434 + # source://prism//lib/prism/node.rb#7914 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?location: Location) -> GlobalVariableReadNode # - # source://prism//lib/prism/node.rb#8444 + # source://prism//lib/prism/node.rb#7924 sig { params(name: Symbol, location: Prism::Location).returns(Prism::GlobalVariableReadNode) } def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8429 + # source://prism//lib/prism/node.rb#7909 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } # - # source://prism//lib/prism/node.rb#8452 + # source://prism//lib/prism/node.rb#7932 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#8464 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#7944 + 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. # @@ -14900,7 +14960,7 @@ class Prism::GlobalVariableReadNode < ::Prism::Node # # $_Test # name `:$_Test` # - # source://prism//lib/prism/node.rb#8461 + # source://prism//lib/prism/node.rb#7941 sig { returns(Symbol) } def name; end @@ -14919,7 +14979,7 @@ class Prism::GlobalVariableReadNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#8484 + # source://prism//lib/prism/node.rb#7962 sig { override.returns(Symbol) } def type; end @@ -14931,7 +14991,7 @@ class Prism::GlobalVariableReadNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#8494 + # source://prism//lib/prism/node.rb#7972 def type; end end end @@ -14941,77 +15001,77 @@ end # $foo, $bar = baz # ^^^^ ^^^^ # -# source://prism//lib/prism/node.rb#8510 +# source://prism//lib/prism/node.rb#7988 class Prism::GlobalVariableTargetNode < ::Prism::Node # def initialize: (Symbol name, Location location) -> void # # @return [GlobalVariableTargetNode] a new instance of GlobalVariableTargetNode # - # source://prism//lib/prism/node.rb#8512 + # source://prism//lib/prism/node.rb#7990 sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } def initialize(source, name, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#8592 + # source://prism//lib/prism/node.rb#8067 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8520 + # source://prism//lib/prism/node.rb#7997 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#8525 + # source://prism//lib/prism/node.rb#8002 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8535 + # source://prism//lib/prism/node.rb#8012 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8530 + # source://prism//lib/prism/node.rb#8007 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?location: Location) -> GlobalVariableTargetNode # - # source://prism//lib/prism/node.rb#8540 + # source://prism//lib/prism/node.rb#8017 sig { params(name: Symbol, location: Prism::Location).returns(Prism::GlobalVariableTargetNode) } def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8525 + # source://prism//lib/prism/node.rb#8002 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } # - # source://prism//lib/prism/node.rb#8548 + # source://prism//lib/prism/node.rb#8025 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#8556 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#8033 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#8553 + # source://prism//lib/prism/node.rb#8030 sig { returns(Symbol) } def name; end @@ -15030,7 +15090,7 @@ class Prism::GlobalVariableTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#8576 + # source://prism//lib/prism/node.rb#8051 sig { override.returns(Symbol) } def type; end @@ -15042,7 +15102,7 @@ class Prism::GlobalVariableTargetNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#8586 + # source://prism//lib/prism/node.rb#8061 def type; end end end @@ -15052,13 +15112,13 @@ end # $foo = 1 # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#8602 +# source://prism//lib/prism/node.rb#8077 class Prism::GlobalVariableWriteNode < ::Prism::Node # def initialize: (Symbol name, Location name_loc, Prism::node value, Location operator_loc, Location location) -> void # # @return [GlobalVariableWriteNode] a new instance of GlobalVariableWriteNode # - # source://prism//lib/prism/node.rb#8604 + # source://prism//lib/prism/node.rb#8079 sig do params( source: Prism::Source, @@ -15074,36 +15134,36 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#8729 + # source://prism//lib/prism/node.rb#8197 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8615 + # source://prism//lib/prism/node.rb#8089 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#8620 + # source://prism//lib/prism/node.rb#8094 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8630 + # source://prism//lib/prism/node.rb#8104 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8625 + # source://prism//lib/prism/node.rb#8099 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location, ?location: Location) -> GlobalVariableWriteNode # - # source://prism//lib/prism/node.rb#8635 + # source://prism//lib/prism/node.rb#8109 sig do params( name: Symbol, @@ -15118,24 +15178,24 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8620 + # source://prism//lib/prism/node.rb#8094 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#8643 + # source://prism//lib/prism/node.rb#8117 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#8689 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#8163 + 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. # @@ -15143,7 +15203,7 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # # $_Test = 123 # name `:$_Test` # - # source://prism//lib/prism/node.rb#8652 + # source://prism//lib/prism/node.rb#8126 sig { returns(Symbol) } def name; end @@ -15152,13 +15212,13 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # $foo = :bar # ^^^^ # - # source://prism//lib/prism/node.rb#8658 + # source://prism//lib/prism/node.rb#8132 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#8684 + # source://prism//lib/prism/node.rb#8158 sig { returns(String) } def operator; end @@ -15167,7 +15227,7 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # $foo = :bar # ^ # - # source://prism//lib/prism/node.rb#8677 + # source://prism//lib/prism/node.rb#8151 sig { returns(Prism::Location) } def operator_loc; end @@ -15186,7 +15246,7 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#8713 + # source://prism//lib/prism/node.rb#8181 sig { override.returns(Symbol) } def type; end @@ -15198,7 +15258,7 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # $-xyz = 123 # ^^^ # - # source://prism//lib/prism/node.rb#8671 + # source://prism//lib/prism/node.rb#8145 sig { returns(Prism::Node) } def value; end @@ -15210,7 +15270,7 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#8723 + # source://prism//lib/prism/node.rb#8191 def type; end end end @@ -15220,13 +15280,13 @@ end # { a => b } # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#8742 +# source://prism//lib/prism/node.rb#8210 class Prism::HashNode < ::Prism::Node # def initialize: (Location opening_loc, Array[AssocNode | AssocSplatNode] elements, Location closing_loc, Location location) -> void # # @return [HashNode] a new instance of HashNode # - # source://prism//lib/prism/node.rb#8744 + # source://prism//lib/prism/node.rb#8212 sig do params( source: Prism::Source, @@ -15241,24 +15301,24 @@ class Prism::HashNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#8864 + # source://prism//lib/prism/node.rb#8327 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8754 + # source://prism//lib/prism/node.rb#8221 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#8759 + # source://prism//lib/prism/node.rb#8226 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#8821 + # source://prism//lib/prism/node.rb#8288 sig { returns(String) } def closing; end @@ -15267,25 +15327,25 @@ class Prism::HashNode < ::Prism::Node # { a => b } # ^ # - # source://prism//lib/prism/node.rb#8809 + # source://prism//lib/prism/node.rb#8276 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8769 + # source://prism//lib/prism/node.rb#8236 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8764 + # source://prism//lib/prism/node.rb#8231 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?opening_loc: Location, ?elements: Array[AssocNode | AssocSplatNode], ?closing_loc: Location, ?location: Location) -> HashNode # - # source://prism//lib/prism/node.rb#8774 + # source://prism//lib/prism/node.rb#8241 sig do params( opening_loc: Prism::Location, @@ -15299,13 +15359,13 @@ class Prism::HashNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8759 + # source://prism//lib/prism/node.rb#8226 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location, elements: Array[AssocNode | AssocSplatNode], closing_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#8782 + # source://prism//lib/prism/node.rb#8249 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -15317,22 +15377,22 @@ class Prism::HashNode < ::Prism::Node # { **foo } # ^^^^^ # - # source://prism//lib/prism/node.rb#8803 + # source://prism//lib/prism/node.rb#8270 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#8826 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#8293 + sig { override.returns(String) } + def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#8816 + # source://prism//lib/prism/node.rb#8283 sig { returns(String) } def opening; end @@ -15341,7 +15401,7 @@ class Prism::HashNode < ::Prism::Node # { a => b } # ^ # - # source://prism//lib/prism/node.rb#8790 + # source://prism//lib/prism/node.rb#8257 sig { returns(Prism::Location) } def opening_loc; end @@ -15360,7 +15420,7 @@ class Prism::HashNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#8848 + # source://prism//lib/prism/node.rb#8311 sig { override.returns(Symbol) } def type; end @@ -15372,7 +15432,7 @@ class Prism::HashNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#8858 + # source://prism//lib/prism/node.rb#8321 def type; end end end @@ -15385,13 +15445,13 @@ end # foo => { a: 1, b: 2, **c } # ^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#8880 +# source://prism//lib/prism/node.rb#8343 class Prism::HashPatternNode < ::Prism::Node # def initialize: (Prism::node? constant, Array[AssocNode] elements, AssocSplatNode | NoKeywordsParameterNode | nil rest, Location? opening_loc, Location? closing_loc, Location location) -> void # # @return [HashPatternNode] a new instance of HashPatternNode # - # source://prism//lib/prism/node.rb#8882 + # source://prism//lib/prism/node.rb#8345 sig do params( source: Prism::Source, @@ -15408,54 +15468,54 @@ class Prism::HashPatternNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#9026 + # source://prism//lib/prism/node.rb#8472 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8894 + # source://prism//lib/prism/node.rb#8356 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#8899 + # source://prism//lib/prism/node.rb#8361 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#8971 + # source://prism//lib/prism/node.rb#8433 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#8953 + # source://prism//lib/prism/node.rb#8415 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8913 + # source://prism//lib/prism/node.rb#8375 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8904 + # source://prism//lib/prism/node.rb#8366 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader constant: Prism::node? # - # source://prism//lib/prism/node.rb#8931 + # source://prism//lib/prism/node.rb#8393 sig { returns(T.nilable(Prism::Node)) } def constant; end # def copy: (?constant: Prism::node?, ?elements: Array[AssocNode], ?rest: AssocSplatNode | NoKeywordsParameterNode | nil, ?opening_loc: Location?, ?closing_loc: Location?, ?location: Location) -> HashPatternNode # - # source://prism//lib/prism/node.rb#8918 + # source://prism//lib/prism/node.rb#8380 sig do params( constant: T.nilable(Prism::Node), @@ -15471,46 +15531,46 @@ class Prism::HashPatternNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8899 + # source://prism//lib/prism/node.rb#8361 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { constant: Prism::node?, elements: Array[AssocNode], rest: AssocSplatNode | NoKeywordsParameterNode | nil, opening_loc: Location?, closing_loc: Location?, location: Location } # - # source://prism//lib/prism/node.rb#8926 + # source://prism//lib/prism/node.rb#8388 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#8934 + # source://prism//lib/prism/node.rb#8396 sig { returns(T::Array[Prism::AssocNode]) } def elements; end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#8976 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#8438 + sig { override.returns(String) } + def inspect; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#8966 + # source://prism//lib/prism/node.rb#8428 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#8940 + # source://prism//lib/prism/node.rb#8402 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader rest: AssocSplatNode | NoKeywordsParameterNode | nil # - # source://prism//lib/prism/node.rb#8937 + # source://prism//lib/prism/node.rb#8399 sig { returns(T.nilable(T.any(Prism::AssocSplatNode, Prism::NoKeywordsParameterNode))) } def rest; end @@ -15529,7 +15589,7 @@ class Prism::HashPatternNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#9010 + # source://prism//lib/prism/node.rb#8456 sig { override.returns(Symbol) } def type; end @@ -15541,18 +15601,18 @@ class Prism::HashPatternNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#9020 + # source://prism//lib/prism/node.rb#8466 def type; end end end -# source://prism//lib/prism/node_ext.rb#35 +# source://prism//lib/prism/node_ext.rb#49 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#37 + # source://prism//lib/prism/node_ext.rb#51 def heredoc?; end end @@ -15567,13 +15627,13 @@ end # foo ? bar : baz # ^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#9047 +# source://prism//lib/prism/node.rb#8493 class Prism::IfNode < ::Prism::Node # def initialize: (Location? if_keyword_loc, Prism::node predicate, Location? then_keyword_loc, StatementsNode? statements, Prism::node? consequent, Location? end_keyword_loc, Location location) -> void # # @return [IfNode] a new instance of IfNode # - # source://prism//lib/prism/node.rb#9049 + # source://prism//lib/prism/node.rb#8495 sig do params( source: Prism::Source, @@ -15591,30 +15651,30 @@ class Prism::IfNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#9264 + # source://prism//lib/prism/node.rb#8687 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9062 + # source://prism//lib/prism/node.rb#8507 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#9071 + # source://prism//lib/prism/node.rb#8512 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9085 + # source://prism//lib/prism/node.rb#8526 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#9076 + # source://prism//lib/prism/node.rb#8517 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end @@ -15632,13 +15692,13 @@ class Prism::IfNode < ::Prism::Node # if foo then bar else baz end # ^^^^^^^^^^^^ # - # source://prism//lib/prism/node.rb#9176 + # source://prism//lib/prism/node.rb#8617 sig { returns(T.nilable(Prism::Node)) } def consequent; end # def copy: (?if_keyword_loc: Location?, ?predicate: Prism::node, ?then_keyword_loc: Location?, ?statements: StatementsNode?, ?consequent: Prism::node?, ?end_keyword_loc: Location?, ?location: Location) -> IfNode # - # source://prism//lib/prism/node.rb#9090 + # source://prism//lib/prism/node.rb#8531 sig do params( if_keyword_loc: T.nilable(Prism::Location), @@ -15655,19 +15715,19 @@ class Prism::IfNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9071 + # source://prism//lib/prism/node.rb#8512 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { if_keyword_loc: Location?, predicate: Prism::node, then_keyword_loc: Location?, statements: StatementsNode?, consequent: Prism::node?, end_keyword_loc: Location?, location: Location } # - # source://prism//lib/prism/node.rb#9098 + # source://prism//lib/prism/node.rb#8539 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#9207 + # source://prism//lib/prism/node.rb#8648 sig { returns(T.nilable(String)) } def end_keyword; end @@ -15678,7 +15738,7 @@ class Prism::IfNode < ::Prism::Node # end # ^^^ # - # source://prism//lib/prism/node.rb#9184 + # source://prism//lib/prism/node.rb#8625 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end @@ -15687,7 +15747,7 @@ class Prism::IfNode < ::Prism::Node # def if_keyword: () -> String? # - # source://prism//lib/prism/node.rb#9197 + # source://prism//lib/prism/node.rb#8638 sig { returns(T.nilable(String)) } def if_keyword; end @@ -15698,15 +15758,18 @@ class Prism::IfNode < ::Prism::Node # # The `if_keyword_loc` field will be `nil` when the `IfNode` represents a ternary expression. # - # source://prism//lib/prism/node.rb#9108 + # source://prism//lib/prism/node.rb#8549 sig { returns(T.nilable(Prism::Location)) } def if_keyword_loc; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#9212 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#8653 + sig { override.returns(String) } + def inspect; end + + # source://prism//lib/prism/parse_result/newlines.rb#91 + def newline!(lines); end # The node for the condition the `IfNode` is testing. # @@ -15721,13 +15784,10 @@ class Prism::IfNode < ::Prism::Node # foo ? bar : baz # ^^^ # - # source://prism//lib/prism/node.rb#9132 + # source://prism//lib/prism/node.rb#8573 sig { returns(Prism::Node) } def predicate; end - # source://prism//lib/prism/node.rb#9066 - def set_newline_flag(newline_marked); end - # Represents the body of statements that will be executed when the predicate is evaluated as truthy. Will be `nil` when no body is provided. # # if foo @@ -15737,13 +15797,13 @@ class Prism::IfNode < ::Prism::Node # ^^^ # end # - # source://prism//lib/prism/node.rb#9161 + # source://prism//lib/prism/node.rb#8602 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # def then_keyword: () -> String? # - # source://prism//lib/prism/node.rb#9202 + # source://prism//lib/prism/node.rb#8643 sig { returns(T.nilable(String)) } def then_keyword; end @@ -15755,7 +15815,7 @@ class Prism::IfNode < ::Prism::Node # a ? b : c # ^ # - # source://prism//lib/prism/node.rb#9141 + # source://prism//lib/prism/node.rb#8582 sig { returns(T.nilable(Prism::Location)) } def then_keyword_loc; end @@ -15774,7 +15834,7 @@ class Prism::IfNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#9248 + # source://prism//lib/prism/node.rb#8671 sig { override.returns(Symbol) } def type; end @@ -15786,7 +15846,7 @@ class Prism::IfNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#9258 + # source://prism//lib/prism/node.rb#8681 def type; end end end @@ -15796,13 +15856,13 @@ end # 1.0i # ^^^^ # -# source://prism//lib/prism/node.rb#9279 +# source://prism//lib/prism/node.rb#8702 class Prism::ImaginaryNode < ::Prism::Node # def initialize: (FloatNode | IntegerNode | RationalNode numeric, Location location) -> void # # @return [ImaginaryNode] a new instance of ImaginaryNode # - # source://prism//lib/prism/node.rb#9281 + # source://prism//lib/prism/node.rb#8704 sig do params( source: Prism::Source, @@ -15815,36 +15875,36 @@ class Prism::ImaginaryNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#9362 + # source://prism//lib/prism/node.rb#8781 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9289 + # source://prism//lib/prism/node.rb#8711 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#9294 + # source://prism//lib/prism/node.rb#8716 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9304 + # source://prism//lib/prism/node.rb#8726 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#9299 + # source://prism//lib/prism/node.rb#8721 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?numeric: FloatNode | IntegerNode | RationalNode, ?location: Location) -> ImaginaryNode # - # source://prism//lib/prism/node.rb#9309 + # source://prism//lib/prism/node.rb#8731 sig do params( numeric: T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode), @@ -15856,28 +15916,28 @@ class Prism::ImaginaryNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9294 + # source://prism//lib/prism/node.rb#8716 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { numeric: FloatNode | IntegerNode | RationalNode, location: Location } # - # source://prism//lib/prism/node.rb#9317 + # source://prism//lib/prism/node.rb#8739 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#9325 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#8747 + sig { override.returns(String) } + def inspect; end # attr_reader numeric: FloatNode | IntegerNode | RationalNode # - # source://prism//lib/prism/node.rb#9322 + # source://prism//lib/prism/node.rb#8744 sig { returns(T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode)) } def numeric; end @@ -15896,13 +15956,13 @@ class Prism::ImaginaryNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#9346 + # source://prism//lib/prism/node.rb#8765 sig { override.returns(Symbol) } def type; end # Returns the value of the node as a Ruby Complex. # - # source://prism//lib/prism/node_ext.rb#87 + # source://prism//lib/prism/node_ext.rb#101 sig { returns(Complex) } def value; end @@ -15914,7 +15974,7 @@ class Prism::ImaginaryNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#9356 + # source://prism//lib/prism/node.rb#8775 def type; end end end @@ -15930,73 +15990,73 @@ end # foo in { bar: } # ^^^^ # -# source://prism//lib/prism/node.rb#9378 +# source://prism//lib/prism/node.rb#8797 class Prism::ImplicitNode < ::Prism::Node # def initialize: (Prism::node value, Location location) -> void # # @return [ImplicitNode] a new instance of ImplicitNode # - # source://prism//lib/prism/node.rb#9380 + # source://prism//lib/prism/node.rb#8799 sig { params(source: Prism::Source, value: Prism::Node, location: Prism::Location).void } def initialize(source, value, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#9461 + # source://prism//lib/prism/node.rb#8876 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9388 + # source://prism//lib/prism/node.rb#8806 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#9393 + # source://prism//lib/prism/node.rb#8811 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9403 + # source://prism//lib/prism/node.rb#8821 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#9398 + # source://prism//lib/prism/node.rb#8816 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?value: Prism::node, ?location: Location) -> ImplicitNode # - # source://prism//lib/prism/node.rb#9408 + # source://prism//lib/prism/node.rb#8826 sig { params(value: Prism::Node, location: Prism::Location).returns(Prism::ImplicitNode) } def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9393 + # source://prism//lib/prism/node.rb#8811 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#9416 + # source://prism//lib/prism/node.rb#8834 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#9424 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#8842 + sig { override.returns(String) } + def inspect; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by @@ -16013,13 +16073,13 @@ class Prism::ImplicitNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#9445 + # source://prism//lib/prism/node.rb#8860 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#9421 + # source://prism//lib/prism/node.rb#8839 sig { returns(Prism::Node) } def value; end @@ -16031,7 +16091,7 @@ class Prism::ImplicitNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#9455 + # source://prism//lib/prism/node.rb#8870 def type; end end end @@ -16050,73 +16110,73 @@ end # foo, = bar # ^ # -# source://prism//lib/prism/node.rb#9480 +# source://prism//lib/prism/node.rb#8895 class Prism::ImplicitRestNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [ImplicitRestNode] a new instance of ImplicitRestNode # - # source://prism//lib/prism/node.rb#9482 + # source://prism//lib/prism/node.rb#8897 sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#9557 + # source://prism//lib/prism/node.rb#8970 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9489 + # source://prism//lib/prism/node.rb#8903 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#9494 + # source://prism//lib/prism/node.rb#8908 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9504 + # source://prism//lib/prism/node.rb#8918 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#9499 + # source://prism//lib/prism/node.rb#8913 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?location: Location) -> ImplicitRestNode # - # source://prism//lib/prism/node.rb#9509 + # source://prism//lib/prism/node.rb#8923 sig { params(location: Prism::Location).returns(Prism::ImplicitRestNode) } def copy(location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9494 + # source://prism//lib/prism/node.rb#8908 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } # - # source://prism//lib/prism/node.rb#9517 + # source://prism//lib/prism/node.rb#8931 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#9522 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#8936 + sig { override.returns(String) } + def inspect; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by @@ -16133,7 +16193,7 @@ class Prism::ImplicitRestNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#9541 + # source://prism//lib/prism/node.rb#8954 sig { override.returns(Symbol) } def type; end @@ -16145,7 +16205,7 @@ class Prism::ImplicitRestNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#9551 + # source://prism//lib/prism/node.rb#8964 def type; end end end @@ -16155,13 +16215,13 @@ end # case a; in b then c end # ^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#9566 +# source://prism//lib/prism/node.rb#8979 class Prism::InNode < ::Prism::Node # def initialize: (Prism::node pattern, StatementsNode? statements, Location in_loc, Location? then_loc, Location location) -> void # # @return [InNode] a new instance of InNode # - # source://prism//lib/prism/node.rb#9568 + # source://prism//lib/prism/node.rb#8981 sig do params( source: Prism::Source, @@ -16177,36 +16237,36 @@ class Prism::InNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#9696 + # source://prism//lib/prism/node.rb#9097 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9579 + # source://prism//lib/prism/node.rb#8991 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#9584 + # source://prism//lib/prism/node.rb#8996 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9597 + # source://prism//lib/prism/node.rb#9009 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#9589 + # source://prism//lib/prism/node.rb#9001 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?pattern: Prism::node, ?statements: StatementsNode?, ?in_loc: Location, ?then_loc: Location?, ?location: Location) -> InNode # - # source://prism//lib/prism/node.rb#9602 + # source://prism//lib/prism/node.rb#9014 sig do params( pattern: Prism::Node, @@ -16221,13 +16281,13 @@ class Prism::InNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9584 + # source://prism//lib/prism/node.rb#8996 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { pattern: Prism::node, statements: StatementsNode?, in_loc: Location, then_loc: Location?, location: Location } # - # source://prism//lib/prism/node.rb#9610 + # source://prism//lib/prism/node.rb#9022 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -16236,43 +16296,43 @@ class Prism::InNode < ::Prism::Node # def in: () -> String # - # source://prism//lib/prism/node.rb#9641 + # source://prism//lib/prism/node.rb#9053 sig { returns(String) } def in; end # attr_reader in_loc: Location # - # source://prism//lib/prism/node.rb#9621 + # source://prism//lib/prism/node.rb#9033 sig { returns(Prism::Location) } def in_loc; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#9651 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#9063 + sig { override.returns(String) } + def inspect; end # attr_reader pattern: Prism::node # - # source://prism//lib/prism/node.rb#9615 + # source://prism//lib/prism/node.rb#9027 sig { returns(Prism::Node) } def pattern; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#9618 + # source://prism//lib/prism/node.rb#9030 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # def then: () -> String? # - # source://prism//lib/prism/node.rb#9646 + # source://prism//lib/prism/node.rb#9058 sig { returns(T.nilable(String)) } def then; end # attr_reader then_loc: Location? # - # source://prism//lib/prism/node.rb#9628 + # source://prism//lib/prism/node.rb#9040 sig { returns(T.nilable(Prism::Location)) } def then_loc; end @@ -16291,7 +16351,7 @@ class Prism::InNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#9680 + # source://prism//lib/prism/node.rb#9081 sig { override.returns(Symbol) } def type; end @@ -16303,7 +16363,7 @@ class Prism::InNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#9690 + # source://prism//lib/prism/node.rb#9091 def type; end end end @@ -16313,13 +16373,13 @@ end # foo.bar[baz] &&= value # ^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#9709 +# source://prism//lib/prism/node.rb#9110 class Prism::IndexAndWriteNode < ::Prism::Node # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Prism::node? block, Location operator_loc, Prism::node value, Location location) -> void # # @return [IndexAndWriteNode] a new instance of IndexAndWriteNode # - # source://prism//lib/prism/node.rb#9711 + # source://prism//lib/prism/node.rb#9112 sig do params( source: Prism::Source, @@ -16340,18 +16400,18 @@ class Prism::IndexAndWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#9916 + # source://prism//lib/prism/node.rb#9289 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9727 + # source://prism//lib/prism/node.rb#9127 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#9792 + # source://prism//lib/prism/node.rb#9192 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end @@ -16359,61 +16419,61 @@ class Prism::IndexAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9825 + # source://prism//lib/prism/node.rb#9225 sig { returns(T::Boolean) } def attribute_write?; end # attr_reader block: Prism::node? # - # source://prism//lib/prism/node.rb#9802 + # source://prism//lib/prism/node.rb#9202 sig { returns(T.nilable(Prism::Node)) } def block; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#9835 + # source://prism//lib/prism/node.rb#9235 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#9772 + # source://prism//lib/prism/node.rb#9172 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9732 + # source://prism//lib/prism/node.rb#9132 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#9845 + # source://prism//lib/prism/node.rb#9245 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#9795 + # source://prism//lib/prism/node.rb#9195 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9747 + # source://prism//lib/prism/node.rb#9147 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#9737 + # source://prism//lib/prism/node.rb#9137 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: Prism::node?, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> IndexAndWriteNode # - # source://prism//lib/prism/node.rb#9752 + # source://prism//lib/prism/node.rb#9152 sig do params( flags: Integer, @@ -16433,13 +16493,13 @@ class Prism::IndexAndWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9732 + # source://prism//lib/prism/node.rb#9132 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Prism::node?, operator_loc: Location, value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#9760 + # source://prism//lib/prism/node.rb#9160 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -16450,43 +16510,43 @@ class Prism::IndexAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9830 + # source://prism//lib/prism/node.rb#9230 sig { returns(T::Boolean) } def ignore_visibility?; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#9855 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#9255 + sig { override.returns(String) } + def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#9840 + # source://prism//lib/prism/node.rb#9240 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#9785 + # source://prism//lib/prism/node.rb#9185 sig { returns(Prism::Location) } def opening_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#9850 + # source://prism//lib/prism/node.rb#9250 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#9805 + # source://prism//lib/prism/node.rb#9205 sig { returns(Prism::Location) } def operator_loc; end # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#9769 + # source://prism//lib/prism/node.rb#9169 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -16494,7 +16554,7 @@ class Prism::IndexAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9815 + # source://prism//lib/prism/node.rb#9215 sig { returns(T::Boolean) } def safe_navigation?; end @@ -16513,13 +16573,13 @@ class Prism::IndexAndWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#9900 + # source://prism//lib/prism/node.rb#9273 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#9812 + # source://prism//lib/prism/node.rb#9212 sig { returns(Prism::Node) } def value; end @@ -16527,7 +16587,7 @@ class Prism::IndexAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9820 + # source://prism//lib/prism/node.rb#9220 sig { returns(T::Boolean) } def variable_call?; end @@ -16535,7 +16595,7 @@ class Prism::IndexAndWriteNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#9765 + # source://prism//lib/prism/node.rb#9165 sig { returns(Integer) } def flags; end @@ -16547,7 +16607,7 @@ class Prism::IndexAndWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#9910 + # source://prism//lib/prism/node.rb#9283 def type; end end end @@ -16557,13 +16617,271 @@ end # foo.bar[baz] += value # ^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#9934 +# source://prism//lib/prism/node.rb#9307 class Prism::IndexOperatorWriteNode < ::Prism::Node - # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Prism::node? block, Symbol operator, Location operator_loc, Prism::node value, Location location) -> void + # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Prism::node? block, Symbol binary_operator, Location binary_operator_loc, Prism::node value, Location location) -> void # # @return [IndexOperatorWriteNode] a new instance of IndexOperatorWriteNode # - # source://prism//lib/prism/node.rb#9936 + # source://prism//lib/prism/node.rb#9309 + sig do + params( + source: Prism::Source, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::Node), + binary_operator: Symbol, + binary_operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(source, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, binary_operator, binary_operator_loc, value, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#9485 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#9325 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#9390 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9426 + sig { returns(T::Boolean) } + def attribute_write?; end + + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#9403 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#9406 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # attr_reader block: Prism::node? + # + # source://prism//lib/prism/node.rb#9400 + sig { returns(T.nilable(Prism::Node)) } + def block; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#9436 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#9370 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9330 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#9446 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#9393 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9345 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9335 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: Prism::node?, ?binary_operator: Symbol, ?binary_operator_loc: Location, ?value: Prism::node, ?location: Location) -> IndexOperatorWriteNode + # + # source://prism//lib/prism/node.rb#9350 + sig do + params( + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::Node), + binary_operator: Symbol, + binary_operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::IndexOperatorWriteNode) + end + def copy(flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), binary_operator: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9330 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Prism::node?, binary_operator: Symbol, binary_operator_loc: Location, value: Prism::node, location: Location } + # + # source://prism//lib/prism/node.rb#9358 + 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#9431 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#9451 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#9441 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#9383 + 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#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 + + # attr_reader receiver: Prism::node? + # + # source://prism//lib/prism/node.rb#9367 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9416 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9469 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#9413 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9421 + sig { returns(T::Boolean) } + def variable_call?; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#9363 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9479 + 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#9504 +class Prism::IndexOrWriteNode < ::Prism::Node + # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Prism::node? block, Location operator_loc, Prism::node value, Location location) -> void + # + # @return [IndexOrWriteNode] a new instance of IndexOrWriteNode + # + # source://prism//lib/prism/node.rb#9506 sig do params( source: Prism::Source, @@ -16574,29 +16892,28 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, block: T.nilable(Prism::Node), - operator: Symbol, operator_loc: Prism::Location, value: Prism::Node, location: Prism::Location ).void end - def initialize(source, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator, operator_loc, value, location); end + def initialize(source, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#10141 + # source://prism//lib/prism/node.rb#9683 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9953 + # source://prism//lib/prism/node.rb#9521 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#10018 + # source://prism//lib/prism/node.rb#9586 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end @@ -16604,306 +16921,61 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10054 + # source://prism//lib/prism/node.rb#9619 sig { returns(T::Boolean) } def attribute_write?; end # attr_reader block: Prism::node? # - # source://prism//lib/prism/node.rb#10028 + # source://prism//lib/prism/node.rb#9596 sig { returns(T.nilable(Prism::Node)) } def block; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#10064 + # source://prism//lib/prism/node.rb#9629 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#9998 + # source://prism//lib/prism/node.rb#9566 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9958 + # source://prism//lib/prism/node.rb#9526 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#10074 + # source://prism//lib/prism/node.rb#9639 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#10021 - sig { returns(Prism::Location) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#9973 - sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#9963 - sig { override.returns(T::Array[Prism::Node]) } - def compact_child_nodes; end - - # def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: Prism::node?, ?operator: Symbol, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> IndexOperatorWriteNode - # - # source://prism//lib/prism/node.rb#9978 - sig do - params( - flags: Integer, - receiver: T.nilable(Prism::Node), - call_operator_loc: T.nilable(Prism::Location), - opening_loc: Prism::Location, - arguments: T.nilable(Prism::ArgumentsNode), - closing_loc: Prism::Location, - block: T.nilable(Prism::Node), - operator: Symbol, - operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location - ).returns(Prism::IndexOperatorWriteNode) - end - def copy(flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), operator: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#9958 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Prism::node?, operator: Symbol, operator_loc: Location, value: Prism::node, location: Location } - # - # source://prism//lib/prism/node.rb#9986 - 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#10059 - sig { returns(T::Boolean) } - def ignore_visibility?; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#10079 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#10069 - sig { returns(String) } - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#10011 - sig { returns(Prism::Location) } - def opening_loc; end - - # attr_reader operator: Symbol - # - # source://prism//lib/prism/node.rb#10031 - sig { returns(Symbol) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#10034 - sig { returns(Prism::Location) } - def operator_loc; end - - # attr_reader receiver: Prism::node? - # - # source://prism//lib/prism/node.rb#9995 - sig { returns(T.nilable(Prism::Node)) } - def receiver; end - - # def safe_navigation?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10044 - sig { returns(T::Boolean) } - def safe_navigation?; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10125 - sig { override.returns(Symbol) } - def type; end - - # attr_reader value: Prism::node - # - # source://prism//lib/prism/node.rb#10041 - sig { returns(Prism::Node) } - def value; end - - # def variable_call?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10049 - sig { returns(T::Boolean) } - def variable_call?; end - - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#9991 - sig { returns(Integer) } - def flags; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10135 - 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#10160 -class Prism::IndexOrWriteNode < ::Prism::Node - # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Prism::node? block, Location operator_loc, Prism::node value, Location location) -> void - # - # @return [IndexOrWriteNode] a new instance of IndexOrWriteNode - # - # source://prism//lib/prism/node.rb#10162 - sig do - params( - source: Prism::Source, - flags: Integer, - receiver: T.nilable(Prism::Node), - call_operator_loc: T.nilable(Prism::Location), - opening_loc: Prism::Location, - arguments: T.nilable(Prism::ArgumentsNode), - closing_loc: Prism::Location, - block: T.nilable(Prism::Node), - operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location - ).void - end - def initialize(source, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, location); end - - # Implements case-equality for the node. This is effectively == but without - # comparing the value of locations. Locations are checked only for presence. - # - # source://prism//lib/prism/node.rb#10367 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#10178 - sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } - def accept(visitor); end - - # attr_reader arguments: ArgumentsNode? - # - # source://prism//lib/prism/node.rb#10243 - sig { returns(T.nilable(Prism::ArgumentsNode)) } - def arguments; end - - # def attribute_write?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10276 - sig { returns(T::Boolean) } - def attribute_write?; end - - # attr_reader block: Prism::node? - # - # source://prism//lib/prism/node.rb#10253 - sig { returns(T.nilable(Prism::Node)) } - def block; end - - # def call_operator: () -> String? - # - # source://prism//lib/prism/node.rb#10286 - sig { returns(T.nilable(String)) } - def call_operator; end - - # attr_reader call_operator_loc: Location? - # - # source://prism//lib/prism/node.rb#10223 - sig { returns(T.nilable(Prism::Location)) } - def call_operator_loc; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10183 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#10296 - sig { returns(String) } - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#10246 + # source://prism//lib/prism/node.rb#9589 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10198 + # source://prism//lib/prism/node.rb#9541 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10188 + # source://prism//lib/prism/node.rb#9531 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: Prism::node?, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> IndexOrWriteNode # - # source://prism//lib/prism/node.rb#10203 + # source://prism//lib/prism/node.rb#9546 sig do params( flags: Integer, @@ -16923,13 +16995,13 @@ class Prism::IndexOrWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10183 + # source://prism//lib/prism/node.rb#9526 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Prism::node?, operator_loc: Location, value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#10211 + # source://prism//lib/prism/node.rb#9554 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -16940,43 +17012,43 @@ class Prism::IndexOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10281 + # source://prism//lib/prism/node.rb#9624 sig { returns(T::Boolean) } def ignore_visibility?; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#10306 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#9649 + sig { override.returns(String) } + def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#10291 + # source://prism//lib/prism/node.rb#9634 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#10236 + # source://prism//lib/prism/node.rb#9579 sig { returns(Prism::Location) } def opening_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#10301 + # source://prism//lib/prism/node.rb#9644 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#10256 + # source://prism//lib/prism/node.rb#9599 sig { returns(Prism::Location) } def operator_loc; end # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#10220 + # source://prism//lib/prism/node.rb#9563 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -16984,7 +17056,7 @@ class Prism::IndexOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10266 + # source://prism//lib/prism/node.rb#9609 sig { returns(T::Boolean) } def safe_navigation?; end @@ -17003,13 +17075,13 @@ class Prism::IndexOrWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#10351 + # source://prism//lib/prism/node.rb#9667 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#10263 + # source://prism//lib/prism/node.rb#9606 sig { returns(Prism::Node) } def value; end @@ -17017,7 +17089,7 @@ class Prism::IndexOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10271 + # source://prism//lib/prism/node.rb#9614 sig { returns(T::Boolean) } def variable_call?; end @@ -17025,7 +17097,7 @@ class Prism::IndexOrWriteNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#10216 + # source://prism//lib/prism/node.rb#9559 sig { returns(Integer) } def flags; end @@ -17037,7 +17109,7 @@ class Prism::IndexOrWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#10361 + # source://prism//lib/prism/node.rb#9677 def type; end end end @@ -17055,13 +17127,13 @@ end # for foo[bar] in baz do end # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#10393 +# source://prism//lib/prism/node.rb#9709 class Prism::IndexTargetNode < ::Prism::Node # def initialize: (Integer flags, Prism::node receiver, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Prism::node? block, Location location) -> void # # @return [IndexTargetNode] a new instance of IndexTargetNode # - # source://prism//lib/prism/node.rb#10395 + # source://prism//lib/prism/node.rb#9711 sig do params( source: Prism::Source, @@ -17079,18 +17151,18 @@ class Prism::IndexTargetNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#10555 + # source://prism//lib/prism/node.rb#9851 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10408 + # source://prism//lib/prism/node.rb#9723 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#10459 + # source://prism//lib/prism/node.rb#9774 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end @@ -17098,49 +17170,49 @@ class Prism::IndexTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10482 + # source://prism//lib/prism/node.rb#9797 sig { returns(T::Boolean) } def attribute_write?; end # attr_reader block: Prism::node? # - # source://prism//lib/prism/node.rb#10469 + # source://prism//lib/prism/node.rb#9784 sig { returns(T.nilable(Prism::Node)) } def block; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10413 + # source://prism//lib/prism/node.rb#9728 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#10497 + # source://prism//lib/prism/node.rb#9812 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#10462 + # source://prism//lib/prism/node.rb#9777 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10427 + # source://prism//lib/prism/node.rb#9742 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10418 + # source://prism//lib/prism/node.rb#9733 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?receiver: Prism::node, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: Prism::node?, ?location: Location) -> IndexTargetNode # - # source://prism//lib/prism/node.rb#10432 + # source://prism//lib/prism/node.rb#9747 sig do params( flags: Integer, @@ -17157,13 +17229,13 @@ class Prism::IndexTargetNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10413 + # source://prism//lib/prism/node.rb#9728 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Prism::node?, location: Location } # - # source://prism//lib/prism/node.rb#10440 + # source://prism//lib/prism/node.rb#9755 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -17174,31 +17246,31 @@ class Prism::IndexTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10487 + # source://prism//lib/prism/node.rb#9802 sig { returns(T::Boolean) } def ignore_visibility?; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#10502 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#9817 + sig { override.returns(String) } + def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#10492 + # source://prism//lib/prism/node.rb#9807 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#10452 + # source://prism//lib/prism/node.rb#9767 sig { returns(Prism::Location) } def opening_loc; end # attr_reader receiver: Prism::node # - # source://prism//lib/prism/node.rb#10449 + # source://prism//lib/prism/node.rb#9764 sig { returns(Prism::Node) } def receiver; end @@ -17206,7 +17278,7 @@ class Prism::IndexTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10472 + # source://prism//lib/prism/node.rb#9787 sig { returns(T::Boolean) } def safe_navigation?; end @@ -17225,7 +17297,7 @@ class Prism::IndexTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#10539 + # source://prism//lib/prism/node.rb#9835 sig { override.returns(Symbol) } def type; end @@ -17233,7 +17305,7 @@ class Prism::IndexTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10477 + # source://prism//lib/prism/node.rb#9792 sig { returns(T::Boolean) } def variable_call?; end @@ -17241,7 +17313,7 @@ class Prism::IndexTargetNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#10445 + # source://prism//lib/prism/node.rb#9760 sig { returns(Integer) } def flags; end @@ -17253,7 +17325,7 @@ class Prism::IndexTargetNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#10549 + # source://prism//lib/prism/node.rb#9845 def type; end end end @@ -17261,11 +17333,11 @@ 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#310 +# source://prism//lib/prism/parse_result.rb#388 class Prism::InlineComment < ::Prism::Comment # Returns a string representation of this comment. # - # source://prism//lib/prism/parse_result.rb#318 + # source://prism//lib/prism/parse_result.rb#396 sig { returns(String) } def inspect; end @@ -17274,380 +17346,890 @@ class Prism::InlineComment < ::Prism::Comment # # @return [Boolean] # - # source://prism//lib/prism/parse_result.rb#313 + # source://prism//lib/prism/parse_result.rb#391 sig { override.returns(T::Boolean) } def trailing?; end end -# Represents the use of the `&&=` operator for assignment to an instance variable. -# -# @target &&= value -# ^^^^^^^^^^^^^^^^^ +# 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/node.rb#10570 -class Prism::InstanceVariableAndWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void +# source://prism//lib/prism/inspect_visitor.rb#12 +class Prism::InspectVisitor < ::Prism::Visitor + # Initializes a new instance of the InspectVisitor. # - # @return [InstanceVariableAndWriteNode] a new instance of InstanceVariableAndWriteNode + # @return [InspectVisitor] a new instance of InspectVisitor # - # source://prism//lib/prism/node.rb#10572 - sig do - params( - source: Prism::Source, - name: Symbol, - name_loc: Prism::Location, - operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location - ).void - end - def initialize(source, name, name_loc, operator_loc, value, location); end + # source://prism//lib/prism/inspect_visitor.rb#35 + sig { params(indent: String).void } + def initialize(indent = T.unsafe(nil)); end - # Implements case-equality for the node. This is effectively == but without - # comparing the value of locations. Locations are checked only for presence. + # The list of commands that we need to execute in order to compose the + # final string. # - # source://prism//lib/prism/node.rb#10681 - def ===(other); end + # source://prism//lib/prism/inspect_visitor.rb#32 + def commands; end - # def accept: (Visitor visitor) -> void + # Compose the final string. # - # source://prism//lib/prism/node.rb#10583 - sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } - def accept(visitor); end + # source://prism//lib/prism/inspect_visitor.rb#48 + sig { returns(String) } + def compose; end - # def child_nodes: () -> Array[nil | Node] + # The current prefix string. # - # source://prism//lib/prism/node.rb#10588 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end + # source://prism//lib/prism/inspect_visitor.rb#28 + def indent; end - # def comment_targets: () -> Array[Node | Location] + # Inspect a AliasGlobalVariableNode node. # - # source://prism//lib/prism/node.rb#10598 - sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } - def comment_targets; end + # source://prism//lib/prism/inspect_visitor.rb#77 + def visit_alias_global_variable_node(node); end - # def compact_child_nodes: () -> Array[Node] + # Inspect a AliasMethodNode node. # - # source://prism//lib/prism/node.rb#10593 - sig { override.returns(T::Array[Prism::Node]) } - def compact_child_nodes; end + # source://prism//lib/prism/inspect_visitor.rb#87 + def visit_alias_method_node(node); end - # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> InstanceVariableAndWriteNode + # Inspect a AlternationPatternNode node. # - # source://prism//lib/prism/node.rb#10603 - sig do - params( - name: Symbol, - name_loc: Prism::Location, - operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location - ).returns(Prism::InstanceVariableAndWriteNode) - end - def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + # source://prism//lib/prism/inspect_visitor.rb#97 + def visit_alternation_pattern_node(node); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # Inspect a AndNode node. # - # source://prism//lib/prism/node.rb#10588 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end + # source://prism//lib/prism/inspect_visitor.rb#107 + def visit_and_node(node); end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } + # Inspect a ArgumentsNode node. # - # source://prism//lib/prism/node.rb#10611 - sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } - def deconstruct_keys(keys); end + # source://prism//lib/prism/inspect_visitor.rb#117 + def visit_arguments_node(node); end - # source://prism//lib/prism/desugar_compiler.rb#181 - def desugar; end + # Inspect a ArrayNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#133 + def visit_array_node(node); end - sig { override.returns(T::Array[Prism::Reflection::Field]) } - def fields; end + # Inspect a ArrayPatternNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#151 + def visit_array_pattern_node(node); end - # def inspect(NodeInspector inspector) -> String + # Inspect a AssocNode node. # - # source://prism//lib/prism/node.rb#10641 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/inspect_visitor.rb#188 + def visit_assoc_node(node); end - # attr_reader name: Symbol + # Inspect a AssocSplatNode node. # - # source://prism//lib/prism/node.rb#10616 - sig { returns(Symbol) } - def name; end + # source://prism//lib/prism/inspect_visitor.rb#198 + def visit_assoc_splat_node(node); end - # attr_reader name_loc: Location + # Inspect a BackReferenceReadNode node. # - # source://prism//lib/prism/node.rb#10619 - sig { returns(Prism::Location) } - def name_loc; end + # source://prism//lib/prism/inspect_visitor.rb#210 + def visit_back_reference_read_node(node); end - # def operator: () -> String + # Inspect a BeginNode node. # - # source://prism//lib/prism/node.rb#10636 - sig { returns(String) } - def operator; end + # source://prism//lib/prism/inspect_visitor.rb#216 + def visit_begin_node(node); end - # attr_reader operator_loc: Location + # Inspect a BlockArgumentNode node. # - # source://prism//lib/prism/node.rb#10626 - sig { returns(Prism::Location) } - def operator_loc; end + # source://prism//lib/prism/inspect_visitor.rb#247 + def visit_block_argument_node(node); end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Inspect a BlockLocalVariableNode node. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # source://prism//lib/prism/inspect_visitor.rb#259 + def visit_block_local_variable_node(node); end + + # Inspect a BlockNode node. # - # def type: () -> Symbol + # source://prism//lib/prism/inspect_visitor.rb#267 + def visit_block_node(node); end + + # Inspect a BlockParameterNode node. # - # source://prism//lib/prism/node.rb#10665 - sig { override.returns(Symbol) } - def type; end + # source://prism//lib/prism/inspect_visitor.rb#287 + def visit_block_parameter_node(node); end - # attr_reader value: Prism::node + # Inspect a BlockParametersNode node. # - # source://prism//lib/prism/node.rb#10633 - sig { returns(Prism::Node) } - def value; end + # source://prism//lib/prism/inspect_visitor.rb#301 + def visit_block_parameters_node(node); end - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10675 - def type; end - end -end + # Inspect a BreakNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#323 + def visit_break_node(node); end -# Represents assigning to an instance variable using an operator that isn't `=`. -# -# @target += value -# ^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#10694 -class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Symbol operator, Location location) -> void + # Inspect a CallAndWriteNode node. # - # @return [InstanceVariableOperatorWriteNode] a new instance of InstanceVariableOperatorWriteNode + # source://prism//lib/prism/inspect_visitor.rb#335 + def visit_call_and_write_node(node); end + + # Inspect a CallNode node. # - # source://prism//lib/prism/node.rb#10696 - sig do - params( - source: Prism::Source, - name: Symbol, - name_loc: Prism::Location, - operator_loc: Prism::Location, - value: Prism::Node, - operator: Symbol, - location: Prism::Location - ).void - end - def initialize(source, name, name_loc, operator_loc, value, operator, location); end + # source://prism//lib/prism/inspect_visitor.rb#355 + def visit_call_node(node); end - # Implements case-equality for the node. This is effectively == but without - # comparing the value of locations. Locations are checked only for presence. + # Inspect a CallOperatorWriteNode node. # - # source://prism//lib/prism/node.rb#10805 - def ===(other); end + # source://prism//lib/prism/inspect_visitor.rb#385 + def visit_call_operator_write_node(node); end - # def accept: (Visitor visitor) -> void + # Inspect a CallOrWriteNode node. # - # source://prism//lib/prism/node.rb#10708 - sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } - def accept(visitor); end + # source://prism//lib/prism/inspect_visitor.rb#406 + def visit_call_or_write_node(node); end - # def child_nodes: () -> Array[nil | Node] + # Inspect a CallTargetNode node. # - # source://prism//lib/prism/node.rb#10713 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end + # source://prism//lib/prism/inspect_visitor.rb#426 + def visit_call_target_node(node); end - # def comment_targets: () -> Array[Node | Location] + # Inspect a CapturePatternNode node. # - # source://prism//lib/prism/node.rb#10723 - sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } - def comment_targets; end + # source://prism//lib/prism/inspect_visitor.rb#438 + def visit_capture_pattern_node(node); end - # def compact_child_nodes: () -> Array[Node] + # Inspect a CaseMatchNode node. # - # source://prism//lib/prism/node.rb#10718 - sig { override.returns(T::Array[Prism::Node]) } - def compact_child_nodes; end + # source://prism//lib/prism/inspect_visitor.rb#448 + def visit_case_match_node(node); end - # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?operator: Symbol, ?location: Location) -> InstanceVariableOperatorWriteNode + # Inspect a CaseNode node. # - # source://prism//lib/prism/node.rb#10728 - sig do - params( - name: Symbol, - name_loc: Prism::Location, - operator_loc: Prism::Location, - value: Prism::Node, - operator: Symbol, - location: Prism::Location - ).returns(Prism::InstanceVariableOperatorWriteNode) - end - def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), operator: T.unsafe(nil), location: T.unsafe(nil)); end + # source://prism//lib/prism/inspect_visitor.rb#476 + def visit_case_node(node); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # Inspect a ClassNode node. # - # source://prism//lib/prism/node.rb#10713 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end + # source://prism//lib/prism/inspect_visitor.rb#504 + def visit_class_node(node); end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, operator: Symbol, location: Location } + # Inspect a ClassVariableAndWriteNode node. # - # source://prism//lib/prism/node.rb#10736 - sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } - def deconstruct_keys(keys); end + # source://prism//lib/prism/inspect_visitor.rb#528 + def visit_class_variable_and_write_node(node); end - # source://prism//lib/prism/desugar_compiler.rb#193 - def desugar; end + # Inspect a ClassVariableOperatorWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#538 + def visit_class_variable_operator_write_node(node); end - sig { override.returns(T::Array[Prism::Reflection::Field]) } - def fields; end + # Inspect a ClassVariableOrWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#549 + def visit_class_variable_or_write_node(node); end - # def inspect(NodeInspector inspector) -> String + # Inspect a ClassVariableReadNode node. # - # source://prism//lib/prism/node.rb#10764 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/inspect_visitor.rb#559 + def visit_class_variable_read_node(node); end - # attr_reader name: Symbol + # Inspect a ClassVariableTargetNode node. # - # source://prism//lib/prism/node.rb#10741 - sig { returns(Symbol) } - def name; end + # source://prism//lib/prism/inspect_visitor.rb#565 + def visit_class_variable_target_node(node); end - # attr_reader name_loc: Location + # Inspect a ClassVariableWriteNode node. # - # source://prism//lib/prism/node.rb#10744 - sig { returns(Prism::Location) } - def name_loc; end + # source://prism//lib/prism/inspect_visitor.rb#571 + def visit_class_variable_write_node(node); end - # attr_reader operator: Symbol + # Inspect a ConstantAndWriteNode node. # - # source://prism//lib/prism/node.rb#10761 - sig { returns(Symbol) } - def operator; end + # source://prism//lib/prism/inspect_visitor.rb#581 + def visit_constant_and_write_node(node); end - # attr_reader operator_loc: Location + # Inspect a ConstantOperatorWriteNode node. # - # source://prism//lib/prism/node.rb#10751 - sig { returns(Prism::Location) } - def operator_loc; end + # source://prism//lib/prism/inspect_visitor.rb#591 + def visit_constant_operator_write_node(node); end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Inspect a ConstantOrWriteNode node. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # source://prism//lib/prism/inspect_visitor.rb#602 + def visit_constant_or_write_node(node); end + + # Inspect a ConstantPathAndWriteNode node. # - # def type: () -> Symbol + # source://prism//lib/prism/inspect_visitor.rb#612 + def visit_constant_path_and_write_node(node); end + + # Inspect a ConstantPathNode node. # - # source://prism//lib/prism/node.rb#10789 - sig { override.returns(Symbol) } - def type; end + # source://prism//lib/prism/inspect_visitor.rb#622 + def visit_constant_path_node(node); end - # attr_reader value: Prism::node + # Inspect a ConstantPathOperatorWriteNode node. # - # source://prism//lib/prism/node.rb#10758 - sig { returns(Prism::Node) } - def value; end + # source://prism//lib/prism/inspect_visitor.rb#640 + def visit_constant_path_operator_write_node(node); end - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10799 - def type; end - end -end + # Inspect a ConstantPathOrWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#651 + def visit_constant_path_or_write_node(node); end -# Represents the use of the `||=` operator for assignment to an instance variable. -# -# @target ||= value -# ^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#10819 -class Prism::InstanceVariableOrWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void + # Inspect a ConstantPathTargetNode node. # - # @return [InstanceVariableOrWriteNode] a new instance of InstanceVariableOrWriteNode + # source://prism//lib/prism/inspect_visitor.rb#661 + def visit_constant_path_target_node(node); end + + # Inspect a ConstantPathWriteNode node. # - # source://prism//lib/prism/node.rb#10821 - sig do - params( - source: Prism::Source, - name: Symbol, - name_loc: Prism::Location, - operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location - ).void - end - def initialize(source, name, name_loc, operator_loc, value, location); end + # source://prism//lib/prism/inspect_visitor.rb#679 + def visit_constant_path_write_node(node); end - # Implements case-equality for the node. This is effectively == but without - # comparing the value of locations. Locations are checked only for presence. + # Inspect a ConstantReadNode node. # - # source://prism//lib/prism/node.rb#10930 - def ===(other); end + # source://prism//lib/prism/inspect_visitor.rb#689 + def visit_constant_read_node(node); end - # def accept: (Visitor visitor) -> void + # Inspect a ConstantTargetNode node. # - # source://prism//lib/prism/node.rb#10832 - sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } - def accept(visitor); end + # source://prism//lib/prism/inspect_visitor.rb#695 + def visit_constant_target_node(node); end - # def child_nodes: () -> Array[nil | Node] + # Inspect a ConstantWriteNode node. # - # source://prism//lib/prism/node.rb#10837 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end + # source://prism//lib/prism/inspect_visitor.rb#701 + def visit_constant_write_node(node); end - # def comment_targets: () -> Array[Node | Location] + # Inspect a DefNode node. # - # source://prism//lib/prism/node.rb#10847 - sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } - def comment_targets; end + # source://prism//lib/prism/inspect_visitor.rb#711 + def visit_def_node(node); end - # def compact_child_nodes: () -> Array[Node] + # Inspect a DefinedNode node. # - # source://prism//lib/prism/node.rb#10842 + # source://prism//lib/prism/inspect_visitor.rb#743 + def visit_defined_node(node); end + + # Inspect a ElseNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#753 + def visit_else_node(node); end + + # Inspect a EmbeddedStatementsNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#766 + def visit_embedded_statements_node(node); end + + # Inspect a EmbeddedVariableNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#779 + def visit_embedded_variable_node(node); end + + # Inspect a EnsureNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#787 + def visit_ensure_node(node); end + + # Inspect a FalseNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#800 + def visit_false_node(node); end + + # Inspect a FindPatternNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#805 + def visit_find_pattern_node(node); end + + # Inspect a FlipFlopNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#831 + def visit_flip_flop_node(node); end + + # Inspect a FloatNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#851 + def visit_float_node(node); end + + # Inspect a ForNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#857 + def visit_for_node(node); end + + # Inspect a ForwardingArgumentsNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#876 + def visit_forwarding_arguments_node(node); end + + # Inspect a ForwardingParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#881 + def visit_forwarding_parameter_node(node); end + + # Inspect a ForwardingSuperNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#886 + def visit_forwarding_super_node(node); end + + # Inspect a GlobalVariableAndWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#897 + def visit_global_variable_and_write_node(node); end + + # Inspect a GlobalVariableOperatorWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#907 + def visit_global_variable_operator_write_node(node); end + + # Inspect a GlobalVariableOrWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#918 + def visit_global_variable_or_write_node(node); end + + # Inspect a GlobalVariableReadNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#928 + def visit_global_variable_read_node(node); end + + # Inspect a GlobalVariableTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#934 + def visit_global_variable_target_node(node); end + + # Inspect a GlobalVariableWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#940 + def visit_global_variable_write_node(node); end + + # Inspect a HashNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#950 + def visit_hash_node(node); end + + # Inspect a HashPatternNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#966 + def visit_hash_pattern_node(node); end + + # Inspect a IfNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#994 + def visit_if_node(node); end + + # Inspect a ImaginaryNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1016 + def visit_imaginary_node(node); end + + # Inspect a ImplicitNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1023 + def visit_implicit_node(node); end + + # Inspect a ImplicitRestNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1030 + def visit_implicit_rest_node(node); end + + # Inspect a InNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1035 + def visit_in_node(node); end + + # Inspect a IndexAndWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1050 + def visit_index_and_write_node(node); end + + # Inspect a IndexOperatorWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1081 + def visit_index_operator_write_node(node); end + + # Inspect a IndexOrWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1113 + def visit_index_or_write_node(node); end + + # Inspect a IndexTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1144 + def visit_index_target_node(node); end + + # Inspect a InstanceVariableAndWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1167 + def visit_instance_variable_and_write_node(node); end + + # Inspect a InstanceVariableOperatorWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1177 + def visit_instance_variable_operator_write_node(node); end + + # Inspect a InstanceVariableOrWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1188 + def visit_instance_variable_or_write_node(node); end + + # Inspect a InstanceVariableReadNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1198 + def visit_instance_variable_read_node(node); end + + # Inspect a InstanceVariableTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1204 + def visit_instance_variable_target_node(node); end + + # Inspect a InstanceVariableWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1210 + def visit_instance_variable_write_node(node); end + + # Inspect a IntegerNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1220 + def visit_integer_node(node); end + + # Inspect a InterpolatedMatchLastLineNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1228 + def visit_interpolated_match_last_line_node(node); end + + # Inspect a InterpolatedRegularExpressionNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1246 + def visit_interpolated_regular_expression_node(node); end + + # Inspect a InterpolatedStringNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1264 + def visit_interpolated_string_node(node); end + + # Inspect a InterpolatedSymbolNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1282 + def visit_interpolated_symbol_node(node); end + + # Inspect a InterpolatedXStringNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1298 + def visit_interpolated_x_string_node(node); end + + # Inspect a ItLocalVariableReadNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1314 + def visit_it_local_variable_read_node(node); end + + # Inspect a ItParametersNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1319 + def visit_it_parameters_node(node); end + + # Inspect a KeywordHashNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1324 + def visit_keyword_hash_node(node); end + + # Inspect a KeywordRestParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1340 + def visit_keyword_rest_parameter_node(node); end + + # Inspect a LambdaNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1354 + def visit_lambda_node(node); end + + # Inspect a LocalVariableAndWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1375 + def visit_local_variable_and_write_node(node); end + + # Inspect a LocalVariableOperatorWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1386 + def visit_local_variable_operator_write_node(node); end + + # Inspect a LocalVariableOrWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1398 + def visit_local_variable_or_write_node(node); end + + # Inspect a LocalVariableReadNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1409 + def visit_local_variable_read_node(node); end + + # Inspect a LocalVariableTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1416 + def visit_local_variable_target_node(node); end + + # Inspect a LocalVariableWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1423 + def visit_local_variable_write_node(node); end + + # Inspect a MatchLastLineNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1434 + def visit_match_last_line_node(node); end + + # Inspect a MatchPredicateNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1445 + def visit_match_predicate_node(node); end + + # Inspect a MatchRequiredNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1455 + def visit_match_required_node(node); end + + # Inspect a MatchWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1465 + def visit_match_write_node(node); end + + # Inspect a MissingNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1481 + def visit_missing_node(node); end + + # Inspect a ModuleNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1486 + def visit_module_node(node); end + + # Inspect a MultiTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1503 + def visit_multi_target_node(node); end + + # Inspect a MultiWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1534 + def visit_multi_write_node(node); end + + # Inspect a NextNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1568 + def visit_next_node(node); end + + # Inspect a NilNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1580 + def visit_nil_node(node); end + + # Inspect a NoKeywordsParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1585 + def visit_no_keywords_parameter_node(node); end + + # Inspect a NumberedParametersNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1592 + def visit_numbered_parameters_node(node); end + + # Inspect a NumberedReferenceReadNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1598 + def visit_numbered_reference_read_node(node); end + + # Inspect a OptionalKeywordParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1604 + def visit_optional_keyword_parameter_node(node); end + + # Inspect a OptionalParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1615 + def visit_optional_parameter_node(node); end + + # Inspect a OrNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1627 + def visit_or_node(node); end + + # Inspect a ParametersNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1637 + def visit_parameters_node(node); end + + # Inspect a ParenthesesNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1696 + def visit_parentheses_node(node); end + + # Inspect a PinnedExpressionNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1709 + def visit_pinned_expression_node(node); end + + # Inspect a PinnedVariableNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1719 + def visit_pinned_variable_node(node); end + + # Inspect a PostExecutionNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1727 + def visit_post_execution_node(node); end + + # Inspect a PreExecutionNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1741 + def visit_pre_execution_node(node); end + + # Inspect a ProgramNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1755 + def visit_program_node(node); end + + # Inspect a RangeNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1763 + def visit_range_node(node); end + + # Inspect a RationalNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1783 + def visit_rational_node(node); end + + # Inspect a RedoNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1792 + def visit_redo_node(node); end + + # Inspect a RegularExpressionNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1797 + def visit_regular_expression_node(node); end + + # Inspect a RequiredKeywordParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1808 + def visit_required_keyword_parameter_node(node); end + + # Inspect a RequiredParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1817 + def visit_required_parameter_node(node); end + + # Inspect a RescueModifierNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1825 + def visit_rescue_modifier_node(node); end + + # Inspect a RescueNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1835 + def visit_rescue_node(node); end + + # Inspect a RestParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1869 + def visit_rest_parameter_node(node); end + + # Inspect a RetryNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1883 + def visit_retry_node(node); end + + # Inspect a ReturnNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1888 + def visit_return_node(node); end + + # Inspect a SelfNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1902 + def visit_self_node(node); end + + # Inspect a ShareableConstantNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1907 + def visit_shareable_constant_node(node); end + + # Inspect a SingletonClassNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1916 + def visit_singleton_class_node(node); end + + # Inspect a SourceEncodingNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1933 + def visit_source_encoding_node(node); end + + # Inspect a SourceFileNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1938 + def visit_source_file_node(node); end + + # Inspect a SourceLineNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1946 + def visit_source_line_node(node); end + + # Inspect a SplatNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1951 + def visit_splat_node(node); end + + # Inspect a StatementsNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1963 + def visit_statements_node(node); end + + # Inspect a StringNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1977 + def visit_string_node(node); end + + # Inspect a SuperNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1988 + def visit_super_node(node); end + + # Inspect a SymbolNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2008 + def visit_symbol_node(node); end + + # Inspect a TrueNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2019 + def visit_true_node(node); end + + # Inspect a UndefNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2024 + def visit_undef_node(node); end + + # Inspect a UnlessNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2039 + def visit_unless_node(node); end + + # Inspect a UntilNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2061 + def visit_until_node(node); end + + # Inspect a WhenNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2078 + def visit_when_node(node); end + + # Inspect a WhileNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2100 + def visit_while_node(node); end + + # Inspect a XStringNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2117 + def visit_x_string_node(node); end + + # Inspect a YieldNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2128 + def visit_yield_node(node); end + + private + + # Compose a string representing the given inner location field. + # + # source://prism//lib/prism/inspect_visitor.rb#2150 + def inspect_location(location); end + + # Compose a header for the given node. + # + # source://prism//lib/prism/inspect_visitor.rb#2144 + 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#9866 +class Prism::InstanceVariableAndWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void + # + # @return [InstanceVariableAndWriteNode] a new instance of InstanceVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#9868 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(source, name, name_loc, operator_loc, value, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#9970 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#9878 + 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#9883 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9893 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9888 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> InstanceVariableOrWriteNode + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> InstanceVariableAndWriteNode # - # source://prism//lib/prism/node.rb#10852 + # source://prism//lib/prism/node.rb#9898 sig do params( name: Symbol, @@ -17655,56 +18237,56 @@ class Prism::InstanceVariableOrWriteNode < ::Prism::Node operator_loc: Prism::Location, value: Prism::Node, location: Prism::Location - ).returns(Prism::InstanceVariableOrWriteNode) + ).returns(Prism::InstanceVariableAndWriteNode) end def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10837 + # source://prism//lib/prism/node.rb#9883 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#10860 + # source://prism//lib/prism/node.rb#9906 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # source://prism//lib/prism/desugar_compiler.rb#187 + # source://prism//lib/prism/desugar_compiler.rb#181 def desugar; end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#10890 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#9936 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#10865 + # source://prism//lib/prism/node.rb#9911 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#10868 + # source://prism//lib/prism/node.rb#9914 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#10885 + # source://prism//lib/prism/node.rb#9931 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#10875 + # source://prism//lib/prism/node.rb#9921 sig { returns(Prism::Location) } def operator_loc; end @@ -17723,13 +18305,13 @@ class Prism::InstanceVariableOrWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#10914 + # source://prism//lib/prism/node.rb#9954 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#10882 + # source://prism//lib/prism/node.rb#9928 sig { returns(Prism::Node) } def value; end @@ -17741,94 +18323,142 @@ class Prism::InstanceVariableOrWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#10924 + # source://prism//lib/prism/node.rb#9964 def type; end end end -# Represents referencing an instance variable. +# Represents assigning to an instance variable using an operator that isn't `=`. # -# @foo -# ^^^^ +# @target += value +# ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#10943 -class Prism::InstanceVariableReadNode < ::Prism::Node - # def initialize: (Symbol name, Location location) -> void +# source://prism//lib/prism/node.rb#9983 +class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Location binary_operator_loc, Prism::node value, Symbol binary_operator, Location location) -> void # - # @return [InstanceVariableReadNode] a new instance of InstanceVariableReadNode + # @return [InstanceVariableOperatorWriteNode] a new instance of InstanceVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#10945 - sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } - def initialize(source, name, location); end + # source://prism//lib/prism/node.rb#9985 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol, + location: Prism::Location + ).void + end + def initialize(source, name, name_loc, binary_operator_loc, value, binary_operator, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#11029 + # source://prism//lib/prism/node.rb#10086 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10953 + # source://prism//lib/prism/node.rb#9996 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#10049 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#10039 + sig { returns(Prism::Location) } + def binary_operator_loc; end + # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10958 + # source://prism//lib/prism/node.rb#10001 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10968 + # source://prism//lib/prism/node.rb#10011 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10963 + # source://prism//lib/prism/node.rb#10006 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?location: Location) -> InstanceVariableReadNode + # def copy: (?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol, ?location: Location) -> InstanceVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#10973 - sig { params(name: Symbol, location: Prism::Location).returns(Prism::InstanceVariableReadNode) } - def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#10016 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol, + location: Prism::Location + ).returns(Prism::InstanceVariableOperatorWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10958 + # source://prism//lib/prism/node.rb#10001 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol, location: Location } # - # source://prism//lib/prism/node.rb#10981 + # source://prism//lib/prism/node.rb#10024 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # source://prism//lib/prism/desugar_compiler.rb#193 + def desugar; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#10993 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#10052 + 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` + # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#10990 + # source://prism//lib/prism/node.rb#10029 sig { returns(Symbol) } def name; end + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#10032 + sig { returns(Prism::Location) } + def name_loc; end + + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. + # + # source://prism//lib/prism/node_ext.rb#419 + def operator; end + + # Returns the location of the binary operator used to modify the receiver. + # This method is deprecated in favor of #binary_operator_loc. + # + # source://prism//lib/prism/node_ext.rb#426 + def operator_loc; end + # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a @@ -17844,10 +18474,16 @@ class Prism::InstanceVariableReadNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#11013 + # source://prism//lib/prism/node.rb#10070 sig { override.returns(Symbol) } def type; end + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#10046 + sig { returns(Prism::Node) } + def value; end + class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. @@ -17856,98 +18492,257 @@ class Prism::InstanceVariableReadNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#11023 + # source://prism//lib/prism/node.rb#10080 def type; end end end -# Represents writing to an instance variable in a context that doesn't have an explicit value. +# Represents the use of the `||=` operator for assignment to an instance variable. # -# @foo, @bar = baz -# ^^^^ ^^^^ +# @target ||= value +# ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11039 -class Prism::InstanceVariableTargetNode < ::Prism::Node - # def initialize: (Symbol name, Location location) -> void +# source://prism//lib/prism/node.rb#10100 +class Prism::InstanceVariableOrWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void # - # @return [InstanceVariableTargetNode] a new instance of InstanceVariableTargetNode + # @return [InstanceVariableOrWriteNode] a new instance of InstanceVariableOrWriteNode # - # source://prism//lib/prism/node.rb#11041 - sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } - def initialize(source, name, location); end + # source://prism//lib/prism/node.rb#10102 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(source, name, name_loc, operator_loc, value, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#11121 + # source://prism//lib/prism/node.rb#10204 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11049 + # source://prism//lib/prism/node.rb#10112 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#11054 + # source://prism//lib/prism/node.rb#10117 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11064 + # source://prism//lib/prism/node.rb#10127 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11059 + # source://prism//lib/prism/node.rb#10122 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?location: Location) -> InstanceVariableTargetNode + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> InstanceVariableOrWriteNode # - # source://prism//lib/prism/node.rb#11069 - sig { params(name: Symbol, location: Prism::Location).returns(Prism::InstanceVariableTargetNode) } - def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#10132 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::InstanceVariableOrWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11054 + # source://prism//lib/prism/node.rb#10117 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#11077 + # source://prism//lib/prism/node.rb#10140 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # source://prism//lib/prism/desugar_compiler.rb#187 + def desugar; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#11085 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#10170 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#11082 + # source://prism//lib/prism/node.rb#10145 sig { returns(Symbol) } def name; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # attr_reader name_loc: Location # - # Instead, you can call #type, which will return to you a symbol that you + # source://prism//lib/prism/node.rb#10148 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#10165 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#10155 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10188 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#10162 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10198 + def type; end + end +end + +# Represents referencing an instance variable. +# +# @foo +# ^^^^ +# +# source://prism//lib/prism/node.rb#10217 +class Prism::InstanceVariableReadNode < ::Prism::Node + # def initialize: (Symbol name, Location location) -> void + # + # @return [InstanceVariableReadNode] a new instance of InstanceVariableReadNode + # + # source://prism//lib/prism/node.rb#10219 + sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } + def initialize(source, name, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#10300 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10226 + 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#10231 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10241 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10236 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?location: Location) -> InstanceVariableReadNode + # + # source://prism//lib/prism/node.rb#10246 + sig { params(name: Symbol, location: Prism::Location).returns(Prism::InstanceVariableReadNode) } + def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10231 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } + # + # source://prism//lib/prism/node.rb#10254 + 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#10266 + 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#10263 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you # can use for comparison. This is faster than the other approaches because # it uses a single integer comparison, but also because if you're on CRuby # you can take advantage of the fact that case statements with all symbol @@ -17955,7 +18750,7 @@ class Prism::InstanceVariableTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#11105 + # source://prism//lib/prism/node.rb#10284 sig { override.returns(Symbol) } def type; end @@ -17967,7 +18762,118 @@ class Prism::InstanceVariableTargetNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#11115 + # source://prism//lib/prism/node.rb#10294 + 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#10310 +class Prism::InstanceVariableTargetNode < ::Prism::Node + # def initialize: (Symbol name, Location location) -> void + # + # @return [InstanceVariableTargetNode] a new instance of InstanceVariableTargetNode + # + # source://prism//lib/prism/node.rb#10312 + sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } + def initialize(source, name, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#10389 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10319 + 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#10324 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10334 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10329 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?location: Location) -> InstanceVariableTargetNode + # + # source://prism//lib/prism/node.rb#10339 + sig { params(name: Symbol, location: Prism::Location).returns(Prism::InstanceVariableTargetNode) } + def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10324 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } + # + # source://prism//lib/prism/node.rb#10347 + 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#10355 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#10352 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10373 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10383 def type; end end end @@ -17977,13 +18883,13 @@ end # @foo = 1 # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#11131 +# source://prism//lib/prism/node.rb#10399 class Prism::InstanceVariableWriteNode < ::Prism::Node # def initialize: (Symbol name, Location name_loc, Prism::node value, Location operator_loc, Location location) -> void # # @return [InstanceVariableWriteNode] a new instance of InstanceVariableWriteNode # - # source://prism//lib/prism/node.rb#11133 + # source://prism//lib/prism/node.rb#10401 sig do params( source: Prism::Source, @@ -17999,36 +18905,36 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#11258 + # source://prism//lib/prism/node.rb#10519 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11144 + # source://prism//lib/prism/node.rb#10411 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#11149 + # source://prism//lib/prism/node.rb#10416 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11159 + # source://prism//lib/prism/node.rb#10426 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11154 + # source://prism//lib/prism/node.rb#10421 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location, ?location: Location) -> InstanceVariableWriteNode # - # source://prism//lib/prism/node.rb#11164 + # source://prism//lib/prism/node.rb#10431 sig do params( name: Symbol, @@ -18043,24 +18949,24 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11149 + # source://prism//lib/prism/node.rb#10416 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#11172 + # source://prism//lib/prism/node.rb#10439 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#11218 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#10485 + 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). # @@ -18068,7 +18974,7 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # # @_foo = "bar" # name `@_foo` # - # source://prism//lib/prism/node.rb#11181 + # source://prism//lib/prism/node.rb#10448 sig { returns(Symbol) } def name; end @@ -18077,13 +18983,13 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # @_x = 1 # ^^^ # - # source://prism//lib/prism/node.rb#11187 + # source://prism//lib/prism/node.rb#10454 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#11213 + # source://prism//lib/prism/node.rb#10480 sig { returns(String) } def operator; end @@ -18092,7 +18998,7 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # @x = y # ^ # - # source://prism//lib/prism/node.rb#11206 + # source://prism//lib/prism/node.rb#10473 sig { returns(Prism::Location) } def operator_loc; end @@ -18111,7 +19017,7 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#11242 + # source://prism//lib/prism/node.rb#10503 sig { override.returns(Symbol) } def type; end @@ -18123,7 +19029,7 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # @_x = 1234 # ^^^^ # - # source://prism//lib/prism/node.rb#11200 + # source://prism//lib/prism/node.rb#10467 sig { returns(Prism::Node) } def value; end @@ -18135,34 +19041,34 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#11252 + # source://prism//lib/prism/node.rb#10513 def type; end end end # Flags for integer nodes that correspond to the base of the integer. # -# source://prism//lib/prism/node.rb#20373 +# source://prism//lib/prism/node.rb#19166 module Prism::IntegerBaseFlags; end # 0b prefix # -# source://prism//lib/prism/node.rb#20375 +# source://prism//lib/prism/node.rb#19168 Prism::IntegerBaseFlags::BINARY = T.let(T.unsafe(nil), Integer) # 0d or no prefix # -# source://prism//lib/prism/node.rb#20378 +# source://prism//lib/prism/node.rb#19171 Prism::IntegerBaseFlags::DECIMAL = T.let(T.unsafe(nil), Integer) # 0x prefix # -# source://prism//lib/prism/node.rb#20384 +# source://prism//lib/prism/node.rb#19177 Prism::IntegerBaseFlags::HEXADECIMAL = T.let(T.unsafe(nil), Integer) # 0o or 0 prefix # -# source://prism//lib/prism/node.rb#20381 +# source://prism//lib/prism/node.rb#19174 Prism::IntegerBaseFlags::OCTAL = T.let(T.unsafe(nil), Integer) # Represents an integer number literal. @@ -18170,25 +19076,25 @@ Prism::IntegerBaseFlags::OCTAL = T.let(T.unsafe(nil), Integer) # 1 # ^ # -# source://prism//lib/prism/node.rb#11271 +# source://prism//lib/prism/node.rb#10532 class Prism::IntegerNode < ::Prism::Node # def initialize: (Integer flags, Integer value, Location location) -> void # # @return [IntegerNode] a new instance of IntegerNode # - # source://prism//lib/prism/node.rb#11273 + # source://prism//lib/prism/node.rb#10534 sig { params(source: Prism::Source, flags: Integer, value: Integer, location: Prism::Location).void } def initialize(source, flags, value, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#11380 + # source://prism//lib/prism/node.rb#10636 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11282 + # source://prism//lib/prism/node.rb#10542 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -18196,31 +19102,31 @@ class Prism::IntegerNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11322 + # source://prism//lib/prism/node.rb#10582 sig { returns(T::Boolean) } def binary?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11287 + # source://prism//lib/prism/node.rb#10547 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11297 + # source://prism//lib/prism/node.rb#10557 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11292 + # source://prism//lib/prism/node.rb#10552 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?value: Integer, ?location: Location) -> IntegerNode # - # source://prism//lib/prism/node.rb#11302 + # source://prism//lib/prism/node.rb#10562 sig { params(flags: Integer, value: Integer, location: Prism::Location).returns(Prism::IntegerNode) } def copy(flags: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end @@ -18228,20 +19134,20 @@ class Prism::IntegerNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11327 + # source://prism//lib/prism/node.rb#10587 sig { returns(T::Boolean) } def decimal?; end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11287 + # source://prism//lib/prism/node.rb#10547 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, value: Integer, location: Location } # - # source://prism//lib/prism/node.rb#11310 + # source://prism//lib/prism/node.rb#10570 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -18252,21 +19158,21 @@ class Prism::IntegerNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11337 + # source://prism//lib/prism/node.rb#10597 sig { returns(T::Boolean) } def hexadecimal?; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#11342 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#10602 + sig { override.returns(String) } + def inspect; end # def octal?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11332 + # source://prism//lib/prism/node.rb#10592 sig { returns(T::Boolean) } def octal?; end @@ -18285,13 +19191,13 @@ class Prism::IntegerNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#11364 + # source://prism//lib/prism/node.rb#10620 sig { override.returns(Symbol) } def type; end # The value of the integer literal as a number. # - # source://prism//lib/prism/node.rb#11319 + # source://prism//lib/prism/node.rb#10579 sig { returns(Integer) } def value; end @@ -18299,7 +19205,7 @@ class Prism::IntegerNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#11315 + # source://prism//lib/prism/node.rb#10575 sig { returns(Integer) } def flags; end @@ -18311,7 +19217,7 @@ class Prism::IntegerNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#11374 + # source://prism//lib/prism/node.rb#10630 def type; end end end @@ -18321,7 +19227,7 @@ end # if /foo #{bar} baz/ then end # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11391 +# source://prism//lib/prism/node.rb#10647 class Prism::InterpolatedMatchLastLineNode < ::Prism::Node include ::Prism::RegularExpressionOptions @@ -18329,7 +19235,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [InterpolatedMatchLastLineNode] a new instance of InterpolatedMatchLastLineNode # - # source://prism//lib/prism/node.rb#11393 + # source://prism//lib/prism/node.rb#10649 sig do params( source: Prism::Source, @@ -18345,12 +19251,12 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#11568 + # source://prism//lib/prism/node.rb#10812 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11404 + # source://prism//lib/prism/node.rb#10659 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -18358,43 +19264,43 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11488 + # source://prism//lib/prism/node.rb#10738 sig { returns(T::Boolean) } def ascii_8bit?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11414 + # source://prism//lib/prism/node.rb#10664 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#11523 + # source://prism//lib/prism/node.rb#10773 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#11456 + # source://prism//lib/prism/node.rb#10706 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11424 + # source://prism//lib/prism/node.rb#10674 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11419 + # source://prism//lib/prism/node.rb#10669 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location, ?location: Location) -> InterpolatedMatchLastLineNode # - # source://prism//lib/prism/node.rb#11429 + # source://prism//lib/prism/node.rb#10679 sig do params( flags: Integer, @@ -18409,13 +19315,13 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11414 + # source://prism//lib/prism/node.rb#10664 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#11437 + # source://prism//lib/prism/node.rb#10687 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -18423,7 +19329,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11483 + # source://prism//lib/prism/node.rb#10733 sig { returns(T::Boolean) } def euc_jp?; end @@ -18431,7 +19337,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11468 + # source://prism//lib/prism/node.rb#10718 sig { returns(T::Boolean) } def extended?; end @@ -18442,7 +19348,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11508 + # source://prism//lib/prism/node.rb#10758 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -18450,7 +19356,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11513 + # source://prism//lib/prism/node.rb#10763 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end @@ -18458,7 +19364,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11503 + # source://prism//lib/prism/node.rb#10753 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -18466,41 +19372,44 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11463 + # source://prism//lib/prism/node.rb#10713 sig { returns(T::Boolean) } def ignore_case?; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#11528 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#10778 + sig { override.returns(String) } + def inspect; end # def multi_line?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11473 + # source://prism//lib/prism/node.rb#10723 sig { returns(T::Boolean) } def multi_line?; end + # source://prism//lib/prism/parse_result/newlines.rb#121 + def newline!(lines); end + # def once?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11478 + # source://prism//lib/prism/node.rb#10728 sig { returns(T::Boolean) } def once?; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#11518 + # source://prism//lib/prism/node.rb#10768 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#11446 + # source://prism//lib/prism/node.rb#10696 sig { returns(Prism::Location) } def opening_loc; end @@ -18509,13 +19418,10 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] # - # source://prism//lib/prism/node.rb#11453 + # source://prism//lib/prism/node.rb#10703 sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } def parts; end - # source://prism//lib/prism/node.rb#11408 - def set_newline_flag(newline_marked); end - # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a @@ -18531,7 +19437,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#11552 + # source://prism//lib/prism/node.rb#10796 sig { override.returns(Symbol) } def type; end @@ -18539,7 +19445,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11498 + # source://prism//lib/prism/node.rb#10748 sig { returns(T::Boolean) } def utf_8?; end @@ -18547,7 +19453,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11493 + # source://prism//lib/prism/node.rb#10743 sig { returns(T::Boolean) } def windows_31j?; end @@ -18555,7 +19461,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#11442 + # source://prism//lib/prism/node.rb#10692 sig { returns(Integer) } def flags; end @@ -18567,7 +19473,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#11562 + # source://prism//lib/prism/node.rb#10806 def type; end end end @@ -18577,7 +19483,7 @@ end # /foo #{bar} baz/ # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11582 +# source://prism//lib/prism/node.rb#10826 class Prism::InterpolatedRegularExpressionNode < ::Prism::Node include ::Prism::RegularExpressionOptions @@ -18585,7 +19491,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [InterpolatedRegularExpressionNode] a new instance of InterpolatedRegularExpressionNode # - # source://prism//lib/prism/node.rb#11584 + # source://prism//lib/prism/node.rb#10828 sig do params( source: Prism::Source, @@ -18601,12 +19507,12 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#11759 + # source://prism//lib/prism/node.rb#10991 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11595 + # source://prism//lib/prism/node.rb#10838 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -18614,43 +19520,43 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11679 + # source://prism//lib/prism/node.rb#10917 sig { returns(T::Boolean) } def ascii_8bit?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11605 + # source://prism//lib/prism/node.rb#10843 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#11714 + # source://prism//lib/prism/node.rb#10952 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#11647 + # source://prism//lib/prism/node.rb#10885 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11615 + # source://prism//lib/prism/node.rb#10853 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11610 + # source://prism//lib/prism/node.rb#10848 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location, ?location: Location) -> InterpolatedRegularExpressionNode # - # source://prism//lib/prism/node.rb#11620 + # source://prism//lib/prism/node.rb#10858 sig do params( flags: Integer, @@ -18665,13 +19571,13 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11605 + # source://prism//lib/prism/node.rb#10843 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#11628 + # source://prism//lib/prism/node.rb#10866 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -18679,7 +19585,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11674 + # source://prism//lib/prism/node.rb#10912 sig { returns(T::Boolean) } def euc_jp?; end @@ -18687,7 +19593,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11659 + # source://prism//lib/prism/node.rb#10897 sig { returns(T::Boolean) } def extended?; end @@ -18698,7 +19604,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11699 + # source://prism//lib/prism/node.rb#10937 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -18706,7 +19612,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11704 + # source://prism//lib/prism/node.rb#10942 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end @@ -18714,7 +19620,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11694 + # source://prism//lib/prism/node.rb#10932 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -18722,41 +19628,44 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11654 + # source://prism//lib/prism/node.rb#10892 sig { returns(T::Boolean) } def ignore_case?; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#11719 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#10957 + sig { override.returns(String) } + def inspect; end # def multi_line?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11664 + # source://prism//lib/prism/node.rb#10902 sig { returns(T::Boolean) } def multi_line?; end + # source://prism//lib/prism/parse_result/newlines.rb#128 + def newline!(lines); end + # def once?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11669 + # source://prism//lib/prism/node.rb#10907 sig { returns(T::Boolean) } def once?; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#11709 + # source://prism//lib/prism/node.rb#10947 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#11637 + # source://prism//lib/prism/node.rb#10875 sig { returns(Prism::Location) } def opening_loc; end @@ -18765,13 +19674,10 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] # - # source://prism//lib/prism/node.rb#11644 + # source://prism//lib/prism/node.rb#10882 sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } def parts; end - # source://prism//lib/prism/node.rb#11599 - def set_newline_flag(newline_marked); end - # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a @@ -18787,7 +19693,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#11743 + # source://prism//lib/prism/node.rb#10975 sig { override.returns(Symbol) } def type; end @@ -18795,7 +19701,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11689 + # source://prism//lib/prism/node.rb#10927 sig { returns(T::Boolean) } def utf_8?; end @@ -18803,7 +19709,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11684 + # source://prism//lib/prism/node.rb#10922 sig { returns(T::Boolean) } def windows_31j?; end @@ -18811,7 +19717,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#11633 + # source://prism//lib/prism/node.rb#10871 sig { returns(Integer) } def flags; end @@ -18823,7 +19729,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#11753 + # source://prism//lib/prism/node.rb#10985 def type; end end end @@ -18833,7 +19739,7 @@ end # "foo #{bar} baz" # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11773 +# source://prism//lib/prism/node.rb#11005 class Prism::InterpolatedStringNode < ::Prism::Node include ::Prism::HeredocQuery @@ -18841,7 +19747,7 @@ class Prism::InterpolatedStringNode < ::Prism::Node # # @return [InterpolatedStringNode] a new instance of InterpolatedStringNode # - # source://prism//lib/prism/node.rb#11775 + # source://prism//lib/prism/node.rb#11007 sig do params( source: Prism::Source, @@ -18857,48 +19763,48 @@ class Prism::InterpolatedStringNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#11917 + # source://prism//lib/prism/node.rb#11137 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11786 + # source://prism//lib/prism/node.rb#11017 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#11796 + # source://prism//lib/prism/node.rb#11022 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#11872 + # source://prism//lib/prism/node.rb#11098 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#11844 + # source://prism//lib/prism/node.rb#11070 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11806 + # source://prism//lib/prism/node.rb#11032 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11801 + # source://prism//lib/prism/node.rb#11027 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?opening_loc: Location?, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode], ?closing_loc: Location?, ?location: Location) -> InterpolatedStringNode # - # source://prism//lib/prism/node.rb#11811 + # source://prism//lib/prism/node.rb#11037 sig do params( flags: Integer, @@ -18913,13 +19819,13 @@ class Prism::InterpolatedStringNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11796 + # source://prism//lib/prism/node.rb#11022 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location?, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode], closing_loc: Location?, location: Location } # - # source://prism//lib/prism/node.rb#11819 + # source://prism//lib/prism/node.rb#11045 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -18930,50 +19836,50 @@ class Prism::InterpolatedStringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11857 + # source://prism//lib/prism/node.rb#11083 sig { returns(T::Boolean) } def frozen?; end sig { returns(T::Boolean) } def heredoc?; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#11877 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#11103 + sig { override.returns(String) } + def inspect; end # def mutable?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11862 + # source://prism//lib/prism/node.rb#11088 sig { returns(T::Boolean) } def mutable?; end + # source://prism//lib/prism/parse_result/newlines.rb#135 + def newline!(lines); end + # def opening: () -> String? # - # source://prism//lib/prism/node.rb#11867 + # source://prism//lib/prism/node.rb#11093 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#11828 + # source://prism//lib/prism/node.rb#11054 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode] # - # source://prism//lib/prism/node.rb#11841 + # source://prism//lib/prism/node.rb#11067 sig do returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode, Prism::InterpolatedStringNode)]) end def parts; end - # source://prism//lib/prism/node.rb#11790 - def set_newline_flag(newline_marked); end - # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a @@ -18989,7 +19895,7 @@ class Prism::InterpolatedStringNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#11901 + # source://prism//lib/prism/node.rb#11121 sig { override.returns(Symbol) } def type; end @@ -18997,7 +19903,7 @@ class Prism::InterpolatedStringNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#11824 + # source://prism//lib/prism/node.rb#11050 sig { returns(Integer) } def flags; end @@ -19009,20 +19915,20 @@ class Prism::InterpolatedStringNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#11911 + # source://prism//lib/prism/node.rb#11131 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#20388 +# source://prism//lib/prism/node.rb#19181 module Prism::InterpolatedStringNodeFlags; end -# source://prism//lib/prism/node.rb#20390 +# source://prism//lib/prism/node.rb#19183 Prism::InterpolatedStringNodeFlags::FROZEN = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/node.rb#20393 +# source://prism//lib/prism/node.rb#19186 Prism::InterpolatedStringNodeFlags::MUTABLE = T.let(T.unsafe(nil), Integer) # Represents a symbol literal that contains interpolation. @@ -19030,13 +19936,13 @@ Prism::InterpolatedStringNodeFlags::MUTABLE = T.let(T.unsafe(nil), Integer) # :"foo #{bar} baz" # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11931 +# source://prism//lib/prism/node.rb#11151 class Prism::InterpolatedSymbolNode < ::Prism::Node # def initialize: (Location? opening_loc, Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] parts, Location? closing_loc, Location location) -> void # # @return [InterpolatedSymbolNode] a new instance of InterpolatedSymbolNode # - # source://prism//lib/prism/node.rb#11933 + # source://prism//lib/prism/node.rb#11153 sig do params( source: Prism::Source, @@ -19051,48 +19957,48 @@ class Prism::InterpolatedSymbolNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#12058 + # source://prism//lib/prism/node.rb#11268 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11943 + # source://prism//lib/prism/node.rb#11162 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#11953 + # source://prism//lib/prism/node.rb#11167 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#12015 + # source://prism//lib/prism/node.rb#11229 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#11997 + # source://prism//lib/prism/node.rb#11211 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11963 + # source://prism//lib/prism/node.rb#11177 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11958 + # source://prism//lib/prism/node.rb#11172 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?opening_loc: Location?, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location?, ?location: Location) -> InterpolatedSymbolNode # - # source://prism//lib/prism/node.rb#11968 + # source://prism//lib/prism/node.rb#11182 sig do params( opening_loc: T.nilable(Prism::Location), @@ -19106,46 +20012,46 @@ class Prism::InterpolatedSymbolNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11953 + # source://prism//lib/prism/node.rb#11167 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location?, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location?, location: Location } # - # source://prism//lib/prism/node.rb#11976 + # source://prism//lib/prism/node.rb#11190 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#12020 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#11234 + sig { override.returns(String) } + def inspect; end + + # source://prism//lib/prism/parse_result/newlines.rb#142 + def newline!(lines); end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#12010 + # source://prism//lib/prism/node.rb#11224 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#11981 + # source://prism//lib/prism/node.rb#11195 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] # - # source://prism//lib/prism/node.rb#11994 + # source://prism//lib/prism/node.rb#11208 sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } def parts; end - # source://prism//lib/prism/node.rb#11947 - def set_newline_flag(newline_marked); end - # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a @@ -19161,7 +20067,7 @@ class Prism::InterpolatedSymbolNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#12042 + # source://prism//lib/prism/node.rb#11252 sig { override.returns(Symbol) } def type; end @@ -19173,7 +20079,7 @@ class Prism::InterpolatedSymbolNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#12052 + # source://prism//lib/prism/node.rb#11262 def type; end end end @@ -19183,7 +20089,7 @@ end # `foo #{bar} baz` # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#12071 +# source://prism//lib/prism/node.rb#11281 class Prism::InterpolatedXStringNode < ::Prism::Node include ::Prism::HeredocQuery @@ -19191,7 +20097,7 @@ class Prism::InterpolatedXStringNode < ::Prism::Node # # @return [InterpolatedXStringNode] a new instance of InterpolatedXStringNode # - # source://prism//lib/prism/node.rb#12073 + # source://prism//lib/prism/node.rb#11283 sig do params( source: Prism::Source, @@ -19206,48 +20112,48 @@ class Prism::InterpolatedXStringNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#12186 + # source://prism//lib/prism/node.rb#11386 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12083 + # source://prism//lib/prism/node.rb#11292 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#12093 + # source://prism//lib/prism/node.rb#11297 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#12143 + # source://prism//lib/prism/node.rb#11347 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#12131 + # source://prism//lib/prism/node.rb#11335 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12103 + # source://prism//lib/prism/node.rb#11307 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12098 + # source://prism//lib/prism/node.rb#11302 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location, ?location: Location) -> InterpolatedXStringNode # - # source://prism//lib/prism/node.rb#12108 + # source://prism//lib/prism/node.rb#11312 sig do params( opening_loc: Prism::Location, @@ -19261,13 +20167,13 @@ class Prism::InterpolatedXStringNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12093 + # source://prism//lib/prism/node.rb#11297 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#12116 + # source://prism//lib/prism/node.rb#11320 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -19277,32 +20183,137 @@ class Prism::InterpolatedXStringNode < ::Prism::Node sig { returns(T::Boolean) } def heredoc?; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#12148 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#11352 + sig { override.returns(String) } + def inspect; end + + # source://prism//lib/prism/parse_result/newlines.rb#149 + def newline!(lines); end # def opening: () -> String # - # source://prism//lib/prism/node.rb#12138 + # source://prism//lib/prism/node.rb#11342 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#12121 + # source://prism//lib/prism/node.rb#11325 sig { returns(Prism::Location) } def opening_loc; end # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] # - # source://prism//lib/prism/node.rb#12128 + # source://prism//lib/prism/node.rb#11332 sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } def parts; end - # source://prism//lib/prism/node.rb#12087 - def set_newline_flag(newline_marked); end + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11370 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11380 + def type; end + end +end + +# Represents reading from the implicit `it` local variable. +# +# -> { it } +# ^^ +# +# source://prism//lib/prism/node.rb#11399 +class Prism::ItLocalVariableReadNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [ItLocalVariableReadNode] a new instance of ItLocalVariableReadNode + # + # source://prism//lib/prism/node.rb#11401 + sig { params(source: Prism::Source, location: Prism::Location).void } + def initialize(source, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#11474 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11407 + 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#11412 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11422 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11417 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?location: Location) -> ItLocalVariableReadNode + # + # source://prism//lib/prism/node.rb#11427 + sig { params(location: Prism::Location).returns(Prism::ItLocalVariableReadNode) } + def copy(location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11412 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # + # source://prism//lib/prism/node.rb#11435 + 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#11440 + sig { override.returns(String) } + def inspect; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by @@ -19319,7 +20330,7 @@ class Prism::InterpolatedXStringNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#12170 + # source://prism//lib/prism/node.rb#11458 sig { override.returns(Symbol) } def type; end @@ -19331,7 +20342,7 @@ class Prism::InterpolatedXStringNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#12180 + # source://prism//lib/prism/node.rb#11468 def type; end end end @@ -19341,73 +20352,73 @@ end # -> { it + it } # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#12199 +# source://prism//lib/prism/node.rb#11483 class Prism::ItParametersNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [ItParametersNode] a new instance of ItParametersNode # - # source://prism//lib/prism/node.rb#12201 + # source://prism//lib/prism/node.rb#11485 sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#12276 + # source://prism//lib/prism/node.rb#11558 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12208 + # source://prism//lib/prism/node.rb#11491 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#12213 + # source://prism//lib/prism/node.rb#11496 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12223 + # source://prism//lib/prism/node.rb#11506 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12218 + # source://prism//lib/prism/node.rb#11501 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?location: Location) -> ItParametersNode # - # source://prism//lib/prism/node.rb#12228 + # source://prism//lib/prism/node.rb#11511 sig { params(location: Prism::Location).returns(Prism::ItParametersNode) } def copy(location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12213 + # source://prism//lib/prism/node.rb#11496 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } # - # source://prism//lib/prism/node.rb#12236 + # source://prism//lib/prism/node.rb#11519 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#12241 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#11524 + sig { override.returns(String) } + def inspect; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by @@ -19424,7 +20435,7 @@ class Prism::ItParametersNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#12260 + # source://prism//lib/prism/node.rb#11542 sig { override.returns(Symbol) } def type; end @@ -19436,7 +20447,7 @@ class Prism::ItParametersNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#12270 + # source://prism//lib/prism/node.rb#11552 def type; end end end @@ -19446,13 +20457,13 @@ end # foo(a: b) # ^^^^ # -# source://prism//lib/prism/node.rb#12285 +# source://prism//lib/prism/node.rb#11567 class Prism::KeywordHashNode < ::Prism::Node # def initialize: (Integer flags, Array[AssocNode | AssocSplatNode] elements, Location location) -> void # # @return [KeywordHashNode] a new instance of KeywordHashNode # - # source://prism//lib/prism/node.rb#12287 + # source://prism//lib/prism/node.rb#11569 sig do params( source: Prism::Source, @@ -19466,36 +20477,36 @@ class Prism::KeywordHashNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#12379 + # source://prism//lib/prism/node.rb#11656 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12296 + # source://prism//lib/prism/node.rb#11577 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#12301 + # source://prism//lib/prism/node.rb#11582 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12311 + # source://prism//lib/prism/node.rb#11592 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12306 + # source://prism//lib/prism/node.rb#11587 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?elements: Array[AssocNode | AssocSplatNode], ?location: Location) -> KeywordHashNode # - # source://prism//lib/prism/node.rb#12316 + # source://prism//lib/prism/node.rb#11597 sig do params( flags: Integer, @@ -19508,36 +20519,36 @@ class Prism::KeywordHashNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12301 + # source://prism//lib/prism/node.rb#11582 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, elements: Array[AssocNode | AssocSplatNode], location: Location } # - # source://prism//lib/prism/node.rb#12324 + # source://prism//lib/prism/node.rb#11605 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#12333 + # source://prism//lib/prism/node.rb#11614 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#12341 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#11622 + sig { override.returns(String) } + def inspect; end # def symbol_keys?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12336 + # source://prism//lib/prism/node.rb#11617 sig { returns(T::Boolean) } def symbol_keys?; end @@ -19556,7 +20567,7 @@ class Prism::KeywordHashNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#12363 + # source://prism//lib/prism/node.rb#11640 sig { override.returns(Symbol) } def type; end @@ -19564,7 +20575,7 @@ class Prism::KeywordHashNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#12329 + # source://prism//lib/prism/node.rb#11610 sig { returns(Integer) } def flags; end @@ -19576,19 +20587,19 @@ class Prism::KeywordHashNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#12373 + # source://prism//lib/prism/node.rb#11650 def type; end end end # Flags for keyword hash nodes. # -# source://prism//lib/prism/node.rb#20397 +# source://prism//lib/prism/node.rb#19190 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#20399 +# source://prism//lib/prism/node.rb#19192 Prism::KeywordHashNodeFlags::SYMBOL_KEYS = T.let(T.unsafe(nil), Integer) # Represents a keyword rest parameter to a method, block, or lambda definition. @@ -19597,13 +20608,13 @@ Prism::KeywordHashNodeFlags::SYMBOL_KEYS = T.let(T.unsafe(nil), Integer) # ^^^ # end # -# source://prism//lib/prism/node.rb#12392 +# source://prism//lib/prism/node.rb#11669 class Prism::KeywordRestParameterNode < ::Prism::Node # def initialize: (Integer flags, Symbol? name, Location? name_loc, Location operator_loc, Location location) -> void # # @return [KeywordRestParameterNode] a new instance of KeywordRestParameterNode # - # source://prism//lib/prism/node.rb#12394 + # source://prism//lib/prism/node.rb#11671 sig do params( source: Prism::Source, @@ -19619,36 +20630,36 @@ class Prism::KeywordRestParameterNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#12519 + # source://prism//lib/prism/node.rb#11785 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12405 + # source://prism//lib/prism/node.rb#11681 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#12410 + # source://prism//lib/prism/node.rb#11686 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12420 + # source://prism//lib/prism/node.rb#11696 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12415 + # source://prism//lib/prism/node.rb#11691 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location, ?location: Location) -> KeywordRestParameterNode # - # source://prism//lib/prism/node.rb#12425 + # source://prism//lib/prism/node.rb#11701 sig do params( flags: Integer, @@ -19663,46 +20674,46 @@ class Prism::KeywordRestParameterNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12410 + # source://prism//lib/prism/node.rb#11686 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#12433 + # source://prism//lib/prism/node.rb#11709 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#12475 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#11751 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol? # - # source://prism//lib/prism/node.rb#12442 + # source://prism//lib/prism/node.rb#11718 sig { returns(T.nilable(Symbol)) } def name; end # attr_reader name_loc: Location? # - # source://prism//lib/prism/node.rb#12445 + # source://prism//lib/prism/node.rb#11721 sig { returns(T.nilable(Prism::Location)) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#12470 + # source://prism//lib/prism/node.rb#11746 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#12458 + # source://prism//lib/prism/node.rb#11734 sig { returns(Prism::Location) } def operator_loc; end @@ -19710,7 +20721,7 @@ class Prism::KeywordRestParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12465 + # source://prism//lib/prism/node.rb#11741 sig { returns(T::Boolean) } def repeated_parameter?; end @@ -19729,7 +20740,7 @@ class Prism::KeywordRestParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#12503 + # source://prism//lib/prism/node.rb#11769 sig { override.returns(Symbol) } def type; end @@ -19737,7 +20748,7 @@ class Prism::KeywordRestParameterNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#12438 + # source://prism//lib/prism/node.rb#11714 sig { returns(Integer) } def flags; end @@ -19749,7 +20760,7 @@ class Prism::KeywordRestParameterNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#12513 + # source://prism//lib/prism/node.rb#11779 def type; end end end @@ -19759,13 +20770,13 @@ end # ->(value) { value * 2 } # ^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#12532 +# source://prism//lib/prism/node.rb#11798 class Prism::LambdaNode < ::Prism::Node # def initialize: (Array[Symbol] locals, Location operator_loc, Location opening_loc, Location closing_loc, Prism::node? parameters, Prism::node? body, Location location) -> void # # @return [LambdaNode] a new instance of LambdaNode # - # source://prism//lib/prism/node.rb#12534 + # source://prism//lib/prism/node.rb#11800 sig do params( source: Prism::Source, @@ -19783,54 +20794,54 @@ class Prism::LambdaNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#12679 + # source://prism//lib/prism/node.rb#11927 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12547 + # source://prism//lib/prism/node.rb#11812 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: Prism::node? # - # source://prism//lib/prism/node.rb#12610 + # source://prism//lib/prism/node.rb#11875 sig { returns(T.nilable(Prism::Node)) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12552 + # source://prism//lib/prism/node.rb#11817 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#12623 + # source://prism//lib/prism/node.rb#11888 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#12600 + # source://prism//lib/prism/node.rb#11865 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12565 + # source://prism//lib/prism/node.rb#11830 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12557 + # source://prism//lib/prism/node.rb#11822 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?locals: Array[Symbol], ?operator_loc: Location, ?opening_loc: Location, ?closing_loc: Location, ?parameters: Prism::node?, ?body: Prism::node?, ?location: Location) -> LambdaNode # - # source://prism//lib/prism/node.rb#12570 + # source://prism//lib/prism/node.rb#11835 sig do params( locals: T::Array[Symbol], @@ -19847,58 +20858,58 @@ class Prism::LambdaNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12552 + # source://prism//lib/prism/node.rb#11817 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], operator_loc: Location, opening_loc: Location, closing_loc: Location, parameters: Prism::node?, body: Prism::node?, location: Location } # - # source://prism//lib/prism/node.rb#12578 + # source://prism//lib/prism/node.rb#11843 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#12628 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#11893 + sig { override.returns(String) } + def inspect; end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#12583 + # source://prism//lib/prism/node.rb#11848 sig { returns(T::Array[Symbol]) } def locals; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#12618 + # source://prism//lib/prism/node.rb#11883 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#12593 + # source://prism//lib/prism/node.rb#11858 sig { returns(Prism::Location) } def opening_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#12613 + # source://prism//lib/prism/node.rb#11878 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#12586 + # source://prism//lib/prism/node.rb#11851 sig { returns(Prism::Location) } def operator_loc; end # attr_reader parameters: Prism::node? # - # source://prism//lib/prism/node.rb#12607 + # source://prism//lib/prism/node.rb#11872 sig { returns(T.nilable(Prism::Node)) } def parameters; end @@ -19917,7 +20928,7 @@ class Prism::LambdaNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#12663 + # source://prism//lib/prism/node.rb#11911 sig { override.returns(Symbol) } def type; end @@ -19929,7 +20940,7 @@ class Prism::LambdaNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#12673 + # source://prism//lib/prism/node.rb#11921 def type; end end end @@ -20185,13 +21196,13 @@ end # This is a result specific to the `lex` and `lex_file` methods. # -# source://prism//lib/prism/parse_result.rb#515 +# source://prism//lib/prism/parse_result.rb#610 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#520 + # source://prism//lib/prism/parse_result.rb#615 sig do params( value: T::Array[T.untyped], @@ -20207,13 +21218,13 @@ class Prism::LexResult < ::Prism::Result # Implement the hash pattern matching interface for LexResult. # - # source://prism//lib/prism/parse_result.rb#526 + # source://prism//lib/prism/parse_result.rb#621 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#517 + # source://prism//lib/prism/parse_result.rb#612 sig { returns(T::Array[T.untyped]) } def value; end end @@ -20245,13 +21256,13 @@ end # target &&= value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#12695 +# source://prism//lib/prism/node.rb#11943 class Prism::LocalVariableAndWriteNode < ::Prism::Node # def initialize: (Location name_loc, Location operator_loc, Prism::node value, Symbol name, Integer depth, Location location) -> void # # @return [LocalVariableAndWriteNode] a new instance of LocalVariableAndWriteNode # - # source://prism//lib/prism/node.rb#12697 + # source://prism//lib/prism/node.rb#11945 sig do params( source: Prism::Source, @@ -20268,36 +21279,36 @@ class Prism::LocalVariableAndWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#12811 + # source://prism//lib/prism/node.rb#12051 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12709 + # source://prism//lib/prism/node.rb#11956 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#12714 + # source://prism//lib/prism/node.rb#11961 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12724 + # source://prism//lib/prism/node.rb#11971 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12719 + # source://prism//lib/prism/node.rb#11966 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?depth: Integer, ?location: Location) -> LocalVariableAndWriteNode # - # source://prism//lib/prism/node.rb#12729 + # source://prism//lib/prism/node.rb#11976 sig do params( name_loc: Prism::Location, @@ -20313,19 +21324,19 @@ class Prism::LocalVariableAndWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12714 + # source://prism//lib/prism/node.rb#11961 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name_loc: Location, operator_loc: Location, value: Prism::node, name: Symbol, depth: Integer, location: Location } # - # source://prism//lib/prism/node.rb#12737 + # source://prism//lib/prism/node.rb#11984 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#12762 + # source://prism//lib/prism/node.rb#12009 sig { returns(Integer) } def depth; end @@ -20335,33 +21346,33 @@ class Prism::LocalVariableAndWriteNode < ::Prism::Node sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#12770 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#12017 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#12759 + # source://prism//lib/prism/node.rb#12006 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#12742 + # source://prism//lib/prism/node.rb#11989 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#12765 + # source://prism//lib/prism/node.rb#12012 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#12749 + # source://prism//lib/prism/node.rb#11996 sig { returns(Prism::Location) } def operator_loc; end @@ -20380,13 +21391,13 @@ class Prism::LocalVariableAndWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#12795 + # source://prism//lib/prism/node.rb#12035 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#12756 + # source://prism//lib/prism/node.rb#12003 sig { returns(Prism::Node) } def value; end @@ -20398,7 +21409,7 @@ class Prism::LocalVariableAndWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#12805 + # source://prism//lib/prism/node.rb#12045 def type; end end end @@ -20408,13 +21419,190 @@ end # target += value # ^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#12825 +# source://prism//lib/prism/node.rb#12065 class Prism::LocalVariableOperatorWriteNode < ::Prism::Node - # def initialize: (Location name_loc, Location operator_loc, Prism::node value, Symbol name, Symbol operator, Integer depth, Location location) -> void + # def initialize: (Location name_loc, Location binary_operator_loc, Prism::node value, Symbol name, Symbol binary_operator, Integer depth, Location location) -> void # # @return [LocalVariableOperatorWriteNode] a new instance of LocalVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#12827 + # source://prism//lib/prism/node.rb#12067 + sig do + params( + source: Prism::Source, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + binary_operator: Symbol, + depth: Integer, + location: Prism::Location + ).void + end + def initialize(source, name_loc, binary_operator_loc, value, name, binary_operator, depth, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#12172 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12079 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#12132 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#12119 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12084 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12094 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12089 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?binary_operator: Symbol, ?depth: Integer, ?location: Location) -> LocalVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#12099 + sig do + params( + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + binary_operator: Symbol, + depth: Integer, + location: Prism::Location + ).returns(Prism::LocalVariableOperatorWriteNode) + end + def copy(name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), binary_operator: T.unsafe(nil), depth: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12084 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name_loc: Location, binary_operator_loc: Location, value: Prism::node, name: Symbol, binary_operator: Symbol, depth: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#12107 + 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#12135 + sig { returns(Integer) } + def depth; end + + # source://prism//lib/prism/desugar_compiler.rb#211 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#12138 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#12129 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#12112 + 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 + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12156 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#12126 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12166 + 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#12187 +class Prism::LocalVariableOrWriteNode < ::Prism::Node + # def initialize: (Location name_loc, Location operator_loc, Prism::node value, Symbol name, Integer depth, Location location) -> void + # + # @return [LocalVariableOrWriteNode] a new instance of LocalVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#12189 sig do params( source: Prism::Source, @@ -20422,210 +21610,45 @@ class Prism::LocalVariableOperatorWriteNode < ::Prism::Node operator_loc: Prism::Location, value: Prism::Node, name: Symbol, - operator: Symbol, depth: Integer, location: Prism::Location ).void end - def initialize(source, name_loc, operator_loc, value, name, operator, depth, location); end + def initialize(source, name_loc, operator_loc, value, name, depth, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#12941 + # source://prism//lib/prism/node.rb#12295 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12840 + # source://prism//lib/prism/node.rb#12200 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#12845 + # source://prism//lib/prism/node.rb#12205 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12855 + # source://prism//lib/prism/node.rb#12215 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12850 - sig { override.returns(T::Array[Prism::Node]) } - def compact_child_nodes; end - - # def copy: (?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?operator: Symbol, ?depth: Integer, ?location: Location) -> LocalVariableOperatorWriteNode - # - # source://prism//lib/prism/node.rb#12860 - sig do - params( - name_loc: Prism::Location, - operator_loc: Prism::Location, - value: Prism::Node, - name: Symbol, - operator: Symbol, - depth: Integer, - location: Prism::Location - ).returns(Prism::LocalVariableOperatorWriteNode) - end - def copy(name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), operator: T.unsafe(nil), depth: T.unsafe(nil), location: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12845 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { name_loc: Location, operator_loc: Location, value: Prism::node, name: Symbol, operator: Symbol, depth: Integer, location: Location } - # - # source://prism//lib/prism/node.rb#12868 - 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#12896 - sig { returns(Integer) } - def depth; end - - # source://prism//lib/prism/desugar_compiler.rb#211 - def desugar; end - - sig { override.returns(T::Array[Prism::Reflection::Field]) } - def fields; end - - # def inspect(NodeInspector inspector) -> String - # - # source://prism//lib/prism/node.rb#12899 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#12890 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#12873 - sig { returns(Prism::Location) } - def name_loc; end - - # attr_reader operator: Symbol - # - # source://prism//lib/prism/node.rb#12893 - sig { returns(Symbol) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#12880 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12925 - sig { override.returns(Symbol) } - def type; end - - # attr_reader value: Prism::node - # - # source://prism//lib/prism/node.rb#12887 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12935 - 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#12956 -class Prism::LocalVariableOrWriteNode < ::Prism::Node - # def initialize: (Location name_loc, Location operator_loc, Prism::node value, Symbol name, Integer depth, Location location) -> void - # - # @return [LocalVariableOrWriteNode] a new instance of LocalVariableOrWriteNode - # - # source://prism//lib/prism/node.rb#12958 - sig do - params( - source: Prism::Source, - name_loc: Prism::Location, - operator_loc: Prism::Location, - value: Prism::Node, - name: Symbol, - depth: Integer, - location: Prism::Location - ).void - end - def initialize(source, name_loc, operator_loc, value, name, depth, location); end - - # Implements case-equality for the node. This is effectively == but without - # comparing the value of locations. Locations are checked only for presence. - # - # source://prism//lib/prism/node.rb#13072 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#12970 - 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#12975 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#12985 - sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#12980 + # source://prism//lib/prism/node.rb#12210 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?depth: Integer, ?location: Location) -> LocalVariableOrWriteNode # - # source://prism//lib/prism/node.rb#12990 + # source://prism//lib/prism/node.rb#12220 sig do params( name_loc: Prism::Location, @@ -20641,19 +21664,19 @@ class Prism::LocalVariableOrWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12975 + # source://prism//lib/prism/node.rb#12205 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name_loc: Location, operator_loc: Location, value: Prism::node, name: Symbol, depth: Integer, location: Location } # - # source://prism//lib/prism/node.rb#12998 + # source://prism//lib/prism/node.rb#12228 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#13023 + # source://prism//lib/prism/node.rb#12253 sig { returns(Integer) } def depth; end @@ -20663,33 +21686,33 @@ class Prism::LocalVariableOrWriteNode < ::Prism::Node sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#13031 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#12261 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#13020 + # source://prism//lib/prism/node.rb#12250 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#13003 + # source://prism//lib/prism/node.rb#12233 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#13026 + # source://prism//lib/prism/node.rb#12256 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#13010 + # source://prism//lib/prism/node.rb#12240 sig { returns(Prism::Location) } def operator_loc; end @@ -20708,13 +21731,13 @@ class Prism::LocalVariableOrWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#13056 + # source://prism//lib/prism/node.rb#12279 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#13017 + # source://prism//lib/prism/node.rb#12247 sig { returns(Prism::Node) } def value; end @@ -20726,7 +21749,7 @@ class Prism::LocalVariableOrWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#13066 + # source://prism//lib/prism/node.rb#12289 def type; end end end @@ -20736,62 +21759,62 @@ end # foo # ^^^ # -# source://prism//lib/prism/node.rb#13086 +# source://prism//lib/prism/node.rb#12309 class Prism::LocalVariableReadNode < ::Prism::Node # def initialize: (Symbol name, Integer depth, Location location) -> void # # @return [LocalVariableReadNode] a new instance of LocalVariableReadNode # - # source://prism//lib/prism/node.rb#13088 + # source://prism//lib/prism/node.rb#12311 sig { params(source: Prism::Source, name: Symbol, depth: Integer, location: Prism::Location).void } def initialize(source, name, depth, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#13191 + # source://prism//lib/prism/node.rb#12406 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13097 + # source://prism//lib/prism/node.rb#12319 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#13102 + # source://prism//lib/prism/node.rb#12324 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13112 + # source://prism//lib/prism/node.rb#12334 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13107 + # source://prism//lib/prism/node.rb#12329 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?depth: Integer, ?location: Location) -> LocalVariableReadNode # - # source://prism//lib/prism/node.rb#13117 + # source://prism//lib/prism/node.rb#12339 sig { params(name: Symbol, depth: Integer, location: Prism::Location).returns(Prism::LocalVariableReadNode) } def copy(name: T.unsafe(nil), depth: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13102 + # source://prism//lib/prism/node.rb#12324 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, depth: Integer, location: Location } # - # source://prism//lib/prism/node.rb#13125 + # source://prism//lib/prism/node.rb#12347 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -20803,18 +21826,18 @@ class Prism::LocalVariableReadNode < ::Prism::Node # # 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#13151 + # source://prism//lib/prism/node.rb#12369 sig { returns(Integer) } def depth; end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#13154 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#12372 + 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). # @@ -20826,11 +21849,7 @@ class Prism::LocalVariableReadNode < ::Prism::Node # # _1 # name `:_1` # - # Finally, for the default `it` block parameter, the name is `0it`. This is to distinguish it from an `it` local variable that is explicitly declared. - # - # it # name `:0it` - # - # source://prism//lib/prism/node.rb#13142 + # source://prism//lib/prism/node.rb#12360 sig { returns(Symbol) } def name; end @@ -20849,7 +21868,7 @@ class Prism::LocalVariableReadNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#13175 + # source://prism//lib/prism/node.rb#12390 sig { override.returns(Symbol) } def type; end @@ -20861,7 +21880,7 @@ class Prism::LocalVariableReadNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#13185 + # source://prism//lib/prism/node.rb#12400 def type; end end end @@ -20871,83 +21890,83 @@ end # foo, bar = baz # ^^^ ^^^ # -# source://prism//lib/prism/node.rb#13202 +# source://prism//lib/prism/node.rb#12417 class Prism::LocalVariableTargetNode < ::Prism::Node # def initialize: (Symbol name, Integer depth, Location location) -> void # # @return [LocalVariableTargetNode] a new instance of LocalVariableTargetNode # - # source://prism//lib/prism/node.rb#13204 + # source://prism//lib/prism/node.rb#12419 sig { params(source: Prism::Source, name: Symbol, depth: Integer, location: Prism::Location).void } def initialize(source, name, depth, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#13289 + # source://prism//lib/prism/node.rb#12500 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13213 + # source://prism//lib/prism/node.rb#12427 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#13218 + # source://prism//lib/prism/node.rb#12432 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13228 + # source://prism//lib/prism/node.rb#12442 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13223 + # source://prism//lib/prism/node.rb#12437 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?depth: Integer, ?location: Location) -> LocalVariableTargetNode # - # source://prism//lib/prism/node.rb#13233 + # source://prism//lib/prism/node.rb#12447 sig { params(name: Symbol, depth: Integer, location: Prism::Location).returns(Prism::LocalVariableTargetNode) } def copy(name: T.unsafe(nil), depth: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13218 + # source://prism//lib/prism/node.rb#12432 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, depth: Integer, location: Location } # - # source://prism//lib/prism/node.rb#13241 + # source://prism//lib/prism/node.rb#12455 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#13249 + # source://prism//lib/prism/node.rb#12463 sig { returns(Integer) } def depth; end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#13252 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#12466 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#13246 + # source://prism//lib/prism/node.rb#12460 sig { returns(Symbol) } def name; end @@ -20966,7 +21985,7 @@ class Prism::LocalVariableTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#13273 + # source://prism//lib/prism/node.rb#12484 sig { override.returns(Symbol) } def type; end @@ -20978,7 +21997,7 @@ class Prism::LocalVariableTargetNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#13283 + # source://prism//lib/prism/node.rb#12494 def type; end end end @@ -20988,13 +22007,13 @@ end # foo = 1 # ^^^^^^^ # -# source://prism//lib/prism/node.rb#13300 +# source://prism//lib/prism/node.rb#12511 class Prism::LocalVariableWriteNode < ::Prism::Node # def initialize: (Symbol name, Integer depth, Location name_loc, Prism::node value, Location operator_loc, Location location) -> void # # @return [LocalVariableWriteNode] a new instance of LocalVariableWriteNode # - # source://prism//lib/prism/node.rb#13302 + # source://prism//lib/prism/node.rb#12513 sig do params( source: Prism::Source, @@ -21011,36 +22030,36 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#13442 + # source://prism//lib/prism/node.rb#12645 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13314 + # source://prism//lib/prism/node.rb#12524 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#13319 + # source://prism//lib/prism/node.rb#12529 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13329 + # source://prism//lib/prism/node.rb#12539 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13324 + # source://prism//lib/prism/node.rb#12534 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?depth: Integer, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location, ?location: Location) -> LocalVariableWriteNode # - # source://prism//lib/prism/node.rb#13334 + # source://prism//lib/prism/node.rb#12544 sig do params( name: Symbol, @@ -21056,13 +22075,13 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13319 + # source://prism//lib/prism/node.rb#12529 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, depth: Integer, name_loc: Location, value: Prism::node, operator_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#13342 + # source://prism//lib/prism/node.rb#12552 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -21074,18 +22093,18 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # # 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#13360 + # source://prism//lib/prism/node.rb#12570 sig { returns(Integer) } def depth; end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#13401 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#12611 + 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). # @@ -21093,7 +22112,7 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # # abc = 123 # name `:abc` # - # source://prism//lib/prism/node.rb#13351 + # source://prism//lib/prism/node.rb#12561 sig { returns(Symbol) } def name; end @@ -21102,13 +22121,13 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # foo = :bar # ^^^ # - # source://prism//lib/prism/node.rb#13366 + # source://prism//lib/prism/node.rb#12576 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#13396 + # source://prism//lib/prism/node.rb#12606 sig { returns(String) } def operator; end @@ -21117,7 +22136,7 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # x = :y # ^ # - # source://prism//lib/prism/node.rb#13389 + # source://prism//lib/prism/node.rb#12599 sig { returns(Prism::Location) } def operator_loc; end @@ -21136,7 +22155,7 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#13426 + # source://prism//lib/prism/node.rb#12629 sig { override.returns(Symbol) } def type; end @@ -21152,7 +22171,7 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # # foo = foo # - # source://prism//lib/prism/node.rb#13383 + # source://prism//lib/prism/node.rb#12593 sig { returns(Prism::Node) } def value; end @@ -21164,104 +22183,112 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#13436 + # source://prism//lib/prism/node.rb#12639 def type; end end end # This represents a location in the source. # -# source://prism//lib/prism/parse_result.rb#104 +# source://prism//lib/prism/parse_result.rb#156 class Prism::Location # Create a new location object with the given source, start byte offset, and # byte length. # # @return [Location] a new instance of Location # - # source://prism//lib/prism/parse_result.rb#119 + # source://prism//lib/prism/parse_result.rb#171 sig { params(source: Prism::Source, start_offset: Integer, length: Integer).void } def initialize(source, start_offset, length); end # Returns true if the given other location is equal to this location. # - # source://prism//lib/prism/parse_result.rb#269 + # source://prism//lib/prism/parse_result.rb#335 sig { params(other: T.untyped).returns(T::Boolean) } def ==(other); end + # Join this location with the first occurrence of the string in the source + # that occurs after this location on the same line, and return the new + # location. This will raise an error if the string does not exist. + # + # source://prism//lib/prism/parse_result.rb#354 + sig { params(string: String).returns(Prism::Location) } + def adjoin(string); end + # Returns a new location that is the result of chopping off the last byte. # - # source://prism//lib/prism/parse_result.rb#165 + # source://prism//lib/prism/parse_result.rb#217 sig { returns(Prism::Location) } def chop; end # Returns all comments that are associated with this location (both leading # and trailing comments). # - # source://prism//lib/prism/parse_result.rb#155 + # source://prism//lib/prism/parse_result.rb#207 sig { returns(T::Array[Prism::Comment]) } def comments; end # Create a new location object with the given options. # - # source://prism//lib/prism/parse_result.rb#160 + # source://prism//lib/prism/parse_result.rb#212 sig { params(source: Prism::Source, start_offset: Integer, length: Integer).returns(Prism::Location) } def copy(source: T.unsafe(nil), start_offset: T.unsafe(nil), length: T.unsafe(nil)); end # Implement the hash pattern matching interface for Location. # - # source://prism//lib/prism/parse_result.rb#259 + # source://prism//lib/prism/parse_result.rb#325 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # The column number in characters where this location ends from the start of # the line. # - # source://prism//lib/prism/parse_result.rb#248 + # source://prism//lib/prism/parse_result.rb#314 sig { returns(Integer) } def end_character_column; end # The character offset from the beginning of the source where this location # ends. # - # source://prism//lib/prism/parse_result.rb#197 + # source://prism//lib/prism/parse_result.rb#263 sig { returns(Integer) } def end_character_offset; end # The column number in code units of the given encoding where this location # ends from the start of the line. # - # source://prism//lib/prism/parse_result.rb#254 + # source://prism//lib/prism/parse_result.rb#320 sig { params(encoding: Encoding).returns(Integer) } def end_code_units_column(encoding = T.unsafe(nil)); end # The offset from the start of the file in code units of the given encoding. # - # source://prism//lib/prism/parse_result.rb#202 + # source://prism//lib/prism/parse_result.rb#268 sig { params(encoding: Encoding).returns(Integer) } def end_code_units_offset(encoding = T.unsafe(nil)); end # The column number in bytes where this location ends from the start of the # line. # - # source://prism//lib/prism/parse_result.rb#242 + # source://prism//lib/prism/parse_result.rb#308 sig { returns(Integer) } def end_column; end # The line number where this location ends. # - # source://prism//lib/prism/parse_result.rb#218 + # source://prism//lib/prism/parse_result.rb#284 sig { returns(Integer) } def end_line; end # The byte offset from the beginning of the source where this location ends. # - # source://prism//lib/prism/parse_result.rb#191 + # source://prism//lib/prism/parse_result.rb#257 sig { returns(Integer) } def end_offset; end # Returns a string representation of this location. # - # source://prism//lib/prism/parse_result.rb#170 + # source://prism//lib/prism/parse_result.rb#222 sig { returns(String) } def inspect; end @@ -21269,104 +22296,117 @@ class Prism::Location # 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#278 + # source://prism//lib/prism/parse_result.rb#344 sig { params(other: Prism::Location).returns(Prism::Location) } def join(other); end # Attach a comment to the leading comments of this location. # - # source://prism//lib/prism/parse_result.rb#138 + # source://prism//lib/prism/parse_result.rb#190 sig { params(comment: Prism::Comment).void } def leading_comment(comment); end # These are the comments that are associated with this location that exist # before the start of this location. # - # source://prism//lib/prism/parse_result.rb#133 + # source://prism//lib/prism/parse_result.rb#185 sig { returns(T::Array[Prism::Comment]) } def leading_comments; end # The length of this location in bytes. # - # source://prism//lib/prism/parse_result.rb#115 + # source://prism//lib/prism/parse_result.rb#167 sig { returns(Integer) } def length; end # Implement the pretty print interface for Location. # - # source://prism//lib/prism/parse_result.rb#264 + # source://prism//lib/prism/parse_result.rb#330 sig { params(q: T.untyped).void } def pretty_print(q); end # The source code that this location represents. # - # source://prism//lib/prism/parse_result.rb#175 + # source://prism//lib/prism/parse_result.rb#232 sig { returns(String) } def slice; end + # The source code that this location represents starting from the beginning + # of the line that this location starts on to the end of the line that this + # location ends on. + # + # source://prism//lib/prism/parse_result.rb#239 + def slice_lines; end + + # Returns all of the lines of the source code associated with this location. + # + # source://prism//lib/prism/parse_result.rb#227 + sig { returns(T::Array[String]) } + def source_lines; end + # The column number in characters where this location ends from the start of # the line. # - # source://prism//lib/prism/parse_result.rb#230 + # source://prism//lib/prism/parse_result.rb#296 sig { returns(Integer) } def start_character_column; end # The character offset from the beginning of the source where this location # starts. # - # source://prism//lib/prism/parse_result.rb#181 + # source://prism//lib/prism/parse_result.rb#247 sig { returns(Integer) } def start_character_offset; end # The column number in code units of the given encoding where this location # starts from the start of the line. # - # source://prism//lib/prism/parse_result.rb#236 + # source://prism//lib/prism/parse_result.rb#302 sig { params(encoding: Encoding).returns(Integer) } def start_code_units_column(encoding = T.unsafe(nil)); end # The offset from the start of the file in code units of the given encoding. # - # source://prism//lib/prism/parse_result.rb#186 + # source://prism//lib/prism/parse_result.rb#252 sig { params(encoding: Encoding).returns(Integer) } def start_code_units_offset(encoding = T.unsafe(nil)); end # The column number in bytes where this location starts from the start of # the line. # - # source://prism//lib/prism/parse_result.rb#224 + # source://prism//lib/prism/parse_result.rb#290 sig { returns(Integer) } def start_column; end # The line number where this location starts. # - # source://prism//lib/prism/parse_result.rb#207 + # source://prism//lib/prism/parse_result.rb#273 sig { returns(Integer) } def start_line; end # The content of the line where this location starts before this location. # - # source://prism//lib/prism/parse_result.rb#212 + # source://prism//lib/prism/parse_result.rb#278 sig { returns(String) } def start_line_slice; end # The byte offset from the beginning of the source where this location # starts. # - # source://prism//lib/prism/parse_result.rb#112 + # source://prism//lib/prism/parse_result.rb#164 sig { returns(Integer) } def start_offset; end # Attach a comment to the trailing comments of this location. # - # source://prism//lib/prism/parse_result.rb#149 + # source://prism//lib/prism/parse_result.rb#201 sig { params(comment: Prism::Comment).void } def trailing_comment(comment); end # These are the comments that are associated with this location that exist # after the end of this location. # - # source://prism//lib/prism/parse_result.rb#144 + # source://prism//lib/prism/parse_result.rb#196 sig { returns(T::Array[Prism::Comment]) } def trailing_comments; end @@ -21375,66 +22415,66 @@ class Prism::Location # A Source object that is used to determine more information from the given # offset and length. # - # source://prism//lib/prism/parse_result.rb#107 + # source://prism//lib/prism/parse_result.rb#159 sig { returns(Prism::Source) } def source; end end # Flags for while and until loop nodes. # -# source://prism//lib/prism/node.rb#20403 +# source://prism//lib/prism/node.rb#19196 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#20405 +# source://prism//lib/prism/node.rb#19198 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#338 +# source://prism//lib/prism/parse_result.rb#416 class Prism::MagicComment # Create a new magic comment object with the given key and value locations. # # @return [MagicComment] a new instance of MagicComment # - # source://prism//lib/prism/parse_result.rb#346 + # source://prism//lib/prism/parse_result.rb#424 sig { params(key_loc: Prism::Location, value_loc: Prism::Location).void } def initialize(key_loc, value_loc); end # Implement the hash pattern matching interface for MagicComment. # - # source://prism//lib/prism/parse_result.rb#362 + # source://prism//lib/prism/parse_result.rb#440 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # Returns a string representation of this magic comment. # - # source://prism//lib/prism/parse_result.rb#367 + # source://prism//lib/prism/parse_result.rb#445 sig { returns(String) } def inspect; end # Returns the key of the magic comment by slicing it from the source code. # - # source://prism//lib/prism/parse_result.rb#352 + # source://prism//lib/prism/parse_result.rb#430 sig { returns(String) } def key; end # A Location object representing the location of the key in the source. # - # source://prism//lib/prism/parse_result.rb#340 + # source://prism//lib/prism/parse_result.rb#418 sig { returns(Prism::Location) } def key_loc; end # Returns the value of the magic comment by slicing it from the source code. # - # source://prism//lib/prism/parse_result.rb#357 + # source://prism//lib/prism/parse_result.rb#435 sig { returns(String) } def value; end # A Location object representing the location of the value in the source. # - # source://prism//lib/prism/parse_result.rb#343 + # source://prism//lib/prism/parse_result.rb#421 sig { returns(Prism::Location) } def value_loc; end end @@ -21444,7 +22484,7 @@ end # if /foo/i then end # ^^^^^^ # -# source://prism//lib/prism/node.rb#13456 +# source://prism//lib/prism/node.rb#12659 class Prism::MatchLastLineNode < ::Prism::Node include ::Prism::RegularExpressionOptions @@ -21452,7 +22492,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [MatchLastLineNode] a new instance of MatchLastLineNode # - # source://prism//lib/prism/node.rb#13458 + # source://prism//lib/prism/node.rb#12661 sig do params( source: Prism::Source, @@ -21469,12 +22509,12 @@ class Prism::MatchLastLineNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#13642 + # source://prism//lib/prism/node.rb#12837 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13470 + # source://prism//lib/prism/node.rb#12672 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -21482,55 +22522,55 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#13556 + # source://prism//lib/prism/node.rb#12758 sig { returns(T::Boolean) } def ascii_8bit?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13475 + # source://prism//lib/prism/node.rb#12677 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#13596 + # source://prism//lib/prism/node.rb#12798 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#13521 + # source://prism//lib/prism/node.rb#12723 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13485 + # source://prism//lib/prism/node.rb#12687 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13480 + # source://prism//lib/prism/node.rb#12682 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def content: () -> String # - # source://prism//lib/prism/node.rb#13591 + # source://prism//lib/prism/node.rb#12793 sig { returns(String) } def content; end # attr_reader content_loc: Location # - # source://prism//lib/prism/node.rb#13514 + # source://prism//lib/prism/node.rb#12716 sig { returns(Prism::Location) } def content_loc; end # def copy: (?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String, ?location: Location) -> MatchLastLineNode # - # source://prism//lib/prism/node.rb#13490 + # source://prism//lib/prism/node.rb#12692 sig do params( flags: Integer, @@ -21546,13 +22586,13 @@ class Prism::MatchLastLineNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13475 + # source://prism//lib/prism/node.rb#12677 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location } # - # source://prism//lib/prism/node.rb#13498 + # source://prism//lib/prism/node.rb#12700 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -21560,7 +22600,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#13551 + # source://prism//lib/prism/node.rb#12753 sig { returns(T::Boolean) } def euc_jp?; end @@ -21568,7 +22608,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#13536 + # source://prism//lib/prism/node.rb#12738 sig { returns(T::Boolean) } def extended?; end @@ -21579,7 +22619,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#13576 + # source://prism//lib/prism/node.rb#12778 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -21587,7 +22627,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#13581 + # source://prism//lib/prism/node.rb#12783 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end @@ -21595,7 +22635,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#13571 + # source://prism//lib/prism/node.rb#12773 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -21603,21 +22643,21 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#13531 + # source://prism//lib/prism/node.rb#12733 sig { returns(T::Boolean) } def ignore_case?; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#13601 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#12803 + sig { override.returns(String) } + def inspect; end # def multi_line?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#13541 + # source://prism//lib/prism/node.rb#12743 sig { returns(T::Boolean) } def multi_line?; end @@ -21625,19 +22665,19 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#13546 + # source://prism//lib/prism/node.rb#12748 sig { returns(T::Boolean) } def once?; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#13586 + # source://prism//lib/prism/node.rb#12788 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#13507 + # source://prism//lib/prism/node.rb#12709 sig { returns(Prism::Location) } def opening_loc; end @@ -21659,13 +22699,13 @@ class Prism::MatchLastLineNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#13626 + # source://prism//lib/prism/node.rb#12821 sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#13528 + # source://prism//lib/prism/node.rb#12730 sig { returns(String) } def unescaped; end @@ -21673,7 +22713,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#13566 + # source://prism//lib/prism/node.rb#12768 sig { returns(T::Boolean) } def utf_8?; end @@ -21681,7 +22721,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#13561 + # source://prism//lib/prism/node.rb#12763 sig { returns(T::Boolean) } def windows_31j?; end @@ -21689,7 +22729,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#13503 + # source://prism//lib/prism/node.rb#12705 sig { returns(Integer) } def flags; end @@ -21701,7 +22741,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#13636 + # source://prism//lib/prism/node.rb#12831 def type; end end end @@ -21711,13 +22751,13 @@ end # foo in bar # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#13656 +# source://prism//lib/prism/node.rb#12851 class Prism::MatchPredicateNode < ::Prism::Node # def initialize: (Prism::node value, Prism::node pattern, Location operator_loc, Location location) -> void # # @return [MatchPredicateNode] a new instance of MatchPredicateNode # - # source://prism//lib/prism/node.rb#13658 + # source://prism//lib/prism/node.rb#12853 sig do params( source: Prism::Source, @@ -21732,36 +22772,36 @@ class Prism::MatchPredicateNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#13759 + # source://prism//lib/prism/node.rb#12947 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13668 + # source://prism//lib/prism/node.rb#12862 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#13673 + # source://prism//lib/prism/node.rb#12867 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13683 + # source://prism//lib/prism/node.rb#12877 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13678 + # source://prism//lib/prism/node.rb#12872 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?value: Prism::node, ?pattern: Prism::node, ?operator_loc: Location, ?location: Location) -> MatchPredicateNode # - # source://prism//lib/prism/node.rb#13688 + # source://prism//lib/prism/node.rb#12882 sig do params( value: Prism::Node, @@ -21775,40 +22815,40 @@ class Prism::MatchPredicateNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13673 + # source://prism//lib/prism/node.rb#12867 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::node, pattern: Prism::node, operator_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#13696 + # source://prism//lib/prism/node.rb#12890 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#13719 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#12913 + sig { override.returns(String) } + def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#13714 + # source://prism//lib/prism/node.rb#12908 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#13707 + # source://prism//lib/prism/node.rb#12901 sig { returns(Prism::Location) } def operator_loc; end # attr_reader pattern: Prism::node # - # source://prism//lib/prism/node.rb#13704 + # source://prism//lib/prism/node.rb#12898 sig { returns(Prism::Node) } def pattern; end @@ -21827,13 +22867,13 @@ class Prism::MatchPredicateNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#13743 + # source://prism//lib/prism/node.rb#12931 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#13701 + # source://prism//lib/prism/node.rb#12895 sig { returns(Prism::Node) } def value; end @@ -21845,7 +22885,7 @@ class Prism::MatchPredicateNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#13753 + # source://prism//lib/prism/node.rb#12941 def type; end end end @@ -21855,13 +22895,13 @@ end # foo => bar # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#13771 +# source://prism//lib/prism/node.rb#12959 class Prism::MatchRequiredNode < ::Prism::Node # def initialize: (Prism::node value, Prism::node pattern, Location operator_loc, Location location) -> void # # @return [MatchRequiredNode] a new instance of MatchRequiredNode # - # source://prism//lib/prism/node.rb#13773 + # source://prism//lib/prism/node.rb#12961 sig do params( source: Prism::Source, @@ -21876,36 +22916,36 @@ class Prism::MatchRequiredNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#13874 + # source://prism//lib/prism/node.rb#13055 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13783 + # source://prism//lib/prism/node.rb#12970 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#13788 + # source://prism//lib/prism/node.rb#12975 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13798 + # source://prism//lib/prism/node.rb#12985 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13793 + # source://prism//lib/prism/node.rb#12980 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?value: Prism::node, ?pattern: Prism::node, ?operator_loc: Location, ?location: Location) -> MatchRequiredNode # - # source://prism//lib/prism/node.rb#13803 + # source://prism//lib/prism/node.rb#12990 sig do params( value: Prism::Node, @@ -21919,40 +22959,40 @@ class Prism::MatchRequiredNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13788 + # source://prism//lib/prism/node.rb#12975 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::node, pattern: Prism::node, operator_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#13811 + # source://prism//lib/prism/node.rb#12998 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#13834 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#13021 + sig { override.returns(String) } + def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#13829 + # source://prism//lib/prism/node.rb#13016 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#13822 + # source://prism//lib/prism/node.rb#13009 sig { returns(Prism::Location) } def operator_loc; end # attr_reader pattern: Prism::node # - # source://prism//lib/prism/node.rb#13819 + # source://prism//lib/prism/node.rb#13006 sig { returns(Prism::Node) } def pattern; end @@ -21971,13 +23011,13 @@ class Prism::MatchRequiredNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#13858 + # source://prism//lib/prism/node.rb#13039 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#13816 + # source://prism//lib/prism/node.rb#13003 sig { returns(Prism::Node) } def value; end @@ -21989,7 +23029,7 @@ class Prism::MatchRequiredNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#13868 + # source://prism//lib/prism/node.rb#13049 def type; end end end @@ -21999,13 +23039,13 @@ end # /(?bar)/ =~ baz # ^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#13886 +# source://prism//lib/prism/node.rb#13067 class Prism::MatchWriteNode < ::Prism::Node # def initialize: (CallNode call, Array[LocalVariableTargetNode] targets, Location location) -> void # # @return [MatchWriteNode] a new instance of MatchWriteNode # - # source://prism//lib/prism/node.rb#13888 + # source://prism//lib/prism/node.rb#13069 sig do params( source: Prism::Source, @@ -22019,42 +23059,42 @@ class Prism::MatchWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#13974 + # source://prism//lib/prism/node.rb#13150 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13897 + # source://prism//lib/prism/node.rb#13077 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader call: CallNode # - # source://prism//lib/prism/node.rb#13930 + # source://prism//lib/prism/node.rb#13110 sig { returns(Prism::CallNode) } def call; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13902 + # source://prism//lib/prism/node.rb#13082 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13912 + # source://prism//lib/prism/node.rb#13092 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13907 + # source://prism//lib/prism/node.rb#13087 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?call: CallNode, ?targets: Array[LocalVariableTargetNode], ?location: Location) -> MatchWriteNode # - # source://prism//lib/prism/node.rb#13917 + # source://prism//lib/prism/node.rb#13097 sig do params( call: Prism::CallNode, @@ -22067,28 +23107,28 @@ class Prism::MatchWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13902 + # source://prism//lib/prism/node.rb#13082 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { call: CallNode, targets: Array[LocalVariableTargetNode], location: Location } # - # source://prism//lib/prism/node.rb#13925 + # source://prism//lib/prism/node.rb#13105 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#13936 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#13116 + sig { override.returns(String) } + def inspect; end # attr_reader targets: Array[LocalVariableTargetNode] # - # source://prism//lib/prism/node.rb#13933 + # source://prism//lib/prism/node.rb#13113 sig { returns(T::Array[Prism::LocalVariableTargetNode]) } def targets; end @@ -22107,7 +23147,7 @@ class Prism::MatchWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#13958 + # source://prism//lib/prism/node.rb#13134 sig { override.returns(Symbol) } def type; end @@ -22119,80 +23159,80 @@ class Prism::MatchWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#13968 + # source://prism//lib/prism/node.rb#13144 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#13983 +# source://prism//lib/prism/node.rb#13159 class Prism::MissingNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [MissingNode] a new instance of MissingNode # - # source://prism//lib/prism/node.rb#13985 + # source://prism//lib/prism/node.rb#13161 sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#14060 + # source://prism//lib/prism/node.rb#13234 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13992 + # source://prism//lib/prism/node.rb#13167 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#13997 + # source://prism//lib/prism/node.rb#13172 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14007 + # source://prism//lib/prism/node.rb#13182 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14002 + # source://prism//lib/prism/node.rb#13177 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?location: Location) -> MissingNode # - # source://prism//lib/prism/node.rb#14012 + # source://prism//lib/prism/node.rb#13187 sig { params(location: Prism::Location).returns(Prism::MissingNode) } def copy(location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13997 + # source://prism//lib/prism/node.rb#13172 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } # - # source://prism//lib/prism/node.rb#14020 + # source://prism//lib/prism/node.rb#13195 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#14025 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#13200 + sig { override.returns(String) } + def inspect; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by @@ -22209,7 +23249,7 @@ class Prism::MissingNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#14044 + # source://prism//lib/prism/node.rb#13218 sig { override.returns(Symbol) } def type; end @@ -22221,7 +23261,7 @@ class Prism::MissingNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#14054 + # source://prism//lib/prism/node.rb#13228 def type; end end end @@ -22231,13 +23271,13 @@ end # module Foo end # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#14069 +# source://prism//lib/prism/node.rb#13243 class Prism::ModuleNode < ::Prism::Node # def initialize: (Array[Symbol] locals, Location module_keyword_loc, Prism::node constant_path, Prism::node? body, Location end_keyword_loc, Symbol name, Location location) -> void # # @return [ModuleNode] a new instance of ModuleNode # - # source://prism//lib/prism/node.rb#14071 + # source://prism//lib/prism/node.rb#13245 sig do params( source: Prism::Source, @@ -22255,48 +23295,48 @@ class Prism::ModuleNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#14203 + # source://prism//lib/prism/node.rb#13363 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14084 + # source://prism//lib/prism/node.rb#13257 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: Prism::node? # - # source://prism//lib/prism/node.rb#14133 + # source://prism//lib/prism/node.rb#13306 sig { returns(T.nilable(Prism::Node)) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14089 + # source://prism//lib/prism/node.rb#13262 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14102 + # source://prism//lib/prism/node.rb#13275 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14094 + # source://prism//lib/prism/node.rb#13267 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader constant_path: Prism::node # - # source://prism//lib/prism/node.rb#14130 + # source://prism//lib/prism/node.rb#13303 sig { returns(Prism::Node) } def constant_path; end # def copy: (?locals: Array[Symbol], ?module_keyword_loc: Location, ?constant_path: Prism::node, ?body: Prism::node?, ?end_keyword_loc: Location, ?name: Symbol, ?location: Location) -> ModuleNode # - # source://prism//lib/prism/node.rb#14107 + # source://prism//lib/prism/node.rb#13280 sig do params( locals: T::Array[Symbol], @@ -22313,58 +23353,58 @@ class Prism::ModuleNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14089 + # source://prism//lib/prism/node.rb#13262 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], module_keyword_loc: Location, constant_path: Prism::node, body: Prism::node?, end_keyword_loc: Location, name: Symbol, location: Location } # - # source://prism//lib/prism/node.rb#14115 + # source://prism//lib/prism/node.rb#13288 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#14151 + # source://prism//lib/prism/node.rb#13324 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#14136 + # source://prism//lib/prism/node.rb#13309 sig { returns(Prism::Location) } def end_keyword_loc; end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#14156 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#13329 + sig { override.returns(String) } + def inspect; end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#14120 + # source://prism//lib/prism/node.rb#13293 sig { returns(T::Array[Symbol]) } def locals; end # def module_keyword: () -> String # - # source://prism//lib/prism/node.rb#14146 + # source://prism//lib/prism/node.rb#13319 sig { returns(String) } def module_keyword; end # attr_reader module_keyword_loc: Location # - # source://prism//lib/prism/node.rb#14123 + # source://prism//lib/prism/node.rb#13296 sig { returns(Prism::Location) } def module_keyword_loc; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#14143 + # source://prism//lib/prism/node.rb#13316 sig { returns(Symbol) } def name; end @@ -22383,7 +23423,7 @@ class Prism::ModuleNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#14187 + # source://prism//lib/prism/node.rb#13347 sig { override.returns(Symbol) } def type; end @@ -22395,7 +23435,7 @@ class Prism::ModuleNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#14197 + # source://prism//lib/prism/node.rb#13357 def type; end end end @@ -22405,13 +23445,13 @@ end # a, (b, c) = 1, 2, 3 # ^^^^^^ # -# source://prism//lib/prism/node.rb#14219 +# source://prism//lib/prism/node.rb#13379 class Prism::MultiTargetNode < ::Prism::Node # def initialize: (Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode] lefts, Prism::node? rest, Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode] rights, Location? lparen_loc, Location? rparen_loc, Location location) -> void # # @return [MultiTargetNode] a new instance of MultiTargetNode # - # source://prism//lib/prism/node.rb#14221 + # source://prism//lib/prism/node.rb#13381 sig do params( source: Prism::Source, @@ -22428,36 +23468,36 @@ class Prism::MultiTargetNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#14360 + # source://prism//lib/prism/node.rb#13508 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14233 + # source://prism//lib/prism/node.rb#13392 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#14238 + # source://prism//lib/prism/node.rb#13397 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14252 + # source://prism//lib/prism/node.rb#13411 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14243 + # source://prism//lib/prism/node.rb#13402 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], ?rest: Prism::node?, ?rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode], ?lparen_loc: Location?, ?rparen_loc: Location?, ?location: Location) -> MultiTargetNode # - # source://prism//lib/prism/node.rb#14257 + # source://prism//lib/prism/node.rb#13416 sig do params( lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], @@ -22473,28 +23513,28 @@ class Prism::MultiTargetNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14238 + # source://prism//lib/prism/node.rb#13397 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], rest: Prism::node?, rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode], lparen_loc: Location?, rparen_loc: Location?, location: Location } # - # source://prism//lib/prism/node.rb#14265 + # source://prism//lib/prism/node.rb#13424 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#14315 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#13474 + sig { override.returns(String) } + def inspect; end # attr_reader lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode] # - # source://prism//lib/prism/node.rb#14270 + # source://prism//lib/prism/node.rb#13429 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 @@ -22502,25 +23542,25 @@ class Prism::MultiTargetNode < ::Prism::Node # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#14305 + # source://prism//lib/prism/node.rb#13464 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#14279 + # source://prism//lib/prism/node.rb#13438 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # attr_reader rest: Prism::node? # - # source://prism//lib/prism/node.rb#14273 + # source://prism//lib/prism/node.rb#13432 sig { returns(T.nilable(Prism::Node)) } def rest; end # attr_reader rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode] # - # source://prism//lib/prism/node.rb#14276 + # source://prism//lib/prism/node.rb#13435 sig do returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode)]) end @@ -22528,13 +23568,13 @@ class Prism::MultiTargetNode < ::Prism::Node # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#14310 + # source://prism//lib/prism/node.rb#13469 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#14292 + # source://prism//lib/prism/node.rb#13451 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end @@ -22553,7 +23593,7 @@ class Prism::MultiTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#14344 + # source://prism//lib/prism/node.rb#13492 sig { override.returns(Symbol) } def type; end @@ -22565,7 +23605,7 @@ class Prism::MultiTargetNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#14354 + # source://prism//lib/prism/node.rb#13502 def type; end end end @@ -22575,13 +23615,13 @@ end # a, b, c = 1, 2, 3 # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#14376 +# source://prism//lib/prism/node.rb#13524 class Prism::MultiWriteNode < ::Prism::Node # def initialize: (Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode] lefts, Prism::node? rest, Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode] rights, Location? lparen_loc, Location? rparen_loc, Location operator_loc, Prism::node value, Location location) -> void # # @return [MultiWriteNode] a new instance of MultiWriteNode # - # source://prism//lib/prism/node.rb#14378 + # source://prism//lib/prism/node.rb#13526 sig do params( source: Prism::Source, @@ -22600,36 +23640,36 @@ class Prism::MultiWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#14538 + # source://prism//lib/prism/node.rb#13671 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14392 + # source://prism//lib/prism/node.rb#13539 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#14397 + # source://prism//lib/prism/node.rb#13544 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14412 + # source://prism//lib/prism/node.rb#13559 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14402 + # source://prism//lib/prism/node.rb#13549 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode], ?rest: Prism::node?, ?rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode], ?lparen_loc: Location?, ?rparen_loc: Location?, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> MultiWriteNode # - # source://prism//lib/prism/node.rb#14417 + # source://prism//lib/prism/node.rb#13564 sig do params( lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode)], @@ -22647,28 +23687,28 @@ class Prism::MultiWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14397 + # source://prism//lib/prism/node.rb#13544 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode], rest: Prism::node?, rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode], lparen_loc: Location?, rparen_loc: Location?, operator_loc: Location, value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#14425 + # source://prism//lib/prism/node.rb#13572 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#14490 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#13637 + sig { override.returns(String) } + def inspect; end # attr_reader lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode] # - # source://prism//lib/prism/node.rb#14430 + # source://prism//lib/prism/node.rb#13577 sig do returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode)]) end @@ -22676,37 +23716,37 @@ class Prism::MultiWriteNode < ::Prism::Node # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#14475 + # source://prism//lib/prism/node.rb#13622 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#14439 + # source://prism//lib/prism/node.rb#13586 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#14485 + # source://prism//lib/prism/node.rb#13632 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#14465 + # source://prism//lib/prism/node.rb#13612 sig { returns(Prism::Location) } def operator_loc; end # attr_reader rest: Prism::node? # - # source://prism//lib/prism/node.rb#14433 + # source://prism//lib/prism/node.rb#13580 sig { returns(T.nilable(Prism::Node)) } def rest; end # attr_reader rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode] # - # source://prism//lib/prism/node.rb#14436 + # source://prism//lib/prism/node.rb#13583 sig do returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode)]) end @@ -22714,13 +23754,13 @@ class Prism::MultiWriteNode < ::Prism::Node # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#14480 + # source://prism//lib/prism/node.rb#13627 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#14452 + # source://prism//lib/prism/node.rb#13599 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end @@ -22739,13 +23779,13 @@ class Prism::MultiWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#14522 + # source://prism//lib/prism/node.rb#13655 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#14472 + # source://prism//lib/prism/node.rb#13619 sig { returns(Prism::Node) } def value; end @@ -22757,7 +23797,7 @@ class Prism::MultiWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#14532 + # source://prism//lib/prism/node.rb#13665 def type; end end end @@ -23203,322 +24243,325 @@ class Prism::MutationCompiler < ::Prism::Compiler # source://prism//lib/prism/mutation_compiler.rb#445 def visit_interpolated_x_string_node(node); end - # Copy a ItParametersNode node + # 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#455 + # 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#460 + # 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#465 + # 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#470 + # 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#475 + # 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#480 + # 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#485 + # 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#490 + # 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#495 + # 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#500 + # 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#505 + # 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#510 + # 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#515 + # 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#520 + # 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#525 + # 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#530 + # 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#535 + # 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#540 + # 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#545 + # 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#550 + # 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#555 + # 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#560 + # 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#565 + # 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#570 + # 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#575 + # 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#580 + # 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#585 + # 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#590 + # 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#595 + # 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#600 + # 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#605 + # 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#610 + # 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#615 + # 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#620 + # 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#625 + # 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#630 + # 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#635 + # 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#640 + # 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#645 + # 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#650 + # 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#655 + # 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#660 + # 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#665 + # 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#670 + # 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#675 + # 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#680 + # 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#685 + # 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#690 + # 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#695 + # 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#700 + # 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#705 + # 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#710 + # 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#715 + # 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#720 + # 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#725 + # 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#730 + # 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#735 + # 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#740 + # 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#745 + # 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#750 + # 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#755 + # 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#760 + # source://prism//lib/prism/mutation_compiler.rb#765 def visit_yield_node(node); end - - Result = type_member end # Represents the use of the `next` keyword. @@ -23526,13 +24569,13 @@ end # next 1 # ^^^^^^ # -# source://prism//lib/prism/node.rb#14556 +# source://prism//lib/prism/node.rb#13689 class Prism::NextNode < ::Prism::Node # def initialize: (ArgumentsNode? arguments, Location keyword_loc, Location location) -> void # # @return [NextNode] a new instance of NextNode # - # source://prism//lib/prism/node.rb#14558 + # source://prism//lib/prism/node.rb#13691 sig do params( source: Prism::Source, @@ -23546,42 +24589,42 @@ class Prism::NextNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#14659 + # source://prism//lib/prism/node.rb#13783 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14567 + # source://prism//lib/prism/node.rb#13699 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#14602 + # source://prism//lib/prism/node.rb#13734 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14572 + # source://prism//lib/prism/node.rb#13704 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14584 + # source://prism//lib/prism/node.rb#13716 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14577 + # source://prism//lib/prism/node.rb#13709 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?arguments: ArgumentsNode?, ?keyword_loc: Location, ?location: Location) -> NextNode # - # source://prism//lib/prism/node.rb#14589 + # source://prism//lib/prism/node.rb#13721 sig do params( arguments: T.nilable(Prism::ArgumentsNode), @@ -23594,34 +24637,34 @@ class Prism::NextNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14572 + # source://prism//lib/prism/node.rb#13704 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { arguments: ArgumentsNode?, keyword_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#14597 + # source://prism//lib/prism/node.rb#13729 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#14617 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#13749 + sig { override.returns(String) } + def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#14612 + # source://prism//lib/prism/node.rb#13744 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#14605 + # source://prism//lib/prism/node.rb#13737 sig { returns(Prism::Location) } def keyword_loc; end @@ -23640,7 +24683,7 @@ class Prism::NextNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#14643 + # source://prism//lib/prism/node.rb#13767 sig { override.returns(Symbol) } def type; end @@ -23652,7 +24695,7 @@ class Prism::NextNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#14653 + # source://prism//lib/prism/node.rb#13777 def type; end end end @@ -23662,73 +24705,73 @@ end # nil # ^^^ # -# source://prism//lib/prism/node.rb#14670 +# source://prism//lib/prism/node.rb#13794 class Prism::NilNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [NilNode] a new instance of NilNode # - # source://prism//lib/prism/node.rb#14672 + # source://prism//lib/prism/node.rb#13796 sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#14747 + # source://prism//lib/prism/node.rb#13869 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14679 + # source://prism//lib/prism/node.rb#13802 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#14684 + # source://prism//lib/prism/node.rb#13807 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14694 + # source://prism//lib/prism/node.rb#13817 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14689 + # source://prism//lib/prism/node.rb#13812 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?location: Location) -> NilNode # - # source://prism//lib/prism/node.rb#14699 + # source://prism//lib/prism/node.rb#13822 sig { params(location: Prism::Location).returns(Prism::NilNode) } def copy(location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14684 + # source://prism//lib/prism/node.rb#13807 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } # - # source://prism//lib/prism/node.rb#14707 + # source://prism//lib/prism/node.rb#13830 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#14712 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#13835 + sig { override.returns(String) } + def inspect; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by @@ -23745,7 +24788,7 @@ class Prism::NilNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#14731 + # source://prism//lib/prism/node.rb#13853 sig { override.returns(Symbol) } def type; end @@ -23757,7 +24800,7 @@ class Prism::NilNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#14741 + # source://prism//lib/prism/node.rb#13863 def type; end end end @@ -23768,13 +24811,13 @@ end # ^^^^^ # end # -# source://prism//lib/prism/node.rb#14757 +# source://prism//lib/prism/node.rb#13879 class Prism::NoKeywordsParameterNode < ::Prism::Node # def initialize: (Location operator_loc, Location keyword_loc, Location location) -> void # # @return [NoKeywordsParameterNode] a new instance of NoKeywordsParameterNode # - # source://prism//lib/prism/node.rb#14759 + # source://prism//lib/prism/node.rb#13881 sig do params( source: Prism::Source, @@ -23788,36 +24831,36 @@ class Prism::NoKeywordsParameterNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#14862 + # source://prism//lib/prism/node.rb#13980 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14768 + # source://prism//lib/prism/node.rb#13889 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#14773 + # source://prism//lib/prism/node.rb#13894 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14783 + # source://prism//lib/prism/node.rb#13904 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14778 + # source://prism//lib/prism/node.rb#13899 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?operator_loc: Location, ?keyword_loc: Location, ?location: Location) -> NoKeywordsParameterNode # - # source://prism//lib/prism/node.rb#14788 + # source://prism//lib/prism/node.rb#13909 sig do params( operator_loc: Prism::Location, @@ -23830,46 +24873,46 @@ class Prism::NoKeywordsParameterNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14773 + # source://prism//lib/prism/node.rb#13894 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { operator_loc: Location, keyword_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#14796 + # source://prism//lib/prism/node.rb#13917 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#14825 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#13946 + sig { override.returns(String) } + def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#14820 + # source://prism//lib/prism/node.rb#13941 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#14808 + # source://prism//lib/prism/node.rb#13929 sig { returns(Prism::Location) } def keyword_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#14815 + # source://prism//lib/prism/node.rb#13936 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#14801 + # source://prism//lib/prism/node.rb#13922 sig { returns(Prism::Location) } def operator_loc; end @@ -23888,7 +24931,7 @@ class Prism::NoKeywordsParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#14846 + # source://prism//lib/prism/node.rb#13964 sig { override.returns(Symbol) } def type; end @@ -23900,7 +24943,7 @@ class Prism::NoKeywordsParameterNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#14856 + # source://prism//lib/prism/node.rb#13974 def type; end end end @@ -23916,7 +24959,7 @@ class Prism::Node # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#90 + # source://prism//lib/prism/node.rb#131 sig { abstract.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -23925,7 +24968,7 @@ class Prism::Node # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#96 + # source://prism//lib/prism/node.rb#137 sig { abstract.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end @@ -23934,7 +24977,7 @@ class Prism::Node # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#110 + # source://prism//lib/prism/node.rb#151 sig { abstract.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end @@ -23943,7 +24986,7 @@ class Prism::Node # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#104 + # source://prism//lib/prism/node.rb#145 sig { abstract.returns(T::Array[Prism::Node]) } def compact_child_nodes; end @@ -23952,10 +24995,13 @@ class Prism::Node # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#96 + # source://prism//lib/prism/node.rb#137 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. # @@ -23970,9 +25016,9 @@ class Prism::Node # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#121 - sig { abstract.params(inspector: Prism::NodeInspector).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#162 + sig { abstract.returns(String) } + def inspect; end # A Location instance that represents the location of this node in the # source. @@ -23981,27 +25027,49 @@ class Prism::Node sig { returns(Prism::Location) } def location; end + # source://prism//lib/prism/parse_result/newlines.rb#69 + def newline!(lines); end + # @return [Boolean] # - # source://prism//lib/prism/node.rb#39 + # source://prism//lib/prism/parse_result/newlines.rb#65 def newline?; end # Similar to inspect, but respects the current level of indentation given by # the pretty print object. # - # source://prism//lib/prism/node.rb#58 + # source://prism//lib/prism/node.rb#62 sig { params(q: T.untyped).void } def pretty_print(q); end - # source://prism//lib/prism/node.rb#43 - def set_newline_flag(newline_marked); 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#40 + sig { returns(T::Array[String]) } + def script_lines; end # Slice the location of the node from the source. # - # source://prism//lib/prism/node.rb#52 + # source://prism//lib/prism/node.rb#49 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#56 + 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#40 + 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. # @@ -24011,16 +25079,27 @@ class Prism::Node # Convert this node into a graphviz dot graph string. # - # source://prism//lib/prism/node.rb#66 + # source://prism//lib/prism/node.rb#70 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#81 + sig { params(line: Integer, column: Integer).returns(T::Array[Prism::Node]) } + def tunnel(line, column); end + # Returns a symbol symbolizing the type of node that this represents. This # is particularly useful for case statements and array comparisons. # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#116 + # source://prism//lib/prism/node.rb#157 sig { abstract.returns(Symbol) } def type; end @@ -24039,148 +25118,94 @@ class Prism::Node # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#74 + # source://prism//lib/prism/node.rb#115 def fields; end # Returns the type of the node as a symbol. # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#126 + # source://prism//lib/prism/node.rb#167 def type; end end end -# This object is responsible for generating the output for the inspect method -# implementations of child nodes. -# -# source://prism//lib/prism/node_inspector.rb#6 -class Prism::NodeInspector - # @return [NodeInspector] a new instance of NodeInspector - # - # source://prism//lib/prism/node_inspector.rb#9 - def initialize(prefix = T.unsafe(nil)); end - - # Appends a line to the output with the current prefix. - # - # source://prism//lib/prism/node_inspector.rb#15 - def <<(line); end - - # Returns a new inspector that can be used to inspect a child node. - # - # source://prism//lib/prism/node_inspector.rb#59 - def child_inspector(append); end - - # Generates a string that represents a child node. - # - # source://prism//lib/prism/node_inspector.rb#54 - def child_node(node, append); end - - # This generates a string that is used as the header of the inspect output - # for any given node. - # - # source://prism//lib/prism/node_inspector.rb#21 - def header(node); end - - # Generates a string that represents a list of nodes. It handles properly - # using the box drawing characters to make the output look nice. - # - # source://prism//lib/prism/node_inspector.rb#31 - def list(prefix, nodes); end - - # Generates a string that represents a location field on a node. - # - # source://prism//lib/prism/node_inspector.rb#45 - def location(value); end - - # source://prism//lib/prism/node_inspector.rb#7 - def output; end - - # source://prism//lib/prism/node_inspector.rb#7 - def prefix; end - - # Returns the output as a string. - # - # source://prism//lib/prism/node_inspector.rb#64 - def to_str; end -end - # Represents an implicit set of parameters through the use of numbered parameters within a block or lambda. # # -> { _1 + _2 } # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#14873 +# source://prism//lib/prism/node.rb#13991 class Prism::NumberedParametersNode < ::Prism::Node # def initialize: (Integer maximum, Location location) -> void # # @return [NumberedParametersNode] a new instance of NumberedParametersNode # - # source://prism//lib/prism/node.rb#14875 + # source://prism//lib/prism/node.rb#13993 sig { params(source: Prism::Source, maximum: Integer, location: Prism::Location).void } def initialize(source, maximum, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#14955 + # source://prism//lib/prism/node.rb#14070 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14883 + # source://prism//lib/prism/node.rb#14000 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#14888 + # source://prism//lib/prism/node.rb#14005 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14898 + # source://prism//lib/prism/node.rb#14015 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14893 + # source://prism//lib/prism/node.rb#14010 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?maximum: Integer, ?location: Location) -> NumberedParametersNode # - # source://prism//lib/prism/node.rb#14903 + # source://prism//lib/prism/node.rb#14020 sig { params(maximum: Integer, location: Prism::Location).returns(Prism::NumberedParametersNode) } def copy(maximum: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14888 + # source://prism//lib/prism/node.rb#14005 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { maximum: Integer, location: Location } # - # source://prism//lib/prism/node.rb#14911 + # source://prism//lib/prism/node.rb#14028 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#14919 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#14036 + sig { override.returns(String) } + def inspect; end # attr_reader maximum: Integer # - # source://prism//lib/prism/node.rb#14916 + # source://prism//lib/prism/node.rb#14033 sig { returns(Integer) } def maximum; end @@ -24199,7 +25224,7 @@ class Prism::NumberedParametersNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#14939 + # source://prism//lib/prism/node.rb#14054 sig { override.returns(Symbol) } def type; end @@ -24211,7 +25236,7 @@ class Prism::NumberedParametersNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#14949 + # source://prism//lib/prism/node.rb#14064 def type; end end end @@ -24221,73 +25246,73 @@ end # $1 # ^^ # -# source://prism//lib/prism/node.rb#14965 +# source://prism//lib/prism/node.rb#14080 class Prism::NumberedReferenceReadNode < ::Prism::Node # def initialize: (Integer number, Location location) -> void # # @return [NumberedReferenceReadNode] a new instance of NumberedReferenceReadNode # - # source://prism//lib/prism/node.rb#14967 + # source://prism//lib/prism/node.rb#14082 sig { params(source: Prism::Source, number: Integer, location: Prism::Location).void } def initialize(source, number, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#15053 + # source://prism//lib/prism/node.rb#14165 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14975 + # source://prism//lib/prism/node.rb#14089 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#14980 + # source://prism//lib/prism/node.rb#14094 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14990 + # source://prism//lib/prism/node.rb#14104 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14985 + # source://prism//lib/prism/node.rb#14099 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?number: Integer, ?location: Location) -> NumberedReferenceReadNode # - # source://prism//lib/prism/node.rb#14995 + # source://prism//lib/prism/node.rb#14109 sig { params(number: Integer, location: Prism::Location).returns(Prism::NumberedReferenceReadNode) } def copy(number: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14980 + # source://prism//lib/prism/node.rb#14094 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { number: Integer, location: Location } # - # source://prism//lib/prism/node.rb#15003 + # source://prism//lib/prism/node.rb#14117 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#15017 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#14131 + 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`. # @@ -24297,7 +25322,7 @@ class Prism::NumberedReferenceReadNode < ::Prism::Node # # $4294967296 # number `0` # - # source://prism//lib/prism/node.rb#15014 + # source://prism//lib/prism/node.rb#14128 sig { returns(Integer) } def number; end @@ -24316,7 +25341,7 @@ class Prism::NumberedReferenceReadNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#15037 + # source://prism//lib/prism/node.rb#14149 sig { override.returns(Symbol) } def type; end @@ -24328,7 +25353,7 @@ class Prism::NumberedReferenceReadNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#15047 + # source://prism//lib/prism/node.rb#14159 def type; end end end @@ -24339,13 +25364,13 @@ end # ^^^^ # end # -# source://prism//lib/prism/node.rb#15064 +# source://prism//lib/prism/node.rb#14176 class Prism::OptionalKeywordParameterNode < ::Prism::Node # def initialize: (Integer flags, Symbol name, Location name_loc, Prism::node value, Location location) -> void # # @return [OptionalKeywordParameterNode] a new instance of OptionalKeywordParameterNode # - # source://prism//lib/prism/node.rb#15066 + # source://prism//lib/prism/node.rb#14178 sig do params( source: Prism::Source, @@ -24361,36 +25386,36 @@ class Prism::OptionalKeywordParameterNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#15173 + # source://prism//lib/prism/node.rb#14277 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15077 + # source://prism//lib/prism/node.rb#14188 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#15082 + # source://prism//lib/prism/node.rb#14193 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15092 + # source://prism//lib/prism/node.rb#14203 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15087 + # source://prism//lib/prism/node.rb#14198 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?location: Location) -> OptionalKeywordParameterNode # - # source://prism//lib/prism/node.rb#15097 + # source://prism//lib/prism/node.rb#14208 sig do params( flags: Integer, @@ -24405,34 +25430,34 @@ class Prism::OptionalKeywordParameterNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15082 + # source://prism//lib/prism/node.rb#14193 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, name_loc: Location, value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#15105 + # source://prism//lib/prism/node.rb#14216 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#15132 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#14243 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#15114 + # source://prism//lib/prism/node.rb#14225 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#15117 + # source://prism//lib/prism/node.rb#14228 sig { returns(Prism::Location) } def name_loc; end @@ -24440,7 +25465,7 @@ class Prism::OptionalKeywordParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15127 + # source://prism//lib/prism/node.rb#14238 sig { returns(T::Boolean) } def repeated_parameter?; end @@ -24459,13 +25484,13 @@ class Prism::OptionalKeywordParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#15157 + # source://prism//lib/prism/node.rb#14261 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#15124 + # source://prism//lib/prism/node.rb#14235 sig { returns(Prism::Node) } def value; end @@ -24473,7 +25498,7 @@ class Prism::OptionalKeywordParameterNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#15110 + # source://prism//lib/prism/node.rb#14221 sig { returns(Integer) } def flags; end @@ -24485,7 +25510,7 @@ class Prism::OptionalKeywordParameterNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#15167 + # source://prism//lib/prism/node.rb#14271 def type; end end end @@ -24496,13 +25521,13 @@ end # ^^^^^ # end # -# source://prism//lib/prism/node.rb#15187 +# source://prism//lib/prism/node.rb#14291 class Prism::OptionalParameterNode < ::Prism::Node # def initialize: (Integer flags, Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void # # @return [OptionalParameterNode] a new instance of OptionalParameterNode # - # source://prism//lib/prism/node.rb#15189 + # source://prism//lib/prism/node.rb#14293 sig do params( source: Prism::Source, @@ -24519,36 +25544,36 @@ class Prism::OptionalParameterNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#15310 + # source://prism//lib/prism/node.rb#14405 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15201 + # source://prism//lib/prism/node.rb#14304 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#15206 + # source://prism//lib/prism/node.rb#14309 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15216 + # source://prism//lib/prism/node.rb#14319 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15211 + # source://prism//lib/prism/node.rb#14314 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> OptionalParameterNode # - # source://prism//lib/prism/node.rb#15221 + # source://prism//lib/prism/node.rb#14324 sig do params( flags: Integer, @@ -24564,46 +25589,46 @@ class Prism::OptionalParameterNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15206 + # source://prism//lib/prism/node.rb#14309 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#15229 + # source://prism//lib/prism/node.rb#14332 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#15268 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#14371 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#15238 + # source://prism//lib/prism/node.rb#14341 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#15241 + # source://prism//lib/prism/node.rb#14344 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#15263 + # source://prism//lib/prism/node.rb#14366 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#15248 + # source://prism//lib/prism/node.rb#14351 sig { returns(Prism::Location) } def operator_loc; end @@ -24611,7 +25636,7 @@ class Prism::OptionalParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15258 + # source://prism//lib/prism/node.rb#14361 sig { returns(T::Boolean) } def repeated_parameter?; end @@ -24630,13 +25655,13 @@ class Prism::OptionalParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#15294 + # source://prism//lib/prism/node.rb#14389 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#15255 + # source://prism//lib/prism/node.rb#14358 sig { returns(Prism::Node) } def value; end @@ -24644,7 +25669,7 @@ class Prism::OptionalParameterNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#15234 + # source://prism//lib/prism/node.rb#14337 sig { returns(Integer) } def flags; end @@ -24656,7 +25681,7 @@ class Prism::OptionalParameterNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#15304 + # source://prism//lib/prism/node.rb#14399 def type; end end end @@ -24666,13 +25691,13 @@ end # left or right # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#15324 +# source://prism//lib/prism/node.rb#14419 class Prism::OrNode < ::Prism::Node # def initialize: (Prism::node left, Prism::node right, Location operator_loc, Location location) -> void # # @return [OrNode] a new instance of OrNode # - # source://prism//lib/prism/node.rb#15326 + # source://prism//lib/prism/node.rb#14421 sig do params( source: Prism::Source, @@ -24687,36 +25712,36 @@ class Prism::OrNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#15442 + # source://prism//lib/prism/node.rb#14530 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15336 + # source://prism//lib/prism/node.rb#14430 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#15341 + # source://prism//lib/prism/node.rb#14435 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15351 + # source://prism//lib/prism/node.rb#14445 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15346 + # source://prism//lib/prism/node.rb#14440 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?left: Prism::node, ?right: Prism::node, ?operator_loc: Location, ?location: Location) -> OrNode # - # source://prism//lib/prism/node.rb#15356 + # source://prism//lib/prism/node.rb#14450 sig do params( left: Prism::Node, @@ -24730,24 +25755,24 @@ class Prism::OrNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15341 + # source://prism//lib/prism/node.rb#14435 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { left: Prism::node, right: Prism::node, operator_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#15364 + # source://prism//lib/prism/node.rb#14458 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#15402 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#14496 + 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). # @@ -24757,13 +25782,13 @@ class Prism::OrNode < ::Prism::Node # 1 || 2 # ^ # - # source://prism//lib/prism/node.rb#15375 + # source://prism//lib/prism/node.rb#14469 sig { returns(Prism::Node) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#15397 + # source://prism//lib/prism/node.rb#14491 sig { returns(String) } def operator; end @@ -24772,7 +25797,7 @@ class Prism::OrNode < ::Prism::Node # left or right # ^^ # - # source://prism//lib/prism/node.rb#15390 + # source://prism//lib/prism/node.rb#14484 sig { returns(Prism::Location) } def operator_loc; end @@ -24784,7 +25809,7 @@ class Prism::OrNode < ::Prism::Node # 1 or 2 # ^ # - # source://prism//lib/prism/node.rb#15384 + # source://prism//lib/prism/node.rb#14478 sig { returns(Prism::Node) } def right; end @@ -24803,7 +25828,7 @@ class Prism::OrNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#15426 + # source://prism//lib/prism/node.rb#14514 sig { override.returns(Symbol) } def type; end @@ -24815,7 +25840,7 @@ class Prism::OrNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#15436 + # source://prism//lib/prism/node.rb#14524 def type; end end end @@ -25064,12 +26089,12 @@ Prism::Pack::UTF8 = T.let(T.unsafe(nil), Symbol) # Flags for parameter nodes. # -# source://prism//lib/prism/node.rb#20409 +# source://prism//lib/prism/node.rb#19202 module Prism::ParameterFlags; end # a parameter name that has been repeated in the method signature # -# source://prism//lib/prism/node.rb#20411 +# source://prism//lib/prism/node.rb#19204 Prism::ParameterFlags::REPEATED_PARAMETER = T.let(T.unsafe(nil), Integer) # Represents the list of parameters on a method, block, or lambda definition. @@ -25078,20 +26103,20 @@ Prism::ParameterFlags::REPEATED_PARAMETER = T.let(T.unsafe(nil), Integer) # ^^^^^^^ # end # -# source://prism//lib/prism/node.rb#15455 +# source://prism//lib/prism/node.rb#14543 class Prism::ParametersNode < ::Prism::Node - # def initialize: (Array[RequiredParameterNode | MultiTargetNode] requireds, Array[OptionalParameterNode] optionals, RestParameterNode | ImplicitRestNode | nil rest, Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode] posts, Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode] keywords, KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil keyword_rest, BlockParameterNode? block, Location location) -> void + # def initialize: (Array[RequiredParameterNode | MultiTargetNode] requireds, Array[OptionalParameterNode] optionals, RestParameterNode | ImplicitRestNode | nil rest, Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode] posts, Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode] keywords, KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil keyword_rest, BlockParameterNode? block, Location location) -> void # # @return [ParametersNode] a new instance of ParametersNode # - # source://prism//lib/prism/node.rb#15457 + # source://prism//lib/prism/node.rb#14545 sig do params( source: Prism::Source, requireds: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)], optionals: T::Array[Prism::OptionalParameterNode], rest: T.nilable(T.any(Prism::RestParameterNode, Prism::ImplicitRestNode)), - posts: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode)], + 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), @@ -25103,48 +26128,48 @@ class Prism::ParametersNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#15590 + # source://prism//lib/prism/node.rb#14654 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15471 + # source://prism//lib/prism/node.rb#14558 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader block: BlockParameterNode? # - # source://prism//lib/prism/node.rb#15530 + # source://prism//lib/prism/node.rb#14617 sig { returns(T.nilable(Prism::BlockParameterNode)) } def block; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15476 + # source://prism//lib/prism/node.rb#14563 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15494 + # source://prism//lib/prism/node.rb#14581 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15481 + # source://prism//lib/prism/node.rb#14568 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?requireds: Array[RequiredParameterNode | MultiTargetNode], ?optionals: Array[OptionalParameterNode], ?rest: RestParameterNode | ImplicitRestNode | nil, ?posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode], ?keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode], ?keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil, ?block: BlockParameterNode?, ?location: Location) -> ParametersNode + # def copy: (?requireds: Array[RequiredParameterNode | MultiTargetNode], ?optionals: Array[OptionalParameterNode], ?rest: RestParameterNode | ImplicitRestNode | nil, ?posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode], ?keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode], ?keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil, ?block: BlockParameterNode?, ?location: Location) -> ParametersNode # - # source://prism//lib/prism/node.rb#15499 + # source://prism//lib/prism/node.rb#14586 sig do params( requireds: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)], optionals: T::Array[Prism::OptionalParameterNode], rest: T.nilable(T.any(Prism::RestParameterNode, Prism::ImplicitRestNode)), - posts: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode)], + 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), @@ -25156,28 +26181,28 @@ class Prism::ParametersNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15476 + # source://prism//lib/prism/node.rb#14563 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { requireds: Array[RequiredParameterNode | MultiTargetNode], optionals: Array[OptionalParameterNode], rest: RestParameterNode | ImplicitRestNode | nil, posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode], keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode], keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil, block: BlockParameterNode?, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { requireds: Array[RequiredParameterNode | MultiTargetNode], optionals: Array[OptionalParameterNode], rest: RestParameterNode | ImplicitRestNode | nil, posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode], keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode], keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil, block: BlockParameterNode?, location: Location } # - # source://prism//lib/prism/node.rb#15507 + # source://prism//lib/prism/node.rb#14594 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#15533 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#14620 + sig { override.returns(String) } + def inspect; end # attr_reader keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil # - # source://prism//lib/prism/node.rb#15527 + # source://prism//lib/prism/node.rb#14614 sig do returns(T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode))) end @@ -25185,39 +26210,39 @@ class Prism::ParametersNode < ::Prism::Node # attr_reader keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode] # - # source://prism//lib/prism/node.rb#15524 + # source://prism//lib/prism/node.rb#14611 sig { returns(T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)]) } def keywords; end # attr_reader optionals: Array[OptionalParameterNode] # - # source://prism//lib/prism/node.rb#15515 + # source://prism//lib/prism/node.rb#14602 sig { returns(T::Array[Prism::OptionalParameterNode]) } def optionals; end - # attr_reader posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode] + # attr_reader posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode] # - # source://prism//lib/prism/node.rb#15521 + # source://prism//lib/prism/node.rb#14608 sig do - returns(T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode)]) + 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#15512 + # source://prism//lib/prism/node.rb#14599 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#15518 + # source://prism//lib/prism/node.rb#14605 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#210 + # source://prism//lib/prism/node_ext.rb#253 sig { returns(T::Array[T.any([Symbol, Symbol], [Symbol])]) } def signature; end @@ -25236,7 +26261,7 @@ class Prism::ParametersNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#15574 + # source://prism//lib/prism/node.rb#14638 sig { override.returns(Symbol) } def type; end @@ -25248,7 +26273,7 @@ class Prism::ParametersNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#15584 + # source://prism//lib/prism/node.rb#14648 def type; end end end @@ -25258,13 +26283,13 @@ end # (10 + 34) # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#15610 +# source://prism//lib/prism/node.rb#14674 class Prism::ParenthesesNode < ::Prism::Node # def initialize: (Prism::node? body, Location opening_loc, Location closing_loc, Location location) -> void # # @return [ParenthesesNode] a new instance of ParenthesesNode # - # source://prism//lib/prism/node.rb#15612 + # source://prism//lib/prism/node.rb#14676 sig do params( source: Prism::Source, @@ -25279,54 +26304,54 @@ class Prism::ParenthesesNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#15731 + # source://prism//lib/prism/node.rb#14781 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15622 + # source://prism//lib/prism/node.rb#14685 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: Prism::node? # - # source://prism//lib/prism/node.rb#15661 + # source://prism//lib/prism/node.rb#14720 sig { returns(T.nilable(Prism::Node)) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15631 + # source://prism//lib/prism/node.rb#14690 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#15683 + # source://prism//lib/prism/node.rb#14742 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#15671 + # source://prism//lib/prism/node.rb#14730 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15643 + # source://prism//lib/prism/node.rb#14702 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15636 + # source://prism//lib/prism/node.rb#14695 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?body: Prism::node?, ?opening_loc: Location, ?closing_loc: Location, ?location: Location) -> ParenthesesNode # - # source://prism//lib/prism/node.rb#15648 + # source://prism//lib/prism/node.rb#14707 sig do params( body: T.nilable(Prism::Node), @@ -25340,40 +26365,40 @@ class Prism::ParenthesesNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15631 + # source://prism//lib/prism/node.rb#14690 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { body: Prism::node?, opening_loc: Location, closing_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#15656 + # source://prism//lib/prism/node.rb#14715 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#15688 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#14747 + sig { override.returns(String) } + def inspect; end + + # source://prism//lib/prism/parse_result/newlines.rb#85 + def newline!(lines); end # def opening: () -> String # - # source://prism//lib/prism/node.rb#15678 + # source://prism//lib/prism/node.rb#14737 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#15664 + # source://prism//lib/prism/node.rb#14723 sig { returns(Prism::Location) } def opening_loc; end - # source://prism//lib/prism/node.rb#15626 - def set_newline_flag(newline_marked); end - # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a @@ -25389,7 +26414,7 @@ class Prism::ParenthesesNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#15715 + # source://prism//lib/prism/node.rb#14765 sig { override.returns(Symbol) } def type; end @@ -25401,70 +26426,70 @@ class Prism::ParenthesesNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#15725 + # source://prism//lib/prism/node.rb#14775 def type; end end end # This represents an error that was encountered during parsing. # -# source://prism//lib/prism/parse_result.rb#373 +# source://prism//lib/prism/parse_result.rb#451 class Prism::ParseError # Create a new error object with the given message and location. # # @return [ParseError] a new instance of ParseError # - # source://prism//lib/prism/parse_result.rb#388 + # source://prism//lib/prism/parse_result.rb#466 sig { params(type: Symbol, message: String, location: Prism::Location, level: Symbol).void } def initialize(type, message, location, level); end # Implement the hash pattern matching interface for ParseError. # - # source://prism//lib/prism/parse_result.rb#396 + # source://prism//lib/prism/parse_result.rb#474 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # Returns a string representation of this error. # - # source://prism//lib/prism/parse_result.rb#401 + # source://prism//lib/prism/parse_result.rb#479 sig { returns(String) } def inspect; end # The level of this error. # - # source://prism//lib/prism/parse_result.rb#385 + # source://prism//lib/prism/parse_result.rb#463 sig { returns(Symbol) } def level; end # A Location object representing the location of this error in the source. # - # source://prism//lib/prism/parse_result.rb#382 + # source://prism//lib/prism/parse_result.rb#460 sig { returns(Prism::Location) } def location; end # The message associated with this error. # - # source://prism//lib/prism/parse_result.rb#379 + # source://prism//lib/prism/parse_result.rb#457 sig { returns(String) } def message; end # The type of error. This is an _internal_ symbol that is used for # communicating with translation layers. It is not meant to be public API. # - # source://prism//lib/prism/parse_result.rb#376 + # source://prism//lib/prism/parse_result.rb#454 sig { returns(Symbol) } def type; end end # This is a result specific to the `parse_lex` and `parse_lex_file` methods. # -# source://prism//lib/prism/parse_result.rb#532 +# source://prism//lib/prism/parse_result.rb#627 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#538 + # source://prism//lib/prism/parse_result.rb#633 sig do params( value: [Prism::ProgramNode, T::Array[T.untyped]], @@ -25480,27 +26505,27 @@ class Prism::ParseLexResult < ::Prism::Result # Implement the hash pattern matching interface for ParseLexResult. # - # source://prism//lib/prism/parse_result.rb#544 + # source://prism//lib/prism/parse_result.rb#639 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#535 + # source://prism//lib/prism/parse_result.rb#630 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#498 +# source://prism//lib/prism/parse_result.rb#576 class Prism::ParseResult < ::Prism::Result # Create a new parse result object with the given values. # # @return [ParseResult] a new instance of ParseResult # - # source://prism//lib/prism/parse_result.rb#503 + # source://prism//lib/prism/parse_result.rb#587 sig do params( value: Prism::ProgramNode, @@ -25516,23 +26541,24 @@ class Prism::ParseResult < ::Prism::Result # Attach the list of comments to their respective locations in the tree. # - # source://prism//lib/prism/parse_result/comments.rb#190 + # source://prism//lib/prism/parse_result.rb#598 def attach_comments!; end # Implement the hash pattern matching interface for ParseResult. # - # source://prism//lib/prism/parse_result.rb#509 + # source://prism//lib/prism/parse_result.rb#593 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # Walk the tree and mark nodes that are on a new line. + # 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/newlines.rb#60 + # source://prism//lib/prism/parse_result.rb#604 def mark_newlines!; end # The syntax tree that was parsed from the source code. # - # source://prism//lib/prism/parse_result.rb#500 + # source://prism//lib/prism/parse_result.rb#584 sig { returns(Prism::ProgramNode) } def value; end end @@ -25660,87 +26686,92 @@ end # MarkNewlinesVisitor, since that visitor is responsible for marking the # newlines for JRuby/TruffleRuby. # -# source://prism//lib/prism/parse_result/newlines.rb#20 +# 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#22 - def initialize(newline_marked); end + # 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#27 + # 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#41 + # 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#27 + # 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#49 + # 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#41 + # 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#407 +# source://prism//lib/prism/parse_result.rb#485 class Prism::ParseWarning # Create a new warning object with the given message and location. # # @return [ParseWarning] a new instance of ParseWarning # - # source://prism//lib/prism/parse_result.rb#422 + # source://prism//lib/prism/parse_result.rb#500 sig { params(type: Symbol, message: String, location: Prism::Location, level: Symbol).void } def initialize(type, message, location, level); end # Implement the hash pattern matching interface for ParseWarning. # - # source://prism//lib/prism/parse_result.rb#430 + # source://prism//lib/prism/parse_result.rb#508 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # Returns a string representation of this warning. # - # source://prism//lib/prism/parse_result.rb#435 + # source://prism//lib/prism/parse_result.rb#513 sig { returns(String) } def inspect; end # The level of this warning. # - # source://prism//lib/prism/parse_result.rb#419 + # source://prism//lib/prism/parse_result.rb#497 sig { returns(Symbol) } def level; end # A Location object representing the location of this warning in the source. # - # source://prism//lib/prism/parse_result.rb#416 + # source://prism//lib/prism/parse_result.rb#494 sig { returns(Prism::Location) } def location; end # The message associated with this warning. # - # source://prism//lib/prism/parse_result.rb#413 + # source://prism//lib/prism/parse_result.rb#491 sig { returns(String) } def message; end # The type of warning. This is an _internal_ symbol that is used for # communicating with translation layers. It is not meant to be public API. # - # source://prism//lib/prism/parse_result.rb#410 + # source://prism//lib/prism/parse_result.rb#488 sig { returns(Symbol) } def type; end end @@ -25834,6 +26865,11 @@ class Prism::Pattern # 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 @@ -25842,7 +26878,7 @@ class Prism::Pattern # in ConstantReadNode # in String # - # source://prism//lib/prism/pattern.rb#160 + # source://prism//lib/prism/pattern.rb#163 def compile_constant_read_node(node); end # Raise an error because the given node is not supported. @@ -25855,35 +26891,35 @@ class Prism::Pattern # in InstanceVariableReadNode[name: Symbol] # in { name: Symbol } # - # source://prism//lib/prism/pattern.rb#178 + # source://prism//lib/prism/pattern.rb#184 def compile_hash_pattern_node(node); end # in nil # - # source://prism//lib/prism/pattern.rb#208 + # 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#237 + # source://prism//lib/prism/pattern.rb#243 def compile_node(node); end # in /foo/ # - # source://prism//lib/prism/pattern.rb#213 + # source://prism//lib/prism/pattern.rb#219 def compile_regular_expression_node(node); end # in "" # in "foo" # - # source://prism//lib/prism/pattern.rb#221 + # source://prism//lib/prism/pattern.rb#227 def compile_string_node(node); end # in :+ # in :foo # - # source://prism//lib/prism/pattern.rb#229 + # source://prism//lib/prism/pattern.rb#235 def compile_symbol_node(node); end end @@ -25906,13 +26942,13 @@ end # foo in ^(bar) # ^^^^^^ # -# source://prism//lib/prism/node.rb#15743 +# source://prism//lib/prism/node.rb#14793 class Prism::PinnedExpressionNode < ::Prism::Node # def initialize: (Prism::node expression, Location operator_loc, Location lparen_loc, Location rparen_loc, Location location) -> void # # @return [PinnedExpressionNode] a new instance of PinnedExpressionNode # - # source://prism//lib/prism/node.rb#15745 + # source://prism//lib/prism/node.rb#14795 sig do params( source: Prism::Source, @@ -25928,36 +26964,36 @@ class Prism::PinnedExpressionNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#15868 + # source://prism//lib/prism/node.rb#14911 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15756 + # source://prism//lib/prism/node.rb#14805 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#15761 + # source://prism//lib/prism/node.rb#14810 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15771 + # source://prism//lib/prism/node.rb#14820 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15766 + # source://prism//lib/prism/node.rb#14815 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?expression: Prism::node, ?operator_loc: Location, ?lparen_loc: Location, ?rparen_loc: Location, ?location: Location) -> PinnedExpressionNode # - # source://prism//lib/prism/node.rb#15776 + # source://prism//lib/prism/node.rb#14825 sig do params( expression: Prism::Node, @@ -25972,64 +27008,64 @@ class Prism::PinnedExpressionNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15761 + # source://prism//lib/prism/node.rb#14810 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { expression: Prism::node, operator_loc: Location, lparen_loc: Location, rparen_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#15784 + # source://prism//lib/prism/node.rb#14833 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#15789 + # source://prism//lib/prism/node.rb#14838 sig { returns(Prism::Node) } def expression; end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#15828 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#14877 + sig { override.returns(String) } + def inspect; end # def lparen: () -> String # - # source://prism//lib/prism/node.rb#15818 + # source://prism//lib/prism/node.rb#14867 sig { returns(String) } def lparen; end # attr_reader lparen_loc: Location # - # source://prism//lib/prism/node.rb#15799 + # source://prism//lib/prism/node.rb#14848 sig { returns(Prism::Location) } def lparen_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#15813 + # source://prism//lib/prism/node.rb#14862 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#15792 + # source://prism//lib/prism/node.rb#14841 sig { returns(Prism::Location) } def operator_loc; end # def rparen: () -> String # - # source://prism//lib/prism/node.rb#15823 + # source://prism//lib/prism/node.rb#14872 sig { returns(String) } def rparen; end # attr_reader rparen_loc: Location # - # source://prism//lib/prism/node.rb#15806 + # source://prism//lib/prism/node.rb#14855 sig { returns(Prism::Location) } def rparen_loc; end @@ -26048,7 +27084,7 @@ class Prism::PinnedExpressionNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#15852 + # source://prism//lib/prism/node.rb#14895 sig { override.returns(Symbol) } def type; end @@ -26060,7 +27096,7 @@ class Prism::PinnedExpressionNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#15862 + # source://prism//lib/prism/node.rb#14905 def type; end end end @@ -26070,13 +27106,13 @@ end # foo in ^bar # ^^^^ # -# source://prism//lib/prism/node.rb#15881 +# source://prism//lib/prism/node.rb#14924 class Prism::PinnedVariableNode < ::Prism::Node # def initialize: (Prism::node variable, Location operator_loc, Location location) -> void # # @return [PinnedVariableNode] a new instance of PinnedVariableNode # - # source://prism//lib/prism/node.rb#15883 + # source://prism//lib/prism/node.rb#14926 sig do params( source: Prism::Source, @@ -26090,36 +27126,36 @@ class Prism::PinnedVariableNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#15978 + # source://prism//lib/prism/node.rb#15016 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15892 + # source://prism//lib/prism/node.rb#14934 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#15897 + # source://prism//lib/prism/node.rb#14939 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15907 + # source://prism//lib/prism/node.rb#14949 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15902 + # source://prism//lib/prism/node.rb#14944 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?variable: Prism::node, ?operator_loc: Location, ?location: Location) -> PinnedVariableNode # - # source://prism//lib/prism/node.rb#15912 + # source://prism//lib/prism/node.rb#14954 sig do params( variable: Prism::Node, @@ -26132,34 +27168,34 @@ class Prism::PinnedVariableNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15897 + # source://prism//lib/prism/node.rb#14939 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { variable: Prism::node, operator_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#15920 + # source://prism//lib/prism/node.rb#14962 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#15940 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#14982 + sig { override.returns(String) } + def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#15935 + # source://prism//lib/prism/node.rb#14977 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#15928 + # source://prism//lib/prism/node.rb#14970 sig { returns(Prism::Location) } def operator_loc; end @@ -26178,13 +27214,13 @@ class Prism::PinnedVariableNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#15962 + # source://prism//lib/prism/node.rb#15000 sig { override.returns(Symbol) } def type; end # attr_reader variable: Prism::node # - # source://prism//lib/prism/node.rb#15925 + # source://prism//lib/prism/node.rb#14967 sig { returns(Prism::Node) } def variable; end @@ -26196,7 +27232,7 @@ class Prism::PinnedVariableNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#15972 + # source://prism//lib/prism/node.rb#15010 def type; end end end @@ -26206,13 +27242,13 @@ end # END { foo } # ^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#15989 +# source://prism//lib/prism/node.rb#15027 class Prism::PostExecutionNode < ::Prism::Node # def initialize: (StatementsNode? statements, Location keyword_loc, Location opening_loc, Location closing_loc, Location location) -> void # # @return [PostExecutionNode] a new instance of PostExecutionNode # - # source://prism//lib/prism/node.rb#15991 + # source://prism//lib/prism/node.rb#15029 sig do params( source: Prism::Source, @@ -26228,48 +27264,48 @@ class Prism::PostExecutionNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#16120 + # source://prism//lib/prism/node.rb#15147 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16002 + # source://prism//lib/prism/node.rb#15039 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#16007 + # source://prism//lib/prism/node.rb#15044 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#16071 + # source://prism//lib/prism/node.rb#15108 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#16054 + # source://prism//lib/prism/node.rb#15091 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16019 + # source://prism//lib/prism/node.rb#15056 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16012 + # source://prism//lib/prism/node.rb#15049 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?statements: StatementsNode?, ?keyword_loc: Location, ?opening_loc: Location, ?closing_loc: Location, ?location: Location) -> PostExecutionNode # - # source://prism//lib/prism/node.rb#16024 + # source://prism//lib/prism/node.rb#15061 sig do params( statements: T.nilable(Prism::StatementsNode), @@ -26284,52 +27320,52 @@ class Prism::PostExecutionNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16007 + # source://prism//lib/prism/node.rb#15044 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#16032 + # source://prism//lib/prism/node.rb#15069 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#16076 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#15113 + sig { override.returns(String) } + def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#16061 + # source://prism//lib/prism/node.rb#15098 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#16040 + # source://prism//lib/prism/node.rb#15077 sig { returns(Prism::Location) } def keyword_loc; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#16066 + # source://prism//lib/prism/node.rb#15103 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#16047 + # source://prism//lib/prism/node.rb#15084 sig { returns(Prism::Location) } def opening_loc; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#16037 + # source://prism//lib/prism/node.rb#15074 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -26348,7 +27384,7 @@ class Prism::PostExecutionNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#16104 + # source://prism//lib/prism/node.rb#15131 sig { override.returns(Symbol) } def type; end @@ -26360,7 +27396,7 @@ class Prism::PostExecutionNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#16114 + # source://prism//lib/prism/node.rb#15141 def type; end end end @@ -26370,13 +27406,13 @@ end # BEGIN { foo } # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#16133 +# source://prism//lib/prism/node.rb#15160 class Prism::PreExecutionNode < ::Prism::Node # def initialize: (StatementsNode? statements, Location keyword_loc, Location opening_loc, Location closing_loc, Location location) -> void # # @return [PreExecutionNode] a new instance of PreExecutionNode # - # source://prism//lib/prism/node.rb#16135 + # source://prism//lib/prism/node.rb#15162 sig do params( source: Prism::Source, @@ -26392,48 +27428,48 @@ class Prism::PreExecutionNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#16264 + # source://prism//lib/prism/node.rb#15280 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16146 + # source://prism//lib/prism/node.rb#15172 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#16151 + # source://prism//lib/prism/node.rb#15177 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#16215 + # source://prism//lib/prism/node.rb#15241 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#16198 + # source://prism//lib/prism/node.rb#15224 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16163 + # source://prism//lib/prism/node.rb#15189 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16156 + # source://prism//lib/prism/node.rb#15182 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?statements: StatementsNode?, ?keyword_loc: Location, ?opening_loc: Location, ?closing_loc: Location, ?location: Location) -> PreExecutionNode # - # source://prism//lib/prism/node.rb#16168 + # source://prism//lib/prism/node.rb#15194 sig do params( statements: T.nilable(Prism::StatementsNode), @@ -26448,52 +27484,52 @@ class Prism::PreExecutionNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16151 + # source://prism//lib/prism/node.rb#15177 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#16176 + # source://prism//lib/prism/node.rb#15202 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#16220 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#15246 + sig { override.returns(String) } + def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#16205 + # source://prism//lib/prism/node.rb#15231 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#16184 + # source://prism//lib/prism/node.rb#15210 sig { returns(Prism::Location) } def keyword_loc; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#16210 + # source://prism//lib/prism/node.rb#15236 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#16191 + # source://prism//lib/prism/node.rb#15217 sig { returns(Prism::Location) } def opening_loc; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#16181 + # source://prism//lib/prism/node.rb#15207 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -26512,7 +27548,7 @@ class Prism::PreExecutionNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#16248 + # source://prism//lib/prism/node.rb#15264 sig { override.returns(Symbol) } def type; end @@ -26524,20 +27560,20 @@ class Prism::PreExecutionNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#16258 + # source://prism//lib/prism/node.rb#15274 def type; end end end # The top level node of any parse tree. # -# source://prism//lib/prism/node.rb#16274 +# source://prism//lib/prism/node.rb#15290 class Prism::ProgramNode < ::Prism::Node # def initialize: (Array[Symbol] locals, StatementsNode statements, Location location) -> void # # @return [ProgramNode] a new instance of ProgramNode # - # source://prism//lib/prism/node.rb#16276 + # source://prism//lib/prism/node.rb#15292 sig do params( source: Prism::Source, @@ -26551,36 +27587,36 @@ class Prism::ProgramNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#16362 + # source://prism//lib/prism/node.rb#15373 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16285 + # source://prism//lib/prism/node.rb#15300 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#16290 + # source://prism//lib/prism/node.rb#15305 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16300 + # source://prism//lib/prism/node.rb#15315 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16295 + # source://prism//lib/prism/node.rb#15310 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?locals: Array[Symbol], ?statements: StatementsNode, ?location: Location) -> ProgramNode # - # source://prism//lib/prism/node.rb#16305 + # source://prism//lib/prism/node.rb#15320 sig do params( locals: T::Array[Symbol], @@ -26593,34 +27629,34 @@ class Prism::ProgramNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16290 + # source://prism//lib/prism/node.rb#15305 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], statements: StatementsNode, location: Location } # - # source://prism//lib/prism/node.rb#16313 + # source://prism//lib/prism/node.rb#15328 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#16324 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#15339 + sig { override.returns(String) } + def inspect; end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#16318 + # source://prism//lib/prism/node.rb#15333 sig { returns(T::Array[Symbol]) } def locals; end # attr_reader statements: StatementsNode # - # source://prism//lib/prism/node.rb#16321 + # source://prism//lib/prism/node.rb#15336 sig { returns(Prism::StatementsNode) } def statements; end @@ -26639,7 +27675,7 @@ class Prism::ProgramNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#16346 + # source://prism//lib/prism/node.rb#15357 sig { override.returns(Symbol) } def type; end @@ -26651,19 +27687,19 @@ class Prism::ProgramNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#16356 + # source://prism//lib/prism/node.rb#15367 def type; end end end # Flags for range and flip-flop nodes. # -# source://prism//lib/prism/node.rb#20415 +# source://prism//lib/prism/node.rb#19208 module Prism::RangeFlags; end # ... operator # -# source://prism//lib/prism/node.rb#20417 +# source://prism//lib/prism/node.rb#19210 Prism::RangeFlags::EXCLUDE_END = T.let(T.unsafe(nil), Integer) # Represents the use of the `..` or `...` operators. @@ -26674,13 +27710,13 @@ Prism::RangeFlags::EXCLUDE_END = T.let(T.unsafe(nil), Integer) # c if a =~ /left/ ... b =~ /right/ # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#16377 +# source://prism//lib/prism/node.rb#15388 class Prism::RangeNode < ::Prism::Node # def initialize: (Integer flags, Prism::node? left, Prism::node? right, Location operator_loc, Location location) -> void # # @return [RangeNode] a new instance of RangeNode # - # source://prism//lib/prism/node.rb#16379 + # source://prism//lib/prism/node.rb#15390 sig do params( source: Prism::Source, @@ -26696,36 +27732,36 @@ class Prism::RangeNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#16516 + # source://prism//lib/prism/node.rb#15510 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16390 + # source://prism//lib/prism/node.rb#15400 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#16395 + # source://prism//lib/prism/node.rb#15405 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16408 + # source://prism//lib/prism/node.rb#15418 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16400 + # source://prism//lib/prism/node.rb#15410 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?left: Prism::node?, ?right: Prism::node?, ?operator_loc: Location, ?location: Location) -> RangeNode # - # source://prism//lib/prism/node.rb#16413 + # source://prism//lib/prism/node.rb#15423 sig do params( flags: Integer, @@ -26740,13 +27776,13 @@ class Prism::RangeNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16395 + # source://prism//lib/prism/node.rb#15405 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, left: Prism::node?, right: Prism::node?, operator_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#16421 + # source://prism//lib/prism/node.rb#15431 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -26754,18 +27790,18 @@ class Prism::RangeNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16456 + # source://prism//lib/prism/node.rb#15466 sig { returns(T::Boolean) } def exclude_end?; end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#16466 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#15476 + 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). # @@ -26775,19 +27811,19 @@ class Prism::RangeNode < ::Prism::Node # hello...goodbye # ^^^^^ # - # source://prism//lib/prism/node.rb#16436 + # source://prism//lib/prism/node.rb#15446 sig { returns(T.nilable(Prism::Node)) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#16461 + # source://prism//lib/prism/node.rb#15471 sig { returns(String) } def operator; end # The location of the `..` or `...` operator. # - # source://prism//lib/prism/node.rb#16449 + # source://prism//lib/prism/node.rb#15459 sig { returns(Prism::Location) } def operator_loc; end @@ -26800,7 +27836,7 @@ class Prism::RangeNode < ::Prism::Node # ^^^ # If neither right-hand or left-hand side was included, this will be a MissingNode. # - # source://prism//lib/prism/node.rb#16446 + # source://prism//lib/prism/node.rb#15456 sig { returns(T.nilable(Prism::Node)) } def right; end @@ -26819,7 +27855,7 @@ class Prism::RangeNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#16500 + # source://prism//lib/prism/node.rb#15494 sig { override.returns(Symbol) } def type; end @@ -26827,7 +27863,7 @@ class Prism::RangeNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#16426 + # source://prism//lib/prism/node.rb#15436 sig { returns(Integer) } def flags; end @@ -26839,7 +27875,7 @@ class Prism::RangeNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#16510 + # source://prism//lib/prism/node.rb#15504 def type; end end end @@ -26849,80 +27885,143 @@ end # 1.0r # ^^^^ # -# source://prism//lib/prism/node.rb#16529 +# source://prism//lib/prism/node.rb#15523 class Prism::RationalNode < ::Prism::Node - # def initialize: (Prism::node numeric, Location location) -> void + # def initialize: (Integer flags, Integer numerator, Integer denominator, Location location) -> void # # @return [RationalNode] a new instance of RationalNode # - # source://prism//lib/prism/node.rb#16531 - sig { params(source: Prism::Source, numeric: Prism::Node, location: Prism::Location).void } - def initialize(source, numeric, location); end + # source://prism//lib/prism/node.rb#15525 + sig do + params( + source: Prism::Source, + flags: Integer, + numerator: Integer, + denominator: Integer, + location: Prism::Location + ).void + end + def initialize(source, flags, numerator, denominator, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#16612 + # source://prism//lib/prism/node.rb#15635 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16539 + # source://prism//lib/prism/node.rb#15534 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end + # def binary?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15581 + sig { returns(T::Boolean) } + def binary?; end + # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16544 + # source://prism//lib/prism/node.rb#15539 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16554 + # source://prism//lib/prism/node.rb#15549 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16549 + # source://prism//lib/prism/node.rb#15544 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?numeric: Prism::node, ?location: Location) -> RationalNode + # def copy: (?flags: Integer, ?numerator: Integer, ?denominator: Integer, ?location: Location) -> RationalNode # - # source://prism//lib/prism/node.rb#16559 - sig { params(numeric: Prism::Node, location: Prism::Location).returns(Prism::RationalNode) } - def copy(numeric: T.unsafe(nil), location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#15554 + sig do + params( + flags: Integer, + numerator: Integer, + denominator: Integer, + location: Prism::Location + ).returns(Prism::RationalNode) + end + def copy(flags: T.unsafe(nil), numerator: T.unsafe(nil), denominator: T.unsafe(nil), location: T.unsafe(nil)); end + + # def decimal?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15586 + sig { returns(T::Boolean) } + def decimal?; end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16544 + # source://prism//lib/prism/node.rb#15539 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { numeric: Prism::node, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, numerator: Integer, denominator: Integer, location: Location } # - # source://prism//lib/prism/node.rb#16567 + # source://prism//lib/prism/node.rb#15562 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#15578 + sig { returns(Integer) } + def denominator; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(NodeInspector inspector) -> String + # def hexadecimal?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15596 + sig { returns(T::Boolean) } + def hexadecimal?; end + + # def inspect -> String # - # source://prism//lib/prism/node.rb#16575 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#15601 + sig { override.returns(String) } + def inspect; end - # attr_reader numeric: Prism::node + # The numerator of the rational number. # - # source://prism//lib/prism/node.rb#16572 - sig { returns(Prism::Node) } + # 1.5r # numerator 3 + # + # source://prism//lib/prism/node.rb#15573 + 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#114 def numeric; end + # def octal?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15591 + sig { returns(T::Boolean) } + def octal?; end + # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a @@ -26938,16 +28037,24 @@ class Prism::RationalNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#16596 + # source://prism//lib/prism/node.rb#15619 sig { override.returns(Symbol) } def type; end # Returns the value of the node as a Ruby Rational. # - # source://prism//lib/prism/node_ext.rb#94 + # source://prism//lib/prism/node_ext.rb#108 sig { returns(Rational) } def value; end + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#15567 + sig { returns(Integer) } + def flags; end + class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. @@ -26956,7 +28063,7 @@ class Prism::RationalNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#16606 + # source://prism//lib/prism/node.rb#15629 def type; end end end @@ -26966,73 +28073,73 @@ end # redo # ^^^^ # -# source://prism//lib/prism/node.rb#16622 +# source://prism//lib/prism/node.rb#15647 class Prism::RedoNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [RedoNode] a new instance of RedoNode # - # source://prism//lib/prism/node.rb#16624 + # source://prism//lib/prism/node.rb#15649 sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#16699 + # source://prism//lib/prism/node.rb#15722 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16631 + # source://prism//lib/prism/node.rb#15655 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#16636 + # source://prism//lib/prism/node.rb#15660 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16646 + # source://prism//lib/prism/node.rb#15670 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16641 + # source://prism//lib/prism/node.rb#15665 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?location: Location) -> RedoNode # - # source://prism//lib/prism/node.rb#16651 + # source://prism//lib/prism/node.rb#15675 sig { params(location: Prism::Location).returns(Prism::RedoNode) } def copy(location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16636 + # source://prism//lib/prism/node.rb#15660 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } # - # source://prism//lib/prism/node.rb#16659 + # source://prism//lib/prism/node.rb#15683 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#16664 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#15688 + sig { override.returns(String) } + def inspect; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by @@ -27049,7 +28156,7 @@ class Prism::RedoNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#16683 + # source://prism//lib/prism/node.rb#15706 sig { override.returns(Symbol) } def type; end @@ -27061,7 +28168,7 @@ class Prism::RedoNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#16693 + # source://prism//lib/prism/node.rb#15716 def type; end end end @@ -27198,62 +28305,62 @@ class Prism::Reflection::StringField < ::Prism::Reflection::Field; end # Flags for regular expression and match last line nodes. # -# source://prism//lib/prism/node.rb#20421 +# source://prism//lib/prism/node.rb#19214 module Prism::RegularExpressionFlags; end # n - forces the ASCII-8BIT encoding # -# source://prism//lib/prism/node.rb#20438 +# source://prism//lib/prism/node.rb#19231 Prism::RegularExpressionFlags::ASCII_8BIT = T.let(T.unsafe(nil), Integer) # e - forces the EUC-JP encoding # -# source://prism//lib/prism/node.rb#20435 +# source://prism//lib/prism/node.rb#19228 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#20426 +# source://prism//lib/prism/node.rb#19219 Prism::RegularExpressionFlags::EXTENDED = T.let(T.unsafe(nil), Integer) # internal bytes forced the encoding to binary # -# source://prism//lib/prism/node.rb#20450 +# source://prism//lib/prism/node.rb#19243 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#20453 +# source://prism//lib/prism/node.rb#19246 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#20447 +# source://prism//lib/prism/node.rb#19240 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#20423 +# source://prism//lib/prism/node.rb#19216 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#20429 +# source://prism//lib/prism/node.rb#19222 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#20432 +# source://prism//lib/prism/node.rb#19225 Prism::RegularExpressionFlags::ONCE = T.let(T.unsafe(nil), Integer) # u - forces the UTF-8 encoding # -# source://prism//lib/prism/node.rb#20444 +# source://prism//lib/prism/node.rb#19237 Prism::RegularExpressionFlags::UTF_8 = T.let(T.unsafe(nil), Integer) # s - forces the Windows-31J encoding # -# source://prism//lib/prism/node.rb#20441 +# source://prism//lib/prism/node.rb#19234 Prism::RegularExpressionFlags::WINDOWS_31J = T.let(T.unsafe(nil), Integer) # Represents a regular expression literal with no interpolation. @@ -27261,7 +28368,7 @@ Prism::RegularExpressionFlags::WINDOWS_31J = T.let(T.unsafe(nil), Integer) # /foo/i # ^^^^^^ # -# source://prism//lib/prism/node.rb#16708 +# source://prism//lib/prism/node.rb#15731 class Prism::RegularExpressionNode < ::Prism::Node include ::Prism::RegularExpressionOptions @@ -27269,7 +28376,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [RegularExpressionNode] a new instance of RegularExpressionNode # - # source://prism//lib/prism/node.rb#16710 + # source://prism//lib/prism/node.rb#15733 sig do params( source: Prism::Source, @@ -27286,12 +28393,12 @@ class Prism::RegularExpressionNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#16894 + # source://prism//lib/prism/node.rb#15909 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16722 + # source://prism//lib/prism/node.rb#15744 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -27299,55 +28406,55 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16808 + # source://prism//lib/prism/node.rb#15830 sig { returns(T::Boolean) } def ascii_8bit?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16727 + # source://prism//lib/prism/node.rb#15749 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#16848 + # source://prism//lib/prism/node.rb#15870 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#16773 + # source://prism//lib/prism/node.rb#15795 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16737 + # source://prism//lib/prism/node.rb#15759 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16732 + # source://prism//lib/prism/node.rb#15754 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def content: () -> String # - # source://prism//lib/prism/node.rb#16843 + # source://prism//lib/prism/node.rb#15865 sig { returns(String) } def content; end # attr_reader content_loc: Location # - # source://prism//lib/prism/node.rb#16766 + # source://prism//lib/prism/node.rb#15788 sig { returns(Prism::Location) } def content_loc; end # def copy: (?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String, ?location: Location) -> RegularExpressionNode # - # source://prism//lib/prism/node.rb#16742 + # source://prism//lib/prism/node.rb#15764 sig do params( flags: Integer, @@ -27363,13 +28470,13 @@ class Prism::RegularExpressionNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16727 + # source://prism//lib/prism/node.rb#15749 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location } # - # source://prism//lib/prism/node.rb#16750 + # source://prism//lib/prism/node.rb#15772 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -27377,7 +28484,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16803 + # source://prism//lib/prism/node.rb#15825 sig { returns(T::Boolean) } def euc_jp?; end @@ -27385,7 +28492,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16788 + # source://prism//lib/prism/node.rb#15810 sig { returns(T::Boolean) } def extended?; end @@ -27396,7 +28503,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16828 + # source://prism//lib/prism/node.rb#15850 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -27404,7 +28511,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16833 + # source://prism//lib/prism/node.rb#15855 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end @@ -27412,7 +28519,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16823 + # source://prism//lib/prism/node.rb#15845 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -27420,21 +28527,21 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16783 + # source://prism//lib/prism/node.rb#15805 sig { returns(T::Boolean) } def ignore_case?; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#16853 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#15875 + sig { override.returns(String) } + def inspect; end # def multi_line?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16793 + # source://prism//lib/prism/node.rb#15815 sig { returns(T::Boolean) } def multi_line?; end @@ -27442,19 +28549,19 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16798 + # source://prism//lib/prism/node.rb#15820 sig { returns(T::Boolean) } def once?; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#16838 + # source://prism//lib/prism/node.rb#15860 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#16759 + # source://prism//lib/prism/node.rb#15781 sig { returns(Prism::Location) } def opening_loc; end @@ -27476,13 +28583,13 @@ class Prism::RegularExpressionNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#16878 + # source://prism//lib/prism/node.rb#15893 sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#16780 + # source://prism//lib/prism/node.rb#15802 sig { returns(String) } def unescaped; end @@ -27490,7 +28597,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16818 + # source://prism//lib/prism/node.rb#15840 sig { returns(T::Boolean) } def utf_8?; end @@ -27498,7 +28605,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16813 + # source://prism//lib/prism/node.rb#15835 sig { returns(T::Boolean) } def windows_31j?; end @@ -27506,7 +28613,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#16755 + # source://prism//lib/prism/node.rb#15777 sig { returns(Integer) } def flags; end @@ -27518,17 +28625,17 @@ class Prism::RegularExpressionNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#16888 + # source://prism//lib/prism/node.rb#15903 def type; end end end -# source://prism//lib/prism/node_ext.rb#6 +# 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#9 + # source://prism//lib/prism/node_ext.rb#23 def options; end end @@ -27538,13 +28645,13 @@ end # ^^ # end # -# source://prism//lib/prism/node.rb#16909 +# source://prism//lib/prism/node.rb#15924 class Prism::RequiredKeywordParameterNode < ::Prism::Node # def initialize: (Integer flags, Symbol name, Location name_loc, Location location) -> void # # @return [RequiredKeywordParameterNode] a new instance of RequiredKeywordParameterNode # - # source://prism//lib/prism/node.rb#16911 + # source://prism//lib/prism/node.rb#15926 sig do params( source: Prism::Source, @@ -27559,36 +28666,36 @@ class Prism::RequiredKeywordParameterNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#17012 + # source://prism//lib/prism/node.rb#16021 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16921 + # source://prism//lib/prism/node.rb#15935 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#16926 + # source://prism//lib/prism/node.rb#15940 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16936 + # source://prism//lib/prism/node.rb#15950 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16931 + # source://prism//lib/prism/node.rb#15945 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?name: Symbol, ?name_loc: Location, ?location: Location) -> RequiredKeywordParameterNode # - # source://prism//lib/prism/node.rb#16941 + # source://prism//lib/prism/node.rb#15955 sig do params( flags: Integer, @@ -27602,34 +28709,34 @@ class Prism::RequiredKeywordParameterNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16926 + # source://prism//lib/prism/node.rb#15940 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, name_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#16949 + # source://prism//lib/prism/node.rb#15963 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#16973 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#15987 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#16958 + # source://prism//lib/prism/node.rb#15972 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#16961 + # source://prism//lib/prism/node.rb#15975 sig { returns(Prism::Location) } def name_loc; end @@ -27637,7 +28744,7 @@ class Prism::RequiredKeywordParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16968 + # source://prism//lib/prism/node.rb#15982 sig { returns(T::Boolean) } def repeated_parameter?; end @@ -27656,7 +28763,7 @@ class Prism::RequiredKeywordParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#16996 + # source://prism//lib/prism/node.rb#16005 sig { override.returns(Symbol) } def type; end @@ -27664,7 +28771,7 @@ class Prism::RequiredKeywordParameterNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#16954 + # source://prism//lib/prism/node.rb#15968 sig { returns(Integer) } def flags; end @@ -27676,7 +28783,7 @@ class Prism::RequiredKeywordParameterNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#17006 + # source://prism//lib/prism/node.rb#16015 def type; end end end @@ -27687,77 +28794,77 @@ end # ^ # end # -# source://prism//lib/prism/node.rb#17025 +# source://prism//lib/prism/node.rb#16034 class Prism::RequiredParameterNode < ::Prism::Node # def initialize: (Integer flags, Symbol name, Location location) -> void # # @return [RequiredParameterNode] a new instance of RequiredParameterNode # - # source://prism//lib/prism/node.rb#17027 + # source://prism//lib/prism/node.rb#16036 sig { params(source: Prism::Source, flags: Integer, name: Symbol, location: Prism::Location).void } def initialize(source, flags, name, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#17119 + # source://prism//lib/prism/node.rb#16123 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17036 + # source://prism//lib/prism/node.rb#16044 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#17041 + # source://prism//lib/prism/node.rb#16049 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17051 + # source://prism//lib/prism/node.rb#16059 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17046 + # source://prism//lib/prism/node.rb#16054 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?name: Symbol, ?location: Location) -> RequiredParameterNode # - # source://prism//lib/prism/node.rb#17056 + # source://prism//lib/prism/node.rb#16064 sig { params(flags: Integer, name: Symbol, location: Prism::Location).returns(Prism::RequiredParameterNode) } def copy(flags: T.unsafe(nil), name: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17041 + # source://prism//lib/prism/node.rb#16049 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, location: Location } # - # source://prism//lib/prism/node.rb#17064 + # source://prism//lib/prism/node.rb#16072 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#17081 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#16089 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#17073 + # source://prism//lib/prism/node.rb#16081 sig { returns(Symbol) } def name; end @@ -27765,7 +28872,7 @@ class Prism::RequiredParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#17076 + # source://prism//lib/prism/node.rb#16084 sig { returns(T::Boolean) } def repeated_parameter?; end @@ -27784,7 +28891,7 @@ class Prism::RequiredParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#17103 + # source://prism//lib/prism/node.rb#16107 sig { override.returns(Symbol) } def type; end @@ -27792,7 +28899,7 @@ class Prism::RequiredParameterNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#17069 + # source://prism//lib/prism/node.rb#16077 sig { returns(Integer) } def flags; end @@ -27804,7 +28911,7 @@ class Prism::RequiredParameterNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#17113 + # source://prism//lib/prism/node.rb#16117 def type; end end end @@ -27814,13 +28921,13 @@ end # foo rescue nil # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#17130 +# source://prism//lib/prism/node.rb#16134 class Prism::RescueModifierNode < ::Prism::Node # def initialize: (Prism::node expression, Location keyword_loc, Prism::node rescue_expression, Location location) -> void # # @return [RescueModifierNode] a new instance of RescueModifierNode # - # source://prism//lib/prism/node.rb#17132 + # source://prism//lib/prism/node.rb#16136 sig do params( source: Prism::Source, @@ -27835,36 +28942,36 @@ class Prism::RescueModifierNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#17237 + # source://prism//lib/prism/node.rb#16230 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17142 + # source://prism//lib/prism/node.rb#16145 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#17151 + # source://prism//lib/prism/node.rb#16150 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17161 + # source://prism//lib/prism/node.rb#16160 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17156 + # source://prism//lib/prism/node.rb#16155 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?expression: Prism::node, ?keyword_loc: Location, ?rescue_expression: Prism::node, ?location: Location) -> RescueModifierNode # - # source://prism//lib/prism/node.rb#17166 + # source://prism//lib/prism/node.rb#16165 sig do params( expression: Prism::Node, @@ -27878,52 +28985,52 @@ class Prism::RescueModifierNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17151 + # source://prism//lib/prism/node.rb#16150 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { expression: Prism::node, keyword_loc: Location, rescue_expression: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#17174 + # source://prism//lib/prism/node.rb#16173 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#17179 + # source://prism//lib/prism/node.rb#16178 sig { returns(Prism::Node) } def expression; end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#17197 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#16196 + sig { override.returns(String) } + def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#17192 + # source://prism//lib/prism/node.rb#16191 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#17182 + # source://prism//lib/prism/node.rb#16181 sig { returns(Prism::Location) } def keyword_loc; end + # source://prism//lib/prism/parse_result/newlines.rb#115 + def newline!(lines); end + # attr_reader rescue_expression: Prism::node # - # source://prism//lib/prism/node.rb#17189 + # source://prism//lib/prism/node.rb#16188 sig { returns(Prism::Node) } def rescue_expression; end - # source://prism//lib/prism/node.rb#17146 - def set_newline_flag(newline_marked); end - # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a @@ -27939,7 +29046,7 @@ class Prism::RescueModifierNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#17221 + # source://prism//lib/prism/node.rb#16214 sig { override.returns(Symbol) } def type; end @@ -27951,7 +29058,7 @@ class Prism::RescueModifierNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#17231 + # source://prism//lib/prism/node.rb#16224 def type; end end end @@ -27966,13 +29073,13 @@ end # # `Foo, *splat, Bar` are in the `exceptions` field. `ex` is in the `exception` field. # -# source://prism//lib/prism/node.rb#17254 +# source://prism//lib/prism/node.rb#16247 class Prism::RescueNode < ::Prism::Node # def initialize: (Location keyword_loc, Array[Prism::node] exceptions, Location? operator_loc, Prism::node? reference, StatementsNode? statements, RescueNode? consequent, Location location) -> void # # @return [RescueNode] a new instance of RescueNode # - # source://prism//lib/prism/node.rb#17256 + # source://prism//lib/prism/node.rb#16249 sig do params( source: Prism::Source, @@ -27990,42 +29097,42 @@ class Prism::RescueNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#17405 + # source://prism//lib/prism/node.rb#16375 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17269 + # source://prism//lib/prism/node.rb#16261 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#17274 + # source://prism//lib/prism/node.rb#16266 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17289 + # source://prism//lib/prism/node.rb#16281 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17279 + # source://prism//lib/prism/node.rb#16271 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader consequent: RescueNode? # - # source://prism//lib/prism/node.rb#17336 + # source://prism//lib/prism/node.rb#16328 sig { returns(T.nilable(Prism::RescueNode)) } def consequent; end # def copy: (?keyword_loc: Location, ?exceptions: Array[Prism::node], ?operator_loc: Location?, ?reference: Prism::node?, ?statements: StatementsNode?, ?consequent: RescueNode?, ?location: Location) -> RescueNode # - # source://prism//lib/prism/node.rb#17294 + # source://prism//lib/prism/node.rb#16286 sig do params( keyword_loc: Prism::Location, @@ -28042,64 +29149,64 @@ class Prism::RescueNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17274 + # source://prism//lib/prism/node.rb#16266 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, exceptions: Array[Prism::node], operator_loc: Location?, reference: Prism::node?, statements: StatementsNode?, consequent: RescueNode?, location: Location } # - # source://prism//lib/prism/node.rb#17302 + # source://prism//lib/prism/node.rb#16294 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#17314 + # source://prism//lib/prism/node.rb#16306 sig { returns(T::Array[Prism::Node]) } def exceptions; end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#17349 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#16341 + sig { override.returns(String) } + def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#17339 + # source://prism//lib/prism/node.rb#16331 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#17307 + # source://prism//lib/prism/node.rb#16299 sig { returns(Prism::Location) } def keyword_loc; end # def operator: () -> String? # - # source://prism//lib/prism/node.rb#17344 + # source://prism//lib/prism/node.rb#16336 sig { returns(T.nilable(String)) } def operator; end # attr_reader operator_loc: Location? # - # source://prism//lib/prism/node.rb#17317 + # source://prism//lib/prism/node.rb#16309 sig { returns(T.nilable(Prism::Location)) } def operator_loc; end # attr_reader reference: Prism::node? # - # source://prism//lib/prism/node.rb#17330 + # source://prism//lib/prism/node.rb#16322 sig { returns(T.nilable(Prism::Node)) } def reference; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#17333 + # source://prism//lib/prism/node.rb#16325 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -28118,7 +29225,7 @@ class Prism::RescueNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#17389 + # source://prism//lib/prism/node.rb#16359 sig { override.returns(Symbol) } def type; end @@ -28130,7 +29237,7 @@ class Prism::RescueNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#17399 + # source://prism//lib/prism/node.rb#16369 def type; end end end @@ -28141,13 +29248,13 @@ end # ^^ # end # -# source://prism//lib/prism/node.rb#17422 +# source://prism//lib/prism/node.rb#16392 class Prism::RestParameterNode < ::Prism::Node # def initialize: (Integer flags, Symbol? name, Location? name_loc, Location operator_loc, Location location) -> void # # @return [RestParameterNode] a new instance of RestParameterNode # - # source://prism//lib/prism/node.rb#17424 + # source://prism//lib/prism/node.rb#16394 sig do params( source: Prism::Source, @@ -28163,36 +29270,36 @@ class Prism::RestParameterNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#17549 + # source://prism//lib/prism/node.rb#16508 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17435 + # source://prism//lib/prism/node.rb#16404 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#17440 + # source://prism//lib/prism/node.rb#16409 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17450 + # source://prism//lib/prism/node.rb#16419 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17445 + # source://prism//lib/prism/node.rb#16414 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location, ?location: Location) -> RestParameterNode # - # source://prism//lib/prism/node.rb#17455 + # source://prism//lib/prism/node.rb#16424 sig do params( flags: Integer, @@ -28207,46 +29314,46 @@ class Prism::RestParameterNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17440 + # source://prism//lib/prism/node.rb#16409 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#17463 + # source://prism//lib/prism/node.rb#16432 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#17505 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#16474 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol? # - # source://prism//lib/prism/node.rb#17472 + # source://prism//lib/prism/node.rb#16441 sig { returns(T.nilable(Symbol)) } def name; end # attr_reader name_loc: Location? # - # source://prism//lib/prism/node.rb#17475 + # source://prism//lib/prism/node.rb#16444 sig { returns(T.nilable(Prism::Location)) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#17500 + # source://prism//lib/prism/node.rb#16469 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#17488 + # source://prism//lib/prism/node.rb#16457 sig { returns(Prism::Location) } def operator_loc; end @@ -28254,7 +29361,7 @@ class Prism::RestParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#17495 + # source://prism//lib/prism/node.rb#16464 sig { returns(T::Boolean) } def repeated_parameter?; end @@ -28273,7 +29380,7 @@ class Prism::RestParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#17533 + # source://prism//lib/prism/node.rb#16492 sig { override.returns(Symbol) } def type; end @@ -28281,7 +29388,7 @@ class Prism::RestParameterNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#17468 + # source://prism//lib/prism/node.rb#16437 sig { returns(Integer) } def flags; end @@ -28293,7 +29400,7 @@ class Prism::RestParameterNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#17543 + # source://prism//lib/prism/node.rb#16502 def type; end end end @@ -28302,13 +29409,13 @@ end # the requested structure, any comments that were encounters, and any errors # that were encountered. # -# source://prism//lib/prism/parse_result.rb#443 +# source://prism//lib/prism/parse_result.rb#521 class Prism::Result # Create a new result object with the given values. # # @return [Result] a new instance of Result # - # source://prism//lib/prism/parse_result.rb#465 + # source://prism//lib/prism/parse_result.rb#543 sig do params( comments: T::Array[Prism::Comment], @@ -28323,7 +29430,7 @@ class Prism::Result # The list of comments that were encountered during parsing. # - # source://prism//lib/prism/parse_result.rb#445 + # source://prism//lib/prism/parse_result.rb#523 sig { returns(T::Array[Prism::Comment]) } def comments; end @@ -28331,25 +29438,25 @@ class Prism::Result # 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#453 + # source://prism//lib/prism/parse_result.rb#531 sig { returns(T.nilable(Prism::Location)) } def data_loc; end # Implement the hash pattern matching interface for Result. # - # source://prism//lib/prism/parse_result.rb#475 + # source://prism//lib/prism/parse_result.rb#553 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # Returns the encoding of the source code that was parsed. # - # source://prism//lib/prism/parse_result.rb#480 + # source://prism//lib/prism/parse_result.rb#558 sig { returns(Encoding) } def encoding; end # The list of errors that were generated during parsing. # - # source://prism//lib/prism/parse_result.rb#456 + # source://prism//lib/prism/parse_result.rb#534 sig { returns(T::Array[Prism::ParseError]) } def errors; end @@ -28358,19 +29465,19 @@ class Prism::Result # # @return [Boolean] # - # source://prism//lib/prism/parse_result.rb#492 + # source://prism//lib/prism/parse_result.rb#570 sig { returns(T::Boolean) } def failure?; end # The list of magic comments that were encountered during parsing. # - # source://prism//lib/prism/parse_result.rb#448 + # source://prism//lib/prism/parse_result.rb#526 sig { returns(T::Array[Prism::MagicComment]) } def magic_comments; end # A Source instance that represents the source code that was parsed. # - # source://prism//lib/prism/parse_result.rb#462 + # source://prism//lib/prism/parse_result.rb#540 sig { returns(Prism::Source) } def source; end @@ -28379,13 +29486,13 @@ class Prism::Result # # @return [Boolean] # - # source://prism//lib/prism/parse_result.rb#486 + # source://prism//lib/prism/parse_result.rb#564 sig { returns(T::Boolean) } def success?; end # The list of warnings that were generated during parsing. # - # source://prism//lib/prism/parse_result.rb#459 + # source://prism//lib/prism/parse_result.rb#537 sig { returns(T::Array[Prism::ParseWarning]) } def warnings; end end @@ -28395,73 +29502,73 @@ end # retry # ^^^^^ # -# source://prism//lib/prism/node.rb#17562 +# source://prism//lib/prism/node.rb#16521 class Prism::RetryNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [RetryNode] a new instance of RetryNode # - # source://prism//lib/prism/node.rb#17564 + # source://prism//lib/prism/node.rb#16523 sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#17639 + # source://prism//lib/prism/node.rb#16596 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17571 + # source://prism//lib/prism/node.rb#16529 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#17576 + # source://prism//lib/prism/node.rb#16534 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17586 + # source://prism//lib/prism/node.rb#16544 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17581 + # source://prism//lib/prism/node.rb#16539 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?location: Location) -> RetryNode # - # source://prism//lib/prism/node.rb#17591 + # source://prism//lib/prism/node.rb#16549 sig { params(location: Prism::Location).returns(Prism::RetryNode) } def copy(location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17576 + # source://prism//lib/prism/node.rb#16534 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } # - # source://prism//lib/prism/node.rb#17599 + # source://prism//lib/prism/node.rb#16557 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#17604 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#16562 + sig { override.returns(String) } + def inspect; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by @@ -28478,7 +29585,7 @@ class Prism::RetryNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#17623 + # source://prism//lib/prism/node.rb#16580 sig { override.returns(Symbol) } def type; end @@ -28490,7 +29597,7 @@ class Prism::RetryNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#17633 + # source://prism//lib/prism/node.rb#16590 def type; end end end @@ -28500,105 +29607,115 @@ end # return 1 # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#17648 +# source://prism//lib/prism/node.rb#16605 class Prism::ReturnNode < ::Prism::Node - # def initialize: (Location keyword_loc, ArgumentsNode? arguments, Location location) -> void + # def initialize: (Integer flags, Location keyword_loc, ArgumentsNode? arguments, Location location) -> void # # @return [ReturnNode] a new instance of ReturnNode # - # source://prism//lib/prism/node.rb#17650 + # source://prism//lib/prism/node.rb#16607 sig do params( source: Prism::Source, + flags: Integer, keyword_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), location: Prism::Location ).void end - def initialize(source, keyword_loc, arguments, location); end + def initialize(source, flags, keyword_loc, arguments, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#17751 + # source://prism//lib/prism/node.rb#16709 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17659 + # source://prism//lib/prism/node.rb#16616 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#17701 + # source://prism//lib/prism/node.rb#16662 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17664 + # source://prism//lib/prism/node.rb#16621 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17676 + # source://prism//lib/prism/node.rb#16633 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17669 + # source://prism//lib/prism/node.rb#16626 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?keyword_loc: Location, ?arguments: ArgumentsNode?, ?location: Location) -> ReturnNode + # def copy: (?flags: Integer, ?keyword_loc: Location, ?arguments: ArgumentsNode?, ?location: Location) -> ReturnNode # - # source://prism//lib/prism/node.rb#17681 + # source://prism//lib/prism/node.rb#16638 sig do params( + flags: Integer, keyword_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), location: Prism::Location ).returns(Prism::ReturnNode) end - def copy(keyword_loc: T.unsafe(nil), arguments: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), arguments: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17664 + # source://prism//lib/prism/node.rb#16621 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, arguments: ArgumentsNode?, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, keyword_loc: Location, arguments: ArgumentsNode?, location: Location } # - # source://prism//lib/prism/node.rb#17689 + # source://prism//lib/prism/node.rb#16646 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#17709 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#16675 + sig { override.returns(String) } + def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#17704 + # source://prism//lib/prism/node.rb#16670 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#17694 + # source://prism//lib/prism/node.rb#16655 sig { returns(Prism::Location) } def keyword_loc; end + # def redundant?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16665 + sig { returns(T::Boolean) } + def redundant?; end + # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a @@ -28614,10 +29731,18 @@ class Prism::ReturnNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#17735 + # source://prism//lib/prism/node.rb#16693 sig { override.returns(Symbol) } def type; end + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#16651 + sig { returns(Integer) } + def flags; end + class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. @@ -28626,83 +29751,93 @@ class Prism::ReturnNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#17745 + # source://prism//lib/prism/node.rb#16703 def type; end end end +# Flags for return nodes. +# +# source://prism//lib/prism/node.rb#19250 +module Prism::ReturnNodeFlags; end + +# a return statement that is redundant because it is the last statement in a method +# +# source://prism//lib/prism/node.rb#19252 +Prism::ReturnNodeFlags::REDUNDANT = T.let(T.unsafe(nil), Integer) + # Represents the `self` keyword. # # self # ^^^^ # -# source://prism//lib/prism/node.rb#17762 +# source://prism//lib/prism/node.rb#16721 class Prism::SelfNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [SelfNode] a new instance of SelfNode # - # source://prism//lib/prism/node.rb#17764 + # source://prism//lib/prism/node.rb#16723 sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#17839 + # source://prism//lib/prism/node.rb#16796 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17771 + # source://prism//lib/prism/node.rb#16729 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#17776 + # source://prism//lib/prism/node.rb#16734 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17786 + # source://prism//lib/prism/node.rb#16744 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17781 + # source://prism//lib/prism/node.rb#16739 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?location: Location) -> SelfNode # - # source://prism//lib/prism/node.rb#17791 + # source://prism//lib/prism/node.rb#16749 sig { params(location: Prism::Location).returns(Prism::SelfNode) } def copy(location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17776 + # source://prism//lib/prism/node.rb#16734 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } # - # source://prism//lib/prism/node.rb#17799 + # source://prism//lib/prism/node.rb#16757 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#17804 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#16762 + sig { override.returns(String) } + def inspect; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by @@ -28719,7 +29854,7 @@ class Prism::SelfNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#17823 + # source://prism//lib/prism/node.rb#16780 sig { override.returns(Symbol) } def type; end @@ -28731,7 +29866,7 @@ class Prism::SelfNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#17833 + # source://prism//lib/prism/node.rb#16790 def type; end end end @@ -28798,22 +29933,22 @@ class Prism::Serialize::Loader # source://prism//lib/prism/serialize.rb#114 def load_line_offsets; end - # source://prism//lib/prism/serialize.rb#416 + # source://prism//lib/prism/serialize.rb#438 def load_metadata; end - # source://prism//lib/prism/serialize.rb#450 + # source://prism//lib/prism/serialize.rb#472 def load_nodes; end - # source://prism//lib/prism/serialize.rb#464 + # source://prism//lib/prism/serialize.rb#486 def load_result; end # source://prism//lib/prism/serialize.rb#110 def load_start_line; end - # source://prism//lib/prism/serialize.rb#425 + # source://prism//lib/prism/serialize.rb#447 def load_tokens; end - # source://prism//lib/prism/serialize.rb#438 + # source://prism//lib/prism/serialize.rb#460 def load_tokens_result; end # Returns the value of attribute serialized. @@ -28833,61 +29968,61 @@ class Prism::Serialize::Loader private - # source://prism//lib/prism/serialize.rb#550 + # source://prism//lib/prism/serialize.rb#572 def load_constant(index); end - # source://prism//lib/prism/serialize.rb#503 + # source://prism//lib/prism/serialize.rb#525 def load_double; end - # source://prism//lib/prism/serialize.rb#518 + # source://prism//lib/prism/serialize.rb#540 def load_embedded_string; end - # source://prism//lib/prism/serialize.rb#580 + # source://prism//lib/prism/serialize.rb#602 def load_error_level; end - # source://prism//lib/prism/serialize.rb#492 + # source://prism//lib/prism/serialize.rb#514 def load_integer; end - # source://prism//lib/prism/serialize.rb#534 + # source://prism//lib/prism/serialize.rb#556 def load_location; end - # source://prism//lib/prism/serialize.rb#538 + # source://prism//lib/prism/serialize.rb#560 def load_location_object; end - # source://prism//lib/prism/serialize.rb#609 + # source://prism//lib/prism/serialize.rb#631 def load_node; end - # source://prism//lib/prism/serialize.rb#575 + # source://prism//lib/prism/serialize.rb#597 def load_optional_constant; end - # source://prism//lib/prism/serialize.rb#542 + # source://prism//lib/prism/serialize.rb#564 def load_optional_location; end - # source://prism//lib/prism/serialize.rb#546 + # source://prism//lib/prism/serialize.rb#568 def load_optional_location_object; end - # source://prism//lib/prism/serialize.rb#511 + # source://prism//lib/prism/serialize.rb#533 def load_optional_node; end - # source://prism//lib/prism/serialize.rb#571 + # source://prism//lib/prism/serialize.rb#593 def load_required_constant; end - # source://prism//lib/prism/serialize.rb#522 + # source://prism//lib/prism/serialize.rb#544 def load_string; end - # source://prism//lib/prism/serialize.rb#507 + # source://prism//lib/prism/serialize.rb#529 def load_uint32; end - # source://prism//lib/prism/serialize.rb#487 + # source://prism//lib/prism/serialize.rb#509 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#473 + # source://prism//lib/prism/serialize.rb#495 def load_varuint; end - # source://prism//lib/prism/serialize.rb#595 + # source://prism//lib/prism/serialize.rb#617 def load_warning_level; end end @@ -28919,7 +30054,7 @@ 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#1833 +# source://prism//lib/prism/serialize.rb#1863 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. @@ -28927,13 +30062,13 @@ Prism::Serialize::TOKEN_TYPES = T.let(T.unsafe(nil), Array) # C = { a: 1 } # ^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#17849 +# source://prism//lib/prism/node.rb#16806 class Prism::ShareableConstantNode < ::Prism::Node # def initialize: (Integer flags, ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode write, Location location) -> void # # @return [ShareableConstantNode] a new instance of ShareableConstantNode # - # source://prism//lib/prism/node.rb#17851 + # source://prism//lib/prism/node.rb#16808 sig do params( source: Prism::Source, @@ -28947,36 +30082,36 @@ class Prism::ShareableConstantNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#17954 + # source://prism//lib/prism/node.rb#16905 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17860 + # source://prism//lib/prism/node.rb#16816 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#17865 + # source://prism//lib/prism/node.rb#16821 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17875 + # source://prism//lib/prism/node.rb#16831 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17870 + # source://prism//lib/prism/node.rb#16826 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?write: ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode, ?location: Location) -> ShareableConstantNode # - # source://prism//lib/prism/node.rb#17880 + # source://prism//lib/prism/node.rb#16836 sig do params( flags: Integer, @@ -28989,13 +30124,13 @@ class Prism::ShareableConstantNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17865 + # source://prism//lib/prism/node.rb#16821 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, write: ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode, location: Location } # - # source://prism//lib/prism/node.rb#17888 + # source://prism//lib/prism/node.rb#16844 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -29003,7 +30138,7 @@ class Prism::ShareableConstantNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#17910 + # source://prism//lib/prism/node.rb#16866 sig { returns(T::Boolean) } def experimental_copy?; end @@ -29011,24 +30146,24 @@ class Prism::ShareableConstantNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#17905 + # source://prism//lib/prism/node.rb#16861 sig { returns(T::Boolean) } def experimental_everything?; end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#17915 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#16871 + sig { override.returns(String) } + def inspect; end # def literal?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#17900 + # source://prism//lib/prism/node.rb#16856 sig { returns(T::Boolean) } def literal?; end @@ -29047,13 +30182,13 @@ class Prism::ShareableConstantNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#17938 + # source://prism//lib/prism/node.rb#16889 sig { override.returns(Symbol) } def type; end # The constant write that should be modified with the shareability state. # - # source://prism//lib/prism/node.rb#17897 + # source://prism//lib/prism/node.rb#16853 sig do returns(T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode)) end @@ -29063,7 +30198,7 @@ class Prism::ShareableConstantNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#17893 + # source://prism//lib/prism/node.rb#16849 sig { returns(Integer) } def flags; end @@ -29075,29 +30210,29 @@ class Prism::ShareableConstantNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#17948 + # source://prism//lib/prism/node.rb#16899 def type; end end end # Flags for shareable constant nodes. # -# source://prism//lib/prism/node.rb#20457 +# source://prism//lib/prism/node.rb#19256 module Prism::ShareableConstantNodeFlags; end # constant writes that should be modified with shareable constant value experimental copy # -# source://prism//lib/prism/node.rb#20465 +# source://prism//lib/prism/node.rb#19264 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#20462 +# source://prism//lib/prism/node.rb#19261 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#20459 +# source://prism//lib/prism/node.rb#19258 Prism::ShareableConstantNodeFlags::LITERAL = T.let(T.unsafe(nil), Integer) # Represents a singleton class declaration involving the `class` keyword. @@ -29105,13 +30240,13 @@ Prism::ShareableConstantNodeFlags::LITERAL = T.let(T.unsafe(nil), Integer) # class << self end # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#17965 +# source://prism//lib/prism/node.rb#16916 class Prism::SingletonClassNode < ::Prism::Node # def initialize: (Array[Symbol] locals, Location class_keyword_loc, Location operator_loc, Prism::node expression, Prism::node? body, Location end_keyword_loc, Location location) -> void # # @return [SingletonClassNode] a new instance of SingletonClassNode # - # source://prism//lib/prism/node.rb#17967 + # source://prism//lib/prism/node.rb#16918 sig do params( source: Prism::Source, @@ -29129,54 +30264,54 @@ class Prism::SingletonClassNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#18108 + # source://prism//lib/prism/node.rb#17045 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17980 + # source://prism//lib/prism/node.rb#16930 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: Prism::node? # - # source://prism//lib/prism/node.rb#18036 + # source://prism//lib/prism/node.rb#16986 sig { returns(T.nilable(Prism::Node)) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17985 + # source://prism//lib/prism/node.rb#16935 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def class_keyword: () -> String # - # source://prism//lib/prism/node.rb#18046 + # source://prism//lib/prism/node.rb#16996 sig { returns(String) } def class_keyword; end # attr_reader class_keyword_loc: Location # - # source://prism//lib/prism/node.rb#18019 + # source://prism//lib/prism/node.rb#16969 sig { returns(Prism::Location) } def class_keyword_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17998 + # source://prism//lib/prism/node.rb#16948 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17990 + # source://prism//lib/prism/node.rb#16940 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?locals: Array[Symbol], ?class_keyword_loc: Location, ?operator_loc: Location, ?expression: Prism::node, ?body: Prism::node?, ?end_keyword_loc: Location, ?location: Location) -> SingletonClassNode # - # source://prism//lib/prism/node.rb#18003 + # source://prism//lib/prism/node.rb#16953 sig do params( locals: T::Array[Symbol], @@ -29193,58 +30328,58 @@ class Prism::SingletonClassNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17985 + # source://prism//lib/prism/node.rb#16935 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], class_keyword_loc: Location, operator_loc: Location, expression: Prism::node, body: Prism::node?, end_keyword_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#18011 + # source://prism//lib/prism/node.rb#16961 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#18056 + # source://prism//lib/prism/node.rb#17006 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#18039 + # source://prism//lib/prism/node.rb#16989 sig { returns(Prism::Location) } def end_keyword_loc; end # attr_reader expression: Prism::node # - # source://prism//lib/prism/node.rb#18033 + # source://prism//lib/prism/node.rb#16983 sig { returns(Prism::Node) } def expression; end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#18061 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#17011 + sig { override.returns(String) } + def inspect; end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#18016 + # source://prism//lib/prism/node.rb#16966 sig { returns(T::Array[Symbol]) } def locals; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#18051 + # source://prism//lib/prism/node.rb#17001 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#18026 + # source://prism//lib/prism/node.rb#16976 sig { returns(Prism::Location) } def operator_loc; end @@ -29263,7 +30398,7 @@ class Prism::SingletonClassNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#18092 + # source://prism//lib/prism/node.rb#17029 sig { override.returns(Symbol) } def type; end @@ -29275,7 +30410,7 @@ class Prism::SingletonClassNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#18102 + # source://prism//lib/prism/node.rb#17039 def type; end end end @@ -29290,26 +30425,26 @@ class Prism::Source # # @return [Source] a new instance of Source # - # source://prism//lib/prism/parse_result.rb#18 + # source://prism//lib/prism/parse_result.rb#26 sig { params(source: String, start_line: Integer, offsets: T::Array[Integer]).void } def initialize(source, start_line = T.unsafe(nil), offsets = T.unsafe(nil)); end # Return the column number in characters for the given byte offset. # - # source://prism//lib/prism/parse_result.rb#59 + # source://prism//lib/prism/parse_result.rb#78 sig { params(byte_offset: Integer).returns(Integer) } def character_column(byte_offset); end # Return the character offset for the given byte offset. # - # source://prism//lib/prism/parse_result.rb#54 + # source://prism//lib/prism/parse_result.rb#73 sig { params(byte_offset: Integer).returns(Integer) } def character_offset(byte_offset); end # Returns the column number in code units for the given encoding for the # given byte offset. # - # source://prism//lib/prism/parse_result.rb#76 + # source://prism//lib/prism/parse_result.rb#95 sig { params(byte_offset: Integer, encoding: Encoding).returns(Integer) } def code_units_column(byte_offset, encoding); end @@ -29320,59 +30455,71 @@ class Prism::Source # 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#69 + # source://prism//lib/prism/parse_result.rb#88 sig { params(byte_offset: Integer, encoding: Encoding).returns(Integer) } def code_units_offset(byte_offset, encoding); end # Return the column number for the given byte offset. # - # source://prism//lib/prism/parse_result.rb#49 + # source://prism//lib/prism/parse_result.rb#68 sig { params(byte_offset: Integer).returns(Integer) } def column(byte_offset); end # Returns the encoding of the source code, which is set by parameters to the # parser or by the encoding magic comment. # - # source://prism//lib/prism/parse_result.rb#26 + # source://prism//lib/prism/parse_result.rb#34 sig { returns(Encoding) } def encoding; end # Binary search through the offsets to find the line number for the given # byte offset. # - # source://prism//lib/prism/parse_result.rb#38 + # source://prism//lib/prism/parse_result.rb#51 sig { params(byte_offset: Integer).returns(Integer) } def line(byte_offset); end + # Returns the byte offset of the end of the line corresponding to the given + # byte offset. + # + # source://prism//lib/prism/parse_result.rb#63 + def line_end(byte_offset); end + # Return the byte offset of the start of the line corresponding to the given # byte offset. # - # source://prism//lib/prism/parse_result.rb#44 + # source://prism//lib/prism/parse_result.rb#57 sig { params(byte_offset: Integer).returns(Integer) } def line_start(byte_offset); end + # Returns the lines of the source code as an array of strings. + # + # source://prism//lib/prism/parse_result.rb#39 + sig { returns(T::Array[String]) } + def lines; end + # The list of newline byte offsets in the source code. # - # source://prism//lib/prism/parse_result.rb#15 + # source://prism//lib/prism/parse_result.rb#23 sig { returns(T::Array[Integer]) } def offsets; end # Perform a byteslice on the source code using the given byte offset and # byte length. # - # source://prism//lib/prism/parse_result.rb#32 + # source://prism//lib/prism/parse_result.rb#45 sig { params(byte_offset: Integer, length: Integer).returns(String) } def slice(byte_offset, length); end # The source code that this source object represents. # - # source://prism//lib/prism/parse_result.rb#9 + # source://prism//lib/prism/parse_result.rb#17 sig { returns(String) } def source; end # The line number where this source starts. # - # source://prism//lib/prism/parse_result.rb#12 + # source://prism//lib/prism/parse_result.rb#20 sig { returns(Integer) } def start_line; end @@ -29381,8 +30528,18 @@ class Prism::Source # Binary search through the offsets to find the line number for the given # byte offset. # - # source://prism//lib/prism/parse_result.rb#84 + # source://prism//lib/prism/parse_result.rb#103 def find_line(byte_offset); end + + class << self + # Create a new source object with the given source code. This method should + # be used instead of `new` and it will return either a `Source` or a + # specialized and more performant `ASCIISource` if no multibyte characters + # are present in the source code. + # + # source://prism//lib/prism/parse_result.rb#12 + def for(source, start_line = T.unsafe(nil), offsets = T.unsafe(nil)); end + end end # Represents the use of the `__ENCODING__` keyword. @@ -29390,73 +30547,73 @@ end # __ENCODING__ # ^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#18124 +# source://prism//lib/prism/node.rb#17061 class Prism::SourceEncodingNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [SourceEncodingNode] a new instance of SourceEncodingNode # - # source://prism//lib/prism/node.rb#18126 + # source://prism//lib/prism/node.rb#17063 sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#18201 + # source://prism//lib/prism/node.rb#17136 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18133 + # source://prism//lib/prism/node.rb#17069 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#18138 + # source://prism//lib/prism/node.rb#17074 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18148 + # source://prism//lib/prism/node.rb#17084 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18143 + # source://prism//lib/prism/node.rb#17079 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?location: Location) -> SourceEncodingNode # - # source://prism//lib/prism/node.rb#18153 + # source://prism//lib/prism/node.rb#17089 sig { params(location: Prism::Location).returns(Prism::SourceEncodingNode) } def copy(location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18138 + # source://prism//lib/prism/node.rb#17074 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } # - # source://prism//lib/prism/node.rb#18161 + # source://prism//lib/prism/node.rb#17097 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#18166 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#17102 + sig { override.returns(String) } + def inspect; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by @@ -29473,7 +30630,7 @@ class Prism::SourceEncodingNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#18185 + # source://prism//lib/prism/node.rb#17120 sig { override.returns(Symbol) } def type; end @@ -29485,7 +30642,7 @@ class Prism::SourceEncodingNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#18195 + # source://prism//lib/prism/node.rb#17130 def type; end end end @@ -29495,62 +30652,62 @@ end # __FILE__ # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#18210 +# source://prism//lib/prism/node.rb#17145 class Prism::SourceFileNode < ::Prism::Node # def initialize: (Integer flags, String filepath, Location location) -> void # # @return [SourceFileNode] a new instance of SourceFileNode # - # source://prism//lib/prism/node.rb#18212 + # source://prism//lib/prism/node.rb#17147 sig { params(source: Prism::Source, flags: Integer, filepath: String, location: Prism::Location).void } def initialize(source, flags, filepath, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#18319 + # source://prism//lib/prism/node.rb#17249 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18221 + # source://prism//lib/prism/node.rb#17155 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#18226 + # source://prism//lib/prism/node.rb#17160 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18236 + # source://prism//lib/prism/node.rb#17170 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18231 + # source://prism//lib/prism/node.rb#17165 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?filepath: String, ?location: Location) -> SourceFileNode # - # source://prism//lib/prism/node.rb#18241 + # source://prism//lib/prism/node.rb#17175 sig { params(flags: Integer, filepath: String, location: Prism::Location).returns(Prism::SourceFileNode) } def copy(flags: T.unsafe(nil), filepath: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18226 + # source://prism//lib/prism/node.rb#17160 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, filepath: String, location: Location } # - # source://prism//lib/prism/node.rb#18249 + # source://prism//lib/prism/node.rb#17183 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -29559,7 +30716,7 @@ class Prism::SourceFileNode < ::Prism::Node # 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#18258 + # source://prism//lib/prism/node.rb#17192 sig { returns(String) } def filepath; end @@ -29567,7 +30724,7 @@ class Prism::SourceFileNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#18266 + # source://prism//lib/prism/node.rb#17200 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -29575,7 +30732,7 @@ class Prism::SourceFileNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#18261 + # source://prism//lib/prism/node.rb#17195 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -29583,21 +30740,21 @@ class Prism::SourceFileNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#18271 + # source://prism//lib/prism/node.rb#17205 sig { returns(T::Boolean) } def frozen?; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#18281 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#17215 + sig { override.returns(String) } + def inspect; end # def mutable?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#18276 + # source://prism//lib/prism/node.rb#17210 sig { returns(T::Boolean) } def mutable?; end @@ -29616,7 +30773,7 @@ class Prism::SourceFileNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#18303 + # source://prism//lib/prism/node.rb#17233 sig { override.returns(Symbol) } def type; end @@ -29624,7 +30781,7 @@ class Prism::SourceFileNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#18254 + # source://prism//lib/prism/node.rb#17188 sig { returns(Integer) } def flags; end @@ -29636,7 +30793,7 @@ class Prism::SourceFileNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#18313 + # source://prism//lib/prism/node.rb#17243 def type; end end end @@ -29646,73 +30803,73 @@ end # __LINE__ # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#18330 +# source://prism//lib/prism/node.rb#17260 class Prism::SourceLineNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [SourceLineNode] a new instance of SourceLineNode # - # source://prism//lib/prism/node.rb#18332 + # source://prism//lib/prism/node.rb#17262 sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#18407 + # source://prism//lib/prism/node.rb#17335 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18339 + # source://prism//lib/prism/node.rb#17268 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#18344 + # source://prism//lib/prism/node.rb#17273 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18354 + # source://prism//lib/prism/node.rb#17283 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18349 + # source://prism//lib/prism/node.rb#17278 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?location: Location) -> SourceLineNode # - # source://prism//lib/prism/node.rb#18359 + # source://prism//lib/prism/node.rb#17288 sig { params(location: Prism::Location).returns(Prism::SourceLineNode) } def copy(location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18344 + # source://prism//lib/prism/node.rb#17273 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } # - # source://prism//lib/prism/node.rb#18367 + # source://prism//lib/prism/node.rb#17296 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#18372 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#17301 + sig { override.returns(String) } + def inspect; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by @@ -29729,7 +30886,7 @@ class Prism::SourceLineNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#18391 + # source://prism//lib/prism/node.rb#17319 sig { override.returns(Symbol) } def type; end @@ -29741,7 +30898,7 @@ class Prism::SourceLineNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#18401 + # source://prism//lib/prism/node.rb#17329 def type; end end end @@ -29751,13 +30908,13 @@ end # [*a] # ^^ # -# source://prism//lib/prism/node.rb#18416 +# source://prism//lib/prism/node.rb#17344 class Prism::SplatNode < ::Prism::Node # def initialize: (Location operator_loc, Prism::node? expression, Location location) -> void # # @return [SplatNode] a new instance of SplatNode # - # source://prism//lib/prism/node.rb#18418 + # source://prism//lib/prism/node.rb#17346 sig do params( source: Prism::Source, @@ -29771,36 +30928,36 @@ class Prism::SplatNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#18519 + # source://prism//lib/prism/node.rb#17438 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18427 + # source://prism//lib/prism/node.rb#17354 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#18432 + # source://prism//lib/prism/node.rb#17359 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18444 + # source://prism//lib/prism/node.rb#17371 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18437 + # source://prism//lib/prism/node.rb#17364 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?operator_loc: Location, ?expression: Prism::node?, ?location: Location) -> SplatNode # - # source://prism//lib/prism/node.rb#18449 + # source://prism//lib/prism/node.rb#17376 sig do params( operator_loc: Prism::Location, @@ -29813,40 +30970,40 @@ class Prism::SplatNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18432 + # source://prism//lib/prism/node.rb#17359 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { operator_loc: Location, expression: Prism::node?, location: Location } # - # source://prism//lib/prism/node.rb#18457 + # source://prism//lib/prism/node.rb#17384 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#18469 + # source://prism//lib/prism/node.rb#17396 sig { returns(T.nilable(Prism::Node)) } def expression; end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#18477 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#17404 + sig { override.returns(String) } + def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#18472 + # source://prism//lib/prism/node.rb#17399 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#18462 + # source://prism//lib/prism/node.rb#17389 sig { returns(Prism::Location) } def operator_loc; end @@ -29865,7 +31022,7 @@ class Prism::SplatNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#18503 + # source://prism//lib/prism/node.rb#17422 sig { override.returns(Symbol) } def type; end @@ -29877,7 +31034,7 @@ class Prism::SplatNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#18513 + # source://prism//lib/prism/node.rb#17432 def type; end end end @@ -29887,79 +31044,79 @@ end # foo; bar; baz # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#18530 +# source://prism//lib/prism/node.rb#17449 class Prism::StatementsNode < ::Prism::Node # def initialize: (Array[Prism::node] body, Location location) -> void # # @return [StatementsNode] a new instance of StatementsNode # - # source://prism//lib/prism/node.rb#18532 + # source://prism//lib/prism/node.rb#17451 sig { params(source: Prism::Source, body: T::Array[Prism::Node], location: Prism::Location).void } def initialize(source, body, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#18612 + # source://prism//lib/prism/node.rb#17528 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18540 + # source://prism//lib/prism/node.rb#17458 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#18573 + # source://prism//lib/prism/node.rb#17491 sig { returns(T::Array[Prism::Node]) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18545 + # source://prism//lib/prism/node.rb#17463 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18555 + # source://prism//lib/prism/node.rb#17473 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18550 + # source://prism//lib/prism/node.rb#17468 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?body: Array[Prism::node], ?location: Location) -> StatementsNode # - # source://prism//lib/prism/node.rb#18560 + # source://prism//lib/prism/node.rb#17478 sig { params(body: T::Array[Prism::Node], location: Prism::Location).returns(Prism::StatementsNode) } def copy(body: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18545 + # source://prism//lib/prism/node.rb#17463 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { body: Array[Prism::node], location: Location } # - # source://prism//lib/prism/node.rb#18568 + # source://prism//lib/prism/node.rb#17486 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#18576 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#17494 + sig { override.returns(String) } + def inspect; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by @@ -29976,7 +31133,7 @@ class Prism::StatementsNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#18596 + # source://prism//lib/prism/node.rb#17512 sig { override.returns(Symbol) } def type; end @@ -29988,30 +31145,30 @@ class Prism::StatementsNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#18606 + # source://prism//lib/prism/node.rb#17522 def type; end end end # Flags for string nodes. # -# source://prism//lib/prism/node.rb#20469 +# source://prism//lib/prism/node.rb#19268 module Prism::StringFlags; end # internal bytes forced the encoding to binary # -# source://prism//lib/prism/node.rb#20474 +# source://prism//lib/prism/node.rb#19273 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#20471 +# source://prism//lib/prism/node.rb#19270 Prism::StringFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/node.rb#20477 +# source://prism//lib/prism/node.rb#19276 Prism::StringFlags::FROZEN = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/node.rb#20480 +# source://prism//lib/prism/node.rb#19279 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. @@ -30025,7 +31182,7 @@ Prism::StringFlags::MUTABLE = T.let(T.unsafe(nil), Integer) # "foo #{bar} baz" # ^^^^ ^^^^ # -# source://prism//lib/prism/node.rb#18629 +# source://prism//lib/prism/node.rb#17545 class Prism::StringNode < ::Prism::Node include ::Prism::HeredocQuery @@ -30033,7 +31190,7 @@ class Prism::StringNode < ::Prism::Node # # @return [StringNode] a new instance of StringNode # - # source://prism//lib/prism/node.rb#18631 + # source://prism//lib/prism/node.rb#17547 sig do params( source: Prism::Source, @@ -30050,60 +31207,60 @@ class Prism::StringNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#18792 + # source://prism//lib/prism/node.rb#17700 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18643 + # source://prism//lib/prism/node.rb#17558 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#18648 + # source://prism//lib/prism/node.rb#17563 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#18746 + # source://prism//lib/prism/node.rb#17661 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#18700 + # source://prism//lib/prism/node.rb#17615 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18658 + # source://prism//lib/prism/node.rb#17573 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18653 + # source://prism//lib/prism/node.rb#17568 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def content: () -> String # - # source://prism//lib/prism/node.rb#18741 + # source://prism//lib/prism/node.rb#17656 sig { returns(String) } def content; end # attr_reader content_loc: Location # - # source://prism//lib/prism/node.rb#18693 + # source://prism//lib/prism/node.rb#17608 sig { returns(Prism::Location) } def content_loc; end # def copy: (?flags: Integer, ?opening_loc: Location?, ?content_loc: Location, ?closing_loc: Location?, ?unescaped: String, ?location: Location) -> StringNode # - # source://prism//lib/prism/node.rb#18663 + # source://prism//lib/prism/node.rb#17578 sig do params( flags: Integer, @@ -30119,13 +31276,13 @@ class Prism::StringNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18648 + # source://prism//lib/prism/node.rb#17563 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location?, content_loc: Location, closing_loc: Location?, unescaped: String, location: Location } # - # source://prism//lib/prism/node.rb#18671 + # source://prism//lib/prism/node.rb#17586 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -30136,7 +31293,7 @@ class Prism::StringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#18721 + # source://prism//lib/prism/node.rb#17636 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -30144,7 +31301,7 @@ class Prism::StringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#18716 + # source://prism//lib/prism/node.rb#17631 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -30152,43 +31309,43 @@ class Prism::StringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#18726 + # source://prism//lib/prism/node.rb#17641 sig { returns(T::Boolean) } def frozen?; end sig { returns(T::Boolean) } def heredoc?; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#18751 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#17666 + sig { override.returns(String) } + def inspect; end # def mutable?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#18731 + # source://prism//lib/prism/node.rb#17646 sig { returns(T::Boolean) } def mutable?; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#18736 + # source://prism//lib/prism/node.rb#17651 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#18680 + # source://prism//lib/prism/node.rb#17595 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#55 + # source://prism//lib/prism/node_ext.rb#69 sig { returns(Prism::InterpolatedStringNode) } def to_interpolated; end @@ -30207,13 +31364,13 @@ class Prism::StringNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#18776 + # source://prism//lib/prism/node.rb#17684 sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#18713 + # source://prism//lib/prism/node.rb#17628 sig { returns(String) } def unescaped; end @@ -30221,7 +31378,7 @@ class Prism::StringNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#18676 + # source://prism//lib/prism/node.rb#17591 sig { returns(Integer) } def flags; end @@ -30233,7 +31390,7 @@ class Prism::StringNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#18786 + # source://prism//lib/prism/node.rb#17694 def type; end end end @@ -30246,13 +31403,13 @@ end # super foo, bar # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#18809 +# source://prism//lib/prism/node.rb#17717 class Prism::SuperNode < ::Prism::Node # def initialize: (Location keyword_loc, Location? lparen_loc, ArgumentsNode? arguments, Location? rparen_loc, Prism::node? block, Location location) -> void # # @return [SuperNode] a new instance of SuperNode # - # source://prism//lib/prism/node.rb#18811 + # source://prism//lib/prism/node.rb#17719 sig do params( source: Prism::Source, @@ -30269,48 +31426,48 @@ class Prism::SuperNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#18963 + # source://prism//lib/prism/node.rb#17854 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18823 + # source://prism//lib/prism/node.rb#17730 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#18879 + # source://prism//lib/prism/node.rb#17786 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # attr_reader block: Prism::node? # - # source://prism//lib/prism/node.rb#18895 + # source://prism//lib/prism/node.rb#17802 sig { returns(T.nilable(Prism::Node)) } def block; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18828 + # source://prism//lib/prism/node.rb#17735 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18841 + # source://prism//lib/prism/node.rb#17748 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18833 + # source://prism//lib/prism/node.rb#17740 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?keyword_loc: Location, ?lparen_loc: Location?, ?arguments: ArgumentsNode?, ?rparen_loc: Location?, ?block: Prism::node?, ?location: Location) -> SuperNode # - # source://prism//lib/prism/node.rb#18846 + # source://prism//lib/prism/node.rb#17753 sig do params( keyword_loc: Prism::Location, @@ -30326,58 +31483,58 @@ class Prism::SuperNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18828 + # source://prism//lib/prism/node.rb#17735 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, block: Prism::node?, location: Location } # - # source://prism//lib/prism/node.rb#18854 + # source://prism//lib/prism/node.rb#17761 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#18913 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#17820 + sig { override.returns(String) } + def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#18898 + # source://prism//lib/prism/node.rb#17805 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#18859 + # source://prism//lib/prism/node.rb#17766 sig { returns(Prism::Location) } def keyword_loc; end # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#18903 + # source://prism//lib/prism/node.rb#17810 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#18866 + # source://prism//lib/prism/node.rb#17773 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#18908 + # source://prism//lib/prism/node.rb#17815 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#18882 + # source://prism//lib/prism/node.rb#17789 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end @@ -30396,7 +31553,7 @@ class Prism::SuperNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#18947 + # source://prism//lib/prism/node.rb#17838 sig { override.returns(Symbol) } def type; end @@ -30408,29 +31565,29 @@ class Prism::SuperNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#18957 + # source://prism//lib/prism/node.rb#17848 def type; end end end # Flags for symbol nodes. # -# source://prism//lib/prism/node.rb#20484 +# source://prism//lib/prism/node.rb#19283 module Prism::SymbolFlags; end # internal bytes forced the encoding to binary # -# source://prism//lib/prism/node.rb#20489 +# source://prism//lib/prism/node.rb#19288 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#20492 +# source://prism//lib/prism/node.rb#19291 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#20486 +# source://prism//lib/prism/node.rb#19285 Prism::SymbolFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # Represents a symbol literal or a symbol contained within a `%i` list. @@ -30441,13 +31598,13 @@ Prism::SymbolFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # %i[foo] # ^^^ # -# source://prism//lib/prism/node.rb#18980 +# source://prism//lib/prism/node.rb#17871 class Prism::SymbolNode < ::Prism::Node # def initialize: (Integer flags, Location? opening_loc, Location? value_loc, Location? closing_loc, String unescaped, Location location) -> void # # @return [SymbolNode] a new instance of SymbolNode # - # source://prism//lib/prism/node.rb#18982 + # source://prism//lib/prism/node.rb#17873 sig do params( source: Prism::Source, @@ -30464,48 +31621,48 @@ class Prism::SymbolNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#19144 + # source://prism//lib/prism/node.rb#18027 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18994 + # source://prism//lib/prism/node.rb#17884 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#18999 + # source://prism//lib/prism/node.rb#17889 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#19098 + # source://prism//lib/prism/node.rb#17988 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#19057 + # source://prism//lib/prism/node.rb#17947 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#19009 + # source://prism//lib/prism/node.rb#17899 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#19004 + # source://prism//lib/prism/node.rb#17894 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?opening_loc: Location?, ?value_loc: Location?, ?closing_loc: Location?, ?unescaped: String, ?location: Location) -> SymbolNode # - # source://prism//lib/prism/node.rb#19014 + # source://prism//lib/prism/node.rb#17904 sig do params( flags: Integer, @@ -30521,13 +31678,13 @@ class Prism::SymbolNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18999 + # source://prism//lib/prism/node.rb#17889 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location?, value_loc: Location?, closing_loc: Location?, unescaped: String, location: Location } # - # source://prism//lib/prism/node.rb#19022 + # source://prism//lib/prism/node.rb#17912 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -30538,7 +31695,7 @@ class Prism::SymbolNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#19078 + # source://prism//lib/prism/node.rb#17968 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -30546,7 +31703,7 @@ class Prism::SymbolNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#19083 + # source://prism//lib/prism/node.rb#17973 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end @@ -30554,25 +31711,25 @@ class Prism::SymbolNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#19073 + # source://prism//lib/prism/node.rb#17963 sig { returns(T::Boolean) } def forced_utf8_encoding?; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#19103 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#17993 + sig { override.returns(String) } + def inspect; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#19088 + # source://prism//lib/prism/node.rb#17978 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#19031 + # source://prism//lib/prism/node.rb#17921 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end @@ -30591,25 +31748,25 @@ class Prism::SymbolNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#19128 + # source://prism//lib/prism/node.rb#18011 sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#19070 + # source://prism//lib/prism/node.rb#17960 sig { returns(String) } def unescaped; end # def value: () -> String? # - # source://prism//lib/prism/node.rb#19093 + # source://prism//lib/prism/node.rb#17983 sig { returns(T.nilable(String)) } def value; end # attr_reader value_loc: Location? # - # source://prism//lib/prism/node.rb#19044 + # source://prism//lib/prism/node.rb#17934 sig { returns(T.nilable(Prism::Location)) } def value_loc; end @@ -30617,7 +31774,7 @@ class Prism::SymbolNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#19027 + # source://prism//lib/prism/node.rb#17917 sig { returns(Integer) } def flags; end @@ -30629,56 +31786,56 @@ class Prism::SymbolNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#19138 + # source://prism//lib/prism/node.rb#18021 def type; end end end # This represents a token from the Ruby source. # -# source://prism//lib/prism/parse_result.rb#550 +# source://prism//lib/prism/parse_result.rb#645 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#562 + # source://prism//lib/prism/parse_result.rb#657 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#597 + # source://prism//lib/prism/parse_result.rb#692 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#570 + # source://prism//lib/prism/parse_result.rb#665 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # A Location object representing the location of this token in the source. # - # source://prism//lib/prism/parse_result.rb#575 + # source://prism//lib/prism/parse_result.rb#670 sig { returns(Prism::Location) } def location; end # Implement the pretty print interface for Token. # - # source://prism//lib/prism/parse_result.rb#582 + # source://prism//lib/prism/parse_result.rb#677 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#556 + # source://prism//lib/prism/parse_result.rb#651 sig { returns(Symbol) } def type; end # A byteslice of the source that this token represents. # - # source://prism//lib/prism/parse_result.rb#559 + # source://prism//lib/prism/parse_result.rb#654 sig { returns(String) } def value; end @@ -30686,7 +31843,7 @@ class Prism::Token # The Source object that represents the source this token came from. # - # source://prism//lib/prism/parse_result.rb#552 + # source://prism//lib/prism/parse_result.rb#647 sig { returns(Prism::Source) } def source; end end @@ -30702,52 +31859,52 @@ module Prism::Translation; end # the parser gem, and overrides the parse* methods to parse with prism and # then translate. # -# source://prism//lib/prism/translation/parser.rb#11 +# 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#36 + # 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#44 + # 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#57 + # 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#74 + # 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#100 + # source://prism//lib/prism/translation/parser.rb#105 def try_declare_numparam(node); end - # source://prism//lib/prism/translation/parser.rb#31 + # source://prism//lib/prism/translation/parser.rb#36 sig { overridable.returns(Integer) } def version; end - # source://prism//lib/prism/translation/parser.rb#40 + # 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#258 + # 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#263 + # 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 @@ -30758,33 +31915,33 @@ class Prism::Translation::Parser < ::Parser::Base # just use the offset directly. Otherwise, we build an array where the # index is the byte offset and the value is the character offset. # - # source://prism//lib/prism/translation/parser.rb#241 + # 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#275 + # 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#270 + # 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#284 + # 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#119 + # 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#219 + # 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 @@ -30792,7 +31949,7 @@ class Prism::Translation::Parser < ::Parser::Base # # @return [Boolean] # - # source://prism//lib/prism/translation/parser.rb#108 + # 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 @@ -30800,12 +31957,12 @@ class Prism::Translation::Parser < ::Parser::Base # # @return [Boolean] # - # source://prism//lib/prism/translation/parser.rb#114 + # 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#192 + # source://prism//lib/prism/translation/parser.rb#197 def warning_diagnostic(warning, offset_cache); end end @@ -30832,8 +31989,6 @@ end # # source://prism//lib/prism/translation/parser/compiler.rb#8 class Prism::Translation::Parser::Compiler < ::Prism::Compiler - Result = type_member { { fixed: Parser::AST::Node } } - # Initialize a new compiler with the given parser, offset cache, and # options. # @@ -30907,7 +32062,7 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # foo(bar) # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#101 + # source://prism//lib/prism/translation/parser/compiler.rb#105 def visit_arguments_node(node); end # [] @@ -30925,7 +32080,7 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # { a: 1 } # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#107 + # source://prism//lib/prism/translation/parser/compiler.rb#111 def visit_assoc_node(node); end # def foo(**); bar(**); end @@ -30934,49 +32089,49 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # { **foo } # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#148 + # source://prism//lib/prism/translation/parser/compiler.rb#160 def visit_assoc_splat_node(node); end # $+ # ^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#158 + # 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#164 + # 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#202 + # 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#208 + # 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#213 + # 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#219 + # 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#224 + # source://prism//lib/prism/translation/parser/compiler.rb#238 def visit_block_parameters_node(node); end # break @@ -30985,15 +32140,13 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # break foo # ^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#233 + # source://prism//lib/prism/translation/parser/compiler.rb#247 def visit_break_node(node); end - # foo.bar += baz - # ^^^^^^^^^^^^^^^ # foo.bar &&= baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#319 + # source://prism//lib/prism/translation/parser/compiler.rb#352 def visit_call_and_write_node(node); end # foo @@ -31005,147 +32158,133 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # foo.bar() {} # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#245 + # 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#319 + # source://prism//lib/prism/translation/parser/compiler.rb#333 def visit_call_operator_write_node(node); end - # foo.bar += baz - # ^^^^^^^^^^^^^^^ # foo.bar ||= baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#319 + # 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#346 + # 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#358 + # 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#377 + # 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#364 + # 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#390 + # source://prism//lib/prism/translation/parser/compiler.rb#434 def visit_class_node(node); end - # @@foo += bar - # ^^^^^^^^^^^^ # @@foo &&= bar # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#419 + # 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#419 + # source://prism//lib/prism/translation/parser/compiler.rb#463 def visit_class_variable_operator_write_node(node); end - # @@foo += bar - # ^^^^^^^^^^^^ # @@foo ||= bar # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#419 + # 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#403 + # 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#437 + # 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#409 + # source://prism//lib/prism/translation/parser/compiler.rb#453 def visit_class_variable_write_node(node); end - # Foo += bar - # ^^^^^^^^^^^ # Foo &&= bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#458 + # 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#458 + # source://prism//lib/prism/translation/parser/compiler.rb#514 def visit_constant_operator_write_node(node); end - # Foo += bar - # ^^^^^^^^^^^ # Foo ||= bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#458 + # source://prism//lib/prism/translation/parser/compiler.rb#534 def visit_constant_or_write_node(node); end - # Foo::Bar += baz - # ^^^^^^^^^^^^^^^ # Foo::Bar &&= baz # ^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#512 + # 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#482 + # 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#512 + # source://prism//lib/prism/translation/parser/compiler.rb#580 def visit_constant_path_operator_write_node(node); end - # Foo::Bar += baz - # ^^^^^^^^^^^^^^^ # Foo::Bar ||= baz # ^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#512 + # 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#530 + # source://prism//lib/prism/translation/parser/compiler.rb#610 def visit_constant_path_target_node(node); end # Foo::Bar = 1 @@ -31154,19 +32293,19 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # Foo::Foo, Bar::Bar = 1 # ^^^^^^^^ ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#502 + # 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#443 + # 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#476 + # source://prism//lib/prism/translation/parser/compiler.rb#544 def visit_constant_target_node(node); end # Foo = 1 @@ -31175,7 +32314,7 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # Foo, Bar = 1 # ^^^ ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#452 + # source://prism//lib/prism/translation/parser/compiler.rb#508 def visit_constant_write_node(node); end # def foo; end @@ -31184,7 +32323,7 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # def self.foo; end # ^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#539 + # source://prism//lib/prism/translation/parser/compiler.rb#619 def visit_def_node(node); end # defined? a @@ -31193,25 +32332,25 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # defined?(a) # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#586 + # 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#598 + # 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#604 + # 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#614 + # source://prism//lib/prism/translation/parser/compiler.rb#694 def visit_embedded_variable_node(node); end # begin; foo; ensure; bar; end @@ -31219,19 +32358,19 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # # @raise [CompilationError] # - # source://prism//lib/prism/translation/parser/compiler.rb#620 + # source://prism//lib/prism/translation/parser/compiler.rb#700 def visit_ensure_node(node); end # false # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#626 + # 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#632 + # source://prism//lib/prism/translation/parser/compiler.rb#712 def visit_find_pattern_node(node); end # 0..5 @@ -31239,31 +32378,31 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # if foo .. bar; end # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1364 + # 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#644 + # 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#650 + # 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#668 + # 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#674 + # source://prism//lib/prism/translation/parser/compiler.rb#754 def visit_forwarding_parameter_node(node); end # super @@ -31272,59 +32411,55 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # super {} # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#683 + # source://prism//lib/prism/translation/parser/compiler.rb#763 def visit_forwarding_super_node(node); end - # $foo += bar - # ^^^^^^^^^^^ # $foo &&= bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#711 + # 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#711 + # source://prism//lib/prism/translation/parser/compiler.rb#791 def visit_global_variable_operator_write_node(node); end - # $foo += bar - # ^^^^^^^^^^^ # $foo ||= bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#711 + # 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#695 + # 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#729 + # 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#701 + # 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#735 + # source://prism//lib/prism/translation/parser/compiler.rb#827 def visit_hash_node(node); end # foo => {} # ^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#745 + # source://prism//lib/prism/translation/parser/compiler.rb#837 def visit_hash_pattern_node(node); end # if foo then bar end @@ -31336,13 +32471,13 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # foo ? bar : baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#763 + # source://prism//lib/prism/translation/parser/compiler.rb#855 def visit_if_node(node); end # 1i # ^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#805 + # source://prism//lib/prism/translation/parser/compiler.rb#897 def visit_imaginary_node(node); end # { foo: } @@ -31350,7 +32485,7 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # # @raise [CompilationError] # - # source://prism//lib/prism/translation/parser/compiler.rb#811 + # source://prism//lib/prism/translation/parser/compiler.rb#903 def visit_implicit_node(node); end # foo { |bar,| } @@ -31358,80 +32493,74 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # # @raise [CompilationError] # - # source://prism//lib/prism/translation/parser/compiler.rb#817 + # 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#823 + # source://prism//lib/prism/translation/parser/compiler.rb#915 def visit_in_node(node); end - # foo[bar] += baz - # ^^^^^^^^^^^^^^^ # foo[bar] &&= baz # ^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#849 + # 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#849 + # source://prism//lib/prism/translation/parser/compiler.rb#941 def visit_index_operator_write_node(node); end - # foo[bar] += baz - # ^^^^^^^^^^^^^^^ # foo[bar] ||= baz # ^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#849 + # 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#875 + # source://prism//lib/prism/translation/parser/compiler.rb#995 def visit_index_target_node(node); end - # ^^^^^^^^^^^ # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#902 + # 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#902 + # 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#902 + # 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#886 + # 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#920 + # 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#892 + # 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#926 + # source://prism//lib/prism/translation/parser/compiler.rb#1058 def visit_integer_node(node); end # /foo #{bar}/ @@ -31439,43 +32568,49 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # if /foo #{bar}/ then end # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#932 + # 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#932 + # 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#947 + # 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#1010 + # 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#1020 + # 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#1035 + # 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#1041 + # source://prism//lib/prism/translation/parser/compiler.rb#1149 def visit_keyword_hash_node(node); end # def foo(**bar); end @@ -31484,53 +32619,49 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # def foo(**); end # ^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1050 + # 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#1059 + # source://prism//lib/prism/translation/parser/compiler.rb#1167 def visit_lambda_node(node); end - # foo += bar - # ^^^^^^^^^^ # foo &&= bar # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1108 + # 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#1108 + # source://prism//lib/prism/translation/parser/compiler.rb#1209 def visit_local_variable_operator_write_node(node); end - # foo += bar - # ^^^^^^^^^^ # foo ||= bar # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1108 + # 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#1085 + # 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#1126 + # 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#1098 + # source://prism//lib/prism/translation/parser/compiler.rb#1199 def visit_local_variable_write_node(node); end # /foo/ @@ -31538,50 +32669,50 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # if /foo/ then end # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1398 + # 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#1136 + # 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#1146 + # 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#1156 + # 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#1167 + # 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#1173 + # 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#1184 + # 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#1198 + # source://prism//lib/prism/translation/parser/compiler.rb#1307 def visit_multi_write_node(node); end # next @@ -31590,55 +32721,55 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # next foo # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1219 + # source://prism//lib/prism/translation/parser/compiler.rb#1330 def visit_next_node(node); end # nil # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1231 + # 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#1237 + # 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#1247 + # 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#1253 + # 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#1259 + # 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#1265 + # 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#1271 + # 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#1277 + # source://prism//lib/prism/translation/parser/compiler.rb#1388 def visit_parameters_node(node); end # () @@ -31647,76 +32778,76 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # (1) # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1316 + # 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#1326 + # 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#1333 + # 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#1338 + # 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#1348 + # 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#1358 + # 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#1364 + # source://prism//lib/prism/translation/parser/compiler.rb#1475 def visit_range_node(node); end # 1r # ^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1386 + # source://prism//lib/prism/translation/parser/compiler.rb#1497 def visit_rational_node(node); end # redo # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1392 + # source://prism//lib/prism/translation/parser/compiler.rb#1503 def visit_redo_node(node); end # /foo/ # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1398 + # 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#1413 + # 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#1419 + # 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#1425 + # source://prism//lib/prism/translation/parser/compiler.rb#1547 def visit_rescue_modifier_node(node); end # begin; rescue; end @@ -31724,7 +32855,7 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # # @raise [CompilationError] # - # source://prism//lib/prism/translation/parser/compiler.rb#1443 + # source://prism//lib/prism/translation/parser/compiler.rb#1565 def visit_rescue_node(node); end # def foo(*bar); end @@ -31733,13 +32864,13 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # def foo(*); end # ^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1452 + # 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#1458 + # source://prism//lib/prism/translation/parser/compiler.rb#1580 def visit_retry_node(node); end # return @@ -31748,42 +32879,42 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # return 1 # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1467 + # source://prism//lib/prism/translation/parser/compiler.rb#1589 def visit_return_node(node); end # self # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1479 + # 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#1484 + # 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#1490 + # 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#1502 + # 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#1508 + # 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#1514 + # source://prism//lib/prism/translation/parser/compiler.rb#1636 def visit_source_line_node(node); end # foo(*bar) @@ -31795,42 +32926,42 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # def foo(*); bar(*); end # ^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1526 + # 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#1539 + # source://prism//lib/prism/translation/parser/compiler.rb#1661 def visit_statements_node(node); end # "foo" # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1545 + # 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#1586 + # source://prism//lib/prism/translation/parser/compiler.rb#1709 def visit_super_node(node); end # :foo # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1609 + # source://prism//lib/prism/translation/parser/compiler.rb#1732 def visit_symbol_node(node); end # true # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1641 + # 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#1647 + # source://prism//lib/prism/translation/parser/compiler.rb#1770 def visit_undef_node(node); end # unless foo; bar end @@ -31839,7 +32970,7 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # bar unless foo # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1656 + # source://prism//lib/prism/translation/parser/compiler.rb#1779 def visit_unless_node(node); end # until foo; bar end @@ -31848,13 +32979,13 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # bar until foo # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1686 + # 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#1708 + # source://prism//lib/prism/translation/parser/compiler.rb#1831 def visit_when_node(node); end # while foo; bar end @@ -31863,13 +32994,13 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # bar while foo # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1726 + # source://prism//lib/prism/translation/parser/compiler.rb#1849 def visit_while_node(node); end # `foo` # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1748 + # source://prism//lib/prism/translation/parser/compiler.rb#1871 def visit_x_string_node(node); end # yield @@ -31878,29 +33009,34 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # yield 1 # ^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1780 + # 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#1794 + # 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#1801 + # source://prism//lib/prism/translation/parser/compiler.rb#1923 def find_forwarding(node); end - # Because we have mutated the AST to allow for newlines in the middle of - # a rational, we need to manually handle the value here. + # Returns the set of targets for a MultiTargetNode or a MultiWriteNode. # - # source://prism//lib/prism/translation/parser/compiler.rb#1815 - def imaginary_value(node); end + # 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. @@ -31908,7 +33044,7 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # 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#1824 + # 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 @@ -31917,18 +33053,12 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # # @return [Boolean] # - # source://prism//lib/prism/translation/parser/compiler.rb#1836 + # source://prism//lib/prism/translation/parser/compiler.rb#1962 def procarg0?(parameters); end - # Because we have mutated the AST to allow for newlines in the middle of - # a rational, we need to manually handle the value here. - # - # source://prism//lib/prism/translation/parser/compiler.rb#1849 - def rational_value(node); end - # Constructs a new source range from the given start and end offsets. # - # source://prism//lib/prism/translation/parser/compiler.rb#1863 + # 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 @@ -31938,37 +33068,37 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # 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#1878 + # 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#1868 + # 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#1888 + # 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#1893 + # 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#1927 + # 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#1973 + # 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#1985 + # source://prism//lib/prism/translation/parser/compiler.rb#2135 def within_pattern; end end @@ -31981,10 +33111,10 @@ class Prism::Translation::Parser::Compiler::CompilationError < ::StandardError; # store a reference to its constant to make it slightly faster to look # up. # -# source://prism//lib/prism/translation/parser/compiler.rb#1860 +# source://prism//lib/prism/translation/parser/compiler.rb#1976 Prism::Translation::Parser::Compiler::Range = Parser::Source::Range -# source://prism//lib/prism/translation/parser.rb#12 +# 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 @@ -32070,22 +33200,22 @@ Prism::Translation::Parser::Lexer::TYPES = T.let(T.unsafe(nil), Hash) # messages. We create our own diagnostic class in order to set our own # error messages. # -# source://prism//lib/prism/translation/parser.rb#18 +# 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#23 + # 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#20 + # source://prism//lib/prism/translation/parser.rb#25 def message; end end -# source://prism//lib/prism/translation/parser.rb#29 +# 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 @@ -32159,7 +33289,7 @@ class Prism::Translation::Ripper < ::Prism::Compiler # Parse the source and return the result. # # source://prism//lib/prism/translation/ripper.rb#462 - sig { returns(T.nilable(Result)) } + sig { returns(T.untyped) } def parse; end # The source that is being parsed. @@ -32721,15 +33851,21 @@ class Prism::Translation::Ripper < ::Prism::Compiler 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#2227 + # source://prism//lib/prism/translation/ripper.rb#2234 def visit_keyword_hash_node(node); end # def foo(**bar); end @@ -32738,96 +33874,96 @@ class Prism::Translation::Ripper < ::Prism::Compiler # def foo(**); end # ^^ # - # source://prism//lib/prism/translation/ripper.rb#2239 + # source://prism//lib/prism/translation/ripper.rb#2246 def visit_keyword_rest_parameter_node(node); end # -> {} # - # source://prism//lib/prism/translation/ripper.rb#2253 + # source://prism//lib/prism/translation/ripper.rb#2260 def visit_lambda_node(node); end # foo &&= bar # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2350 + # 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#2336 + # 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#2364 + # 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#2313 + # 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#2378 + # 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#2325 + # 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#2385 + # 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#2400 + # source://prism//lib/prism/translation/ripper.rb#2402 def visit_match_predicate_node(node); end # foo => bar # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2409 + # source://prism//lib/prism/translation/ripper.rb#2411 def visit_match_required_node(node); end # /(?foo)/ =~ bar # ^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2418 + # 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#2424 + # source://prism//lib/prism/translation/ripper.rb#2426 def visit_missing_node(node); end # module Foo; end # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2430 + # 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#2447 + # 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#2501 + # source://prism//lib/prism/translation/ripper.rb#2503 def visit_multi_write_node(node); end # next @@ -32836,55 +33972,55 @@ class Prism::Translation::Ripper < ::Prism::Compiler # next foo # ^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2521 + # source://prism//lib/prism/translation/ripper.rb#2523 def visit_next_node(node); end # nil # ^^^ # - # source://prism//lib/prism/translation/ripper.rb#2535 + # 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#2542 + # 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#2551 + # source://prism//lib/prism/translation/ripper.rb#2553 def visit_numbered_parameters_node(node); end # $1 # ^^ # - # source://prism//lib/prism/translation/ripper.rb#2556 + # 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#2563 + # 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#2573 + # 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#2583 + # 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#2593 + # source://prism//lib/prism/translation/ripper.rb#2595 def visit_parameters_node(node); end # () @@ -32893,84 +34029,84 @@ class Prism::Translation::Ripper < ::Prism::Compiler # (1) # ^^^ # - # source://prism//lib/prism/translation/ripper.rb#2620 + # source://prism//lib/prism/translation/ripper.rb#2622 def visit_parentheses_node(node); end # foo => ^(bar) # ^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2634 + # 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#2643 + # source://prism//lib/prism/translation/ripper.rb#2645 def visit_pinned_variable_node(node); end # END {} # ^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2649 + # source://prism//lib/prism/translation/ripper.rb#2651 def visit_post_execution_node(node); end # BEGIN {} # ^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2664 + # 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#2678 + # source://prism//lib/prism/translation/ripper.rb#2680 def visit_program_node(node); end # 0..5 # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2689 + # source://prism//lib/prism/translation/ripper.rb#2691 def visit_range_node(node); end # 1r # ^^ # - # source://prism//lib/prism/translation/ripper.rb#2703 + # source://prism//lib/prism/translation/ripper.rb#2705 def visit_rational_node(node); end # redo # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2709 + # source://prism//lib/prism/translation/ripper.rb#2711 def visit_redo_node(node); end # /foo/ # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2716 + # 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#2738 + # 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#2745 + # 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#2752 + # 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#2762 + # source://prism//lib/prism/translation/ripper.rb#2764 def visit_rescue_node(node); end # def foo(*bar); end @@ -32979,13 +34115,13 @@ class Prism::Translation::Ripper < ::Prism::Compiler # def foo(*); end # ^ # - # source://prism//lib/prism/translation/ripper.rb#2820 + # source://prism//lib/prism/translation/ripper.rb#2822 def visit_rest_parameter_node(node); end # retry # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2832 + # source://prism//lib/prism/translation/ripper.rb#2834 def visit_retry_node(node); end # return @@ -32994,42 +34130,42 @@ class Prism::Translation::Ripper < ::Prism::Compiler # return 1 # ^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2842 + # source://prism//lib/prism/translation/ripper.rb#2844 def visit_return_node(node); end # self # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2856 + # source://prism//lib/prism/translation/ripper.rb#2858 def visit_self_node(node); end # A shareable constant. # - # source://prism//lib/prism/translation/ripper.rb#2862 + # 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#2868 + # source://prism//lib/prism/translation/ripper.rb#2870 def visit_singleton_class_node(node); end # __ENCODING__ # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2878 + # source://prism//lib/prism/translation/ripper.rb#2880 def visit_source_encoding_node(node); end # __FILE__ # ^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2885 + # source://prism//lib/prism/translation/ripper.rb#2887 def visit_source_file_node(node); end # __LINE__ # ^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2892 + # source://prism//lib/prism/translation/ripper.rb#2894 def visit_source_line_node(node); end # foo(*bar) @@ -33041,42 +34177,42 @@ class Prism::Translation::Ripper < ::Prism::Compiler # def foo(*); bar(*); end # ^ # - # source://prism//lib/prism/translation/ripper.rb#2905 + # 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#2910 + # source://prism//lib/prism/translation/ripper.rb#2912 def visit_statements_node(node); end # "foo" # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#2927 + # source://prism//lib/prism/translation/ripper.rb#2929 def visit_string_node(node); end # super(foo) # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#3059 + # source://prism//lib/prism/translation/ripper.rb#3061 def visit_super_node(node); end # :foo # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#3080 + # source://prism//lib/prism/translation/ripper.rb#3082 def visit_symbol_node(node); end # true # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#3104 + # source://prism//lib/prism/translation/ripper.rb#3106 def visit_true_node(node); end # undef foo # ^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#3111 + # source://prism//lib/prism/translation/ripper.rb#3113 def visit_undef_node(node); end # unless foo; bar end @@ -33085,7 +34221,7 @@ class Prism::Translation::Ripper < ::Prism::Compiler # bar unless foo # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#3123 + # source://prism//lib/prism/translation/ripper.rb#3125 def visit_unless_node(node); end # until foo; bar end @@ -33094,13 +34230,13 @@ class Prism::Translation::Ripper < ::Prism::Compiler # bar until foo # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#3151 + # 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#3175 + # source://prism//lib/prism/translation/ripper.rb#3177 def visit_when_node(node); end # while foo; bar end @@ -33109,13 +34245,13 @@ class Prism::Translation::Ripper < ::Prism::Compiler # bar while foo # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#3196 + # source://prism//lib/prism/translation/ripper.rb#3198 def visit_while_node(node); end # `foo` # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#3220 + # source://prism//lib/prism/translation/ripper.rb#3222 def visit_x_string_node(node); end # yield @@ -33124,32 +34260,32 @@ class Prism::Translation::Ripper < ::Prism::Compiler # yield 1 # ^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#3243 + # source://prism//lib/prism/translation/ripper.rb#3245 def visit_yield_node(node); end private # :stopdoc: # - # source://prism//lib/prism/translation/ripper.rb#3383 + # source://prism//lib/prism/translation/ripper.rb#3389 def _dispatch_0; end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def _dispatch_1(_); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def _dispatch_2(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3386 + # source://prism//lib/prism/translation/ripper.rb#3392 def _dispatch_3(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3387 + # source://prism//lib/prism/translation/ripper.rb#3393 def _dispatch_4(_, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3388 + # source://prism//lib/prism/translation/ripper.rb#3394 def _dispatch_5(_, _, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3389 + # source://prism//lib/prism/translation/ripper.rb#3395 def _dispatch_7(_, _, _, _, _, _, _); end # This method is responsible for updating lineno and column information @@ -33158,7 +34294,7 @@ class Prism::Translation::Ripper < ::Prism::Compiler # 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#3373 + # source://prism//lib/prism/translation/ripper.rb#3379 def bounds(location); end # Returns true if the given node is a command node. @@ -33170,7 +34306,7 @@ class Prism::Translation::Ripper < ::Prism::Compiler # This method is called when the parser found syntax error. # - # source://prism//lib/prism/translation/ripper.rb#3411 + # source://prism//lib/prism/translation/ripper.rb#3417 def compile_error(msg); end # This method is provided by the Ripper C extension. It is called when a @@ -33178,589 +34314,589 @@ class Prism::Translation::Ripper < ::Prism::Compiler # that it will modify the string in place and return the number of bytes # that were removed. # - # source://prism//lib/prism/translation/ripper.rb#3426 + # source://prism//lib/prism/translation/ripper.rb#3432 def dedent_string(string, width); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_BEGIN(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_CHAR(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_END(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on___end__(_); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_alias(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_alias_error(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_aref(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_aref_field(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_arg_ambiguous(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_arg_paren(_); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_args_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_args_add_block(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_args_add_star(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3383 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_args_forward; end - # source://prism//lib/prism/translation/ripper.rb#3383 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_args_new; end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_array(_); end - # source://prism//lib/prism/translation/ripper.rb#3387 + # source://prism//lib/prism/translation/ripper.rb#3393 def on_aryptn(_, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_assign(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_assign_error(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_assoc_new(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_assoc_splat(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_assoclist_from_args(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_backref(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_backtick(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_bare_assoc_hash(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_begin(_); end - # source://prism//lib/prism/translation/ripper.rb#3386 + # source://prism//lib/prism/translation/ripper.rb#3392 def on_binary(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_block_var(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_blockarg(_); end - # source://prism//lib/prism/translation/ripper.rb#3387 + # source://prism//lib/prism/translation/ripper.rb#3393 def on_bodystmt(_, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_brace_block(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_break(_); end - # source://prism//lib/prism/translation/ripper.rb#3386 + # source://prism//lib/prism/translation/ripper.rb#3392 def on_call(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_case(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3386 + # source://prism//lib/prism/translation/ripper.rb#3392 def on_class(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_class_name_error(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_comma(_); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_command(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3387 + # source://prism//lib/prism/translation/ripper.rb#3393 def on_command_call(_, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_comment(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_const(_); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_const_path_field(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_const_path_ref(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_const_ref(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_cvar(_); end - # source://prism//lib/prism/translation/ripper.rb#3386 + # source://prism//lib/prism/translation/ripper.rb#3392 def on_def(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_defined(_); end - # source://prism//lib/prism/translation/ripper.rb#3388 + # source://prism//lib/prism/translation/ripper.rb#3394 def on_defs(_, _, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_do_block(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_dot2(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_dot3(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_dyna_symbol(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_else(_); end - # source://prism//lib/prism/translation/ripper.rb#3386 + # source://prism//lib/prism/translation/ripper.rb#3392 def on_elsif(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_embdoc(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_embdoc_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_embdoc_end(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_embexpr_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_embexpr_end(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_embvar(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_ensure(_); end - # source://prism//lib/prism/translation/ripper.rb#3383 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_excessed_comma; end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_fcall(_); end - # source://prism//lib/prism/translation/ripper.rb#3386 + # source://prism//lib/prism/translation/ripper.rb#3392 def on_field(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_float(_); end - # source://prism//lib/prism/translation/ripper.rb#3387 + # source://prism//lib/prism/translation/ripper.rb#3393 def on_fndptn(_, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3386 + # source://prism//lib/prism/translation/ripper.rb#3392 def on_for(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_gvar(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_hash(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_heredoc_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_heredoc_dedent(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_heredoc_end(_); end - # source://prism//lib/prism/translation/ripper.rb#3386 + # source://prism//lib/prism/translation/ripper.rb#3392 def on_hshptn(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_ident(_); end - # source://prism//lib/prism/translation/ripper.rb#3386 + # source://prism//lib/prism/translation/ripper.rb#3392 def on_if(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_if_mod(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3386 + # source://prism//lib/prism/translation/ripper.rb#3392 def on_ifop(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_ignored_nl(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_ignored_sp(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_imaginary(_); end - # source://prism//lib/prism/translation/ripper.rb#3386 + # source://prism//lib/prism/translation/ripper.rb#3392 def on_in(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_int(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_ivar(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_kw(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_kwrest_param(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_label(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_label_end(_); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_lambda(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_lbrace(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_lbracket(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_lparen(_); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_magic_comment(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_massign(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_method_add_arg(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_method_add_block(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_mlhs_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_mlhs_add_post(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_mlhs_add_star(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3383 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_mlhs_new; end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_mlhs_paren(_); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_module(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_mrhs_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_mrhs_add_star(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3383 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_mrhs_new; end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_mrhs_new_from_args(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_next(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_nl(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_nokw_param(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_op(_); end - # source://prism//lib/prism/translation/ripper.rb#3386 + # source://prism//lib/prism/translation/ripper.rb#3392 def on_opassign(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_operator_ambiguous(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_param_error(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3389 + # source://prism//lib/prism/translation/ripper.rb#3395 def on_params(_, _, _, _, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_paren(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_parse_error(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_period(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_program(_); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_qsymbols_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_qsymbols_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#3383 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_qsymbols_new; end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_qwords_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_qwords_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#3383 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_qwords_new; end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_rational(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_rbrace(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_rbracket(_); end - # source://prism//lib/prism/translation/ripper.rb#3383 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_redo; end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_regexp_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_regexp_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_regexp_end(_); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_regexp_literal(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3383 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_regexp_new; end - # source://prism//lib/prism/translation/ripper.rb#3387 + # source://prism//lib/prism/translation/ripper.rb#3393 def on_rescue(_, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_rescue_mod(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_rest_param(_); end - # source://prism//lib/prism/translation/ripper.rb#3383 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_retry; end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_return(_); end - # source://prism//lib/prism/translation/ripper.rb#3383 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_return0; end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_rparen(_); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_sclass(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_semicolon(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_sp(_); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_stmts_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3383 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_stmts_new; end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_string_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_string_concat(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3383 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_string_content; end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_string_dvar(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_string_embexpr(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_string_literal(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_super(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_symbeg(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_symbol(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_symbol_literal(_); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_symbols_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_symbols_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#3383 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_symbols_new; end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_tlambda(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_tlambeg(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_top_const_field(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_top_const_ref(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_tstring_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_tstring_content(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_tstring_end(_); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_unary(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_undef(_); end - # source://prism//lib/prism/translation/ripper.rb#3386 + # source://prism//lib/prism/translation/ripper.rb#3392 def on_unless(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_unless_mod(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_until(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_until_mod(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_var_alias(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_var_field(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_var_ref(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_vcall(_); end - # source://prism//lib/prism/translation/ripper.rb#3383 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_void_stmt; end - # source://prism//lib/prism/translation/ripper.rb#3386 + # source://prism//lib/prism/translation/ripper.rb#3392 def on_when(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_while(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_while_mod(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_word_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3383 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_word_new; end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_words_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_words_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#3383 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_words_new; end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_words_sep(_); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_xstring_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_xstring_literal(_); end - # source://prism//lib/prism/translation/ripper.rb#3383 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_xstring_new; end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_yield(_); end - # source://prism//lib/prism/translation/ripper.rb#3383 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_yield0; end - # source://prism//lib/prism/translation/ripper.rb#3383 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_zsuper; end # Lazily initialize the parse result. # - # source://prism//lib/prism/translation/ripper.rb#3269 + # 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#3278 + # source://prism//lib/prism/translation/ripper.rb#3284 def trailing_comma?(left, right); end # Visit one side of an alias global variable node. @@ -33797,12 +34933,12 @@ class Prism::Translation::Ripper < ::Prism::Compiler # Visit a destructured positional parameter node. # - # source://prism//lib/prism/translation/ripper.rb#2607 + # 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#2978 + # 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 @@ -33811,28 +34947,28 @@ class Prism::Translation::Ripper < ::Prism::Compiler # work well together, so here we need to re-derive the common leading # whitespace. # - # source://prism//lib/prism/translation/ripper.rb#2953 + # 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#3024 + # 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#3041 + # 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#2460 + # 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#3317 + # source://prism//lib/prism/translation/ripper.rb#3323 def visit_number_node(node); end # Visit a pattern within a pattern match. This is used to bypass the @@ -33846,7 +34982,7 @@ class Prism::Translation::Ripper < ::Prism::Compiler # structure of the prism parse tree, but we manually add them here so that # we can mirror Ripper's void stmt. # - # source://prism//lib/prism/translation/ripper.rb#2919 + # source://prism//lib/prism/translation/ripper.rb#2921 def visit_statements_node_body(body); end # Visit an individual part of a string-like node. @@ -33857,7 +34993,7 @@ class Prism::Translation::Ripper < ::Prism::Compiler # 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#3290 + # source://prism//lib/prism/translation/ripper.rb#3296 def visit_token(token, allow_keywords = T.unsafe(nil)); end # Dispatch a words_sep event that contains the space between the elements @@ -33869,26 +35005,26 @@ class Prism::Translation::Ripper < ::Prism::Compiler # 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#3335 + # source://prism//lib/prism/translation/ripper.rb#3341 def visit_write_value(node); end # Returns true if there is a semicolon between the two locations. # # @return [Boolean] # - # source://prism//lib/prism/translation/ripper.rb#3283 + # source://prism//lib/prism/translation/ripper.rb#3289 def void_stmt?(left, right, allow_newline); end # This method is called when weak warning is produced by the parser. # +fmt+ and +args+ is printf style. # - # source://prism//lib/prism/translation/ripper.rb#3402 + # source://prism//lib/prism/translation/ripper.rb#3408 def warn(fmt, *args); end # This method is called when strong warning is produced by the parser. # +fmt+ and +args+ is printf style. # - # source://prism//lib/prism/translation/ripper.rb#3407 + # source://prism//lib/prism/translation/ripper.rb#3413 def warning(fmt, *args); end class << self @@ -33970,8 +35106,6 @@ class Prism::Translation::Ripper < ::Prism::Compiler # 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 - - Result = type_member end # A list of all of the Ruby binary operators. @@ -34016,8 +35150,6 @@ Prism::Translation::Ripper::SCANNER_EVENT_TABLE = T.let(T.unsafe(nil), Hash) # # source://prism//lib/prism/translation/ripper/sexp.rb#10 class Prism::Translation::Ripper::SexpBuilder < ::Prism::Translation::Ripper - Result = type_member { { fixed: T::Array[T.untyped] } } - # :stopdoc: # # source://prism//lib/prism/translation/ripper/sexp.rb#13 @@ -34464,251 +35596,1345 @@ class Prism::Translation::Ripper::SexpBuilder < ::Prism::Translation::Ripper # 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_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#1556 + 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#1562 + 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#1584 + 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#1569 + 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#1575 + 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#96 + def visit_arguments_node(node); end + + # [] + # ^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#63 + def visit_array_node(node); end + + # foo => [bar] + # ^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#73 + def visit_array_pattern_node(node); end + + # { a: 1 } + # ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#102 + def visit_assoc_node(node); end + + # def foo(**); bar(**); end + # ^^ + # + # { **foo } + # ^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#111 + def visit_assoc_splat_node(node); end + + # $+ + # ^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#121 + def visit_back_reference_read_node(node); end + + # begin end + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#127 + def visit_begin_node(node); end + + # foo(&bar) + # ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#160 + def visit_block_argument_node(node); end + + # foo { |; bar| } + # ^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#168 + def visit_block_local_variable_node(node); end + + # A block on a keyword or method call. + # + # source://prism//lib/prism/translation/ruby_parser.rb#173 + def visit_block_node(node); end + + # def foo(&bar); end + # ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#179 + def visit_block_parameter_node(node); end + + # A block's parameters. + # + # source://prism//lib/prism/translation/ruby_parser.rb#184 + def visit_block_parameters_node(node); end + + # break + # ^^^^^ + # + # break foo + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#224 + def visit_break_node(node); end + + # foo.bar &&= baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#287 + def visit_call_and_write_node(node); end + + # foo + # ^^^ + # + # foo.bar + # ^^^^^^^ + # + # foo.bar() {} + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#242 + def visit_call_node(node); end + + # foo.bar += baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#277 + def visit_call_operator_write_node(node); end + + # foo.bar ||= baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#297 + def visit_call_or_write_node(node); end + + # foo.bar, = 1 + # ^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#320 + def visit_call_target_node(node); end + + # foo => bar => baz + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#326 + def visit_capture_pattern_node(node); end + + # case foo; in bar; end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#338 + def visit_case_match_node(node); end + + # case foo; when bar; end + # ^^^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#332 + def visit_case_node(node); end + + # class Foo; end + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#344 + def visit_class_node(node); end + + # @@foo &&= bar + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#385 + def visit_class_variable_and_write_node(node); end + + # @@foo += bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#379 + def visit_class_variable_operator_write_node(node); end + + # @@foo ||= bar + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#391 + def visit_class_variable_or_write_node(node); end + + # @@foo + # ^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#364 + def visit_class_variable_read_node(node); end + + # @@foo, = bar + # ^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#397 + def visit_class_variable_target_node(node); end + + # @@foo = 1 + # ^^^^^^^^^ + # + # @@foo, @@bar = 1 + # ^^^^^ ^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#373 + def visit_class_variable_write_node(node); end + + # Foo &&= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#430 + def visit_constant_and_write_node(node); end + + # Foo += bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#424 + def visit_constant_operator_write_node(node); end + + # Foo ||= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#436 + def visit_constant_or_write_node(node); end + + # Foo::Bar &&= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#473 + def visit_constant_path_and_write_node(node); end + + # Foo::Bar + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#448 + def visit_constant_path_node(node); end + + # Foo::Bar += baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#467 + def visit_constant_path_operator_write_node(node); end + + # Foo::Bar ||= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#479 + def visit_constant_path_or_write_node(node); end + + # Foo::Bar, = baz + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#485 + def visit_constant_path_target_node(node); end + + # Foo::Bar = 1 + # ^^^^^^^^^^^^ + # + # Foo::Foo, Bar::Bar = 1 + # ^^^^^^^^ ^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#461 + def visit_constant_path_write_node(node); end + + # Foo + # ^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#409 + def visit_constant_read_node(node); end + + # Foo, = bar + # ^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#442 + def visit_constant_target_node(node); end + + # Foo = 1 + # ^^^^^^^ + # + # Foo, Bar = 1 + # ^^^ ^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#418 + def visit_constant_write_node(node); end + + # def foo; end + # ^^^^^^^^^^^^ + # + # def self.foo; end + # ^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#501 + def visit_def_node(node); end + + # defined? a + # ^^^^^^^^^^ + # + # defined?(a) + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#532 + def visit_defined_node(node); end + + # if foo then bar else baz end + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#538 + def visit_else_node(node); end + + # "foo #{bar}" + # ^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#544 + def visit_embedded_statements_node(node); end + + # "foo #@bar" + # ^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#552 + def visit_embedded_variable_node(node); end + + # begin; foo; ensure; bar; end + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#558 + def visit_ensure_node(node); end + + # false + # ^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#564 + def visit_false_node(node); end + + # foo => [*, bar, *] + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#570 + def visit_find_pattern_node(node); end + + # if foo .. bar; end + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#576 + def visit_flip_flop_node(node); end + + # 1.0 + # ^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#586 + def visit_float_node(node); end + + # for foo in bar do end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#592 + def visit_for_node(node); end + + # def foo(...); bar(...); end + # ^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#598 + def visit_forwarding_arguments_node(node); end + + # def foo(...); end + # ^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#604 + def visit_forwarding_parameter_node(node); end + + # super + # ^^^^^ + # + # super {} + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#613 + def visit_forwarding_super_node(node); end + + # $foo &&= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#640 + def visit_global_variable_and_write_node(node); end + + # $foo += bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#634 + def visit_global_variable_operator_write_node(node); end + + # $foo ||= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#646 + def visit_global_variable_or_write_node(node); end + + # $foo + # ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#619 + def visit_global_variable_read_node(node); end + + # $foo, = bar + # ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#652 + def visit_global_variable_target_node(node); end + + # $foo = 1 + # ^^^^^^^^ + # + # $foo, $bar = 1 + # ^^^^ ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#628 + def visit_global_variable_write_node(node); end + + # {} + # ^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#658 + def visit_hash_node(node); end + + # foo => {} + # ^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#664 + 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#685 + def visit_if_node(node); end + + # 1i + # + # source://prism//lib/prism/translation/ruby_parser.rb#690 + def visit_imaginary_node(node); end + + # { foo: } + # ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#696 + def visit_implicit_node(node); end + + # foo { |bar,| } + # ^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#701 + def visit_implicit_rest_node(node); end + + # case foo; in bar; end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#706 + def visit_in_node(node); end + + # foo[bar] &&= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#732 + def visit_index_and_write_node(node); end + + # foo[bar] += baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#719 + def visit_index_operator_write_node(node); end + + # foo[bar] ||= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#745 + def visit_index_or_write_node(node); end + + # foo[bar], = 1 + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#758 + def visit_index_target_node(node); end + + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#788 + def visit_instance_variable_and_write_node(node); end + + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#782 + def visit_instance_variable_operator_write_node(node); end + + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#794 + def visit_instance_variable_or_write_node(node); end + + # ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#767 + def visit_instance_variable_read_node(node); end + + # @foo, = bar + # ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#800 + def visit_instance_variable_target_node(node); end + + # ^^^^^^^^ + # + # @foo, @bar = 1 + # ^^^^ ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#776 + def visit_instance_variable_write_node(node); end + + # 1 + # ^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#806 + def visit_integer_node(node); end + + # if /foo #{bar}/ then end + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#812 + def visit_interpolated_match_last_line_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 - def on_super(*args); end + # /foo #{bar}/ + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#829 + def visit_interpolated_regular_expression_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 - def on_symbeg(tok); end + # "foo #{bar}" + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#844 + def visit_interpolated_string_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 - def on_symbol(*args); end + # :"foo #{bar}" + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#851 + def visit_interpolated_symbol_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 - def on_symbol_literal(*args); end + # `foo #{bar}` + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#858 + def visit_interpolated_x_string_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 - def on_symbols_add(*args); end + # -> { it } + # ^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#923 + def visit_it_local_variable_read_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 - def on_symbols_beg(tok); end + # foo(bar: baz) + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#929 + def visit_keyword_hash_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 - def on_symbols_new(*args); end + # def foo(**bar); end + # ^^^^^ + # + # def foo(**); end + # ^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#938 + def visit_keyword_rest_parameter_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 - def on_tlambda(tok); end + # -> {} + # + # source://prism//lib/prism/translation/ruby_parser.rb#943 + def visit_lambda_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 - def on_tlambeg(tok); end + # foo &&= bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#986 + def visit_local_variable_and_write_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 - def on_top_const_field(*args); end + # foo += bar + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#980 + def visit_local_variable_operator_write_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 - def on_top_const_ref(*args); end + # foo ||= bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#992 + def visit_local_variable_or_write_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 - def on_tstring_beg(tok); end + # foo + # ^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#961 + def visit_local_variable_read_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 - def on_tstring_content(tok); end + # foo, = bar + # ^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#998 + def visit_local_variable_target_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 - def on_tstring_end(tok); end + # foo = 1 + # ^^^^^^^ + # + # foo, bar = 1 + # ^^^ ^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#974 + def visit_local_variable_write_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 - def on_unary(*args); end + # if /foo/ then end + # ^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1004 + def visit_match_last_line_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 - def on_undef(*args); end + # foo in bar + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1010 + def visit_match_predicate_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 - def on_unless(*args); end + # foo => bar + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1016 + def visit_match_required_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 - def on_unless_mod(*args); end + # /(?foo)/ =~ bar + # ^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1022 + def visit_match_write_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 - def on_until(*args); 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#1029 + def visit_missing_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 - def on_until_mod(*args); end + # module Foo; end + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1035 + def visit_module_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 - def on_var_alias(*args); end + # foo, bar = baz + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1055 + def visit_multi_target_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 - def on_var_field(*args); end + # foo, bar = baz + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1065 + def visit_multi_write_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 - def on_var_ref(*args); end + # next + # ^^^^ + # + # next foo + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1089 + def visit_next_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 - def on_vcall(*args); end + # nil + # ^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1102 + def visit_nil_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 - def on_void_stmt(*args); end + # def foo(**nil); end + # ^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1108 + def visit_no_keywords_parameter_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 - def on_when(*args); end + # -> { _1 + _2 } + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1114 + def visit_numbered_parameters_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 - def on_while(*args); end + # $1 + # ^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1120 + def visit_numbered_reference_read_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 - def on_while_mod(*args); end + # def foo(bar: baz); end + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1126 + def visit_optional_keyword_parameter_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 - def on_word_add(*args); end + # def foo(bar = 1); end + # ^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1132 + def visit_optional_parameter_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 - def on_word_new(*args); end + # a or b + # ^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1138 + def visit_or_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 - def on_words_add(*args); end + # def foo(bar, *baz); end + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1144 + def visit_parameters_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 - def on_words_beg(tok); end + # () + # ^^ + # + # (1) + # ^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1182 + def visit_parentheses_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 - def on_words_new(*args); end + # foo => ^(bar) + # ^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1192 + def visit_pinned_expression_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#55 - def on_words_sep(tok); end + # foo = 1 and bar => ^foo + # ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1198 + def visit_pinned_variable_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 - def on_xstring_add(*args); end + # END {} + # + # source://prism//lib/prism/translation/ruby_parser.rb#1207 + def visit_post_execution_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 - def on_xstring_literal(*args); end + # BEGIN {} + # + # source://prism//lib/prism/translation/ruby_parser.rb#1212 + def visit_pre_execution_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 - def on_xstring_new(*args); end + # The top-level program node. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1217 + def visit_program_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 - def on_yield(*args); end + # 0..5 + # ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1223 + def visit_range_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 - def on_yield0(*args); end + # 1r + # ^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1245 + def visit_rational_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#47 - def on_zsuper(*args); end + # redo + # ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1251 + def visit_redo_node(node); end - private + # /foo/ + # ^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1257 + def visit_regular_expression_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#61 - def compile_error(mesg); end + # def foo(bar:); end + # ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1263 + def visit_required_keyword_parameter_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#17 - def dedent_element(e, width); end + # def foo(bar); end + # ^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1269 + def visit_required_parameter_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#61 - def on_error(mesg); end + # foo rescue bar + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1275 + def visit_rescue_modifier_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#24 - def on_heredoc_dedent(val, width); end + # begin; rescue; end + # ^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1281 + def visit_rescue_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#61 - def on_parse_error(mesg); end -end + # def foo(*bar); end + # ^^^^ + # + # def foo(*); end + # ^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1301 + def visit_rest_parameter_node(node); 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 - Result = type_member { { fixed: T::Array[T.untyped] } } + # retry + # ^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1307 + def visit_retry_node(node); end - private + # return + # ^^^^^^ + # + # return 1 + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1316 + def visit_return_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#92 - def _dispatch_event_new; end + # self + # ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1329 + def visit_self_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#96 - def _dispatch_event_push(list, item); end + # A shareable constant. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1334 + def visit_shareable_constant_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#96 - def on_args_add(list, item); end + # class << self; end + # ^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1340 + def visit_singleton_class_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#92 - def on_args_new; end + # __ENCODING__ + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1348 + def visit_source_encoding_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#79 - def on_heredoc_dedent(val, width); end + # __FILE__ + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1355 + def visit_source_file_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#96 - def on_mlhs_add(list, item); end + # __LINE__ + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1361 + def visit_source_line_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#109 - def on_mlhs_add_post(list, post); end + # foo(*bar) + # ^^^^ + # + # def foo((bar, *baz)); end + # ^^^^ + # + # def foo(*); bar(*); end + # ^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1373 + def visit_splat_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#105 - def on_mlhs_add_star(list, star); end + # A list of statements. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1382 + def visit_statements_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#92 - def on_mlhs_new; end + # "foo" + # ^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1394 + def visit_string_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#101 - def on_mlhs_paren(list); end + # super(foo) + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1400 + def visit_super_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#96 - def on_mrhs_add(list, item); end + # :foo + # ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1414 + def visit_symbol_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#92 - def on_mrhs_new; end + # true + # ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1420 + def visit_true_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#96 - def on_qsymbols_add(list, item); end + # undef foo + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1426 + def visit_undef_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#92 - def on_qsymbols_new; end + # unless foo; bar end + # ^^^^^^^^^^^^^^^^^^^ + # + # bar unless foo + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1436 + def visit_unless_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#96 - def on_qwords_add(list, item); end + # until foo; bar end + # ^^^^^^^^^^^^^^^^^ + # + # bar until foo + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1445 + def visit_until_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#92 - def on_qwords_new; end + # case foo; when bar; end + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1451 + def visit_when_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#96 - def on_regexp_add(list, item); end + # while foo; bar end + # ^^^^^^^^^^^^^^^^^^ + # + # bar while foo + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1460 + def visit_while_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#92 - def on_regexp_new; end + # `foo` + # ^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1466 + def visit_x_string_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#96 - def on_stmts_add(list, item); end + # yield + # ^^^^^ + # + # yield 1 + # ^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1482 + def visit_yield_node(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#92 - def on_stmts_new; end + private - # source://prism//lib/prism/translation/ripper/sexp.rb#96 - def on_string_add(list, item); end + # 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#403 + def class_variable_write_type; end - # source://prism//lib/prism/translation/ripper/sexp.rb#96 - def on_symbols_add(list, item); end + # Create a new compiler with the given options. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1489 + def copy_compiler(in_def: T.unsafe(nil), in_pattern: T.unsafe(nil)); end - # source://prism//lib/prism/translation/ripper/sexp.rb#92 - def on_symbols_new; 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#308 + def op_asgn?(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#96 - def on_word_add(list, item); 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#314 + def op_asgn_type(node, type); end - # source://prism//lib/prism/translation/ripper/sexp.rb#92 - def on_word_new; end + # Create a new Sexp object from the given prism node and arguments. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1494 + def s(node, *arguments); end - # source://prism//lib/prism/translation/ripper/sexp.rb#96 - def on_words_add(list, item); 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#1504 + def visit_block(node, sexp, block); end - # source://prism//lib/prism/translation/ripper/sexp.rb#92 - def on_words_new; end + # def foo((bar, baz)); end + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1159 + def visit_destructured_parameter(node); end - # source://prism//lib/prism/translation/ripper/sexp.rb#96 - def on_xstring_add(list, item); end + # Visit the interpolated content of the string-like node. + # + # source://prism//lib/prism/translation/ruby_parser.rb#865 + def visit_interpolated_parts(parts); end - # source://prism//lib/prism/translation/ripper/sexp.rb#92 - def on_xstring_new; end -end + # Pattern constants get wrapped in another layer of :const. + # + # source://prism//lib/prism/translation/ruby_parser.rb#1525 + def visit_pattern_constant(node); end -class Prism::Translation::RipperCompiler < Prism::Compiler - Result = type_member -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#1235 + def visit_range_bounds_node(node); end -class Prism::Translation::RubyParser::Compiler < Prism::Compiler - Result = type_member { { fixed: Sexp } } + # 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#1539 + def visit_write_value(node); end end # Represents the use of the literal `true` keyword. @@ -34716,73 +36942,73 @@ end # true # ^^^^ # -# source://prism//lib/prism/node.rb#19158 +# source://prism//lib/prism/node.rb#18041 class Prism::TrueNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [TrueNode] a new instance of TrueNode # - # source://prism//lib/prism/node.rb#19160 + # source://prism//lib/prism/node.rb#18043 sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#19235 + # source://prism//lib/prism/node.rb#18116 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#19167 + # source://prism//lib/prism/node.rb#18049 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#19172 + # source://prism//lib/prism/node.rb#18054 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#19182 + # source://prism//lib/prism/node.rb#18064 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#19177 + # source://prism//lib/prism/node.rb#18059 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?location: Location) -> TrueNode # - # source://prism//lib/prism/node.rb#19187 + # source://prism//lib/prism/node.rb#18069 sig { params(location: Prism::Location).returns(Prism::TrueNode) } def copy(location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#19172 + # source://prism//lib/prism/node.rb#18054 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } # - # source://prism//lib/prism/node.rb#19195 + # source://prism//lib/prism/node.rb#18077 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#19200 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#18082 + sig { override.returns(String) } + def inspect; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by @@ -34799,7 +37025,7 @@ class Prism::TrueNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#19219 + # source://prism//lib/prism/node.rb#18100 sig { override.returns(Symbol) } def type; end @@ -34811,7 +37037,7 @@ class Prism::TrueNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#19229 + # source://prism//lib/prism/node.rb#18110 def type; end end end @@ -34821,13 +37047,13 @@ end # undef :foo, :bar, :baz # ^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#19244 +# source://prism//lib/prism/node.rb#18125 class Prism::UndefNode < ::Prism::Node # def initialize: (Array[SymbolNode | InterpolatedSymbolNode] names, Location keyword_loc, Location location) -> void # # @return [UndefNode] a new instance of UndefNode # - # source://prism//lib/prism/node.rb#19246 + # source://prism//lib/prism/node.rb#18127 sig do params( source: Prism::Source, @@ -34841,36 +37067,36 @@ class Prism::UndefNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#19340 + # source://prism//lib/prism/node.rb#18217 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#19255 + # source://prism//lib/prism/node.rb#18135 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#19260 + # source://prism//lib/prism/node.rb#18140 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#19270 + # source://prism//lib/prism/node.rb#18150 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#19265 + # source://prism//lib/prism/node.rb#18145 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?names: Array[SymbolNode | InterpolatedSymbolNode], ?keyword_loc: Location, ?location: Location) -> UndefNode # - # source://prism//lib/prism/node.rb#19275 + # source://prism//lib/prism/node.rb#18155 sig do params( names: T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)], @@ -34883,40 +37109,40 @@ class Prism::UndefNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#19260 + # source://prism//lib/prism/node.rb#18140 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { names: Array[SymbolNode | InterpolatedSymbolNode], keyword_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#19283 + # source://prism//lib/prism/node.rb#18163 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#19303 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#18183 + sig { override.returns(String) } + def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#19298 + # source://prism//lib/prism/node.rb#18178 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#19291 + # source://prism//lib/prism/node.rb#18171 sig { returns(Prism::Location) } def keyword_loc; end # attr_reader names: Array[SymbolNode | InterpolatedSymbolNode] # - # source://prism//lib/prism/node.rb#19288 + # source://prism//lib/prism/node.rb#18168 sig { returns(T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)]) } def names; end @@ -34935,7 +37161,7 @@ class Prism::UndefNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#19324 + # source://prism//lib/prism/node.rb#18201 sig { override.returns(Symbol) } def type; end @@ -34947,7 +37173,7 @@ class Prism::UndefNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#19334 + # source://prism//lib/prism/node.rb#18211 def type; end end end @@ -34960,13 +37186,13 @@ end # unless foo then bar end # ^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#19355 +# source://prism//lib/prism/node.rb#18232 class Prism::UnlessNode < ::Prism::Node # def initialize: (Location keyword_loc, Prism::node predicate, Location? then_keyword_loc, StatementsNode? statements, ElseNode? consequent, Location? end_keyword_loc, Location location) -> void # # @return [UnlessNode] a new instance of UnlessNode # - # source://prism//lib/prism/node.rb#19357 + # source://prism//lib/prism/node.rb#18234 sig do params( source: Prism::Source, @@ -34984,30 +37210,30 @@ class Prism::UnlessNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#19543 + # source://prism//lib/prism/node.rb#18399 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#19370 + # source://prism//lib/prism/node.rb#18246 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#19379 + # source://prism//lib/prism/node.rb#18251 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#19393 + # source://prism//lib/prism/node.rb#18265 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#19384 + # source://prism//lib/prism/node.rb#18256 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end @@ -35016,13 +37242,13 @@ class Prism::UnlessNode < ::Prism::Node # unless cond then bar else baz end # ^^^^^^^^ # - # source://prism//lib/prism/node.rb#19457 + # source://prism//lib/prism/node.rb#18331 sig { returns(T.nilable(Prism::ElseNode)) } def consequent; end # def copy: (?keyword_loc: Location, ?predicate: Prism::node, ?then_keyword_loc: Location?, ?statements: StatementsNode?, ?consequent: ElseNode?, ?end_keyword_loc: Location?, ?location: Location) -> UnlessNode # - # source://prism//lib/prism/node.rb#19398 + # source://prism//lib/prism/node.rb#18270 sig do params( keyword_loc: Prism::Location, @@ -35039,19 +37265,19 @@ class Prism::UnlessNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#19379 + # source://prism//lib/prism/node.rb#18251 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, predicate: Prism::node, then_keyword_loc: Location?, statements: StatementsNode?, consequent: ElseNode?, end_keyword_loc: Location?, location: Location } # - # source://prism//lib/prism/node.rb#19406 + # source://prism//lib/prism/node.rb#18278 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#19486 + # source://prism//lib/prism/node.rb#18360 sig { returns(T.nilable(String)) } def end_keyword; end @@ -35060,22 +37286,22 @@ class Prism::UnlessNode < ::Prism::Node # unless cond then bar end # ^^^ # - # source://prism//lib/prism/node.rb#19463 + # source://prism//lib/prism/node.rb#18337 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#19491 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#18365 + sig { override.returns(String) } + def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#19476 + # source://prism//lib/prism/node.rb#18350 sig { returns(String) } def keyword; end @@ -35087,10 +37313,13 @@ class Prism::UnlessNode < ::Prism::Node # bar unless cond # ^^^^^^ # - # source://prism//lib/prism/node.rb#19417 + # source://prism//lib/prism/node.rb#18289 sig { returns(Prism::Location) } def keyword_loc; end + # source://prism//lib/prism/parse_result/newlines.rb#97 + def newline!(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 @@ -35099,33 +37328,32 @@ class Prism::UnlessNode < ::Prism::Node # bar unless cond # ^^^^ # - # source://prism//lib/prism/node.rb#19430 + # source://prism//lib/prism/node.rb#18302 sig { returns(Prism::Node) } def predicate; end - # source://prism//lib/prism/node.rb#19374 - def set_newline_flag(newline_marked); end - # The body of statements that will executed if the unless condition is # falsey. Will be `nil` if no body is provided. # # unless cond then bar end # ^^^ # - # source://prism//lib/prism/node.rb#19451 + # source://prism//lib/prism/node.rb#18325 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # def then_keyword: () -> String? # - # source://prism//lib/prism/node.rb#19481 + # source://prism//lib/prism/node.rb#18355 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#19434 + # unless cond then bar end + # ^^^^ + # + # source://prism//lib/prism/node.rb#18308 sig { returns(T.nilable(Prism::Location)) } def then_keyword_loc; end @@ -35144,7 +37372,7 @@ class Prism::UnlessNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#19527 + # source://prism//lib/prism/node.rb#18383 sig { override.returns(Symbol) } def type; end @@ -35156,7 +37384,7 @@ class Prism::UnlessNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#19537 + # source://prism//lib/prism/node.rb#18393 def type; end end end @@ -35169,13 +37397,13 @@ end # until foo do bar end # ^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#19561 +# source://prism//lib/prism/node.rb#18417 class Prism::UntilNode < ::Prism::Node # def initialize: (Integer flags, Location keyword_loc, Location? closing_loc, Prism::node predicate, StatementsNode? statements, Location location) -> void # # @return [UntilNode] a new instance of UntilNode # - # source://prism//lib/prism/node.rb#19563 + # source://prism//lib/prism/node.rb#18419 sig do params( source: Prism::Source, @@ -35192,12 +37420,12 @@ class Prism::UntilNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#19707 + # source://prism//lib/prism/node.rb#18545 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#19575 + # source://prism//lib/prism/node.rb#18430 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -35205,43 +37433,43 @@ class Prism::UntilNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#19645 + # source://prism//lib/prism/node.rb#18496 sig { returns(T::Boolean) } def begin_modifier?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#19584 + # source://prism//lib/prism/node.rb#18435 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#19655 + # source://prism//lib/prism/node.rb#18506 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#19626 + # source://prism//lib/prism/node.rb#18477 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#19597 + # source://prism//lib/prism/node.rb#18448 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#19589 + # source://prism//lib/prism/node.rb#18440 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?keyword_loc: Location, ?closing_loc: Location?, ?predicate: Prism::node, ?statements: StatementsNode?, ?location: Location) -> UntilNode # - # source://prism//lib/prism/node.rb#19602 + # source://prism//lib/prism/node.rb#18453 sig do params( flags: Integer, @@ -35257,49 +37485,49 @@ class Prism::UntilNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#19584 + # source://prism//lib/prism/node.rb#18435 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, keyword_loc: Location, closing_loc: Location?, predicate: Prism::node, statements: StatementsNode?, location: Location } # - # source://prism//lib/prism/node.rb#19610 + # source://prism//lib/prism/node.rb#18461 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#19660 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#18511 + sig { override.returns(String) } + def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#19650 + # source://prism//lib/prism/node.rb#18501 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#19619 + # source://prism//lib/prism/node.rb#18470 sig { returns(Prism::Location) } def keyword_loc; end + # source://prism//lib/prism/parse_result/newlines.rb#103 + def newline!(lines); end + # attr_reader predicate: Prism::node # - # source://prism//lib/prism/node.rb#19639 + # source://prism//lib/prism/node.rb#18490 sig { returns(Prism::Node) } def predicate; end - # source://prism//lib/prism/node.rb#19579 - def set_newline_flag(newline_marked); end - # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#19642 + # source://prism//lib/prism/node.rb#18493 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -35318,7 +37546,7 @@ class Prism::UntilNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#19691 + # source://prism//lib/prism/node.rb#18529 sig { override.returns(Symbol) } def type; end @@ -35326,7 +37554,7 @@ class Prism::UntilNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#19615 + # source://prism//lib/prism/node.rb#18466 sig { returns(Integer) } def flags; end @@ -35338,7 +37566,7 @@ class Prism::UntilNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#19701 + # source://prism//lib/prism/node.rb#18539 def type; end end end @@ -35889,6 +38117,12 @@ class Prism::Visitor < ::Prism::BasicVisitor 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 @@ -36275,13 +38509,13 @@ end # ^^^^^^^^^ # end # -# source://prism//lib/prism/node.rb#19723 +# source://prism//lib/prism/node.rb#18561 class Prism::WhenNode < ::Prism::Node # def initialize: (Location keyword_loc, Array[Prism::node] conditions, Location? then_keyword_loc, StatementsNode? statements, Location location) -> void # # @return [WhenNode] a new instance of WhenNode # - # source://prism//lib/prism/node.rb#19725 + # source://prism//lib/prism/node.rb#18563 sig do params( source: Prism::Source, @@ -36297,42 +38531,42 @@ class Prism::WhenNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#19852 + # source://prism//lib/prism/node.rb#18679 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#19736 + # source://prism//lib/prism/node.rb#18573 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#19741 + # source://prism//lib/prism/node.rb#18578 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#19754 + # source://prism//lib/prism/node.rb#18591 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#19746 + # source://prism//lib/prism/node.rb#18583 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader conditions: Array[Prism::node] # - # source://prism//lib/prism/node.rb#19779 + # source://prism//lib/prism/node.rb#18616 sig { returns(T::Array[Prism::Node]) } def conditions; end # def copy: (?keyword_loc: Location, ?conditions: Array[Prism::node], ?then_keyword_loc: Location?, ?statements: StatementsNode?, ?location: Location) -> WhenNode # - # source://prism//lib/prism/node.rb#19759 + # source://prism//lib/prism/node.rb#18596 sig do params( keyword_loc: Prism::Location, @@ -36347,52 +38581,52 @@ class Prism::WhenNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#19741 + # source://prism//lib/prism/node.rb#18578 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, conditions: Array[Prism::node], then_keyword_loc: Location?, statements: StatementsNode?, location: Location } # - # source://prism//lib/prism/node.rb#19767 + # source://prism//lib/prism/node.rb#18604 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#19808 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#18645 + sig { override.returns(String) } + def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#19798 + # source://prism//lib/prism/node.rb#18635 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#19772 + # source://prism//lib/prism/node.rb#18609 sig { returns(Prism::Location) } def keyword_loc; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#19795 + # source://prism//lib/prism/node.rb#18632 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # def then_keyword: () -> String? # - # source://prism//lib/prism/node.rb#19803 + # source://prism//lib/prism/node.rb#18640 sig { returns(T.nilable(String)) } def then_keyword; end # attr_reader then_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#19782 + # source://prism//lib/prism/node.rb#18619 sig { returns(T.nilable(Prism::Location)) } def then_keyword_loc; end @@ -36411,7 +38645,7 @@ class Prism::WhenNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#19836 + # source://prism//lib/prism/node.rb#18663 sig { override.returns(Symbol) } def type; end @@ -36423,7 +38657,7 @@ class Prism::WhenNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#19846 + # source://prism//lib/prism/node.rb#18673 def type; end end end @@ -36436,13 +38670,13 @@ end # while foo do bar end # ^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#19869 +# source://prism//lib/prism/node.rb#18696 class Prism::WhileNode < ::Prism::Node # def initialize: (Integer flags, Location keyword_loc, Location? closing_loc, Prism::node predicate, StatementsNode? statements, Location location) -> void # # @return [WhileNode] a new instance of WhileNode # - # source://prism//lib/prism/node.rb#19871 + # source://prism//lib/prism/node.rb#18698 sig do params( source: Prism::Source, @@ -36459,12 +38693,12 @@ class Prism::WhileNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#20015 + # source://prism//lib/prism/node.rb#18824 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#19883 + # source://prism//lib/prism/node.rb#18709 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -36472,43 +38706,43 @@ class Prism::WhileNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#19953 + # source://prism//lib/prism/node.rb#18775 sig { returns(T::Boolean) } def begin_modifier?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#19892 + # source://prism//lib/prism/node.rb#18714 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#19963 + # source://prism//lib/prism/node.rb#18785 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#19934 + # source://prism//lib/prism/node.rb#18756 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#19905 + # source://prism//lib/prism/node.rb#18727 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#19897 + # source://prism//lib/prism/node.rb#18719 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?keyword_loc: Location, ?closing_loc: Location?, ?predicate: Prism::node, ?statements: StatementsNode?, ?location: Location) -> WhileNode # - # source://prism//lib/prism/node.rb#19910 + # source://prism//lib/prism/node.rb#18732 sig do params( flags: Integer, @@ -36524,49 +38758,49 @@ class Prism::WhileNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#19892 + # source://prism//lib/prism/node.rb#18714 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, keyword_loc: Location, closing_loc: Location?, predicate: Prism::node, statements: StatementsNode?, location: Location } # - # source://prism//lib/prism/node.rb#19918 + # source://prism//lib/prism/node.rb#18740 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#19968 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#18790 + sig { override.returns(String) } + def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#19958 + # source://prism//lib/prism/node.rb#18780 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#19927 + # source://prism//lib/prism/node.rb#18749 sig { returns(Prism::Location) } def keyword_loc; end + # source://prism//lib/prism/parse_result/newlines.rb#109 + def newline!(lines); end + # attr_reader predicate: Prism::node # - # source://prism//lib/prism/node.rb#19947 + # source://prism//lib/prism/node.rb#18769 sig { returns(Prism::Node) } def predicate; end - # source://prism//lib/prism/node.rb#19887 - def set_newline_flag(newline_marked); end - # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#19950 + # source://prism//lib/prism/node.rb#18772 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -36585,7 +38819,7 @@ class Prism::WhileNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#19999 + # source://prism//lib/prism/node.rb#18808 sig { override.returns(Symbol) } def type; end @@ -36593,7 +38827,7 @@ class Prism::WhileNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#19923 + # source://prism//lib/prism/node.rb#18745 sig { returns(Integer) } def flags; end @@ -36605,7 +38839,7 @@ class Prism::WhileNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#20009 + # source://prism//lib/prism/node.rb#18818 def type; end end end @@ -36615,7 +38849,7 @@ end # `foo` # ^^^^^ # -# source://prism//lib/prism/node.rb#20029 +# source://prism//lib/prism/node.rb#18838 class Prism::XStringNode < ::Prism::Node include ::Prism::HeredocQuery @@ -36623,7 +38857,7 @@ class Prism::XStringNode < ::Prism::Node # # @return [XStringNode] a new instance of XStringNode # - # source://prism//lib/prism/node.rb#20031 + # source://prism//lib/prism/node.rb#18840 sig do params( source: Prism::Source, @@ -36640,60 +38874,60 @@ class Prism::XStringNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#20170 + # source://prism//lib/prism/node.rb#18971 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#20043 + # source://prism//lib/prism/node.rb#18851 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#20048 + # source://prism//lib/prism/node.rb#18856 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#20124 + # source://prism//lib/prism/node.rb#18932 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#20094 + # source://prism//lib/prism/node.rb#18902 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#20058 + # source://prism//lib/prism/node.rb#18866 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#20053 + # source://prism//lib/prism/node.rb#18861 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def content: () -> String # - # source://prism//lib/prism/node.rb#20119 + # source://prism//lib/prism/node.rb#18927 sig { returns(String) } def content; end # attr_reader content_loc: Location # - # source://prism//lib/prism/node.rb#20087 + # source://prism//lib/prism/node.rb#18895 sig { returns(Prism::Location) } def content_loc; end # def copy: (?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String, ?location: Location) -> XStringNode # - # source://prism//lib/prism/node.rb#20063 + # source://prism//lib/prism/node.rb#18871 sig do params( flags: Integer, @@ -36709,13 +38943,13 @@ class Prism::XStringNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#20048 + # source://prism//lib/prism/node.rb#18856 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location } # - # source://prism//lib/prism/node.rb#20071 + # source://prism//lib/prism/node.rb#18879 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -36726,7 +38960,7 @@ class Prism::XStringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#20109 + # source://prism//lib/prism/node.rb#18917 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -36734,35 +38968,35 @@ class Prism::XStringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#20104 + # source://prism//lib/prism/node.rb#18912 sig { returns(T::Boolean) } def forced_utf8_encoding?; end sig { returns(T::Boolean) } def heredoc?; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#20129 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#18937 + sig { override.returns(String) } + def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#20114 + # source://prism//lib/prism/node.rb#18922 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#20080 + # source://prism//lib/prism/node.rb#18888 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#72 + # source://prism//lib/prism/node_ext.rb#86 sig { returns(Prism::InterpolatedXStringNode) } def to_interpolated; end @@ -36781,13 +39015,13 @@ class Prism::XStringNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#20154 + # source://prism//lib/prism/node.rb#18955 sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#20101 + # source://prism//lib/prism/node.rb#18909 sig { returns(String) } def unescaped; end @@ -36795,7 +39029,7 @@ class Prism::XStringNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#20076 + # source://prism//lib/prism/node.rb#18884 sig { returns(Integer) } def flags; end @@ -36807,7 +39041,7 @@ class Prism::XStringNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#20164 + # source://prism//lib/prism/node.rb#18965 def type; end end end @@ -36817,13 +39051,13 @@ end # yield 1 # ^^^^^^^ # -# source://prism//lib/prism/node.rb#20184 +# source://prism//lib/prism/node.rb#18985 class Prism::YieldNode < ::Prism::Node # def initialize: (Location keyword_loc, Location? lparen_loc, ArgumentsNode? arguments, Location? rparen_loc, Location location) -> void # # @return [YieldNode] a new instance of YieldNode # - # source://prism//lib/prism/node.rb#20186 + # source://prism//lib/prism/node.rb#18987 sig do params( source: Prism::Source, @@ -36839,42 +39073,42 @@ class Prism::YieldNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#20327 + # source://prism//lib/prism/node.rb#19117 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#20197 + # source://prism//lib/prism/node.rb#18997 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#20252 + # source://prism//lib/prism/node.rb#19052 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#20202 + # source://prism//lib/prism/node.rb#19002 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#20214 + # source://prism//lib/prism/node.rb#19014 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#20207 + # source://prism//lib/prism/node.rb#19007 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?keyword_loc: Location, ?lparen_loc: Location?, ?arguments: ArgumentsNode?, ?rparen_loc: Location?, ?location: Location) -> YieldNode # - # source://prism//lib/prism/node.rb#20219 + # source://prism//lib/prism/node.rb#19019 sig do params( keyword_loc: Prism::Location, @@ -36889,58 +39123,58 @@ class Prism::YieldNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#20202 + # source://prism//lib/prism/node.rb#19002 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, location: Location } # - # source://prism//lib/prism/node.rb#20227 + # source://prism//lib/prism/node.rb#19027 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(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#20283 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#19083 + sig { override.returns(String) } + def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#20268 + # source://prism//lib/prism/node.rb#19068 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#20232 + # source://prism//lib/prism/node.rb#19032 sig { returns(Prism::Location) } def keyword_loc; end # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#20273 + # source://prism//lib/prism/node.rb#19073 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#20239 + # source://prism//lib/prism/node.rb#19039 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#20278 + # source://prism//lib/prism/node.rb#19078 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#20255 + # source://prism//lib/prism/node.rb#19055 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end @@ -36959,7 +39193,7 @@ class Prism::YieldNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#20311 + # source://prism//lib/prism/node.rb#19101 sig { override.returns(Symbol) } def type; end @@ -36971,13 +39205,7 @@ class Prism::YieldNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#20321 + # source://prism//lib/prism/node.rb#19111 def type; end end end - -# We keep this shim in here because our client libraries might not have -# ruby_parser in their bundle. -class Sexp < ::Array - Elem = type_member { { fixed: T.untyped }} -end diff --git a/sorbet/rbi/gems/racc@1.7.3.rbi b/sorbet/rbi/gems/racc@1.8.0.rbi similarity index 70% rename from sorbet/rbi/gems/racc@1.7.3.rbi rename to sorbet/rbi/gems/racc@1.8.0.rbi index 3e58f8119..0f0b97999 100644 --- a/sorbet/rbi/gems/racc@1.7.3.rbi +++ b/sorbet/rbi/gems/racc@1.8.0.rbi @@ -4,35 +4,35 @@ # 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/parser.rb#23 +# source://racc//lib/racc/parser.rb#19 ParseError = Racc::ParseError # source://racc//lib/racc/info.rb#17 Racc::Copyright = T.let(T.unsafe(nil), String) -# source://racc//lib/racc/parser.rb#188 +# source://racc//lib/racc/parser.rb#184 class Racc::Parser - # source://racc//lib/racc/parser.rb#283 + # source://racc//lib/racc/parser.rb#279 def _racc_do_parse_rb(arg, in_debug); end - # source://racc//lib/racc/parser.rb#483 + # source://racc//lib/racc/parser.rb#479 def _racc_do_reduce(arg, act); end # common # - # source://racc//lib/racc/parser.rb#386 + # source://racc//lib/racc/parser.rb#382 def _racc_evalact(act, arg); end - # source://racc//lib/racc/parser.rb#236 + # source://racc//lib/racc/parser.rb#232 def _racc_init_sysvars; end - # source://racc//lib/racc/parser.rb#224 + # source://racc//lib/racc/parser.rb#220 def _racc_setup; end - # source://racc//lib/racc/parser.rb#333 + # source://racc//lib/racc/parser.rb#329 def _racc_yyparse_rb(recv, mid, arg, c_debug); end - # source://racc//lib/racc/parser.rb#266 + # source://racc//lib/racc/parser.rb#262 def do_parse; end # The method to fetch next token. @@ -46,7 +46,7 @@ class Racc::Parser # # @raise [NotImplementedError] # - # source://racc//lib/racc/parser.rb#279 + # source://racc//lib/racc/parser.rb#275 def next_token; end # This method is called when a parse error is found. @@ -66,92 +66,92 @@ class Racc::Parser # # @raise [ParseError] # - # source://racc//lib/racc/parser.rb#539 + # source://racc//lib/racc/parser.rb#535 def on_error(t, val, vstack); end - # source://racc//lib/racc/parser.rb#588 + # source://racc//lib/racc/parser.rb#584 def racc_accept; end - # source://racc//lib/racc/parser.rb#593 + # source://racc//lib/racc/parser.rb#589 def racc_e_pop(state, tstack, vstack); end - # source://racc//lib/racc/parser.rb#600 + # source://racc//lib/racc/parser.rb#596 def racc_next_state(curstate, state); end - # source://racc//lib/racc/parser.rb#606 + # source://racc//lib/racc/parser.rb#602 def racc_print_stacks(t, v); end - # source://racc//lib/racc/parser.rb#615 + # source://racc//lib/racc/parser.rb#611 def racc_print_states(s); end # For debugging output # - # source://racc//lib/racc/parser.rb#562 + # source://racc//lib/racc/parser.rb#558 def racc_read_token(t, tok, val); end - # source://racc//lib/racc/parser.rb#575 + # source://racc//lib/racc/parser.rb#571 def racc_reduce(toks, sim, tstack, vstack); end - # source://racc//lib/racc/parser.rb#569 + # source://racc//lib/racc/parser.rb#565 def racc_shift(tok, tstack, vstack); end - # source://racc//lib/racc/parser.rb#622 + # 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#628 + # 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#552 + # source://racc//lib/racc/parser.rb#548 def yyaccept; end # Leave error recovering mode. # - # source://racc//lib/racc/parser.rb#557 + # 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#546 + # source://racc//lib/racc/parser.rb#542 def yyerror; end - # source://racc//lib/racc/parser.rb#328 + # source://racc//lib/racc/parser.rb#324 def yyparse(recv, mid); end class << self - # source://racc//lib/racc/parser.rb#220 + # source://racc//lib/racc/parser.rb#216 def racc_runtime_type; end end end -# source://racc//lib/racc/parser.rb#209 +# 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#211 +# 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#191 +# 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#212 +# source://racc//lib/racc/parser.rb#208 Racc::Parser::Racc_Runtime_Type = T.let(T.unsafe(nil), String) -# source://racc//lib/racc/parser.rb#190 +# source://racc//lib/racc/parser.rb#186 Racc::Parser::Racc_Runtime_Version = T.let(T.unsafe(nil), String) -# source://racc//lib/racc/parser.rb#210 +# source://racc//lib/racc/parser.rb#206 Racc::Parser::Racc_YY_Parse_Method = T.let(T.unsafe(nil), Symbol) -# source://racc//lib/racc/parser.rb#185 +# source://racc//lib/racc/parser.rb#181 Racc::Racc_No_Extensions = T.let(T.unsafe(nil), FalseClass) # source://racc//lib/racc/info.rb#15 diff --git a/sorbet/rbi/gems/rbi@0.1.12.rbi b/sorbet/rbi/gems/rbi@0.1.13.rbi similarity index 99% rename from sorbet/rbi/gems/rbi@0.1.12.rbi rename to sorbet/rbi/gems/rbi@0.1.13.rbi index 7e121a977..8c13f7232 100644 --- a/sorbet/rbi/gems/rbi@0.1.12.rbi +++ b/sorbet/rbi/gems/rbi@0.1.13.rbi @@ -1944,7 +1944,7 @@ class RBI::Rewriters::Merge::Conflict < ::T::Struct def to_s; end class << self - # source://sorbet-runtime/0.5.11361/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11368/lib/types/struct.rb#13 def inherited(s); end end end @@ -2161,7 +2161,7 @@ class RBI::Rewriters::RemoveKnownDefinitions::Operation < ::T::Struct def to_s; end class << self - # source://sorbet-runtime/0.5.11361/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11368/lib/types/struct.rb#13 def inherited(s); end end end diff --git a/sorbet/rbi/gems/rbs@3.4.4.rbi b/sorbet/rbi/gems/rbs@3.4.4.rbi new file mode 100644 index 000000000..74e998b3c --- /dev/null +++ b/sorbet/rbi/gems/rbs@3.4.4.rbi @@ -0,0 +1,6642 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rbs` gem. +# Please instead update this file by running `bin/tapioca gem rbs`. + +# source://rbs//lib/rbs/namespace.rb#120 +module Kernel + # source://rbs//lib/rbs/namespace.rb#121 + def Namespace(name); end + + # source://rbs//lib/rbs/type_name.rb#93 + def TypeName(string); end +end + +# source://rbs//lib/rbs/version.rb#3 +module RBS + class << self + # source://rbs//lib/rbs.rb#67 + def logger; end + + # Returns the value of attribute logger_level. + # + # source://rbs//lib/rbs.rb#64 + def logger_level; end + + # source://rbs//lib/rbs.rb#76 + def logger_level=(level); end + + # Returns the value of attribute logger_output. + # + # source://rbs//lib/rbs.rb#65 + def logger_output; end + + # source://rbs//lib/rbs.rb#71 + def logger_output=(val); end + + # source://rbs//lib/rbs.rb#81 + def print_warning; end + end +end + +# source://rbs//lib/rbs/ast/type_param.rb#4 +module RBS::AST; end + +# source://rbs//lib/rbs/ast/annotation.rb#5 +class RBS::AST::Annotation + # @return [Annotation] a new instance of Annotation + # + # source://rbs//lib/rbs/ast/annotation.rb#9 + def initialize(string:, location:); end + + # source://rbs//lib/rbs/ast/annotation.rb#14 + def ==(other); end + + # source://rbs//lib/rbs/ast/annotation.rb#14 + def eql?(other); end + + # source://rbs//lib/rbs/ast/annotation.rb#20 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/annotation.rb#7 + def location; end + + # Returns the value of attribute string. + # + # source://rbs//lib/rbs/ast/annotation.rb#6 + def string; end + + # source://rbs//lib/rbs/ast/annotation.rb#24 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/comment.rb#5 +class RBS::AST::Comment + # @return [Comment] a new instance of Comment + # + # source://rbs//lib/rbs/ast/comment.rb#9 + def initialize(string:, location:); end + + # source://rbs//lib/rbs/ast/comment.rb#14 + def ==(other); end + + # source://rbs//lib/rbs/ast/comment.rb#14 + def eql?(other); end + + # source://rbs//lib/rbs/ast/comment.rb#20 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/comment.rb#7 + def location; end + + # Returns the value of attribute string. + # + # source://rbs//lib/rbs/ast/comment.rb#6 + def string; end + + # source://rbs//lib/rbs/ast/comment.rb#24 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/declarations.rb#5 +module RBS::AST::Declarations; end + +# source://rbs//lib/rbs/ast/declarations.rb#383 +class RBS::AST::Declarations::AliasDecl < ::RBS::AST::Declarations::Base + # @return [AliasDecl] a new instance of AliasDecl + # + # source://rbs//lib/rbs/ast/declarations.rb#386 + def initialize(new_name:, old_name:, location:, comment:); end + + # source://rbs//lib/rbs/ast/declarations.rb#393 + def ==(other); end + + # Returns the value of attribute comment. + # + # source://rbs//lib/rbs/ast/declarations.rb#384 + def comment; end + + # source://rbs//lib/rbs/ast/declarations.rb#393 + def eql?(other); end + + # source://rbs//lib/rbs/ast/declarations.rb#401 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/declarations.rb#384 + def location; end + + # Returns the value of attribute new_name. + # + # source://rbs//lib/rbs/ast/declarations.rb#384 + def new_name; end + + # Returns the value of attribute old_name. + # + # source://rbs//lib/rbs/ast/declarations.rb#384 + def old_name; end +end + +# source://rbs//lib/rbs/ast/declarations.rb#6 +class RBS::AST::Declarations::Base; end + +# source://rbs//lib/rbs/ast/declarations.rb#55 +class RBS::AST::Declarations::Class < ::RBS::AST::Declarations::Base + include ::RBS::AST::Declarations::NestedDeclarationHelper + include ::RBS::AST::Declarations::MixinHelper + + # @return [Class] a new instance of Class + # + # source://rbs//lib/rbs/ast/declarations.rb#97 + def initialize(name:, type_params:, super_class:, members:, annotations:, location:, comment:); end + + # source://rbs//lib/rbs/ast/declarations.rb#107 + def ==(other); end + + # Returns the value of attribute annotations. + # + # source://rbs//lib/rbs/ast/declarations.rb#93 + def annotations; end + + # Returns the value of attribute comment. + # + # source://rbs//lib/rbs/ast/declarations.rb#95 + def comment; end + + # source://rbs//lib/rbs/ast/declarations.rb#107 + def eql?(other); end + + # source://rbs//lib/rbs/ast/declarations.rb#117 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/declarations.rb#94 + def location; end + + # Returns the value of attribute members. + # + # source://rbs//lib/rbs/ast/declarations.rb#91 + def members; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/ast/declarations.rb#89 + def name; end + + # Returns the value of attribute super_class. + # + # source://rbs//lib/rbs/ast/declarations.rb#92 + def super_class; end + + # source://rbs//lib/rbs/ast/declarations.rb#121 + def to_json(state = T.unsafe(nil)); end + + # Returns the value of attribute type_params. + # + # source://rbs//lib/rbs/ast/declarations.rb#90 + def type_params; end +end + +# source://rbs//lib/rbs/ast/declarations.rb#56 +class RBS::AST::Declarations::Class::Super + # @return [Super] a new instance of Super + # + # source://rbs//lib/rbs/ast/declarations.rb#61 + def initialize(name:, args:, location:); end + + # source://rbs//lib/rbs/ast/declarations.rb#67 + def ==(other); end + + # Returns the value of attribute args. + # + # source://rbs//lib/rbs/ast/declarations.rb#58 + def args; end + + # source://rbs//lib/rbs/ast/declarations.rb#67 + def eql?(other); end + + # source://rbs//lib/rbs/ast/declarations.rb#73 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/declarations.rb#59 + def location; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/ast/declarations.rb#57 + def name; end + + # source://rbs//lib/rbs/ast/declarations.rb#77 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/declarations.rb#406 +class RBS::AST::Declarations::ClassAlias < ::RBS::AST::Declarations::AliasDecl + # source://rbs//lib/rbs/ast/declarations.rb#407 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/declarations.rb#311 +class RBS::AST::Declarations::Constant < ::RBS::AST::Declarations::Base + # @return [Constant] a new instance of Constant + # + # source://rbs//lib/rbs/ast/declarations.rb#317 + def initialize(name:, type:, location:, comment:); end + + # source://rbs//lib/rbs/ast/declarations.rb#324 + def ==(other); end + + # Returns the value of attribute comment. + # + # source://rbs//lib/rbs/ast/declarations.rb#315 + def comment; end + + # source://rbs//lib/rbs/ast/declarations.rb#324 + def eql?(other); end + + # source://rbs//lib/rbs/ast/declarations.rb#332 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/declarations.rb#314 + def location; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/ast/declarations.rb#312 + def name; end + + # source://rbs//lib/rbs/ast/declarations.rb#336 + def to_json(state = T.unsafe(nil)); end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/ast/declarations.rb#313 + def type; end +end + +# source://rbs//lib/rbs/ast/declarations.rb#347 +class RBS::AST::Declarations::Global < ::RBS::AST::Declarations::Base + # @return [Global] a new instance of Global + # + # source://rbs//lib/rbs/ast/declarations.rb#353 + def initialize(name:, type:, location:, comment:); end + + # source://rbs//lib/rbs/ast/declarations.rb#360 + def ==(other); end + + # Returns the value of attribute comment. + # + # source://rbs//lib/rbs/ast/declarations.rb#351 + def comment; end + + # source://rbs//lib/rbs/ast/declarations.rb#360 + def eql?(other); end + + # source://rbs//lib/rbs/ast/declarations.rb#368 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/declarations.rb#350 + def location; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/ast/declarations.rb#348 + def name; end + + # source://rbs//lib/rbs/ast/declarations.rb#372 + def to_json(state = T.unsafe(nil)); end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/ast/declarations.rb#349 + def type; end +end + +# source://rbs//lib/rbs/ast/declarations.rb#223 +class RBS::AST::Declarations::Interface < ::RBS::AST::Declarations::Base + include ::RBS::AST::Declarations::MixinHelper + + # @return [Interface] a new instance of Interface + # + # source://rbs//lib/rbs/ast/declarations.rb#233 + def initialize(name:, type_params:, members:, annotations:, location:, comment:); end + + # source://rbs//lib/rbs/ast/declarations.rb#242 + def ==(other); end + + # Returns the value of attribute annotations. + # + # source://rbs//lib/rbs/ast/declarations.rb#227 + def annotations; end + + # Returns the value of attribute comment. + # + # source://rbs//lib/rbs/ast/declarations.rb#229 + def comment; end + + # source://rbs//lib/rbs/ast/declarations.rb#242 + def eql?(other); end + + # source://rbs//lib/rbs/ast/declarations.rb#251 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/declarations.rb#228 + def location; end + + # Returns the value of attribute members. + # + # source://rbs//lib/rbs/ast/declarations.rb#226 + def members; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/ast/declarations.rb#224 + def name; end + + # source://rbs//lib/rbs/ast/declarations.rb#255 + def to_json(state = T.unsafe(nil)); end + + # Returns the value of attribute type_params. + # + # source://rbs//lib/rbs/ast/declarations.rb#225 + def type_params; end +end + +# source://rbs//lib/rbs/ast/declarations.rb#35 +module RBS::AST::Declarations::MixinHelper + # source://rbs//lib/rbs/ast/declarations.rb#36 + def each_mixin(&block); end +end + +# source://rbs//lib/rbs/ast/declarations.rb#135 +class RBS::AST::Declarations::Module < ::RBS::AST::Declarations::Base + include ::RBS::AST::Declarations::NestedDeclarationHelper + include ::RBS::AST::Declarations::MixinHelper + + # @return [Module] a new instance of Module + # + # source://rbs//lib/rbs/ast/declarations.rb#185 + def initialize(name:, type_params:, members:, self_types:, annotations:, location:, comment:); end + + # source://rbs//lib/rbs/ast/declarations.rb#195 + def ==(other); end + + # Returns the value of attribute annotations. + # + # source://rbs//lib/rbs/ast/declarations.rb#181 + def annotations; end + + # Returns the value of attribute comment. + # + # source://rbs//lib/rbs/ast/declarations.rb#183 + def comment; end + + # source://rbs//lib/rbs/ast/declarations.rb#195 + def eql?(other); end + + # source://rbs//lib/rbs/ast/declarations.rb#205 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/declarations.rb#180 + def location; end + + # Returns the value of attribute members. + # + # source://rbs//lib/rbs/ast/declarations.rb#179 + def members; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/ast/declarations.rb#177 + def name; end + + # Returns the value of attribute self_types. + # + # source://rbs//lib/rbs/ast/declarations.rb#182 + def self_types; end + + # source://rbs//lib/rbs/ast/declarations.rb#209 + def to_json(state = T.unsafe(nil)); end + + # Returns the value of attribute type_params. + # + # source://rbs//lib/rbs/ast/declarations.rb#178 + def type_params; end +end + +# source://rbs//lib/rbs/ast/declarations.rb#136 +class RBS::AST::Declarations::Module::Self + # @return [Self] a new instance of Self + # + # source://rbs//lib/rbs/ast/declarations.rb#141 + def initialize(name:, args:, location:); end + + # source://rbs//lib/rbs/ast/declarations.rb#147 + def ==(other); end + + # Returns the value of attribute args. + # + # source://rbs//lib/rbs/ast/declarations.rb#138 + def args; end + + # source://rbs//lib/rbs/ast/declarations.rb#147 + def eql?(other); end + + # source://rbs//lib/rbs/ast/declarations.rb#153 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/declarations.rb#139 + def location; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/ast/declarations.rb#137 + def name; end + + # source://rbs//lib/rbs/ast/declarations.rb#157 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/ast/declarations.rb#165 + def to_s; end +end + +# source://rbs//lib/rbs/ast/declarations.rb#418 +class RBS::AST::Declarations::ModuleAlias < ::RBS::AST::Declarations::AliasDecl + # source://rbs//lib/rbs/ast/declarations.rb#419 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/declarations.rb#9 +module RBS::AST::Declarations::NestedDeclarationHelper + # source://rbs//lib/rbs/ast/declarations.rb#22 + def each_decl; end + + # source://rbs//lib/rbs/ast/declarations.rb#10 + def each_member; end +end + +# source://rbs//lib/rbs/ast/declarations.rb#268 +class RBS::AST::Declarations::TypeAlias < ::RBS::AST::Declarations::Base + # @return [TypeAlias] a new instance of TypeAlias + # + # source://rbs//lib/rbs/ast/declarations.rb#276 + def initialize(name:, type_params:, type:, annotations:, location:, comment:); end + + # source://rbs//lib/rbs/ast/declarations.rb#285 + def ==(other); end + + # Returns the value of attribute annotations. + # + # source://rbs//lib/rbs/ast/declarations.rb#272 + def annotations; end + + # Returns the value of attribute comment. + # + # source://rbs//lib/rbs/ast/declarations.rb#274 + def comment; end + + # source://rbs//lib/rbs/ast/declarations.rb#285 + def eql?(other); end + + # source://rbs//lib/rbs/ast/declarations.rb#294 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/declarations.rb#273 + def location; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/ast/declarations.rb#269 + def name; end + + # source://rbs//lib/rbs/ast/declarations.rb#298 + def to_json(state = T.unsafe(nil)); end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/ast/declarations.rb#271 + def type; end + + # Returns the value of attribute type_params. + # + # source://rbs//lib/rbs/ast/declarations.rb#270 + def type_params; end +end + +# source://rbs//lib/rbs/ast/directives.rb#5 +module RBS::AST::Directives; end + +# source://rbs//lib/rbs/ast/directives.rb#6 +class RBS::AST::Directives::Base; end + +# source://rbs//lib/rbs/ast/directives.rb#9 +class RBS::AST::Directives::Use < ::RBS::AST::Directives::Base + # @return [Use] a new instance of Use + # + # source://rbs//lib/rbs/ast/directives.rb#31 + def initialize(clauses:, location:); end + + # Returns the value of attribute clauses. + # + # source://rbs//lib/rbs/ast/directives.rb#29 + def clauses; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/directives.rb#29 + def location; end +end + +# source://rbs//lib/rbs/ast/directives.rb#10 +class RBS::AST::Directives::Use::SingleClause + # @return [SingleClause] a new instance of SingleClause + # + # source://rbs//lib/rbs/ast/directives.rb#13 + def initialize(type_name:, new_name:, location:); end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/directives.rb#11 + def location; end + + # Returns the value of attribute new_name. + # + # source://rbs//lib/rbs/ast/directives.rb#11 + def new_name; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/ast/directives.rb#11 + def type_name; end +end + +# source://rbs//lib/rbs/ast/directives.rb#20 +class RBS::AST::Directives::Use::WildcardClause + # @return [WildcardClause] a new instance of WildcardClause + # + # source://rbs//lib/rbs/ast/directives.rb#23 + def initialize(namespace:, location:); end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/directives.rb#21 + def location; end + + # Returns the value of attribute namespace. + # + # source://rbs//lib/rbs/ast/directives.rb#21 + def namespace; end +end + +# source://rbs//lib/rbs/ast/members.rb#5 +module RBS::AST::Members; end + +# source://rbs//lib/rbs/ast/members.rb#397 +class RBS::AST::Members::Alias < ::RBS::AST::Members::Base + # @return [Alias] a new instance of Alias + # + # source://rbs//lib/rbs/ast/members.rb#405 + def initialize(new_name:, old_name:, kind:, annotations:, location:, comment:); end + + # source://rbs//lib/rbs/ast/members.rb#414 + def ==(other); end + + # Returns the value of attribute annotations. + # + # source://rbs//lib/rbs/ast/members.rb#401 + def annotations; end + + # Returns the value of attribute comment. + # + # source://rbs//lib/rbs/ast/members.rb#403 + def comment; end + + # source://rbs//lib/rbs/ast/members.rb#414 + def eql?(other); end + + # source://rbs//lib/rbs/ast/members.rb#423 + def hash; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/ast/members.rb#439 + def instance?; end + + # Returns the value of attribute kind. + # + # source://rbs//lib/rbs/ast/members.rb#400 + def kind; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/members.rb#402 + def location; end + + # Returns the value of attribute new_name. + # + # source://rbs//lib/rbs/ast/members.rb#398 + def new_name; end + + # Returns the value of attribute old_name. + # + # source://rbs//lib/rbs/ast/members.rb#399 + def old_name; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/ast/members.rb#443 + def singleton?; end + + # source://rbs//lib/rbs/ast/members.rb#427 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/members.rb#327 +class RBS::AST::Members::AttrAccessor < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Attribute + + # source://rbs//lib/rbs/ast/members.rb#330 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/members.rb#309 +class RBS::AST::Members::AttrReader < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Attribute + + # source://rbs//lib/rbs/ast/members.rb#312 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/members.rb#345 +class RBS::AST::Members::AttrWriter < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Attribute + + # source://rbs//lib/rbs/ast/members.rb#348 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/members.rb#258 +module RBS::AST::Members::Attribute + # source://rbs//lib/rbs/ast/members.rb#268 + def initialize(name:, type:, ivar_name:, kind:, annotations:, location:, comment:, visibility: T.unsafe(nil)); end + + # source://rbs//lib/rbs/ast/members.rb#279 + def ==(other); end + + # Returns the value of attribute annotations. + # + # source://rbs//lib/rbs/ast/members.rb#263 + def annotations; end + + # Returns the value of attribute comment. + # + # source://rbs//lib/rbs/ast/members.rb#265 + def comment; end + + # source://rbs//lib/rbs/ast/members.rb#279 + def eql?(other); end + + # source://rbs//lib/rbs/ast/members.rb#290 + def hash; end + + # Returns the value of attribute ivar_name. + # + # source://rbs//lib/rbs/ast/members.rb#262 + def ivar_name; end + + # Returns the value of attribute kind. + # + # source://rbs//lib/rbs/ast/members.rb#261 + def kind; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/members.rb#264 + def location; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/ast/members.rb#259 + def name; end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/ast/members.rb#260 + def type; end + + # source://rbs//lib/rbs/ast/members.rb#294 + def update(name: T.unsafe(nil), type: T.unsafe(nil), ivar_name: T.unsafe(nil), kind: T.unsafe(nil), annotations: T.unsafe(nil), location: T.unsafe(nil), comment: T.unsafe(nil), visibility: T.unsafe(nil)); end + + # Returns the value of attribute visibility. + # + # source://rbs//lib/rbs/ast/members.rb#266 + def visibility; end +end + +# source://rbs//lib/rbs/ast/members.rb#6 +class RBS::AST::Members::Base; end + +# source://rbs//lib/rbs/ast/members.rb#157 +class RBS::AST::Members::ClassInstanceVariable < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Var + + # source://rbs//lib/rbs/ast/members.rb#160 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/members.rb#171 +class RBS::AST::Members::ClassVariable < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Var + + # source://rbs//lib/rbs/ast/members.rb#174 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/members.rb#228 +class RBS::AST::Members::Extend < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Mixin + + # source://rbs//lib/rbs/ast/members.rb#231 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/members.rb#213 +class RBS::AST::Members::Include < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Mixin + + # source://rbs//lib/rbs/ast/members.rb#216 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/members.rb#143 +class RBS::AST::Members::InstanceVariable < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Var + + # source://rbs//lib/rbs/ast/members.rb#146 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/members.rb#363 +module RBS::AST::Members::LocationOnly + # source://rbs//lib/rbs/ast/members.rb#366 + def initialize(location:); end + + # source://rbs//lib/rbs/ast/members.rb#370 + def ==(other); end + + # source://rbs//lib/rbs/ast/members.rb#370 + def eql?(other); end + + # source://rbs//lib/rbs/ast/members.rb#376 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/members.rb#364 + def location; end +end + +# source://rbs//lib/rbs/ast/members.rb#9 +class RBS::AST::Members::MethodDefinition < ::RBS::AST::Members::Base + # @return [MethodDefinition] a new instance of MethodDefinition + # + # source://rbs//lib/rbs/ast/members.rb#53 + def initialize(name:, kind:, overloads:, annotations:, location:, comment:, overloading:, visibility:); end + + # source://rbs//lib/rbs/ast/members.rb#64 + def ==(other); end + + # Returns the value of attribute annotations. + # + # source://rbs//lib/rbs/ast/members.rb#47 + def annotations; end + + # Returns the value of attribute comment. + # + # source://rbs//lib/rbs/ast/members.rb#49 + def comment; end + + # source://rbs//lib/rbs/ast/members.rb#64 + def eql?(other); end + + # source://rbs//lib/rbs/ast/members.rb#75 + def hash; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/ast/members.rb#79 + def instance?; end + + # Returns the value of attribute kind. + # + # source://rbs//lib/rbs/ast/members.rb#45 + def kind; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/members.rb#48 + def location; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/ast/members.rb#44 + def name; end + + # Returns the value of attribute overloading. + # + # source://rbs//lib/rbs/ast/members.rb#50 + def overloading; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/ast/members.rb#87 + def overloading?; end + + # Returns the value of attribute overloads. + # + # source://rbs//lib/rbs/ast/members.rb#46 + def overloads; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/ast/members.rb#83 + def singleton?; end + + # source://rbs//lib/rbs/ast/members.rb#104 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/ast/members.rb#91 + def update(name: T.unsafe(nil), kind: T.unsafe(nil), overloads: T.unsafe(nil), annotations: T.unsafe(nil), location: T.unsafe(nil), comment: T.unsafe(nil), overloading: T.unsafe(nil), visibility: T.unsafe(nil)); end + + # Returns the value of attribute visibility. + # + # source://rbs//lib/rbs/ast/members.rb#51 + def visibility; end +end + +# source://rbs//lib/rbs/ast/members.rb#10 +class RBS::AST::Members::MethodDefinition::Overload + # @return [Overload] a new instance of Overload + # + # source://rbs//lib/rbs/ast/members.rb#13 + def initialize(method_type:, annotations:); end + + # source://rbs//lib/rbs/ast/members.rb#18 + def ==(other); end + + # Returns the value of attribute annotations. + # + # source://rbs//lib/rbs/ast/members.rb#11 + def annotations; end + + # source://rbs//lib/rbs/ast/members.rb#18 + def eql?(other); end + + # source://rbs//lib/rbs/ast/members.rb#22 + def hash; end + + # Returns the value of attribute method_type. + # + # source://rbs//lib/rbs/ast/members.rb#11 + def method_type; end + + # source://rbs//lib/rbs/ast/members.rb#32 + def sub(subst); end + + # source://rbs//lib/rbs/ast/members.rb#36 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/ast/members.rb#28 + def update(annotations: T.unsafe(nil), method_type: T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/members.rb#185 +module RBS::AST::Members::Mixin + # source://rbs//lib/rbs/ast/members.rb#192 + def initialize(name:, args:, annotations:, location:, comment:); end + + # source://rbs//lib/rbs/ast/members.rb#200 + def ==(other); end + + # Returns the value of attribute annotations. + # + # source://rbs//lib/rbs/ast/members.rb#188 + def annotations; end + + # Returns the value of attribute args. + # + # source://rbs//lib/rbs/ast/members.rb#187 + def args; end + + # Returns the value of attribute comment. + # + # source://rbs//lib/rbs/ast/members.rb#190 + def comment; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/ast/members.rb#204 + def eql?(other); end + + # source://rbs//lib/rbs/ast/members.rb#208 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/members.rb#189 + def location; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/ast/members.rb#186 + def name; end +end + +# source://rbs//lib/rbs/ast/members.rb#243 +class RBS::AST::Members::Prepend < ::RBS::AST::Members::Base + include ::RBS::AST::Members::Mixin + + # source://rbs//lib/rbs/ast/members.rb#246 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/members.rb#389 +class RBS::AST::Members::Private < ::RBS::AST::Members::Base + include ::RBS::AST::Members::LocationOnly + + # source://rbs//lib/rbs/ast/members.rb#392 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/members.rb#381 +class RBS::AST::Members::Public < ::RBS::AST::Members::Base + include ::RBS::AST::Members::LocationOnly + + # source://rbs//lib/rbs/ast/members.rb#384 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/ast/members.rb#119 +module RBS::AST::Members::Var + # source://rbs//lib/rbs/ast/members.rb#125 + def initialize(name:, type:, location:, comment:); end + + # source://rbs//lib/rbs/ast/members.rb#132 + def ==(other); end + + # Returns the value of attribute comment. + # + # source://rbs//lib/rbs/ast/members.rb#123 + def comment; end + + # source://rbs//lib/rbs/ast/members.rb#132 + def eql?(other); end + + # source://rbs//lib/rbs/ast/members.rb#138 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/members.rb#122 + def location; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/ast/members.rb#120 + def name; end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/ast/members.rb#121 + def type; end +end + +# source://rbs//lib/rbs/ast/type_param.rb#5 +class RBS::AST::TypeParam + # @return [TypeParam] a new instance of TypeParam + # + # source://rbs//lib/rbs/ast/type_param.rb#8 + def initialize(name:, variance:, upper_bound:, location:); end + + # source://rbs//lib/rbs/ast/type_param.rb#25 + def ==(other); end + + # source://rbs//lib/rbs/ast/type_param.rb#25 + def eql?(other); end + + # source://rbs//lib/rbs/ast/type_param.rb#35 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/type_param.rb#6 + def location; end + + # source://rbs//lib/rbs/ast/type_param.rb#58 + def map_type(&block); end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/ast/type_param.rb#6 + def name; end + + # source://rbs//lib/rbs/ast/type_param.rb#49 + def rename(name); end + + # source://rbs//lib/rbs/ast/type_param.rb#39 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/ast/type_param.rb#110 + def to_s; end + + # source://rbs//lib/rbs/ast/type_param.rb#16 + def unchecked!(value = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/ast/type_param.rb#21 + def unchecked?; end + + # Returns the value of attribute upper_bound. + # + # source://rbs//lib/rbs/ast/type_param.rb#6 + def upper_bound; end + + # Returns the value of attribute variance. + # + # source://rbs//lib/rbs/ast/type_param.rb#6 + def variance; end + + class << self + # source://rbs//lib/rbs/ast/type_param.rb#93 + def rename(params, new_names:); end + + # source://rbs//lib/rbs/ast/type_param.rb#71 + def resolve_variables(params); end + + # source://rbs//lib/rbs/ast/type_param.rb#81 + def subst_var(vars, type); end + end +end + +# source://rbs//lib/rbs/ancestor_graph.rb#4 +class RBS::AncestorGraph + # @return [AncestorGraph] a new instance of AncestorGraph + # + # source://rbs//lib/rbs/ancestor_graph.rb#13 + def initialize(env:, ancestor_builder: T.unsafe(nil)); end + + # Returns the value of attribute ancestor_builder. + # + # source://rbs//lib/rbs/ancestor_graph.rb#9 + def ancestor_builder; end + + # source://rbs//lib/rbs/ancestor_graph.rb#19 + def build; end + + # source://rbs//lib/rbs/ancestor_graph.rb#32 + def build_ancestors(node, ancestors); end + + # Returns the value of attribute children. + # + # source://rbs//lib/rbs/ancestor_graph.rb#11 + def children; end + + # source://rbs//lib/rbs/ancestor_graph.rb#64 + def each_ancestor(node, yielded: T.unsafe(nil), &block); end + + # source://rbs//lib/rbs/ancestor_graph.rb#56 + def each_child(node, &block); end + + # source://rbs//lib/rbs/ancestor_graph.rb#78 + def each_descendant(node, yielded: T.unsafe(nil), &block); end + + # source://rbs//lib/rbs/ancestor_graph.rb#48 + def each_parent(node, &block); end + + # Returns the value of attribute env. + # + # source://rbs//lib/rbs/ancestor_graph.rb#8 + def env; end + + # Returns the value of attribute parents. + # + # source://rbs//lib/rbs/ancestor_graph.rb#10 + def parents; end + + # source://rbs//lib/rbs/ancestor_graph.rb#43 + def register(parent:, child:); end +end + +# source://rbs//lib/rbs/ancestor_graph.rb#5 +class RBS::AncestorGraph::InstanceNode < ::Struct + def type_name; end + def type_name=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rbs//lib/rbs/ancestor_graph.rb#6 +class RBS::AncestorGraph::SingletonNode < ::Struct + def type_name; end + def type_name=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rbs//lib/rbs/errors.rb#19 +class RBS::BaseError < ::StandardError; end + +# source://rbs//lib/rbs/buffer.rb#4 +class RBS::Buffer + # @return [Buffer] a new instance of Buffer + # + # source://rbs//lib/rbs/buffer.rb#8 + def initialize(name:, content:); end + + # Returns the value of attribute content. + # + # source://rbs//lib/rbs/buffer.rb#6 + def content; end + + # source://rbs//lib/rbs/buffer.rb#58 + def inspect; end + + # source://rbs//lib/rbs/buffer.rb#54 + def last_position; end + + # source://rbs//lib/rbs/buffer.rb#13 + def lines; end + + # source://rbs//lib/rbs/buffer.rb#44 + def loc_to_pos(loc); end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/buffer.rb#5 + def name; end + + # source://rbs//lib/rbs/buffer.rb#32 + def pos_to_loc(pos); end + + # source://rbs//lib/rbs/buffer.rb#17 + def ranges; end +end + +# source://rbs//lib/rbs/builtin_names.rb#4 +module RBS::BuiltinNames; end + +# source://rbs//lib/rbs/builtin_names.rb#45 +RBS::BuiltinNames::Array = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs//lib/rbs/builtin_names.rb#37 +RBS::BuiltinNames::BasicObject = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs//lib/rbs/builtin_names.rb#43 +RBS::BuiltinNames::Class = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs//lib/rbs/builtin_names.rb#41 +RBS::BuiltinNames::Comparable = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs//lib/rbs/builtin_names.rb#42 +RBS::BuiltinNames::Enumerable = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs//lib/rbs/builtin_names.rb#48 +RBS::BuiltinNames::Enumerator = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs//lib/rbs/builtin_names.rb#55 +RBS::BuiltinNames::FalseClass = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs//lib/rbs/builtin_names.rb#52 +RBS::BuiltinNames::Float = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs//lib/rbs/builtin_names.rb#46 +RBS::BuiltinNames::Hash = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs//lib/rbs/builtin_names.rb#51 +RBS::BuiltinNames::Integer = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs//lib/rbs/builtin_names.rb#39 +RBS::BuiltinNames::Kernel = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs//lib/rbs/builtin_names.rb#44 +RBS::BuiltinNames::Module = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs//lib/rbs/builtin_names.rb#5 +class RBS::BuiltinNames::Name + # @return [Name] a new instance of Name + # + # source://rbs//lib/rbs/builtin_names.rb#8 + def initialize(name:); end + + # source://rbs//lib/rbs/builtin_names.rb#16 + def instance_type(*args); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/builtin_names.rb#20 + def instance_type?(type); end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/builtin_names.rb#6 + def name; end + + # source://rbs//lib/rbs/builtin_names.rb#24 + def singleton_type; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/builtin_names.rb#28 + def singleton_type?(type); end + + # source://rbs//lib/rbs/builtin_names.rb#12 + def to_s; end + + class << self + # source://rbs//lib/rbs/builtin_names.rb#32 + def define(name, namespace: T.unsafe(nil)); end + end +end + +# source://rbs//lib/rbs/builtin_names.rb#56 +RBS::BuiltinNames::Numeric = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs//lib/rbs/builtin_names.rb#38 +RBS::BuiltinNames::Object = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs//lib/rbs/builtin_names.rb#47 +RBS::BuiltinNames::Range = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs//lib/rbs/builtin_names.rb#53 +RBS::BuiltinNames::Regexp = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs//lib/rbs/builtin_names.rb#49 +RBS::BuiltinNames::Set = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs//lib/rbs/builtin_names.rb#40 +RBS::BuiltinNames::String = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs//lib/rbs/builtin_names.rb#50 +RBS::BuiltinNames::Symbol = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs//lib/rbs/builtin_names.rb#54 +RBS::BuiltinNames::TrueClass = T.let(T.unsafe(nil), RBS::BuiltinNames::Name) + +# source://rbs//lib/rbs/cli/colored_io.rb#4 +class RBS::CLI; end + +# source://rbs//lib/rbs/cli/colored_io.rb#5 +class RBS::CLI::ColoredIO + # @return [ColoredIO] a new instance of ColoredIO + # + # source://rbs//lib/rbs/cli/colored_io.rb#8 + def initialize(stdout:); end + + # source://rbs//lib/rbs/cli/colored_io.rb#28 + def puts(*_arg0, **_arg1, &_arg2); end + + # source://rbs//lib/rbs/cli/colored_io.rb#20 + def puts_green(string); end + + # source://rbs//lib/rbs/cli/colored_io.rb#12 + def puts_red(string); end + + # Returns the value of attribute stdout. + # + # source://rbs//lib/rbs/cli/colored_io.rb#6 + def stdout; end + + private + + # @return [Boolean] + # + # source://rbs//lib/rbs/cli/colored_io.rb#43 + def are_colors_disabled?; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/cli/colored_io.rb#39 + def are_colors_supported?; end + + # https://github.com/rubygems/rubygems/blob/ed65279100234a17d65d71fe26de5083984ac5b8/bundler/lib/bundler/vendor/thor/lib/thor/shell/color.rb#L99-L109 + # + # @return [Boolean] + # + # source://rbs//lib/rbs/cli/colored_io.rb#35 + def can_display_colors?; end +end + +# source://rbs//lib/rbs/collection/sources/base.rb#4 +module RBS::Collection; end + +# source://rbs//lib/rbs/collection/cleaner.rb#5 +class RBS::Collection::Cleaner + # @return [Cleaner] a new instance of Cleaner + # + # source://rbs//lib/rbs/collection/cleaner.rb#8 + def initialize(lockfile_path:); end + + # source://rbs//lib/rbs/collection/cleaner.rb#12 + def clean; end + + # Returns the value of attribute lock. + # + # source://rbs//lib/rbs/collection/cleaner.rb#6 + def lock; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/collection/cleaner.rb#30 + def needed?(gem_name, version); end +end + +# This class represent the configuration file. +# +# source://rbs//lib/rbs/collection/config.rb#7 +class RBS::Collection::Config + # @return [Config] a new instance of Config + # + # source://rbs//lib/rbs/collection/config.rb#49 + def initialize(data, config_path:); end + + # Returns the value of attribute config_path. + # + # source://rbs//lib/rbs/collection/config.rb#19 + def config_path; end + + # Returns the value of attribute data. + # + # source://rbs//lib/rbs/collection/config.rb#19 + def data; end + + # source://rbs//lib/rbs/collection/config.rb#54 + def gem(gem_name); end + + # source://rbs//lib/rbs/collection/config.rb#74 + def gems; end + + # source://rbs//lib/rbs/collection/config.rb#58 + def repo_path; end + + # source://rbs//lib/rbs/collection/config.rb#62 + def repo_path_data; end + + # source://rbs//lib/rbs/collection/config.rb#66 + def sources; end + + class << self + # source://rbs//lib/rbs/collection/config.rb#21 + def find_config_path; end + + # source://rbs//lib/rbs/collection/config.rb#41 + def from_path(path); end + + # Generate a rbs lockfile from Gemfile.lock to `config_path`. + # If `with_lockfile` is true, it respects existing rbs lockfile. + # + # source://rbs//lib/rbs/collection/config.rb#34 + def generate_lockfile(config_path:, definition:, with_lockfile: T.unsafe(nil)); end + + # source://rbs//lib/rbs/collection/config.rb#45 + def to_lockfile_path(config_path); end + end +end + +# source://rbs//lib/rbs/collection/config.rb#8 +class RBS::Collection::Config::CollectionNotAvailable < ::StandardError + # @return [CollectionNotAvailable] a new instance of CollectionNotAvailable + # + # source://rbs//lib/rbs/collection/config.rb#9 + def initialize; end +end + +# source://rbs//lib/rbs/collection/config/lockfile.rb#6 +class RBS::Collection::Config::Lockfile + # @return [Lockfile] a new instance of Lockfile + # + # source://rbs//lib/rbs/collection/config/lockfile.rb#9 + def initialize(lockfile_path:, path:, gemfile_lock_path:); end + + # @raise [CollectionNotAvailable] + # + # source://rbs//lib/rbs/collection/config/lockfile.rb#73 + def check_rbs_availability!; end + + # source://rbs//lib/rbs/collection/config/lockfile.rb#18 + def fullpath; end + + # source://rbs//lib/rbs/collection/config/lockfile.rb#22 + def gemfile_lock_fullpath; end + + # Returns the value of attribute gemfile_lock_path. + # + # source://rbs//lib/rbs/collection/config/lockfile.rb#7 + def gemfile_lock_path; end + + # Returns the value of attribute gems. + # + # source://rbs//lib/rbs/collection/config/lockfile.rb#7 + def gems; end + + # source://rbs//lib/rbs/collection/config/lockfile.rb#65 + def library_data(lib); end + + # Returns the value of attribute lockfile_dir. + # + # source://rbs//lib/rbs/collection/config/lockfile.rb#7 + def lockfile_dir; end + + # Returns the value of attribute lockfile_path. + # + # source://rbs//lib/rbs/collection/config/lockfile.rb#7 + def lockfile_path; end + + # Returns the value of attribute path. + # + # source://rbs//lib/rbs/collection/config/lockfile.rb#7 + def path; end + + # Returns the value of attribute sources. + # + # source://rbs//lib/rbs/collection/config/lockfile.rb#7 + def sources; end + + # source://rbs//lib/rbs/collection/config/lockfile.rb#28 + def to_lockfile; end + + class << self + # source://rbs//lib/rbs/collection/config/lockfile.rb#42 + def from_lockfile(lockfile_path:, data:); end + end +end + +# source://rbs//lib/rbs/collection/config/lockfile_generator.rb#6 +class RBS::Collection::Config::LockfileGenerator + # @return [LockfileGenerator] a new instance of LockfileGenerator + # + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#31 + def initialize(config:, definition:, with_lockfile:); end + + # Returns the value of attribute config. + # + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#23 + def config; end + + # Returns the value of attribute definition. + # + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#23 + def definition; end + + # Returns the value of attribute existing_lockfile. + # + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#23 + def existing_lockfile; end + + # Returns the value of attribute gem_entries. + # + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#23 + def gem_entries; end + + # Returns the value of attribute gem_hash. + # + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#23 + def gem_hash; end + + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#59 + def generate; end + + # Returns the value of attribute lockfile. + # + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#23 + def lockfile; end + + private + + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#91 + def assign_gem(name:, version:, skip: T.unsafe(nil)); end + + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#152 + def assign_stdlib(name:, from_gem:); end + + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#184 + def find_best_version(version:, versions:); end + + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#178 + def find_source(name:); end + + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#83 + def validate_gemfile_lock_path!(lock:, gemfile_lock_path:); end + + class << self + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#25 + def generate(config:, definition:, with_lockfile: T.unsafe(nil)); end + end +end + +# source://rbs//lib/rbs/collection/config/lockfile_generator.rb#7 +class RBS::Collection::Config::LockfileGenerator::GemfileLockMismatchError < ::StandardError + # @return [GemfileLockMismatchError] a new instance of GemfileLockMismatchError + # + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#8 + def initialize(expected:, actual:); end + + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#13 + def message; end +end + +# source://rbs//lib/rbs/collection/config.rb#17 +RBS::Collection::Config::PATH = T.let(T.unsafe(nil), Pathname) + +# source://rbs//lib/rbs/collection/installer.rb#5 +class RBS::Collection::Installer + # @return [Installer] a new instance of Installer + # + # source://rbs//lib/rbs/collection/installer.rb#9 + def initialize(lockfile_path:, stdout: T.unsafe(nil)); end + + # source://rbs//lib/rbs/collection/installer.rb#14 + def install_from_lockfile; end + + # Returns the value of attribute lockfile. + # + # source://rbs//lib/rbs/collection/installer.rb#6 + def lockfile; end + + # Returns the value of attribute stdout. + # + # source://rbs//lib/rbs/collection/installer.rb#7 + def stdout; end +end + +# source://rbs//lib/rbs/collection/sources/base.rb#5 +module RBS::Collection::Sources + class << self + # source://rbs//lib/rbs/collection/sources.rb#12 + def from_config_entry(source_entry, base_directory:); end + end +end + +# source://rbs//lib/rbs/collection/sources/base.rb#6 +module RBS::Collection::Sources::Base + # source://rbs//lib/rbs/collection/sources/base.rb#7 + def dependencies_of(name, version); end +end + +# source://rbs//lib/rbs/collection/sources/git.rb#10 +class RBS::Collection::Sources::Git + include ::RBS::Collection::Sources::Base + + # @return [Git] a new instance of Git + # + # source://rbs//lib/rbs/collection/sources/git.rb#18 + def initialize(name:, revision:, remote:, repo_dir:); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/collection/sources/git.rb#26 + def has?(name, version); end + + # source://rbs//lib/rbs/collection/sources/git.rb#43 + def install(dest:, name:, version:, stdout:); end + + # source://rbs//lib/rbs/collection/sources/git.rb#228 + def load_metadata(dir:); end + + # source://rbs//lib/rbs/collection/sources/git.rb#73 + def manifest_of(name, version); end + + # source://rbs//lib/rbs/collection/sources/git.rb#212 + def metadata_content(name:, version:); end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/collection/sources/git.rb#16 + def name; end + + # Returns the value of attribute remote. + # + # source://rbs//lib/rbs/collection/sources/git.rb#16 + def remote; end + + # Returns the value of attribute repo_dir. + # + # source://rbs//lib/rbs/collection/sources/git.rb#16 + def repo_dir; end + + # source://rbs//lib/rbs/collection/sources/git.rb#177 + def resolved_revision; end + + # Returns the value of attribute revision. + # + # source://rbs//lib/rbs/collection/sources/git.rb#16 + def revision; end + + # source://rbs//lib/rbs/collection/sources/git.rb#113 + def to_lockfile; end + + # source://rbs//lib/rbs/collection/sources/git.rb#36 + def versions(name); end + + # source://rbs//lib/rbs/collection/sources/git.rb#220 + def write_metadata(dir:, name:, version:); end + + private + + # source://rbs//lib/rbs/collection/sources/git.rb#87 + def _install(dest:, name:, version:); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/collection/sources/git.rb#188 + def commit_hash?; end + + # source://rbs//lib/rbs/collection/sources/git.rb#99 + def cp_r(src, dest); end + + # source://rbs//lib/rbs/collection/sources/git.rb#123 + def format_config_entry(name, version); end + + # source://rbs//lib/rbs/collection/sources/git.rb#173 + def gem_repo_dir; end + + # source://rbs//lib/rbs/collection/sources/git.rb#234 + def gems_versions; end + + # source://rbs//lib/rbs/collection/sources/git.rb#192 + def git(*cmd, **opt); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/collection/sources/git.rb#196 + def git?(*cmd, **opt); end + + # source://rbs//lib/rbs/collection/sources/git.rb#163 + def git_dir; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/collection/sources/git.rb#152 + def need_to_fetch?(revision); end + + # source://rbs//lib/rbs/collection/sources/git.rb#130 + def setup!; end + + # source://rbs//lib/rbs/collection/sources/git.rb#202 + def sh!(*cmd, **opt); end +end + +# source://rbs//lib/rbs/collection/sources/git.rb#14 +class RBS::Collection::Sources::Git::CommandError < ::StandardError; end + +# source://rbs//lib/rbs/collection/sources/git.rb#12 +RBS::Collection::Sources::Git::METADATA_FILENAME = T.let(T.unsafe(nil), String) + +# source://rbs//lib/rbs/collection/sources/local.rb#6 +class RBS::Collection::Sources::Local + include ::RBS::Collection::Sources::Base + + # @return [Local] a new instance of Local + # + # source://rbs//lib/rbs/collection/sources/local.rb#11 + def initialize(path:, base_directory:); end + + # Returns the value of attribute full_path. + # + # source://rbs//lib/rbs/collection/sources/local.rb#9 + def full_path; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/collection/sources/local.rb#17 + def has?(name, version); end + + # Create a symlink instead of copying file to refer files in @path. + # By avoiding copying RBS files, the users do not need re-run `rbs collection install` + # when the RBS files are updated. + # + # source://rbs//lib/rbs/collection/sources/local.rb#32 + def install(dest:, name:, version:, stdout:); end + + # source://rbs//lib/rbs/collection/sources/local.rb#64 + def manifest_of(name, version); end + + # Returns the value of attribute path. + # + # source://rbs//lib/rbs/collection/sources/local.rb#9 + def path; end + + # source://rbs//lib/rbs/collection/sources/local.rb#72 + def to_lockfile; end + + # source://rbs//lib/rbs/collection/sources/local.rb#25 + def versions(name); end + + private + + # source://rbs//lib/rbs/collection/sources/local.rb#59 + def _install(src, dst); end +end + +# Signatures that are inclduded in gem package as sig/ directory. +# +# source://rbs//lib/rbs/collection/sources/rubygems.rb#9 +class RBS::Collection::Sources::Rubygems + include ::RBS::Collection::Sources::Base + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # @return [Boolean] + # + # source://rbs//lib/rbs/collection/sources/rubygems.rb#13 + def has?(name, version); end + + # source://rbs//lib/rbs/collection/sources/rubygems.rb#23 + def install(dest:, name:, version:, stdout:); end + + # source://rbs//lib/rbs/collection/sources/rubygems.rb#29 + def manifest_of(name, version); end + + # source://rbs//lib/rbs/collection/sources/rubygems.rb#36 + def to_lockfile; end + + # source://rbs//lib/rbs/collection/sources/rubygems.rb#17 + def versions(name); end + + private + + # source://rbs//lib/rbs/collection/sources/rubygems.rb#42 + def gem_sig_path(name, version); end + + class << self + private + + def allocate; end + def new(*_arg0); end + end +end + +# signatures that are bundled in rbs gem under the stdlib/ directory +# +# source://rbs//lib/rbs/collection/sources/stdlib.rb#9 +class RBS::Collection::Sources::Stdlib + include ::RBS::Collection::Sources::Base + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # @return [Boolean] + # + # source://rbs//lib/rbs/collection/sources/stdlib.rb#15 + def has?(name, version); end + + # source://rbs//lib/rbs/collection/sources/stdlib.rb#23 + def install(dest:, name:, version:, stdout:); end + + # source://rbs//lib/rbs/collection/sources/stdlib.rb#29 + def manifest_of(name, version); end + + # source://rbs//lib/rbs/collection/sources/stdlib.rb#38 + def to_lockfile; end + + # source://rbs//lib/rbs/collection/sources/stdlib.rb#19 + def versions(name); end + + private + + # source://rbs//lib/rbs/collection/sources/stdlib.rb#44 + def lookup(name, version); end + + class << self + private + + def allocate; end + def new(*_arg0); end + end +end + +# source://rbs//lib/rbs/collection/sources/stdlib.rb#13 +RBS::Collection::Sources::Stdlib::REPO = T.let(T.unsafe(nil), RBS::Repository) + +# source://rbs//lib/rbs/constant.rb#4 +class RBS::Constant + # @return [Constant] a new instance of Constant + # + # source://rbs//lib/rbs/constant.rb#9 + def initialize(name:, type:, entry:); end + + # source://rbs//lib/rbs/constant.rb#15 + def ==(other); end + + # Returns the value of attribute entry. + # + # source://rbs//lib/rbs/constant.rb#7 + def entry; end + + # source://rbs//lib/rbs/constant.rb#15 + def eql?(other); end + + # source://rbs//lib/rbs/constant.rb#24 + def hash; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/constant.rb#5 + def name; end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/constant.rb#6 + def type; end +end + +# source://rbs//lib/rbs/errors.rb#545 +class RBS::CyclicClassAliasDefinitionError < ::RBS::BaseError + include ::RBS::DetailedMessageable + + # @return [CyclicClassAliasDefinitionError] a new instance of CyclicClassAliasDefinitionError + # + # source://rbs//lib/rbs/errors.rb#550 + def initialize(entry); end + + # Returns the value of attribute alias_entry. + # + # source://rbs//lib/rbs/errors.rb#548 + def alias_entry; end + + # source://rbs//lib/rbs/errors.rb#556 + def location; end +end + +# source://rbs//lib/rbs/errors.rb#506 +class RBS::CyclicTypeParameterBound < ::RBS::BaseError + include ::RBS::DetailedMessageable + + # @return [CyclicTypeParameterBound] a new instance of CyclicTypeParameterBound + # + # source://rbs//lib/rbs/errors.rb#511 + def initialize(type_name:, method_name:, params:, location:); end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/errors.rb#509 + def location; end + + # Returns the value of attribute method_name. + # + # source://rbs//lib/rbs/errors.rb#509 + def method_name; end + + # Returns the value of attribute params. + # + # source://rbs//lib/rbs/errors.rb#509 + def params; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/errors.rb#509 + def type_name; end +end + +# source://rbs//lib/rbs/definition.rb#4 +class RBS::Definition + # @return [Definition] a new instance of Definition + # + # source://rbs//lib/rbs/definition.rb#287 + def initialize(type_name:, entry:, self_type:, ancestors:); end + + # Returns the value of attribute ancestors. + # + # source://rbs//lib/rbs/definition.rb#281 + def ancestors; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/definition.rb#310 + def class?; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/definition.rb#327 + def class_type?; end + + # Returns the value of attribute class_variables. + # + # source://rbs//lib/rbs/definition.rb#285 + def class_variables; end + + # source://rbs//lib/rbs/definition.rb#372 + def each_type(&block); end + + # Returns the value of attribute entry. + # + # source://rbs//lib/rbs/definition.rb#280 + def entry; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/definition.rb#331 + def instance_type?; end + + # Returns the value of attribute instance_variables. + # + # source://rbs//lib/rbs/definition.rb#284 + def instance_variables; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/definition.rb#318 + def interface?; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/definition.rb#335 + def interface_type?; end + + # source://rbs//lib/rbs/definition.rb#362 + def map_method_type(&block); end + + # Returns the value of attribute methods. + # + # source://rbs//lib/rbs/definition.rb#283 + def methods; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/definition.rb#314 + def module?; end + + # Returns the value of attribute self_type. + # + # source://rbs//lib/rbs/definition.rb#282 + def self_type; end + + # source://rbs//lib/rbs/definition.rb#352 + def sub(s); end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/definition.rb#279 + def type_name; end + + # source://rbs//lib/rbs/definition.rb#339 + def type_params; end + + # source://rbs//lib/rbs/definition.rb#343 + def type_params_decl; end +end + +# source://rbs//lib/rbs/definition.rb#189 +module RBS::Definition::Ancestor; end + +# source://rbs//lib/rbs/definition.rb#190 +class RBS::Definition::Ancestor::Instance + # @return [Instance] a new instance of Instance + # + # source://rbs//lib/rbs/definition.rb#193 + def initialize(name:, args:, source:); end + + # source://rbs//lib/rbs/definition.rb#199 + def ==(other); end + + # Returns the value of attribute args. + # + # source://rbs//lib/rbs/definition.rb#191 + def args; end + + # source://rbs//lib/rbs/definition.rb#199 + def eql?(other); end + + # source://rbs//lib/rbs/definition.rb#205 + def hash; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/definition.rb#191 + def name; end + + # Returns the value of attribute source. + # + # source://rbs//lib/rbs/definition.rb#191 + def source; end +end + +# source://rbs//lib/rbs/definition.rb#210 +class RBS::Definition::Ancestor::Singleton + # @return [Singleton] a new instance of Singleton + # + # source://rbs//lib/rbs/definition.rb#213 + def initialize(name:); end + + # source://rbs//lib/rbs/definition.rb#217 + def ==(other); end + + # source://rbs//lib/rbs/definition.rb#217 + def eql?(other); end + + # source://rbs//lib/rbs/definition.rb#223 + def hash; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/definition.rb#211 + def name; end +end + +# source://rbs//lib/rbs/definition.rb#229 +class RBS::Definition::InstanceAncestors + # @return [InstanceAncestors] a new instance of InstanceAncestors + # + # source://rbs//lib/rbs/definition.rb#234 + def initialize(type_name:, params:, ancestors:); end + + # Returns the value of attribute ancestors. + # + # source://rbs//lib/rbs/definition.rb#232 + def ancestors; end + + # source://rbs//lib/rbs/definition.rb#240 + def apply(args, location:); end + + # Returns the value of attribute params. + # + # source://rbs//lib/rbs/definition.rb#231 + def params; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/definition.rb#230 + def type_name; end +end + +# source://rbs//lib/rbs/definition.rb#25 +class RBS::Definition::Method + # @return [Method] a new instance of Method + # + # source://rbs//lib/rbs/definition.rb#81 + def initialize(super_method:, defs:, accessibility:, alias_of:, annotations: T.unsafe(nil)); end + + # source://rbs//lib/rbs/definition.rb#89 + def ==(other); end + + # Returns the value of attribute accessibility. + # + # source://rbs//lib/rbs/definition.rb#77 + def accessibility; end + + # Returns the value of attribute alias_of. + # + # source://rbs//lib/rbs/definition.rb#79 + def alias_of; end + + # source://rbs//lib/rbs/definition.rb#126 + def annotations; end + + # source://rbs//lib/rbs/definition.rb#122 + def comments; end + + # source://rbs//lib/rbs/definition.rb#104 + def defined_in; end + + # Returns the value of attribute defs. + # + # source://rbs//lib/rbs/definition.rb#76 + def defs; end + + # source://rbs//lib/rbs/definition.rb#89 + def eql?(other); end + + # Returns the value of attribute extra_annotations. + # + # source://rbs//lib/rbs/definition.rb#78 + def extra_annotations; end + + # source://rbs//lib/rbs/definition.rb#100 + def hash; end + + # source://rbs//lib/rbs/definition.rb#111 + def implemented_in; end + + # source://rbs//lib/rbs/definition.rb#169 + def map_method_type(&block); end + + # source://rbs//lib/rbs/definition.rb#151 + def map_type(&block); end + + # source://rbs//lib/rbs/definition.rb#160 + def map_type_bound(&block); end + + # source://rbs//lib/rbs/definition.rb#130 + def members; end + + # source://rbs//lib/rbs/definition.rb#118 + def method_types; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/definition.rb#138 + def private?; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/definition.rb#134 + def public?; end + + # source://rbs//lib/rbs/definition.rb#142 + def sub(s); end + + # Returns the value of attribute super_method. + # + # source://rbs//lib/rbs/definition.rb#75 + def super_method; end + + # source://rbs//lib/rbs/definition.rb#178 + def update(super_method: T.unsafe(nil), defs: T.unsafe(nil), accessibility: T.unsafe(nil), alias_of: T.unsafe(nil), annotations: T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/definition.rb#26 +class RBS::Definition::Method::TypeDef + # @return [TypeDef] a new instance of TypeDef + # + # source://rbs//lib/rbs/definition.rb#32 + def initialize(type:, member:, defined_in:, implemented_in:); end + + # source://rbs//lib/rbs/definition.rb#39 + def ==(other); end + + # source://rbs//lib/rbs/definition.rb#57 + def annotations; end + + # source://rbs//lib/rbs/definition.rb#53 + def comment; end + + # Returns the value of attribute defined_in. + # + # source://rbs//lib/rbs/definition.rb#29 + def defined_in; end + + # source://rbs//lib/rbs/definition.rb#39 + def eql?(other); end + + # source://rbs//lib/rbs/definition.rb#49 + def hash; end + + # Returns the value of attribute implemented_in. + # + # source://rbs//lib/rbs/definition.rb#30 + def implemented_in; end + + # Returns the value of attribute member. + # + # source://rbs//lib/rbs/definition.rb#28 + def member; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/definition.rb#65 + def overload?; end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/definition.rb#27 + def type; end + + # source://rbs//lib/rbs/definition.rb#61 + def update(type: T.unsafe(nil), member: T.unsafe(nil), defined_in: T.unsafe(nil), implemented_in: T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/definition.rb#269 +class RBS::Definition::SingletonAncestors + # @return [SingletonAncestors] a new instance of SingletonAncestors + # + # source://rbs//lib/rbs/definition.rb#273 + def initialize(type_name:, ancestors:); end + + # Returns the value of attribute ancestors. + # + # source://rbs//lib/rbs/definition.rb#271 + def ancestors; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/definition.rb#270 + def type_name; end +end + +# source://rbs//lib/rbs/definition.rb#5 +class RBS::Definition::Variable + # @return [Variable] a new instance of Variable + # + # source://rbs//lib/rbs/definition.rb#10 + def initialize(parent_variable:, type:, declared_in:); end + + # Returns the value of attribute declared_in. + # + # source://rbs//lib/rbs/definition.rb#8 + def declared_in; end + + # Returns the value of attribute parent_variable. + # + # source://rbs//lib/rbs/definition.rb#6 + def parent_variable; end + + # source://rbs//lib/rbs/definition.rb#16 + def sub(s); end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/definition.rb#7 + def type; end +end + +# source://rbs//lib/rbs/definition_builder.rb#4 +class RBS::DefinitionBuilder + # @return [DefinitionBuilder] a new instance of DefinitionBuilder + # + # source://rbs//lib/rbs/definition_builder.rb#14 + def initialize(env:, ancestor_builder: T.unsafe(nil), method_builder: T.unsafe(nil)); end + + # Returns the value of attribute ancestor_builder. + # + # source://rbs//lib/rbs/definition_builder.rb#6 + def ancestor_builder; end + + # source://rbs//lib/rbs/definition_builder.rb#155 + def build_instance(type_name); end + + # source://rbs//lib/rbs/definition_builder.rb#43 + def build_interface(type_name); end + + # source://rbs//lib/rbs/definition_builder.rb#288 + def build_singleton(type_name); end + + # Builds a definition for singleton without .new method. + # + # source://rbs//lib/rbs/definition_builder.rb#217 + def build_singleton0(type_name); end + + # source://rbs//lib/rbs/definition_builder.rb#85 + def define_instance(definition, type_name, subst); end + + # source://rbs//lib/rbs/definition_builder.rb#33 + def define_interface(definition, type_name, subst); end + + # source://rbs//lib/rbs/definition_builder.rb#590 + def define_method(methods, definition, method, subst, defined_in:, implemented_in: T.unsafe(nil)); end + + # source://rbs//lib/rbs/definition_builder.rb#25 + def ensure_namespace!(namespace, location:); end + + # Returns the value of attribute env. + # + # source://rbs//lib/rbs/definition_builder.rb#5 + def env; end + + # source://rbs//lib/rbs/definition_builder.rb#751 + def expand_alias(type_name); end + + # source://rbs//lib/rbs/definition_builder.rb#755 + def expand_alias1(type_name); end + + # source://rbs//lib/rbs/definition_builder.rb#762 + def expand_alias2(type_name, args); end + + # source://rbs//lib/rbs/definition_builder.rb#532 + def import_methods(definition, module_name, module_methods, interfaces_methods, subst); end + + # source://rbs//lib/rbs/definition_builder.rb#524 + def insert_variable(type_name, variables, name:, type:); end + + # Returns the value of attribute instance_cache. + # + # source://rbs//lib/rbs/definition_builder.rb#9 + def instance_cache; end + + # Returns the value of attribute interface_cache. + # + # source://rbs//lib/rbs/definition_builder.rb#12 + def interface_cache; end + + # source://rbs//lib/rbs/definition_builder.rb#398 + def interface_methods(interface_ancestors); end + + # Returns the value of attribute method_builder. + # + # source://rbs//lib/rbs/definition_builder.rb#7 + def method_builder; end + + # Returns the value of attribute singleton0_cache. + # + # source://rbs//lib/rbs/definition_builder.rb#11 + def singleton0_cache; end + + # Returns the value of attribute singleton_cache. + # + # source://rbs//lib/rbs/definition_builder.rb#10 + def singleton_cache; end + + # source://rbs//lib/rbs/definition_builder.rb#428 + def source_location(source, decl); end + + # source://rbs//lib/rbs/definition_builder.rb#66 + def tapp_subst(name, args); end + + # source://rbs//lib/rbs/definition_builder.rb#747 + def try_cache(type_name, cache:); end + + # source://rbs//lib/rbs/definition_builder.rb#786 + def update(env:, except:, ancestor_builder:); end + + # source://rbs//lib/rbs/definition_builder.rb#418 + def validate_params_with(type_params, result:); end + + # @raise [NoTypeFoundError] + # + # source://rbs//lib/rbs/definition_builder.rb#815 + def validate_type_name(name, location); end + + # source://rbs//lib/rbs/definition_builder.rb#442 + def validate_type_params(definition, ancestors:, methods:); end + + # source://rbs//lib/rbs/definition_builder.rb#804 + def validate_type_presence(type); end +end + +# source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#5 +class RBS::DefinitionBuilder::AncestorBuilder + # @return [AncestorBuilder] a new instance of AncestorBuilder + # + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#162 + def initialize(env:); end + + # Returns the value of attribute env. + # + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#151 + def env; end + + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#564 + def fill_ancestor_source(ancestor, name:, source:, &block); end + + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#408 + def instance_ancestors(type_name, building_ancestors: T.unsafe(nil)); end + + # Returns the value of attribute instance_ancestors_cache. + # + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#154 + def instance_ancestors_cache; end + + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#531 + def interface_ancestors(type_name, building_ancestors: T.unsafe(nil)); end + + # Returns the value of attribute interface_ancestors_cache. + # + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#160 + def interface_ancestors_cache; end + + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#388 + def mixin_ancestors(entry, type_name, included_modules:, included_interfaces:, extended_modules:, prepended_modules:, extended_interfaces:); end + + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#337 + def mixin_ancestors0(decl, type_name, align_params:, included_modules:, included_interfaces:, extended_modules:, prepended_modules:, extended_interfaces:); end + + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#192 + def one_instance_ancestors(type_name); end + + # Returns the value of attribute one_instance_ancestors_cache. + # + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#153 + def one_instance_ancestors_cache; end + + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#318 + def one_interface_ancestors(type_name); end + + # Returns the value of attribute one_interface_ancestors_cache. + # + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#159 + def one_interface_ancestors_cache; end + + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#264 + def one_singleton_ancestors(type_name); end + + # Returns the value of attribute one_singleton_ancestors_cache. + # + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#156 + def one_singleton_ancestors_cache; end + + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#481 + def singleton_ancestors(type_name, building_ancestors: T.unsafe(nil)); end + + # Returns the value of attribute singleton_ancestors_cache. + # + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#157 + def singleton_ancestors_cache; end + + # @raise [SuperclassMismatchError] + # + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#175 + def validate_super_class!(type_name, entry); end +end + +# source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#6 +class RBS::DefinitionBuilder::AncestorBuilder::OneAncestors + # @return [OneAncestors] a new instance of OneAncestors + # + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#17 + def initialize(type_name:, params:, super_class:, self_types:, included_modules:, included_interfaces:, prepended_modules:, extended_modules:, extended_interfaces:); end + + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#29 + def each_ancestor(&block); end + + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#86 + def each_extended_interface(&block); end + + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#78 + def each_extended_module(&block); end + + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#62 + def each_included_interface(&block); end + + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#54 + def each_included_module(&block); end + + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#70 + def each_prepended_module(&block); end + + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#46 + def each_self_type(&block); end + + # Returns the value of attribute extended_interfaces. + # + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#15 + def extended_interfaces; end + + # Returns the value of attribute extended_modules. + # + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#14 + def extended_modules; end + + # Returns the value of attribute included_interfaces. + # + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#12 + def included_interfaces; end + + # Returns the value of attribute included_modules. + # + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#11 + def included_modules; end + + # Returns the value of attribute params. + # + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#8 + def params; end + + # Returns the value of attribute prepended_modules. + # + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#13 + def prepended_modules; end + + # Returns the value of attribute self_types. + # + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#10 + def self_types; end + + # Returns the value of attribute super_class. + # + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#9 + def super_class; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#7 + def type_name; end + + class << self + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#94 + def class_instance(type_name:, params:, super_class:); end + + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#136 + def interface(type_name:, params:); end + + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#122 + def module_instance(type_name:, params:); end + + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#108 + def singleton(type_name:, super_class:); end + end +end + +# source://rbs//lib/rbs/definition_builder/method_builder.rb#5 +class RBS::DefinitionBuilder::MethodBuilder + # @return [MethodBuilder] a new instance of MethodBuilder + # + # source://rbs//lib/rbs/definition_builder/method_builder.rb#91 + def initialize(env:); end + + # source://rbs//lib/rbs/definition_builder/method_builder.rb#194 + def build_alias(methods, type, member:); end + + # source://rbs//lib/rbs/definition_builder/method_builder.rb#199 + def build_attribute(methods, type, member:, accessibility:); end + + # source://rbs//lib/rbs/definition_builder/method_builder.rb#99 + def build_instance(type_name); end + + # source://rbs//lib/rbs/definition_builder/method_builder.rb#174 + def build_interface(type_name); end + + # source://rbs//lib/rbs/definition_builder/method_builder.rb#215 + def build_method(methods, type, member:, accessibility:); end + + # source://rbs//lib/rbs/definition_builder/method_builder.rb#145 + def build_singleton(type_name); end + + # source://rbs//lib/rbs/definition_builder/method_builder.rb#226 + def each_member_with_accessibility(members, accessibility: T.unsafe(nil)); end + + # Returns the value of attribute env. + # + # source://rbs//lib/rbs/definition_builder/method_builder.rb#86 + def env; end + + # Returns the value of attribute instance_methods. + # + # source://rbs//lib/rbs/definition_builder/method_builder.rb#87 + def instance_methods; end + + # Returns the value of attribute interface_methods. + # + # source://rbs//lib/rbs/definition_builder/method_builder.rb#89 + def interface_methods; end + + # Returns the value of attribute singleton_methods. + # + # source://rbs//lib/rbs/definition_builder/method_builder.rb#88 + def singleton_methods; end + + # source://rbs//lib/rbs/definition_builder/method_builder.rb#239 + def update(env:, except:); end +end + +# source://rbs//lib/rbs/definition_builder/method_builder.rb#6 +class RBS::DefinitionBuilder::MethodBuilder::Methods + # @return [Methods] a new instance of Methods + # + # source://rbs//lib/rbs/definition_builder/method_builder.rb#30 + def initialize(type:); end + + # source://rbs//lib/rbs/definition_builder/method_builder.rb#49 + def each; end + + # Returns the value of attribute methods. + # + # source://rbs//lib/rbs/definition_builder/method_builder.rb#28 + def methods; end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/definition_builder/method_builder.rb#27 + def type; end + + # source://rbs//lib/rbs/definition_builder/method_builder.rb#35 + def validate!; end +end + +# source://rbs//lib/rbs/definition_builder/method_builder.rb#7 +class RBS::DefinitionBuilder::MethodBuilder::Methods::Definition < ::Struct + def accessibilities; end + def accessibilities=(_); end + + # source://rbs//lib/rbs/definition_builder/method_builder.rb#14 + def accessibility; end + + def name; end + def name=(_); end + + # source://rbs//lib/rbs/definition_builder/method_builder.rb#10 + def original; end + + def originals; end + def originals=(_); end + def overloads; end + def overloads=(_); end + def type; end + def type=(_); end + + class << self + def [](*_arg0); end + + # source://rbs//lib/rbs/definition_builder/method_builder.rb#22 + def empty(name:, type:); end + + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rbs//lib/rbs/definition_builder/method_builder.rb#63 +class RBS::DefinitionBuilder::MethodBuilder::Methods::Sorter + include ::TSort + + # @return [Sorter] a new instance of Sorter + # + # source://rbs//lib/rbs/definition_builder/method_builder.rb#68 + def initialize(methods); end + + # Returns the value of attribute methods. + # + # source://rbs//lib/rbs/definition_builder/method_builder.rb#66 + def methods; end + + # source://rbs//lib/rbs/definition_builder/method_builder.rb#76 + def tsort_each_child(defn); end + + # source://rbs//lib/rbs/definition_builder/method_builder.rb#72 + def tsort_each_node(&block); end +end + +# source://rbs//lib/rbs/errors.rb#21 +class RBS::DefinitionError < ::RBS::BaseError; end + +# source://rbs//lib/rbs/errors.rb#23 +module RBS::DetailedMessageable + # source://rbs//lib/rbs/errors.rb#24 + def detailed_message(highlight: T.unsafe(nil), **_arg1); end +end + +# source://rbs//lib/rbs/diff.rb#4 +class RBS::Diff + # @return [Diff] a new instance of Diff + # + # source://rbs//lib/rbs/diff.rb#5 + def initialize(type_name:, library_options:, after_path: T.unsafe(nil), before_path: T.unsafe(nil), detail: T.unsafe(nil)); end + + # source://rbs//lib/rbs/diff.rb#13 + def each_diff(&block); end + + private + + # source://rbs//lib/rbs/diff.rb#96 + def build_builder(env); end + + # source://rbs//lib/rbs/diff.rb#77 + def build_env(path); end + + # source://rbs//lib/rbs/diff.rb#49 + def build_methods(path); end + + # source://rbs//lib/rbs/diff.rb#116 + def constant_to_s(constant); end + + # source://rbs//lib/rbs/diff.rb#100 + def definition_method_to_s(key, kind, definition_method); end + + # source://rbs//lib/rbs/diff.rb#38 + def each_diff_constants(before_constant_children, after_constant_children); end + + # source://rbs//lib/rbs/diff.rb#27 + def each_diff_methods(kind, before_methods, after_methods); end +end + +# source://rbs//lib/rbs/errors.rb#386 +class RBS::DuplicatedDeclarationError < ::RBS::LoadingError + # @return [DuplicatedDeclarationError] a new instance of DuplicatedDeclarationError + # + # source://rbs//lib/rbs/errors.rb#390 + def initialize(name, *decls); end + + # Returns the value of attribute decls. + # + # source://rbs//lib/rbs/errors.rb#388 + def decls; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/errors.rb#387 + def name; end +end + +# source://rbs//lib/rbs/errors.rb#284 +class RBS::DuplicatedInterfaceMethodDefinitionError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # @return [DuplicatedInterfaceMethodDefinitionError] a new instance of DuplicatedInterfaceMethodDefinitionError + # + # source://rbs//lib/rbs/errors.rb#291 + def initialize(type:, method_name:, member:); end + + # source://rbs//lib/rbs/errors.rb#299 + def location; end + + # Returns the value of attribute member. + # + # source://rbs//lib/rbs/errors.rb#289 + def member; end + + # Returns the value of attribute method_name. + # + # source://rbs//lib/rbs/errors.rb#288 + def method_name; end + + # source://rbs//lib/rbs/errors.rb#303 + def qualified_method_name; end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/errors.rb#287 + def type; end + + # source://rbs//lib/rbs/errors.rb#312 + def type_name; end +end + +# source://rbs//lib/rbs/errors.rb#243 +class RBS::DuplicatedMethodDefinitionError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # @return [DuplicatedMethodDefinitionError] a new instance of DuplicatedMethodDefinitionError + # + # source://rbs//lib/rbs/errors.rb#250 + def initialize(type:, method_name:, members:); end + + # source://rbs//lib/rbs/errors.rb#275 + def location; end + + # Returns the value of attribute members. + # + # source://rbs//lib/rbs/errors.rb#248 + def members; end + + # Returns the value of attribute method_name. + # + # source://rbs//lib/rbs/errors.rb#247 + def method_name; end + + # source://rbs//lib/rbs/errors.rb#279 + def other_locations; end + + # source://rbs//lib/rbs/errors.rb#262 + def qualified_method_name; end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/errors.rb#246 + def type; end + + # source://rbs//lib/rbs/errors.rb#271 + def type_name; end +end + +# source://rbs//lib/rbs/environment.rb#4 +class RBS::Environment + # @return [Environment] a new instance of Environment + # + # source://rbs//lib/rbs/environment.rb#145 + def initialize; end + + # source://rbs//lib/rbs/environment.rb#470 + def <<(decl); end + + # source://rbs//lib/rbs/environment.rb#792 + def absolute_type(resolver, map, type, context:); end + + # source://rbs//lib/rbs/environment.rb#787 + def absolute_type_name(resolver, map, type_name, context:); end + + # source://rbs//lib/rbs/environment.rb#476 + def add_signature(buffer:, directives:, decls:); end + + # source://rbs//lib/rbs/environment.rb#528 + def append_context(context, decl); end + + # source://rbs//lib/rbs/environment.rb#803 + def buffers; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/environment.rb#218 + def class_alias?(name); end + + # Returns the value of attribute class_alias_decls. + # + # source://rbs//lib/rbs/environment.rb#12 + def class_alias_decls; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/environment.rb#202 + def class_decl?(name); end + + # Returns the value of attribute class_decls. + # + # source://rbs//lib/rbs/environment.rb#7 + def class_decls; end + + # source://rbs//lib/rbs/environment.rb#226 + def class_entry(type_name); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/environment.rb#198 + def constant_decl?(name); end + + # Returns the value of attribute constant_decls. + # + # source://rbs//lib/rbs/environment.rb#10 + def constant_decls; end + + # source://rbs//lib/rbs/environment.rb#274 + def constant_entry(type_name); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/environment.rb#194 + def constant_name?(name); end + + # Returns the value of attribute declarations. + # + # source://rbs//lib/rbs/environment.rb#5 + def declarations; end + + # Returns the value of attribute global_decls. + # + # source://rbs//lib/rbs/environment.rb#11 + def global_decls; end + + # source://rbs//lib/rbs/environment.rb#373 + def insert_decl(decl, outer:, namespace:); end + + # source://rbs//lib/rbs/environment.rb#798 + def inspect; end + + # Returns the value of attribute interface_decls. + # + # source://rbs//lib/rbs/environment.rb#8 + def interface_decls; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/environment.rb#176 + def interface_name?(name); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/environment.rb#210 + def module_alias?(name); end + + # source://rbs//lib/rbs/environment.rb#266 + def module_class_entry(type_name); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/environment.rb#206 + def module_decl?(name); end + + # source://rbs//lib/rbs/environment.rb#235 + def module_entry(type_name); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/environment.rb#184 + def module_name?(name); end + + # source://rbs//lib/rbs/environment.rb#332 + def normalize_module_name(name); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/environment.rb#336 + def normalize_module_name?(name); end + + # source://rbs//lib/rbs/environment.rb#328 + def normalize_type_name(name); end + + # source://rbs//lib/rbs/environment.rb#297 + def normalize_type_name!(name); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/environment.rb#278 + def normalize_type_name?(name); end + + # source://rbs//lib/rbs/environment.rb#244 + def normalized_class_entry(type_name); end + + # source://rbs//lib/rbs/environment.rb#270 + def normalized_module_class_entry(type_name); end + + # source://rbs//lib/rbs/environment.rb#255 + def normalized_module_entry(type_name); end + + # source://rbs//lib/rbs/environment.rb#323 + def normalized_type_name!(name); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/environment.rb#310 + def normalized_type_name?(type_name); end + + # source://rbs//lib/rbs/environment.rb#537 + def resolve_declaration(resolver, map, decl, outer:, prefix:); end + + # source://rbs//lib/rbs/environment.rb#673 + def resolve_member(resolver, map, member, context:); end + + # source://rbs//lib/rbs/environment.rb#773 + def resolve_method_type(resolver, map, type, context:); end + + # source://rbs//lib/rbs/environment.rb#489 + def resolve_type_names(only: T.unsafe(nil)); end + + # source://rbs//lib/rbs/environment.rb#781 + def resolve_type_params(resolver, map, params, context:); end + + # source://rbs//lib/rbs/environment.rb#522 + def resolver_context(*nesting); end + + # Returns the value of attribute signatures. + # + # source://rbs//lib/rbs/environment.rb#14 + def signatures; end + + # Returns the value of attribute type_alias_decls. + # + # source://rbs//lib/rbs/environment.rb#9 + def type_alias_decls; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/environment.rb#180 + def type_alias_name?(name); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/environment.rb#188 + def type_name?(name); end + + # source://rbs//lib/rbs/environment.rb#807 + def unload(buffers); end + + # source://rbs//lib/rbs/environment.rb#483 + def validate_type_params; end + + private + + # source://rbs//lib/rbs/environment.rb#158 + def initialize_copy(other); end + + class << self + # source://rbs//lib/rbs/environment.rb#170 + def from_loader(loader); end + end +end + +# source://rbs//lib/rbs/environment.rb#130 +class RBS::Environment::ClassAliasEntry < ::RBS::Environment::SingleEntry; end + +# source://rbs//lib/rbs/environment.rb#100 +class RBS::Environment::ClassEntry < ::RBS::Environment::MultiEntry + # source://rbs//lib/rbs/environment.rb#101 + def primary; end +end + +# source://rbs//lib/rbs/environment.rb#139 +class RBS::Environment::ConstantEntry < ::RBS::Environment::SingleEntry; end + +# source://rbs//lib/rbs/environment.rb#16 +module RBS::Environment::ContextUtil + # source://rbs//lib/rbs/environment.rb#17 + def calculate_context(decls); end +end + +# source://rbs//lib/rbs/environment.rb#142 +class RBS::Environment::GlobalEntry < ::RBS::Environment::SingleEntry; end + +# source://rbs//lib/rbs/environment.rb#133 +class RBS::Environment::InterfaceEntry < ::RBS::Environment::SingleEntry; end + +# source://rbs//lib/rbs/environment.rb#127 +class RBS::Environment::ModuleAliasEntry < ::RBS::Environment::SingleEntry; end + +# source://rbs//lib/rbs/environment.rb#85 +class RBS::Environment::ModuleEntry < ::RBS::Environment::MultiEntry + # source://rbs//lib/rbs/environment.rb#92 + def primary; end + + # source://rbs//lib/rbs/environment.rb#86 + def self_types; end +end + +# source://rbs//lib/rbs/environment.rb#29 +class RBS::Environment::MultiEntry + # @return [MultiEntry] a new instance of MultiEntry + # + # source://rbs//lib/rbs/environment.rb#43 + def initialize(name:); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/environment.rb#70 + def compatible_params?(ps1, ps2); end + + # Returns the value of attribute decls. + # + # source://rbs//lib/rbs/environment.rb#41 + def decls; end + + # source://rbs//lib/rbs/environment.rb#48 + def insert(decl:, outer:); end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/environment.rb#40 + def name; end + + # source://rbs//lib/rbs/environment.rb#80 + def primary; end + + # source://rbs//lib/rbs/environment.rb#76 + def type_params; end + + # source://rbs//lib/rbs/environment.rb#53 + def validate_type_params; end +end + +# source://rbs//lib/rbs/environment.rb#30 +class RBS::Environment::MultiEntry::D < ::Struct + include ::RBS::Environment::ContextUtil + + # source://rbs//lib/rbs/environment.rb#35 + def context; end + + def decl; end + def decl=(_); end + def outer; end + def outer=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rbs//lib/rbs/environment.rb#109 +class RBS::Environment::SingleEntry + include ::RBS::Environment::ContextUtil + + # @return [SingleEntry] a new instance of SingleEntry + # + # source://rbs//lib/rbs/environment.rb#114 + def initialize(name:, decl:, outer:); end + + # source://rbs//lib/rbs/environment.rb#122 + def context; end + + # Returns the value of attribute decl. + # + # source://rbs//lib/rbs/environment.rb#112 + def decl; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/environment.rb#110 + def name; end + + # Returns the value of attribute outer. + # + # source://rbs//lib/rbs/environment.rb#111 + def outer; end +end + +# source://rbs//lib/rbs/environment.rb#136 +class RBS::Environment::TypeAliasEntry < ::RBS::Environment::SingleEntry; end + +# source://rbs//lib/rbs/environment/use_map.rb#5 +class RBS::Environment::UseMap + # @return [UseMap] a new instance of UseMap + # + # source://rbs//lib/rbs/environment/use_map.rb#30 + def initialize(table:); end + + # source://rbs//lib/rbs/environment/use_map.rb#36 + def build_map(clause); end + + # source://rbs//lib/rbs/environment/use_map.rb#72 + def resolve(type_name); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/environment/use_map.rb#53 + def resolve?(type_name); end + + # Returns the value of attribute use_dirs. + # + # source://rbs//lib/rbs/environment/use_map.rb#28 + def use_dirs; end +end + +# source://rbs//lib/rbs/environment/use_map.rb#6 +class RBS::Environment::UseMap::Table + # @return [Table] a new instance of Table + # + # source://rbs//lib/rbs/environment/use_map.rb#9 + def initialize; end + + # Returns the value of attribute children. + # + # source://rbs//lib/rbs/environment/use_map.rb#7 + def children; end + + # source://rbs//lib/rbs/environment/use_map.rb#14 + def compute_children; end + + # Returns the value of attribute known_types. + # + # source://rbs//lib/rbs/environment/use_map.rb#7 + def known_types; end +end + +# source://rbs//lib/rbs/environment_loader.rb#4 +class RBS::EnvironmentLoader + include ::RBS::FileFinder + + # @return [EnvironmentLoader] a new instance of EnvironmentLoader + # + # source://rbs//lib/rbs/environment_loader.rb#39 + def initialize(core_root: T.unsafe(nil), repository: T.unsafe(nil)); end + + # source://rbs//lib/rbs/environment_loader.rb#47 + def add(path: T.unsafe(nil), library: T.unsafe(nil), version: T.unsafe(nil), resolve_dependencies: T.unsafe(nil)); end + + # source://rbs//lib/rbs/environment_loader.rb#79 + def add_collection(lockfile); end + + # Returns the value of attribute core_root. + # + # source://rbs//lib/rbs/environment_loader.rb#19 + def core_root; end + + # Returns the value of attribute dirs. + # + # source://rbs//lib/rbs/environment_loader.rb#23 + def dirs; end + + # source://rbs//lib/rbs/environment_loader.rb#125 + def each_dir; end + + # source://rbs//lib/rbs/environment_loader.rb#148 + def each_signature; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/environment_loader.rb#103 + def has_library?(library:, version:); end + + # Returns the value of attribute libs. + # + # source://rbs//lib/rbs/environment_loader.rb#22 + def libs; end + + # source://rbs//lib/rbs/environment_loader.rb#111 + def load(env:); end + + # Returns the value of attribute repository. + # + # source://rbs//lib/rbs/environment_loader.rb#20 + def repository; end + + # source://rbs//lib/rbs/environment_loader.rb#64 + def resolve_dependencies(library:, version:); end + + class << self + # source://rbs//lib/rbs/environment_loader.rb#27 + def gem_sig_path(name, version); end + end +end + +# source://rbs//lib/rbs/environment_loader.rb#25 +RBS::EnvironmentLoader::DEFAULT_CORE_ROOT = T.let(T.unsafe(nil), Pathname) + +# source://rbs//lib/rbs/environment_loader.rb#17 +class RBS::EnvironmentLoader::Library < ::Struct + def name; end + def name=(_); end + def version; end + def version=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rbs//lib/rbs/environment_loader.rb#5 +class RBS::EnvironmentLoader::UnknownLibraryError < ::StandardError + # @return [UnknownLibraryError] a new instance of UnknownLibraryError + # + # source://rbs//lib/rbs/environment_loader.rb#8 + def initialize(lib:); end + + # Returns the value of attribute library. + # + # source://rbs//lib/rbs/environment_loader.rb#6 + def library; end +end + +# source://rbs//lib/rbs/environment_walker.rb#4 +class RBS::EnvironmentWalker + include ::TSort + + # @return [EnvironmentWalker] a new instance of EnvironmentWalker + # + # source://rbs//lib/rbs/environment_walker.rb#11 + def initialize(env:); end + + # source://rbs//lib/rbs/environment_walker.rb#16 + def builder; end + + # source://rbs//lib/rbs/environment_walker.rb#99 + def each_type_name(type, &block); end + + # source://rbs//lib/rbs/environment_walker.rb#105 + def each_type_node(type, &block); end + + # Returns the value of attribute env. + # + # source://rbs//lib/rbs/environment_walker.rb#9 + def env; end + + # source://rbs//lib/rbs/environment_walker.rb#20 + def only_ancestors!(only = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/environment_walker.rb#25 + def only_ancestors?; end + + # source://rbs//lib/rbs/environment_walker.rb#44 + def tsort_each_child(node, &block); end + + # source://rbs//lib/rbs/environment_walker.rb#31 + def tsort_each_node(&block); end +end + +# source://rbs//lib/rbs/environment_walker.rb#5 +class RBS::EnvironmentWalker::InstanceNode < ::Struct + def type_name; end + def type_name=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rbs//lib/rbs/environment_walker.rb#6 +class RBS::EnvironmentWalker::SingletonNode < ::Struct + def type_name; end + def type_name=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rbs//lib/rbs/environment_walker.rb#7 +class RBS::EnvironmentWalker::TypeNameNode < ::Struct + def type_name; end + def type_name=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rbs//lib/rbs/factory.rb#4 +class RBS::Factory + # source://rbs//lib/rbs/factory.rb#5 + def type_name(string); end +end + +# source://rbs//lib/rbs/file_finder.rb#4 +module RBS::FileFinder + class << self + # source://rbs//lib/rbs/file_finder.rb#7 + def each_file(path, immediate:, skip_hidden:, &block); end + end +end + +# source://rbs//lib/rbs/errors.rb#375 +class RBS::GenericParameterMismatchError < ::RBS::LoadingError + # @return [GenericParameterMismatchError] a new instance of GenericParameterMismatchError + # + # source://rbs//lib/rbs/errors.rb#379 + def initialize(name:, decl:); end + + # Returns the value of attribute decl. + # + # source://rbs//lib/rbs/errors.rb#377 + def decl; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/errors.rb#376 + def name; end +end + +# source://rbs//lib/rbs/errors.rb#521 +class RBS::InconsistentClassModuleAliasError < ::RBS::BaseError + include ::RBS::DetailedMessageable + + # @return [InconsistentClassModuleAliasError] a new instance of InconsistentClassModuleAliasError + # + # source://rbs//lib/rbs/errors.rb#526 + def initialize(entry); end + + # Returns the value of attribute alias_entry. + # + # source://rbs//lib/rbs/errors.rb#524 + def alias_entry; end + + # source://rbs//lib/rbs/errors.rb#540 + def location; end +end + +# source://rbs//lib/rbs/errors.rb#179 +class RBS::InheritModuleError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # @return [InheritModuleError] a new instance of InheritModuleError + # + # source://rbs//lib/rbs/errors.rb#184 + def initialize(super_decl); end + + # source://rbs//lib/rbs/errors.rb#190 + def location; end + + # Returns the value of attribute super_decl. + # + # source://rbs//lib/rbs/errors.rb#182 + def super_decl; end + + class << self + # source://rbs//lib/rbs/errors.rb#194 + def check!(super_decl, env:); end + end +end + +# source://rbs//lib/rbs/errors.rb#346 +class RBS::InvalidOverloadMethodError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # @return [InvalidOverloadMethodError] a new instance of InvalidOverloadMethodError + # + # source://rbs//lib/rbs/errors.rb#354 + def initialize(type_name:, method_name:, kind:, members:); end + + # Returns the value of attribute kind. + # + # source://rbs//lib/rbs/errors.rb#351 + def kind; end + + # source://rbs//lib/rbs/errors.rb#370 + def location; end + + # Returns the value of attribute members. + # + # source://rbs//lib/rbs/errors.rb#352 + def members; end + + # Returns the value of attribute method_name. + # + # source://rbs//lib/rbs/errors.rb#350 + def method_name; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/errors.rb#349 + def type_name; end +end + +# source://rbs//lib/rbs/errors.rb#81 +class RBS::InvalidTypeApplicationError < ::RBS::DefinitionError + # @return [InvalidTypeApplicationError] a new instance of InvalidTypeApplicationError + # + # source://rbs//lib/rbs/errors.rb#87 + def initialize(type_name:, args:, params:, location:); end + + # Returns the value of attribute args. + # + # source://rbs//lib/rbs/errors.rb#83 + def args; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/errors.rb#85 + def location; end + + # Returns the value of attribute params. + # + # source://rbs//lib/rbs/errors.rb#84 + def params; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/errors.rb#82 + def type_name; end + + class << self + # source://rbs//lib/rbs/errors.rb#95 + def check!(type_name:, args:, params:, location:); end + end +end + +# source://rbs//lib/rbs/errors.rb#399 +class RBS::InvalidVarianceAnnotationError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # @return [InvalidVarianceAnnotationError] a new instance of InvalidVarianceAnnotationError + # + # source://rbs//lib/rbs/errors.rb#406 + def initialize(type_name:, param:, location:); end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/errors.rb#404 + def location; end + + # Returns the value of attribute param. + # + # source://rbs//lib/rbs/errors.rb#403 + def param; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/errors.rb#402 + def type_name; end +end + +# source://rbs//lib/rbs/errors.rb#20 +class RBS::LoadingError < ::RBS::BaseError; end + +# source://rbs//lib/rbs/location_aux.rb#4 +class RBS::Location + def initialize(_arg0, _arg1, _arg2); end + + # source://rbs//lib/rbs/location_aux.rb#70 + def ==(other); end + + def [](_arg0); end + def _add_optional_child(_arg0, _arg1, _arg2); end + def _add_optional_no_child(_arg0); end + def _add_required_child(_arg0, _arg1, _arg2); end + def _optional_keys; end + def _required_keys; end + + # source://rbs//lib/rbs/location_aux.rb#101 + def add_optional_child(name, range); end + + # source://rbs//lib/rbs/location_aux.rb#97 + def add_required_child(name, range); end + + def aref(_arg0); end + def buffer; end + + # source://rbs//lib/rbs/location_aux.rb#109 + def each_optional_key(&block); end + + # source://rbs//lib/rbs/location_aux.rb#117 + def each_required_key(&block); end + + # source://rbs//lib/rbs/location_aux.rb#42 + def end_column; end + + # source://rbs//lib/rbs/location_aux.rb#38 + def end_line; end + + # source://rbs//lib/rbs/location_aux.rb#52 + def end_loc; end + + def end_pos; end + + # source://rbs//lib/rbs/location_aux.rb#5 + def inspect; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/location_aux.rb#125 + def key?(name); end + + # source://rbs//lib/rbs/location_aux.rb#26 + def name; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/location_aux.rb#129 + def optional_key?(name); end + + # source://rbs//lib/rbs/location_aux.rb#58 + def range; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/location_aux.rb#133 + def required_key?(name); end + + # source://rbs//lib/rbs/location_aux.rb#62 + def source; end + + # source://rbs//lib/rbs/location_aux.rb#34 + def start_column; end + + # source://rbs//lib/rbs/location_aux.rb#30 + def start_line; end + + # source://rbs//lib/rbs/location_aux.rb#46 + def start_loc; end + + def start_pos; end + + # source://rbs//lib/rbs/location_aux.rb#77 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/location_aux.rb#66 + def to_s; end + + private + + def _end_loc; end + def _start_loc; end + def initialize_copy(_arg0); end + + class << self + # source://rbs//lib/rbs/location_aux.rb#11 + def new(buffer_ = T.unsafe(nil), start_pos_ = T.unsafe(nil), end_pos_ = T.unsafe(nil), buffer: T.unsafe(nil), start_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end + + # source://rbs//lib/rbs/location_aux.rb#93 + def to_string(location, default: T.unsafe(nil)); end + end +end + +# source://rbs//lib/rbs/location_aux.rb#24 +RBS::Location::WithChildren = RBS::Location + +# source://rbs//lib/rbs/locator.rb#4 +class RBS::Locator + # @return [Locator] a new instance of Locator + # + # source://rbs//lib/rbs/locator.rb#7 + def initialize(buffer:, dirs:, decls:); end + + # Returns the value of attribute buffer. + # + # source://rbs//lib/rbs/locator.rb#5 + def buffer; end + + # Returns the value of attribute decls. + # + # source://rbs//lib/rbs/locator.rb#5 + def decls; end + + # Returns the value of attribute dirs. + # + # source://rbs//lib/rbs/locator.rb#5 + def dirs; end + + # source://rbs//lib/rbs/locator.rb#13 + def find(line:, column:); end + + # source://rbs//lib/rbs/locator.rb#29 + def find2(line:, column:); end + + # source://rbs//lib/rbs/locator.rb#58 + def find_in_decl(pos, decl:, array:); end + + # source://rbs//lib/rbs/locator.rb#42 + def find_in_directive(pos, dir, array); end + + # source://rbs//lib/rbs/locator.rb#203 + def find_in_loc(pos, location:, array:); end + + # source://rbs//lib/rbs/locator.rb#129 + def find_in_member(pos, member:, array:); end + + # source://rbs//lib/rbs/locator.rb#152 + def find_in_method_type(pos, method_type:, array:); end + + # source://rbs//lib/rbs/locator.rb#187 + def find_in_type(pos, type:, array:); end + + # source://rbs//lib/rbs/locator.rb#170 + def find_in_type_param(pos, type_param:, array:); end + + # source://rbs//lib/rbs/locator.rb#230 + def test_loc(pos, location:); end +end + +# source://rbs//lib/rbs/errors.rb#4 +module RBS::MethodNameHelper + # source://rbs//lib/rbs/errors.rb#5 + def method_name_string; end +end + +# source://rbs//lib/rbs/method_type.rb#4 +class RBS::MethodType + # @return [MethodType] a new instance of MethodType + # + # source://rbs//lib/rbs/method_type.rb#10 + def initialize(type_params:, type:, block:, location:); end + + # source://rbs//lib/rbs/method_type.rb#17 + def ==(other); end + + # Returns the value of attribute block. + # + # source://rbs//lib/rbs/method_type.rb#7 + def block; end + + # source://rbs//lib/rbs/method_type.rb#84 + def each_type(&block); end + + # source://rbs//lib/rbs/method_type.rb#57 + def free_variables(set = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/method_type.rb#125 + def has_classish_type?; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/method_type.rb#121 + def has_self_type?; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/method_type.rb#8 + def location; end + + # source://rbs//lib/rbs/method_type.rb#63 + def map_type(&block); end + + # source://rbs//lib/rbs/method_type.rb#72 + def map_type_bound(&block); end + + # source://rbs//lib/rbs/method_type.rb#33 + def sub(s); end + + # source://rbs//lib/rbs/method_type.rb#24 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/method_type.rb#98 + def to_s; end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/method_type.rb#6 + def type; end + + # source://rbs//lib/rbs/method_type.rb#117 + def type_param_names; end + + # Returns the value of attribute type_params. + # + # source://rbs//lib/rbs/method_type.rb#5 + def type_params; end + + # source://rbs//lib/rbs/method_type.rb#48 + def update(type_params: T.unsafe(nil), type: T.unsafe(nil), block: T.unsafe(nil), location: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/method_type.rb#129 + def with_nonreturn_void?; end +end + +# source://rbs//lib/rbs/errors.rb#435 +class RBS::MixinClassError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # @return [MixinClassError] a new instance of MixinClassError + # + # source://rbs//lib/rbs/errors.rb#441 + def initialize(type_name:, member:); end + + # source://rbs//lib/rbs/errors.rb#448 + def location; end + + # Returns the value of attribute member. + # + # source://rbs//lib/rbs/errors.rb#439 + def member; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/errors.rb#438 + def type_name; end + + private + + # source://rbs//lib/rbs/errors.rb#460 + def mixin_name; end + + class << self + # source://rbs//lib/rbs/errors.rb#452 + def check!(type_name:, env:, member:); end + end +end + +# source://rbs//lib/rbs/namespace.rb#4 +class RBS::Namespace + # @return [Namespace] a new instance of Namespace + # + # source://rbs//lib/rbs/namespace.rb#7 + def initialize(path:, absolute:); end + + # source://rbs//lib/rbs/namespace.rb#20 + def +(other); end + + # source://rbs//lib/rbs/namespace.rb#59 + def ==(other); end + + # source://rbs//lib/rbs/namespace.rb#47 + def absolute!; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/namespace.rb#39 + def absolute?; end + + # source://rbs//lib/rbs/namespace.rb#28 + def append(component); end + + # source://rbs//lib/rbs/namespace.rb#101 + def ascend; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/namespace.rb#55 + def empty?; end + + # source://rbs//lib/rbs/namespace.rb#59 + def eql?(other); end + + # source://rbs//lib/rbs/namespace.rb#65 + def hash; end + + # source://rbs//lib/rbs/namespace.rb#32 + def parent; end + + # Returns the value of attribute path. + # + # source://rbs//lib/rbs/namespace.rb#5 + def path; end + + # source://rbs//lib/rbs/namespace.rb#51 + def relative!; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/namespace.rb#43 + def relative?; end + + # source://rbs//lib/rbs/namespace.rb#69 + def split; end + + # source://rbs//lib/rbs/namespace.rb#75 + def to_s; end + + # source://rbs//lib/rbs/namespace.rb#84 + def to_type_name; end + + class << self + # source://rbs//lib/rbs/namespace.rb#12 + def empty; end + + # source://rbs//lib/rbs/namespace.rb#93 + def parse(string); end + + # source://rbs//lib/rbs/namespace.rb#16 + def root; end + end +end + +# source://rbs//lib/rbs/errors.rb#221 +class RBS::NoMixinFoundError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # @return [NoMixinFoundError] a new instance of NoMixinFoundError + # + # source://rbs//lib/rbs/errors.rb#227 + def initialize(type_name:, member:); end + + # source://rbs//lib/rbs/errors.rb#234 + def location; end + + # Returns the value of attribute member. + # + # source://rbs//lib/rbs/errors.rb#225 + def member; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/errors.rb#224 + def type_name; end + + class << self + # source://rbs//lib/rbs/errors.rb#238 + def check!(type_name, env:, member:); end + end +end + +# source://rbs//lib/rbs/errors.rb#202 +class RBS::NoSelfTypeFoundError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # @return [NoSelfTypeFoundError] a new instance of NoSelfTypeFoundError + # + # source://rbs//lib/rbs/errors.rb#208 + def initialize(type_name:, location:); end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/errors.rb#206 + def location; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/errors.rb#205 + def type_name; end + + class << self + # source://rbs//lib/rbs/errors.rb#215 + def check!(self_type, env:); end + end +end + +# source://rbs//lib/rbs/errors.rb#159 +class RBS::NoSuperclassFoundError < ::RBS::DefinitionError + # @return [NoSuperclassFoundError] a new instance of NoSuperclassFoundError + # + # source://rbs//lib/rbs/errors.rb#163 + def initialize(type_name:, location:); end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/errors.rb#161 + def location; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/errors.rb#160 + def type_name; end + + class << self + # source://rbs//lib/rbs/errors.rb#170 + def check!(type_name, env:, location:); end + end +end + +# source://rbs//lib/rbs/errors.rb#140 +class RBS::NoTypeFoundError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # @return [NoTypeFoundError] a new instance of NoTypeFoundError + # + # source://rbs//lib/rbs/errors.rb#146 + def initialize(type_name:, location:); end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/errors.rb#144 + def location; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/errors.rb#143 + def type_name; end + + class << self + # source://rbs//lib/rbs/errors.rb#153 + def check!(type_name, env:, location:); end + end +end + +# source://rbs//lib/rbs/errors.rb#492 +class RBS::NonregularTypeAliasError < ::RBS::BaseError + include ::RBS::DetailedMessageable + + # @return [NonregularTypeAliasError] a new instance of NonregularTypeAliasError + # + # source://rbs//lib/rbs/errors.rb#498 + def initialize(diagnostic:, location:); end + + # Returns the value of attribute diagnostic. + # + # source://rbs//lib/rbs/errors.rb#495 + def diagnostic; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/errors.rb#496 + def location; end +end + +# source://rbs//lib/rbs/parser_aux.rb#4 +class RBS::Parser + class << self + def _parse_method_type(_arg0, _arg1, _arg2, _arg3, _arg4); end + def _parse_signature(_arg0, _arg1); end + def _parse_type(_arg0, _arg1, _arg2, _arg3, _arg4); end + + # source://rbs//lib/rbs/parser_aux.rb#22 + def buffer(source); end + + # source://rbs//lib/rbs/parser_aux.rb#10 + def parse_method_type(source, range: T.unsafe(nil), variables: T.unsafe(nil), require_eof: T.unsafe(nil)); end + + # source://rbs//lib/rbs/parser_aux.rb#15 + def parse_signature(source); end + + # source://rbs//lib/rbs/parser_aux.rb#5 + def parse_type(source, range: T.unsafe(nil), variables: T.unsafe(nil), require_eof: T.unsafe(nil)); end + end +end + +# source://rbs//lib/rbs/parser_aux.rb#36 +RBS::Parser::KEYWORDS = T.let(T.unsafe(nil), Hash) + +# source://rbs//lib/rbs/parser_compat/lexer_error.rb#6 +RBS::Parser::LexerError = RBS::ParsingError + +# source://rbs//lib/rbs/parser_compat/located_value.rb#6 +class RBS::Parser::LocatedValue; end + +# source://rbs//lib/rbs/parser_compat/semantics_error.rb#6 +RBS::Parser::SemanticsError = RBS::ParsingError + +# source://rbs//lib/rbs/parser_compat/syntax_error.rb#6 +RBS::Parser::SyntaxError = RBS::ParsingError + +# source://rbs//lib/rbs/errors.rb#51 +class RBS::ParsingError < ::RBS::BaseError + include ::RBS::DetailedMessageable + + # @return [ParsingError] a new instance of ParsingError + # + # source://rbs//lib/rbs/errors.rb#58 + def initialize(location, error_message, token_type); end + + # Returns the value of attribute error_message. + # + # source://rbs//lib/rbs/errors.rb#55 + def error_message; end + + # source://rbs//lib/rbs/errors.rb#66 + def error_value; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/errors.rb#54 + def location; end + + # source://rbs//lib/rbs/errors.rb#73 + def token_str; end + + # Returns the value of attribute token_type. + # + # source://rbs//lib/rbs/errors.rb#56 + def token_type; end +end + +# source://rbs//lib/rbs/prototype/helpers.rb#4 +module RBS::Prototype; end + +# source://rbs//lib/rbs/prototype/helpers.rb#5 +module RBS::Prototype::Helpers + private + + # @return [Boolean] + # + # source://rbs//lib/rbs/prototype/helpers.rb#97 + def any_node?(node, nodes: T.unsafe(nil), &block); end + + # NOTE: args_node may be a nil by a bug + # https://bugs.ruby-lang.org/issues/17495 + # + # source://rbs//lib/rbs/prototype/helpers.rb#121 + def args_from_node(args_node); end + + # source://rbs//lib/rbs/prototype/helpers.rb#8 + def block_from_body(node); end + + # source://rbs//lib/rbs/prototype/helpers.rb#85 + def each_child(node, &block); end + + # source://rbs//lib/rbs/prototype/helpers.rb#89 + def each_node(nodes); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/prototype/helpers.rb#109 + def keyword_hash?(node); end + + # source://rbs//lib/rbs/prototype/helpers.rb#125 + def untyped; end +end + +# source://rbs//lib/rbs/prototype/node_usage.rb#5 +class RBS::Prototype::NodeUsage + include ::RBS::Prototype::Helpers + + # @return [NodeUsage] a new instance of NodeUsage + # + # source://rbs//lib/rbs/prototype/node_usage.rb#10 + def initialize(node); end + + # source://rbs//lib/rbs/prototype/node_usage.rb#25 + def calculate(node, conditional:); end + + # Returns the value of attribute conditional_nodes. + # + # source://rbs//lib/rbs/prototype/node_usage.rb#8 + def conditional_nodes; end + + # source://rbs//lib/rbs/prototype/node_usage.rb#17 + def each_conditional_node(&block); end +end + +# source://rbs//lib/rbs/prototype/rb.rb#5 +class RBS::Prototype::RB + include ::RBS::Prototype::Helpers + + # @return [RB] a new instance of RB + # + # source://rbs//lib/rbs/prototype/rb.rb#45 + def initialize; end + + # source://rbs//lib/rbs/prototype/rb.rb#552 + def block_type(node); end + + # source://rbs//lib/rbs/prototype/rb.rb#532 + def body_type(node); end + + # source://rbs//lib/rbs/prototype/rb.rb#451 + def const_to_name(node, context:); end + + # source://rbs//lib/rbs/prototype/rb.rb#432 + def const_to_name!(node); end + + # source://rbs//lib/rbs/prototype/rb.rb#730 + def current_accessibility(decls, index = T.unsafe(nil)); end + + # source://rbs//lib/rbs/prototype/rb.rb#49 + def decls; end + + # source://rbs//lib/rbs/prototype/rb.rb#770 + def find_def_index_by_name(decls, name); end + + # source://rbs//lib/rbs/prototype/rb.rb#527 + def function_return_type_from_body(node); end + + # source://rbs//lib/rbs/prototype/rb.rb#471 + def function_type_from_body(node, def_name); end + + # source://rbs//lib/rbs/prototype/rb.rb#545 + def if_unless_type(node); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/prototype/rb.rb#766 + def is_accessibility?(decl); end + + # source://rbs//lib/rbs/prototype/rb.rb#462 + def literal_to_symbol(node); end + + # source://rbs//lib/rbs/prototype/rb.rb#566 + def literal_to_type(node); end + + # backward compatible + # + # source://rbs//lib/rbs/prototype/rb.rb#687 + def node_type(node, default: T.unsafe(nil)); end + + # source://rbs//lib/rbs/prototype/rb.rb#687 + def param_type(node, default: T.unsafe(nil)); end + + # source://rbs//lib/rbs/prototype/rb.rb#75 + def parse(string); end + + # source://rbs//lib/rbs/prototype/rb.rb#722 + def private; end + + # source://rbs//lib/rbs/prototype/rb.rb#107 + def process(node, decls:, comments:, context:); end + + # source://rbs//lib/rbs/prototype/rb.rb#426 + def process_children(node, decls:, comments:, context:); end + + # source://rbs//lib/rbs/prototype/rb.rb#726 + def public; end + + # source://rbs//lib/rbs/prototype/rb.rb#667 + def range_element_type(types); end + + # source://rbs//lib/rbs/prototype/rb.rb#740 + def remove_unnecessary_accessibility_methods!(decls); end + + # source://rbs//lib/rbs/prototype/rb.rb#788 + def sort_members!(decls); end + + # Returns the value of attribute source_decls. + # + # source://rbs//lib/rbs/prototype/rb.rb#42 + def source_decls; end + + # Returns the value of attribute toplevel_members. + # + # source://rbs//lib/rbs/prototype/rb.rb#43 + def toplevel_members; end + + # source://rbs//lib/rbs/prototype/rb.rb#656 + def types_to_union_type(types); end +end + +# source://rbs//lib/rbs/prototype/rb.rb#8 +class RBS::Prototype::RB::Context < ::Struct + # source://rbs//lib/rbs/prototype/rb.rb#25 + def attribute_kind; end + + # source://rbs//lib/rbs/prototype/rb.rb#33 + def enter_namespace(namespace); end + + def in_def; end + def in_def=(_); end + + # source://rbs//lib/rbs/prototype/rb.rb#15 + def method_kind; end + + def module_function; end + def module_function=(_); end + def namespace; end + def namespace=(_); end + def singleton; end + def singleton=(_); end + + # source://rbs//lib/rbs/prototype/rb.rb#37 + def update(module_function: T.unsafe(nil), singleton: T.unsafe(nil), in_def: T.unsafe(nil)); end + + class << self + def [](*_arg0); end + + # source://rbs//lib/rbs/prototype/rb.rb#11 + def initial(namespace: T.unsafe(nil)); end + + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rbs//lib/rbs/prototype/rbi.rb#5 +class RBS::Prototype::RBI + # @return [RBI] a new instance of RBI + # + # source://rbs//lib/rbs/prototype/rbi.rb#10 + def initialize; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/prototype/rbi.rb#546 + def call_node?(node, name:, receiver: T.unsafe(nil), args: T.unsafe(nil)); end + + # source://rbs//lib/rbs/prototype/rbi.rb#550 + def const_to_name(node); end + + # source://rbs//lib/rbs/prototype/rbi.rb#90 + def current_module; end + + # source://rbs//lib/rbs/prototype/rbi.rb#94 + def current_module!; end + + # source://rbs//lib/rbs/prototype/rbi.rb#46 + def current_namespace; end + + # Returns the value of attribute decls. + # + # source://rbs//lib/rbs/prototype/rbi.rb#6 + def decls; end + + # source://rbs//lib/rbs/prototype/rbi.rb#586 + def each_arg(array, &block); end + + # source://rbs//lib/rbs/prototype/rbi.rb#600 + def each_child(node); end + + # source://rbs//lib/rbs/prototype/rbi.rb#112 + def join_comments(nodes, comments); end + + # Returns the value of attribute last_sig. + # + # source://rbs//lib/rbs/prototype/rbi.rb#8 + def last_sig; end + + # source://rbs//lib/rbs/prototype/rbi.rb#278 + def method_type(args_node, type_node, variables:, overloads:); end + + # Returns the value of attribute modules. + # + # source://rbs//lib/rbs/prototype/rbi.rb#7 + def modules; end + + # source://rbs//lib/rbs/prototype/rbi.rb#42 + def nested_name(name); end + + # source://rbs//lib/rbs/prototype/rbi.rb#608 + def node_to_hash(node); end + + # source://rbs//lib/rbs/prototype/rbi.rb#16 + def parse(string); end + + # source://rbs//lib/rbs/prototype/rbi.rb#340 + def parse_params(args_node, args, method_type, variables:, overloads:); end + + # source://rbs//lib/rbs/prototype/rbi.rb#106 + def pop_sig; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/prototype/rbi.rb#538 + def proc_type?(type_node); end + + # source://rbs//lib/rbs/prototype/rbi.rb#117 + def process(node, comments:, outer: T.unsafe(nil)); end + + # source://rbs//lib/rbs/prototype/rbi.rb#52 + def push_class(name, super_class, comment:); end + + # source://rbs//lib/rbs/prototype/rbi.rb#71 + def push_module(name, comment:); end + + # source://rbs//lib/rbs/prototype/rbi.rb#98 + def push_sig(node); end + + # source://rbs//lib/rbs/prototype/rbi.rb#461 + def type_of(type_node, variables:); end + + # source://rbs//lib/rbs/prototype/rbi.rb#474 + def type_of0(type_node, variables:); end +end + +# source://rbs//lib/rbs/prototype/runtime/helpers.rb#5 +class RBS::Prototype::Runtime + include ::RBS::Prototype::Helpers + include ::RBS::Prototype::Runtime::Helpers + + # @return [Runtime] a new instance of Runtime + # + # source://rbs//lib/rbs/prototype/runtime.rb#70 + def initialize(patterns:, env:, merge:, todo: T.unsafe(nil), owners_included: T.unsafe(nil)); end + + # source://rbs//lib/rbs/prototype/runtime.rb#652 + def block_from_ast_of(method); end + + # source://rbs//lib/rbs/prototype/runtime.rb#100 + def builder; end + + # source://rbs//lib/rbs/prototype/runtime.rb#108 + def decls; end + + # Generate/find outer module declarations + # This is broken down into another method to comply with `DRY` + # This generates/finds declarations in nested form & returns the last array of declarations + # + # source://rbs//lib/rbs/prototype/runtime.rb#581 + def ensure_outer_module_declarations(mod); end + + # Returns the value of attribute env. + # + # source://rbs//lib/rbs/prototype/runtime.rb#64 + def env; end + + # source://rbs//lib/rbs/prototype/runtime.rb#486 + def generate_class(mod); end + + # source://rbs//lib/rbs/prototype/runtime.rb#424 + def generate_constants(mod, decls); end + + # source://rbs//lib/rbs/prototype/runtime.rb#298 + def generate_methods(mod, module_name, members); end + + # source://rbs//lib/rbs/prototype/runtime.rb#563 + def generate_mixin(mod, decl, type_name, type_name_absolute); end + + # source://rbs//lib/rbs/prototype/runtime.rb#525 + def generate_module(mod); end + + # source://rbs//lib/rbs/prototype/runtime.rb#471 + def generate_super_class(mod); end + + # Returns the value of attribute merge. + # + # source://rbs//lib/rbs/prototype/runtime.rb#65 + def merge; end + + # source://rbs//lib/rbs/prototype/runtime.rb#239 + def merge_rbs(module_name, members, instance: T.unsafe(nil), singleton: T.unsafe(nil)); end + + # source://rbs//lib/rbs/prototype/runtime.rb#170 + def method_type(method); end + + # Returns the value of attribute outline. + # + # source://rbs//lib/rbs/prototype/runtime.rb#68 + def outline; end + + # Sets the attribute outline + # + # @param value the value to set the attribute outline to. + # + # source://rbs//lib/rbs/prototype/runtime.rb#68 + def outline=(_arg0); end + + # Returns the value of attribute owners_included. + # + # source://rbs//lib/rbs/prototype/runtime.rb#67 + def owners_included; end + + # source://rbs//lib/rbs/prototype/runtime.rb#104 + def parse(file); end + + # Returns the value of attribute patterns. + # + # source://rbs//lib/rbs/prototype/runtime.rb#63 + def patterns; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/prototype/runtime.rb#83 + def target?(const); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/prototype/runtime.rb#285 + def target_method?(mod, instance: T.unsafe(nil), singleton: T.unsafe(nil)); end + + # Returns the value of attribute todo. + # + # source://rbs//lib/rbs/prototype/runtime.rb#66 + def todo; end + + # source://rbs//lib/rbs/prototype/runtime.rb#96 + def todo_object; end + + # source://rbs//lib/rbs/prototype/runtime.rb#635 + def type_args(type_name); end + + # source://rbs//lib/rbs/prototype/runtime.rb#643 + def type_params(mod); end + + private + + # @return [Boolean] + # + # source://rbs//lib/rbs/prototype/runtime.rb#414 + def can_alias?(mod, method); end + + # source://rbs//lib/rbs/prototype/runtime.rb#128 + def each_mixined_module(type_name, mod); end + + # source://rbs//lib/rbs/prototype/runtime.rb#137 + def each_mixined_module_one(type_name, mod); end +end + +# source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#211 +class RBS::Prototype::Runtime::DataGenerator < ::RBS::Prototype::Runtime::ValueObjectBase + private + + # source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#227 + def add_decl_members(decl); end + + # def self.new: (untyped foo, untyped bar) -> instance + # | (foo: untyped, bar: untyped) -> instance + # + # source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#235 + def build_s_new; end + + # source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#223 + def build_super_class; end + + class << self + # @return [Boolean] + # + # source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#212 + def generatable?(target); end + end +end + +# source://rbs//lib/rbs/prototype/runtime/helpers.rb#6 +module RBS::Prototype::Runtime::Helpers + private + + # source://rbs//lib/rbs/prototype/runtime/helpers.rb#19 + def const_name(const); end + + # source://rbs//lib/rbs/prototype/runtime/helpers.rb#15 + def const_name!(const); end + + # Returns the exact name & not compactly declared name + # + # source://rbs//lib/rbs/prototype/runtime/helpers.rb#10 + def only_name(mod); end + + # source://rbs//lib/rbs/prototype/runtime/helpers.rb#37 + def to_type_name(name, full_name: T.unsafe(nil)); end + + # source://rbs//lib/rbs/prototype/runtime/helpers.rb#53 + def untyped; end +end + +# source://rbs//lib/rbs/prototype/runtime/reflection.rb#6 +module RBS::Prototype::Runtime::Reflection + class << self + # source://rbs//lib/rbs/prototype/runtime/reflection.rb#12 + def constants_of(mod, inherit = T.unsafe(nil)); end + + # source://rbs//lib/rbs/prototype/runtime/reflection.rb#7 + def object_class(value); end + end +end + +# source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#89 +class RBS::Prototype::Runtime::StructGenerator < ::RBS::Prototype::Runtime::ValueObjectBase + private + + # source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#106 + def add_decl_members(decl); end + + # source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#163 + def build_overload_for_keyword_arguments; end + + # source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#149 + def build_overload_for_positional_arguments; end + + # def self.keyword_init?: () -> bool? + # + # source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#178 + def build_s_keyword_init_p; end + + # def self.new: (?untyped foo, ?untyped bar) -> instance + # | (?foo: untyped, ?bar: untyped) -> instance + # + # source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#115 + def build_s_new; end + + # source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#102 + def build_super_class; end + + class << self + # @return [Boolean] + # + # source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#90 + def generatable?(target); end + end +end + +# source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#100 +RBS::Prototype::Runtime::StructGenerator::CAN_CALL_KEYWORD_INIT_P = T.let(T.unsafe(nil), TrueClass) + +# source://rbs//lib/rbs/prototype/runtime.rb#10 +class RBS::Prototype::Runtime::Todo + # @return [Todo] a new instance of Todo + # + # source://rbs//lib/rbs/prototype/runtime.rb#11 + def initialize(builder:); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/prototype/runtime.rb#42 + def skip_constant?(module_name:, name:); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/prototype/runtime.rb#33 + def skip_instance_method?(module_name:, method:, accessibility:); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/prototype/runtime.rb#15 + def skip_mixin?(type_name:, module_name:, mixin_class:); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/prototype/runtime.rb#24 + def skip_singleton_method?(module_name:, method:, accessibility:); end + + private + + # source://rbs//lib/rbs/prototype/runtime.rb#49 + def mixin_decls(type_name); end +end + +# source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#8 +class RBS::Prototype::Runtime::ValueObjectBase + include ::RBS::Prototype::Runtime::Helpers + + # @return [ValueObjectBase] a new instance of ValueObjectBase + # + # source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#11 + def initialize(target_class); end + + # source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#15 + def build_decl; end + + private + + # attr_accessor foo: untyped + # + # source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#74 + def build_member_accessors(ast_members_class); end + + # def self.members: () -> [ :foo, :bar ] + # def members: () -> [ :foo, :bar ] + # + # source://rbs//lib/rbs/prototype/runtime/value_object_generator.rb#35 + def build_s_members; end +end + +# source://rbs//lib/rdoc_plugin/parser.rb#6 +module RBS::RDocPlugin; end + +# source://rbs//lib/rdoc_plugin/parser.rb#7 +class RBS::RDocPlugin::Parser + # @return [Parser] a new instance of Parser + # + # source://rbs//lib/rdoc_plugin/parser.rb#11 + def initialize(top_level, content); end + + # Returns the value of attribute content. + # + # source://rbs//lib/rdoc_plugin/parser.rb#9 + def content; end + + # Sets the attribute content + # + # @param value the value to set the attribute content to. + # + # source://rbs//lib/rdoc_plugin/parser.rb#9 + def content=(_arg0); end + + # source://rbs//lib/rdoc_plugin/parser.rb#94 + def parse_attr_decl(decl:, context:, outer_name: T.unsafe(nil)); end + + # source://rbs//lib/rdoc_plugin/parser.rb#53 + def parse_class_decl(decl:, context:, outer_name: T.unsafe(nil)); end + + # source://rbs//lib/rdoc_plugin/parser.rb#67 + def parse_constant_decl(decl:, context:, outer_name: T.unsafe(nil)); end + + # source://rbs//lib/rdoc_plugin/parser.rb#125 + def parse_extend_decl(decl:, context:, outer_name: T.unsafe(nil)); end + + # source://rbs//lib/rdoc_plugin/parser.rb#109 + def parse_include_decl(decl:, context:, outer_name: T.unsafe(nil)); end + + # source://rbs//lib/rdoc_plugin/parser.rb#24 + def parse_member(decl:, context:, outer_name: T.unsafe(nil)); end + + # source://rbs//lib/rdoc_plugin/parser.rb#88 + def parse_method_alias_decl(decl:, context:, outer_name: T.unsafe(nil)); end + + # source://rbs//lib/rdoc_plugin/parser.rb#73 + def parse_method_decl(decl:, context:, outer_name: T.unsafe(nil)); end + + # source://rbs//lib/rdoc_plugin/parser.rb#60 + def parse_module_decl(decl:, context:, outer_name: T.unsafe(nil)); end + + # source://rbs//lib/rdoc_plugin/parser.rb#16 + def scan; end + + # Returns the value of attribute top_level. + # + # source://rbs//lib/rdoc_plugin/parser.rb#9 + def top_level; end + + # Sets the attribute top_level + # + # @param value the value to set the attribute top_level to. + # + # source://rbs//lib/rdoc_plugin/parser.rb#9 + def top_level=(_arg0); end + + private + + # source://rbs//lib/rdoc_plugin/parser.rb#149 + def comment_string(with_comment); end + + # source://rbs//lib/rdoc_plugin/parser.rb#143 + def construct_comment(context:, comment:); end + + # source://rbs//lib/rdoc_plugin/parser.rb#154 + def fully_qualified_name(outer_name:, decl:); end +end + +# source://rbs//lib/rbs/errors.rb#415 +class RBS::RecursiveAliasDefinitionError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # @return [RecursiveAliasDefinitionError] a new instance of RecursiveAliasDefinitionError + # + # source://rbs//lib/rbs/errors.rb#421 + def initialize(type:, defs:); end + + # Returns the value of attribute defs. + # + # source://rbs//lib/rbs/errors.rb#419 + def defs; end + + # source://rbs//lib/rbs/errors.rb#428 + def location; end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/errors.rb#418 + def type; end +end + +# source://rbs//lib/rbs/errors.rb#102 +class RBS::RecursiveAncestorError < ::RBS::DefinitionError + # @return [RecursiveAncestorError] a new instance of RecursiveAncestorError + # + # source://rbs//lib/rbs/errors.rb#106 + def initialize(ancestors:, location:); end + + # Returns the value of attribute ancestors. + # + # source://rbs//lib/rbs/errors.rb#103 + def ancestors; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/errors.rb#104 + def location; end + + class << self + # source://rbs//lib/rbs/errors.rb#126 + def check!(self_ancestor, ancestors:, location:); end + end +end + +# source://rbs//lib/rbs/errors.rb#474 +class RBS::RecursiveTypeAliasError < ::RBS::BaseError + include ::RBS::DetailedMessageable + + # @return [RecursiveTypeAliasError] a new instance of RecursiveTypeAliasError + # + # source://rbs//lib/rbs/errors.rb#480 + def initialize(alias_names:, location:); end + + # Returns the value of attribute alias_names. + # + # source://rbs//lib/rbs/errors.rb#477 + def alias_names; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/errors.rb#478 + def location; end + + # source://rbs//lib/rbs/errors.rb#487 + def name; end +end + +# source://rbs//lib/rbs/repository.rb#4 +class RBS::Repository + # @return [Repository] a new instance of Repository + # + # source://rbs//lib/rbs/repository.rb#74 + def initialize(no_stdlib: T.unsafe(nil)); end + + # source://rbs//lib/rbs/repository.rb#98 + def add(dir); end + + # Returns the value of attribute dirs. + # + # source://rbs//lib/rbs/repository.rb#71 + def dirs; end + + # Returns the value of attribute gems. + # + # source://rbs//lib/rbs/repository.rb#72 + def gems; end + + # source://rbs//lib/rbs/repository.rb#108 + def lookup(gem, version); end + + # source://rbs//lib/rbs/repository.rb#113 + def lookup_path(gem, version); end + + class << self + # source://rbs//lib/rbs/repository.rb#83 + def default; end + + # source://rbs//lib/rbs/repository.rb#87 + def find_best_version(version, candidates); end + end +end + +# source://rbs//lib/rbs/repository.rb#5 +RBS::Repository::DEFAULT_STDLIB_ROOT = T.let(T.unsafe(nil), Pathname) + +# source://rbs//lib/rbs/repository.rb#7 +class RBS::Repository::GemRBS + # @return [GemRBS] a new instance of GemRBS + # + # source://rbs//lib/rbs/repository.rb#11 + def initialize(name:); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/repository.rb#64 + def empty?; end + + # source://rbs//lib/rbs/repository.rb#59 + def find_best_version(version); end + + # source://rbs//lib/rbs/repository.rb#54 + def latest_version; end + + # source://rbs//lib/rbs/repository.rb#22 + def load!; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/repository.rb#8 + def name; end + + # source://rbs//lib/rbs/repository.rb#49 + def oldest_version; end + + # Returns the value of attribute paths. + # + # source://rbs//lib/rbs/repository.rb#9 + def paths; end + + # source://rbs//lib/rbs/repository.rb#45 + def version_names; end + + # source://rbs//lib/rbs/repository.rb#17 + def versions; end +end + +# source://rbs//lib/rbs/repository.rb#69 +class RBS::Repository::VersionPath < ::Struct + def gem; end + def gem=(_); end + def path; end + def path=(_); end + def version; end + def version=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rbs//lib/rbs/resolver/constant_resolver.rb#4 +module RBS::Resolver; end + +# source://rbs//lib/rbs/resolver/constant_resolver.rb#5 +class RBS::Resolver::ConstantResolver + # @return [ConstantResolver] a new instance of ConstantResolver + # + # source://rbs//lib/rbs/resolver/constant_resolver.rb#88 + def initialize(builder:); end + + # Returns the value of attribute builder. + # + # source://rbs//lib/rbs/resolver/constant_resolver.rb#85 + def builder; end + + # Returns the value of attribute child_constants_cache. + # + # source://rbs//lib/rbs/resolver/constant_resolver.rb#86 + def child_constants_cache; end + + # source://rbs//lib/rbs/resolver/constant_resolver.rb#112 + def children(module_name); end + + # source://rbs//lib/rbs/resolver/constant_resolver.rb#100 + def constants(context); end + + # source://rbs//lib/rbs/resolver/constant_resolver.rb#178 + def constants_from_ancestors(module_name, constants:); end + + # source://rbs//lib/rbs/resolver/constant_resolver.rb#163 + def constants_from_context(context, constants:); end + + # source://rbs//lib/rbs/resolver/constant_resolver.rb#201 + def constants_itself(context, constants:); end + + # Returns the value of attribute context_constants_cache. + # + # source://rbs//lib/rbs/resolver/constant_resolver.rb#86 + def context_constants_cache; end + + # source://rbs//lib/rbs/resolver/constant_resolver.rb#138 + def load_child_constants(name); end + + # source://rbs//lib/rbs/resolver/constant_resolver.rb#122 + def load_context_constants(context); end + + # source://rbs//lib/rbs/resolver/constant_resolver.rb#95 + def resolve(name, context:); end + + # source://rbs//lib/rbs/resolver/constant_resolver.rb#108 + def resolve_child(module_name, name); end + + # Returns the value of attribute table. + # + # source://rbs//lib/rbs/resolver/constant_resolver.rb#85 + def table; end +end + +# source://rbs//lib/rbs/resolver/constant_resolver.rb#6 +class RBS::Resolver::ConstantResolver::Table + # @return [Table] a new instance of Table + # + # source://rbs//lib/rbs/resolver/constant_resolver.rb#10 + def initialize(environment); end + + # source://rbs//lib/rbs/resolver/constant_resolver.rb#63 + def children(name); end + + # Returns the value of attribute children_table. + # + # source://rbs//lib/rbs/resolver/constant_resolver.rb#7 + def children_table; end + + # source://rbs//lib/rbs/resolver/constant_resolver.rb#67 + def constant(name); end + + # source://rbs//lib/rbs/resolver/constant_resolver.rb#80 + def constant_of_constant(name, entry); end + + # source://rbs//lib/rbs/resolver/constant_resolver.rb#71 + def constant_of_module(name, entry); end + + # Returns the value of attribute constants_table. + # + # source://rbs//lib/rbs/resolver/constant_resolver.rb#8 + def constants_table; end + + # Returns the value of attribute toplevel. + # + # source://rbs//lib/rbs/resolver/constant_resolver.rb#7 + def toplevel; end +end + +# source://rbs//lib/rbs/resolver/type_name_resolver.rb#5 +class RBS::Resolver::TypeNameResolver + # @return [TypeNameResolver] a new instance of TypeNameResolver + # + # source://rbs//lib/rbs/resolver/type_name_resolver.rb#10 + def initialize(env); end + + # Returns the value of attribute all_names. + # + # source://rbs//lib/rbs/resolver/type_name_resolver.rb#6 + def all_names; end + + # Returns the value of attribute cache. + # + # source://rbs//lib/rbs/resolver/type_name_resolver.rb#7 + def cache; end + + # Returns the value of attribute env. + # + # source://rbs//lib/rbs/resolver/type_name_resolver.rb#8 + def env; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/resolver/type_name_resolver.rb#84 + def has_name?(full_name); end + + # source://rbs//lib/rbs/resolver/type_name_resolver.rb#51 + def partition(type_name); end + + # source://rbs//lib/rbs/resolver/type_name_resolver.rb#28 + def resolve(type_name, context:); end + + # source://rbs//lib/rbs/resolver/type_name_resolver.rb#69 + def resolve_in(head, context); end + + # source://rbs//lib/rbs/resolver/type_name_resolver.rb#21 + def try_cache(query); end +end + +# source://rbs//lib/rbs/substitution.rb#4 +class RBS::Substitution + # @return [Substitution] a new instance of Substitution + # + # source://rbs//lib/rbs/substitution.rb#12 + def initialize; end + + # source://rbs//lib/rbs/substitution.rb#66 + def +(other); end + + # source://rbs//lib/rbs/substitution.rb#37 + def [](ty); end + + # source://rbs//lib/rbs/substitution.rb#16 + def add(from:, to:); end + + # source://rbs//lib/rbs/substitution.rb#37 + def apply(ty); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/substitution.rb#8 + def empty?; end + + # Returns the value of attribute instance_type. + # + # source://rbs//lib/rbs/substitution.rb#6 + def instance_type; end + + # Sets the attribute instance_type + # + # @param value the value to set the attribute instance_type to. + # + # source://rbs//lib/rbs/substitution.rb#6 + def instance_type=(_arg0); end + + # Returns the value of attribute mapping. + # + # source://rbs//lib/rbs/substitution.rb#5 + def mapping; end + + # source://rbs//lib/rbs/substitution.rb#55 + def without(*vars); end + + class << self + # source://rbs//lib/rbs/substitution.rb#20 + def build(variables, types, instance_type: T.unsafe(nil), &block); end + end +end + +# source://rbs//lib/rbs/subtractor.rb#4 +class RBS::Subtractor + # @return [Subtractor] a new instance of Subtractor + # + # source://rbs//lib/rbs/subtractor.rb#5 + def initialize(minuend, subtrahend); end + + # source://rbs//lib/rbs/subtractor.rb#10 + def call(minuend = T.unsafe(nil), context: T.unsafe(nil)); end + + private + + # source://rbs//lib/rbs/subtractor.rb#177 + def absolute_typename(name, context:); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/subtractor.rb#160 + def access_modifier?(decl); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/subtractor.rb#118 + def cvar_exist?(owner, name); end + + # source://rbs//lib/rbs/subtractor.rb#127 + def each_member(owner, &block); end + + # source://rbs//lib/rbs/subtractor.rb#48 + def filter_members(decl, context:); end + + # source://rbs//lib/rbs/subtractor.rb#148 + def filter_redundunt_access_modifiers(decls); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/subtractor.rb#106 + def ivar_exist?(owner, name, kind); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/subtractor.rb#60 + def member_exist?(owner, member, context:); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/subtractor.rb#89 + def method_exist?(owner, method_name, kind); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/subtractor.rb#137 + def mixin_exist?(owner, mixin, context:); end + + # source://rbs//lib/rbs/subtractor.rb#186 + def typename_candidates(name, context:); end + + # source://rbs//lib/rbs/subtractor.rb#164 + def update_decl(decl, members:); end +end + +# source://rbs//lib/rbs/errors.rb#335 +class RBS::SuperclassMismatchError < ::RBS::DefinitionError + # @return [SuperclassMismatchError] a new instance of SuperclassMismatchError + # + # source://rbs//lib/rbs/errors.rb#339 + def initialize(name:, entry:); end + + # Returns the value of attribute entry. + # + # source://rbs//lib/rbs/errors.rb#337 + def entry; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/errors.rb#336 + def name; end +end + +# source://rbs//lib/rbs/type_alias_dependency.rb#4 +class RBS::TypeAliasDependency + # @return [TypeAliasDependency] a new instance of TypeAliasDependency + # + # source://rbs//lib/rbs/type_alias_dependency.rb#14 + def initialize(env:); end + + # source://rbs//lib/rbs/type_alias_dependency.rb#27 + def build_dependencies; end + + # Check if an alias type definition is circular & prohibited + # + # @return [Boolean] + # + # source://rbs//lib/rbs/type_alias_dependency.rb#19 + def circular_definition?(alias_name); end + + # A hash which stores the transitive closure + # of the directed graph + # + # source://rbs//lib/rbs/type_alias_dependency.rb#12 + def dependencies; end + + # source://rbs//lib/rbs/type_alias_dependency.rb#57 + def dependencies_of(name); end + + # Direct dependencies corresponds to a directed graph + # with vertices as types and directions based on assignment of types + # + # source://rbs//lib/rbs/type_alias_dependency.rb#9 + def direct_dependencies; end + + # source://rbs//lib/rbs/type_alias_dependency.rb#52 + def direct_dependencies_of(name); end + + # Returns the value of attribute env. + # + # source://rbs//lib/rbs/type_alias_dependency.rb#5 + def env; end + + # source://rbs//lib/rbs/type_alias_dependency.rb#43 + def transitive_closure; end + + private + + # Recursive function to construct transitive closure + # + # source://rbs//lib/rbs/type_alias_dependency.rb#81 + def dependency(start, vertex, nested = T.unsafe(nil)); end + + # Constructs directed graph recursively + # + # source://rbs//lib/rbs/type_alias_dependency.rb#65 + def direct_dependency(type, result = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/type_alias_regularity.rb#4 +class RBS::TypeAliasRegularity + # @return [TypeAliasRegularity] a new instance of TypeAliasRegularity + # + # source://rbs//lib/rbs/type_alias_regularity.rb#16 + def initialize(env:); end + + # source://rbs//lib/rbs/type_alias_regularity.rb#61 + def build_alias_type(name); end + + # Returns the value of attribute builder. + # + # source://rbs//lib/rbs/type_alias_regularity.rb#14 + def builder; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/type_alias_regularity.rb#69 + def compatible_args?(args1, args2); end + + # Returns the value of attribute diagnostics. + # + # source://rbs//lib/rbs/type_alias_regularity.rb#14 + def diagnostics; end + + # source://rbs//lib/rbs/type_alias_regularity.rb#110 + def each_alias_type(type, &block); end + + # source://rbs//lib/rbs/type_alias_regularity.rb#83 + def each_mutual_alias_defs(&block); end + + # Returns the value of attribute env. + # + # source://rbs//lib/rbs/type_alias_regularity.rb#14 + def env; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/type_alias_regularity.rb#79 + def nonregular?(type_name); end + + # source://rbs//lib/rbs/type_alias_regularity.rb#22 + def validate; end + + # source://rbs//lib/rbs/type_alias_regularity.rb#39 + def validate_alias_type(alias_type, names, types); end + + class << self + # source://rbs//lib/rbs/type_alias_regularity.rb#120 + def validate(env:); end + end +end + +# source://rbs//lib/rbs/type_alias_regularity.rb#5 +class RBS::TypeAliasRegularity::Diagnostic + # @return [Diagnostic] a new instance of Diagnostic + # + # source://rbs//lib/rbs/type_alias_regularity.rb#8 + def initialize(type_name:, nonregular_type:); end + + # Returns the value of attribute nonregular_type. + # + # source://rbs//lib/rbs/type_alias_regularity.rb#6 + def nonregular_type; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/type_alias_regularity.rb#6 + def type_name; end +end + +# source://rbs//lib/rbs/type_name.rb#4 +class RBS::TypeName + # @return [TypeName] a new instance of TypeName + # + # source://rbs//lib/rbs/type_name.rb#9 + def initialize(namespace:, name:); end + + # source://rbs//lib/rbs/type_name.rb#79 + def +(other); end + + # source://rbs//lib/rbs/type_name.rb#25 + def ==(other); end + + # source://rbs//lib/rbs/type_name.rb#55 + def absolute!; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/type_name.rb#59 + def absolute?; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/type_name.rb#51 + def alias?; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/type_name.rb#47 + def class?; end + + # source://rbs//lib/rbs/type_name.rb#25 + def eql?(other); end + + # source://rbs//lib/rbs/type_name.rb#31 + def hash; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/type_name.rb#67 + def interface?; end + + # Returns the value of attribute kind. + # + # source://rbs//lib/rbs/type_name.rb#7 + def kind; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/type_name.rb#6 + def name; end + + # Returns the value of attribute namespace. + # + # source://rbs//lib/rbs/type_name.rb#5 + def namespace; end + + # source://rbs//lib/rbs/type_name.rb#63 + def relative!; end + + # source://rbs//lib/rbs/type_name.rb#75 + def split; end + + # source://rbs//lib/rbs/type_name.rb#39 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/type_name.rb#43 + def to_namespace; end + + # source://rbs//lib/rbs/type_name.rb#35 + def to_s; end + + # source://rbs//lib/rbs/type_name.rb#71 + def with_prefix(namespace); end +end + +# source://rbs//lib/rbs/types.rb#4 +module RBS::Types; end + +# source://rbs//lib/rbs/types.rb#394 +class RBS::Types::Alias + include ::RBS::Types::Application + + # @return [Alias] a new instance of Alias + # + # source://rbs//lib/rbs/types.rb#399 + def initialize(name:, args:, location:); end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/types.rb#395 + def location; end + + # source://rbs//lib/rbs/types.rb#421 + def map_type(&block); end + + # source://rbs//lib/rbs/types.rb#413 + def map_type_name(&block); end + + # source://rbs//lib/rbs/types.rb#409 + def sub(s); end + + # source://rbs//lib/rbs/types.rb#405 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/types.rb#252 +module RBS::Types::Application + # source://rbs//lib/rbs/types.rb#256 + def ==(other); end + + # Returns the value of attribute args. + # + # source://rbs//lib/rbs/types.rb#254 + def args; end + + # source://rbs//lib/rbs/types.rb#282 + def each_type(&block); end + + # source://rbs//lib/rbs/types.rb#256 + def eql?(other); end + + # source://rbs//lib/rbs/types.rb#266 + def free_variables(set = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#294 + def has_classish_type?; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#290 + def has_self_type?; end + + # source://rbs//lib/rbs/types.rb#262 + def hash; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/types.rb#253 + def name; end + + # source://rbs//lib/rbs/types.rb#274 + def to_s(level = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#298 + def with_nonreturn_void?; end +end + +# source://rbs//lib/rbs/types.rb#41 +module RBS::Types::Bases; end + +# source://rbs//lib/rbs/types.rb#109 +class RBS::Types::Bases::Any < ::RBS::Types::Bases::Base + # source://rbs//lib/rbs/types.rb#110 + def to_s(level = T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#114 + def todo!; end +end + +# source://rbs//lib/rbs/types.rb#42 +class RBS::Types::Bases::Base + include ::RBS::Types::NoFreeVariables + include ::RBS::Types::NoSubst + include ::RBS::Types::EmptyEachType + include ::RBS::Types::NoTypeName + + # @return [Base] a new instance of Base + # + # source://rbs//lib/rbs/types.rb#45 + def initialize(location:); end + + # source://rbs//lib/rbs/types.rb#49 + def ==(other); end + + # source://rbs//lib/rbs/types.rb#49 + def eql?(other); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#98 + def has_classish_type?; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#94 + def has_self_type?; end + + # source://rbs//lib/rbs/types.rb#53 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/types.rb#43 + def location; end + + # source://rbs//lib/rbs/types.rb#64 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#69 + def to_s(level = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#102 + def with_nonreturn_void?; end +end + +# source://rbs//lib/rbs/types.rb#107 +class RBS::Types::Bases::Bool < ::RBS::Types::Bases::Base; end + +# source://rbs//lib/rbs/types.rb#121 +class RBS::Types::Bases::Bottom < ::RBS::Types::Bases::Base; end + +# source://rbs//lib/rbs/types.rb#128 +class RBS::Types::Bases::Class < ::RBS::Types::Bases::Base; end + +# source://rbs//lib/rbs/types.rb#123 +class RBS::Types::Bases::Instance < ::RBS::Types::Bases::Base + # source://rbs//lib/rbs/types.rb#124 + def sub(s); end +end + +# source://rbs//lib/rbs/types.rb#119 +class RBS::Types::Bases::Nil < ::RBS::Types::Bases::Base; end + +# source://rbs//lib/rbs/types.rb#122 +class RBS::Types::Bases::Self < ::RBS::Types::Bases::Base; end + +# source://rbs//lib/rbs/types.rb#120 +class RBS::Types::Bases::Top < ::RBS::Types::Bases::Base; end + +# source://rbs//lib/rbs/types.rb#108 +class RBS::Types::Bases::Void < ::RBS::Types::Bases::Base; end + +# source://rbs//lib/rbs/types.rb#1184 +class RBS::Types::Block + # @return [Block] a new instance of Block + # + # source://rbs//lib/rbs/types.rb#1189 + def initialize(type:, required:, self_type: T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#1195 + def ==(other); end + + # source://rbs//lib/rbs/types.rb#1218 + def map_type(&block); end + + # Returns the value of attribute required. + # + # source://rbs//lib/rbs/types.rb#1186 + def required; end + + # Returns the value of attribute self_type. + # + # source://rbs//lib/rbs/types.rb#1187 + def self_type; end + + # source://rbs//lib/rbs/types.rb#1210 + def sub(s); end + + # source://rbs//lib/rbs/types.rb#1202 + def to_json(state = T.unsafe(nil)); end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/types.rb#1185 + def type; end +end + +# source://rbs//lib/rbs/types.rb#352 +class RBS::Types::ClassInstance + include ::RBS::Types::Application + + # @return [ClassInstance] a new instance of ClassInstance + # + # source://rbs//lib/rbs/types.rb#357 + def initialize(name:, args:, location:); end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/types.rb#353 + def location; end + + # source://rbs//lib/rbs/types.rb#381 + def map_type(&block); end + + # source://rbs//lib/rbs/types.rb#373 + def map_type_name(&block); end + + # source://rbs//lib/rbs/types.rb#367 + def sub(s); end + + # source://rbs//lib/rbs/types.rb#363 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/types.rb#200 +class RBS::Types::ClassSingleton + include ::RBS::Types::NoFreeVariables + include ::RBS::Types::NoSubst + include ::RBS::Types::EmptyEachType + + # @return [ClassSingleton] a new instance of ClassSingleton + # + # source://rbs//lib/rbs/types.rb#204 + def initialize(name:, location:); end + + # source://rbs//lib/rbs/types.rb#209 + def ==(other); end + + # source://rbs//lib/rbs/types.rb#209 + def eql?(other); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#243 + def has_classish_type?; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#239 + def has_self_type?; end + + # source://rbs//lib/rbs/types.rb#215 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/types.rb#202 + def location; end + + # source://rbs//lib/rbs/types.rb#232 + def map_type_name; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/types.rb#201 + def name; end + + # source://rbs//lib/rbs/types.rb#222 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#226 + def to_s(level = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#247 + def with_nonreturn_void?; end +end + +# source://rbs//lib/rbs/types.rb#23 +module RBS::Types::EmptyEachType + # source://rbs//lib/rbs/types.rb#24 + def each_type; end + + # source://rbs//lib/rbs/types.rb#32 + def map_type(&block); end +end + +# source://rbs//lib/rbs/types.rb#850 +class RBS::Types::Function + # @return [Function] a new instance of Function + # + # source://rbs//lib/rbs/types.rb#906 + def initialize(required_positionals:, optional_positionals:, rest_positionals:, trailing_positionals:, required_keywords:, optional_keywords:, rest_keywords:, return_type:); end + + # source://rbs//lib/rbs/types.rb#917 + def ==(other); end + + # source://rbs//lib/rbs/types.rb#988 + def amap(array, &block); end + + # source://rbs//lib/rbs/types.rb#1125 + def drop_head; end + + # source://rbs//lib/rbs/types.rb#1142 + def drop_tail; end + + # source://rbs//lib/rbs/types.rb#1025 + def each_param(&block); end + + # source://rbs//lib/rbs/types.rb#1010 + def each_type; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#1096 + def empty?; end + + # source://rbs//lib/rbs/types.rb#917 + def eql?(other); end + + # source://rbs//lib/rbs/types.rb#943 + def free_variables(set = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#1167 + def has_classish_type?; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#1155 + def has_keyword?; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#1163 + def has_self_type?; end + + # source://rbs//lib/rbs/types.rb#931 + def hash; end + + # source://rbs//lib/rbs/types.rb#996 + def hmapv(hash, &block); end + + # source://rbs//lib/rbs/types.rb#971 + def map_type(&block); end + + # source://rbs//lib/rbs/types.rb#1004 + def map_type_name(&block); end + + # Returns the value of attribute optional_keywords. + # + # source://rbs//lib/rbs/types.rb#902 + def optional_keywords; end + + # Returns the value of attribute optional_positionals. + # + # source://rbs//lib/rbs/types.rb#898 + def optional_positionals; end + + # source://rbs//lib/rbs/types.rb#1106 + def param_to_s; end + + # Returns the value of attribute required_keywords. + # + # source://rbs//lib/rbs/types.rb#901 + def required_keywords; end + + # Returns the value of attribute required_positionals. + # + # source://rbs//lib/rbs/types.rb#897 + def required_positionals; end + + # Returns the value of attribute rest_keywords. + # + # source://rbs//lib/rbs/types.rb#903 + def rest_keywords; end + + # Returns the value of attribute rest_positionals. + # + # source://rbs//lib/rbs/types.rb#899 + def rest_positionals; end + + # source://rbs//lib/rbs/types.rb#1121 + def return_to_s; end + + # Returns the value of attribute return_type. + # + # source://rbs//lib/rbs/types.rb#904 + def return_type; end + + # source://rbs//lib/rbs/types.rb#1052 + def sub(s); end + + # source://rbs//lib/rbs/types.rb#1039 + def to_json(state = T.unsafe(nil)); end + + # Returns the value of attribute trailing_positionals. + # + # source://rbs//lib/rbs/types.rb#900 + def trailing_positionals; end + + # source://rbs//lib/rbs/types.rb#1082 + def update(required_positionals: T.unsafe(nil), optional_positionals: T.unsafe(nil), rest_positionals: T.unsafe(nil), trailing_positionals: T.unsafe(nil), required_keywords: T.unsafe(nil), optional_keywords: T.unsafe(nil), rest_keywords: T.unsafe(nil), return_type: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#1171 + def with_nonreturn_void?; end + + # source://rbs//lib/rbs/types.rb#1069 + def with_return_type(type); end + + class << self + # source://rbs//lib/rbs/types.rb#1056 + def empty(return_type); end + end +end + +# source://rbs//lib/rbs/types.rb#851 +class RBS::Types::Function::Param + # @return [Param] a new instance of Param + # + # source://rbs//lib/rbs/types.rb#856 + def initialize(type:, name:, location: T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#862 + def ==(other); end + + # source://rbs//lib/rbs/types.rb#862 + def eql?(other); end + + # source://rbs//lib/rbs/types.rb#868 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/types.rb#854 + def location; end + + # source://rbs//lib/rbs/types.rb#872 + def map_type(&block); end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/types.rb#853 + def name; end + + # source://rbs//lib/rbs/types.rb#880 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#884 + def to_s; end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/types.rb#852 + def type; end +end + +# source://rbs//lib/rbs/types.rb#310 +class RBS::Types::Interface + include ::RBS::Types::Application + + # @return [Interface] a new instance of Interface + # + # source://rbs//lib/rbs/types.rb#315 + def initialize(name:, args:, location:); end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/types.rb#311 + def location; end + + # source://rbs//lib/rbs/types.rb#339 + def map_type(&block); end + + # source://rbs//lib/rbs/types.rb#331 + def map_type_name(&block); end + + # source://rbs//lib/rbs/types.rb#325 + def sub(s); end + + # source://rbs//lib/rbs/types.rb#321 + def to_json(state = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/types.rb#769 +class RBS::Types::Intersection + # @return [Intersection] a new instance of Intersection + # + # source://rbs//lib/rbs/types.rb#773 + def initialize(types:, location:); end + + # source://rbs//lib/rbs/types.rb#778 + def ==(other); end + + # source://rbs//lib/rbs/types.rb#814 + def each_type(&block); end + + # source://rbs//lib/rbs/types.rb#778 + def eql?(other); end + + # source://rbs//lib/rbs/types.rb#788 + def free_variables(set = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#841 + def has_classish_type?; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#837 + def has_self_type?; end + + # source://rbs//lib/rbs/types.rb#784 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/types.rb#771 + def location; end + + # source://rbs//lib/rbs/types.rb#822 + def map_type(&block); end + + # source://rbs//lib/rbs/types.rb#830 + def map_type_name(&block); end + + # source://rbs//lib/rbs/types.rb#800 + def sub(s); end + + # source://rbs//lib/rbs/types.rb#796 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#805 + def to_s(level = T.unsafe(nil)); end + + # Returns the value of attribute types. + # + # source://rbs//lib/rbs/types.rb#770 + def types; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#845 + def with_nonreturn_void?; end +end + +# source://rbs//lib/rbs/types.rb#1359 +class RBS::Types::Literal + include ::RBS::Types::NoFreeVariables + include ::RBS::Types::NoSubst + include ::RBS::Types::EmptyEachType + include ::RBS::Types::NoTypeName + + # @return [Literal] a new instance of Literal + # + # source://rbs//lib/rbs/types.rb#1363 + def initialize(literal:, location:); end + + # source://rbs//lib/rbs/types.rb#1368 + def ==(other); end + + # source://rbs//lib/rbs/types.rb#1368 + def eql?(other); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#1395 + def has_classish_type?; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#1391 + def has_self_type?; end + + # source://rbs//lib/rbs/types.rb#1374 + def hash; end + + # Returns the value of attribute literal. + # + # source://rbs//lib/rbs/types.rb#1360 + def literal; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/types.rb#1361 + def location; end + + # source://rbs//lib/rbs/types.rb#1383 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#1387 + def to_s(level = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#1399 + def with_nonreturn_void?; end + + class << self + # source://rbs//lib/rbs/types.rb#1419 + def unescape_string(string, is_double_quote); end + end +end + +# source://rbs//lib/rbs/types.rb#1403 +RBS::Types::Literal::TABLE = T.let(T.unsafe(nil), Hash) + +# source://rbs//lib/rbs/types.rb#5 +module RBS::Types::NoFreeVariables + # source://rbs//lib/rbs/types.rb#6 + def free_variables(set = T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/types.rb#11 +module RBS::Types::NoSubst + # source://rbs//lib/rbs/types.rb#12 + def sub(s); end +end + +# source://rbs//lib/rbs/types.rb#17 +module RBS::Types::NoTypeName + # source://rbs//lib/rbs/types.rb#18 + def map_type_name; end +end + +# source://rbs//lib/rbs/types.rb#605 +class RBS::Types::Optional + # @return [Optional] a new instance of Optional + # + # source://rbs//lib/rbs/types.rb#609 + def initialize(type:, location:); end + + # source://rbs//lib/rbs/types.rb#614 + def ==(other); end + + # source://rbs//lib/rbs/types.rb#650 + def each_type; end + + # source://rbs//lib/rbs/types.rb#614 + def eql?(other); end + + # source://rbs//lib/rbs/types.rb#624 + def free_variables(set = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#680 + def has_classish_type?; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#676 + def has_self_type?; end + + # source://rbs//lib/rbs/types.rb#620 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/types.rb#607 + def location; end + + # source://rbs//lib/rbs/types.rb#665 + def map_type(&block); end + + # source://rbs//lib/rbs/types.rb#658 + def map_type_name(&block); end + + # source://rbs//lib/rbs/types.rb#632 + def sub(s); end + + # source://rbs//lib/rbs/types.rb#628 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#636 + def to_s(level = T.unsafe(nil)); end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/types.rb#606 + def type; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#684 + def with_nonreturn_void?; end +end + +# source://rbs//lib/rbs/types.rb#1239 +class RBS::Types::Proc + # @return [Proc] a new instance of Proc + # + # source://rbs//lib/rbs/types.rb#1245 + def initialize(location:, type:, block:, self_type: T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#1252 + def ==(other); end + + # Returns the value of attribute block. + # + # source://rbs//lib/rbs/types.rb#1241 + def block; end + + # source://rbs//lib/rbs/types.rb#1304 + def each_type(&block); end + + # source://rbs//lib/rbs/types.rb#1252 + def eql?(other); end + + # source://rbs//lib/rbs/types.rb#1262 + def free_variables(set = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#1342 + def has_classish_type?; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#1338 + def has_self_type?; end + + # source://rbs//lib/rbs/types.rb#1258 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/types.rb#1243 + def location; end + + # source://rbs//lib/rbs/types.rb#1325 + def map_type(&block); end + + # source://rbs//lib/rbs/types.rb#1316 + def map_type_name(&block); end + + # Returns the value of attribute self_type. + # + # source://rbs//lib/rbs/types.rb#1242 + def self_type; end + + # source://rbs//lib/rbs/types.rb#1279 + def sub(s); end + + # source://rbs//lib/rbs/types.rb#1269 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#1288 + def to_s(level = T.unsafe(nil)); end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/types.rb#1240 + def type; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#1346 + def with_nonreturn_void?; end +end + +# source://rbs//lib/rbs/types.rb#517 +class RBS::Types::Record + # @return [Record] a new instance of Record + # + # source://rbs//lib/rbs/types.rb#521 + def initialize(fields:, location:); end + + # source://rbs//lib/rbs/types.rb#526 + def ==(other); end + + # source://rbs//lib/rbs/types.rb#566 + def each_type(&block); end + + # source://rbs//lib/rbs/types.rb#526 + def eql?(other); end + + # Returns the value of attribute fields. + # + # source://rbs//lib/rbs/types.rb#518 + def fields; end + + # source://rbs//lib/rbs/types.rb#536 + def free_variables(set = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#596 + def has_classish_type?; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#592 + def has_self_type?; end + + # source://rbs//lib/rbs/types.rb#532 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/types.rb#519 + def location; end + + # source://rbs//lib/rbs/types.rb#581 + def map_type(&block); end + + # source://rbs//lib/rbs/types.rb#574 + def map_type_name(&block); end + + # source://rbs//lib/rbs/types.rb#548 + def sub(s); end + + # source://rbs//lib/rbs/types.rb#544 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#553 + def to_s(level = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#600 + def with_nonreturn_void?; end +end + +# source://rbs//lib/rbs/types.rb#1227 +module RBS::Types::SelfTypeBindingHelper + private + + # source://rbs//lib/rbs/types.rb#1230 + def self_type_binding_to_s(t); end + + class << self + # source://rbs//lib/rbs/types.rb#1230 + def self_type_binding_to_s(t); end + end +end + +# source://rbs//lib/rbs/types.rb#434 +class RBS::Types::Tuple + # @return [Tuple] a new instance of Tuple + # + # source://rbs//lib/rbs/types.rb#438 + def initialize(types:, location:); end + + # source://rbs//lib/rbs/types.rb#443 + def ==(other); end + + # source://rbs//lib/rbs/types.rb#478 + def each_type(&block); end + + # source://rbs//lib/rbs/types.rb#443 + def eql?(other); end + + # source://rbs//lib/rbs/types.rb#453 + def free_variables(set = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#508 + def has_classish_type?; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#504 + def has_self_type?; end + + # source://rbs//lib/rbs/types.rb#449 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/types.rb#436 + def location; end + + # source://rbs//lib/rbs/types.rb#493 + def map_type(&block); end + + # source://rbs//lib/rbs/types.rb#486 + def map_type_name(&block); end + + # source://rbs//lib/rbs/types.rb#465 + def sub(s); end + + # source://rbs//lib/rbs/types.rb#461 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#470 + def to_s(level = T.unsafe(nil)); end + + # Returns the value of attribute types. + # + # source://rbs//lib/rbs/types.rb#435 + def types; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#512 + def with_nonreturn_void?; end +end + +# source://rbs//lib/rbs/types.rb#689 +class RBS::Types::Union + # @return [Union] a new instance of Union + # + # source://rbs//lib/rbs/types.rb#693 + def initialize(types:, location:); end + + # source://rbs//lib/rbs/types.rb#698 + def ==(other); end + + # source://rbs//lib/rbs/types.rb#733 + def each_type(&block); end + + # source://rbs//lib/rbs/types.rb#698 + def eql?(other); end + + # source://rbs//lib/rbs/types.rb#708 + def free_variables(set = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#760 + def has_classish_type?; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#756 + def has_self_type?; end + + # source://rbs//lib/rbs/types.rb#704 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/types.rb#691 + def location; end + + # source://rbs//lib/rbs/types.rb#741 + def map_type(&block); end + + # source://rbs//lib/rbs/types.rb#749 + def map_type_name(&block); end + + # source://rbs//lib/rbs/types.rb#720 + def sub(s); end + + # source://rbs//lib/rbs/types.rb#716 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#725 + def to_s(level = T.unsafe(nil)); end + + # Returns the value of attribute types. + # + # source://rbs//lib/rbs/types.rb#690 + def types; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#764 + def with_nonreturn_void?; end +end + +# source://rbs//lib/rbs/types.rb#131 +class RBS::Types::Variable + include ::RBS::Types::NoTypeName + include ::RBS::Types::EmptyEachType + + # @return [Variable] a new instance of Variable + # + # source://rbs//lib/rbs/types.rb#137 + def initialize(name:, location:); end + + # source://rbs//lib/rbs/types.rb#142 + def ==(other); end + + # source://rbs//lib/rbs/types.rb#142 + def eql?(other); end + + # source://rbs//lib/rbs/types.rb#152 + def free_variables(set = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#191 + def has_classish_type?; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#187 + def has_self_type?; end + + # source://rbs//lib/rbs/types.rb#148 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/types.rb#133 + def location; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/types.rb#132 + def name; end + + # source://rbs//lib/rbs/types.rb#162 + def sub(s); end + + # source://rbs//lib/rbs/types.rb#158 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/types.rb#181 + def to_s(level = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/types.rb#195 + def with_nonreturn_void?; end + + class << self + # source://rbs//lib/rbs/types.rb#166 + def build(v); end + + # source://rbs//lib/rbs/types.rb#176 + def fresh(v = T.unsafe(nil)); end + end +end + +# source://rbs//lib/rbs/errors.rb#317 +class RBS::UnknownMethodAliasError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # @return [UnknownMethodAliasError] a new instance of UnknownMethodAliasError + # + # source://rbs//lib/rbs/errors.rb#325 + def initialize(type_name:, original_name:, aliased_name:, location:); end + + # Returns the value of attribute aliased_name. + # + # source://rbs//lib/rbs/errors.rb#322 + def aliased_name; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/errors.rb#323 + def location; end + + # Returns the value of attribute original_name. + # + # source://rbs//lib/rbs/errors.rb#321 + def original_name; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/errors.rb#320 + def type_name; end +end + +# source://rbs//lib/rbs/version.rb#4 +RBS::VERSION = T.let(T.unsafe(nil), String) + +# source://rbs//lib/rbs/validator.rb#4 +class RBS::Validator + # @return [Validator] a new instance of Validator + # + # source://rbs//lib/rbs/validator.rb#9 + def initialize(env:, resolver:); end + + # source://rbs//lib/rbs/validator.rb#15 + def absolute_type(type, context:, &block); end + + # Returns the value of attribute definition_builder. + # + # source://rbs//lib/rbs/validator.rb#7 + def definition_builder; end + + # Returns the value of attribute env. + # + # source://rbs//lib/rbs/validator.rb#5 + def env; end + + # Returns the value of attribute resolver. + # + # source://rbs//lib/rbs/validator.rb#6 + def resolver; end + + # source://rbs//lib/rbs/validator.rb#172 + def type_alias_dependency; end + + # source://rbs//lib/rbs/validator.rb#176 + def type_alias_regularity; end + + # source://rbs//lib/rbs/validator.rb#152 + def validate_class_alias(entry:); end + + # source://rbs//lib/rbs/validator.rb#102 + def validate_method_definition(method_def, type_name:); end + + # Validates presence of the relative type, and application arity match. + # + # source://rbs//lib/rbs/validator.rb#22 + def validate_type(type, context:); end + + # source://rbs//lib/rbs/validator.rb#61 + def validate_type_alias(entry:); end + + # source://rbs//lib/rbs/validator.rb#118 + def validate_type_params(params, type_name:, location:, method_name: T.unsafe(nil)); end +end + +# source://rbs//lib/rbs/variance_calculator.rb#4 +class RBS::VarianceCalculator + # @return [VarianceCalculator] a new instance of VarianceCalculator + # + # source://rbs//lib/rbs/variance_calculator.rb#78 + def initialize(builder:); end + + # Returns the value of attribute builder. + # + # source://rbs//lib/rbs/variance_calculator.rb#76 + def builder; end + + # source://rbs//lib/rbs/variance_calculator.rb#82 + def env; end + + # source://rbs//lib/rbs/variance_calculator.rb#169 + def function(type, result:, context:); end + + # source://rbs//lib/rbs/variance_calculator.rb#98 + def in_inherit(name:, args:, variables:); end + + # source://rbs//lib/rbs/variance_calculator.rb#86 + def in_method_type(method_type:, variables:); end + + # source://rbs//lib/rbs/variance_calculator.rb#110 + def in_type_alias(name:); end + + # source://rbs//lib/rbs/variance_calculator.rb#176 + def negate(variance); end + + # source://rbs//lib/rbs/variance_calculator.rb#121 + def type(type, result:, context:); end +end + +# source://rbs//lib/rbs/variance_calculator.rb#5 +class RBS::VarianceCalculator::Result + # @return [Result] a new instance of Result + # + # source://rbs//lib/rbs/variance_calculator.rb#8 + def initialize(variables:); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/variance_calculator.rb#45 + def compatible?(var, with_annotation:); end + + # source://rbs//lib/rbs/variance_calculator.rb#24 + def contravariant(x); end + + # source://rbs//lib/rbs/variance_calculator.rb#15 + def covariant(x); end + + # source://rbs//lib/rbs/variance_calculator.rb#37 + def each(&block); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/variance_calculator.rb#41 + def include?(name); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/variance_calculator.rb#60 + def incompatible?(params); end + + # source://rbs//lib/rbs/variance_calculator.rb#33 + def invariant(x); end + + # Returns the value of attribute result. + # + # source://rbs//lib/rbs/variance_calculator.rb#6 + def result; end +end + +# source://rbs//lib/rbs/vendorer.rb#4 +class RBS::Vendorer + # @return [Vendorer] a new instance of Vendorer + # + # source://rbs//lib/rbs/vendorer.rb#8 + def initialize(vendor_dir:, loader:); end + + # source://rbs//lib/rbs/vendorer.rb#21 + def clean!; end + + # source://rbs//lib/rbs/vendorer.rb#28 + def copy!; end + + # source://rbs//lib/rbs/vendorer.rb#13 + def ensure_dir; end + + # Returns the value of attribute loader. + # + # source://rbs//lib/rbs/vendorer.rb#6 + def loader; end + + # Returns the value of attribute vendor_dir. + # + # source://rbs//lib/rbs/vendorer.rb#5 + def vendor_dir; end +end + +# source://rbs//lib/rbs/errors.rb#561 +class RBS::WillSyntaxError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # @return [WillSyntaxError] a new instance of WillSyntaxError + # + # source://rbs//lib/rbs/errors.rb#566 + def initialize(message, location:); end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/errors.rb#564 + def location; end +end + +# source://rbs//lib/rbs/writer.rb#4 +class RBS::Writer + # @return [Writer] a new instance of Writer + # + # source://rbs//lib/rbs/writer.rb#8 + def initialize(out:); end + + # source://rbs//lib/rbs/writer.rb#361 + def attribute(kind, attr); end + + # source://rbs//lib/rbs/writer.rb#42 + def format_annotation(annotation); end + + # source://rbs//lib/rbs/writer.rb#23 + def indent(size = T.unsafe(nil)); end + + # Returns the value of attribute indentation. + # + # source://rbs//lib/rbs/writer.rb#6 + def indentation; end + + # source://rbs//lib/rbs/writer.rb#288 + def method_name(name); end + + # source://rbs//lib/rbs/writer.rb#214 + def name_and_args(name, args); end + + # source://rbs//lib/rbs/writer.rb#202 + def name_and_params(name, params); end + + # Returns the value of attribute out. + # + # source://rbs//lib/rbs/writer.rb#5 + def out; end + + # source://rbs//lib/rbs/writer.rb#30 + def prefix; end + + # source://rbs//lib/rbs/writer.rb#18 + def preserve!(preserve: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/writer.rb#14 + def preserve?; end + + # source://rbs//lib/rbs/writer.rb#391 + def preserve_empty_line(prev, decl); end + + # source://rbs//lib/rbs/writer.rb#224 + def put_lines(lines, leading_spaces:); end + + # source://rbs//lib/rbs/writer.rb#34 + def puts(string = T.unsafe(nil)); end + + # source://rbs//lib/rbs/writer.rb#79 + def write(contents); end + + # source://rbs//lib/rbs/writer.rb#60 + def write_annotation(annotations); end + + # source://rbs//lib/rbs/writer.rb#66 + def write_comment(comment); end + + # source://rbs//lib/rbs/writer.rb#114 + def write_decl(decl); end + + # source://rbs//lib/rbs/writer.rb#309 + def write_def(member); end + + # source://rbs//lib/rbs/writer.rb#97 + def write_directive(dir); end + + # source://rbs//lib/rbs/writer.rb#301 + def write_loc_source(located); end + + # source://rbs//lib/rbs/writer.rb#234 + def write_member(member); end +end + +# source://rbs//lib/rdoc/discover.rb#8 +class RDoc::Parser::RBS < ::RDoc::Parser + # source://rbs//lib/rdoc/discover.rb#10 + def scan; end +end diff --git a/sorbet/rbi/gems/regexp_parser@2.9.0.rbi b/sorbet/rbi/gems/regexp_parser@2.9.2.rbi similarity index 99% rename from sorbet/rbi/gems/regexp_parser@2.9.0.rbi rename to sorbet/rbi/gems/regexp_parser@2.9.2.rbi index 34ad4f2a7..5253fea7d 100644 --- a/sorbet/rbi/gems/regexp_parser@2.9.0.rbi +++ b/sorbet/rbi/gems/regexp_parser@2.9.2.rbi @@ -1132,7 +1132,7 @@ end # source://regexp_parser//lib/regexp_parser/expression/classes/keep.rb#2 module Regexp::Expression::Keep; end -# TOOD: in regexp_parser v3.0.0 this should possibly be a Subexpression +# TODO: in regexp_parser v3.0.0 this should possibly be a Subexpression # that contains all expressions to its left. # # source://regexp_parser//lib/regexp_parser/expression/classes/keep.rb#5 @@ -2368,7 +2368,7 @@ class Regexp::Parser # source://regexp_parser//lib/regexp_parser/parser.rb#262 def assign_effective_number(exp); end - # Assigns referenced expressions to refering expressions, e.g. if there is + # Assigns referenced expressions to referring expressions, e.g. if there is # an instance of Backreference::Number, its #referenced_expression is set to # the instance of Group::Capture that it refers to via its number. # diff --git a/sorbet/rbi/gems/rexml@3.2.6.rbi b/sorbet/rbi/gems/rexml@3.2.8.rbi similarity index 96% rename from sorbet/rbi/gems/rexml@3.2.6.rbi rename to sorbet/rbi/gems/rexml@3.2.8.rbi index c8d67b58d..d536b53b8 100644 --- a/sorbet/rbi/gems/rexml@3.2.6.rbi +++ b/sorbet/rbi/gems/rexml@3.2.8.rbi @@ -1,4 +1,4 @@ -# typed: true +# typed: false # DO NOT EDIT MANUALLY # This is an autogenerated file for types exported from the `rexml` gem. @@ -3453,47 +3453,48 @@ end # A Source that wraps an IO. See the Source class for method # documentation # -# source://rexml//lib/rexml/source.rb#159 +# source://rexml//lib/rexml/source.rb#140 class REXML::IOSource < ::REXML::Source # block_size has been deprecated # # @return [IOSource] a new instance of IOSource # - # source://rexml//lib/rexml/source.rb#163 + # source://rexml//lib/rexml/source.rb#144 def initialize(arg, block_size = T.unsafe(nil), encoding = T.unsafe(nil)); end - # source://rexml//lib/rexml/source.rb#215 - def consume(pattern); end - # @return the current line in the source # - # source://rexml//lib/rexml/source.rb#244 + # source://rexml//lib/rexml/source.rb#217 def current_line; end # @return [Boolean] # - # source://rexml//lib/rexml/source.rb#235 + # source://rexml//lib/rexml/source.rb#212 def empty?; end - # source://rexml//lib/rexml/source.rb#219 - def match(pattern, cons = T.unsafe(nil)); end + # source://rexml//lib/rexml/source.rb#189 + def ensure_buffer; end - # source://rexml//lib/rexml/source.rb#239 - def position; end + # Note: When specifying a string for 'pattern', it must not include '>' except in the following formats: + # - ">" + # - "XXX>" (X is any string excluding '>') + # + # source://rexml//lib/rexml/source.rb#196 + def match(pattern, cons = T.unsafe(nil)); end - # source://rexml//lib/rexml/source.rb#207 - def read; end + # source://rexml//lib/rexml/source.rb#165 + def read(term = T.unsafe(nil)); end - # source://rexml//lib/rexml/source.rb#184 - def scan(pattern, cons = T.unsafe(nil)); end + # source://rexml//lib/rexml/source.rb#175 + def read_until(term); end private - # source://rexml//lib/rexml/source.rb#286 + # source://rexml//lib/rexml/source.rb#259 def encoding_updated; end - # source://rexml//lib/rexml/source.rb#266 - def readline; end + # source://rexml//lib/rexml/source.rb#239 + def readline(term = T.unsafe(nil)); end end # Represents an XML Instruction; IE, @@ -3816,7 +3817,7 @@ class REXML::ParseException < ::RuntimeError # source://rexml//lib/rexml/parseexception.rb#6 def initialize(message, source = T.unsafe(nil), parser = T.unsafe(nil), exception = T.unsafe(nil)); end - # source://rexml//lib/rexml/parseexception.rb#48 + # source://rexml//lib/rexml/parseexception.rb#49 def context; end # Returns the value of attribute continued_exception. @@ -3831,7 +3832,7 @@ class REXML::ParseException < ::RuntimeError # source://rexml//lib/rexml/parseexception.rb#4 def continued_exception=(_arg0); end - # source://rexml//lib/rexml/parseexception.rb#43 + # source://rexml//lib/rexml/parseexception.rb#44 def line; end # Returns the value of attribute parser. @@ -3846,7 +3847,7 @@ class REXML::ParseException < ::RuntimeError # source://rexml//lib/rexml/parseexception.rb#4 def parser=(_arg0); end - # source://rexml//lib/rexml/parseexception.rb#38 + # source://rexml//lib/rexml/parseexception.rb#39 def position; end # Returns the value of attribute source. @@ -3887,34 +3888,36 @@ end # # source://rexml//lib/rexml/parsers/baseparser.rb#29 class REXML::Parsers::BaseParser + include ::REXML::Parsers::BaseParser::Private + # @return [BaseParser] a new instance of BaseParser # - # source://rexml//lib/rexml/parsers/baseparser.rb#115 + # source://rexml//lib/rexml/parsers/baseparser.rb#128 def initialize(source); end - # source://rexml//lib/rexml/parsers/baseparser.rb#120 + # source://rexml//lib/rexml/parsers/baseparser.rb#133 def add_listener(listener); end # Returns true if there are no more events # # @return [Boolean] # - # source://rexml//lib/rexml/parsers/baseparser.rb#146 + # source://rexml//lib/rexml/parsers/baseparser.rb#159 def empty?; end - # source://rexml//lib/rexml/parsers/baseparser.rb#438 + # source://rexml//lib/rexml/parsers/baseparser.rb#446 def entity(reference, entities); end # Returns true if there are more events. Synonymous with !empty? # # @return [Boolean] # - # source://rexml//lib/rexml/parsers/baseparser.rb#151 + # source://rexml//lib/rexml/parsers/baseparser.rb#164 def has_next?; end # Escapes all possible entities # - # source://rexml//lib/rexml/parsers/baseparser.rb#449 + # source://rexml//lib/rexml/parsers/baseparser.rb#457 def normalize(input, entities = T.unsafe(nil), entity_filter = T.unsafe(nil)); end # Peek at the +depth+ event in the stack. The first element on the stack @@ -3924,59 +3927,59 @@ class REXML::Parsers::BaseParser # event, so you can effectively pre-parse the entire document (pull the # entire thing into memory) using this method. # - # source://rexml//lib/rexml/parsers/baseparser.rb#167 + # source://rexml//lib/rexml/parsers/baseparser.rb#180 def peek(depth = T.unsafe(nil)); end - # source://rexml//lib/rexml/parsers/baseparser.rb#136 + # source://rexml//lib/rexml/parsers/baseparser.rb#149 def position; end # Returns the next event. This is a +PullEvent+ object. # - # source://rexml//lib/rexml/parsers/baseparser.rb#182 + # source://rexml//lib/rexml/parsers/baseparser.rb#195 def pull; end # Returns the value of attribute source. # - # source://rexml//lib/rexml/parsers/baseparser.rb#124 + # source://rexml//lib/rexml/parsers/baseparser.rb#137 def source; end - # source://rexml//lib/rexml/parsers/baseparser.rb#126 + # source://rexml//lib/rexml/parsers/baseparser.rb#139 def stream=(source); end # Unescapes all possible entities # - # source://rexml//lib/rexml/parsers/baseparser.rb#465 + # source://rexml//lib/rexml/parsers/baseparser.rb#473 def unnormalize(string, entities = T.unsafe(nil), filter = T.unsafe(nil)); end # Push an event back on the head of the stream. This method # has (theoretically) infinite depth. # - # source://rexml//lib/rexml/parsers/baseparser.rb#157 + # source://rexml//lib/rexml/parsers/baseparser.rb#170 def unshift(token); end private # @return [Boolean] # - # source://rexml//lib/rexml/parsers/baseparser.rb#495 + # source://rexml//lib/rexml/parsers/baseparser.rb#502 def need_source_encoding_update?(xml_declaration_encoding); end - # source://rexml//lib/rexml/parsers/baseparser.rb#589 + # source://rexml//lib/rexml/parsers/baseparser.rb#613 def parse_attributes(prefixes, curr_ns); end - # source://rexml//lib/rexml/parsers/baseparser.rb#514 + # source://rexml//lib/rexml/parsers/baseparser.rb#521 def parse_id(base_error_message, accept_external_id:, accept_public_id:); end - # source://rexml//lib/rexml/parsers/baseparser.rb#542 + # source://rexml//lib/rexml/parsers/baseparser.rb#549 def parse_id_invalid_details(accept_external_id:, accept_public_id:); end - # source://rexml//lib/rexml/parsers/baseparser.rb#501 + # source://rexml//lib/rexml/parsers/baseparser.rb#508 def parse_name(base_error_message); end - # source://rexml//lib/rexml/parsers/baseparser.rb#580 - def process_instruction; end + # source://rexml//lib/rexml/parsers/baseparser.rb#587 + def process_instruction(start_position); end - # source://rexml//lib/rexml/parsers/baseparser.rb#190 + # source://rexml//lib/rexml/parsers/baseparser.rb#203 def pull_event; end end @@ -3989,6 +3992,33 @@ REXML::Parsers::BaseParser::EXTERNAL_ID_SYSTEM = T.let(T.unsafe(nil), Regexp) # source://rexml//lib/rexml/parsers/baseparser.rb#104 REXML::Parsers::BaseParser::PUBLIC_ID = T.let(T.unsafe(nil), Regexp) +# source://rexml//lib/rexml/parsers/baseparser.rb#115 +module REXML::Parsers::BaseParser::Private; end + +# source://rexml//lib/rexml/parsers/baseparser.rb#119 +REXML::Parsers::BaseParser::Private::ATTLISTDECL_END = T.let(T.unsafe(nil), Regexp) + +# source://rexml//lib/rexml/parsers/baseparser.rb#118 +REXML::Parsers::BaseParser::Private::CLOSE_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://rexml//lib/rexml/parsers/baseparser.rb#123 +REXML::Parsers::BaseParser::Private::ENTITYDECL_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://rexml//lib/rexml/parsers/baseparser.rb#121 +REXML::Parsers::BaseParser::Private::GEDECL_PATTERN = T.let(T.unsafe(nil), String) + +# source://rexml//lib/rexml/parsers/baseparser.rb#116 +REXML::Parsers::BaseParser::Private::INSTRUCTION_END = T.let(T.unsafe(nil), Regexp) + +# source://rexml//lib/rexml/parsers/baseparser.rb#120 +REXML::Parsers::BaseParser::Private::NAME_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://rexml//lib/rexml/parsers/baseparser.rb#122 +REXML::Parsers::BaseParser::Private::PEDECL_PATTERN = T.let(T.unsafe(nil), String) + +# source://rexml//lib/rexml/parsers/baseparser.rb#117 +REXML::Parsers::BaseParser::Private::TAG_PATTERN = T.let(T.unsafe(nil), Regexp) + # source://rexml//lib/rexml/parsers/baseparser.rb#38 REXML::Parsers::BaseParser::QNAME = T.let(T.unsafe(nil), Regexp) @@ -4198,85 +4228,67 @@ class REXML::Source # @param encoding if non-null, sets the encoding of the source to this # @return [Source] a new instance of Source # - # source://rexml//lib/rexml/source.rb#43 + # source://rexml//lib/rexml/source.rb#41 def initialize(arg, encoding = T.unsafe(nil)); end # The current buffer (what we're going to read next) # - # source://rexml//lib/rexml/source.rb#34 + # source://rexml//lib/rexml/source.rb#53 def buffer; end - # source://rexml//lib/rexml/source.rb#87 - def consume(pattern); end + # source://rexml//lib/rexml/source.rb#57 + def buffer_encoding=(encoding); end # @return the current line in the source # - # source://rexml//lib/rexml/source.rb#117 + # source://rexml//lib/rexml/source.rb#100 def current_line; end # @return [Boolean] true if the Source is exhausted # - # source://rexml//lib/rexml/source.rb#108 + # source://rexml//lib/rexml/source.rb#95 def empty?; end # Returns the value of attribute encoding. # - # source://rexml//lib/rexml/source.rb#37 + # source://rexml//lib/rexml/source.rb#35 def encoding; end # Inherited from Encoding # Overridden to support optimized en/decoding # - # source://rexml//lib/rexml/source.rb#56 + # source://rexml//lib/rexml/source.rb#63 def encoding=(enc); end + # source://rexml//lib/rexml/source.rb#75 + def ensure_buffer; end + # The line number of the last consumed text # - # source://rexml//lib/rexml/source.rb#36 + # source://rexml//lib/rexml/source.rb#34 def line; end - # source://rexml//lib/rexml/source.rb#101 + # source://rexml//lib/rexml/source.rb#78 def match(pattern, cons = T.unsafe(nil)); end - # source://rexml//lib/rexml/source.rb#91 - def match_to(char, pattern); end + # source://rexml//lib/rexml/source.rb#86 + def position; end - # source://rexml//lib/rexml/source.rb#95 - def match_to_consume(char, pattern); end + # source://rexml//lib/rexml/source.rb#90 + def position=(pos); end - # source://rexml//lib/rexml/source.rb#112 - def position; end + # source://rexml//lib/rexml/source.rb#68 + def read(term = T.unsafe(nil)); end - # source://rexml//lib/rexml/source.rb#84 - def read; end - - # Scans the source for a given pattern. Note, that this is not your - # usual scan() method. For one thing, the pattern argument has some - # requirements; for another, the source can be consumed. You can easily - # confuse this method. Originally, the patterns were easier - # to construct and this method more robust, because this method - # generated search regexps on the fly; however, this was - # computationally expensive and slowed down the entire REXML package - # considerably, since this is by far the most commonly called method. - # /^\s*(#{your pattern, with no groups})(.*)/. The first group - # will be returned; the second group is used if the consume flag is - # set. - # everything after it in the Source. - # pattern is not found. - # - # @param pattern must be a Regexp, and must be in the form of - # @param consume if true, the pattern returned will be consumed, leaving - # @return the pattern, if found, or nil if the Source is empty or the - # - # source://rexml//lib/rexml/source.rb#77 - def scan(pattern, cons = T.unsafe(nil)); end + # source://rexml//lib/rexml/source.rb#71 + def read_until(term); end private - # source://rexml//lib/rexml/source.rb#125 + # source://rexml//lib/rexml/source.rb#109 def detect_encoding; end - # source://rexml//lib/rexml/source.rb#146 + # source://rexml//lib/rexml/source.rb#127 def encoding_updated; end end @@ -4607,24 +4619,24 @@ end # @private # -# source://rexml//lib/rexml/xpath_parser.rb#959 +# source://rexml//lib/rexml/xpath_parser.rb#963 class REXML::XPathNode # @return [XPathNode] a new instance of XPathNode # - # source://rexml//lib/rexml/xpath_parser.rb#961 + # source://rexml//lib/rexml/xpath_parser.rb#965 def initialize(node, context = T.unsafe(nil)); end # Returns the value of attribute context. # - # source://rexml//lib/rexml/xpath_parser.rb#960 + # source://rexml//lib/rexml/xpath_parser.rb#964 def context; end - # source://rexml//lib/rexml/xpath_parser.rb#970 + # source://rexml//lib/rexml/xpath_parser.rb#974 def position; end # Returns the value of attribute raw_node. # - # source://rexml//lib/rexml/xpath_parser.rb#960 + # source://rexml//lib/rexml/xpath_parser.rb#964 def raw_node; end end @@ -4673,25 +4685,25 @@ class REXML::XPathParser private - # source://rexml//lib/rexml/xpath_parser.rb#775 + # source://rexml//lib/rexml/xpath_parser.rb#779 def child(nodeset); end - # source://rexml//lib/rexml/xpath_parser.rb#916 + # source://rexml//lib/rexml/xpath_parser.rb#920 def compare(a, operator, b); end - # source://rexml//lib/rexml/xpath_parser.rb#678 + # source://rexml//lib/rexml/xpath_parser.rb#682 def descendant(nodeset, include_self); end - # source://rexml//lib/rexml/xpath_parser.rb#689 + # source://rexml//lib/rexml/xpath_parser.rb#693 def descendant_recursive(raw_node, new_nodeset, new_nodes, include_self); end - # source://rexml//lib/rexml/xpath_parser.rb#938 + # source://rexml//lib/rexml/xpath_parser.rb#942 def each_unnode(nodeset); end - # source://rexml//lib/rexml/xpath_parser.rb#637 + # source://rexml//lib/rexml/xpath_parser.rb#641 def enter(tag, *args); end - # source://rexml//lib/rexml/xpath_parser.rb#815 + # source://rexml//lib/rexml/xpath_parser.rb#819 def equality_relational_compare(set1, op, set2); end # source://rexml//lib/rexml/xpath_parser.rb#591 @@ -4706,10 +4718,10 @@ class REXML::XPathParser # source://rexml//lib/rexml/xpath_parser.rb#582 def filter_nodeset(nodeset); end - # source://rexml//lib/rexml/xpath_parser.rb#745 + # source://rexml//lib/rexml/xpath_parser.rb#749 def following(node); end - # source://rexml//lib/rexml/xpath_parser.rb#756 + # source://rexml//lib/rexml/xpath_parser.rb#760 def following_node_of(node); end # Returns a String namespace for a node, given a prefix @@ -4721,19 +4733,19 @@ class REXML::XPathParser # source://rexml//lib/rexml/xpath_parser.rb#163 def get_namespace(node, prefix); end - # source://rexml//lib/rexml/xpath_parser.rb#642 + # source://rexml//lib/rexml/xpath_parser.rb#646 def leave(tag, *args); end - # source://rexml//lib/rexml/xpath_parser.rb#763 + # source://rexml//lib/rexml/xpath_parser.rb#767 def next_sibling_node(node); end # source://rexml//lib/rexml/xpath_parser.rb#477 def node_test(path_stack, nodesets, any_type: T.unsafe(nil)); end - # source://rexml//lib/rexml/xpath_parser.rb#802 + # source://rexml//lib/rexml/xpath_parser.rb#806 def norm(b); end - # source://rexml//lib/rexml/xpath_parser.rb#890 + # source://rexml//lib/rexml/xpath_parser.rb#894 def normalize_compare_values(a, operator, b); end # Builds a nodeset of all of the preceding nodes of the supplied node, @@ -4741,10 +4753,10 @@ class REXML::XPathParser # preceding:: includes every element in the document that precedes this node, # except for ancestors # - # source://rexml//lib/rexml/xpath_parser.rb#708 + # source://rexml//lib/rexml/xpath_parser.rb#712 def preceding(node); end - # source://rexml//lib/rexml/xpath_parser.rb#730 + # source://rexml//lib/rexml/xpath_parser.rb#734 def preceding_node_of(node); end # Reorders an array of nodes so that they are in document order @@ -4756,7 +4768,7 @@ class REXML::XPathParser # I wouldn't have to do this. Maybe add a document IDX for each node? # Problems with mutable documents. Or, rewrite everything. # - # source://rexml//lib/rexml/xpath_parser.rb#655 + # source://rexml//lib/rexml/xpath_parser.rb#659 def sort(array_of_nodes, order); end # source://rexml//lib/rexml/xpath_parser.rb#441 @@ -4767,13 +4779,13 @@ class REXML::XPathParser # source://rexml//lib/rexml/xpath_parser.rb#154 def strict?; end - # source://rexml//lib/rexml/xpath_parser.rb#630 + # source://rexml//lib/rexml/xpath_parser.rb#634 def trace(*args); end - # source://rexml//lib/rexml/xpath_parser.rb#950 + # source://rexml//lib/rexml/xpath_parser.rb#954 def unnode(nodeset); end - # source://rexml//lib/rexml/xpath_parser.rb#877 + # source://rexml//lib/rexml/xpath_parser.rb#881 def value_type(value); end end diff --git a/sorbet/rbi/gems/rubocop-ast@1.31.2.rbi b/sorbet/rbi/gems/rubocop-ast@1.31.3.rbi similarity index 99% rename from sorbet/rbi/gems/rubocop-ast@1.31.2.rbi rename to sorbet/rbi/gems/rubocop-ast@1.31.3.rbi index 684662153..04b45a8a8 100644 --- a/sorbet/rbi/gems/rubocop-ast@1.31.2.rbi +++ b/sorbet/rbi/gems/rubocop-ast@1.31.3.rbi @@ -5122,9 +5122,6 @@ RuboCop::AST::NodePattern::Sets::SET_10_10 = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_1_1 = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_ABSTRACT_OVERRIDE_OVERRIDABLE_ETC = T.let(T.unsafe(nil), Set) - # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_ADD_DEPENDENCY_ADD_RUNTIME_DEPENDENCY_ADD_DEVELOPMENT_DEPENDENCY = T.let(T.unsafe(nil), Set) @@ -5167,15 +5164,9 @@ RuboCop::AST::NodePattern::Sets::SET_CLASS_MODULE_STRUCT = T.let(T.unsafe(nil), # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_CLONE_DUP_FREEZE = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_CONSTANTIZE_CONSTANTS_CONST_GET = T.let(T.unsafe(nil), Set) - # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_COUNT_LENGTH_SIZE = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_DEFINE_METHOD = T.let(T.unsafe(nil), Set) - # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_DEFINE_METHOD_DEFINE_SINGLETON_METHOD = T.let(T.unsafe(nil), Set) @@ -5185,9 +5176,6 @@ RuboCop::AST::NodePattern::Sets::SET_EACH_WITH_INDEX_WITH_INDEX = T.let(T.unsafe # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_EACH_WITH_OBJECT_WITH_OBJECT = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_ENV = T.let(T.unsafe(nil), Set) - # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_ESCAPE_ENCODE_UNESCAPE_DECODE = T.let(T.unsafe(nil), Set) @@ -5224,9 +5212,15 @@ RuboCop::AST::NodePattern::Sets::SET_GETHOSTBYADDR_GETHOSTBYNAME = T.let(T.unsaf # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_GSUB_GSUB = T.let(T.unsafe(nil), Set) +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_IF_UNLESS = T.let(T.unsafe(nil), Set) + # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_INCLUDE_EXTEND_PREPEND = T.let(T.unsafe(nil), Set) +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_INCLUDE_PREPEND = T.let(T.unsafe(nil), Set) + # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_INSTANCE_EVAL_CLASS_EVAL_MODULE_EVAL = T.let(T.unsafe(nil), Set) @@ -5239,6 +5233,9 @@ RuboCop::AST::NodePattern::Sets::SET_KEYS_VALUES = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_KEY_HAS_KEY_FETCH_ETC = T.let(T.unsafe(nil), Set) +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_LAMBDA_PROC = T.let(T.unsafe(nil), Set) + # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_LAST_FIRST = T.let(T.unsafe(nil), Set) @@ -5374,6 +5371,9 @@ RuboCop::AST::NodePattern::Sets::SET__FETCH = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET__GLOB = T.let(T.unsafe(nil), Set) +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET__PUSH_APPEND = T.let(T.unsafe(nil), Set) + # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET___ = T.let(T.unsafe(nil), Set) diff --git a/sorbet/rbi/gems/rubocop@1.63.4.rbi b/sorbet/rbi/gems/rubocop@1.64.1.rbi similarity index 98% rename from sorbet/rbi/gems/rubocop@1.63.4.rbi rename to sorbet/rbi/gems/rubocop@1.64.1.rbi index f82db723e..c81c2c7e6 100644 --- a/sorbet/rbi/gems/rubocop@1.63.4.rbi +++ b/sorbet/rbi/gems/rubocop@1.64.1.rbi @@ -97,44 +97,44 @@ class RuboCop::CLI private - # source://rubocop//lib/rubocop/cli.rb#152 + # source://rubocop//lib/rubocop/cli.rb#156 def act_on_options; end - # source://rubocop//lib/rubocop/cli.rb#194 + # source://rubocop//lib/rubocop/cli.rb#198 def apply_default_formatter; end - # source://rubocop//lib/rubocop/cli.rb#121 + # source://rubocop//lib/rubocop/cli.rb#125 def execute_runners; end - # source://rubocop//lib/rubocop/cli.rb#178 + # source://rubocop//lib/rubocop/cli.rb#182 def handle_editor_mode; end # @raise [Finished] # - # source://rubocop//lib/rubocop/cli.rb#183 + # source://rubocop//lib/rubocop/cli.rb#187 def handle_exiting_options; end - # source://rubocop//lib/rubocop/cli.rb#140 + # source://rubocop//lib/rubocop/cli.rb#144 def parallel_by_default!; end - # source://rubocop//lib/rubocop/cli.rb#76 + # source://rubocop//lib/rubocop/cli.rb#80 def profile_if_needed; end - # source://rubocop//lib/rubocop/cli.rb#109 + # source://rubocop//lib/rubocop/cli.rb#113 def require_gem(name); end - # source://rubocop//lib/rubocop/cli.rb#117 + # source://rubocop//lib/rubocop/cli.rb#121 def run_command(name); end - # source://rubocop//lib/rubocop/cli.rb#170 + # source://rubocop//lib/rubocop/cli.rb#174 def set_options_to_config_loader; end - # source://rubocop//lib/rubocop/cli.rb#129 + # source://rubocop//lib/rubocop/cli.rb#133 def suggest_extensions; end # @raise [OptionArgumentError] # - # source://rubocop//lib/rubocop/cli.rb#133 + # source://rubocop//lib/rubocop/cli.rb#137 def validate_options_vs_config; end end @@ -1178,12 +1178,12 @@ class RuboCop::Config private - # source://rubocop//lib/rubocop/config.rb#347 + # source://rubocop//lib/rubocop/config.rb#346 def department_of(qualified_cop_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#335 + # source://rubocop//lib/rubocop/config.rb#334 def enable_cop?(qualified_cop_name, cop_options); end # @param gem_version [Gem::Version] an object like `Gem::Version.new("7.1.2.3")` @@ -1192,7 +1192,7 @@ class RuboCop::Config # source://rubocop//lib/rubocop/config.rb#321 def gem_version_to_major_minor_float(gem_version); end - # source://rubocop//lib/rubocop/config.rb#328 + # source://rubocop//lib/rubocop/config.rb#327 def read_gem_versions_from_target_lockfile; end # @return [Float, nil] The Rails version as a `major.minor` Float. @@ -2938,18 +2938,18 @@ class RuboCop::Cop::Base # @return [Base] a new instance of Base # - # source://rubocop//lib/rubocop/cop/base.rb#153 + # source://rubocop//lib/rubocop/cop/base.rb#156 def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#269 + # source://rubocop//lib/rubocop/cop/base.rb#272 def active_support_extensions_enabled?; end # Adds an offense that has no particular location. # No correction can be applied to global offenses # - # source://rubocop//lib/rubocop/cop/base.rb#186 + # source://rubocop//lib/rubocop/cop/base.rb#189 def add_global_offense(message = T.unsafe(nil), severity: T.unsafe(nil)); end # Adds an offense on the specified range (or node with an expression) @@ -2957,25 +2957,25 @@ class RuboCop::Cop::Base # to provide the cop the opportunity to autocorrect the offense. # If message is not specified, the method `message` will be called. # - # source://rubocop//lib/rubocop/cop/base.rb#198 + # source://rubocop//lib/rubocop/cop/base.rb#201 def add_offense(node_or_range, message: T.unsafe(nil), severity: T.unsafe(nil), &block); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#340 + # source://rubocop//lib/rubocop/cop/base.rb#343 def always_autocorrect?; end # Called before any investigation # # @api private # - # source://rubocop//lib/rubocop/cop/base.rb#326 + # source://rubocop//lib/rubocop/cop/base.rb#329 def begin_investigation(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end # @api private # - # source://rubocop//lib/rubocop/cop/base.rb#311 + # source://rubocop//lib/rubocop/cop/base.rb#314 def callbacks_needed; end # Returns the value of attribute config. @@ -2983,29 +2983,29 @@ class RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/base.rb#43 def config; end - # source://rubocop//lib/rubocop/cop/base.rb#249 + # source://rubocop//lib/rubocop/cop/base.rb#252 def config_to_allow_offenses; end - # source://rubocop//lib/rubocop/cop/base.rb#253 + # source://rubocop//lib/rubocop/cop/base.rb#256 def config_to_allow_offenses=(hash); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#346 + # source://rubocop//lib/rubocop/cop/base.rb#349 def contextual_autocorrect?; end # Configuration Helpers # - # source://rubocop//lib/rubocop/cop/base.rb#243 + # source://rubocop//lib/rubocop/cop/base.rb#246 def cop_config; end - # source://rubocop//lib/rubocop/cop/base.rb#235 + # source://rubocop//lib/rubocop/cop/base.rb#238 def cop_name; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#282 + # source://rubocop//lib/rubocop/cop/base.rb#285 def excluded_file?(file); end # This method should be overridden when a cop's behavior depends @@ -3024,51 +3024,51 @@ class RuboCop::Cop::Base # ResultCache system when those external dependencies change, # ie when the ResultCache should be invalidated. # - # source://rubocop//lib/rubocop/cop/base.rb#231 + # source://rubocop//lib/rubocop/cop/base.rb#234 def external_dependency_checksum; end - # source://rubocop//lib/rubocop/cop/base.rb#350 + # source://rubocop//lib/rubocop/cop/base.rb#353 def inspect; end # Gets called if no message is specified when calling `add_offense` or # `add_global_offense` # Cops are discouraged to override this; instead pass your message directly # - # source://rubocop//lib/rubocop/cop/base.rb#180 + # source://rubocop//lib/rubocop/cop/base.rb#183 def message(_range = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/base.rb#235 + # source://rubocop//lib/rubocop/cop/base.rb#238 def name; end # @deprecated Make potential errors with previous API more obvious # - # source://rubocop//lib/rubocop/cop/base.rb#302 + # source://rubocop//lib/rubocop/cop/base.rb#305 def offenses; end # Called after all on_... have been called # When refining this method, always call `super` # - # source://rubocop//lib/rubocop/cop/base.rb#167 + # source://rubocop//lib/rubocop/cop/base.rb#170 def on_investigation_end; end # Called before all on_... have been called # When refining this method, always call `super` # - # source://rubocop//lib/rubocop/cop/base.rb#161 + # source://rubocop//lib/rubocop/cop/base.rb#164 def on_new_investigation; end # Called instead of all on_... callbacks for unrecognized files / syntax errors # When refining this method, always call `super` # - # source://rubocop//lib/rubocop/cop/base.rb#173 + # source://rubocop//lib/rubocop/cop/base.rb#176 def on_other_file; end # There should be very limited reasons for a Cop to do it's own parsing # - # source://rubocop//lib/rubocop/cop/base.rb#287 + # source://rubocop//lib/rubocop/cop/base.rb#290 def parse(source, path = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/base.rb#261 + # source://rubocop//lib/rubocop/cop/base.rb#264 def parser_engine; end # Returns the value of attribute processed_source. @@ -3080,104 +3080,106 @@ class RuboCop::Cop::Base # # @api private # - # source://rubocop//lib/rubocop/cop/base.rb#293 + # source://rubocop//lib/rubocop/cop/base.rb#296 def ready; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#273 + # source://rubocop//lib/rubocop/cop/base.rb#276 def relevant_file?(file); end - # source://rubocop//lib/rubocop/cop/base.rb#265 + # source://rubocop//lib/rubocop/cop/base.rb#268 def target_rails_version; end - # source://rubocop//lib/rubocop/cop/base.rb#257 + # source://rubocop//lib/rubocop/cop/base.rb#260 def target_ruby_version; end private - # source://rubocop//lib/rubocop/cop/base.rb#478 + # source://rubocop//lib/rubocop/cop/base.rb#471 def annotate(message); end - # source://rubocop//lib/rubocop/cop/base.rb#362 + # source://rubocop//lib/rubocop/cop/base.rb#365 def apply_correction(corrector); end # @return [Symbol] offense status # - # source://rubocop//lib/rubocop/cop/base.rb#442 + # source://rubocop//lib/rubocop/cop/base.rb#435 def attempt_correction(range, corrector); end # Reserved for Cop::Cop # - # source://rubocop//lib/rubocop/cop/base.rb#358 + # source://rubocop//lib/rubocop/cop/base.rb#361 def callback_argument(range); end # Called to complete an investigation # - # source://rubocop//lib/rubocop/cop/base.rb#391 + # source://rubocop//lib/rubocop/cop/base.rb#394 def complete_investigation; end # @return [Symbol, Corrector] offense status # - # source://rubocop//lib/rubocop/cop/base.rb#416 + # source://rubocop//lib/rubocop/cop/base.rb#409 def correct(range); end - # source://rubocop//lib/rubocop/cop/base.rb#376 + # source://rubocop//lib/rubocop/cop/base.rb#379 def current_corrector; end # Reserved for Commissioner: # - # source://rubocop//lib/rubocop/cop/base.rb#368 + # source://rubocop//lib/rubocop/cop/base.rb#371 def current_offense_locations; end - # source://rubocop//lib/rubocop/cop/base.rb#380 + # source://rubocop//lib/rubocop/cop/base.rb#383 def current_offenses; end - # source://rubocop//lib/rubocop/cop/base.rb#372 + # source://rubocop//lib/rubocop/cop/base.rb#375 def currently_disabled_lines; end - # source://rubocop//lib/rubocop/cop/base.rb#506 + # source://rubocop//lib/rubocop/cop/base.rb#499 def custom_severity; end - # source://rubocop//lib/rubocop/cop/base.rb#502 + # source://rubocop//lib/rubocop/cop/base.rb#495 def default_severity; end - # source://rubocop//lib/rubocop/cop/base.rb#456 + # source://rubocop//lib/rubocop/cop/base.rb#449 def disable_uncorrectable(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#492 + # source://rubocop//lib/rubocop/cop/base.rb#485 def enabled_line?(line_number); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#484 + # source://rubocop//lib/rubocop/cop/base.rb#477 def file_name_matches_any?(file, parameter, default_result); end - # source://rubocop//lib/rubocop/cop/base.rb#474 + # source://rubocop//lib/rubocop/cop/base.rb#467 def find_message(range, message); end - # source://rubocop//lib/rubocop/cop/base.rb#498 + # source://rubocop//lib/rubocop/cop/base.rb#491 def find_severity(_range, severity); end - # source://rubocop//lib/rubocop/cop/base.rb#519 + # source://rubocop//lib/rubocop/cop/base.rb#512 def range_for_original(range); end - # source://rubocop//lib/rubocop/cop/base.rb#463 + # source://rubocop//lib/rubocop/cop/base.rb#456 def range_from_node_or_range(node_or_range); end - # source://rubocop//lib/rubocop/cop/base.rb#411 + # Actually private methods + # + # source://rubocop//lib/rubocop/cop/base.rb#404 def reset_investigation; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#527 + # source://rubocop//lib/rubocop/cop/base.rb#520 def target_satisfies_all_gem_version_requirements?; end # @return [Symbol] offense status # - # source://rubocop//lib/rubocop/cop/base.rb#431 + # source://rubocop//lib/rubocop/cop/base.rb#424 def use_corrector(range, corrector); end class << self @@ -3192,51 +3194,54 @@ class RuboCop::Cop::Base # Naming # - # source://rubocop//lib/rubocop/cop/base.rb#90 + # source://rubocop//lib/rubocop/cop/base.rb#93 def badge; end # @api private # - # source://rubocop//lib/rubocop/cop/base.rb#316 + # source://rubocop//lib/rubocop/cop/base.rb#319 def callbacks_needed; end - # source://rubocop//lib/rubocop/cop/base.rb#94 + # source://rubocop//lib/rubocop/cop/base.rb#97 def cop_name; end - # source://rubocop//lib/rubocop/cop/base.rb#98 + # source://rubocop//lib/rubocop/cop/base.rb#101 def department; end - # Cops (other than builtin) are encouraged to implement this + # Returns an url to view this cops documentation online. + # Requires 'DocumentationBaseURL' to be set for your department. + # Will follow the convention of RuboCops own documentation structure, + # overwrite this method to accommodate your custom layout. # # @api public # @return [String, nil] # - # source://rubocop//lib/rubocop/cop/base.rb#67 - def documentation_url; end + # source://rubocop//lib/rubocop/cop/base.rb#70 + def documentation_url(config = T.unsafe(nil)); end # Call for abstract Cop classes # - # source://rubocop//lib/rubocop/cop/base.rb#78 + # source://rubocop//lib/rubocop/cop/base.rb#81 def exclude_from_registry; end # Returns the value of attribute gem_requirements. # - # source://rubocop//lib/rubocop/cop/base.rb#135 + # source://rubocop//lib/rubocop/cop/base.rb#138 def gem_requirements; end # @private # - # source://rubocop//lib/rubocop/cop/base.rb#71 + # source://rubocop//lib/rubocop/cop/base.rb#74 def inherited(subclass); end # Override and return the Force class(es) you need to join # - # source://rubocop//lib/rubocop/cop/base.rb#115 + # source://rubocop//lib/rubocop/cop/base.rb#118 def joining_forces; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#102 + # source://rubocop//lib/rubocop/cop/base.rb#105 def lint?; end # Returns true if the cop name or the cop namespace matches any of the @@ -3244,7 +3249,7 @@ class RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#108 + # source://rubocop//lib/rubocop/cop/base.rb#111 def match?(given_names); end # Register a version requirement for the given gem name. @@ -3259,7 +3264,7 @@ class RuboCop::Cop::Base # # https://guides.rubygems.org/patterns/#declaring-dependencies # - # source://rubocop//lib/rubocop/cop/base.rb#148 + # source://rubocop//lib/rubocop/cop/base.rb#151 def requires_gem(gem_name, *version_requirements); end # Returns if class supports autocorrect. @@ -3267,7 +3272,7 @@ class RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#84 + # source://rubocop//lib/rubocop/cop/base.rb#87 def support_autocorrect?; end # Override if your cop should be called repeatedly for multiple investigations @@ -3280,22 +3285,17 @@ class RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#126 + # source://rubocop//lib/rubocop/cop/base.rb#129 def support_multiple_source?; end private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/base.rb#402 - def builtin?; end - - # source://rubocop//lib/rubocop/cop/base.rb#384 + # source://rubocop//lib/rubocop/cop/base.rb#387 def restrict_on_send; end end end -# source://rubocop//lib/rubocop/cop/base.rb#388 +# source://rubocop//lib/rubocop/cop/base.rb#391 RuboCop::Cop::Base::EMPTY_OFFENSES = T.let(T.unsafe(nil), Array) # Reports of an investigation. @@ -3834,35 +3834,35 @@ class RuboCop::Cop::Bundler::GemVersion < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#113 + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#111 def forbidden_offense?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#119 + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#117 def forbidden_style?; end # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#93 - def message(range); end + def message(_range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#103 + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#101 def offense?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#107 + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#105 def required_offense?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#123 + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#121 def required_style?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#127 + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#125 def version_specification?(expression); end end @@ -5092,7 +5092,7 @@ class RuboCop::Cop::Corrector < ::Parser::Source::TreeRewriter # Legacy # - # source://parser/3.3.1.0/lib/parser/source/tree_rewriter.rb#252 + # source://parser/3.3.2.0/lib/parser/source/tree_rewriter.rb#252 def rewrite; end # Swaps sources at the given ranges. @@ -5163,7 +5163,12 @@ module RuboCop::Cop::Documentation # @api private # - # source://rubocop//lib/rubocop/cop/documentation.rb#34 + # source://rubocop//lib/rubocop/cop/documentation.rb#40 + def builtin?(cop_class); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#35 def default_base_url; end # @api private @@ -5183,8 +5188,14 @@ module RuboCop::Cop::Documentation def base_url_for(cop_class, config); end # @api private + # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/documentation.rb#34 + # source://rubocop//lib/rubocop/cop/documentation.rb#40 + def builtin?(cop_class); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#35 def default_base_url; end # @api private @@ -5524,37 +5535,53 @@ RuboCop::Cop::ForToEachCorrector::CORRECTION = T.let(T.unsafe(nil), String) class RuboCop::Cop::Force # @return [Force] a new instance of Force # - # source://rubocop//lib/rubocop/cop/force.rb#22 + # source://rubocop//lib/rubocop/cop/force.rb#32 def initialize(cops); end # Returns the value of attribute cops. # - # source://rubocop//lib/rubocop/cop/force.rb#7 + # source://rubocop//lib/rubocop/cop/force.rb#17 def cops; end - # source://rubocop//lib/rubocop/cop/force.rb#38 + # source://rubocop//lib/rubocop/cop/force.rb#50 def investigate(_processed_source); end - # source://rubocop//lib/rubocop/cop/force.rb#26 + # source://rubocop//lib/rubocop/cop/force.rb#36 def name; end - # source://rubocop//lib/rubocop/cop/force.rb#30 + # source://rubocop//lib/rubocop/cop/force.rb#40 def run_hook(method_name, *args); end class << self - # source://rubocop//lib/rubocop/cop/force.rb#9 + # source://rubocop//lib/rubocop/cop/force.rb#19 def all; end - # source://rubocop//lib/rubocop/cop/force.rb#18 + # source://rubocop//lib/rubocop/cop/force.rb#28 def force_name; end # @private # - # source://rubocop//lib/rubocop/cop/force.rb#13 + # source://rubocop//lib/rubocop/cop/force.rb#23 def inherited(subclass); end end end +# @api private +# +# source://rubocop//lib/rubocop/cop/force.rb#8 +class RuboCop::Cop::Force::HookError < ::StandardError + # @api private + # @return [HookError] a new instance of HookError + # + # source://rubocop//lib/rubocop/cop/force.rb#11 + def initialize(joining_cop); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/force.rb#9 + def joining_cop; end +end + # Common functionality for dealing with frozen string literals. # # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#6 @@ -5685,7 +5712,7 @@ class RuboCop::Cop::Gemspec::DependencyVersion < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#120 + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#118 def add_dependency_method?(method_name); end # @return [Boolean] @@ -5698,40 +5725,40 @@ class RuboCop::Cop::Gemspec::DependencyVersion < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#134 + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#132 def forbidden_offense?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#140 + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#138 def forbidden_style?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#114 + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#112 def match_block_variable_name?(receiver_name); end # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#104 - def message(range); end + def message(_range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#124 + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#122 def offense?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#128 + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#126 def required_offense?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#144 + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#142 def required_style?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#148 + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#146 def version_specification?(expression); end end @@ -6617,40 +6644,45 @@ module RuboCop::Cop::HashShorthandSyntax # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#125 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#126 def brackets?(method_dispatch_node); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#155 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#156 def breakdown_value_types_of_hash(hash_node); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#102 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#103 def def_node_that_require_parentheses(node); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#179 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#185 def each_omittable_value_pair(hash_value_type_breakdown, &block); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#175 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#181 def each_omitted_value_pair(hash_value_type_breakdown, &block); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#80 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#81 def enforced_shorthand_syntax; end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#117 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#118 def find_ancestor_method_dispatch_node(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#167 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#168 def hash_with_mixed_shorthand_syntax?(hash_value_type_breakdown); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#171 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#172 def hash_with_values_that_cant_be_omitted?(hash_value_type_breakdown); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#74 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#176 + def ignore_explicit_omissible_hash_shorthand_syntax?(hash_value_type_breakdown); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#75 def ignore_hash_shorthand_syntax?(pair_node); end # @return [Boolean] @@ -6660,18 +6692,18 @@ module RuboCop::Cop::HashShorthandSyntax # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#140 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#141 def last_expression?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#148 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#149 def method_dispatch_as_argument?(method_dispatch_node); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#183 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#189 def mixed_shorthand_syntax_check(hash_value_type_breakdown); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#199 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#205 def no_mixed_shorthand_syntax_check(hash_value_type_breakdown); end # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#49 @@ -6679,22 +6711,22 @@ module RuboCop::Cop::HashShorthandSyntax # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#84 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#85 def require_hash_value?(hash_key_source, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#93 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#94 def require_hash_value_for_around_hash_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#129 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#130 def use_element_of_hash_literal_as_receiver?(ancestor, parent); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#134 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#135 def use_modifier_form_without_parenthesized_method_call?(ancestor); end end @@ -6707,12 +6739,12 @@ RuboCop::Cop::HashShorthandSyntax::DO_NOT_MIX_MSG_PREFIX = T.let(T.unsafe(nil), # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#11 RuboCop::Cop::HashShorthandSyntax::DO_NOT_MIX_OMIT_VALUE_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#209 +# source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#216 class RuboCop::Cop::HashShorthandSyntax::DefNode < ::Struct - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#218 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#225 def first_argument; end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#222 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#229 def last_argument; end # Returns the value of attribute node @@ -6726,7 +6758,7 @@ class RuboCop::Cop::HashShorthandSyntax::DefNode < ::Struct # @return [Object] the newly set value def node=(_); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#210 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#217 def selector; end class << self @@ -8771,35 +8803,35 @@ class RuboCop::Cop::Layout::EmptyComment < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#131 + # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#133 def allow_border_comment?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#135 + # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#137 def allow_margin_comment?; end # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#97 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#127 + # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#129 def comment_text(comment); end # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#108 def concat_consecutive_comments(comments); end - # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#139 + # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#141 def current_token(comment); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#117 + # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#119 def empty_comment_only?(comment_text); end # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#85 def investigate(comments); end - # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#143 + # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#145 def previous_token(node); end end @@ -10711,43 +10743,43 @@ class RuboCop::Cop::Layout::FirstArrayElementIndentation < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#94 def on_array(node); end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#98 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#100 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#98 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#100 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#189 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#191 def array_alignment_config; end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#109 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#111 def autocorrect(corrector, node); end # Returns the description of what the correct indentation is based on. # - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#147 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#149 def base_description(indent_base_type); end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#113 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#115 def brace_alignment_style; end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#117 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#119 def check(array_node, left_parenthesis); end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#131 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#133 def check_right_bracket(right_bracket, first_elem, left_bracket, left_parenthesis); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#183 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#185 def enforce_first_argument_with_fixed_indentation?; end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#160 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#162 def message(base_description); end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#168 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#170 def message_for_right_bracket(indent_base_type); end end @@ -16250,23 +16282,20 @@ class RuboCop::Cop::Layout::SpaceInsideStringInterpolation < ::RuboCop::Cop::Bas include ::RuboCop::Cop::ConfigurableEnforcedStyle extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#31 + # source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#30 def on_interpolation(begin_node); end private - # source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#47 + # source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#46 def autocorrect(corrector, begin_node); end - # source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#57 + # source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#56 def delimiters(begin_node); end end # source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#28 -RuboCop::Cop::Layout::SpaceInsideStringInterpolation::NO_SPACE_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#29 -RuboCop::Cop::Layout::SpaceInsideStringInterpolation::SPACE_MSG = T.let(T.unsafe(nil), String) +RuboCop::Cop::Layout::SpaceInsideStringInterpolation::MSG = T.let(T.unsafe(nil), String) # Looks for trailing blank lines and a final newline in the # source code. @@ -19155,36 +19184,45 @@ class RuboCop::Cop::Lint::ErbNewArguments < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#83 + # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#81 def erb_new_with_non_keyword_arguments(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#88 + # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#86 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#153 + # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#160 def arguments_range(node); end - # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#108 + # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#115 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#123 + # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#130 def build_kwargs(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#119 + # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#126 def correct_arguments?(arguments); end - # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#140 + # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#104 + def message(positional_argument_index, arg_value); end + + # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#147 def override_by_legacy_args(kwargs, node); end end +# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#74 +RuboCop::Cop::Lint::ErbNewArguments::MESSAGE_EOUTVAR = T.let(T.unsafe(nil), String) + # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#68 -RuboCop::Cop::Lint::ErbNewArguments::MESSAGES = T.let(T.unsafe(nil), Array) +RuboCop::Cop::Lint::ErbNewArguments::MESSAGE_SAFE_LEVEL = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#71 +RuboCop::Cop::Lint::ErbNewArguments::MESSAGE_TRIM_MODE = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#80 +# source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#78 RuboCop::Cop::Lint::ErbNewArguments::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Looks for uses of flip-flop operator @@ -30627,6 +30665,17 @@ module RuboCop::Cop::Style; end # EnforcedStyle config covers only method definitions. # Applications of visibility methods to symbols can be controlled # using AllowModifiersOnSymbols config. +# Also, the visibility of `attr*` methods can be controlled using +# AllowModifiersOnAttrs config. +# +# In Ruby 3.0, `attr*` methods now return an array of defined method names +# as symbols. So we can write the modifier and `attr*` in inline style. +# AllowModifiersOnAttrs config allows `attr*` methods to be written in +# inline style without modifying applications that have been maintained +# for a long time in group style. Furthermore, developers who are not very +# familiar with Ruby may know that the modifier applies to `def`, but they +# may not know that it also applies to `attr*` methods. It would be easier +# to understand if we could write `attr*` methods in inline style. # # @example EnforcedStyle: group (default) # # bad @@ -30678,94 +30727,128 @@ module RuboCop::Cop::Style; end # private :bar, :baz # # end +# @example AllowModifiersOnAttrs: true (default) +# # good +# class Foo +# +# public attr_reader :bar +# protected attr_writer :baz +# private attr_accessor :qux +# private attr :quux +# +# def public_method; end +# +# private +# +# def private_method; end +# +# end +# @example AllowModifiersOnAttrs: false +# # bad +# class Foo +# +# public attr_reader :bar +# protected attr_writer :baz +# private attr_accessor :qux +# private attr :quux +# +# end # -# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#70 +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#109 class RuboCop::Cop::Style::AccessModifierDeclarations < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#91 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#135 + def access_modifier_with_attr?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#130 def access_modifier_with_symbol?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#95 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#140 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#145 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#195 def access_modifier_is_inlined?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#149 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#199 def access_modifier_is_not_inlined?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#127 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#177 + def allow_modifiers_on_attrs?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#173 def allow_modifiers_on_symbols?(node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#112 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#158 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#219 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#269 def def_source(node, def_node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#180 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#230 def find_argument_less_modifier_node(node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#169 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#219 def find_corresponding_def_node(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#137 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#187 def group_style?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#141 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#191 def inline_style?; end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#211 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#261 def insert_inline_modifier(corrector, node, modifier_name); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#159 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#209 def message(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#131 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#181 def offense?(node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#215 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#265 def remove_node(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#194 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#244 def replace_def(corrector, node, def_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#153 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#203 def right_siblings_same_inline_method?(node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#188 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#238 def select_grouped_def_nodes(node); end end -# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#88 +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#127 RuboCop::Cop::Style::AccessModifierDeclarations::ALLOWED_NODE_TYPES = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#76 +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#115 RuboCop::Cop::Style::AccessModifierDeclarations::GROUP_STYLE_MESSAGE = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#81 +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#120 RuboCop::Cop::Style::AccessModifierDeclarations::INLINE_STYLE_MESSAGE = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#86 +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#125 RuboCop::Cop::Style::AccessModifierDeclarations::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for grouping of accessors in `class` and `module` bodies. @@ -31102,6 +31185,8 @@ RuboCop::Cop::Style::AndOr::MSG = T.let(T.unsafe(nil), String) # # Names not on this list are likely to be meaningful and are allowed by default. # +# This cop handles not only method forwarding but also forwarding to `super`. +# # @example # # bad # def foo(*args, &block) @@ -31189,222 +31274,222 @@ RuboCop::Cop::Style::AndOr::MSG = T.let(T.unsafe(nil), String) # bar(&) # end # -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#125 +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#127 class RuboCop::Cop::Style::ArgumentsForwarding < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#144 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#146 def on_def(node); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#144 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#146 def on_defs(node); end private - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#185 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#187 def add_forward_all_offenses(node, send_classifications, forwardable_args); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#351 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#353 def add_parens_if_missing(node, corrector); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#212 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#214 def add_post_ruby_32_offenses(def_node, send_classifications, forwardable_args); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#343 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#345 def allow_only_rest_arguments?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#335 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#337 def arguments_range(node, first_node); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#263 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#265 def classification_and_forwards(def_node, send_node, referenced_lvars, forwardable_args); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#248 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#250 def classify_send_nodes(def_node, send_nodes, referenced_lvars, forwardable_args); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#495 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#497 def explicit_block_name?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#168 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#170 def extract_forwardable_args(args); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#238 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#240 def non_splat_or_block_pass_lvar_references(body); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#180 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#182 def only_forwards_all?(send_classifications); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#292 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#294 def outside_block?(node); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#172 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#174 def redundant_forwardable_named_args(restarg, kwrestarg, blockarg); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#282 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#284 def redundant_named_arg(arg, config_name, keyword); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#325 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#327 def register_forward_all_offense(def_or_send, send_or_arguments, rest_or_splat); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#298 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#300 def register_forward_args_offense(def_arguments_or_send, rest_arg_or_splat); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#314 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#316 def register_forward_block_arg_offense(add_parens, def_arguments_or_send, block_arg); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#306 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#308 def register_forward_kwargs_offense(add_parens, def_arguments_or_send, kwrest_arg_or_splat); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#347 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#349 def use_anonymous_forwarding?; end class << self - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#140 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#142 def autocorrect_incompatible_with; end end end -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#133 +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#135 RuboCop::Cop::Style::ArgumentsForwarding::ADDITIONAL_ARG_TYPES = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#136 +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#138 RuboCop::Cop::Style::ArgumentsForwarding::ARGS_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#138 +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#140 RuboCop::Cop::Style::ArgumentsForwarding::BLOCK_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#132 +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#134 RuboCop::Cop::Style::ArgumentsForwarding::FORWARDING_LVAR_TYPES = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#135 +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#137 RuboCop::Cop::Style::ArgumentsForwarding::FORWARDING_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#137 +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#139 RuboCop::Cop::Style::ArgumentsForwarding::KWARGS_MSG = T.let(T.unsafe(nil), String) # Classifies send nodes for possible rest/kwrest/all (including block) forwarding. # -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#358 +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#360 class RuboCop::Cop::Style::ArgumentsForwarding::SendNodeClassifier extend ::RuboCop::AST::NodePattern::Macros # @return [SendNodeClassifier] a new instance of SendNodeClassifier # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#370 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#372 def initialize(def_node, send_node, referenced_lvars, forwardable_args, **config); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#398 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#400 def classification; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#365 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#367 def extract_forwarded_kwrest_arg(param0 = T.unsafe(nil), param1); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#392 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#394 def forwarded_block_arg; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#368 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#370 def forwarded_block_arg?(param0 = T.unsafe(nil), param1); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#386 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#388 def forwarded_kwrest_arg; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#380 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#382 def forwarded_rest_arg; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#362 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#364 def forwarded_rest_arg?(param0 = T.unsafe(nil), param1); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#466 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#468 def additional_kwargs?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#462 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#464 def additional_kwargs_or_forwarded_kwargs?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#476 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#478 def allow_offense_for_no_block?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#447 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#449 def any_arg_referenced?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#431 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#433 def arguments; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#410 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#412 def can_forward_all?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#470 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#472 def forward_additional_kwargs?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#427 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#429 def forwarded_rest_and_kwrest_args; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#489 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#491 def missing_rest_arg_or_kwrest_arg?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#480 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#482 def no_additional_args?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#455 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#457 def no_post_splat_args?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#423 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#425 def offensive_block_forwarding?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#443 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#445 def referenced_block_arg?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#439 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#441 def referenced_kwrest_arg?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#435 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#437 def referenced_rest_arg?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#419 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#421 def ruby_32_missing_rest_or_kwest?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#451 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#453 def target_ruby_version; end end @@ -34180,10 +34265,10 @@ class RuboCop::Cop::Style::Copyright < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/copyright.rb#83 + # source://rubocop//lib/rubocop/cop/style/copyright.rb#86 def encoding_token?(processed_source, token_index); end - # source://rubocop//lib/rubocop/cop/style/copyright.rb#69 + # source://rubocop//lib/rubocop/cop/style/copyright.rb#72 def insert_notice_before(processed_source); end # source://rubocop//lib/rubocop/cop/style/copyright.rb#52 @@ -34191,12 +34276,12 @@ class RuboCop::Cop::Style::Copyright < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/copyright.rb#90 + # source://rubocop//lib/rubocop/cop/style/copyright.rb#93 def notice_found?(processed_source); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/copyright.rb#76 + # source://rubocop//lib/rubocop/cop/style/copyright.rb#79 def shebang_token?(processed_source, token_index); end # @raise [Warning] @@ -34864,34 +34949,52 @@ RuboCop::Cop::Style::Documentation::MSG = T.let(T.unsafe(nil), String) # def do_something # end # end +# @example AllowedMethods: ['method_missing', 'respond_to_missing?'] +# +# # good +# class Foo +# def method_missing(name, *args) +# end +# +# def respond_to_missing?(symbol, include_private) +# end +# end # -# source://rubocop//lib/rubocop/cop/style/documentation_method.rb#98 +# source://rubocop//lib/rubocop/cop/style/documentation_method.rb#109 class RuboCop::Cop::Style::DocumentationMethod < ::RuboCop::Cop::Base include ::RuboCop::Cop::DocumentationComment include ::RuboCop::Cop::VisibilityHelp include ::RuboCop::Cop::DefNode - # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#105 + # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#116 def modifier_node?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#109 + # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#120 def on_def(node); end - # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#109 + # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#120 def on_defs(node); end private - # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#119 + # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#146 + def allowed_methods; end + + # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#130 def check(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#126 + # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#142 + def method_allowed?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#138 def require_for_non_public_methods?; end end -# source://rubocop//lib/rubocop/cop/style/documentation_method.rb#102 +# source://rubocop//lib/rubocop/cop/style/documentation_method.rb#113 RuboCop::Cop::Style::DocumentationMethod::MSG = T.let(T.unsafe(nil), String) # Detects double disable comments on one line. This is mostly to catch @@ -37917,6 +38020,8 @@ RuboCop::Cop::Style::HashLikeCase::MSG = T.let(T.unsafe(nil), String) # * never - forces use of explicit hash literal value # * either - accepts both shorthand and explicit use of hash literal value # * consistent - forces use of the 3.1 syntax only if all values can be omitted in the hash +# * either_consistent - accepts both shorthand and explicit use of hash literal value, +# but they must be consistent # # @example EnforcedStyle: ruby19 (default) # # bad @@ -37990,85 +38095,101 @@ RuboCop::Cop::Style::HashLikeCase::MSG = T.let(T.unsafe(nil), String) # # # good - can't omit `baz` # {foo: foo, bar: baz} +# @example EnforcedShorthandSyntax: either_consistent +# +# # good - `foo` and `bar` values can be omitted, but they are consistent, so it's accepted +# {foo: foo, bar: bar} # -# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#113 +# # bad - `bar` value can be omitted +# {foo:, bar: bar} +# +# # bad - mixed syntaxes +# {foo:, bar: baz} +# +# # good +# {foo:, bar:} +# +# # good - can't omit `baz` +# {foo: foo, bar: baz} +# +# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#131 class RuboCop::Cop::Style::HashSyntax < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle include ::RuboCop::Cop::HashShorthandSyntax include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#167 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#185 def alternative_style; end - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#145 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#163 def hash_rockets_check(pairs); end - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#159 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#177 def no_mixed_keys_check(pairs); end - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#123 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#141 def on_hash(node); end - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#141 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#159 def ruby19_check(pairs); end - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#149 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#167 def ruby19_no_mixed_keys_check(pairs); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#199 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#217 def acceptable_19_syntax_symbol?(sym_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#256 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#274 def argument_without_space?(node); end - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#178 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#196 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#260 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#278 def autocorrect_hash_rockets(corrector, pair_node); end - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#269 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#287 def autocorrect_no_mixed_keys(corrector, pair_node); end - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#235 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#253 def autocorrect_ruby19(corrector, pair_node); end - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#220 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#238 def check(pairs, delim, msg); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#277 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#295 def force_hash_rockets?(pairs); end - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#248 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#266 def range_for_autocorrect_ruby19(pair_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#188 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#206 def sym_indices?(pairs); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#192 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#210 def word_symbol_pair?(pair); end end -# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#119 +# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#137 RuboCop::Cop::Style::HashSyntax::MSG_19 = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#121 +# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#139 RuboCop::Cop::Style::HashSyntax::MSG_HASH_ROCKETS = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#120 +# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#138 RuboCop::Cop::Style::HashSyntax::MSG_NO_MIXED_KEYS = T.let(T.unsafe(nil), String) # Looks for uses of `\_.each_with_object({}) {...}`, @@ -38713,7 +38834,7 @@ class RuboCop::Cop::Style::IfWithBooleanLiteralBranches < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#134 + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#136 def assume_boolean_value?(condition); end # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#114 @@ -38729,20 +38850,20 @@ class RuboCop::Cop::Style::IfWithBooleanLiteralBranches < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#151 + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#153 def opposite_condition?(node); end - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#141 + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#143 def replacement_condition(node, condition); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#156 + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#158 def require_parentheses?(condition); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#120 + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#122 def return_boolean_value?(condition); end end @@ -41830,7 +41951,7 @@ class RuboCop::Cop::Style::MutableConstant < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-sorbet/0.8.2/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#18 + # source://rubocop-sorbet/0.8.3/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#18 def on_assignment(value); end # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#127 @@ -41848,7 +41969,7 @@ class RuboCop::Cop::Style::MutableConstant < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#217 def splat_value(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet/0.8.2/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#12 + # source://rubocop-sorbet/0.8.3/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#12 def t_let(param0 = T.unsafe(nil)); end private @@ -43156,16 +43277,16 @@ class RuboCop::Cop::Style::NumericPredicate < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedPattern extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#166 + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#174 def comparison(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#171 + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#179 def inverted_comparison(param0 = T.unsafe(nil)); end # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#90 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#161 + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#169 def predicate(param0 = T.unsafe(nil)); end private @@ -43178,23 +43299,28 @@ class RuboCop::Cop::Style::NumericPredicate < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#111 def check(node); end - # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#152 + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#154 def invert; end - # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#132 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#162 + def negated?(node); end + + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#134 def parenthesized_source(node); end # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#124 - def replacement(numeric, operation); end + def replacement(node, numeric, operation); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#144 + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#146 def replacement_supported?(operator); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#140 + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#142 def require_parentheses?(node); end end @@ -45903,47 +46029,47 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base include ::RuboCop::Cop::MatchRange extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#78 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#79 def on_new_investigation; end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#182 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#183 def argument_is_method?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#146 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#147 def argument_newline?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#101 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#102 def ends_with_backslash_without_comment?(source_line); end - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#162 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#163 def find_node_for_line(line); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#131 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#132 def inside_string_literal?(range, token); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#109 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#110 def inside_string_literal_or_method_with_argument?(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#117 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#118 def leading_dot_method_chain_with_blank_line?(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#189 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#190 def method_call_with_arguments?(node); end # A method call without parentheses such as the following cannot remove `\`: @@ -45953,38 +46079,41 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#139 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#140 def method_with_argument?(current_token, next_token); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#123 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#124 def redundant_line_continuation?(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#93 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#94 def require_line_continuation?(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#168 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#169 def same_line?(node, line); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#193 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#194 def start_with_arithmetic_operator?(source_line); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#105 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#106 def string_concatenation?(source_line); end end # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#72 RuboCop::Cop::Style::RedundantLineContinuation::ALLOWED_STRING_TOKENS = T.let(T.unsafe(nil), Array) +# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#77 +RuboCop::Cop::Style::RedundantLineContinuation::ARGUMENT_TAKING_FLOW_TOKEN_TYPES = T.let(T.unsafe(nil), Array) + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#73 RuboCop::Cop::Style::RedundantLineContinuation::ARGUMENT_TYPES = T.let(T.unsafe(nil), Array) @@ -48326,6 +48455,69 @@ RuboCop::Cop::Style::Send::MSG = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/style/send.rb#18 RuboCop::Cop::Style::Send::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) +# Detects the use of the `public_send` method with a literal method name argument. +# Since the `send` method can be used to call private methods, by default, +# only the `public_send` method is detected. +# +# @example +# # bad +# obj.public_send(:method_name) +# obj.public_send('method_name') +# +# # good +# obj.method_name +# @example AllowSend: true (default) +# # good +# obj.send(:method_name) +# obj.send('method_name') +# obj.__send__(:method_name) +# obj.__send__('method_name') +# @example AllowSend: false +# # bad +# obj.send(:method_name) +# obj.send('method_name') +# obj.__send__(:method_name) +# obj.__send__('method_name') +# +# # good +# obj.method_name +# +# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#40 +class RuboCop::Cop::Style::SendWithLiteralMethodName < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#54 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#76 + def allow_send?; end + + # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#80 + def offense_range(node); end + + # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#84 + def removal_argument_range(first_argument, second_argument); end +end + +# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#46 +RuboCop::Cop::Style::SendWithLiteralMethodName::METHOD_NAME_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#43 +RuboCop::Cop::Style::SendWithLiteralMethodName::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#47 +RuboCop::Cop::Style::SendWithLiteralMethodName::RESERVED_WORDS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#44 +RuboCop::Cop::Style::SendWithLiteralMethodName::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#45 +RuboCop::Cop::Style::SendWithLiteralMethodName::STATIC_METHOD_NAME_NODE_TYPES = T.let(T.unsafe(nil), Array) + # Checks for uses of `fail` and `raise`. # # @example EnforcedStyle: only_raise (default) @@ -48935,13 +49127,30 @@ RuboCop::Cop::Style::SoleNestedConditional::MSG = T.let(T.unsafe(nil), String) # will add a require statement to the top of the file if # enabled by RequireEnglish config. # -# Like `use_perl_names` but allows builtin global vars. -# +# @example EnforcedStyle: use_english_names (default) # # good +# require 'English' # or this could be in another file. +# # puts $LOAD_PATH # puts $LOADED_FEATURES # puts $PROGRAM_NAME -# puts ARGV +# puts $ERROR_INFO +# puts $ERROR_POSITION +# puts $FIELD_SEPARATOR # or $FS +# puts $OUTPUT_FIELD_SEPARATOR # or $OFS +# puts $INPUT_RECORD_SEPARATOR # or $RS +# puts $OUTPUT_RECORD_SEPARATOR # or $ORS +# puts $INPUT_LINE_NUMBER # or $NR +# puts $LAST_READ_LINE +# puts $DEFAULT_OUTPUT +# puts $DEFAULT_INPUT +# puts $PROCESS_ID # or $PID +# puts $CHILD_STATUS +# puts $LAST_MATCH_INFO +# puts $IGNORECASE +# puts $ARGV # or ARGV +# @example EnforcedStyle: use_perl_names +# # good # puts $: # puts $" # puts $0 @@ -48960,31 +49169,14 @@ RuboCop::Cop::Style::SoleNestedConditional::MSG = T.let(T.unsafe(nil), String) # puts $~ # puts $= # puts $* +# @example EnforcedStyle: use_builtin_english_names # -# @example EnforcedStyle: use_english_names (default) # # good -# require 'English' # or this could be in another file. -# +# # Like `use_perl_names` but allows builtin global vars. # puts $LOAD_PATH # puts $LOADED_FEATURES # puts $PROGRAM_NAME -# puts $ERROR_INFO -# puts $ERROR_POSITION -# puts $FIELD_SEPARATOR # or $FS -# puts $OUTPUT_FIELD_SEPARATOR # or $OFS -# puts $INPUT_RECORD_SEPARATOR # or $RS -# puts $OUTPUT_RECORD_SEPARATOR # or $ORS -# puts $INPUT_LINE_NUMBER # or $NR -# puts $LAST_READ_LINE -# puts $DEFAULT_OUTPUT -# puts $DEFAULT_INPUT -# puts $PROCESS_ID # or $PID -# puts $CHILD_STATUS -# puts $LAST_MATCH_INFO -# puts $IGNORECASE -# puts $ARGV # or ARGV -# @example EnforcedStyle: use_perl_names -# # good +# puts ARGV # puts $: # puts $" # puts $0 @@ -49003,90 +49195,89 @@ RuboCop::Cop::Style::SoleNestedConditional::MSG = T.let(T.unsafe(nil), String) # puts $~ # puts $= # puts $* -# @example EnforcedStyle: use_builtin_english_names # -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#87 +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#86 class RuboCop::Cop::Style::SpecialGlobalVars < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::RequireLibrary extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#176 + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#175 def autocorrect(corrector, node, global_var); end - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#168 + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#167 def message(global_var); end - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#152 + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#151 def on_gvar(node); end - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#147 + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#146 def on_new_investigation; end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#247 + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#246 def add_require_english?; end - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#241 + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#240 def english_name_replacement(preferred_name, node); end - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#190 + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#189 def format_english_message(global_var); end # For now, we assume that lists are 2 items or less. Easy grammar! # - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#212 + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#211 def format_list(items); end - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#198 + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#197 def format_message(english, regular, global); end - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#235 + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#234 def matching_styles(global); end - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#227 + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#226 def preferred_names(global); end - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#216 + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#215 def replacement(node, global_var); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#251 + # source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#250 def should_require_english?(global_var); end end -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#128 +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#127 RuboCop::Cop::Style::SpecialGlobalVars::BUILTIN_VARS = T.let(T.unsafe(nil), Hash) -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#100 +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#99 RuboCop::Cop::Style::SpecialGlobalVars::ENGLISH_VARS = T.let(T.unsafe(nil), Hash) -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#145 +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#144 RuboCop::Cop::Style::SpecialGlobalVars::LIBRARY_NAME = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#93 +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#92 RuboCop::Cop::Style::SpecialGlobalVars::MSG_BOTH = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#96 +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#95 RuboCop::Cop::Style::SpecialGlobalVars::MSG_ENGLISH = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#98 +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#97 RuboCop::Cop::Style::SpecialGlobalVars::MSG_REGULAR = T.let(T.unsafe(nil), String) # Anything *not* in this set is provided by the English library. # -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#122 +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#121 RuboCop::Cop::Style::SpecialGlobalVars::NON_ENGLISH_VARS = T.let(T.unsafe(nil), Set) -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#124 +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#123 RuboCop::Cop::Style::SpecialGlobalVars::PERL_VARS = T.let(T.unsafe(nil), Hash) -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#139 +# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#138 RuboCop::Cop::Style::SpecialGlobalVars::STYLE_VARS_MAP = T.let(T.unsafe(nil), Hash) # Check for parentheses around stabby lambda arguments. @@ -49688,6 +49879,106 @@ end # source://rubocop//lib/rubocop/cop/style/struct_inheritance.rb#30 RuboCop::Cop::Style::StructInheritance::MSG = T.let(T.unsafe(nil), String) +# Checks for redundant argument forwarding when calling super +# with arguments identical to the method definition. +# +# @example +# # bad +# def method(*args, **kwargs) +# super(*args, **kwargs) +# end +# +# # good - implicitly passing all arguments +# def method(*args, **kwargs) +# super +# end +# +# # good - forwarding a subset of the arguments +# def method(*args, **kwargs) +# super(*args) +# end +# +# # good - forwarding no arguments +# def method(*args, **kwargs) +# super() +# end +# +# # good - assigning to the block variable before calling super +# def method(&block) +# # Assigning to the block variable would pass the old value to super, +# # under this circumstance the block must be referenced explicitly. +# block ||= proc { 'fallback behavior' } +# super(&block) +# end +# +# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#37 +class RuboCop::Cop::Style::SuperArguments < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#45 + def on_super(super_node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#62 + def arguments_identical?(def_node, def_args, super_args); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#117 + def block_arg_same?(def_node, def_arg, super_arg); end + + # Reassigning the block argument will still pass along the original block to super + # https://bugs.ruby-lang.org/issues/20505 + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#128 + def block_reassigned?(def_node, block_arg_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#138 + def define_method?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#134 + def forward_arg_same?(def_arg, super_arg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#97 + def keyword_arg_same?(def_arg, super_arg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#107 + def keyword_rest_arg_same?(def_arg, super_arg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#80 + def positional_arg_same?(def_arg, super_arg); end + + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#87 + def positional_rest_arg_same(def_arg, super_arg); end + + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#144 + def preprocess_super_args(super_args); end +end + +# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#41 +RuboCop::Cop::Style::SuperArguments::ASSIGN_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#40 +RuboCop::Cop::Style::SuperArguments::DEF_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#43 +RuboCop::Cop::Style::SuperArguments::MSG = T.let(T.unsafe(nil), String) + # Enforces the presence of parentheses in `super` containing arguments. # # `super` is a keyword and is provided as a distinct cop from those designed for method call. @@ -49950,8 +50241,23 @@ RuboCop::Cop::Style::SymbolLiteral::MSG = T.let(T.unsafe(nil), String) # @example AllowedPatterns: ['map'] (default) # # good # something.map { |s| s.upcase } +# @example AllCops:ActiveSupportExtensionsEnabled: false (default) +# # bad +# ->(x) { x.foo } +# proc { |x| x.foo } +# Proc.new { |x| x.foo } +# +# # good +# lambda(&:foo) +# proc(&:foo) +# Proc.new(&:foo) +# @example AllCops:ActiveSupportExtensionsEnabled: true +# # good +# ->(x) { x.foo } +# proc { |x| x.foo } +# Proc.new { |x| x.foo } # -# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#123 +# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#140 class RuboCop::Cop::Style::SymbolProc < ::RuboCop::Cop::Base include ::RuboCop::Cop::CommentsHelp include ::RuboCop::Cop::RangeHelp @@ -49961,81 +50267,87 @@ class RuboCop::Cop::Style::SymbolProc < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#172 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#189 def destructuring_block_argument?(argument_node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#152 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#170 def on_block(node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#152 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#170 def on_numblock(node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#134 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#152 def proc_node?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#140 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#158 def symbol_proc?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#137 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#155 def symbol_proc_receiver?(param0 = T.unsafe(nil)); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#240 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#267 def allow_comments?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#236 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#263 def allow_if_method_has_argument?(send_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#187 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#204 def allowed_method_name?(name); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#200 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#217 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#212 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#240 + def autocorrect_lambda_block(corrector, node); end + + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#231 def autocorrect_with_args(corrector, node, args, method_name); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#208 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#225 def autocorrect_without_args(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#226 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#253 def begin_pos_for_replacement(node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#221 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#248 def block_range_with_space(node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#191 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#208 def register_offense(node, method_name, block_method_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#183 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#200 def unsafe_array_usage?(node); end # See: https://github.com/rubocop/rubocop/issues/10864 # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#179 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#196 def unsafe_hash_usage?(node); end class << self - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#147 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#165 def autocorrect_incompatible_with; end end end -# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#130 +# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#149 +RuboCop::Cop::Style::SymbolProc::LAMBDA_OR_PROC = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#147 RuboCop::Cop::Style::SymbolProc::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#131 +# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#148 RuboCop::Cop::Style::SymbolProc::SUPER_TYPES = T.let(T.unsafe(nil), Array) # Corrector to correct conditional assignment in ternary conditions. @@ -52030,10 +52342,10 @@ class RuboCop::Cop::Team # source://rubocop//lib/rubocop/cop/team.rb#207 def each_corrector(report); end - # source://rubocop//lib/rubocop/cop/team.rb#257 + # source://rubocop//lib/rubocop/cop/team.rb#259 def handle_error(error, location, cop); end - # source://rubocop//lib/rubocop/cop/team.rb#249 + # source://rubocop//lib/rubocop/cop/team.rb#251 def handle_warning(error, location); end # @return [Commissioner::InvestigationReport] @@ -54673,16 +54985,16 @@ class RuboCop::Formatter::DisabledConfigFormatter < ::RuboCop::Formatter::BaseFo # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#73 def command; end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#161 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#165 def cop_config_params(default_cfg, cfg); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#181 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#185 def default_config(cop_name); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#225 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#229 def excludes(offending_files, cop_name, parent); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#196 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#200 def filtered_config(cfg); end # Returns true if the given arr include the given elm or if any of the @@ -54690,38 +55002,38 @@ class RuboCop::Formatter::DisabledConfigFormatter < ::RuboCop::Formatter::BaseFo # # @return [Boolean] # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#273 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#277 def include_or_match?(arr, elm); end # @return [Boolean] # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#246 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#250 def merge_mode_for_exclude?(cfg); end # @return [Boolean] # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#267 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#271 def no_exclude_limit?; end # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#102 def output_cop(cop_name, offense_count); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#133 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#137 def output_cop_comments(output_buffer, cfg, cop_name, offense_count); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#185 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#189 def output_cop_config(output_buffer, cfg, cop_name); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#168 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#172 def output_cop_param_comments(output_buffer, params, default_cfg); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#215 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#219 def output_exclude_list(output_buffer, offending_files, cop_name); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#250 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#254 def output_exclude_path(output_buffer, exclude_path, parent); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#204 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#208 def output_offending_files(output_buffer, cfg, cop_name); end # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#96 @@ -54729,12 +55041,17 @@ class RuboCop::Formatter::DisabledConfigFormatter < ::RuboCop::Formatter::BaseFo # @return [Boolean] # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#263 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#267 def safe_autocorrect?(config); end # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#116 def set_max(cfg, cop_name); end + # @return [Boolean] + # + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#125 + def should_set_max?(cop_name); end + # @return [Boolean] # # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#65 @@ -54747,12 +55064,12 @@ class RuboCop::Formatter::DisabledConfigFormatter < ::RuboCop::Formatter::BaseFo # @return [Boolean] # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#153 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#157 def supports_safe_autocorrect?(cop_class, default_cfg); end # @return [Boolean] # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#157 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#161 def supports_unsafe_autocorrect?(cop_class, default_cfg); end # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#92 @@ -54825,43 +55142,46 @@ end class RuboCop::Formatter::FormatterSet < ::Array # @return [FormatterSet] a new instance of FormatterSet # - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#39 + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#40 def initialize(options = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#55 + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#56 def add_formatter(formatter_type, output_path = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#67 + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#68 def close_output_files; end - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#50 + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#51 def file_finished(file, offenses); end - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#44 + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#45 def file_started(file, options); end - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#34 + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#35 def finished(*args); end - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#34 + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#35 def started(*args); end private - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#86 + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#87 def builtin_formatter_class(specified_key); end - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#99 + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#105 def custom_formatter_class(specified_class_name); end - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#75 + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#76 def formatter_class(formatter_type); end end # source://rubocop//lib/rubocop/formatter/formatter_set.rb#11 RuboCop::Formatter::FormatterSet::BUILTIN_FORMATTERS_FOR_KEYS = T.let(T.unsafe(nil), Hash) -# source://rubocop//lib/rubocop/formatter/formatter_set.rb#31 +# source://rubocop//lib/rubocop/formatter/formatter_set.rb#30 +RuboCop::Formatter::FormatterSet::BUILTIN_FORMATTER_NAMES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/formatter/formatter_set.rb#32 RuboCop::Formatter::FormatterSet::FORMATTER_APIS = T.let(T.unsafe(nil), Array) # This formatter displays a progress bar and shows details of offenses as @@ -55622,7 +55942,7 @@ module RuboCop::LSP # @return [void] # # source://rubocop//lib/rubocop/lsp.rb#25 - def disable; end + def disable(&block); end # Enable LSP. # @@ -55644,7 +55964,7 @@ module RuboCop::LSP # @return [void] # # source://rubocop//lib/rubocop/lsp.rb#25 - def disable; end + def disable(&block); end # Enable LSP. # @@ -55696,52 +56016,52 @@ class RuboCop::LSP::Routes # source://rubocop//lib/rubocop/lsp/routes.rb#38 def handle_initialize(request); end - # source://rubocop//lib/rubocop/lsp/routes.rb#61 + # source://rubocop//lib/rubocop/lsp/routes.rb#57 def handle_initialized(_request); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#168 + # source://rubocop//lib/rubocop/lsp/routes.rb#167 def handle_method_missing(request); end - # source://rubocop//lib/rubocop/lsp/routes.rb#67 + # source://rubocop//lib/rubocop/lsp/routes.rb#64 def handle_shutdown(request); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#157 + # source://rubocop//lib/rubocop/lsp/routes.rb#156 def handle_unsupported_method(request, method = T.unsafe(nil)); end private # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#206 + # source://rubocop//lib/rubocop/lsp/routes.rb#205 def diagnostic(file_uri, text); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#176 + # source://rubocop//lib/rubocop/lsp/routes.rb#175 def extract_initialization_options_from(request); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#186 + # source://rubocop//lib/rubocop/lsp/routes.rb#185 def format_file(file_uri, command: T.unsafe(nil)); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#220 + # source://rubocop//lib/rubocop/lsp/routes.rb#219 def remove_file_protocol_from(uri); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#224 + # source://rubocop//lib/rubocop/lsp/routes.rb#223 def to_diagnostic(offense); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#236 + # source://rubocop//lib/rubocop/lsp/routes.rb#235 def to_range(location); end class << self diff --git a/sorbet/rbi/gems/strscan@3.1.0.rbi b/sorbet/rbi/gems/strscan@3.1.0.rbi new file mode 100644 index 000000000..e74659c96 --- /dev/null +++ b/sorbet/rbi/gems/strscan@3.1.0.rbi @@ -0,0 +1,8 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `strscan` gem. +# Please instead update this file by running `bin/tapioca gem strscan`. + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/test/expectations/code_action_resolve/call_chained.exp.json b/test/expectations/code_action_resolve/call_chained.exp.json index f05bfbab6..9a061639d 100644 --- a/test/expectations/code_action_resolve/call_chained.exp.json +++ b/test/expectations/code_action_resolve/call_chained.exp.json @@ -1,6 +1,7 @@ { "params": { "kind": "refactor.extract", + "title": "Refactor: Extract Variable", "data": { "range": { "start": { diff --git a/test/expectations/code_action_resolve/call_nested_multiline_args.exp.json b/test/expectations/code_action_resolve/call_nested_multiline_args.exp.json index 837e39e3f..430a84dd5 100644 --- a/test/expectations/code_action_resolve/call_nested_multiline_args.exp.json +++ b/test/expectations/code_action_resolve/call_nested_multiline_args.exp.json @@ -1,6 +1,7 @@ { "params": { "kind": "refactor.extract", + "title": "Refactor: Extract Variable", "data": { "range": { "start": { diff --git a/test/expectations/code_action_resolve/def_extract_variable.exp.json b/test/expectations/code_action_resolve/def_extract_variable.exp.json index 7272726b1..594179d68 100644 --- a/test/expectations/code_action_resolve/def_extract_variable.exp.json +++ b/test/expectations/code_action_resolve/def_extract_variable.exp.json @@ -1,6 +1,7 @@ { "params": { "kind": "refactor.extract", + "title": "Refactor: Extract Variable", "data": { "range": { "start": { diff --git a/test/expectations/code_action_resolve/def_multiline_params.exp.json b/test/expectations/code_action_resolve/def_multiline_params.exp.json index fcbec6bf9..19ba27796 100644 --- a/test/expectations/code_action_resolve/def_multiline_params.exp.json +++ b/test/expectations/code_action_resolve/def_multiline_params.exp.json @@ -1,6 +1,7 @@ { "params": { "kind": "refactor.extract", + "title": "Refactor: Extract Variable", "data": { "range": { "start": { diff --git a/test/expectations/code_action_resolve/extract_method.exp.json b/test/expectations/code_action_resolve/extract_method.exp.json new file mode 100644 index 000000000..20a48b240 --- /dev/null +++ b/test/expectations/code_action_resolve/extract_method.exp.json @@ -0,0 +1,60 @@ +{ + "params": { + "kind": "refactor.extract", + "title": "Refactor: Extract Method", + "data": { + "range": { + "start": { + "line": 2, + "character": 0 + }, + "end": { + "line": 2, + "character": 15 + } + }, + "uri": "file:///fake" + } + }, + "result": { + "title": "Refactor: Extract Method", + "edit": { + "documentChanges": [ + { + "textDocument": { + "uri": "file:///fake", + "version": null + }, + "edits": [ + { + "range": { + "start": { + "line": 3, + "character": 5 + }, + "end": { + "line": 3, + "character": 5 + } + }, + "newText": "\n\n def new_method\n answer = 42\n end" + }, + { + "range": { + "start": { + "line": 2, + "character": 0 + }, + "end": { + "line": 2, + "character": 15 + } + }, + "newText": "new_method" + } + ] + } + ] + } + } +} diff --git a/test/expectations/code_action_resolve/extract_variable_first_statement.exp.json b/test/expectations/code_action_resolve/extract_variable_first_statement.exp.json index e26437094..7056aa8b1 100644 --- a/test/expectations/code_action_resolve/extract_variable_first_statement.exp.json +++ b/test/expectations/code_action_resolve/extract_variable_first_statement.exp.json @@ -1,6 +1,7 @@ { "params": { "kind": "refactor.extract", + "title": "Refactor: Extract Variable", "data": { "range": { "start": { diff --git a/test/expectations/code_action_resolve/extraction_with_empty_line_between.exp.json b/test/expectations/code_action_resolve/extraction_with_empty_line_between.exp.json index 9c146b1d9..a7264c3d3 100644 --- a/test/expectations/code_action_resolve/extraction_with_empty_line_between.exp.json +++ b/test/expectations/code_action_resolve/extraction_with_empty_line_between.exp.json @@ -1,6 +1,7 @@ { "params": { "kind": "refactor.extract", + "title": "Refactor: Extract Variable", "data": { "range": { "start": { diff --git a/test/expectations/code_action_resolve/oneline_block_extraction.exp.json b/test/expectations/code_action_resolve/oneline_block_extraction.exp.json index 951eb699a..cb1867cb3 100644 --- a/test/expectations/code_action_resolve/oneline_block_extraction.exp.json +++ b/test/expectations/code_action_resolve/oneline_block_extraction.exp.json @@ -1,6 +1,7 @@ { "params": { "kind": "refactor.extract", + "title": "Refactor: Extract Variable", "data": { "range": { "start": { diff --git a/test/expectations/code_action_resolve/variable_extract.exp.json b/test/expectations/code_action_resolve/variable_extract.exp.json index 82861f867..010edc57e 100644 --- a/test/expectations/code_action_resolve/variable_extract.exp.json +++ b/test/expectations/code_action_resolve/variable_extract.exp.json @@ -1,6 +1,7 @@ { "params": { "kind": "refactor.extract", + "title": "Refactor: Extract Variable", "data": { "range": { "start": { diff --git a/test/expectations/code_actions/aref_field.exp.json b/test/expectations/code_actions/aref_field.exp.json index 0e0c0ef3b..77e89b68f 100644 --- a/test/expectations/code_actions/aref_field.exp.json +++ b/test/expectations/code_actions/aref_field.exp.json @@ -35,6 +35,23 @@ }, "uri": "file:///fake" } + }, + { + "title": "Refactor: Extract Method", + "kind": "refactor.extract", + "data": { + "range": { + "start": { + "line": 2, + "character": 9 + }, + "end": { + "line": 2, + "character": 13 + } + }, + "uri": "file:///fake" + } } ] } diff --git a/test/expectations/code_lens/minitest_nested_classes_and_modules.exp.json b/test/expectations/code_lens/minitest_nested_classes_and_modules.exp.json index e97136bca..2714b2d8e 100644 --- a/test/expectations/code_lens/minitest_nested_classes_and_modules.exp.json +++ b/test/expectations/code_lens/minitest_nested_classes_and_modules.exp.json @@ -116,7 +116,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "test_foo", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::FooTest\\#test_foo", + "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::FooTest#test_foo", { "start_line": 2, "start_column": 4, @@ -148,7 +148,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "test_foo", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::FooTest\\#test_foo", + "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::FooTest#test_foo", { "start_line": 2, "start_column": 4, @@ -180,7 +180,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "test_foo", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::FooTest\\#test_foo", + "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::FooTest#test_foo", { "start_line": 2, "start_column": 4, @@ -212,7 +212,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "test_foo_2", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::FooTest\\#test_foo_2", + "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::FooTest#test_foo_2", { "start_line": 4, "start_column": 4, @@ -244,7 +244,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "test_foo_2", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::FooTest\\#test_foo_2", + "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::FooTest#test_foo_2", { "start_line": 4, "start_column": 4, @@ -276,7 +276,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "test_foo_2", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::FooTest\\#test_foo_2", + "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::FooTest#test_foo_2", { "start_line": 4, "start_column": 4, @@ -407,7 +407,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "test_bar", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::BarTest\\#test_bar", + "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::BarTest#test_bar", { "start_line": 9, "start_column": 6, @@ -439,7 +439,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "test_bar", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::BarTest\\#test_bar", + "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::BarTest#test_bar", { "start_line": 9, "start_column": 6, @@ -471,7 +471,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "test_bar", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::BarTest\\#test_bar", + "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::BarTest#test_bar", { "start_line": 9, "start_column": 6, @@ -602,7 +602,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "test_baz", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::BarTest::Baz::BazTest\\#test_baz", + "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::BarTest::Baz::BazTest#test_baz", { "start_line": 13, "start_column": 10, @@ -634,7 +634,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "test_baz", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::BarTest::Baz::BazTest\\#test_baz", + "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::BarTest::Baz::BazTest#test_baz", { "start_line": 13, "start_column": 10, @@ -666,7 +666,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "test_baz", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::BarTest::Baz::BazTest\\#test_baz", + "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::BarTest::Baz::BazTest#test_baz", { "start_line": 13, "start_column": 10, @@ -698,7 +698,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "test_baz_2", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::BarTest::Baz::BazTest\\#test_baz_2", + "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::BarTest::Baz::BazTest#test_baz_2", { "start_line": 15, "start_column": 10, @@ -730,7 +730,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "test_baz_2", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::BarTest::Baz::BazTest\\#test_baz_2", + "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::BarTest::Baz::BazTest#test_baz_2", { "start_line": 15, "start_column": 10, @@ -762,7 +762,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "test_baz_2", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::BarTest::Baz::BazTest\\#test_baz_2", + "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::BarTest::Baz::BazTest#test_baz_2", { "start_line": 15, "start_column": 10, @@ -893,7 +893,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "test_baz", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Baz::BazTest\\#test_baz", + "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Baz::BazTest#test_baz", { "start_line": 23, "start_column": 6, @@ -925,7 +925,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "test_baz", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Baz::BazTest\\#test_baz", + "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Baz::BazTest#test_baz", { "start_line": 23, "start_column": 6, @@ -957,7 +957,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "test_baz", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Baz::BazTest\\#test_baz", + "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Baz::BazTest#test_baz", { "start_line": 23, "start_column": 6, @@ -1088,7 +1088,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "test_foo_bar", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::FooBarTest\\#test_foo_bar", + "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::FooBarTest#test_foo_bar", { "start_line": 30, "start_column": 4, @@ -1120,7 +1120,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "test_foo_bar", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::FooBarTest\\#test_foo_bar", + "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::FooBarTest#test_foo_bar", { "start_line": 30, "start_column": 4, @@ -1152,7 +1152,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "test_foo_bar", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::FooBarTest\\#test_foo_bar", + "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::FooBarTest#test_foo_bar", { "start_line": 30, "start_column": 4, @@ -1184,7 +1184,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "test_foo_bar_2", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::FooBarTest\\#test_foo_bar_2", + "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::FooBarTest#test_foo_bar_2", { "start_line": 32, "start_column": 4, @@ -1216,7 +1216,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "test_foo_bar_2", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::FooBarTest\\#test_foo_bar_2", + "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::FooBarTest#test_foo_bar_2", { "start_line": 32, "start_column": 4, @@ -1248,7 +1248,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "test_foo_bar_2", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::FooBarTest\\#test_foo_bar_2", + "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::FooBarTest#test_foo_bar_2", { "start_line": 32, "start_column": 4, @@ -1379,7 +1379,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "test_foo_bar_baz", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::FooBar::Test\\#test_foo_bar_baz", + "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::FooBar::Test#test_foo_bar_baz", { "start_line": 39, "start_column": 4, @@ -1411,7 +1411,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "test_foo_bar_baz", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::FooBar::Test\\#test_foo_bar_baz", + "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::FooBar::Test#test_foo_bar_baz", { "start_line": 39, "start_column": 4, @@ -1443,7 +1443,7 @@ "arguments": [ "/fixtures/minitest_nested_classes_and_modules.rb", "test_foo_bar_baz", - "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::FooBar::Test\\#test_foo_bar_baz", + "bundle exec ruby -Itest /fixtures/minitest_nested_classes_and_modules.rb --name Foo::Bar::FooBar::Test#test_foo_bar_baz", { "start_line": 39, "start_column": 4, @@ -1459,7 +1459,5 @@ } } ], - "params": [ - - ] + "params": [] } diff --git a/test/expectations/code_lens/minitest_tests.exp.json b/test/expectations/code_lens/minitest_tests.exp.json index 5922eca1b..cf2d7e76a 100644 --- a/test/expectations/code_lens/minitest_tests.exp.json +++ b/test/expectations/code_lens/minitest_tests.exp.json @@ -116,7 +116,7 @@ "arguments": [ "/fixtures/minitest_tests.rb", "test_public", - "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name Test\\#test_public", + "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name Test#test_public", { "start_line": 5, "start_column": 2, @@ -148,7 +148,7 @@ "arguments": [ "/fixtures/minitest_tests.rb", "test_public", - "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name Test\\#test_public", + "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name Test#test_public", { "start_line": 5, "start_column": 2, @@ -180,7 +180,7 @@ "arguments": [ "/fixtures/minitest_tests.rb", "test_public", - "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name Test\\#test_public", + "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name Test#test_public", { "start_line": 5, "start_column": 2, @@ -212,7 +212,7 @@ "arguments": [ "/fixtures/minitest_tests.rb", "test_public_command", - "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name Test\\#test_public_command", + "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name Test#test_public_command", { "start_line": 9, "start_column": 9, @@ -244,7 +244,7 @@ "arguments": [ "/fixtures/minitest_tests.rb", "test_public_command", - "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name Test\\#test_public_command", + "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name Test#test_public_command", { "start_line": 9, "start_column": 9, @@ -276,7 +276,7 @@ "arguments": [ "/fixtures/minitest_tests.rb", "test_public_command", - "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name Test\\#test_public_command", + "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name Test#test_public_command", { "start_line": 9, "start_column": 9, @@ -308,7 +308,7 @@ "arguments": [ "/fixtures/minitest_tests.rb", "test_another_public", - "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name Test\\#test_another_public", + "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name Test#test_another_public", { "start_line": 11, "start_column": 9, @@ -340,7 +340,7 @@ "arguments": [ "/fixtures/minitest_tests.rb", "test_another_public", - "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name Test\\#test_another_public", + "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name Test#test_another_public", { "start_line": 11, "start_column": 9, @@ -372,7 +372,7 @@ "arguments": [ "/fixtures/minitest_tests.rb", "test_another_public", - "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name Test\\#test_another_public", + "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name Test#test_another_public", { "start_line": 11, "start_column": 9, @@ -404,7 +404,7 @@ "arguments": [ "/fixtures/minitest_tests.rb", "test_public_vcall", - "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name Test\\#test_public_vcall", + "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name Test#test_public_vcall", { "start_line": 17, "start_column": 2, @@ -436,7 +436,7 @@ "arguments": [ "/fixtures/minitest_tests.rb", "test_public_vcall", - "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name Test\\#test_public_vcall", + "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name Test#test_public_vcall", { "start_line": 17, "start_column": 2, @@ -468,7 +468,7 @@ "arguments": [ "/fixtures/minitest_tests.rb", "test_public_vcall", - "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name Test\\#test_public_vcall", + "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name Test#test_public_vcall", { "start_line": 17, "start_column": 2, @@ -500,7 +500,7 @@ "arguments": [ "/fixtures/minitest_tests.rb", "test_with_q?", - "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name Test\\#test_with_q\\?", + "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name Test#test_with_q\\?", { "start_line": 19, "start_column": 2, @@ -532,7 +532,7 @@ "arguments": [ "/fixtures/minitest_tests.rb", "test_with_q?", - "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name Test\\#test_with_q\\?", + "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name Test#test_with_q\\?", { "start_line": 19, "start_column": 2, @@ -564,7 +564,7 @@ "arguments": [ "/fixtures/minitest_tests.rb", "test_with_q?", - "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name Test\\#test_with_q\\?", + "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name Test#test_with_q\\?", { "start_line": 19, "start_column": 2, @@ -695,7 +695,7 @@ "arguments": [ "/fixtures/minitest_tests.rb", "test_public", - "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name AnotherTest\\#test_public", + "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name AnotherTest#test_public", { "start_line": 25, "start_column": 2, @@ -727,7 +727,7 @@ "arguments": [ "/fixtures/minitest_tests.rb", "test_public", - "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name AnotherTest\\#test_public", + "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name AnotherTest#test_public", { "start_line": 25, "start_column": 2, @@ -759,7 +759,7 @@ "arguments": [ "/fixtures/minitest_tests.rb", "test_public", - "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name AnotherTest\\#test_public", + "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name AnotherTest#test_public", { "start_line": 25, "start_column": 2, @@ -791,7 +791,7 @@ "arguments": [ "/fixtures/minitest_tests.rb", "test_public_2", - "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name AnotherTest\\#test_public_2", + "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name AnotherTest#test_public_2", { "start_line": 31, "start_column": 2, @@ -823,7 +823,7 @@ "arguments": [ "/fixtures/minitest_tests.rb", "test_public_2", - "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name AnotherTest\\#test_public_2", + "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name AnotherTest#test_public_2", { "start_line": 31, "start_column": 2, @@ -855,7 +855,7 @@ "arguments": [ "/fixtures/minitest_tests.rb", "test_public_2", - "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name AnotherTest\\#test_public_2", + "bundle exec ruby -Itest /fixtures/minitest_tests.rb --name AnotherTest#test_public_2", { "start_line": 31, "start_column": 2, @@ -871,7 +871,5 @@ } } ], - "params": [ - - ] + "params": [] } diff --git a/test/expectations/code_lens/minitest_with_dynamic_constant_path.exp.json b/test/expectations/code_lens/minitest_with_dynamic_constant_path.exp.json index 05e3856d8..41d85ac1b 100644 --- a/test/expectations/code_lens/minitest_with_dynamic_constant_path.exp.json +++ b/test/expectations/code_lens/minitest_with_dynamic_constant_path.exp.json @@ -116,7 +116,7 @@ "arguments": [ "/fixtures/minitest_with_dynamic_constant_path.rb", "test_something", - "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name /::Test\\#test_something$/", + "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name /::Test#test_something$/", { "start_line": 10, "start_column": 4, @@ -148,7 +148,7 @@ "arguments": [ "/fixtures/minitest_with_dynamic_constant_path.rb", "test_something", - "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name /::Test\\#test_something$/", + "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name /::Test#test_something$/", { "start_line": 10, "start_column": 4, @@ -180,7 +180,7 @@ "arguments": [ "/fixtures/minitest_with_dynamic_constant_path.rb", "test_something", - "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name /::Test\\#test_something$/", + "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name /::Test#test_something$/", { "start_line": 10, "start_column": 4, @@ -212,7 +212,7 @@ "arguments": [ "/fixtures/minitest_with_dynamic_constant_path.rb", "test_something_else", - "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name /::Test\\#test_something_else$/", + "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name /::Test#test_something_else$/", { "start_line": 12, "start_column": 4, @@ -244,7 +244,7 @@ "arguments": [ "/fixtures/minitest_with_dynamic_constant_path.rb", "test_something_else", - "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name /::Test\\#test_something_else$/", + "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name /::Test#test_something_else$/", { "start_line": 12, "start_column": 4, @@ -276,7 +276,7 @@ "arguments": [ "/fixtures/minitest_with_dynamic_constant_path.rb", "test_something_else", - "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name /::Test\\#test_something_else$/", + "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name /::Test#test_something_else$/", { "start_line": 12, "start_column": 4, @@ -407,7 +407,7 @@ "arguments": [ "/fixtures/minitest_with_dynamic_constant_path.rb", "test_nested", - "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name /::Test::NestedTest\\#test_nested$/", + "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name /::Test::NestedTest#test_nested$/", { "start_line": 15, "start_column": 6, @@ -439,7 +439,7 @@ "arguments": [ "/fixtures/minitest_with_dynamic_constant_path.rb", "test_nested", - "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name /::Test::NestedTest\\#test_nested$/", + "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name /::Test::NestedTest#test_nested$/", { "start_line": 15, "start_column": 6, @@ -471,7 +471,7 @@ "arguments": [ "/fixtures/minitest_with_dynamic_constant_path.rb", "test_nested", - "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name /::Test::NestedTest\\#test_nested$/", + "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name /::Test::NestedTest#test_nested$/", { "start_line": 15, "start_column": 6, @@ -602,7 +602,7 @@ "arguments": [ "/fixtures/minitest_with_dynamic_constant_path.rb", "test_stuff", - "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name /::SomeOtherTest\\#test_stuff$/", + "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name /::SomeOtherTest#test_stuff$/", { "start_line": 20, "start_column": 4, @@ -634,7 +634,7 @@ "arguments": [ "/fixtures/minitest_with_dynamic_constant_path.rb", "test_stuff", - "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name /::SomeOtherTest\\#test_stuff$/", + "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name /::SomeOtherTest#test_stuff$/", { "start_line": 20, "start_column": 4, @@ -666,7 +666,7 @@ "arguments": [ "/fixtures/minitest_with_dynamic_constant_path.rb", "test_stuff", - "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name /::SomeOtherTest\\#test_stuff$/", + "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name /::SomeOtherTest#test_stuff$/", { "start_line": 20, "start_column": 4, @@ -698,7 +698,7 @@ "arguments": [ "/fixtures/minitest_with_dynamic_constant_path.rb", "test_other_stuff", - "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name /::SomeOtherTest\\#test_other_stuff$/", + "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name /::SomeOtherTest#test_other_stuff$/", { "start_line": 22, "start_column": 4, @@ -730,7 +730,7 @@ "arguments": [ "/fixtures/minitest_with_dynamic_constant_path.rb", "test_other_stuff", - "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name /::SomeOtherTest\\#test_other_stuff$/", + "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name /::SomeOtherTest#test_other_stuff$/", { "start_line": 22, "start_column": 4, @@ -762,7 +762,7 @@ "arguments": [ "/fixtures/minitest_with_dynamic_constant_path.rb", "test_other_stuff", - "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name /::SomeOtherTest\\#test_other_stuff$/", + "bundle exec ruby -Itest /fixtures/minitest_with_dynamic_constant_path.rb --name /::SomeOtherTest#test_other_stuff$/", { "start_line": 22, "start_column": 4, @@ -778,7 +778,5 @@ } } ], - "params": [ - - ] + "params": [] } diff --git a/test/expectations/code_lens/nested_minitest_tests.exp.json b/test/expectations/code_lens/nested_minitest_tests.exp.json index 0bd0a4ba7..00d7b1cc9 100644 --- a/test/expectations/code_lens/nested_minitest_tests.exp.json +++ b/test/expectations/code_lens/nested_minitest_tests.exp.json @@ -116,7 +116,7 @@ "arguments": [ "/fixtures/nested_minitest_tests.rb", "test_public", - "bundle exec ruby -Itest /fixtures/nested_minitest_tests.rb --name ParentTest\\#test_public", + "bundle exec ruby -Itest /fixtures/nested_minitest_tests.rb --name ParentTest#test_public", { "start_line": 1, "start_column": 2, @@ -148,7 +148,7 @@ "arguments": [ "/fixtures/nested_minitest_tests.rb", "test_public", - "bundle exec ruby -Itest /fixtures/nested_minitest_tests.rb --name ParentTest\\#test_public", + "bundle exec ruby -Itest /fixtures/nested_minitest_tests.rb --name ParentTest#test_public", { "start_line": 1, "start_column": 2, @@ -180,7 +180,7 @@ "arguments": [ "/fixtures/nested_minitest_tests.rb", "test_public", - "bundle exec ruby -Itest /fixtures/nested_minitest_tests.rb --name ParentTest\\#test_public", + "bundle exec ruby -Itest /fixtures/nested_minitest_tests.rb --name ParentTest#test_public", { "start_line": 1, "start_column": 2, @@ -311,7 +311,7 @@ "arguments": [ "/fixtures/nested_minitest_tests.rb", "test_public", - "bundle exec ruby -Itest /fixtures/nested_minitest_tests.rb --name ParentTest::FirstChildTest\\#test_public", + "bundle exec ruby -Itest /fixtures/nested_minitest_tests.rb --name ParentTest::FirstChildTest#test_public", { "start_line": 6, "start_column": 4, @@ -343,7 +343,7 @@ "arguments": [ "/fixtures/nested_minitest_tests.rb", "test_public", - "bundle exec ruby -Itest /fixtures/nested_minitest_tests.rb --name ParentTest::FirstChildTest\\#test_public", + "bundle exec ruby -Itest /fixtures/nested_minitest_tests.rb --name ParentTest::FirstChildTest#test_public", { "start_line": 6, "start_column": 4, @@ -375,7 +375,7 @@ "arguments": [ "/fixtures/nested_minitest_tests.rb", "test_public", - "bundle exec ruby -Itest /fixtures/nested_minitest_tests.rb --name ParentTest::FirstChildTest\\#test_public", + "bundle exec ruby -Itest /fixtures/nested_minitest_tests.rb --name ParentTest::FirstChildTest#test_public", { "start_line": 6, "start_column": 4, @@ -506,7 +506,7 @@ "arguments": [ "/fixtures/nested_minitest_tests.rb", "test_public", - "bundle exec ruby -Itest /fixtures/nested_minitest_tests.rb --name ParentTest::SecondChildTest\\#test_public", + "bundle exec ruby -Itest /fixtures/nested_minitest_tests.rb --name ParentTest::SecondChildTest#test_public", { "start_line": 14, "start_column": 4, @@ -538,7 +538,7 @@ "arguments": [ "/fixtures/nested_minitest_tests.rb", "test_public", - "bundle exec ruby -Itest /fixtures/nested_minitest_tests.rb --name ParentTest::SecondChildTest\\#test_public", + "bundle exec ruby -Itest /fixtures/nested_minitest_tests.rb --name ParentTest::SecondChildTest#test_public", { "start_line": 14, "start_column": 4, @@ -570,7 +570,7 @@ "arguments": [ "/fixtures/nested_minitest_tests.rb", "test_public", - "bundle exec ruby -Itest /fixtures/nested_minitest_tests.rb --name ParentTest::SecondChildTest\\#test_public", + "bundle exec ruby -Itest /fixtures/nested_minitest_tests.rb --name ParentTest::SecondChildTest#test_public", { "start_line": 14, "start_column": 4, @@ -602,7 +602,7 @@ "arguments": [ "/fixtures/nested_minitest_tests.rb", "test_public_again", - "bundle exec ruby -Itest /fixtures/nested_minitest_tests.rb --name ParentTest\\#test_public_again", + "bundle exec ruby -Itest /fixtures/nested_minitest_tests.rb --name ParentTest#test_public_again", { "start_line": 19, "start_column": 2, @@ -634,7 +634,7 @@ "arguments": [ "/fixtures/nested_minitest_tests.rb", "test_public_again", - "bundle exec ruby -Itest /fixtures/nested_minitest_tests.rb --name ParentTest\\#test_public_again", + "bundle exec ruby -Itest /fixtures/nested_minitest_tests.rb --name ParentTest#test_public_again", { "start_line": 19, "start_column": 2, @@ -666,7 +666,7 @@ "arguments": [ "/fixtures/nested_minitest_tests.rb", "test_public_again", - "bundle exec ruby -Itest /fixtures/nested_minitest_tests.rb --name ParentTest\\#test_public_again", + "bundle exec ruby -Itest /fixtures/nested_minitest_tests.rb --name ParentTest#test_public_again", { "start_line": 19, "start_column": 2, @@ -682,7 +682,5 @@ } } ], - "params": [ - - ] + "params": [] } diff --git a/test/expectations/diagnostics/rubocop_contextual_autocorrect.exp.json b/test/expectations/diagnostics/rubocop_contextual_autocorrect.exp.json new file mode 100644 index 000000000..0d85158f8 --- /dev/null +++ b/test/expectations/diagnostics/rubocop_contextual_autocorrect.exp.json @@ -0,0 +1,102 @@ +{ + "result": [ + { + "range": { + "start": { + "line": 4, + "character": 2 + }, + "end": { + "line": 4, + "character": 5 + } + }, + "severity": 2, + "source": "Prism", + "message": "assigned but unused variable - foo" + }, + { + "range": { + "start": { + "line": 4, + "character": 2 + }, + "end": { + "line": 4, + "character": 5 + } + }, + "severity": 2, + "code": "Lint/UselessAssignment", + "codeDescription": { + "href": "https://docs.rubocop.org/rubocop/cops_lint.html#lintuselessassignment" + }, + "source": "RuboCop", + "message": "Lint/UselessAssignment: Useless assignment to variable - `foo`.", + "data": { + "correctable": true, + "code_actions": [ + { + "title": "Autocorrect Lint/UselessAssignment", + "kind": "quickfix", + "isPreferred": true, + "edit": { + "documentChanges": [ + { + "textDocument": { + "uri": "file:///fake", + "version": null + }, + "edits": [ + { + "range": { + "start": { + "line": 4, + "character": 2 + }, + "end": { + "line": 4, + "character": 13 + } + }, + "newText": "\"bar\"" + } + ] + } + ] + } + }, + { + "title": "Disable Lint/UselessAssignment for this line", + "kind": "quickfix", + "edit": { + "documentChanges": [ + { + "textDocument": { + "uri": "file:///fake", + "version": null + }, + "edits": [ + { + "range": { + "start": { + "line": 4, + "character": 13 + }, + "end": { + "line": 4, + "character": 13 + } + }, + "newText": " # rubocop:disable Lint/UselessAssignment" + } + ] + } + ] + } + } + ] + } + } + ] +} diff --git a/test/expectations/diagnostics/rubocop_extension_cop.exp.json b/test/expectations/diagnostics/rubocop_extension_cop.exp.json new file mode 100644 index 000000000..8e0900cda --- /dev/null +++ b/test/expectations/diagnostics/rubocop_extension_cop.exp.json @@ -0,0 +1,100 @@ +{ + "result": [ + { + "range": { + "start": { + "line": 5, + "character": 4 + }, + "end": { + "line": 5, + "character": 25 + } + }, + "severity": 3, + "code": "Minitest/AssertEmptyLiteral", + "codeDescription": { + "href": "https://docs.rubocop.org/rubocop-minitest/cops_minitest.html#minitestassertemptyliteral" + }, + "source": "RuboCop", + "message": "Minitest/AssertEmptyLiteral: Prefer using `assert_empty(foo)`.", + "data": { + "correctable": true, + "code_actions": [ + { + "title": "Autocorrect Minitest/AssertEmptyLiteral", + "kind": "quickfix", + "isPreferred": true, + "edit": { + "documentChanges": [ + { + "textDocument": { + "uri": "file:///fake", + "version": null + }, + "edits": [ + { + "range": { + "start": { + "line": 5, + "character": 4 + }, + "end": { + "line": 5, + "character": 16 + } + }, + "newText": "assert_empty" + }, + { + "range": { + "start": { + "line": 5, + "character": 17 + }, + "end": { + "line": 5, + "character": 24 + } + }, + "newText": "foo" + } + ] + } + ] + } + }, + { + "title": "Disable Minitest/AssertEmptyLiteral for this line", + "kind": "quickfix", + "edit": { + "documentChanges": [ + { + "textDocument": { + "uri": "file:///fake", + "version": null + }, + "edits": [ + { + "range": { + "start": { + "line": 5, + "character": 25 + }, + "end": { + "line": 5, + "character": 25 + } + }, + "newText": " # rubocop:disable Minitest/AssertEmptyLiteral" + } + ] + } + ] + } + } + ] + } + } + ] +} diff --git a/test/expectations/diagnostics/syntax_diagnostics.exp.json b/test/expectations/diagnostics/syntax_diagnostics.exp.json index afe0fa147..3777fbf64 100644 --- a/test/expectations/diagnostics/syntax_diagnostics.exp.json +++ b/test/expectations/diagnostics/syntax_diagnostics.exp.json @@ -13,7 +13,7 @@ }, "severity": 1, "source": "Prism", - "message": "unexpected end of file, assuming it is closing the parent top level context" + "message": "unexpected end-of-input, assuming it is closing the parent top level context" }, { "range": { diff --git a/test/expectations/document_highlight/full_name_highlight.exp.json b/test/expectations/document_highlight/full_name_highlight.exp.json index c134f4862..117e253a5 100644 --- a/test/expectations/document_highlight/full_name_highlight.exp.json +++ b/test/expectations/document_highlight/full_name_highlight.exp.json @@ -6,6 +6,19 @@ } ], "result": [ + { + "range": { + "start": { + "line": 0, + "character": 6 + }, + "end": { + "line": 0, + "character": 14 + } + }, + "kind": 3 + }, { "range": { "start": { diff --git a/test/expectations/semantic_highlighting/const.exp.json b/test/expectations/semantic_highlighting/const.exp.json index 57efa4fc2..1b1cc1215 100644 --- a/test/expectations/semantic_highlighting/const.exp.json +++ b/test/expectations/semantic_highlighting/const.exp.json @@ -219,21 +219,7 @@ }, { "delta_line": 0, - "delta_start_char": 5, - "length": 1, - "token_type": 0, - "token_modifiers": 0 - }, - { - "delta_line": 0, - "delta_start_char": 5, - "length": 1, - "token_type": 0, - "token_modifiers": 0 - }, - { - "delta_line": 0, - "delta_start_char": 3, + "delta_start_char": 10, "length": 1, "token_type": 0, "token_modifiers": 0 @@ -261,14 +247,7 @@ }, { "delta_line": 0, - "delta_start_char": 6, - "length": 1, - "token_type": 0, - "token_modifiers": 0 - }, - { - "delta_line": 0, - "delta_start_char": 3, + "delta_start_char": 9, "length": 3, "token_type": 8, "token_modifiers": 0 @@ -286,14 +265,6 @@ "length": 3, "token_type": 8, "token_modifiers": 0 - }, - { - "delta_line": 0, - "delta_start_char": 5, - "length": 1, - "token_type": 0, - "token_modifiers": 0 } - ], - "params": [] + ] } diff --git a/test/fixtures/extract_method.rb b/test/fixtures/extract_method.rb new file mode 100644 index 000000000..fadb3f993 --- /dev/null +++ b/test/fixtures/extract_method.rb @@ -0,0 +1,5 @@ +class Foo + def some_method + answer = 42 + end +end diff --git a/test/fixtures/prism b/test/fixtures/prism index 1f49ca9a3..8e7d126f3 160000 --- a/test/fixtures/prism +++ b/test/fixtures/prism @@ -1 +1 @@ -Subproject commit 1f49ca9a33a43f867b31e79f383e51b33dc11c50 +Subproject commit 8e7d126f3e64bf3cabe6305943bd4fca2ba5e8ca diff --git a/test/fixtures/rubocop_contextual_autocorrect.rb b/test/fixtures/rubocop_contextual_autocorrect.rb new file mode 100644 index 000000000..8fe67de80 --- /dev/null +++ b/test/fixtures/rubocop_contextual_autocorrect.rb @@ -0,0 +1,7 @@ +# typed: strict +# frozen_string_literal: true + +def useless_assignment + foo = "bar" + baz +end diff --git a/test/fixtures/rubocop_extension_cop.rb b/test/fixtures/rubocop_extension_cop.rb new file mode 100644 index 000000000..fd23103f2 --- /dev/null +++ b/test/fixtures/rubocop_extension_cop.rb @@ -0,0 +1,8 @@ +# typed: true +# frozen_string_literal: true + +class ExampleTest < Minitest::Test + def test_public + assert_equal([], foo) + end +end diff --git a/test/global_state_test.rb b/test/global_state_test.rb index 75f582957..bbbb0fbad 100644 --- a/test/global_state_test.rb +++ b/test/global_state_test.rb @@ -6,7 +6,7 @@ module RubyLsp class GlobalStateTest < Minitest::Test def test_detects_no_test_library_when_there_are_no_dependencies - stub_dependencies({}) + stub_direct_dependencies({}) state = GlobalState.new state.apply_options({}) @@ -14,7 +14,7 @@ def test_detects_no_test_library_when_there_are_no_dependencies end def test_detects_minitest - stub_dependencies("minitest" => "1.2.3") + stub_direct_dependencies("minitest" => "1.2.3") state = GlobalState.new state.apply_options({}) @@ -22,7 +22,7 @@ def test_detects_minitest end def test_does_not_detect_minitest_related_gems_as_minitest - stub_dependencies("minitest-reporters" => "1.2.3") + stub_direct_dependencies("minitest-reporters" => "1.2.3") state = GlobalState.new state.apply_options({}) @@ -30,7 +30,7 @@ def test_does_not_detect_minitest_related_gems_as_minitest end def test_detects_test_unit - stub_dependencies("test-unit" => "1.2.3") + stub_direct_dependencies("test-unit" => "1.2.3") state = GlobalState.new state.apply_options({}) @@ -38,17 +38,16 @@ def test_detects_test_unit end def test_detects_rails_if_minitest_is_present_and_bin_rails_exists - stub_dependencies("minitest" => "1.2.3") - File.expects(:exist?).with("#{Dir.pwd}/bin/rails").once.returns(true) + stub_direct_dependencies("minitest" => "1.2.3") state = GlobalState.new + state.stubs(:bin_rails_present).returns(true) state.apply_options({}) assert_equal("rails", state.test_library) end def test_detects_rspec_if_both_rails_and_rspec_are_present - stub_dependencies("rspec" => "1.2.3") - File.expects(:exist?).never + stub_direct_dependencies("rspec" => "1.2.3") state = GlobalState.new state.apply_options({}) @@ -67,6 +66,49 @@ def test_applying_auto_formatter_invokes_detection assert_equal("rubocop", state.formatter) end + def test_applying_auto_formatter_with_rubocop_extension + state = GlobalState.new + stub_direct_dependencies("rubocop-rails" => "1.2.3") + state.apply_options({ initializationOptions: { formatter: "auto" } }) + assert_equal("rubocop", state.formatter) + end + + def test_applying_auto_formatter_with_rubocop_as_transitive_dependency + state = GlobalState.new + + stub_direct_dependencies("gem_with_config" => "1.2.3") + stub_all_dependencies("gem_with_config", "rubocop") + state.stubs(:dot_rubocop_yml_present).returns(true) + + state.apply_options({ initializationOptions: { formatter: "auto" } }) + + assert_equal("rubocop", state.formatter) + end + + def test_applying_auto_formatter_with_rubocop_as_transitive_dependency_without_config + state = GlobalState.new + + stub_direct_dependencies("gem_with_config" => "1.2.3") + stub_all_dependencies("gem_with_config", "rubocop") + state.stubs(:dot_rubocop_yml_present).returns(false) + + state.apply_options({ initializationOptions: { formatter: "auto" } }) + + assert_equal("none", state.formatter) + end + + def test_applying_auto_formatter_with_rubocop_as_transitive_dependency_and_sytax_tree + state = GlobalState.new + + stub_direct_dependencies("syntax_tree" => "1.2.3") + stub_all_dependencies("syntax_tree", "rubocop") + state.stubs(:dot_rubocop_yml_present).returns(true) + + state.apply_options({ initializationOptions: { formatter: "auto" } }) + + assert_equal("syntax_tree", state.formatter) + end + def test_watching_files_if_supported state = GlobalState.new state.apply_options({ @@ -117,7 +159,7 @@ def test_linter_specification end def test_linter_auto_detection - stub_dependencies("rubocop" => "1.2.3") + stub_direct_dependencies("rubocop" => "1.2.3") state = GlobalState.new state.apply_options({}) @@ -125,7 +167,7 @@ def test_linter_auto_detection end def test_specifying_empty_linters - stub_dependencies("rubocop" => "1.2.3") + stub_direct_dependencies("rubocop" => "1.2.3") state = GlobalState.new state.apply_options({ initializationOptions: { linters: [] }, @@ -136,8 +178,17 @@ def test_specifying_empty_linters private - def stub_dependencies(dependencies) + def stub_direct_dependencies(dependencies) Bundler.locked_gems.stubs(dependencies: dependencies) end + + BundlerSpec = Struct.new(:name) + def stub_all_dependencies(*dependencies) + Bundler.locked_gems.stubs(specs: dependencies.map { BundlerSpec.new(_1) }) + end + + def stub_workspace_file_exists(path) + File.expects(:exist?).with("#{Dir.pwd}/#{path}").returns(true) + end end end diff --git a/test/requests/code_action_resolve_expectations_test.rb b/test/requests/code_action_resolve_expectations_test.rb index 68accad13..531a77bdd 100644 --- a/test/requests/code_action_resolve_expectations_test.rb +++ b/test/requests/code_action_resolve_expectations_test.rb @@ -2,7 +2,7 @@ # frozen_string_literal: true require "test_helper" -require "expectations/expectations_test_runner" +require_relative "support/expectations_test_runner" class CodeActionResolveExpectationsTest < ExpectationsTestRunner expectations_tests RubyLsp::Requests::CodeActionResolve, "code_action_resolve" diff --git a/test/requests/code_actions_expectations_test.rb b/test/requests/code_actions_expectations_test.rb index 5600e7072..4cf9376b3 100644 --- a/test/requests/code_actions_expectations_test.rb +++ b/test/requests/code_actions_expectations_test.rb @@ -2,7 +2,7 @@ # frozen_string_literal: true require "test_helper" -require "expectations/expectations_test_runner" +require_relative "support/expectations_test_runner" class CodeActionsExpectationsTest < ExpectationsTestRunner expectations_tests RubyLsp::Requests::CodeActions, "code_actions" diff --git a/test/requests/code_actions_formatting_test.rb b/test/requests/code_actions_formatting_test.rb index ca562df6a..fea80ff8f 100644 --- a/test/requests/code_actions_formatting_test.rb +++ b/test/requests/code_actions_formatting_test.rb @@ -2,7 +2,7 @@ # frozen_string_literal: true require "test_helper" -require "expectations/expectations_test_runner" +require_relative "support/expectations_test_runner" # Tests RuboCop disable directives - before/after on whole file class CodeActionsFormattingTest < Minitest::Test diff --git a/test/requests/code_lens_expectations_test.rb b/test/requests/code_lens_expectations_test.rb index c4688bbae..7872348a7 100644 --- a/test/requests/code_lens_expectations_test.rb +++ b/test/requests/code_lens_expectations_test.rb @@ -2,7 +2,7 @@ # frozen_string_literal: true require "test_helper" -require "expectations/expectations_test_runner" +require_relative "support/expectations_test_runner" class CodeLensExpectationsTest < ExpectationsTestRunner expectations_tests RubyLsp::Requests::CodeLens, "code_lens" @@ -22,6 +22,36 @@ def run_expectations(source) listener.perform end + def test_command_generation_for_minitest + stub_test_library("minitest") + source = <<~RUBY + class FooTest < MiniTest::Test + def test_bar; end + end + RUBY + uri = URI("file:///fake.rb") + + document = RubyLsp::RubyDocument.new(source: source, version: 1, uri: uri) + + dispatcher = Prism::Dispatcher.new + listener = RubyLsp::Requests::CodeLens.new(@global_state, uri, dispatcher) + dispatcher.dispatch(document.tree) + response = listener.perform + + assert_equal(6, response.size) + + assert_equal("Run In Terminal", T.must(response[1]).command.title) + assert_equal( + "bundle exec ruby -Itest /fake.rb --name \"/^FooTest(#|::)/\"", + T.must(response[1]).command.arguments[2], + ) + assert_equal("Run In Terminal", T.must(response[4]).command.title) + assert_equal( + "bundle exec ruby -Itest /fake.rb --name FooTest#test_bar", + T.must(response[4]).command.arguments[2], + ) + end + def test_command_generation_for_test_unit stub_test_library("test-unit") source = <<~RUBY @@ -156,6 +186,27 @@ class Test < Minitest::Test; end end end + def test_no_code_lens_for_nested_defs + stub_test_library("test-unit") + source = <<~RUBY + class FooTest < Test::Unit::TestCase + def test_bar + def test_baz; end + end + end + RUBY + uri = URI("file:///fake.rb") + + document = RubyLsp::RubyDocument.new(source: source, version: 1, uri: uri) + + dispatcher = Prism::Dispatcher.new + listener = RubyLsp::Requests::CodeLens.new(@global_state, uri, dispatcher) + dispatcher.dispatch(document.tree) + response = listener.perform + + assert_equal(6, response.size) + end + private def create_code_lens_addon diff --git a/test/requests/completion_resolve_test.rb b/test/requests/completion_resolve_test.rb index af07d3ccd..5545f85cf 100644 --- a/test/requests/completion_resolve_test.rb +++ b/test/requests/completion_resolve_test.rb @@ -41,4 +41,46 @@ class Bar assert_equal(expected.to_json, result.to_json) end end + + def test_completion_resolve_with_owner_present + source = +<<~RUBY + class Bar + def initialize + # Bar! + @a = 1 + end + end + + class Foo + # Foo! + def initialize + @a = 1 + end + end + RUBY + + with_server(source, stub_no_typechecker: true) do |server, _uri| + existing_item = { + label: "@a", + kind: RubyLsp::Constant::CompletionItemKind::FIELD, + data: { owner_name: "Foo" }, + } + + server.process_message(id: 1, method: "completionItem/resolve", params: existing_item) + + result = server.pop_response.response + assert_match(/Foo/, result[:documentation].value) + + existing_item = { + label: "@a", + kind: 5, + data: { owner_name: "Bar" }, + } + + server.process_message(id: 1, method: "completionItem/resolve", params: existing_item) + + result = server.pop_response.response + assert_match(/Bar/, result[:documentation].value) + end + end end diff --git a/test/requests/completion_test.rb b/test/requests/completion_test.rb index 703aa7e72..276227954 100644 --- a/test/requests/completion_test.rb +++ b/test/requests/completion_test.rb @@ -163,6 +163,30 @@ def test_completion_is_not_triggered_if_argument_is_not_a_string end end + def test_completion_for_fully_qualified_paths_inside_namespace + source = +<<~RUBY + module Foo + module Bar + class Baz + end + + Foo:: + end + end + RUBY + + with_server(source, stub_no_typechecker: true) do |server, uri| + with_file_structure(server) do + server.process_message(id: 1, method: "textDocument/completion", params: { + textDocument: { uri: uri }, + position: { line: 5, character: 9 }, + }) + result = server.pop_response.response + assert_equal(["Foo::Bar", "Foo::Bar::Baz"], result.map(&:label)) + end + end + end + def test_completion_for_constants source = +<<~RUBY class Foo @@ -588,6 +612,40 @@ def you end end + def test_completion_for_inherited_methods + source = <<~RUBY + module Foo + module First + def method1; end + end + + class Bar + def method2; end + end + + class Baz < Bar + include First + + def do_it + m + end + end + end + RUBY + + with_server(source) do |server, uri| + with_file_structure(server) do + server.process_message(id: 1, method: "textDocument/completion", params: { + textDocument: { uri: uri }, + position: { line: 13, character: 7 }, + }) + + result = server.pop_response.response + assert_equal(["method1", "method2"], result.map(&:label)) + end + end + end + def test_relative_completion_command prefix = "support/" source = <<~RUBY @@ -816,6 +874,103 @@ def test_completion_addons end end + def test_completion_for_instance_variables + source = +<<~RUBY + class Foo + def initialize + @foo = 1 + @foobar = 2 + end + + def bar + @ + end + + def baz + @ = 123 + end + end + RUBY + + with_server(source, stub_no_typechecker: true) do |server, uri| + server.process_message(id: 1, method: "textDocument/completion", params: { + textDocument: { uri: uri }, + position: { line: 7, character: 5 }, + }) + result = server.pop_response.response + assert_equal(["@foo", "@foobar"], result.map(&:label)) + + server.process_message(id: 1, method: "textDocument/completion", params: { + textDocument: { uri: uri }, + position: { line: 11, character: 5 }, + }) + result = server.pop_response.response + assert_equal(["@foo", "@foobar"], result.map(&:label)) + end + end + + def test_completion_for_inherited_instance_variables + source = +<<~RUBY + module Foo + def set_ivar + @a = 9 + @b = 1 + end + end + + class Parent + def initialize + @a = 5 + end + end + + class Child < Parent + include Foo + + def do_something + @ + end + end + RUBY + + with_server(source, stub_no_typechecker: true) do |server, uri| + server.process_message(id: 1, method: "textDocument/completion", params: { + textDocument: { uri: uri }, + position: { line: 17, character: 5 }, + }) + + result = server.pop_response.response + assert_equal(["@a", "@b"], result.map(&:label)) + end + end + + def test_instance_variable_completion_shows_only_uniq_entries + source = +<<~RUBY + class Foo + def initialize + @foo = 1 + end + + def other_set_foo + @foo = 2 + end + + def baz + @ + end + end + RUBY + + with_server(source, stub_no_typechecker: true) do |server, uri| + server.process_message(id: 1, method: "textDocument/completion", params: { + textDocument: { uri: uri }, + position: { line: 10, character: 5 }, + }) + result = server.pop_response.response + assert_equal(["@foo"], result.map(&:label)) + end + end + private def with_file_structure(server, &block) diff --git a/test/requests/definition_expectations_test.rb b/test/requests/definition_expectations_test.rb index 465d4753f..68ad225f5 100644 --- a/test/requests/definition_expectations_test.rb +++ b/test/requests/definition_expectations_test.rb @@ -2,7 +2,7 @@ # frozen_string_literal: true require "test_helper" -require "expectations/expectations_test_runner" +require_relative "support/expectations_test_runner" class DefinitionExpectationsTest < ExpectationsTestRunner expectations_tests RubyLsp::Requests::Definition, "definition" @@ -526,6 +526,121 @@ def baz end end + def test_definition_for_instance_variables + source = <<~RUBY + class Foo + def initialize + @a = 1 + end + + def bar + @a + end + + def baz + @a = 5 + end + end + RUBY + + with_server(source) do |server, uri| + server.process_message( + id: 1, + method: "textDocument/definition", + params: { textDocument: { uri: uri }, position: { character: 4, line: 6 } }, + ) + response = server.pop_response.response.first + assert_equal(2, response.range.start.line) + + server.process_message( + id: 1, + method: "textDocument/definition", + params: { textDocument: { uri: uri }, position: { character: 4, line: 10 } }, + ) + response = server.pop_response.response.first + assert_equal(2, response.range.start.line) + end + end + + def test_definition_for_inherited_methods + source = <<~RUBY + module Foo + module First + def method1; end + end + + class Bar + def method2; end + end + + class Baz < Bar + include First + + def method3 + method1 + method2 + end + end + end + RUBY + + with_server(source) do |server, uri| + server.process_message( + id: 1, + method: "textDocument/definition", + params: { textDocument: { uri: uri }, position: { character: 6, line: 13 } }, + ) + response = server.pop_response.response.first + assert_equal(2, response.range.start.line) + + server.process_message( + id: 1, + method: "textDocument/definition", + params: { textDocument: { uri: uri }, position: { character: 6, line: 14 } }, + ) + response = server.pop_response.response.first + assert_equal(6, response.range.start.line) + end + end + + def test_definition_for_inherited_instance_variables + source = <<~RUBY + module Foo + def set_ivar + @a = 1 + end + end + + class Parent + def initialize + @a = 5 + end + end + + class Child < Parent + include Foo + + def do_something + @a + end + end + RUBY + + with_server(source) do |server, uri| + server.process_message( + id: 1, + method: "textDocument/definition", + params: { textDocument: { uri: uri }, position: { character: 4, line: 16 } }, + ) + response = server.pop_response.response + + # First location is Foo#@a + assert_equal(2, response[0].range.start.line) + # Second location is Parent#@a + assert_equal(8, response[1].range.start.line) + end + end + private def create_definition_addon diff --git a/test/requests/diagnostics_expectations_test.rb b/test/requests/diagnostics_expectations_test.rb index 1b4c64cbb..399fd18e2 100644 --- a/test/requests/diagnostics_expectations_test.rb +++ b/test/requests/diagnostics_expectations_test.rb @@ -2,7 +2,7 @@ # frozen_string_literal: true require "test_helper" -require "expectations/expectations_test_runner" +require_relative "support/expectations_test_runner" class DiagnosticsExpectationsTest < ExpectationsTestRunner expectations_tests RubyLsp::Requests::Diagnostics, "diagnostics" diff --git a/test/requests/document_highlight_expectations_test.rb b/test/requests/document_highlight_expectations_test.rb index f383beab8..7218e36ad 100644 --- a/test/requests/document_highlight_expectations_test.rb +++ b/test/requests/document_highlight_expectations_test.rb @@ -2,7 +2,7 @@ # frozen_string_literal: true require "test_helper" -require "expectations/expectations_test_runner" +require_relative "support/expectations_test_runner" class DocumentHighlightExpectationsTest < ExpectationsTestRunner expectations_tests RubyLsp::Requests::DocumentHighlight, "document_highlight" diff --git a/test/requests/document_link_expectations_test.rb b/test/requests/document_link_expectations_test.rb index 299502e8d..c68b71db6 100644 --- a/test/requests/document_link_expectations_test.rb +++ b/test/requests/document_link_expectations_test.rb @@ -2,7 +2,7 @@ # frozen_string_literal: true require "test_helper" -require "expectations/expectations_test_runner" +require_relative "support/expectations_test_runner" class DocumentLinkExpectationsTest < ExpectationsTestRunner expectations_tests RubyLsp::Requests::DocumentLink, "document_link" diff --git a/test/requests/document_symbol_expectations_test.rb b/test/requests/document_symbol_expectations_test.rb index b79cb0693..709e098fd 100644 --- a/test/requests/document_symbol_expectations_test.rb +++ b/test/requests/document_symbol_expectations_test.rb @@ -2,7 +2,7 @@ # frozen_string_literal: true require "test_helper" -require "expectations/expectations_test_runner" +require_relative "support/expectations_test_runner" class DocumentSymbolExpectationsTest < ExpectationsTestRunner expectations_tests RubyLsp::Requests::DocumentSymbol, "document_symbol" diff --git a/test/requests/folding_ranges_expectations_test.rb b/test/requests/folding_ranges_expectations_test.rb index 66dbfdb31..354686637 100644 --- a/test/requests/folding_ranges_expectations_test.rb +++ b/test/requests/folding_ranges_expectations_test.rb @@ -2,7 +2,7 @@ # frozen_string_literal: true require "test_helper" -require "expectations/expectations_test_runner" +require_relative "support/expectations_test_runner" class FoldingRangesExpectationsTest < ExpectationsTestRunner expectations_tests RubyLsp::Requests::FoldingRanges, "folding_ranges" diff --git a/test/requests/formatting_expectations_test.rb b/test/requests/formatting_expectations_test.rb index 910a85f13..9a59657c3 100644 --- a/test/requests/formatting_expectations_test.rb +++ b/test/requests/formatting_expectations_test.rb @@ -2,7 +2,7 @@ # frozen_string_literal: true require "test_helper" -require "expectations/expectations_test_runner" +require_relative "support/expectations_test_runner" class FormattingExpectationsTest < ExpectationsTestRunner expectations_tests RubyLsp::Requests::Formatting, "formatting" diff --git a/test/requests/hover_expectations_test.rb b/test/requests/hover_expectations_test.rb index c0baf1050..2d5894a03 100644 --- a/test/requests/hover_expectations_test.rb +++ b/test/requests/hover_expectations_test.rb @@ -2,7 +2,7 @@ # frozen_string_literal: true require "test_helper" -require "expectations/expectations_test_runner" +require_relative "support/expectations_test_runner" class HoverExpectationsTest < ExpectationsTestRunner expectations_tests RubyLsp::Requests::Hover, "hover" @@ -311,6 +311,145 @@ def bar end end + def test_hover_instance_variables + source = <<~RUBY + class Foo + def initialize + # Hello + @a = 1 + end + + def bar + @a + end + + def baz + @a = 5 + end + end + RUBY + + with_server(source) do |server, uri| + server.process_message( + id: 1, + method: "textDocument/hover", + params: { textDocument: { uri: uri }, position: { character: 4, line: 7 } }, + ) + assert_match("Hello", server.pop_response.response.contents.value) + + server.process_message( + id: 1, + method: "textDocument/hover", + params: { textDocument: { uri: uri }, position: { character: 4, line: 11 } }, + ) + assert_match("Hello", server.pop_response.response.contents.value) + end + end + + def test_hovering_over_inherited_methods + source = <<~RUBY + module Foo + module First + # Method 1 + def method1; end + end + + class Bar + # Method 2 + def method2; end + end + + class Baz < Bar + include First + + def method3 + method1 + method2 + end + end + end + RUBY + + # Going to definition on `argument` should not take you to the `foo` method definition + with_server(source) do |server, uri| + server.process_message( + id: 1, + method: "textDocument/hover", + params: { textDocument: { uri: uri }, position: { character: 6, line: 15 } }, + ) + assert_match("Method 1", server.pop_response.response.contents.value) + + server.process_message( + id: 1, + method: "textDocument/hover", + params: { textDocument: { uri: uri }, position: { character: 6, line: 16 } }, + ) + assert_match("Method 2", server.pop_response.response.contents.value) + end + end + + def test_hover_for_inherited_instance_variables + source = <<~RUBY + module Foo + def set_ivar + # Foo + @a = 1 + end + end + + class Parent + def initialize + # Parent + @a = 5 + end + end + + class Child < Parent + include Foo + + def do_something + @a + end + end + RUBY + + with_server(source) do |server, uri| + server.process_message( + id: 1, + method: "textDocument/hover", + params: { textDocument: { uri: uri }, position: { character: 4, line: 18 } }, + ) + + contents = server.pop_response.response.contents.value + assert_match("Foo", contents) + assert_match("Parent", contents) + end + end + + def test_hover_for_methods_shows_parameters + source = <<~RUBY + class Foo + def bar(a, b = 1, *c, d:, e: 1, **f, &g) + end + + def baz + bar + end + end + RUBY + + with_server(source) do |server, uri| + server.process_message( + id: 1, + method: "textDocument/hover", + params: { textDocument: { uri: uri }, position: { character: 4, line: 5 } }, + ) + + contents = server.pop_response.response.contents.value + assert_match("bar(a, b = , *c, d:, e: , **f, &g)", contents) + end + end + private def create_hover_addon diff --git a/test/requests/inlay_hints_expectations_test.rb b/test/requests/inlay_hints_expectations_test.rb index e410c3bea..eedfdc56b 100644 --- a/test/requests/inlay_hints_expectations_test.rb +++ b/test/requests/inlay_hints_expectations_test.rb @@ -2,7 +2,7 @@ # frozen_string_literal: true require "test_helper" -require "expectations/expectations_test_runner" +require_relative "support/expectations_test_runner" class InlayHintsExpectationsTest < ExpectationsTestRunner expectations_tests RubyLsp::Requests::InlayHints, "inlay_hints" diff --git a/test/requests/on_type_formatting_test.rb b/test/requests/on_type_formatting_test.rb index 12c7ecdab..137e3d06a 100644 --- a/test/requests/on_type_formatting_test.rb +++ b/test/requests/on_type_formatting_test.rb @@ -445,6 +445,60 @@ def test_auto_indent_after_end_keyword assert_equal(expected_edits.to_json, T.must(edits).to_json) end + def test_auto_indent_after_end_keyword_with_complex_body + document = RubyLsp::RubyDocument.new( + source: +"if foo\nif bar\n baz\nend\nend", + version: 1, + uri: URI("file:///fake.rb"), + ) + edits = RubyLsp::Requests::OnTypeFormatting.new( + document, + { line: 4, character: 2 }, + "d", + "Visual Studio Code", + ).perform + + expected_edits = [ + { + range: { start: { line: 1, character: 0 }, end: { line: 1, character: 0 } }, + newText: " ", + }, + { + range: { start: { line: 2, character: 0 }, end: { line: 2, character: 0 } }, + newText: " ", + }, + { + range: { start: { line: 3, character: 0 }, end: { line: 3, character: 0 } }, + newText: " ", + }, + { + range: { start: { line: 4, character: 2 }, end: { line: 4, character: 2 } }, + newText: "$0", + }, + ] + + assert_equal(expected_edits.to_json, T.must(edits).to_json) + end + + def test_auto_indent_after_end_keyword_does_not_add_extra_indentation + document = RubyLsp::RubyDocument.new(source: +"if foo\n bar\nend", version: 1, uri: URI("file:///fake.rb")) + edits = RubyLsp::Requests::OnTypeFormatting.new( + document, + { line: 2, character: 2 }, + "d", + "Visual Studio Code", + ).perform + + expected_edits = [ + { + range: { start: { line: 2, character: 2 }, end: { line: 2, character: 2 } }, + newText: "$0", + }, + ] + + assert_equal(expected_edits.to_json, T.must(edits).to_json) + end + def test_breaking_line_if_a_keyword_is_part_of_method_call document = RubyLsp::RubyDocument.new(source: +" force({", version: 1, uri: URI("file:///fake.rb")) edits = RubyLsp::Requests::OnTypeFormatting.new( diff --git a/test/requests/selection_ranges_expectations_test.rb b/test/requests/selection_ranges_expectations_test.rb index 8ead2d3df..62061d69d 100644 --- a/test/requests/selection_ranges_expectations_test.rb +++ b/test/requests/selection_ranges_expectations_test.rb @@ -2,7 +2,7 @@ # frozen_string_literal: true require "test_helper" -require "expectations/expectations_test_runner" +require_relative "support/expectations_test_runner" class SelectionRangesExpectationsTest < ExpectationsTestRunner expectations_tests RubyLsp::Requests::SelectionRanges, "selection_ranges" diff --git a/test/requests/semantic_highlighting_expectations_test.rb b/test/requests/semantic_highlighting_expectations_test.rb index d2fd9c43d..d6bc51dde 100644 --- a/test/requests/semantic_highlighting_expectations_test.rb +++ b/test/requests/semantic_highlighting_expectations_test.rb @@ -2,7 +2,7 @@ # frozen_string_literal: true require "test_helper" -require "expectations/expectations_test_runner" +require_relative "support/expectations_test_runner" class SemanticHighlightingExpectationsTest < ExpectationsTestRunner expectations_tests RubyLsp::Requests::SemanticHighlighting, "semantic_highlighting" diff --git a/test/requests/signature_help_test.rb b/test/requests/signature_help_test.rb index 44931acdc..e2d5d4c62 100644 --- a/test/requests/signature_help_test.rb +++ b/test/requests/signature_help_test.rb @@ -151,7 +151,7 @@ def baz }) result = server.pop_response.response signature = result.signatures.first - assert_equal("bar(a, b, c:, d:)", signature.label) + assert_equal("bar(a, b = , c:, d:)", signature.label) assert_equal(2, result.active_parameter) end end diff --git a/test/expectations/expectations_test_runner.rb b/test/requests/support/expectations_test_runner.rb similarity index 99% rename from test/expectations/expectations_test_runner.rb rename to test/requests/support/expectations_test_runner.rb index 6b78f4879..7b8097893 100644 --- a/test/expectations/expectations_test_runner.rb +++ b/test/requests/support/expectations_test_runner.rb @@ -82,7 +82,7 @@ def test_#{expectation_suffix}__#{uniq_name_from_path(path)}__does_not_raise # from test/fixtures/prism/test/prism/fixtures/unparser/corpus/semantic/and.txt # to test_fixtures_prism_test_prism_fixtures_unparser_corpus_semantic_and def uniq_name_from_path(path) - path.gsub("/", "_").gsub('.txt', '') + path.gsub("/", "_").gsub(".txt", "") end end diff --git a/test/requests/support/uri_test.rb b/test/requests/support/uri_test.rb index 190b812d4..8539eafc1 100644 --- a/test/requests/support/uri_test.rb +++ b/test/requests/support/uri_test.rb @@ -50,5 +50,10 @@ def test_from_path_with_fragment uri = URI::Generic.from_path(path: "/some/unix/path/to/file.rb", fragment: "L1,3-2,9") assert_equal("file:///some/unix/path/to/file.rb#L1,3-2,9", uri.to_s) end + + def test_from_path_windows_long_file_paths + uri = URI::Generic.from_path(path: "//?/C:/hostedtoolcache/windows/Ruby/3.3.1/x64/lib/ruby/3.3.0/open-uri.rb") + assert_equal("C:/hostedtoolcache/windows/Ruby/3.3.1/x64/lib/ruby/3.3.0/open-uri.rb", uri.to_standardized_path) + end end end diff --git a/test/requests/workspace_symbol_test.rb b/test/requests/workspace_symbol_test.rb index 7553f8334..76bf165a2 100644 --- a/test/requests/workspace_symbol_test.rb +++ b/test/requests/workspace_symbol_test.rb @@ -6,7 +6,7 @@ class WorkspaceSymbolTest < Minitest::Test def setup @global_state = RubyLsp::GlobalState.new - @global_state.stubs(:typechecker).returns(false) + @global_state.stubs(:has_type_checker).returns(false) @index = @global_state.index end @@ -52,26 +52,6 @@ module Bar; end assert_equal(RubyLsp::Constant::SymbolKind::CONSTANT, T.must(result).kind) end - def test_matches_only_gem_symbols_if_typechecker_is_present - # create a new global state so the stub is not used - @global_state = RubyLsp::GlobalState.new - @index = @global_state.index - indexable = RubyIndexer::IndexablePath.new(nil, "#{Dir.pwd}/workspace_symbol_foo.rb") - - @index.index_single(indexable, <<~RUBY) - class Foo; end - RUBY - - path = "#{Bundler.bundle_path}/gems/fake-gem-0.1.0/lib/gem_symbol_foo.rb" - @index.index_single(RubyIndexer::IndexablePath.new(nil, path), <<~RUBY) - class Foo; end - RUBY - - result = RubyLsp::Requests::WorkspaceSymbol.new(@global_state, "Foo").perform - assert_equal(1, result.length) - assert_equal(URI::Generic.from_path(path: path).to_s, T.must(result.first).location.uri) - end - def test_symbols_include_container_name @index.index_single(RubyIndexer::IndexablePath.new(nil, "/fake.rb"), <<~RUBY) module Foo @@ -85,11 +65,11 @@ class Bar; end assert_equal("Foo", T.must(result).container_name) end - def test_finds_default_gem_symbols + def test_does_not_include_symbols_from_dependencies @index.index_single(RubyIndexer::IndexablePath.new(nil, "#{RbConfig::CONFIG["rubylibdir"]}/pathname.rb")) result = RubyLsp::Requests::WorkspaceSymbol.new(@global_state, "Pathname").perform - refute_empty(result) + assert_empty(result) end def test_does_not_include_private_constants diff --git a/test/ruby_document_test.rb b/test/ruby_document_test.rb index d1460a4de..8528801bd 100644 --- a/test/ruby_document_test.rb +++ b/test/ruby_document_test.rb @@ -433,34 +433,25 @@ class Post < ActiveRecord::Base RUBY # Locate the `ActiveRecord` module - found, parent = document.locate_node({ line: 0, character: 19 }) - assert_instance_of(Prism::ConstantReadNode, found) - assert_equal("ActiveRecord", T.cast(found, Prism::ConstantReadNode).location.slice) + node_context = document.locate_node({ line: 0, character: 19 }) + assert_instance_of(Prism::ConstantReadNode, node_context.node) + assert_equal("ActiveRecord", T.cast(node_context.node, Prism::ConstantReadNode).location.slice) - assert_instance_of(Prism::ConstantPathNode, parent) - assert_equal("ActiveRecord", T.must(T.cast(parent, Prism::ConstantPathNode).child_nodes.first).location.slice) - - # Locate the `Base` class - found, parent = T.cast( - document.locate_node({ line: 0, character: 27 }), - [Prism::ConstantReadNode, Prism::ConstantPathNode, T::Array[String]], + assert_instance_of(Prism::ConstantPathNode, node_context.parent) + assert_equal( + "ActiveRecord", + T.must(T.cast(node_context.parent, Prism::ConstantPathNode).child_nodes.first).location.slice, ) - assert_instance_of(Prism::ConstantReadNode, found) - assert_equal("Base", found.location.slice) - assert_instance_of(Prism::ConstantPathNode, parent) - assert_equal("Base", T.must(parent.child_nodes[1]).location.slice) - assert_equal("ActiveRecord", T.must(parent.child_nodes[0]).location.slice) + # Locate the `Base` class + node_context = document.locate_node({ line: 0, character: 27 }) + found = T.cast(node_context.node, Prism::ConstantPathNode) + assert_equal(:ActiveRecord, T.cast(found.parent, Prism::ConstantReadNode).name) + assert_equal(:Base, found.name) # Locate the `where` invocation - found, parent = T.cast( - document.locate_node({ line: 3, character: 4 }), - [Prism::CallNode, Prism::StatementsNode, T::Array[String]], - ) - assert_instance_of(Prism::CallNode, found) - assert_equal("where", T.must(found.message_loc).slice) - - assert_instance_of(Prism::StatementsNode, parent) + node_context = document.locate_node({ line: 3, character: 4 }) + assert_equal("where", T.cast(node_context.node, Prism::CallNode).message) end def test_locate_returns_nesting @@ -480,13 +471,74 @@ def baz end RUBY - found, _parent, nesting = document.locate_node({ line: 9, character: 6 }) - assert_equal("Qux", T.cast(found, Prism::ConstantReadNode).location.slice) - assert_equal(["Foo", "Bar"], nesting) + node_context = document.locate_node({ line: 9, character: 6 }) + assert_equal("Qux", T.cast(node_context.node, Prism::ConstantReadNode).location.slice) + assert_equal(["Foo", "Bar"], node_context.nesting) + + node_context = document.locate_node({ line: 3, character: 6 }) + assert_equal("Hello", T.cast(node_context.node, Prism::ConstantReadNode).location.slice) + assert_equal(["Foo", "Other"], node_context.nesting) + end + + def test_locate_returns_call_node + document = RubyLsp::RubyDocument.new(source: <<~RUBY, version: 1, uri: URI("file:///foo/bar.rb")) + module Foo + class Other + def do_it + hello :foo + :bar + end + end + end + RUBY + + node_context = document.locate_node({ line: 3, character: 14 }) + assert_equal(":foo", T.must(node_context.node).slice) + assert_equal(:hello, T.must(node_context.call_node).name) - found, _parent, nesting = document.locate_node({ line: 3, character: 6 }) - assert_equal("Hello", T.cast(found, Prism::ConstantReadNode).location.slice) - assert_equal(["Foo", "Other"], nesting) + node_context = document.locate_node({ line: 4, character: 8 }) + assert_equal(":bar", T.must(node_context.node).slice) + assert_nil(node_context.call_node) + end + + def test_locate_returns_call_node_nested + document = RubyLsp::RubyDocument.new(source: <<~RUBY, version: 1, uri: URI("file:///foo/bar.rb")) + module Foo + class Other + def do_it + goodbye(hello(:foo)) + end + end + end + RUBY + + node_context = document.locate_node({ line: 3, character: 22 }) + assert_equal(":foo", T.must(node_context.node).slice) + assert_equal(:hello, T.must(node_context.call_node).name) + end + + def test_locate_returns_call_node_for_blocks + document = RubyLsp::RubyDocument.new(source: <<~RUBY, version: 1, uri: URI("file:///foo/bar.rb")) + foo do + "hello" + end + RUBY + + node_context = document.locate_node({ line: 1, character: 4 }) + assert_equal(:foo, T.must(node_context.call_node).name) + end + + def test_locate_returns_call_node_ZZZ + document = RubyLsp::RubyDocument.new(source: <<~RUBY, version: 1, uri: URI("file:///foo/bar.rb")) + foo( + if bar(1, 2, 3) + "hello" # this is the target + end + end + RUBY + + node_context = document.locate_node({ line: 2, character: 6 }) + assert_equal(:foo, T.must(node_context.call_node).name) end def test_locate_returns_correct_nesting_when_specifying_target_classes @@ -500,9 +552,10 @@ def baz end RUBY - found, _parent, nesting = document.locate_node({ line: 3, character: 6 }, node_types: [Prism::ConstantReadNode]) + node_context = document.locate_node({ line: 3, character: 6 }, node_types: [Prism::ConstantReadNode]) + found = node_context.node assert_equal("Qux", T.cast(found, Prism::ConstantReadNode).location.slice) - assert_equal(["Foo", "Bar"], nesting) + assert_equal(["Foo", "Bar"], node_context.nesting) end def test_reparsing_without_new_edits_does_nothing @@ -601,6 +654,68 @@ def baz refute_predicate(document, :sorbet_sigil_is_true_or_higher) end + def test_locating_compact_namespace_declaration + document = RubyLsp::RubyDocument.new(source: +<<~RUBY, version: 1, uri: URI("file:///foo/bar.rb")) + class Foo::Bar + end + + class Baz + end + RUBY + + node_context = document.locate_node({ line: 0, character: 11 }) + assert_empty(node_context.nesting) + assert_equal("Foo::Bar", T.must(node_context.node).slice) + + node_context = document.locate_node({ line: 3, character: 6 }) + assert_empty(node_context.nesting) + assert_equal("Baz", T.must(node_context.node).slice) + end + + def test_locating_singleton_contexts + document = RubyLsp::RubyDocument.new(source: +<<~RUBY, version: 1, uri: URI("file:///foo/bar.rb")) + class Foo + hello1 + + def self.bar + hello2 + end + + class << self + hello3 + + def baz + hello4 + end + end + + def qux + hello5 + end + end + RUBY + + node_context = document.locate_node({ line: 1, character: 2 }) + assert_equal(["Foo"], node_context.nesting) + assert_nil(node_context.surrounding_method) + + node_context = document.locate_node({ line: 4, character: 4 }) + assert_equal(["Foo", ""], node_context.nesting) + assert_equal("bar", node_context.surrounding_method) + + node_context = document.locate_node({ line: 8, character: 4 }) + assert_equal(["Foo", ""], node_context.nesting) + assert_nil(node_context.surrounding_method) + + node_context = document.locate_node({ line: 11, character: 6 }) + assert_equal(["Foo", ""], node_context.nesting) + assert_equal("baz", node_context.surrounding_method) + + node_context = document.locate_node({ line: 16, character: 6 }) + assert_equal(["Foo"], node_context.nesting) + assert_equal("qux", node_context.surrounding_method) + end + private def assert_error_edit(actual, error_range) diff --git a/test/server_test.rb b/test/server_test.rb index e6c39bf63..7e1baf398 100644 --- a/test/server_test.rb +++ b/test/server_test.rb @@ -27,8 +27,8 @@ def test_initialize_enabled_features_with_array hash = JSON.parse(@server.pop_response.response.to_json) capabilities = hash["capabilities"] - # TextSynchronization + encodings + semanticHighlighting - assert_equal(3, capabilities.length) + # TextSynchronization + encodings + semanticHighlighting + experimental + assert_equal(4, capabilities.length) assert_includes(capabilities, "semanticTokensProvider") end @@ -340,75 +340,6 @@ def test_handles_invalid_configuration FileUtils.mv(".index.yml.tmp", ".index.yml") end - def test_detects_rubocop_if_direct_dependency - stub_dependencies(rubocop: true, syntax_tree: false) - - server = RubyLsp::Server.new(test_mode: true) - - begin - capture_subprocess_io do - server.process_message(id: 1, method: "initialize", params: { - initializationOptions: { formatter: "auto" }, - }) - end - - assert_equal("rubocop", server.global_state.formatter) - ensure - server.run_shutdown - end - end - - def test_detects_syntax_tree_if_direct_dependency - stub_dependencies(rubocop: false, syntax_tree: true) - server = RubyLsp::Server.new(test_mode: true) - - begin - capture_subprocess_io do - server.process_message(id: 1, method: "initialize", params: { - initializationOptions: { formatter: "auto" }, - }) - end - - assert_equal("syntax_tree", server.global_state.formatter) - ensure - server.run_shutdown - end - end - - def test_gives_rubocop_precedence_if_syntax_tree_also_present - stub_dependencies(rubocop: true, syntax_tree: true) - server = RubyLsp::Server.new(test_mode: true) - - begin - capture_subprocess_io do - server.process_message(id: 1, method: "initialize", params: { - initializationOptions: { formatter: "auto" }, - }) - end - - assert_equal("rubocop", server.global_state.formatter) - ensure - server.run_shutdown - end - end - - def test_sets_formatter_to_none_if_neither_rubocop_or_syntax_tree_are_present - stub_dependencies(rubocop: false, syntax_tree: false) - server = RubyLsp::Server.new(test_mode: true) - - begin - capture_subprocess_io do - server.process_message(id: 1, method: "initialize", params: { - initializationOptions: { formatter: "auto" }, - }) - end - - assert_equal("none", server.global_state.formatter) - ensure - server.run_shutdown - end - end - def test_shows_error_if_formatter_set_to_rubocop_but_rubocop_not_available capture_subprocess_io do @server.process_message(id: 1, method: "initialize", params: { @@ -495,6 +426,27 @@ def test_changed_file_only_indexes_ruby }) end + def test_workspace_addons + create_test_addons + @server.load_addons + + @server.process_message({ id: 1, method: "rubyLsp/workspace/addons" }) + + addon_error_notification = @server.pop_response + assert_equal("window/showMessage", addon_error_notification.method) + assert_equal("Error loading addons:\n\nBar:\n boom\n", addon_error_notification.params.message) + addons_info = @server.pop_response.response + + assert_equal("Foo", addons_info[0][:name]) + refute(addons_info[0][:errored]) + + assert_equal("Bar", addons_info[1][:name]) + assert(addons_info[1][:errored]) + ensure + RubyLsp::Addon.addons.clear + RubyLsp::Addon.addon_classes.clear + end + private def with_uninstalled_rubocop(&block) @@ -522,10 +474,28 @@ def unload_rubocop_runner # Depending on which tests have run prior to this one, the classes may or may not be defined end - def stub_dependencies(rubocop:, syntax_tree:) - dependencies = {} - dependencies["syntax_tree"] = "..." if syntax_tree - dependencies["rubocop"] = "..." if rubocop - Bundler.locked_gems.stubs(:dependencies).returns(dependencies) + def create_test_addons + Class.new(RubyLsp::Addon) do + def activate(global_state, outgoing_queue); end + + def name + "Foo" + end + + def deactivate; end + end + + Class.new(RubyLsp::Addon) do + def activate(global_state, outgoing_queue) + # simulates failed addon activation + raise "boom" + end + + def name + "Bar" + end + + def deactivate; end + end end end diff --git a/test/setup_bundler_test.rb b/test/setup_bundler_test.rb index 3daeae8be..6b9a06fe1 100644 --- a/test/setup_bundler_test.rb +++ b/test/setup_bundler_test.rb @@ -215,16 +215,15 @@ def test_does_only_updates_every_4_hours end def test_uses_absolute_bundle_path_for_bundle_install - Bundler.settings.set_global("path", "vendor/bundle") - Object.any_instance.expects(:system).with( - bundle_env(".ruby-lsp/Gemfile"), - "(bundle check || bundle install) 1>&2", - ).returns(true) - Bundler::LockfileParser.any_instance.expects(:dependencies).returns({}).at_least_once - run_script(expected_path: File.expand_path("vendor/bundle", Dir.pwd)) + Bundler.settings.temporary(path: "vendor/bundle") do + Object.any_instance.expects(:system).with( + bundle_env(".ruby-lsp/Gemfile"), + "(bundle check || bundle install) 1>&2", + ).returns(true) + Bundler::LockfileParser.any_instance.expects(:dependencies).returns({}).at_least_once + run_script(expected_path: File.expand_path("vendor/bundle", Dir.pwd)) + end ensure - # We need to revert the changes to the bundler config or else this actually changes ~/.bundle/config - Bundler.settings.set_global("path", nil) FileUtils.rm_r(".ruby-lsp") end @@ -366,19 +365,17 @@ def test_returns_bundle_app_config_if_there_is_local_config Dir.chdir(dir) do bundle_gemfile = Pathname.new(".ruby-lsp").expand_path(Dir.pwd) + "Gemfile" Bundler.with_unbundled_env do - Bundler.settings.set_local("without", "production") - Object.any_instance.expects(:system).with( - bundle_env(bundle_gemfile.to_s), - "(bundle check || bundle install) 1>&2", - ).returns(true) + Bundler.settings.temporary(without: "production") do + Object.any_instance.expects(:system).with( + bundle_env(bundle_gemfile.to_s), + "(bundle check || bundle install) 1>&2", + ).returns(true) - run_script + run_script + end end end end - ensure - # CI uses a local bundle config and we don't want to delete that - FileUtils.rm_r(File.join(Dir.pwd, ".bundle")) unless ENV["CI"] end def test_custom_bundle_uses_alternative_gemfiles diff --git a/test/type_inferrer_test.rb b/test/type_inferrer_test.rb new file mode 100644 index 000000000..323b70293 --- /dev/null +++ b/test/type_inferrer_test.rb @@ -0,0 +1,187 @@ +# typed: true +# frozen_string_literal: true + +require "test_helper" + +module RubyLsp + class TypeInferrerTest < Minitest::Test + def setup + @index = RubyIndexer::Index.new + @type_inferrer = TypeInferrer.new(@index) + end + + def test_infer_receiver_type_self_inside_method + node_context = index_and_locate(<<~RUBY, { line: 2, character: 4 }) + class Foo + def bar + baz + end + end + RUBY + + assert_equal("Foo", @type_inferrer.infer_receiver_type(node_context)) + end + + def test_infer_receiver_type_self_inside_class_body + node_context = index_and_locate(<<~RUBY, { line: 1, character: 2 }) + class Foo + baz + end + RUBY + + assert_equal("Foo::", @type_inferrer.infer_receiver_type(node_context)) + end + + def test_infer_receiver_type_self_inside_singleton_method + node_context = index_and_locate(<<~RUBY, { line: 2, character: 4 }) + class Foo + def self.bar + baz + end + end + RUBY + + assert_equal("Foo::", @type_inferrer.infer_receiver_type(node_context)) + end + + def test_infer_receiver_type_self_inside_singleton_block_body + node_context = index_and_locate(<<~RUBY, { line: 2, character: 4 }) + class Foo + class << self + baz + end + end + RUBY + + assert_equal("Foo::::>", @type_inferrer.infer_receiver_type(node_context)) + end + + def test_infer_receiver_type_self_inside_singleton_block_method + node_context = index_and_locate(<<~RUBY, { line: 3, character: 6 }) + class Foo + class << self + def bar + baz + end + end + end + RUBY + + assert_equal("Foo::", @type_inferrer.infer_receiver_type(node_context)) + end + + def test_infer_receiver_type_constant + node_context = index_and_locate(<<~RUBY, { line: 4, character: 4 }) + class Foo + def bar; end + end + + Foo.bar + RUBY + + assert_equal("Foo::", @type_inferrer.infer_receiver_type(node_context)) + end + + def test_infer_receiver_type_constant_path + node_context = index_and_locate(<<~RUBY, { line: 6, character: 9 }) + module Foo + class Bar + def baz; end + end + end + + Foo::Bar.baz + RUBY + + assert_equal("Foo::Bar::", @type_inferrer.infer_receiver_type(node_context)) + end + + def test_infer_top_level_receiver + node_context = index_and_locate(<<~RUBY, { line: 0, character: 0 }) + foo + RUBY + + assert_equal("Object", @type_inferrer.infer_receiver_type(node_context)) + end + + def test_infer_receiver_type_instance_variables_in_class_body + node_context = index_and_locate(<<~RUBY, { line: 1, character: 2 }) + class Foo + @hello1 + end + RUBY + + assert_equal("Foo::", @type_inferrer.infer_receiver_type(node_context)) + end + + def test_infer_receiver_type_instance_variables_in_singleton_method + node_context = index_and_locate(<<~RUBY, { line: 2, character: 4 }) + class Foo + def self.bar + @hello1 + end + end + RUBY + + assert_equal("Foo::", @type_inferrer.infer_receiver_type(node_context)) + end + + def test_infer_receiver_type_instance_variables_in_singleton_block_body + node_context = index_and_locate(<<~RUBY, { line: 2, character: 4 }) + class Foo + class << self + @hello1 + end + end + RUBY + + assert_equal("Foo::::>", @type_inferrer.infer_receiver_type(node_context)) + end + + def test_infer_receiver_type_instance_variables_in_singleton_block_method + node_context = index_and_locate(<<~RUBY, { line: 3, character: 6 }) + class Foo + class << self + def bar + @hello1 + end + end + end + RUBY + + assert_equal("Foo::", @type_inferrer.infer_receiver_type(node_context)) + end + + def test_infer_receiver_type_instance_variables_in_instance_method + node_context = index_and_locate(<<~RUBY, { line: 2, character: 4 }) + class Foo + def bar + @hello1 + end + end + RUBY + + assert_equal("Foo", @type_inferrer.infer_receiver_type(node_context)) + end + + def test_infer_top_level_instance_variables + node_context = index_and_locate(<<~RUBY, { line: 0, character: 0 }) + @foo + RUBY + + assert_equal("Object", @type_inferrer.infer_receiver_type(node_context)) + end + + private + + def index_and_locate(source, position) + @index.index_single(RubyIndexer::IndexablePath.new(nil, "/fake/path/foo.rb"), source) + document = RubyLsp::RubyDocument.new( + source: source, + version: 1, + uri: URI::Generic.build(scheme: "file", path: "/fake/path/foo.rb"), + ) + document.locate_node(position) + end + end +end diff --git a/vscode/README.md b/vscode/README.md index 993bcc101..1c549eb71 100644 --- a/vscode/README.md +++ b/vscode/README.md @@ -254,28 +254,123 @@ These are the settings that may impact the Ruby LSP's behavior and their explana ### Multi-root workspaces +Multi-root workspaces are VS Code's way to allow users to organize a single repository into multiple distinct concerns. +Notice that this does not necessarily match the concept of a project. For example, a web application with separate +directories for its frontend and backend may be conceptually considered as a single project, but you can still configure +the frontend and backend directories to be different workspaces. + +The advantage of adopting this configuration is that VS Code and all extensions are informed about which directories +should be considered as possible workspace roots. Instead of having to configure each extension or tool individually so +that are aware of your project structure, you only have to do that once for the entire repository. + +Some examples of functionality that benefits from multi-root workspaces: + +- Extensions that have to integrate with project dependencies (Gemfile, package.json), such as debuggers, language + servers, formatters and other tools, are informed about where to search for these files (allowing for automatic + detection) +- If `launch.json` configurations are placed inside a workspace, VS Code will know to launch them from the appropriate + directory ([Ruby LSP example](https://github.com/Shopify/ruby-lsp/blob/main/vscode/.vscode/launch.json)), without + requiring you to specify the `cwd` +- When opening a terminal, VS Code will offer to open the terminal on all configured workspaces + The Ruby LSP supports multi-root workspaces by spawning a separate language server for each one of them. This strategy is preferred over a single language server that supports multiple workspaces because each workspace could be using a different Ruby version and completely different gems - which would be impossible to support in a single Ruby process. -Please see the [VS Code workspaces documentation](https://code.visualstudio.com/docs/editor/workspaces) on how to -configure the editor for multi-root workspaces. The Ruby LSP should work properly out of the box as long as the -workspace configuration is following the guidelines. +What matters to properly spawn the Ruby LSP is knowing where the main Gemfile of each workspace inside of the same +repository is. + +#### Example configurations -#### Monorepos containing multiple workspaces +> ![NOTE] +> To make sure Ruby LSP works well with your multi-root workspace project, please +> read through the instructions below and configure it following the examples. +> After configuring, do not forget to tell VS Code to open the workspace from the +> code-workspace file + +Consider a project where the top level of the repository is a Rails application and a sub-directory called `frontend` +contains a React application that implements the frontend layer. + +``` +my_project/ + frontend/ + Gemfile + Gemfile.lock + config.ru + super_awesome_project.code-workspace +``` + +A possible configuration for the `super_awesome_project` would be this: + +```jsonc +{ + "folders": [ + // At the top level of the repository, we have the Rails application + { + "name": "rails", + "path": ".", + }, + // Inside the frontend directory, we have the React frontend + { + "name": "react", + "path": "frontend", + }, + ], + "settings": { + // To avoid having VS Code display the same files twice, we can simply exclude the frontend sub-directory. This + // means it will only show up as a separate workspace + "files.exclude": { + "frontend": true, + }, + }, +} +``` -A common setup is using a monorepo with directories for sub-projects. For example: +Now consider a monorepo where both the client and the server are under sub-directories. ``` my_project/ client/ server/ + Gemfile + Gemfile.lock + super_awesome_project.code-workspace +``` + +In this case, we can configure the workspaces as: + +```jsonc +{ + "folders": [ + // Both parts of the project (client and server) are inside sub-directories. But since the top level might contain + // some documentation or build files, we still want it to show up + { + "name": "awesome_project", + "path": ".", + }, + // Inside the client directory, we have the client part of the project + { + "name": "client", + "path": "client", + }, + // Inside the server directory, we have the server part of the project + { + "name": "server", + "path": "server", + }, + ], + "settings": { + // We don't want to show duplicates, so we hide the directories that are already showing up as workspaces + "files.exclude": { + "server": true, + "client": true, + }, + }, +} ``` -This situation also falls under the category of multi-root workspaces. In this context, `client` and `server` are distinct -workspaces. The Ruby LSP supports this use case out of the box as long as `my_project` contains configuration that -follows [VS Code's guidelines](https://code.visualstudio.com/docs/editor/workspaces#_multiroot-workspaces) for -multi-root workspaces. +For more information, read VS Code's [workspace documentation](https://code.visualstudio.com/docs/editor/workspaces) and +[multi-root workspace documentation](https://code.visualstudio.com/docs/editor/workspaces#_multiroot-workspaces). ### Developing on containers @@ -334,4 +429,5 @@ vscode.commands.registerCommand( When `rubyLsp.formatter` is set to `auto`, Ruby LSP tries to determine which formatter to use. If the bundle has a **direct** dependency on a supported formatter, such as `rubocop` or `syntax_tree`, that will be used. -Otherwise, formatting will be disabled and you will need add one to the bundle. +Otherwise, formatting will be disabled and you will need add one to the bundle. Using globally installed formatters or +linters is not supported, they must in your Gemfile or gemspec. diff --git a/vscode/package.json b/vscode/package.json index 5872f8618..e7593cf37 100644 --- a/vscode/package.json +++ b/vscode/package.json @@ -2,7 +2,7 @@ "name": "ruby-lsp", "displayName": "Ruby LSP", "description": "VS Code plugin for connecting with the Ruby LSP", - "version": "0.5.21", + "version": "0.7.4", "publisher": "Shopify", "repository": { "type": "git", @@ -536,28 +536,28 @@ "ws": ">= 7.4.6" }, "devDependencies": { - "@babel/core": "^7.24.5", - "@shopify/eslint-plugin": "^44.0.0", + "@babel/core": "^7.24.7", + "@shopify/eslint-plugin": "^45.0.0", "@shopify/prettier-config": "^1.1.2", "@types/glob": "^8.1.0", "@types/mocha": "^10.0.6", "@types/node": "20.x", "@types/sinon": "^17.0.3", "@types/vscode": "^1.68.0", - "@typescript-eslint/eslint-plugin": "^7.8.0", - "@typescript-eslint/parser": "^7.8.0", - "@vscode/test-electron": "^2.3.9", - "@vscode/vsce": "^2.26.1", - "esbuild": "^0.20.2", + "@typescript-eslint/eslint-plugin": "^7.13.0", + "@typescript-eslint/parser": "^7.13.0", + "@vscode/test-electron": "^2.4.0", + "@vscode/vsce": "^2.27.0", + "esbuild": "^0.21.5", "eslint": "^8.57.0", "eslint-import-resolver-typescript": "^3.6.1", "eslint-plugin-prettier": "^5.1.3", - "glob": "^10.3.12", + "glob": "^10.4.1", "mocha": "^10.4.0", "ovsx": "^0.9.1", - "prettier": "^3.2.5", + "prettier": "^3.3.2", "typescript": "^5.4.5", - "sinon": "^17.0.1", + "sinon": "^18.0.0", "vscode-oniguruma": "^2.0.1", "vscode-textmate": "^9.0.0" }, diff --git a/vscode/snippets.json b/vscode/snippets.json index b890804e5..3b1f9e9a3 100644 --- a/vscode/snippets.json +++ b/vscode/snippets.json @@ -186,5 +186,19 @@ "prefix": ["unless"], "body": ["unless $1", " $0", "end"], "description": "New unless statement." + }, + "Case": { + "prefix": ["case"], + "body": [ + "case $0", + "when $1", + " $2", + "when $3", + " $4", + "else", + " $5", + "end" + ], + "description": "New case statement." } } diff --git a/vscode/src/client.ts b/vscode/src/client.ts index d00668d32..1c5d9b693 100644 --- a/vscode/src/client.ts +++ b/vscode/src/client.ts @@ -12,9 +12,10 @@ import { ExecutableOptions, ServerOptions, MessageSignature, + DocumentSelector, } from "vscode-languageclient/node"; -import { LSP_NAME, ClientInterface } from "./common"; +import { LSP_NAME, ClientInterface, Addon } from "./common"; import { Telemetry, RequestEvent } from "./telemetry"; import { Ruby } from "./ruby"; import { WorkspaceChannel } from "./workspaceChannel"; @@ -91,6 +92,8 @@ function collectClientOptions( configuration: vscode.WorkspaceConfiguration, workspaceFolder: vscode.WorkspaceFolder, outputChannel: WorkspaceChannel, + ruby: Ruby, + isMainWorkspace: boolean, ): LanguageClientOptions { const pullOn: "change" | "save" | "both" = configuration.get("pullDiagnosticsOn")!; @@ -103,8 +106,47 @@ function collectClientOptions( const features: EnabledFeatures = configuration.get("enabledFeatures")!; const enabledFeatures = Object.keys(features).filter((key) => features[key]); + const fsPath = workspaceFolder.uri.fsPath.replace(/\/$/, ""); + const documentSelector: DocumentSelector = [ + { + language: "ruby", + pattern: `${fsPath}/**/*`, + }, + ]; + + // Only the first language server we spawn should handle unsaved files, otherwise requests will be duplicated across + // all workspaces + if (isMainWorkspace) { + documentSelector.push({ + language: "ruby", + scheme: "untitled", + }); + } + + // For each workspace, the language client is responsible for handling requests for: + // 1. Files inside of the workspace itself + // 2. Bundled gems + // 3. Default gems + + if (ruby.env.GEM_PATH) { + const parts = ruby.env.GEM_PATH.split(path.delimiter); + + // Because of how default gems are installed, the entry in the `GEM_PATH` is actually not exactly where the files + // are located. With the regex, we are correcting the default gem path from this (where the files are not located) + // /opt/rubies/3.3.1/lib/ruby/gems/3.3.0 + // + // to this (where the files are actually stored) + // /opt/rubies/3.3.1/lib/ruby/3.3.0 + parts.forEach((gemPath) => { + documentSelector.push({ + language: "ruby", + pattern: `${gemPath.replace(/lib\/ruby\/gems\/(?=\d)/, "lib/ruby/")}/**/*`, + }); + }); + } + return { - documentSelector: [{ language: "ruby" }], + documentSelector, workspaceFolder, diagnosticCollectionName: LSP_NAME, outputChannel, @@ -125,11 +167,13 @@ function collectClientOptions( export default class Client extends LanguageClient implements ClientInterface { public readonly ruby: Ruby; public serverVersion?: string; + public addons?: Addon[]; private readonly workingDirectory: string; private readonly telemetry: Telemetry; private readonly createTestItems: (response: CodeLens[]) => void; private readonly baseFolder; private requestId = 0; + private readonly workspaceOutputChannel: WorkspaceChannel; #context: vscode.ExtensionContext; #formatter: string; @@ -141,6 +185,7 @@ export default class Client extends LanguageClient implements ClientInterface { createTestItems: (response: CodeLens[]) => void, workspaceFolder: vscode.WorkspaceFolder, outputChannel: WorkspaceChannel, + isMainWorkspace = false, ) { super( LSP_NAME, @@ -149,9 +194,13 @@ export default class Client extends LanguageClient implements ClientInterface { vscode.workspace.getConfiguration("rubyLsp"), workspaceFolder, outputChannel, + ruby, + isMainWorkspace, ), ); + this.workspaceOutputChannel = outputChannel; + // Middleware are part of client options, but because they must reference `this`, we cannot make it a part of the // `super` call (TypeScript does not allow accessing `this` before invoking `super`) this.registerMiddleware(); @@ -165,10 +214,22 @@ export default class Client extends LanguageClient implements ClientInterface { this.#formatter = ""; } - override async start() { - await super.start(); + async afterStart() { this.#formatter = this.initializeResult?.formatter; this.serverVersion = this.initializeResult?.serverInfo?.version; + await this.fetchAddons(); + } + + async fetchAddons() { + if (this.initializeResult?.capabilities.experimental?.addon_detection) { + try { + this.addons = await this.sendRequest("rubyLsp/workspace/addons", {}); + } catch (error: any) { + this.workspaceOutputChannel.error( + `Error while fetching addons: ${error.data.errorMessage}`, + ); + } + } } get formatter(): string { diff --git a/vscode/src/common.ts b/vscode/src/common.ts index bb125a209..87eabaf1e 100644 --- a/vscode/src/common.ts +++ b/vscode/src/common.ts @@ -26,9 +26,15 @@ export interface RubyInterface { rubyVersion?: string; } +export interface Addon { + name: string; + errored: boolean; +} + export interface ClientInterface { state: State; formatter: string; + addons?: Addon[]; serverVersion?: string; sendRequest( method: string, diff --git a/vscode/src/extension.ts b/vscode/src/extension.ts index eb509b63e..5a06aaf14 100644 --- a/vscode/src/extension.ts +++ b/vscode/src/extension.ts @@ -8,6 +8,19 @@ export async function activate(context: vscode.ExtensionContext) { await migrateManagerConfigurations(); if (!vscode.workspace.workspaceFolders) { + // We currently don't support usage without any workspace folders opened. Here we warn the user, point to the issue + // and offer to open a folder instead + const answer = await vscode.window.showWarningMessage( + `Using the Ruby LSP without any workspaces opened is currently not supported + ([learn more](https://github.com/Shopify/ruby-lsp/issues/1780))`, + "Open a workspace", + "Continue anyway", + ); + + if (answer === "Open a workspace") { + await vscode.commands.executeCommand("workbench.action.files.openFolder"); + } + return; } diff --git a/vscode/src/ruby/asdf.ts b/vscode/src/ruby/asdf.ts index 8c83ed276..86a3ae1e2 100644 --- a/vscode/src/ruby/asdf.ts +++ b/vscode/src/ruby/asdf.ts @@ -1,12 +1,10 @@ /* eslint-disable no-process-env */ -import path from "path"; import os from "os"; +import path from "path"; import * as vscode from "vscode"; -import { asyncExec } from "../common"; - import { VersionManager, ActivationResult } from "./versionManager"; // A tool to manage multiple runtime versions with a single CLI tool @@ -15,31 +13,15 @@ import { VersionManager, ActivationResult } from "./versionManager"; export class Asdf extends VersionManager { async activate(): Promise { const asdfUri = await this.findAsdfInstallation(); - const asdfDaraDirUri = await this.findAsdfDataDir(); const activationScript = "STDERR.print({env: ENV.to_h,yjit:!!defined?(RubyVM::YJIT),version:RUBY_VERSION}.to_json)"; - const result = await asyncExec( + const result = await this.runScript( `. ${asdfUri.fsPath} && asdf exec ruby -W0 -rjson -e '${activationScript}'`, - { - cwd: this.bundleUri.fsPath, - env: { - ASDF_DIR: path.dirname(asdfUri.fsPath), - ASDF_DATA_DIR: asdfDaraDirUri.fsPath, - }, - }, ); const parsedResult = this.parseWithErrorHandling(result.stderr); - // ASDF does not set GEM_HOME or GEM_PATH. It also does not add the gem bin directories to the PATH. Instead, it - // adds its shims directory to the PATH, where all gems have a shim that invokes the gem's executable with the right - // version - parsedResult.env.PATH = [ - vscode.Uri.joinPath(asdfDaraDirUri, "shims").fsPath, - parsedResult.env.PATH, - ].join(path.delimiter); - return { env: { ...process.env, ...parsedResult.env }, yjit: parsedResult.yjit, @@ -47,49 +29,11 @@ export class Asdf extends VersionManager { }; } - // Find the ASDF data directory. The default is for this to be in the same directories where we'd find the asdf.sh - // file, but that may not be the case for a Homebrew installation, in which case the we'd have - // `/opt/homebrew/opt/asdf/libexec/asdf.sh`, but the data directory might be `~/.asdf` - async findAsdfDataDir(): Promise { - const possiblePaths = [ - vscode.Uri.joinPath(vscode.Uri.file(os.homedir()), ".asdf"), - vscode.Uri.joinPath(vscode.Uri.file("/"), "opt", "asdf-vm"), - vscode.Uri.joinPath( - vscode.Uri.file("/"), - "opt", - "homebrew", - "opt", - "asdf", - "libexec", - ), - vscode.Uri.joinPath( - vscode.Uri.file("/"), - "usr", - "local", - "opt", - "asdf", - "libexec", - ), - ]; - - for (const possiblePath of possiblePaths) { - try { - await vscode.workspace.fs.stat( - vscode.Uri.joinPath(possiblePath, "shims"), - ); - return possiblePath; - } catch (error: any) { - // Continue looking - } - } - - throw new Error( - `Could not find ASDF data dir. Searched in ${possiblePaths.join(", ")}`, - ); - } - // Only public for testing. Finds the ASDF installation URI based on what's advertised in the ASDF documentation async findAsdfInstallation(): Promise { + const scriptName = + path.basename(vscode.env.shell) === "fish" ? "asdf.fish" : "asdf.sh"; + // Possible ASDF installation paths as described in https://asdf-vm.com/guide/getting-started.html#_3-install-asdf. // In order, the methods of installation are: // 1. Git @@ -97,8 +41,8 @@ export class Asdf extends VersionManager { // 3. Homebrew M series // 4. Homebrew Intel series const possiblePaths = [ - vscode.Uri.joinPath(vscode.Uri.file(os.homedir()), ".asdf", "asdf.sh"), - vscode.Uri.joinPath(vscode.Uri.file("/"), "opt", "asdf-vm", "asdf.sh"), + vscode.Uri.joinPath(vscode.Uri.file(os.homedir()), ".asdf", scriptName), + vscode.Uri.joinPath(vscode.Uri.file("/"), "opt", "asdf-vm", scriptName), vscode.Uri.joinPath( vscode.Uri.file("/"), "opt", @@ -106,7 +50,7 @@ export class Asdf extends VersionManager { "opt", "asdf", "libexec", - "asdf.sh", + scriptName, ), vscode.Uri.joinPath( vscode.Uri.file("/"), @@ -115,7 +59,7 @@ export class Asdf extends VersionManager { "opt", "asdf", "libexec", - "asdf.sh", + scriptName, ), ]; diff --git a/vscode/src/ruby/chruby.ts b/vscode/src/ruby/chruby.ts index 55763ee3f..e36bed5d4 100644 --- a/vscode/src/ruby/chruby.ts +++ b/vscode/src/ruby/chruby.ts @@ -4,7 +4,6 @@ import path from "path"; import * as vscode from "vscode"; -import { asyncExec } from "../common"; import { WorkspaceChannel } from "../workspaceChannel"; import { ActivationResult, VersionManager } from "./versionManager"; @@ -19,8 +18,8 @@ interface RubyVersion { export class Chruby extends VersionManager { // Only public so that we can point to a different directory in tests public rubyInstallationUris = [ - vscode.Uri.joinPath(vscode.Uri.file("/"), "opt", "rubies"), vscode.Uri.joinPath(vscode.Uri.file(os.homedir()), ".rubies"), + vscode.Uri.joinPath(vscode.Uri.file("/"), "opt", "rubies"), ]; constructor( @@ -43,6 +42,10 @@ export class Chruby extends VersionManager { async activate(): Promise { const versionInfo = await this.discoverRubyVersion(); const rubyUri = await this.findRubyUri(versionInfo); + this.outputChannel.info( + `Discovered Ruby installation at ${rubyUri.fsPath}`, + ); + const { defaultGems, gemHome, yjit, version } = await this.runActivationScript(rubyUri); @@ -56,7 +59,7 @@ export class Chruby extends VersionManager { PATH: `${path.join(gemHome, "bin")}${path.delimiter}${path.join( defaultGems, "bin", - )}${path.delimiter}${path.dirname(rubyUri.fsPath)}${path.delimiter}${process.env.PATH}`, + )}${path.delimiter}${path.dirname(rubyUri.fsPath)}${path.delimiter}${this.getProcessPath()}`, }; return { @@ -66,6 +69,10 @@ export class Chruby extends VersionManager { }; } + protected getProcessPath() { + return process.env.PATH; + } + // Returns the full URI to the Ruby executable protected async findRubyUri(rubyVersion: RubyVersion): Promise { if (/\d+\.\d+\.\d+/.exec(rubyVersion.version)) { @@ -83,9 +90,19 @@ export class Chruby extends VersionManager { : [rubyVersion.version, `ruby-${rubyVersion.version}`]; for (const uri of this.rubyInstallationUris) { - const directories = (await vscode.workspace.fs.readDirectory(uri)).sort( - (left, right) => right[0].localeCompare(left[0]), - ); + let directories; + + try { + directories = (await vscode.workspace.fs.readDirectory(uri)).sort( + (left, right) => right[0].localeCompare(left[0]), + ); + } catch (error: any) { + // If the directory doesn't exist, keep searching + this.outputChannel.debug( + `Tried searching for Ruby installation in ${uri.fsPath} but it doesn't exist`, + ); + continue; + } for (const versionName of possibleVersionNames) { const targetDirectory = directories.find(([name]) => @@ -124,6 +141,9 @@ export class Chruby extends VersionManager { return vscode.Uri.joinPath(installationUri, "bin", "ruby"); } catch (_error: any) { // Continue to the next version name + this.outputChannel.debug( + `Tried searching for Ruby installation in ${uri.fsPath} but it doesn't exist`, + ); } } } @@ -168,7 +188,7 @@ export class Chruby extends VersionManager { } this.outputChannel.info( - `Discovered Ruby version ${version} from ${rubyVersionUri.toString()}`, + `Discovered Ruby version ${version} from ${rubyVersionUri.fsPath}`, ); return { engine: match.groups.engine, version: match.groups.version }; } @@ -203,9 +223,8 @@ export class Chruby extends VersionManager { "STDERR.print(JSON.dump(data))", ].join(";"); - const result = await asyncExec( + const result = await this.runScript( `${rubyExecutableUri.fsPath} -W0 -rjson -e '${script}'`, - { cwd: this.bundleUri.fsPath }, ); return this.parseWithErrorHandling(result.stderr); diff --git a/vscode/src/ruby/custom.ts b/vscode/src/ruby/custom.ts index f81b42046..866cfea08 100644 --- a/vscode/src/ruby/custom.ts +++ b/vscode/src/ruby/custom.ts @@ -1,8 +1,6 @@ /* eslint-disable no-process-env */ import * as vscode from "vscode"; -import { asyncExec } from "../common"; - import { VersionManager, ActivationResult } from "./versionManager"; // Custom @@ -15,11 +13,8 @@ export class Custom extends VersionManager { const activationScript = "STDERR.print({ env: ENV.to_h, yjit: !!defined?(RubyVM::YJIT), version: RUBY_VERSION }.to_json)"; - const result = await asyncExec( + const result = await this.runScript( `${this.customCommand()} && ruby -W0 -rjson -e '${activationScript}'`, - { - cwd: this.bundleUri.fsPath, - }, ); const parsedResult = this.parseWithErrorHandling(result.stderr); diff --git a/vscode/src/ruby/mise.ts b/vscode/src/ruby/mise.ts index c9a142a0b..c73e668dc 100644 --- a/vscode/src/ruby/mise.ts +++ b/vscode/src/ruby/mise.ts @@ -3,8 +3,6 @@ import os from "os"; import * as vscode from "vscode"; -import { asyncExec } from "../common"; - import { VersionManager, ActivationResult } from "./versionManager"; // Mise (mise en place) is a manager for dev tools, environment variables and tasks @@ -18,11 +16,8 @@ export class Mise extends VersionManager { "STDERR.print({ env: ENV.to_h, yjit: !!defined?(RubyVM::YJIT), version: RUBY_VERSION }.to_json)"; // The exec command in Mise is called `x` - const result = await asyncExec( + const result = await this.runScript( `${miseUri.fsPath} x -- ruby -W0 -rjson -e '${activationScript}'`, - { - cwd: this.bundleUri.fsPath, - }, ); const parsedResult = this.parseWithErrorHandling(result.stderr); diff --git a/vscode/src/ruby/none.ts b/vscode/src/ruby/none.ts index 729ec6b3e..a2d0e3f14 100644 --- a/vscode/src/ruby/none.ts +++ b/vscode/src/ruby/none.ts @@ -1,7 +1,6 @@ /* eslint-disable no-process-env */ import * as vscode from "vscode"; -import { asyncExec } from "../common"; import { WorkspaceChannel } from "../workspaceChannel"; import { VersionManager, ActivationResult } from "./versionManager"; @@ -30,11 +29,8 @@ export class None extends VersionManager { const activationScript = "STDERR.print({ env: ENV.to_h, yjit: !!defined?(RubyVM::YJIT), version: RUBY_VERSION }.to_json)"; - const result = await asyncExec( + const result = await this.runScript( `${this.rubyPath} -W0 -rjson -e '${activationScript}'`, - { - cwd: this.bundleUri.fsPath, - }, ); const parsedResult = this.parseWithErrorHandling(result.stderr); diff --git a/vscode/src/ruby/rbenv.ts b/vscode/src/ruby/rbenv.ts index 8b5ae160a..82fc25797 100644 --- a/vscode/src/ruby/rbenv.ts +++ b/vscode/src/ruby/rbenv.ts @@ -1,7 +1,5 @@ /* eslint-disable no-process-env */ -import { asyncExec } from "../common"; - import { VersionManager, ActivationResult } from "./versionManager"; // Seamlessly manage your app’s Ruby environment with rbenv. @@ -12,11 +10,8 @@ export class Rbenv extends VersionManager { const activationScript = "STDERR.print({env: ENV.to_h,yjit:!!defined?(RubyVM::YJIT),version:RUBY_VERSION}.to_json)"; - const result = await asyncExec( + const result = await this.runScript( `rbenv exec ruby -W0 -rjson -e '${activationScript}'`, - { - cwd: this.bundleUri.fsPath, - }, ); const parsedResult = this.parseWithErrorHandling(result.stderr); diff --git a/vscode/src/ruby/rubyInstaller.ts b/vscode/src/ruby/rubyInstaller.ts index aeb845d8a..043e9bf23 100644 --- a/vscode/src/ruby/rubyInstaller.ts +++ b/vscode/src/ruby/rubyInstaller.ts @@ -1,3 +1,4 @@ +/* eslint-disable no-process-env */ import os from "os"; import * as vscode from "vscode"; @@ -16,6 +17,12 @@ interface RubyVersion { // // If we can't find it there, then we throw an error and rely on the user to manually select where Ruby is installed. export class RubyInstaller extends Chruby { + // Environment variables are case sensitive on Windows when we access them through NodeJS. We need to ensure that + // we're searching through common variations, so that we don't accidentally miss the path we should inherit + protected getProcessPath() { + return process.env.Path ?? process.env.PATH ?? process.env.path; + } + // Returns the full URI to the Ruby executable protected async findRubyUri(rubyVersion: RubyVersion): Promise { const [major, minor, _patch] = rubyVersion.version.split(".").map(Number); diff --git a/vscode/src/ruby/rvm.ts b/vscode/src/ruby/rvm.ts index 220fd8398..a89717640 100644 --- a/vscode/src/ruby/rvm.ts +++ b/vscode/src/ruby/rvm.ts @@ -3,8 +3,6 @@ import os from "os"; import * as vscode from "vscode"; -import { asyncExec } from "../common"; - import { ActivationResult, VersionManager } from "./versionManager"; // Ruby enVironment Manager. It manages Ruby application environments and enables switching between them. @@ -17,12 +15,8 @@ export class Rvm extends VersionManager { "STDERR.print({ env: ENV.to_h, yjit: !!defined?(RubyVM::YJIT), version: RUBY_VERSION }.to_json)"; const installationPath = await this.findRvmInstallation(); - - const result = await asyncExec( + const result = await this.runScript( `${installationPath.fsPath} -W0 -rjson -e '${activationScript}'`, - { - cwd: this.bundleUri.fsPath, - }, ); const parsedResult = this.parseWithErrorHandling(result.stderr); diff --git a/vscode/src/ruby/shadowenv.ts b/vscode/src/ruby/shadowenv.ts index d9224aabf..5038a7fa6 100644 --- a/vscode/src/ruby/shadowenv.ts +++ b/vscode/src/ruby/shadowenv.ts @@ -26,11 +26,8 @@ export class Shadowenv extends VersionManager { "STDERR.print({ env: ENV.to_h, yjit: !!defined?(RubyVM::YJIT), version: RUBY_VERSION }.to_json)"; try { - const result = await asyncExec( + const result = await this.runScript( `shadowenv exec -- ruby -W0 -rjson -e '${activationScript}'`, - { - cwd: this.bundleUri.fsPath, - }, ); const parsedResult = this.parseWithErrorHandling(result.stderr); diff --git a/vscode/src/ruby/versionManager.ts b/vscode/src/ruby/versionManager.ts index 8a8d6b392..719b17678 100644 --- a/vscode/src/ruby/versionManager.ts +++ b/vscode/src/ruby/versionManager.ts @@ -1,8 +1,10 @@ +/* eslint-disable no-process-env */ import path from "path"; import * as vscode from "vscode"; import { WorkspaceChannel } from "../workspaceChannel"; +import { asyncExec } from "../common"; export interface ActivationResult { env: NodeJS.ProcessEnv; @@ -54,4 +56,23 @@ export abstract class VersionManager { throw error; } } + + // Runs the given command in the directory for the Bundle, using the user's preferred shell and inheriting the current + // process environment + protected runScript(command: string) { + const shell = vscode.env.shell.length > 0 ? vscode.env.shell : undefined; + + this.outputChannel.info( + `Running command: \`${command}\` in ${this.bundleUri.fsPath} using shell: ${shell}`, + ); + this.outputChannel.debug( + `Environment used for command: ${JSON.stringify(process.env)}`, + ); + + return asyncExec(command, { + cwd: this.bundleUri.fsPath, + shell, + env: process.env, + }); + } } diff --git a/vscode/src/rubyLsp.ts b/vscode/src/rubyLsp.ts index d64fa5f5e..a93dec0ae 100644 --- a/vscode/src/rubyLsp.ts +++ b/vscode/src/rubyLsp.ts @@ -161,6 +161,7 @@ export class RubyLsp { workspaceFolder, this.telemetry, this.testController.createTestItems.bind(this.testController), + eager, ); this.workspaces.set(workspaceFolder.uri.toString(), workspace); @@ -184,7 +185,11 @@ export class RubyLsp { context.subscriptions.push( vscode.commands.registerCommand(Command.Update, async () => { const workspace = await this.showWorkspacePick(); - await workspace?.installOrUpdateServer(); + + if (workspace) { + await workspace.installOrUpdateServer(true); + await workspace.restart(); + } }), vscode.commands.registerCommand(Command.Start, async () => { const workspace = await this.showWorkspacePick(); diff --git a/vscode/src/status.ts b/vscode/src/status.ts index 773399a3b..804c35815 100644 --- a/vscode/src/status.ts +++ b/vscode/src/status.ts @@ -178,6 +178,32 @@ export class FormatterStatus extends StatusItem { } } +export class AddonsStatus extends StatusItem { + constructor() { + super("addons"); + + this.item.name = "Ruby LSP Addons"; + this.item.text = "Fetching addon information"; + } + + refresh(workspace: WorkspaceInterface): void { + if (!workspace.lspClient) { + return; + } + if (workspace.lspClient.addons === undefined) { + this.item.text = + "Addons: requires server to be v0.17.4 or higher to display this field"; + } else if (workspace.lspClient.addons.length === 0) { + this.item.text = "Addons: none"; + } else { + const addonNames = workspace.lspClient.addons.map((addon) => + addon.errored ? `${addon.name} (errored)` : `${addon.name}`, + ); + this.item.text = `Addons: ${addonNames.join(", ")}`; + } + } +} + export class StatusItems { private readonly items: StatusItem[] = []; @@ -188,6 +214,7 @@ export class StatusItems { new ExperimentalFeaturesStatus(), new FeaturesStatus(), new FormatterStatus(), + new AddonsStatus(), ]; STATUS_EMITTER.event((workspace) => { diff --git a/vscode/src/test/suite/client.test.ts b/vscode/src/test/suite/client.test.ts index c0883c852..f79df6889 100644 --- a/vscode/src/test/suite/client.test.ts +++ b/vscode/src/test/suite/client.test.ts @@ -1,6 +1,8 @@ -import * as assert from "assert"; -import * as path from "path"; +/* eslint-disable no-process-env */ +import assert from "assert"; +import path from "path"; import os from "os"; +import fs from "fs"; import * as vscode from "vscode"; import { @@ -19,14 +21,49 @@ import { TextEdit, SelectionRange, CodeAction, + TextDocumentFilter, } from "vscode-languageclient/node"; import { after, afterEach, before } from "mocha"; import { Ruby, ManagerIdentifier } from "../../ruby"; import { Telemetry, TelemetryApi, TelemetryEvent } from "../../telemetry"; import Client from "../../client"; -import { LOG_CHANNEL } from "../../common"; import { WorkspaceChannel } from "../../workspaceChannel"; +import { RUBY_VERSION } from "../rubyVersion"; + +const [major, minor, _patch] = RUBY_VERSION.split("."); + +class FakeLogger { + receivedMessages = ""; + + trace(message: string, ..._args: any[]): void { + this.receivedMessages += message; + } + + debug(message: string, ..._args: any[]): void { + this.receivedMessages += message; + } + + info(message: string, ..._args: any[]): void { + this.receivedMessages += message; + } + + warn(message: string, ..._args: any[]): void { + this.receivedMessages += message; + } + + error(error: string | Error, ..._args: any[]): void { + this.receivedMessages += error.toString(); + } + + append(value: string): void { + this.receivedMessages += value; + } + + appendLine(value: string): void { + this.receivedMessages += value; + } +} class FakeApi implements TelemetryApi { public sentEvents: TelemetryEvent[]; @@ -56,7 +93,61 @@ async function launchClient(workspaceUri: vscode.Uri) { update: (_name: string, _value: any) => Promise.resolve(), }, } as unknown as vscode.ExtensionContext; - const outputChannel = new WorkspaceChannel("fake", LOG_CHANNEL); + const fakeLogger = new FakeLogger(); + const outputChannel = new WorkspaceChannel("fake", fakeLogger as any); + + // Ensure that we're activating the correct Ruby version on CI + if (process.env.CI) { + if (os.platform() === "linux") { + await vscode.workspace + .getConfiguration("rubyLsp") + .update( + "rubyVersionManager", + { identifier: ManagerIdentifier.Chruby }, + true, + ); + + fs.mkdirSync(path.join(os.homedir(), ".rubies"), { recursive: true }); + fs.symlinkSync( + `/opt/hostedtoolcache/Ruby/${RUBY_VERSION}/x64`, + path.join(os.homedir(), ".rubies", RUBY_VERSION), + ); + } else if (os.platform() === "darwin") { + await vscode.workspace + .getConfiguration("rubyLsp") + .update( + "rubyVersionManager", + { identifier: ManagerIdentifier.Chruby }, + true, + ); + + fs.mkdirSync(path.join(os.homedir(), ".rubies"), { recursive: true }); + fs.symlinkSync( + `/Users/runner/hostedtoolcache/Ruby/${RUBY_VERSION}/arm64`, + path.join(os.homedir(), ".rubies", RUBY_VERSION), + ); + } else { + await vscode.workspace + .getConfiguration("rubyLsp") + .update( + "rubyVersionManager", + { identifier: ManagerIdentifier.RubyInstaller }, + true, + ); + + fs.symlinkSync( + path.join( + "C:", + "hostedtoolcache", + "windows", + "Ruby", + RUBY_VERSION, + "x64", + ), + path.join("C:", `Ruby${major}${minor}-${os.arch()}`), + ); + } + } const ruby = new Ruby(context, workspaceFolder, outputChannel); await ruby.activateRuby(); @@ -72,6 +163,12 @@ async function launchClient(workspaceUri: vscode.Uri) { outputChannel, ); + client.clientOptions.initializationFailedHandler = (error) => { + assert.fail( + `Failed to start server ${error.message}\n${fakeLogger.receivedMessages}`, + ); + }; + try { await client.start(); } catch (error: any) { @@ -113,18 +210,6 @@ suite("Client", () => { // eslint-disable-next-line no-invalid-this this.timeout(90000); - - // eslint-disable-next-line no-process-env - if (process.env.CI) { - await vscode.workspace - .getConfiguration("rubyLsp") - .update( - "rubyVersionManager", - { identifier: ManagerIdentifier.None }, - true, - true, - ); - } client = await launchClient(workspaceUri); }); @@ -138,6 +223,20 @@ suite("Client", () => { } catch (error: any) { assert.fail(`Failed to stop server: ${error.message}`); } + + if (process.env.CI) { + if (os.platform() === "linux" || os.platform() === "darwin") { + fs.rmSync(path.join(os.homedir(), ".rubies"), { + recursive: true, + force: true, + }); + } else { + fs.rmSync(path.join("C:", `Ruby${major}${minor}-${os.arch()}`), { + recursive: true, + force: true, + }); + } + } }); afterEach(async () => { @@ -554,6 +653,7 @@ suite("Client", () => { "codeAction/resolve", { kind: "refactor.extract", + title: "Refactor: Extract Variable", data: { range: { start: { line: 1, character: 1 }, @@ -566,4 +666,24 @@ suite("Client", () => { assert.strictEqual(response.title, "Refactor: Extract Variable"); }).timeout(20000); + + test("document selectors match default gems and bundled gems appropriately", () => { + const [workspaceFilter, bundledGemsFilter, defaultGemsFilter] = + client.clientOptions.documentSelector!; + + assert.strictEqual( + (workspaceFilter as TextDocumentFilter).pattern!, + `${workspaceUri.fsPath}/**/*`, + ); + + assert.match( + (bundledGemsFilter as TextDocumentFilter).pattern!, + new RegExp(`ruby\\/\\d\\.\\d\\.\\d\\/\\*\\*\\/\\*`), + ); + + assert.match( + (defaultGemsFilter as TextDocumentFilter).pattern!, + /lib\/ruby\/\d\.\d\.\d\/\*\*\/\*/, + ); + }); }); diff --git a/vscode/src/test/suite/ruby/asdf.test.ts b/vscode/src/test/suite/ruby/asdf.test.ts index fb07b3f15..0eccc53c6 100644 --- a/vscode/src/test/suite/ruby/asdf.test.ts +++ b/vscode/src/test/suite/ruby/asdf.test.ts @@ -41,9 +41,7 @@ suite("Asdf", () => { const findInstallationStub = sinon .stub(asdf, "findAsdfInstallation") .resolves(vscode.Uri.file(`${os.homedir()}/.asdf/asdf.sh`)); - const findDataDirStub = sinon - .stub(asdf, "findAsdfDataDir") - .resolves(vscode.Uri.file(`${os.homedir()}/.asdf`)); + const shellStub = sinon.stub(vscode.env, "shell").get(() => "/bin/bash"); const { env, version, yjit } = await asdf.activate(); @@ -52,21 +50,71 @@ suite("Asdf", () => { `. ${os.homedir()}/.asdf/asdf.sh && asdf exec ruby -W0 -rjson -e '${activationScript}'`, { cwd: workspacePath, - env: { - ASDF_DIR: `${os.homedir()}/.asdf`, - ASDF_DATA_DIR: `${os.homedir()}/.asdf`, - }, + shell: "/bin/bash", + // eslint-disable-next-line no-process-env + env: process.env, }, ), ); assert.strictEqual(version, "3.0.0"); assert.strictEqual(yjit, true); - assert.ok(env.PATH!.includes(`${os.homedir()}/.asdf/shims`)); assert.strictEqual(env.ANY, "true"); execStub.restore(); findInstallationStub.restore(); - findDataDirStub.restore(); + shellStub.restore(); + }); + + test("Searches for asdf.fish when using the fish shell", async () => { + // eslint-disable-next-line no-process-env + const workspacePath = process.env.PWD!; + const workspaceFolder = { + uri: vscode.Uri.from({ scheme: "file", path: workspacePath }), + name: path.basename(workspacePath), + index: 0, + }; + const outputChannel = new WorkspaceChannel("fake", common.LOG_CHANNEL); + const asdf = new Asdf(workspaceFolder, outputChannel); + const activationScript = + "STDERR.print({env: ENV.to_h,yjit:!!defined?(RubyVM::YJIT),version:RUBY_VERSION}.to_json)"; + + const execStub = sinon.stub(common, "asyncExec").resolves({ + stdout: "", + stderr: JSON.stringify({ + env: { ANY: "true" }, + yjit: true, + version: "3.0.0", + }), + }); + + const findInstallationStub = sinon + .stub(asdf, "findAsdfInstallation") + .resolves(vscode.Uri.file(`${os.homedir()}/.asdf/asdf.fish`)); + const shellStub = sinon + .stub(vscode.env, "shell") + .get(() => "/opt/homebrew/bin/fish"); + + const { env, version, yjit } = await asdf.activate(); + + assert.ok( + execStub.calledOnceWithExactly( + `. ${os.homedir()}/.asdf/asdf.fish && asdf exec ruby -W0 -rjson -e '${activationScript}'`, + { + cwd: workspacePath, + shell: "/opt/homebrew/bin/fish", + // eslint-disable-next-line no-process-env + env: process.env, + }, + ), + ); + + assert.strictEqual(version, "3.0.0"); + assert.strictEqual(yjit, true); + assert.strictEqual(env.ANY, "true"); + + execStub.restore(); + findInstallationStub.restore(); + shellStub.restore(); }); }); diff --git a/vscode/src/test/suite/ruby/chruby.test.ts b/vscode/src/test/suite/ruby/chruby.test.ts index 80d7df504..5b37d51d9 100644 --- a/vscode/src/test/suite/ruby/chruby.test.ts +++ b/vscode/src/test/suite/ruby/chruby.test.ts @@ -216,4 +216,31 @@ suite("Chruby", () => { force: true, }); }); + + test("Continues searching if first directory doesn't exist for omitted patch", async () => { + fs.mkdirSync( + path.join(rootPath, "opt", "rubies", `${major}.${minor}.0`, "bin"), + { + recursive: true, + }, + ); + + fs.writeFileSync( + path.join(workspacePath, ".ruby-version"), + `${major}.${minor}`, + ); + + const chruby = new Chruby(workspaceFolder, outputChannel); + chruby.rubyInstallationUris = [ + vscode.Uri.file(path.join(rootPath, ".rubies")), + vscode.Uri.file(path.join(rootPath, "opt", "rubies")), + ]; + + const { env, version, yjit } = await chruby.activate(); + + assert.match(env.GEM_PATH!, new RegExp(`ruby/${VERSION_REGEX}`)); + assert.match(env.GEM_PATH!, new RegExp(`lib/ruby/gems/${VERSION_REGEX}`)); + assert.strictEqual(version, RUBY_VERSION); + assert.notStrictEqual(yjit, undefined); + }); }); diff --git a/vscode/src/test/suite/ruby/custom.test.ts b/vscode/src/test/suite/ruby/custom.test.ts index 83935f14f..8bafdf7db 100644 --- a/vscode/src/test/suite/ruby/custom.test.ts +++ b/vscode/src/test/suite/ruby/custom.test.ts @@ -43,7 +43,12 @@ suite("Custom", () => { assert.ok( execStub.calledOnceWithExactly( `my_version_manager activate_env && ruby -W0 -rjson -e '${activationScript}'`, - { cwd: uri.fsPath }, + { + cwd: uri.fsPath, + shell: vscode.env.shell, + // eslint-disable-next-line no-process-env + env: process.env, + }, ), ); diff --git a/vscode/src/test/suite/ruby/mise.test.ts b/vscode/src/test/suite/ruby/mise.test.ts index 0283c0f8a..273132e27 100644 --- a/vscode/src/test/suite/ruby/mise.test.ts +++ b/vscode/src/test/suite/ruby/mise.test.ts @@ -55,7 +55,12 @@ suite("Mise", () => { assert.ok( execStub.calledOnceWithExactly( `${os.homedir()}/.local/bin/mise x -- ruby -W0 -rjson -e '${activationScript}'`, - { cwd: workspacePath }, + { + cwd: workspacePath, + shell: vscode.env.shell, + // eslint-disable-next-line no-process-env + env: process.env, + }, ), ); @@ -109,7 +114,12 @@ suite("Mise", () => { assert.ok( execStub.calledOnceWithExactly( `${misePath} x -- ruby -W0 -rjson -e '${activationScript}'`, - { cwd: workspacePath }, + { + cwd: workspacePath, + shell: vscode.env.shell, + // eslint-disable-next-line no-process-env + env: process.env, + }, ), ); diff --git a/vscode/src/test/suite/ruby/none.test.ts b/vscode/src/test/suite/ruby/none.test.ts index 972413170..416a58e1d 100644 --- a/vscode/src/test/suite/ruby/none.test.ts +++ b/vscode/src/test/suite/ruby/none.test.ts @@ -40,7 +40,12 @@ suite("None", () => { assert.ok( execStub.calledOnceWithExactly( `ruby -W0 -rjson -e '${activationScript}'`, - { cwd: uri.fsPath }, + { + cwd: uri.fsPath, + shell: vscode.env.shell, + // eslint-disable-next-line no-process-env + env: process.env, + }, ), ); diff --git a/vscode/src/test/suite/ruby/rbenv.test.ts b/vscode/src/test/suite/ruby/rbenv.test.ts index 51d4c0ade..91e29d36e 100644 --- a/vscode/src/test/suite/ruby/rbenv.test.ts +++ b/vscode/src/test/suite/ruby/rbenv.test.ts @@ -44,7 +44,12 @@ suite("Rbenv", () => { assert.ok( execStub.calledOnceWithExactly( `rbenv exec ruby -W0 -rjson -e '${activationScript}'`, - { cwd: workspacePath }, + { + cwd: workspacePath, + shell: vscode.env.shell, + // eslint-disable-next-line no-process-env + env: process.env, + }, ), ); @@ -83,7 +88,12 @@ suite("Rbenv", () => { assert.ok( execStub.calledOnceWithExactly( `rbenv exec ruby -W0 -rjson -e '${activationScript}'`, - { cwd: workspacePath }, + { + cwd: workspacePath, + shell: vscode.env.shell, + // eslint-disable-next-line no-process-env + env: process.env, + }, ), ); diff --git a/vscode/src/test/suite/ruby/rvm.test.ts b/vscode/src/test/suite/ruby/rvm.test.ts index b5a712a10..54f41a502 100644 --- a/vscode/src/test/suite/ruby/rvm.test.ts +++ b/vscode/src/test/suite/ruby/rvm.test.ts @@ -57,7 +57,11 @@ suite("RVM", () => { assert.ok( execStub.calledOnceWithExactly( `${path.join(os.homedir(), ".rvm", "bin", "rvm-auto-ruby")} -W0 -rjson -e '${activationScript}'`, - { cwd: workspacePath }, + { + cwd: workspacePath, + shell: vscode.env.shell, + env: process.env, + }, ), ); diff --git a/vscode/src/test/suite/status.test.ts b/vscode/src/test/suite/status.test.ts index a15270a39..0cc5af551 100644 --- a/vscode/src/test/suite/status.test.ts +++ b/vscode/src/test/suite/status.test.ts @@ -13,6 +13,7 @@ import { StatusItem, FeaturesStatus, FormatterStatus, + AddonsStatus, } from "../../status"; import { Command, WorkspaceInterface } from "../../common"; @@ -35,6 +36,7 @@ suite("StatusItems", () => { workspace = { ruby, lspClient: { + addons: [], state: State.Running, formatter: "none", serverVersion: "1.0.0", @@ -72,6 +74,7 @@ suite("StatusItems", () => { ruby, lspClient: { state: State.Running, + addons: [], formatter: "none", serverVersion: "1.0.0", sendRequest: () => Promise.resolve([] as T), @@ -129,6 +132,7 @@ suite("StatusItems", () => { workspace = { ruby, lspClient: { + addons: [], state: State.Running, formatter, serverVersion: "1.0.0", @@ -157,6 +161,7 @@ suite("StatusItems", () => { workspace = { ruby, lspClient: { + addons: [], state: State.Running, formatter: "none", serverVersion: "1.0.0", @@ -244,6 +249,7 @@ suite("StatusItems", () => { workspace = { ruby, lspClient: { + addons: [], state: State.Running, formatter: "auto", serverVersion: "1.0.0", @@ -262,4 +268,51 @@ suite("StatusItems", () => { assert.strictEqual(status.item.command.command, Command.FormatterHelp); }); }); + + suite("AddonsStatus", () => { + beforeEach(() => { + ruby = {} as Ruby; + workspace = { + ruby, + lspClient: { + addons: undefined, + state: State.Running, + formatter: "auto", + serverVersion: "1.0.0", + sendRequest: () => Promise.resolve([] as T), + }, + error: false, + }; + status = new AddonsStatus(); + status.refresh(workspace); + }); + + test("Status displays the server requirement info when addons is undefined", () => { + workspace.lspClient!.addons = undefined; + status.refresh(workspace); + + assert.strictEqual( + status.item.text, + "Addons: requires server to be v0.17.4 or higher to display this field", + ); + }); + + test("Status displays no addons when addons is an empty array", () => { + workspace.lspClient!.addons = []; + status.refresh(workspace); + + assert.strictEqual(status.item.text, "Addons: none"); + }); + + test("Status displays addon names and errored status", () => { + workspace.lspClient!.addons = [ + { name: "foo", errored: false }, + { name: "bar", errored: true }, + ]; + + status.refresh(workspace); + + assert.strictEqual(status.item.text, "Addons: foo, bar (errored)"); + }); + }); }); diff --git a/vscode/src/workspace.ts b/vscode/src/workspace.ts index 458d351a0..54d003346 100644 --- a/vscode/src/workspace.ts +++ b/vscode/src/workspace.ts @@ -21,6 +21,7 @@ export class Workspace implements WorkspaceInterface { private readonly context: vscode.ExtensionContext; private readonly telemetry: Telemetry; private readonly outputChannel: WorkspaceChannel; + private readonly isMainWorkspace: boolean; private needsRestart = false; #rebaseInProgress = false; #error = false; @@ -30,6 +31,7 @@ export class Workspace implements WorkspaceInterface { workspaceFolder: vscode.WorkspaceFolder, telemetry: Telemetry, createTestItems: (response: CodeLens[]) => void, + isMainWorkspace = false, ) { this.context = context; this.workspaceFolder = workspaceFolder; @@ -40,6 +42,7 @@ export class Workspace implements WorkspaceInterface { this.telemetry = telemetry; this.ruby = new Ruby(context, workspaceFolder, this.outputChannel); this.createTestItems = createTestItems; + this.isMainWorkspace = isMainWorkspace; this.registerRestarts(context); this.registerRebaseWatcher(context); @@ -77,7 +80,7 @@ export class Workspace implements WorkspaceInterface { } try { - await this.installOrUpdateServer(); + await this.installOrUpdateServer(false); } catch (error: any) { this.error = true; await vscode.window.showErrorMessage( @@ -102,11 +105,13 @@ export class Workspace implements WorkspaceInterface { this.createTestItems, this.workspaceFolder, this.outputChannel, + this.isMainWorkspace, ); try { STATUS_EMITTER.fire(this); await this.lspClient.start(); + await this.lspClient.afterStart(); STATUS_EMITTER.fire(this); // If something triggered a restart while we were still booting, then now we need to perform the restart since the @@ -171,7 +176,7 @@ export class Workspace implements WorkspaceInterface { // Install or update the `ruby-lsp` gem globally with `gem install ruby-lsp` or `gem update ruby-lsp`. We only try to // update on a daily basis, not every time the server boots - async installOrUpdateServer(): Promise { + async installOrUpdateServer(manualInvocation: boolean): Promise { // If there's a user configured custom bundle to run the LSP, then we do not perform auto-updates and let the user // manage that custom bundle themselves const customBundle: string = vscode.workspace @@ -206,8 +211,24 @@ export class Workspace implements WorkspaceInterface { return; } - // If we haven't updated the gem in the last 24 hours, update it + // In addition to updating the global installation of the ruby-lsp gem, if the user manually requested an update, we + // should delete the `.ruby-lsp` to ensure that we'll lock a new version of the server that will actually be booted + if (manualInvocation) { + try { + await vscode.workspace.fs.delete( + vscode.Uri.joinPath(this.workspaceFolder.uri, ".ruby-lsp"), + { recursive: true }, + ); + } catch (error) { + this.outputChannel.info( + `Tried deleting ${vscode.Uri.joinPath(this.workspaceFolder.uri, ".ruby - lsp")}, but it doesn't exist`, + ); + } + } + + // If we haven't updated the gem in the last 24 hours or if the user manually asked for an update, update it if ( + manualInvocation || lastUpdatedAt === undefined || Date.now() - lastUpdatedAt > oneDayInMs ) { diff --git a/vscode/yarn.lock b/vscode/yarn.lock index 5de018462..9f657eddb 100644 --- a/vscode/yarn.lock +++ b/vscode/yarn.lock @@ -81,9 +81,9 @@ tslib "^2.6.2" "@azure/identity@^4.1.0": - version "4.1.0" - resolved "https://registry.yarnpkg.com/@azure/identity/-/identity-4.1.0.tgz#dd78bd3f78b3dec623445402abde5a56460b52d8" - integrity sha512-BhYkF8Xr2gXjyDxocm0pc9RI5J5a1jw8iW0dw6Bx95OGdYbuMyFZrrwNw4eYSqQ2BB6FZOqpJP3vjsAqRcvDhw== + version "4.2.1" + resolved "https://registry.yarnpkg.com/@azure/identity/-/identity-4.2.1.tgz#22b366201e989b7b41c0e1690e103bd579c31e4c" + integrity sha512-U8hsyC9YPcEIzoaObJlRDvp7KiF0MGS7xcWbyJSVvXRkC/HXo1f0oYeBYmEvVgRfacw7GHf6D6yAoh9JHz6A5Q== dependencies: "@azure/abort-controller" "^1.0.0" "@azure/core-auth" "^1.5.0" @@ -93,7 +93,7 @@ "@azure/core-util" "^1.3.0" "@azure/logger" "^1.0.0" "@azure/msal-browser" "^3.11.1" - "@azure/msal-node" "^2.6.6" + "@azure/msal-node" "^2.9.2" events "^3.0.0" jws "^4.0.0" open "^8.0.0" @@ -114,48 +114,53 @@ dependencies: "@azure/msal-common" "14.9.0" +"@azure/msal-common@14.12.0": + version "14.12.0" + resolved "https://registry.yarnpkg.com/@azure/msal-common/-/msal-common-14.12.0.tgz#844abe269b071f8fa8949dadc2a7b65bbb147588" + integrity sha512-IDDXmzfdwmDkv4SSmMEyAniJf6fDu3FJ7ncOjlxkDuT85uSnLEhZi3fGZpoR7T4XZpOMx9teM9GXBgrfJgyeBw== + "@azure/msal-common@14.9.0": version "14.9.0" resolved "https://registry.yarnpkg.com/@azure/msal-common/-/msal-common-14.9.0.tgz#ce1895b4eefccaa0e6aaa39db869611eaec4e37f" integrity sha512-yzBPRlWPnTBeixxLNI3BBIgF5/bHpbhoRVuuDBnYjCyWRavaPUsKAHUDYLqpGkBLDciA6TCc6GOxN4/S3WiSxg== -"@azure/msal-node@^2.6.6": - version "2.7.0" - resolved "https://registry.yarnpkg.com/@azure/msal-node/-/msal-node-2.7.0.tgz#8641ab846704dd4fcbeed30aef94544c5fecfa30" - integrity sha512-wXD8LkUvHICeSWZydqg6o8Yvv+grlBEcmLGu+QEI4FcwFendbTEZrlSygnAXXSOCVaGAirWLchca35qrgpO6Jw== +"@azure/msal-node@^2.9.2": + version "2.9.2" + resolved "https://registry.yarnpkg.com/@azure/msal-node/-/msal-node-2.9.2.tgz#e6d3c1661012c1bd0ef68e328f73a2fdede52931" + integrity sha512-8tvi6Cos3m+0KmRbPjgkySXi+UQU/QiuVRFnrxIwt5xZlEEFa69O04RTaNESGgImyBBlYbo2mfE8/U8Bbdk1WQ== dependencies: - "@azure/msal-common" "14.9.0" + "@azure/msal-common" "14.12.0" jsonwebtoken "^9.0.0" uuid "^8.3.0" -"@babel/code-frame@^7.23.5", "@babel/code-frame@^7.24.2": - version "7.24.2" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.24.2.tgz#718b4b19841809a58b29b68cde80bc5e1aa6d9ae" - integrity sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ== +"@babel/code-frame@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.24.7.tgz#882fd9e09e8ee324e496bd040401c6f046ef4465" + integrity sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA== dependencies: - "@babel/highlight" "^7.24.2" + "@babel/highlight" "^7.24.7" picocolors "^1.0.0" -"@babel/compat-data@^7.23.5": - version "7.23.5" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.23.5.tgz#ffb878728bb6bdcb6f4510aa51b1be9afb8cfd98" - integrity sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw== +"@babel/compat-data@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.24.7.tgz#d23bbea508c3883ba8251fb4164982c36ea577ed" + integrity sha512-qJzAIcv03PyaWqxRgO4mSU3lihncDT296vnyuE2O8uA4w3UHWI4S3hgeZd1L8W1Bft40w9JxJ2b412iDUFFRhw== -"@babel/core@^7.24.5": - version "7.24.5" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.24.5.tgz#15ab5b98e101972d171aeef92ac70d8d6718f06a" - integrity sha512-tVQRucExLQ02Boi4vdPp49svNGcfL2GhdTCT9aldhXgCJVAI21EtRfBettiuLUwce/7r6bFdgs6JFkcdTiFttA== +"@babel/core@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.24.7.tgz#b676450141e0b52a3d43bc91da86aa608f950ac4" + integrity sha512-nykK+LEK86ahTkX/3TgauT0ikKoNCfKHEaZYTUVupJdTLzGNvrblu4u6fa7DhZONAltdf8e662t/abY8idrd/g== dependencies: "@ampproject/remapping" "^2.2.0" - "@babel/code-frame" "^7.24.2" - "@babel/generator" "^7.24.5" - "@babel/helper-compilation-targets" "^7.23.6" - "@babel/helper-module-transforms" "^7.24.5" - "@babel/helpers" "^7.24.5" - "@babel/parser" "^7.24.5" - "@babel/template" "^7.24.0" - "@babel/traverse" "^7.24.5" - "@babel/types" "^7.24.5" + "@babel/code-frame" "^7.24.7" + "@babel/generator" "^7.24.7" + "@babel/helper-compilation-targets" "^7.24.7" + "@babel/helper-module-transforms" "^7.24.7" + "@babel/helpers" "^7.24.7" + "@babel/parser" "^7.24.7" + "@babel/template" "^7.24.7" + "@babel/traverse" "^7.24.7" + "@babel/types" "^7.24.7" convert-source-map "^2.0.0" debug "^4.1.0" gensync "^1.0.0-beta.2" @@ -178,122 +183,120 @@ dependencies: eslint-rule-composer "^0.3.0" -"@babel/generator@^7.24.5": - version "7.24.5" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.24.5.tgz#e5afc068f932f05616b66713e28d0f04e99daeb3" - integrity sha512-x32i4hEXvr+iI0NEoEfDKzlemF8AmtOP8CcrRaEcpzysWuoEb1KknpcvMsHKPONoKZiDuItklgWhB18xEhr9PA== +"@babel/generator@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.24.7.tgz#1654d01de20ad66b4b4d99c135471bc654c55e6d" + integrity sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA== dependencies: - "@babel/types" "^7.24.5" + "@babel/types" "^7.24.7" "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.25" jsesc "^2.5.1" -"@babel/helper-compilation-targets@^7.23.6": - version "7.23.6" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz#4d79069b16cbcf1461289eccfbbd81501ae39991" - integrity sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ== +"@babel/helper-compilation-targets@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.7.tgz#4eb6c4a80d6ffeac25ab8cd9a21b5dfa48d503a9" + integrity sha512-ctSdRHBi20qWOfy27RUb4Fhp07KSJ3sXcuSvTrXrc4aG8NSYDo1ici3Vhg9bg69y5bj0Mr1lh0aeEgTvc12rMg== dependencies: - "@babel/compat-data" "^7.23.5" - "@babel/helper-validator-option" "^7.23.5" + "@babel/compat-data" "^7.24.7" + "@babel/helper-validator-option" "^7.24.7" browserslist "^4.22.2" lru-cache "^5.1.1" semver "^6.3.1" -"@babel/helper-environment-visitor@^7.22.20": - version "7.22.20" - resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz#96159db61d34a29dba454c959f5ae4a649ba9167" - integrity sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA== +"@babel/helper-environment-visitor@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz#4b31ba9551d1f90781ba83491dd59cf9b269f7d9" + integrity sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ== + dependencies: + "@babel/types" "^7.24.7" -"@babel/helper-function-name@^7.23.0": - version "7.23.0" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz#1f9a3cdbd5b2698a670c30d2735f9af95ed52759" - integrity sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw== +"@babel/helper-function-name@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz#75f1e1725742f39ac6584ee0b16d94513da38dd2" + integrity sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA== dependencies: - "@babel/template" "^7.22.15" - "@babel/types" "^7.23.0" + "@babel/template" "^7.24.7" + "@babel/types" "^7.24.7" -"@babel/helper-hoist-variables@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz#c01a007dac05c085914e8fb652b339db50d823bb" - integrity sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw== +"@babel/helper-hoist-variables@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz#b4ede1cde2fd89436397f30dc9376ee06b0f25ee" + integrity sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ== dependencies: - "@babel/types" "^7.22.5" + "@babel/types" "^7.24.7" -"@babel/helper-module-imports@^7.24.3": - version "7.24.3" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.24.3.tgz#6ac476e6d168c7c23ff3ba3cf4f7841d46ac8128" - integrity sha512-viKb0F9f2s0BCS22QSF308z/+1YWKV/76mwt61NBzS5izMzDPwdq1pTrzf+Li3npBWX9KdQbkeCt1jSAM7lZqg== +"@babel/helper-module-imports@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz#f2f980392de5b84c3328fc71d38bd81bbb83042b" + integrity sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA== dependencies: - "@babel/types" "^7.24.0" + "@babel/traverse" "^7.24.7" + "@babel/types" "^7.24.7" -"@babel/helper-module-transforms@^7.24.5": - version "7.24.5" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.24.5.tgz#ea6c5e33f7b262a0ae762fd5986355c45f54a545" - integrity sha512-9GxeY8c2d2mdQUP1Dye0ks3VDyIMS98kt/llQ2nUId8IsWqTF0l1LkSX0/uP7l7MCDrzXS009Hyhe2gzTiGW8A== +"@babel/helper-module-transforms@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.24.7.tgz#31b6c9a2930679498db65b685b1698bfd6c7daf8" + integrity sha512-1fuJEwIrp+97rM4RWdO+qrRsZlAeL1lQJoPqtCYWv0NL115XM93hIH4CSRln2w52SqvmY5hqdtauB6QFCDiZNQ== dependencies: - "@babel/helper-environment-visitor" "^7.22.20" - "@babel/helper-module-imports" "^7.24.3" - "@babel/helper-simple-access" "^7.24.5" - "@babel/helper-split-export-declaration" "^7.24.5" - "@babel/helper-validator-identifier" "^7.24.5" + "@babel/helper-environment-visitor" "^7.24.7" + "@babel/helper-module-imports" "^7.24.7" + "@babel/helper-simple-access" "^7.24.7" + "@babel/helper-split-export-declaration" "^7.24.7" + "@babel/helper-validator-identifier" "^7.24.7" -"@babel/helper-simple-access@^7.24.5": - version "7.24.5" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.24.5.tgz#50da5b72f58c16b07fbd992810be6049478e85ba" - integrity sha512-uH3Hmf5q5n7n8mz7arjUlDOCbttY/DW4DYhE6FUsjKJ/oYC1kQQUvwEQWxRwUpX9qQKRXeqLwWxrqilMrf32sQ== +"@babel/helper-simple-access@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.24.7.tgz#bcade8da3aec8ed16b9c4953b74e506b51b5edb3" + integrity sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg== dependencies: - "@babel/types" "^7.24.5" + "@babel/traverse" "^7.24.7" + "@babel/types" "^7.24.7" -"@babel/helper-split-export-declaration@^7.24.5": - version "7.24.5" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.5.tgz#b9a67f06a46b0b339323617c8c6213b9055a78b6" - integrity sha512-5CHncttXohrHk8GWOFCcCl4oRD9fKosWlIRgWm4ql9VYioKm52Mk2xsmoohvm7f3JoiLSM5ZgJuRaf5QZZYd3Q== +"@babel/helper-split-export-declaration@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz#83949436890e07fa3d6873c61a96e3bbf692d856" + integrity sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA== dependencies: - "@babel/types" "^7.24.5" + "@babel/types" "^7.24.7" -"@babel/helper-string-parser@^7.24.1": - version "7.24.1" - resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.24.1.tgz#f99c36d3593db9540705d0739a1f10b5e20c696e" - integrity sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ== +"@babel/helper-string-parser@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz#4d2d0f14820ede3b9807ea5fc36dfc8cd7da07f2" + integrity sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg== -"@babel/helper-validator-identifier@^7.22.20": - version "7.22.20" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz#c4ae002c61d2879e724581d96665583dbc1dc0e0" - integrity sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A== +"@babel/helper-validator-identifier@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz#75b889cfaf9e35c2aaf42cf0d72c8e91719251db" + integrity sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w== -"@babel/helper-validator-identifier@^7.24.5": - version "7.24.5" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.5.tgz#918b1a7fa23056603506370089bd990d8720db62" - integrity sha512-3q93SSKX2TWCG30M2G2kwaKeTYgEUp5Snjuj8qm729SObL6nbtUldAi37qbxkD5gg3xnBio+f9nqpSepGZMvxA== +"@babel/helper-validator-option@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.24.7.tgz#24c3bb77c7a425d1742eec8fb433b5a1b38e62f6" + integrity sha512-yy1/KvjhV/ZCL+SM7hBrvnZJ3ZuT9OuZgIJAGpPEToANvc3iM6iDvBnRjtElWibHU6n8/LPR/EjX9EtIEYO3pw== -"@babel/helper-validator-option@^7.23.5": - version "7.23.5" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz#907a3fbd4523426285365d1206c423c4c5520307" - integrity sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw== - -"@babel/helpers@^7.24.5": - version "7.24.5" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.24.5.tgz#fedeb87eeafa62b621160402181ad8585a22a40a" - integrity sha512-CiQmBMMpMQHwM5m01YnrM6imUG1ebgYJ+fAIW4FZe6m4qHTPaRHti+R8cggAwkdz4oXhtO4/K9JWlh+8hIfR2Q== +"@babel/helpers@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.24.7.tgz#aa2ccda29f62185acb5d42fb4a3a1b1082107416" + integrity sha512-NlmJJtvcw72yRJRcnCmGvSi+3jDEg8qFu3z0AFoymmzLx5ERVWyzd9kVXr7Th9/8yIJi2Zc6av4Tqz3wFs8QWg== dependencies: - "@babel/template" "^7.24.0" - "@babel/traverse" "^7.24.5" - "@babel/types" "^7.24.5" + "@babel/template" "^7.24.7" + "@babel/types" "^7.24.7" -"@babel/highlight@^7.24.2": - version "7.24.2" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.2.tgz#3f539503efc83d3c59080a10e6634306e0370d26" - integrity sha512-Yac1ao4flkTxTteCDZLEvdxg2fZfz1v8M4QpaGypq/WPDqg3ijHYbDfs+LG5hvzSoqaSZ9/Z9lKSP3CjZjv+pA== +"@babel/highlight@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.7.tgz#a05ab1df134b286558aae0ed41e6c5f731bf409d" + integrity sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw== dependencies: - "@babel/helper-validator-identifier" "^7.22.20" + "@babel/helper-validator-identifier" "^7.24.7" chalk "^2.4.2" js-tokens "^4.0.0" picocolors "^1.0.0" -"@babel/parser@^7.24.0", "@babel/parser@^7.24.5": - version "7.24.5" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.5.tgz#4a4d5ab4315579e5398a82dcf636ca80c3392790" - integrity sha512-EOv5IK8arwh3LI47dz1b0tKUb/1uhHAnHJOrjgtQMIpu1uXd9mlFrJg9IUgGUgZ41Ch0K8REPTYpO7B76b4vJg== +"@babel/parser@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.7.tgz#9a5226f92f0c5c8ead550b750f5608e766c8ce85" + integrity sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw== "@babel/runtime@^7.23.2": version "7.23.9" @@ -302,154 +305,154 @@ dependencies: regenerator-runtime "^0.14.0" -"@babel/template@^7.22.15", "@babel/template@^7.24.0": - version "7.24.0" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.24.0.tgz#c6a524aa93a4a05d66aaf31654258fae69d87d50" - integrity sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA== - dependencies: - "@babel/code-frame" "^7.23.5" - "@babel/parser" "^7.24.0" - "@babel/types" "^7.24.0" - -"@babel/traverse@^7.24.5": - version "7.24.5" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.24.5.tgz#972aa0bc45f16983bf64aa1f877b2dd0eea7e6f8" - integrity sha512-7aaBLeDQ4zYcUFDUD41lJc1fG8+5IU9DaNSJAgal866FGvmD5EbWQgnEC6kO1gGLsX0esNkfnJSndbTXA3r7UA== - dependencies: - "@babel/code-frame" "^7.24.2" - "@babel/generator" "^7.24.5" - "@babel/helper-environment-visitor" "^7.22.20" - "@babel/helper-function-name" "^7.23.0" - "@babel/helper-hoist-variables" "^7.22.5" - "@babel/helper-split-export-declaration" "^7.24.5" - "@babel/parser" "^7.24.5" - "@babel/types" "^7.24.5" +"@babel/template@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.24.7.tgz#02efcee317d0609d2c07117cb70ef8fb17ab7315" + integrity sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig== + dependencies: + "@babel/code-frame" "^7.24.7" + "@babel/parser" "^7.24.7" + "@babel/types" "^7.24.7" + +"@babel/traverse@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.24.7.tgz#de2b900163fa741721ba382163fe46a936c40cf5" + integrity sha512-yb65Ed5S/QAcewNPh0nZczy9JdYXkkAbIsEo+P7BE7yO3txAY30Y/oPa3QkQ5It3xVG2kpKMg9MsdxZaO31uKA== + dependencies: + "@babel/code-frame" "^7.24.7" + "@babel/generator" "^7.24.7" + "@babel/helper-environment-visitor" "^7.24.7" + "@babel/helper-function-name" "^7.24.7" + "@babel/helper-hoist-variables" "^7.24.7" + "@babel/helper-split-export-declaration" "^7.24.7" + "@babel/parser" "^7.24.7" + "@babel/types" "^7.24.7" debug "^4.3.1" globals "^11.1.0" -"@babel/types@^7.22.5", "@babel/types@^7.23.0", "@babel/types@^7.24.0", "@babel/types@^7.24.5": - version "7.24.5" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.24.5.tgz#7661930afc638a5383eb0c4aee59b74f38db84d7" - integrity sha512-6mQNsaLeXTw0nxYUYu+NSa4Hx4BlF1x1x8/PMFbiR+GBSr+2DkECc69b8hgy2frEodNcvPffeH8YfWd3LI6jhQ== +"@babel/types@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.24.7.tgz#6027fe12bc1aa724cd32ab113fb7f1988f1f66f2" + integrity sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q== dependencies: - "@babel/helper-string-parser" "^7.24.1" - "@babel/helper-validator-identifier" "^7.24.5" + "@babel/helper-string-parser" "^7.24.7" + "@babel/helper-validator-identifier" "^7.24.7" to-fast-properties "^2.0.0" -"@esbuild/aix-ppc64@0.20.2": - version "0.20.2" - resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.20.2.tgz#a70f4ac11c6a1dfc18b8bbb13284155d933b9537" - integrity sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g== - -"@esbuild/android-arm64@0.20.2": - version "0.20.2" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.20.2.tgz#db1c9202a5bc92ea04c7b6840f1bbe09ebf9e6b9" - integrity sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg== - -"@esbuild/android-arm@0.20.2": - version "0.20.2" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.20.2.tgz#3b488c49aee9d491c2c8f98a909b785870d6e995" - integrity sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w== - -"@esbuild/android-x64@0.20.2": - version "0.20.2" - resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.20.2.tgz#3b1628029e5576249d2b2d766696e50768449f98" - integrity sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg== - -"@esbuild/darwin-arm64@0.20.2": - version "0.20.2" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.20.2.tgz#6e8517a045ddd86ae30c6608c8475ebc0c4000bb" - integrity sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA== - -"@esbuild/darwin-x64@0.20.2": - version "0.20.2" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.20.2.tgz#90ed098e1f9dd8a9381695b207e1cff45540a0d0" - integrity sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA== - -"@esbuild/freebsd-arm64@0.20.2": - version "0.20.2" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.2.tgz#d71502d1ee89a1130327e890364666c760a2a911" - integrity sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw== - -"@esbuild/freebsd-x64@0.20.2": - version "0.20.2" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.20.2.tgz#aa5ea58d9c1dd9af688b8b6f63ef0d3d60cea53c" - integrity sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw== - -"@esbuild/linux-arm64@0.20.2": - version "0.20.2" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.20.2.tgz#055b63725df678379b0f6db9d0fa85463755b2e5" - integrity sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A== - -"@esbuild/linux-arm@0.20.2": - version "0.20.2" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.20.2.tgz#76b3b98cb1f87936fbc37f073efabad49dcd889c" - integrity sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg== - -"@esbuild/linux-ia32@0.20.2": - version "0.20.2" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.20.2.tgz#c0e5e787c285264e5dfc7a79f04b8b4eefdad7fa" - integrity sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig== - -"@esbuild/linux-loong64@0.20.2": - version "0.20.2" - resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.20.2.tgz#a6184e62bd7cdc63e0c0448b83801001653219c5" - integrity sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ== - -"@esbuild/linux-mips64el@0.20.2": - version "0.20.2" - resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.20.2.tgz#d08e39ce86f45ef8fc88549d29c62b8acf5649aa" - integrity sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA== - -"@esbuild/linux-ppc64@0.20.2": - version "0.20.2" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.20.2.tgz#8d252f0b7756ffd6d1cbde5ea67ff8fd20437f20" - integrity sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg== - -"@esbuild/linux-riscv64@0.20.2": - version "0.20.2" - resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.20.2.tgz#19f6dcdb14409dae607f66ca1181dd4e9db81300" - integrity sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg== - -"@esbuild/linux-s390x@0.20.2": - version "0.20.2" - resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.20.2.tgz#3c830c90f1a5d7dd1473d5595ea4ebb920988685" - integrity sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ== - -"@esbuild/linux-x64@0.20.2": - version "0.20.2" - resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.20.2.tgz#86eca35203afc0d9de0694c64ec0ab0a378f6fff" - integrity sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw== - -"@esbuild/netbsd-x64@0.20.2": - version "0.20.2" - resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.20.2.tgz#e771c8eb0e0f6e1877ffd4220036b98aed5915e6" - integrity sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ== - -"@esbuild/openbsd-x64@0.20.2": - version "0.20.2" - resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.20.2.tgz#9a795ae4b4e37e674f0f4d716f3e226dd7c39baf" - integrity sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ== - -"@esbuild/sunos-x64@0.20.2": - version "0.20.2" - resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.20.2.tgz#7df23b61a497b8ac189def6e25a95673caedb03f" - integrity sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w== - -"@esbuild/win32-arm64@0.20.2": - version "0.20.2" - resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.20.2.tgz#f1ae5abf9ca052ae11c1bc806fb4c0f519bacf90" - integrity sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ== - -"@esbuild/win32-ia32@0.20.2": - version "0.20.2" - resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.20.2.tgz#241fe62c34d8e8461cd708277813e1d0ba55ce23" - integrity sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ== - -"@esbuild/win32-x64@0.20.2": - version "0.20.2" - resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.20.2.tgz#9c907b21e30a52db959ba4f80bb01a0cc403d5cc" - integrity sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ== +"@esbuild/aix-ppc64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz#c7184a326533fcdf1b8ee0733e21c713b975575f" + integrity sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ== + +"@esbuild/android-arm64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz#09d9b4357780da9ea3a7dfb833a1f1ff439b4052" + integrity sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A== + +"@esbuild/android-arm@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.21.5.tgz#9b04384fb771926dfa6d7ad04324ecb2ab9b2e28" + integrity sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg== + +"@esbuild/android-x64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.21.5.tgz#29918ec2db754cedcb6c1b04de8cd6547af6461e" + integrity sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA== + +"@esbuild/darwin-arm64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz#e495b539660e51690f3928af50a76fb0a6ccff2a" + integrity sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ== + +"@esbuild/darwin-x64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz#c13838fa57372839abdddc91d71542ceea2e1e22" + integrity sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw== + +"@esbuild/freebsd-arm64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz#646b989aa20bf89fd071dd5dbfad69a3542e550e" + integrity sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g== + +"@esbuild/freebsd-x64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz#aa615cfc80af954d3458906e38ca22c18cf5c261" + integrity sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ== + +"@esbuild/linux-arm64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz#70ac6fa14f5cb7e1f7f887bcffb680ad09922b5b" + integrity sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q== + +"@esbuild/linux-arm@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz#fc6fd11a8aca56c1f6f3894f2bea0479f8f626b9" + integrity sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA== + +"@esbuild/linux-ia32@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz#3271f53b3f93e3d093d518d1649d6d68d346ede2" + integrity sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg== + +"@esbuild/linux-loong64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz#ed62e04238c57026aea831c5a130b73c0f9f26df" + integrity sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg== + +"@esbuild/linux-mips64el@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz#e79b8eb48bf3b106fadec1ac8240fb97b4e64cbe" + integrity sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg== + +"@esbuild/linux-ppc64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz#5f2203860a143b9919d383ef7573521fb154c3e4" + integrity sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w== + +"@esbuild/linux-riscv64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz#07bcafd99322d5af62f618cb9e6a9b7f4bb825dc" + integrity sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA== + +"@esbuild/linux-s390x@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz#b7ccf686751d6a3e44b8627ababc8be3ef62d8de" + integrity sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A== + +"@esbuild/linux-x64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz#6d8f0c768e070e64309af8004bb94e68ab2bb3b0" + integrity sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ== + +"@esbuild/netbsd-x64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz#bbe430f60d378ecb88decb219c602667387a6047" + integrity sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg== + +"@esbuild/openbsd-x64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz#99d1cf2937279560d2104821f5ccce220cb2af70" + integrity sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow== + +"@esbuild/sunos-x64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz#08741512c10d529566baba837b4fe052c8f3487b" + integrity sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg== + +"@esbuild/win32-arm64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz#675b7385398411240735016144ab2e99a60fc75d" + integrity sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A== + +"@esbuild/win32-ia32@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz#1bfc3ce98aa6ca9a0969e4d2af72144c59c1193b" + integrity sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA== + +"@esbuild/win32-x64@0.21.5": + version "0.21.5" + resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz#acad351d582d157bb145535db2a6ff53dd514b5c" + integrity sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw== "@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": version "4.4.0" @@ -458,7 +461,7 @@ dependencies: eslint-visitor-keys "^3.3.0" -"@eslint-community/regexpp@^4.10.0", "@eslint-community/regexpp@^4.5.1", "@eslint-community/regexpp@^4.6.1": +"@eslint-community/regexpp@^4.10.0", "@eslint-community/regexpp@^4.6.1": version "4.10.0" resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.0.tgz#548f6de556857c8bb73bbee70c35dc82a2e74d63" integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA== @@ -606,31 +609,31 @@ resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.1.1.tgz#1ec17e2edbec25c8306d424ecfbf13c7de1aaa31" integrity sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA== -"@shopify/eslint-plugin@^44.0.0": - version "44.0.0" - resolved "https://registry.yarnpkg.com/@shopify/eslint-plugin/-/eslint-plugin-44.0.0.tgz#b8c45695bd88126f51b00cf6cad87a1ed6cc306d" - integrity sha512-p0BozXrvE7Z8EmnRJKg9QhS+8xbFPRY5u0mUFE2x8iOsSA1Yv1pGh+spR8QTz+zQCxv8DtJ0Hval9XSPFGxw4Q== +"@shopify/eslint-plugin@^45.0.0": + version "45.0.0" + resolved "https://registry.yarnpkg.com/@shopify/eslint-plugin/-/eslint-plugin-45.0.0.tgz#e4a87e66f89f4a09f1268378bd8caef713661744" + integrity sha512-aRgVkl+EovLk6OC4WzT+C6hgAyta5VReEIdetpe+/bJhVovlqbFjYa3yHGvEM4VuWv8sim7XH2VV3ZsDiwpgvQ== dependencies: "@babel/eslint-parser" "^7.16.3" "@babel/eslint-plugin" "^7.14.5" - "@typescript-eslint/eslint-plugin" "^6.2.1" - "@typescript-eslint/parser" "^6.2.1" + "@typescript-eslint/eslint-plugin" "^7.9.0" + "@typescript-eslint/parser" "^7.9.0" change-case "^4.1.2" common-tags "^1.8.2" doctrine "^2.1.0" - eslint-config-prettier "^8.10.0" - eslint-module-utils "^2.7.1" + eslint-config-prettier "^9.1.0" + eslint-module-utils "^2.8.1" eslint-plugin-eslint-comments "^3.2.0" - eslint-plugin-import "^2.28.0" - eslint-plugin-jest "^27.2.3" + eslint-plugin-import "^2.29.1" + eslint-plugin-jest "^28.5.0" eslint-plugin-jest-formatting "^3.1.0" - eslint-plugin-jsx-a11y "^6.7.1" + eslint-plugin-jsx-a11y "^6.8.0" eslint-plugin-node "^11.1.0" - eslint-plugin-prettier "^5.0.0" + eslint-plugin-prettier "^5.1.3" eslint-plugin-promise "^6.1.1" - eslint-plugin-react "^7.33.1" - eslint-plugin-react-hooks "^4.6.0" - eslint-plugin-sort-class-members "^1.18.0" + eslint-plugin-react "^7.34.1" + eslint-plugin-react-hooks "^4.6.2" + eslint-plugin-sort-class-members "^1.20.0" jsx-ast-utils "^3.2.1" pkg-dir "^5.0.0" pluralize "^8.0.0" @@ -647,7 +650,7 @@ dependencies: type-detect "4.0.8" -"@sinonjs/commons@^3.0.0": +"@sinonjs/commons@^3.0.0", "@sinonjs/commons@^3.0.1": version "3.0.1" resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-3.0.1.tgz#1029357e44ca901a615585f6d27738dbc89084cd" integrity sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ== @@ -675,11 +678,6 @@ resolved "https://registry.yarnpkg.com/@sinonjs/text-encoding/-/text-encoding-0.7.2.tgz#5981a8db18b56ba38ef0efb7d995b12aa7b51918" integrity sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ== -"@tootallnate/once@1": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" - integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== - "@types/glob@^8.1.0": version "8.1.0" resolved "https://registry.yarnpkg.com/@types/glob/-/glob-8.1.0.tgz#b63e70155391b0584dce44e7ea25190bbc38f2fc" @@ -688,11 +686,6 @@ "@types/minimatch" "^5.1.2" "@types/node" "*" -"@types/json-schema@^7.0.12", "@types/json-schema@^7.0.15", "@types/json-schema@^7.0.9": - version "7.0.15" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" - integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== - "@types/json5@^0.0.29": version "0.0.29" resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" @@ -709,17 +702,12 @@ integrity sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg== "@types/node@*", "@types/node@20.x": - version "20.12.8" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.8.tgz#35897bf2bfe3469847ab04634636de09552e8256" - integrity sha512-NU0rJLJnshZWdE/097cdCBbyW1h4hEg0xpovcoAQYHl8dnEyp/NAOiE45pvc+Bd1Dt+2r94v2eGFpQJ4R7g+2w== + version "20.14.2" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.14.2.tgz#a5f4d2bcb4b6a87bffcaa717718c5a0f208f4a18" + integrity sha512-xyu6WAMVwv6AKFLB+e/7ySZVr/0zLCzOa7rSpq6jNwpqOrUbcACDWC+53d4n2QHOnDou0fbIsg8wZu/sxrnI4Q== dependencies: undici-types "~5.26.4" -"@types/semver@^7.3.12", "@types/semver@^7.5.0", "@types/semver@^7.5.8": - version "7.5.8" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.8.tgz#8268a8c57a3e4abd25c165ecd36237db7948a55e" - integrity sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ== - "@types/sinon@^17.0.3": version "17.0.3" resolved "https://registry.yarnpkg.com/@types/sinon/-/sinon-17.0.3.tgz#9aa7e62f0a323b9ead177ed23a36ea757141a5fa" @@ -737,155 +725,62 @@ resolved "https://registry.yarnpkg.com/@types/vscode/-/vscode-1.86.0.tgz#5d5f233137b27e51d7ad1462600005741296357a" integrity sha512-DnIXf2ftWv+9LWOB5OJeIeaLigLHF7fdXF6atfc7X5g2w/wVZBgk0amP7b+ub5xAuW1q7qP5YcFvOcit/DtyCQ== -"@typescript-eslint/eslint-plugin@^6.2.1": - version "6.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz#30830c1ca81fd5f3c2714e524c4303e0194f9cd3" - integrity sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA== - dependencies: - "@eslint-community/regexpp" "^4.5.1" - "@typescript-eslint/scope-manager" "6.21.0" - "@typescript-eslint/type-utils" "6.21.0" - "@typescript-eslint/utils" "6.21.0" - "@typescript-eslint/visitor-keys" "6.21.0" - debug "^4.3.4" - graphemer "^1.4.0" - ignore "^5.2.4" - natural-compare "^1.4.0" - semver "^7.5.4" - ts-api-utils "^1.0.1" - -"@typescript-eslint/eslint-plugin@^7.8.0": - version "7.8.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.8.0.tgz#c78e309fe967cb4de05b85cdc876fb95f8e01b6f" - integrity sha512-gFTT+ezJmkwutUPmB0skOj3GZJtlEGnlssems4AjkVweUPGj7jRwwqg0Hhg7++kPGJqKtTYx+R05Ftww372aIg== +"@typescript-eslint/eslint-plugin@^7.13.0", "@typescript-eslint/eslint-plugin@^7.9.0": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.13.0.tgz#3cdeb5d44d051b21a9567535dd90702b2a42c6ff" + integrity sha512-FX1X6AF0w8MdVFLSdqwqN/me2hyhuQg4ykN6ZpVhh1ij/80pTvDKclX1sZB9iqex8SjQfVhwMKs3JtnnMLzG9w== dependencies: "@eslint-community/regexpp" "^4.10.0" - "@typescript-eslint/scope-manager" "7.8.0" - "@typescript-eslint/type-utils" "7.8.0" - "@typescript-eslint/utils" "7.8.0" - "@typescript-eslint/visitor-keys" "7.8.0" - debug "^4.3.4" + "@typescript-eslint/scope-manager" "7.13.0" + "@typescript-eslint/type-utils" "7.13.0" + "@typescript-eslint/utils" "7.13.0" + "@typescript-eslint/visitor-keys" "7.13.0" graphemer "^1.4.0" ignore "^5.3.1" natural-compare "^1.4.0" - semver "^7.6.0" ts-api-utils "^1.3.0" -"@typescript-eslint/parser@^6.2.1": - version "6.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.21.0.tgz#af8fcf66feee2edc86bc5d1cf45e33b0630bf35b" - integrity sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ== - dependencies: - "@typescript-eslint/scope-manager" "6.21.0" - "@typescript-eslint/types" "6.21.0" - "@typescript-eslint/typescript-estree" "6.21.0" - "@typescript-eslint/visitor-keys" "6.21.0" - debug "^4.3.4" - -"@typescript-eslint/parser@^7.8.0": - version "7.8.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.8.0.tgz#1e1db30c8ab832caffee5f37e677dbcb9357ddc8" - integrity sha512-KgKQly1pv0l4ltcftP59uQZCi4HUYswCLbTqVZEJu7uLX8CTLyswqMLqLN+2QFz4jCptqWVV4SB7vdxcH2+0kQ== +"@typescript-eslint/parser@^7.13.0", "@typescript-eslint/parser@^7.9.0": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.13.0.tgz#9489098d68d57ad392f507495f2b82ce8b8f0a6b" + integrity sha512-EjMfl69KOS9awXXe83iRN7oIEXy9yYdqWfqdrFAYAAr6syP8eLEFI7ZE4939antx2mNgPRW/o1ybm2SFYkbTVA== dependencies: - "@typescript-eslint/scope-manager" "7.8.0" - "@typescript-eslint/types" "7.8.0" - "@typescript-eslint/typescript-estree" "7.8.0" - "@typescript-eslint/visitor-keys" "7.8.0" + "@typescript-eslint/scope-manager" "7.13.0" + "@typescript-eslint/types" "7.13.0" + "@typescript-eslint/typescript-estree" "7.13.0" + "@typescript-eslint/visitor-keys" "7.13.0" debug "^4.3.4" -"@typescript-eslint/scope-manager@5.62.0": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz#d9457ccc6a0b8d6b37d0eb252a23022478c5460c" - integrity sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w== - dependencies: - "@typescript-eslint/types" "5.62.0" - "@typescript-eslint/visitor-keys" "5.62.0" - -"@typescript-eslint/scope-manager@6.21.0": - version "6.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz#ea8a9bfc8f1504a6ac5d59a6df308d3a0630a2b1" - integrity sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg== +"@typescript-eslint/scope-manager@7.13.0": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.13.0.tgz#6927d6451537ce648c6af67a2327378d4cc18462" + integrity sha512-ZrMCe1R6a01T94ilV13egvcnvVJ1pxShkE0+NDjDzH4nvG1wXpwsVI5bZCvE7AEDH1mXEx5tJSVR68bLgG7Dng== dependencies: - "@typescript-eslint/types" "6.21.0" - "@typescript-eslint/visitor-keys" "6.21.0" + "@typescript-eslint/types" "7.13.0" + "@typescript-eslint/visitor-keys" "7.13.0" -"@typescript-eslint/scope-manager@7.8.0": - version "7.8.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.8.0.tgz#bb19096d11ec6b87fb6640d921df19b813e02047" - integrity sha512-viEmZ1LmwsGcnr85gIq+FCYI7nO90DVbE37/ll51hjv9aG+YZMb4WDE2fyWpUR4O/UrhGRpYXK/XajcGTk2B8g== +"@typescript-eslint/type-utils@7.13.0": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.13.0.tgz#4587282b5227a23753ea8b233805ecafc3924c76" + integrity sha512-xMEtMzxq9eRkZy48XuxlBFzpVMDurUAfDu5Rz16GouAtXm0TaAoTFzqWUFPPuQYXI/CDaH/Bgx/fk/84t/Bc9A== dependencies: - "@typescript-eslint/types" "7.8.0" - "@typescript-eslint/visitor-keys" "7.8.0" - -"@typescript-eslint/type-utils@6.21.0": - version "6.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.21.0.tgz#6473281cfed4dacabe8004e8521cee0bd9d4c01e" - integrity sha512-rZQI7wHfao8qMX3Rd3xqeYSMCL3SoiSQLBATSiVKARdFGCYSRvmViieZjqc58jKgs8Y8i9YvVVhRbHSTA4VBag== - dependencies: - "@typescript-eslint/typescript-estree" "6.21.0" - "@typescript-eslint/utils" "6.21.0" - debug "^4.3.4" - ts-api-utils "^1.0.1" - -"@typescript-eslint/type-utils@7.8.0": - version "7.8.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.8.0.tgz#9de166f182a6e4d1c5da76e94880e91831e3e26f" - integrity sha512-H70R3AefQDQpz9mGv13Uhi121FNMh+WEaRqcXTX09YEDky21km4dV1ZXJIp8QjXc4ZaVkXVdohvWDzbnbHDS+A== - dependencies: - "@typescript-eslint/typescript-estree" "7.8.0" - "@typescript-eslint/utils" "7.8.0" + "@typescript-eslint/typescript-estree" "7.13.0" + "@typescript-eslint/utils" "7.13.0" debug "^4.3.4" ts-api-utils "^1.3.0" -"@typescript-eslint/types@5.62.0": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.62.0.tgz#258607e60effa309f067608931c3df6fed41fd2f" - integrity sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ== - -"@typescript-eslint/types@6.21.0": - version "6.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.21.0.tgz#205724c5123a8fef7ecd195075fa6e85bac3436d" - integrity sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg== - -"@typescript-eslint/types@7.8.0": - version "7.8.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.8.0.tgz#1fd2577b3ad883b769546e2d1ef379f929a7091d" - integrity sha512-wf0peJ+ZGlcH+2ZS23aJbOv+ztjeeP8uQ9GgwMJGVLx/Nj9CJt17GWgWWoSmoRVKAX2X+7fzEnAjxdvK2gqCLw== - -"@typescript-eslint/typescript-estree@5.62.0": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz#7d17794b77fabcac615d6a48fb143330d962eb9b" - integrity sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA== - dependencies: - "@typescript-eslint/types" "5.62.0" - "@typescript-eslint/visitor-keys" "5.62.0" - debug "^4.3.4" - globby "^11.1.0" - is-glob "^4.0.3" - semver "^7.3.7" - tsutils "^3.21.0" - -"@typescript-eslint/typescript-estree@6.21.0": - version "6.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz#c47ae7901db3b8bddc3ecd73daff2d0895688c46" - integrity sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ== - dependencies: - "@typescript-eslint/types" "6.21.0" - "@typescript-eslint/visitor-keys" "6.21.0" - debug "^4.3.4" - globby "^11.1.0" - is-glob "^4.0.3" - minimatch "9.0.3" - semver "^7.5.4" - ts-api-utils "^1.0.1" +"@typescript-eslint/types@7.13.0": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.13.0.tgz#0cca95edf1f1fdb0cfe1bb875e121b49617477c5" + integrity sha512-QWuwm9wcGMAuTsxP+qz6LBBd3Uq8I5Nv8xb0mk54jmNoCyDspnMvVsOxI6IsMmway5d1S9Su2+sCKv1st2l6eA== -"@typescript-eslint/typescript-estree@7.8.0": - version "7.8.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.8.0.tgz#b028a9226860b66e623c1ee55cc2464b95d2987c" - integrity sha512-5pfUCOwK5yjPaJQNy44prjCwtr981dO8Qo9J9PwYXZ0MosgAbfEMB008dJ5sNo3+/BN6ytBPuSvXUg9SAqB0dg== +"@typescript-eslint/typescript-estree@7.13.0": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.13.0.tgz#4cc24fc155088ebf3b3adbad62c7e60f72c6de1c" + integrity sha512-cAvBvUoobaoIcoqox1YatXOnSl3gx92rCZoMRPzMNisDiM12siGilSM4+dJAekuuHTibI2hVC2fYK79iSFvWjw== dependencies: - "@typescript-eslint/types" "7.8.0" - "@typescript-eslint/visitor-keys" "7.8.0" + "@typescript-eslint/types" "7.13.0" + "@typescript-eslint/visitor-keys" "7.13.0" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" @@ -893,68 +788,22 @@ semver "^7.6.0" ts-api-utils "^1.3.0" -"@typescript-eslint/utils@6.21.0": - version "6.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.21.0.tgz#4714e7a6b39e773c1c8e97ec587f520840cd8134" - integrity sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ== +"@typescript-eslint/utils@7.13.0", "@typescript-eslint/utils@^6.0.0 || ^7.0.0": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.13.0.tgz#f84e7e8aeceae945a9a3f40d077fd95915308004" + integrity sha512-jceD8RgdKORVnB4Y6BqasfIkFhl4pajB1wVxrF4akxD2QPM8GNYjgGwEzYS+437ewlqqrg7Dw+6dhdpjMpeBFQ== dependencies: "@eslint-community/eslint-utils" "^4.4.0" - "@types/json-schema" "^7.0.12" - "@types/semver" "^7.5.0" - "@typescript-eslint/scope-manager" "6.21.0" - "@typescript-eslint/types" "6.21.0" - "@typescript-eslint/typescript-estree" "6.21.0" - semver "^7.5.4" - -"@typescript-eslint/utils@7.8.0": - version "7.8.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.8.0.tgz#57a79f9c0c0740ead2f622e444cfaeeb9fd047cd" - integrity sha512-L0yFqOCflVqXxiZyXrDr80lnahQfSOfc9ELAAZ75sqicqp2i36kEZZGuUymHNFoYOqxRT05up760b4iGsl02nQ== - dependencies: - "@eslint-community/eslint-utils" "^4.4.0" - "@types/json-schema" "^7.0.15" - "@types/semver" "^7.5.8" - "@typescript-eslint/scope-manager" "7.8.0" - "@typescript-eslint/types" "7.8.0" - "@typescript-eslint/typescript-estree" "7.8.0" - semver "^7.6.0" - -"@typescript-eslint/utils@^5.10.0": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.62.0.tgz#141e809c71636e4a75daa39faed2fb5f4b10df86" - integrity sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ== - dependencies: - "@eslint-community/eslint-utils" "^4.2.0" - "@types/json-schema" "^7.0.9" - "@types/semver" "^7.3.12" - "@typescript-eslint/scope-manager" "5.62.0" - "@typescript-eslint/types" "5.62.0" - "@typescript-eslint/typescript-estree" "5.62.0" - eslint-scope "^5.1.1" - semver "^7.3.7" - -"@typescript-eslint/visitor-keys@5.62.0": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz#2174011917ce582875954ffe2f6912d5931e353e" - integrity sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw== - dependencies: - "@typescript-eslint/types" "5.62.0" - eslint-visitor-keys "^3.3.0" - -"@typescript-eslint/visitor-keys@6.21.0": - version "6.21.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz#87a99d077aa507e20e238b11d56cc26ade45fe47" - integrity sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A== - dependencies: - "@typescript-eslint/types" "6.21.0" - eslint-visitor-keys "^3.4.1" + "@typescript-eslint/scope-manager" "7.13.0" + "@typescript-eslint/types" "7.13.0" + "@typescript-eslint/typescript-estree" "7.13.0" -"@typescript-eslint/visitor-keys@7.8.0": - version "7.8.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.8.0.tgz#7285aab991da8bee411a42edbd5db760d22fdd91" - integrity sha512-q4/gibTNBQNA0lGyYQCmWRS5D15n8rXh4QjK3KV+MBPlTYHpfBUT3D3PaPR/HeNiI9W6R7FvlkcGhNyAoP+caA== +"@typescript-eslint/visitor-keys@7.13.0": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.13.0.tgz#2eb7ce8eb38c2b0d4a494d1fe1908e7071a1a353" + integrity sha512-nxn+dozQx+MK61nn/JP+M4eCkHDSxSLDpgE3WcQo0+fkjEolnaB5jswvIKC4K56By8MMgIho7f1PVxERHEo8rw== dependencies: - "@typescript-eslint/types" "7.8.0" + "@typescript-eslint/types" "7.13.0" eslint-visitor-keys "^3.4.3" "@ungap/structured-clone@^1.2.0": @@ -962,22 +811,84 @@ resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ== -"@vscode/test-electron@^2.3.9": - version "2.3.9" - resolved "https://registry.yarnpkg.com/@vscode/test-electron/-/test-electron-2.3.9.tgz#f61181392634b408411e4302aef6e1cd2dd41474" - integrity sha512-z3eiChaCQXMqBnk2aHHSEkobmC2VRalFQN0ApOAtydL172zXGxTwGrRtviT5HnUB+Q+G3vtEYFtuQkYqBzYgMA== +"@vscode/test-electron@^2.4.0": + version "2.4.0" + resolved "https://registry.yarnpkg.com/@vscode/test-electron/-/test-electron-2.4.0.tgz#6fcdbac10948960c15f8970cf5d5e624dd51a524" + integrity sha512-yojuDFEjohx6Jb+x949JRNtSn6Wk2FAh4MldLE3ck9cfvCqzwxF32QsNy1T9Oe4oT+ZfFcg0uPUCajJzOmPlTA== dependencies: - http-proxy-agent "^4.0.1" - https-proxy-agent "^5.0.0" + http-proxy-agent "^7.0.2" + https-proxy-agent "^7.0.4" jszip "^3.10.1" - semver "^7.5.2" + ora "^7.0.1" + semver "^7.6.2" + +"@vscode/vsce-sign-alpine-arm64@2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@vscode/vsce-sign-alpine-arm64/-/vsce-sign-alpine-arm64-2.0.2.tgz#4accc485e55aa6ff04b195b47f722ead57daa58e" + integrity sha512-E80YvqhtZCLUv3YAf9+tIbbqoinWLCO/B3j03yQPbjT3ZIHCliKZlsy1peNc4XNZ5uIb87Jn0HWx/ZbPXviuAQ== + +"@vscode/vsce-sign-alpine-x64@2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@vscode/vsce-sign-alpine-x64/-/vsce-sign-alpine-x64-2.0.2.tgz#4a4b7b505b4cc0f58596394897c49a0bce0e540c" + integrity sha512-n1WC15MSMvTaeJ5KjWCzo0nzjydwxLyoHiMJHu1Ov0VWTZiddasmOQHekA47tFRycnt4FsQrlkSCTdgHppn6bw== + +"@vscode/vsce-sign-darwin-arm64@2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@vscode/vsce-sign-darwin-arm64/-/vsce-sign-darwin-arm64-2.0.2.tgz#10aa69feb7f81a3dc68c242038ca03eaff19c12e" + integrity sha512-rz8F4pMcxPj8fjKAJIfkUT8ycG9CjIp888VY/6pq6cuI2qEzQ0+b5p3xb74CJnBbSC0p2eRVoe+WgNCAxCLtzQ== -"@vscode/vsce@^2.25.0", "@vscode/vsce@^2.26.1": - version "2.26.1" - resolved "https://registry.yarnpkg.com/@vscode/vsce/-/vsce-2.26.1.tgz#c4f13b04225e5cd16d0a80eb5bb98b96451ce431" - integrity sha512-QOG6Ht7V93nhwcBxPWcG33UK0qDGEoJdg0xtVeaTN27W6PGdMJUJGTPhB/sNHUIFKwvwzv/zMAHvDgMNXbcwlA== +"@vscode/vsce-sign-darwin-x64@2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@vscode/vsce-sign-darwin-x64/-/vsce-sign-darwin-x64-2.0.2.tgz#3315528f3ea1007a648b3320bff36a33a9e07aa5" + integrity sha512-MCjPrQ5MY/QVoZ6n0D92jcRb7eYvxAujG/AH2yM6lI0BspvJQxp0o9s5oiAM9r32r9tkLpiy5s2icsbwefAQIw== + +"@vscode/vsce-sign-linux-arm64@2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@vscode/vsce-sign-linux-arm64/-/vsce-sign-linux-arm64-2.0.2.tgz#ce5c5cfc99e3454b4fb770405812b46bd6dca870" + integrity sha512-Ybeu7cA6+/koxszsORXX0OJk9N0GgfHq70Wqi4vv2iJCZvBrOWwcIrxKjvFtwyDgdeQzgPheH5nhLVl5eQy7WA== + +"@vscode/vsce-sign-linux-arm@2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@vscode/vsce-sign-linux-arm/-/vsce-sign-linux-arm-2.0.2.tgz#4142fda83e7130b31aedd8aa81e4daa6334323c2" + integrity sha512-Fkb5jpbfhZKVw3xwR6t7WYfwKZktVGNXdg1m08uEx1anO0oUPUkoQRsNm4QniL3hmfw0ijg00YA6TrxCRkPVOQ== + +"@vscode/vsce-sign-linux-x64@2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@vscode/vsce-sign-linux-x64/-/vsce-sign-linux-x64-2.0.2.tgz#59ab93f322efb3cf49166d4e2e812789c3117428" + integrity sha512-NsPPFVtLaTlVJKOiTnO8Cl78LZNWy0Q8iAg+LlBiCDEgC12Gt4WXOSs2pmcIjDYzj2kY4NwdeN1mBTaujYZaPg== + +"@vscode/vsce-sign-win32-arm64@2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@vscode/vsce-sign-win32-arm64/-/vsce-sign-win32-arm64-2.0.2.tgz#d095704a14b0404c0b6f696e9889e9a51b31a86c" + integrity sha512-wPs848ymZ3Ny+Y1Qlyi7mcT6VSigG89FWQnp2qRYCyMhdJxOpA4lDwxzlpL8fG6xC8GjQjGDkwbkWUcCobvksQ== + +"@vscode/vsce-sign-win32-x64@2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@vscode/vsce-sign-win32-x64/-/vsce-sign-win32-x64-2.0.2.tgz#294ea72b44fedd694d49f5cef4c55bf3876dc257" + integrity sha512-pAiRN6qSAhDM5SVOIxgx+2xnoVUePHbRNC7OD2aOR3WltTKxxF25OfpK8h8UQ7A0BuRkSgREbB59DBlFk4iAeg== + +"@vscode/vsce-sign@^2.0.0": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@vscode/vsce-sign/-/vsce-sign-2.0.4.tgz#b4bf155d16f2a4badc069df850dc86f756124842" + integrity sha512-0uL32egStKYfy60IqnynAChMTbL0oqpqk0Ew0YHiIb+fayuGZWADuIPHWUcY1GCnAA+VgchOPDMxnc2R3XGWEA== + optionalDependencies: + "@vscode/vsce-sign-alpine-arm64" "2.0.2" + "@vscode/vsce-sign-alpine-x64" "2.0.2" + "@vscode/vsce-sign-darwin-arm64" "2.0.2" + "@vscode/vsce-sign-darwin-x64" "2.0.2" + "@vscode/vsce-sign-linux-arm" "2.0.2" + "@vscode/vsce-sign-linux-arm64" "2.0.2" + "@vscode/vsce-sign-linux-x64" "2.0.2" + "@vscode/vsce-sign-win32-arm64" "2.0.2" + "@vscode/vsce-sign-win32-x64" "2.0.2" + +"@vscode/vsce@^2.25.0", "@vscode/vsce@^2.27.0": + version "2.27.0" + resolved "https://registry.yarnpkg.com/@vscode/vsce/-/vsce-2.27.0.tgz#4d58e789ed8a2a2dfc5c049324d038a505a599b7" + integrity sha512-FFUMBVSyyjjJpWszwqk7d4U3YllY8FdWslbUDMRki1x4ZjA3Z0hmRMfypWrjP9sptbSR9nyPFU4uqjhy2qRB/w== dependencies: "@azure/identity" "^4.1.0" + "@vscode/vsce-sign" "^2.0.0" azure-devops-node-api "^12.5.0" chalk "^2.4.2" cheerio "^1.0.0-rc.9" @@ -1013,13 +924,6 @@ acorn@^8.9.0: resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== -agent-base@6: - version "6.0.2" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" - integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== - dependencies: - debug "4" - agent-base@^7.0.2, agent-base@^7.1.0: version "7.1.1" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-7.1.1.tgz#bdbded7dfb096b751a2a087eeeb9664725b2e317" @@ -1126,6 +1030,18 @@ array.prototype.filter@^1.0.3: es-array-method-boxes-properly "^1.0.0" is-string "^1.0.7" +array.prototype.findlast@^1.2.4: + version "1.2.5" + resolved "https://registry.yarnpkg.com/array.prototype.findlast/-/array.prototype.findlast-1.2.5.tgz#3e4fbcb30a15a7f5bf64cf2faae22d139c2e4904" + integrity sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + es-shim-unscopables "^1.0.2" + array.prototype.findlastindex@^1.2.3: version "1.2.4" resolved "https://registry.yarnpkg.com/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.4.tgz#d1c50f0b3a9da191981ff8942a0aedd82794404f" @@ -1147,7 +1063,7 @@ array.prototype.flat@^1.3.1, array.prototype.flat@^1.3.2: es-abstract "^1.22.1" es-shim-unscopables "^1.0.0" -array.prototype.flatmap@^1.3.1, array.prototype.flatmap@^1.3.2: +array.prototype.flatmap@^1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz#c9a7c6831db8e719d6ce639190146c24bbd3e527" integrity sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ== @@ -1157,7 +1073,17 @@ array.prototype.flatmap@^1.3.1, array.prototype.flatmap@^1.3.2: es-abstract "^1.22.1" es-shim-unscopables "^1.0.0" -array.prototype.tosorted@^1.1.1: +array.prototype.toreversed@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/array.prototype.toreversed/-/array.prototype.toreversed-1.1.2.tgz#b989a6bf35c4c5051e1dc0325151bf8088954eba" + integrity sha512-wwDCoT4Ck4Cz7sLtgUmzR5UV3YF5mFHUlbChCzZBQZ+0m2cl/DH3tKgvphv1nKgFsJ48oCSg6p91q2Vm0I/ZMA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + es-shim-unscopables "^1.0.0" + +array.prototype.tosorted@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/array.prototype.tosorted/-/array.prototype.tosorted-1.1.3.tgz#c8c89348337e51b8a3c48a9227f9ce93ceedcba8" integrity sha512-/DdH4TiTmOKzyQbp/eadcCVexiCb36xJg7HshYOYJnNZFDj33GEv0P7GxsynpShhq4OLYJzbGcBDkLsDt7MnNg== @@ -1250,6 +1176,15 @@ bl@^4.0.3: inherits "^2.0.4" readable-stream "^3.4.0" +bl@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/bl/-/bl-5.1.0.tgz#183715f678c7188ecef9fe475d90209400624273" + integrity sha512-tv1ZJHLfTDnXE6tMHv73YgSJaWR2AFuPwMntBe7XL/GBFHnT0CLnsHMogfk5+GzCDC5ZWarSCYaIGATZt9dNsQ== + dependencies: + buffer "^6.0.3" + inherits "^2.0.4" + readable-stream "^3.4.0" + boolbase@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" @@ -1271,11 +1206,11 @@ brace-expansion@^2.0.1: balanced-match "^1.0.0" braces@^3.0.2, braces@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + version "3.0.3" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" + integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== dependencies: - fill-range "^7.0.1" + fill-range "^7.1.1" browser-stdout@1.3.1: version "1.3.1" @@ -1310,6 +1245,14 @@ buffer@^5.5.0: base64-js "^1.3.1" ieee754 "^1.1.13" +buffer@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" + integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.2.1" + call-bind@^1.0.2, call-bind@^1.0.5, call-bind@^1.0.6, call-bind@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" @@ -1370,6 +1313,11 @@ chalk@^4.0.0, chalk@^4.1.0: ansi-styles "^4.1.0" supports-color "^7.1.0" +chalk@^5.0.0, chalk@^5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.3.0.tgz#67c20a7ebef70e7f3970a01f90fa210cb6860385" + integrity sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w== + change-case@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/change-case/-/change-case-4.1.2.tgz#fedfc5f136045e2398c0410ee441f95704641e12" @@ -1438,6 +1386,18 @@ ci-info@^2.0.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== +cli-cursor@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-4.0.0.tgz#3cecfe3734bf4fe02a8361cbdc0f6fe28c6a57ea" + integrity sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg== + dependencies: + restore-cursor "^4.0.0" + +cli-spinners@^2.9.0: + version "2.9.2" + resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.9.2.tgz#1773a8f4b9c4d6ac31563df53b3fc1d79462fe41" + integrity sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg== + cliui@^7.0.2: version "7.0.4" resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" @@ -1559,6 +1519,33 @@ data-uri-to-buffer@^4.0.0: resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz#d8feb2b2881e6a4f58c2e08acfd0e2834e26222e" integrity sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A== +data-view-buffer@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/data-view-buffer/-/data-view-buffer-1.0.1.tgz#8ea6326efec17a2e42620696e671d7d5a8bc66b2" + integrity sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA== + dependencies: + call-bind "^1.0.6" + es-errors "^1.3.0" + is-data-view "^1.0.1" + +data-view-byte-length@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz#90721ca95ff280677eb793749fce1011347669e2" + integrity sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ== + dependencies: + call-bind "^1.0.7" + es-errors "^1.3.0" + is-data-view "^1.0.1" + +data-view-byte-offset@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz#5e0bbfb4828ed2d1b9b400cd8a7d119bca0ff18a" + integrity sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA== + dependencies: + call-bind "^1.0.6" + es-errors "^1.3.0" + is-data-view "^1.0.1" + debug@4, debug@4.3.4, debug@^4.1.0, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" @@ -1638,7 +1625,7 @@ diff@5.0.0: resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== -diff@^5.1.0: +diff@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/diff/-/diff-5.2.0.tgz#26ded047cd1179b78b9537d5ef725503ce1ae531" integrity sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A== @@ -1719,6 +1706,11 @@ electron-to-chromium@^1.4.668: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.681.tgz#5f23fad8aa7e1f64cbb7dd9d15c7e39a1cd7e6e3" integrity sha512-1PpuqJUFWoXZ1E54m8bsLPVYwIVCRzvaL+n5cjigGga4z854abDnFRc+cTa2th4S79kyGqya/1xoR7h+Y5G5lg== +emoji-regex@^10.2.1: + version "10.3.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-10.3.0.tgz#76998b9268409eb3dae3de989254d456e70cfe23" + integrity sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw== + emoji-regex@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" @@ -1801,6 +1793,58 @@ es-abstract@^1.22.1, es-abstract@^1.22.3, es-abstract@^1.22.4: unbox-primitive "^1.0.2" which-typed-array "^1.1.14" +es-abstract@^1.23.0, es-abstract@^1.23.2, es-abstract@^1.23.3: + version "1.23.3" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.23.3.tgz#8f0c5a35cd215312573c5a27c87dfd6c881a0aa0" + integrity sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A== + dependencies: + array-buffer-byte-length "^1.0.1" + arraybuffer.prototype.slice "^1.0.3" + available-typed-arrays "^1.0.7" + call-bind "^1.0.7" + data-view-buffer "^1.0.1" + data-view-byte-length "^1.0.1" + data-view-byte-offset "^1.0.0" + es-define-property "^1.0.0" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + es-set-tostringtag "^2.0.3" + es-to-primitive "^1.2.1" + function.prototype.name "^1.1.6" + get-intrinsic "^1.2.4" + get-symbol-description "^1.0.2" + globalthis "^1.0.3" + gopd "^1.0.1" + has-property-descriptors "^1.0.2" + has-proto "^1.0.3" + has-symbols "^1.0.3" + hasown "^2.0.2" + internal-slot "^1.0.7" + is-array-buffer "^3.0.4" + is-callable "^1.2.7" + is-data-view "^1.0.1" + is-negative-zero "^2.0.3" + is-regex "^1.1.4" + is-shared-array-buffer "^1.0.3" + is-string "^1.0.7" + is-typed-array "^1.1.13" + is-weakref "^1.0.2" + object-inspect "^1.13.1" + object-keys "^1.1.1" + object.assign "^4.1.5" + regexp.prototype.flags "^1.5.2" + safe-array-concat "^1.1.2" + safe-regex-test "^1.0.3" + string.prototype.trim "^1.2.9" + string.prototype.trimend "^1.0.8" + string.prototype.trimstart "^1.0.8" + typed-array-buffer "^1.0.2" + typed-array-byte-length "^1.0.1" + typed-array-byte-offset "^1.0.2" + typed-array-length "^1.0.6" + unbox-primitive "^1.0.2" + which-typed-array "^1.1.15" + es-array-method-boxes-properly@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz#873f3e84418de4ee19c5be752990b2e44718d09e" @@ -1818,7 +1862,7 @@ es-errors@^1.0.0, es-errors@^1.1.0, es-errors@^1.2.1, es-errors@^1.3.0: resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== -es-iterator-helpers@^1.0.12, es-iterator-helpers@^1.0.15: +es-iterator-helpers@^1.0.15: version "1.0.17" resolved "https://registry.yarnpkg.com/es-iterator-helpers/-/es-iterator-helpers-1.0.17.tgz#123d1315780df15b34eb181022da43e734388bb8" integrity sha512-lh7BsUqelv4KUbR5a/ZTaGGIMLCjPGPqJ6q+Oq24YP0RdyptX1uzm4vvaqzk7Zx3bpl/76YLTTDj9L7uYQ92oQ== @@ -1839,7 +1883,34 @@ es-iterator-helpers@^1.0.12, es-iterator-helpers@^1.0.15: iterator.prototype "^1.1.2" safe-array-concat "^1.1.0" -es-set-tostringtag@^2.0.2: +es-iterator-helpers@^1.0.17: + version "1.0.19" + resolved "https://registry.yarnpkg.com/es-iterator-helpers/-/es-iterator-helpers-1.0.19.tgz#117003d0e5fec237b4b5c08aded722e0c6d50ca8" + integrity sha512-zoMwbCcH5hwUkKJkT8kDIBZSz9I6mVG//+lDCinLCGov4+r7NIy0ld8o03M0cJxl2spVf6ESYVS6/gpIfq1FFw== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.3" + es-errors "^1.3.0" + es-set-tostringtag "^2.0.3" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + globalthis "^1.0.3" + has-property-descriptors "^1.0.2" + has-proto "^1.0.3" + has-symbols "^1.0.3" + internal-slot "^1.0.7" + iterator.prototype "^1.1.2" + safe-array-concat "^1.1.2" + +es-object-atoms@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.0.0.tgz#ddb55cd47ac2e240701260bc2a8e31ecb643d941" + integrity sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw== + dependencies: + es-errors "^1.3.0" + +es-set-tostringtag@^2.0.2, es-set-tostringtag@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz#8bb60f0a440c2e4281962428438d58545af39777" integrity sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ== @@ -1864,34 +1935,34 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" -esbuild@^0.20.2: - version "0.20.2" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.20.2.tgz#9d6b2386561766ee6b5a55196c6d766d28c87ea1" - integrity sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g== +esbuild@^0.21.5: + version "0.21.5" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.21.5.tgz#9ca301b120922959b766360d8ac830da0d02997d" + integrity sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw== optionalDependencies: - "@esbuild/aix-ppc64" "0.20.2" - "@esbuild/android-arm" "0.20.2" - "@esbuild/android-arm64" "0.20.2" - "@esbuild/android-x64" "0.20.2" - "@esbuild/darwin-arm64" "0.20.2" - "@esbuild/darwin-x64" "0.20.2" - "@esbuild/freebsd-arm64" "0.20.2" - "@esbuild/freebsd-x64" "0.20.2" - "@esbuild/linux-arm" "0.20.2" - "@esbuild/linux-arm64" "0.20.2" - "@esbuild/linux-ia32" "0.20.2" - "@esbuild/linux-loong64" "0.20.2" - "@esbuild/linux-mips64el" "0.20.2" - "@esbuild/linux-ppc64" "0.20.2" - "@esbuild/linux-riscv64" "0.20.2" - "@esbuild/linux-s390x" "0.20.2" - "@esbuild/linux-x64" "0.20.2" - "@esbuild/netbsd-x64" "0.20.2" - "@esbuild/openbsd-x64" "0.20.2" - "@esbuild/sunos-x64" "0.20.2" - "@esbuild/win32-arm64" "0.20.2" - "@esbuild/win32-ia32" "0.20.2" - "@esbuild/win32-x64" "0.20.2" + "@esbuild/aix-ppc64" "0.21.5" + "@esbuild/android-arm" "0.21.5" + "@esbuild/android-arm64" "0.21.5" + "@esbuild/android-x64" "0.21.5" + "@esbuild/darwin-arm64" "0.21.5" + "@esbuild/darwin-x64" "0.21.5" + "@esbuild/freebsd-arm64" "0.21.5" + "@esbuild/freebsd-x64" "0.21.5" + "@esbuild/linux-arm" "0.21.5" + "@esbuild/linux-arm64" "0.21.5" + "@esbuild/linux-ia32" "0.21.5" + "@esbuild/linux-loong64" "0.21.5" + "@esbuild/linux-mips64el" "0.21.5" + "@esbuild/linux-ppc64" "0.21.5" + "@esbuild/linux-riscv64" "0.21.5" + "@esbuild/linux-s390x" "0.21.5" + "@esbuild/linux-x64" "0.21.5" + "@esbuild/netbsd-x64" "0.21.5" + "@esbuild/openbsd-x64" "0.21.5" + "@esbuild/sunos-x64" "0.21.5" + "@esbuild/win32-arm64" "0.21.5" + "@esbuild/win32-ia32" "0.21.5" + "@esbuild/win32-x64" "0.21.5" escalade@^3.1.1: version "3.1.2" @@ -1908,10 +1979,10 @@ escape-string-regexp@^1.0.5: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== -eslint-config-prettier@^8.10.0: - version "8.10.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz#3a06a662130807e2502fc3ff8b4143d8a0658e11" - integrity sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg== +eslint-config-prettier@^9.1.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz#31af3d94578645966c082fcb71a5846d3c94867f" + integrity sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw== eslint-import-resolver-node@^0.3.9: version "0.3.9" @@ -1935,10 +2006,10 @@ eslint-import-resolver-typescript@^3.6.1: is-core-module "^2.11.0" is-glob "^4.0.3" -eslint-module-utils@^2.7.1, eslint-module-utils@^2.7.4, eslint-module-utils@^2.8.0: - version "2.8.0" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz#e439fee65fc33f6bba630ff621efc38ec0375c49" - integrity sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw== +eslint-module-utils@^2.7.4, eslint-module-utils@^2.8.0, eslint-module-utils@^2.8.1: + version "2.8.1" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.8.1.tgz#52f2404300c3bd33deece9d7372fb337cc1d7c34" + integrity sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q== dependencies: debug "^3.2.7" @@ -1958,7 +2029,7 @@ eslint-plugin-eslint-comments@^3.2.0: escape-string-regexp "^1.0.5" ignore "^5.0.5" -eslint-plugin-import@^2.28.0: +eslint-plugin-import@^2.29.1: version "2.29.1" resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz#d45b37b5ef5901d639c15270d74d46d161150643" integrity sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw== @@ -1986,14 +2057,14 @@ eslint-plugin-jest-formatting@^3.1.0: resolved "https://registry.yarnpkg.com/eslint-plugin-jest-formatting/-/eslint-plugin-jest-formatting-3.1.0.tgz#b26dd5a40f432b642dcc880021a771bb1c93dcd2" integrity sha512-XyysraZ1JSgGbLSDxjj5HzKKh0glgWf+7CkqxbTqb7zEhW7X2WHo5SBQ8cGhnszKN+2Lj3/oevBlHNbHezoc/A== -eslint-plugin-jest@^27.2.3: - version "27.9.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-27.9.0.tgz#7c98a33605e1d8b8442ace092b60e9919730000b" - integrity sha512-QIT7FH7fNmd9n4se7FFKHbsLKGQiw885Ds6Y/sxKgCZ6natwCsXdgPOADnYVxN2QrRweF0FZWbJ6S7Rsn7llug== +eslint-plugin-jest@^28.5.0: + version "28.5.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-28.5.0.tgz#b497b795de37f671eaccd38bd83030186ff5dc8d" + integrity sha512-6np6DGdmNq/eBbA7HOUNV8fkfL86PYwBfwyb8n23FXgJNTR8+ot3smRHjza9LGsBBZRypK3qyF79vMjohIL8eQ== dependencies: - "@typescript-eslint/utils" "^5.10.0" + "@typescript-eslint/utils" "^6.0.0 || ^7.0.0" -eslint-plugin-jsx-a11y@^6.7.1: +eslint-plugin-jsx-a11y@^6.8.0: version "6.8.0" resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.8.0.tgz#2fa9c701d44fcd722b7c771ec322432857fcbad2" integrity sha512-Hdh937BS3KdwwbBaKd5+PLCOmYY6U4f2h9Z2ktwtNKvIdIEu137rjYbcb9ApSbVJfWxANNuiKTD/9tOKjK9qOA== @@ -2027,7 +2098,7 @@ eslint-plugin-node@^11.1.0: resolve "^1.10.1" semver "^6.1.0" -eslint-plugin-prettier@^5.0.0, eslint-plugin-prettier@^5.1.3: +eslint-plugin-prettier@^5.1.3: version "5.1.3" resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.3.tgz#17cfade9e732cef32b5f5be53bd4e07afd8e67e1" integrity sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw== @@ -2040,34 +2111,36 @@ eslint-plugin-promise@^6.1.1: resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-6.1.1.tgz#269a3e2772f62875661220631bd4dafcb4083816" integrity sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig== -eslint-plugin-react-hooks@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz#4c3e697ad95b77e93f8646aaa1630c1ba607edd3" - integrity sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g== +eslint-plugin-react-hooks@^4.6.2: + version "4.6.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.2.tgz#c829eb06c0e6f484b3fbb85a97e57784f328c596" + integrity sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ== -eslint-plugin-react@^7.33.1: - version "7.33.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.33.2.tgz#69ee09443ffc583927eafe86ffebb470ee737608" - integrity sha512-73QQMKALArI8/7xGLNI/3LylrEYrlKZSb5C9+q3OtOewTnMQi5cT+aE9E41sLCmli3I9PGGmD1yiZydyo4FEPw== +eslint-plugin-react@^7.34.1: + version "7.34.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.34.1.tgz#6806b70c97796f5bbfb235a5d3379ece5f4da997" + integrity sha512-N97CxlouPT1AHt8Jn0mhhN2RrADlUAsk1/atcT2KyA/l9Q/E6ll7OIGwNumFmWfZ9skV3XXccYS19h80rHtgkw== dependencies: - array-includes "^3.1.6" - array.prototype.flatmap "^1.3.1" - array.prototype.tosorted "^1.1.1" + array-includes "^3.1.7" + array.prototype.findlast "^1.2.4" + array.prototype.flatmap "^1.3.2" + array.prototype.toreversed "^1.1.2" + array.prototype.tosorted "^1.1.3" doctrine "^2.1.0" - es-iterator-helpers "^1.0.12" + es-iterator-helpers "^1.0.17" estraverse "^5.3.0" jsx-ast-utils "^2.4.1 || ^3.0.0" minimatch "^3.1.2" - object.entries "^1.1.6" - object.fromentries "^2.0.6" - object.hasown "^1.1.2" - object.values "^1.1.6" + object.entries "^1.1.7" + object.fromentries "^2.0.7" + object.hasown "^1.1.3" + object.values "^1.1.7" prop-types "^15.8.1" - resolve "^2.0.0-next.4" + resolve "^2.0.0-next.5" semver "^6.3.1" - string.prototype.matchall "^4.0.8" + string.prototype.matchall "^4.0.10" -eslint-plugin-sort-class-members@^1.18.0: +eslint-plugin-sort-class-members@^1.20.0: version "1.20.0" resolved "https://registry.yarnpkg.com/eslint-plugin-sort-class-members/-/eslint-plugin-sort-class-members-1.20.0.tgz#88ea3d53b2ffb319dba1049c28e20797685a0b9e" integrity sha512-xNaik4GQ/pRwd1soIVI28HEXZbrWoLR5krau2+E8YcHj7N09UviPg5mYhf/rELG29bIFJdXDOFJazN90+luMOw== @@ -2077,7 +2150,7 @@ eslint-rule-composer@^0.3.0: resolved "https://registry.yarnpkg.com/eslint-rule-composer/-/eslint-rule-composer-0.3.0.tgz#79320c927b0c5c0d3d3d2b76c8b4a488f25bbaf9" integrity sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg== -eslint-scope@5.1.1, eslint-scope@^5.1.1: +eslint-scope@5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== @@ -2267,10 +2340,10 @@ file-entry-cache@^6.0.1: dependencies: flat-cache "^3.0.4" -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== +fill-range@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" + integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== dependencies: to-regex-range "^5.0.1" @@ -2439,16 +2512,16 @@ glob@8.1.0: minimatch "^5.0.1" once "^1.3.0" -glob@^10.3.12: - version "10.3.12" - resolved "https://registry.yarnpkg.com/glob/-/glob-10.3.12.tgz#3a65c363c2e9998d220338e88a5f6ac97302960b" - integrity sha512-TCNv8vJ+xz4QiqTpfOJA7HvYv+tNIRHKfUWw/q+v2jdgN4ebz+KY9tGx5J4rHP0o84mNP+ApH66HRX8us3Khqg== +glob@^10.4.1: + version "10.4.1" + resolved "https://registry.yarnpkg.com/glob/-/glob-10.4.1.tgz#0cfb01ab6a6b438177bfe6a58e2576f6efe909c2" + integrity sha512-2jelhlq3E4ho74ZyVLN03oKdAZVUa6UDZzFLVH1H7dnoax+y9qyaq8zBkfDIggjniU19z0wU18y16jMB2eyVIw== dependencies: foreground-child "^3.1.0" - jackspeak "^2.3.6" - minimatch "^9.0.1" - minipass "^7.0.4" - path-scurry "^1.10.2" + jackspeak "^3.1.2" + minimatch "^9.0.4" + minipass "^7.1.2" + path-scurry "^1.11.1" glob@^7.0.6, glob@^7.1.3: version "7.2.3" @@ -2556,6 +2629,13 @@ hasown@^2.0.0, hasown@^2.0.1: dependencies: function-bind "^1.1.2" +hasown@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" + integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== + dependencies: + function-bind "^1.1.2" + he@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" @@ -2586,16 +2666,7 @@ htmlparser2@^8.0.1: domutils "^3.0.1" entities "^4.4.0" -http-proxy-agent@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz#8a8c8ef7f5932ccf953c296ca8291b95aa74aa3a" - integrity sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg== - dependencies: - "@tootallnate/once" "1" - agent-base "6" - debug "4" - -http-proxy-agent@^7.0.0: +http-proxy-agent@^7.0.0, http-proxy-agent@^7.0.2: version "7.0.2" resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz#9a8b1f246866c028509486585f62b8f2c18c270e" integrity sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig== @@ -2603,15 +2674,7 @@ http-proxy-agent@^7.0.0: agent-base "^7.1.0" debug "^4.3.4" -https-proxy-agent@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" - integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== - dependencies: - agent-base "6" - debug "4" - -https-proxy-agent@^7.0.0: +https-proxy-agent@^7.0.0, https-proxy-agent@^7.0.4: version "7.0.4" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz#8e97b841a029ad8ddc8731f26595bad868cb4168" integrity sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg== @@ -2619,12 +2682,12 @@ https-proxy-agent@^7.0.0: agent-base "^7.0.2" debug "4" -ieee754@^1.1.13: +ieee754@^1.1.13, ieee754@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== -ignore@^5.0.5, ignore@^5.1.1, ignore@^5.2.0, ignore@^5.2.4, ignore@^5.3.1: +ignore@^5.0.5, ignore@^5.1.1, ignore@^5.2.0, ignore@^5.3.1: version "5.3.1" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef" integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw== @@ -2665,7 +2728,7 @@ ini@~1.3.0: resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== -internal-slot@^1.0.5, internal-slot@^1.0.7: +internal-slot@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.7.tgz#c06dcca3ed874249881007b0a5523b172a190802" integrity sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g== @@ -2730,6 +2793,13 @@ is-core-module@^2.11.0, is-core-module@^2.13.0, is-core-module@^2.13.1: dependencies: hasown "^2.0.0" +is-data-view@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-data-view/-/is-data-view-1.0.1.tgz#4b4d3a511b70f3dc26d42c03ca9ca515d847759f" + integrity sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w== + dependencies: + is-typed-array "^1.1.13" + is-date-object@^1.0.1, is-date-object@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" @@ -2773,12 +2843,17 @@ is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: dependencies: is-extglob "^2.1.1" +is-interactive@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-2.0.0.tgz#40c57614593826da1100ade6059778d597f16e90" + integrity sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ== + is-map@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.2.tgz#00922db8c9bf73e81b7a335827bc2a43f2b91127" integrity sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg== -is-negative-zero@^2.0.2: +is-negative-zero@^2.0.2, is-negative-zero@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.3.tgz#ced903a027aca6381b777a5743069d7376a49747" integrity sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw== @@ -2818,7 +2893,7 @@ is-set@^2.0.1: resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.2.tgz#90755fa4c2562dc1c5d4024760d6119b94ca18ec" integrity sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g== -is-shared-array-buffer@^1.0.2: +is-shared-array-buffer@^1.0.2, is-shared-array-buffer@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz#1237f1cba059cdb62431d378dcc37d9680181688" integrity sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg== @@ -2851,6 +2926,11 @@ is-unicode-supported@^0.1.0: resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== +is-unicode-supported@^1.1.0, is-unicode-supported@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz#d824984b616c292a2e198207d4a609983842f714" + integrity sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ== + is-weakmap@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/is-weakmap/-/is-weakmap-2.0.1.tgz#5008b59bdc43b698201d18f62b37b2ca243e8cf2" @@ -2904,10 +2984,10 @@ iterator.prototype@^1.1.2: reflect.getprototypeof "^1.0.4" set-function-name "^2.0.1" -jackspeak@^2.3.6: - version "2.3.6" - resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-2.3.6.tgz#647ecc472238aee4b06ac0e461acc21a8c505ca8" - integrity sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ== +jackspeak@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-3.1.2.tgz#eada67ea949c6b71de50f1b09c92a961897b90ab" + integrity sha512-kWmLKn2tRtfYMF/BakihVVRzBKOxz4gJMiL2Rj91WnAB5TPZumSH99R/Yf1qE1u4uRimvCSJfm6hnxohXeEXjQ== dependencies: "@isaacs/cliui" "^8.0.2" optionalDependencies: @@ -3151,6 +3231,14 @@ log-symbols@4.1.0: chalk "^4.1.0" is-unicode-supported "^0.1.0" +log-symbols@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-5.1.0.tgz#a20e3b9a5f53fac6aeb8e2bb22c07cf2c8f16d93" + integrity sha512-l0x2DvrW294C9uDCoQe1VSU4gf529FkSZ6leBl4TiqZH/e+0R7hSfHQBNut2mNygDgHwvYHfFLn6Oxb3VWj2rA== + dependencies: + chalk "^5.0.0" + is-unicode-supported "^1.1.0" + loose-envify@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" @@ -3230,6 +3318,11 @@ mime@^1.3.4: resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== +mimic-fn@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== + mimic-response@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" @@ -3242,13 +3335,6 @@ minimatch@5.0.1: dependencies: brace-expansion "^2.0.1" -minimatch@9.0.3: - version "9.0.3" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.3.tgz#a6e00c3de44c3a542bfaae70abfc22420a6da825" - integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg== - dependencies: - brace-expansion "^2.0.1" - minimatch@^3.0.3, minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" @@ -3263,7 +3349,7 @@ minimatch@^5.0.1, minimatch@^5.1.0: dependencies: brace-expansion "^2.0.1" -minimatch@^9.0.1, minimatch@^9.0.4: +minimatch@^9.0.4: version "9.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.4.tgz#8e49c731d1749cbec05050ee5145147b32496a51" integrity sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw== @@ -3275,10 +3361,10 @@ minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.6: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== -"minipass@^5.0.0 || ^6.0.2 || ^7.0.0", minipass@^7.0.4: - version "7.0.4" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.0.4.tgz#dbce03740f50a4786ba994c1fb908844d27b038c" - integrity sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ== +"minipass@^5.0.0 || ^6.0.2 || ^7.0.0", minipass@^7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.2.tgz#93a9626ce5e5e66bd4db86849e7515e92340a707" + integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw== mkdirp-classic@^0.5.2, mkdirp-classic@^0.5.3: version "0.5.3" @@ -3336,10 +3422,10 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== -nise@^5.1.5: - version "5.1.9" - resolved "https://registry.yarnpkg.com/nise/-/nise-5.1.9.tgz#0cb73b5e4499d738231a473cd89bd8afbb618139" - integrity sha512-qOnoujW4SV6e40dYxJOb3uvuoPHtmLzIk4TFo+j0jPJoC+5Z9xja5qH5JZobEPsa8+YYphMrOSwnrshEhG2qww== +nise@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/nise/-/nise-6.0.0.tgz#ae56fccb5d912037363c3b3f29ebbfa28bde8b48" + integrity sha512-K8ePqo9BFvN31HXwEtTNGzgrPpmvgciDsFz8aztFjt4LqKO/JeFD8tBOeuDiCMXrIl/m1YvfH8auSpxfaD09wg== dependencies: "@sinonjs/commons" "^3.0.0" "@sinonjs/fake-timers" "^11.2.2" @@ -3423,7 +3509,7 @@ object.assign@^4.1.4, object.assign@^4.1.5: has-symbols "^1.0.3" object-keys "^1.1.1" -object.entries@^1.1.6, object.entries@^1.1.7: +object.entries@^1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.7.tgz#2b47760e2a2e3a752f39dd874655c61a7f03c131" integrity sha512-jCBs/0plmPsOnrKAfFQXRG2NFjlhZgjjcBLSmTnEhU8U6vVTsVe8ANeQJCHTl3gSsI4J+0emOoCgoKlmQPMgmA== @@ -3432,7 +3518,7 @@ object.entries@^1.1.6, object.entries@^1.1.7: define-properties "^1.2.0" es-abstract "^1.22.1" -object.fromentries@^2.0.6, object.fromentries@^2.0.7: +object.fromentries@^2.0.7: version "2.0.7" resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.7.tgz#71e95f441e9a0ea6baf682ecaaf37fa2a8d7e616" integrity sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA== @@ -3452,13 +3538,14 @@ object.groupby@^1.0.1: es-abstract "^1.22.3" es-errors "^1.0.0" -object.hasown@^1.1.2: - version "1.1.3" - resolved "https://registry.yarnpkg.com/object.hasown/-/object.hasown-1.1.3.tgz#6a5f2897bb4d3668b8e79364f98ccf971bda55ae" - integrity sha512-fFI4VcYpRHvSLXxP7yiZOMAd331cPfd2p7PFDVbgUsYOfCT3tICVqXWngbjr4m49OvsBwUBQ6O2uQoJvy3RexA== +object.hasown@^1.1.3: + version "1.1.4" + resolved "https://registry.yarnpkg.com/object.hasown/-/object.hasown-1.1.4.tgz#e270ae377e4c120cdcb7656ce66884a6218283dc" + integrity sha512-FZ9LZt9/RHzGySlBARE3VF+gE26TxR38SdmqOqliuTnl9wrKulaQs+4dee1V+Io8VfxqzAfHu6YuRgUy8OHoTg== dependencies: - define-properties "^1.2.0" - es-abstract "^1.22.1" + define-properties "^1.2.1" + es-abstract "^1.23.2" + es-object-atoms "^1.0.0" object.values@^1.1.6, object.values@^1.1.7: version "1.1.7" @@ -3476,6 +3563,13 @@ once@^1.3.0, once@^1.3.1, once@^1.4.0: dependencies: wrappy "1" +onetime@^5.1.0: + version "5.1.2" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" + integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== + dependencies: + mimic-fn "^2.1.0" + open@^8.0.0: version "8.4.2" resolved "https://registry.yarnpkg.com/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9" @@ -3497,6 +3591,21 @@ optionator@^0.9.3: prelude-ls "^1.2.1" type-check "^0.4.0" +ora@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/ora/-/ora-7.0.1.tgz#cdd530ecd865fe39e451a0e7697865669cb11930" + integrity sha512-0TUxTiFJWv+JnjWm4o9yvuskpEJLXTcng8MJuKd+SzAzp2o+OP3HWqNhB4OdJRt1Vsd9/mR0oyaEYlOnL7XIRw== + dependencies: + chalk "^5.3.0" + cli-cursor "^4.0.0" + cli-spinners "^2.9.0" + is-interactive "^2.0.0" + is-unicode-supported "^1.3.0" + log-symbols "^5.1.0" + stdin-discarder "^0.1.0" + string-width "^6.1.0" + strip-ansi "^7.1.0" + ovsx@^0.9.1: version "0.9.1" resolved "https://registry.yarnpkg.com/ovsx/-/ovsx-0.9.1.tgz#dfd2f0d760a911247703d196ce00d4a156966ddc" @@ -3602,10 +3711,10 @@ path-parse@^1.0.7: resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== -path-scurry@^1.10.2: - version "1.10.2" - resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.10.2.tgz#8f6357eb1239d5fa1da8b9f70e9c080675458ba7" - integrity sha512-7xTavNy5RQXnsjANvVvMkEjvloOinkAjv/Z6Ildz9v2RinZ4SBKTWFOVRbaF8p0vpHnyjV/UwNDdKuUv6M5qcA== +path-scurry@^1.11.1: + version "1.11.1" + resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.11.1.tgz#7960a668888594a0720b12a911d1a742ab9f11d2" + integrity sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA== dependencies: lru-cache "^10.2.0" minipass "^5.0.0 || ^6.0.2 || ^7.0.0" @@ -3682,10 +3791,10 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" -prettier@^3.2.5: - version "3.2.5" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.2.5.tgz#e52bc3090586e824964a8813b09aba6233b28368" - integrity sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A== +prettier@^3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.3.2.tgz#03ff86dc7c835f2d2559ee76876a3914cec4a90a" + integrity sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA== process-nextick-args@~2.0.0: version "2.0.1" @@ -3802,7 +3911,7 @@ regenerator-runtime@^0.14.0: resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz#356ade10263f685dda125100cd862c1db895327f" integrity sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw== -regexp.prototype.flags@^1.5.0, regexp.prototype.flags@^1.5.2: +regexp.prototype.flags@^1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz#138f644a3350f981a858c44f6bb1a61ff59be334" integrity sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw== @@ -3841,7 +3950,7 @@ resolve@^1.10.1, resolve@^1.22.4: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" -resolve@^2.0.0-next.4: +resolve@^2.0.0-next.5: version "2.0.0-next.5" resolved "https://registry.yarnpkg.com/resolve/-/resolve-2.0.0-next.5.tgz#6b0ec3107e671e52b68cd068ef327173b90dc03c" integrity sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA== @@ -3850,6 +3959,14 @@ resolve@^2.0.0-next.4: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" +restore-cursor@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-4.0.0.tgz#519560a4318975096def6e609d44100edaa4ccb9" + integrity sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg== + dependencies: + onetime "^5.1.0" + signal-exit "^3.0.2" + reusify@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" @@ -3879,6 +3996,16 @@ safe-array-concat@^1.1.0: has-symbols "^1.0.3" isarray "^2.0.5" +safe-array-concat@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.1.2.tgz#81d77ee0c4e8b863635227c721278dd524c20edb" + integrity sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q== + dependencies: + call-bind "^1.0.7" + get-intrinsic "^1.2.4" + has-symbols "^1.0.3" + isarray "^2.0.5" + safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" @@ -3913,12 +4040,10 @@ semver@^6.1.0, semver@^6.3.1: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.3.5, semver@^7.3.7, semver@^7.5.2, semver@^7.5.4, semver@^7.6.0: - version "7.6.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.0.tgz#1a46a4db4bffcccd97b743b5005c8325f23d4e2d" - integrity sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg== - dependencies: - lru-cache "^6.0.0" +semver@^7.3.5, semver@^7.3.7, semver@^7.5.2, semver@^7.5.4, semver@^7.6.0, semver@^7.6.2: + version "7.6.2" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.2.tgz#1e3b34759f896e8f14d6134732ce798aeb0c6e13" + integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w== sentence-case@^3.0.4: version "3.0.4" @@ -3948,7 +4073,7 @@ set-function-length@^1.2.1: gopd "^1.0.1" has-property-descriptors "^1.0.1" -set-function-name@^2.0.0, set-function-name@^2.0.1: +set-function-name@^2.0.1, set-function-name@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/set-function-name/-/set-function-name-2.0.2.tgz#16a705c5a0dc2f5e638ca96d8a8cd4e1c2b90985" integrity sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ== @@ -3985,6 +4110,21 @@ side-channel@^1.0.4: get-intrinsic "^1.2.4" object-inspect "^1.13.1" +side-channel@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2" + integrity sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA== + dependencies: + call-bind "^1.0.7" + es-errors "^1.3.0" + get-intrinsic "^1.2.4" + object-inspect "^1.13.1" + +signal-exit@^3.0.2: + version "3.0.7" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" + integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== + signal-exit@^4.0.1: version "4.1.0" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" @@ -4004,17 +4144,17 @@ simple-get@^4.0.0: once "^1.3.1" simple-concat "^1.0.0" -sinon@^17.0.1: - version "17.0.1" - resolved "https://registry.yarnpkg.com/sinon/-/sinon-17.0.1.tgz#26b8ef719261bf8df43f925924cccc96748e407a" - integrity sha512-wmwE19Lie0MLT+ZYNpDymasPHUKTaZHUH/pKEubRXIzySv9Atnlw+BUMGCzWgV7b7wO+Hw6f1TEOr0IUnmU8/g== +sinon@^18.0.0: + version "18.0.0" + resolved "https://registry.yarnpkg.com/sinon/-/sinon-18.0.0.tgz#69ca293dbc3e82590a8b0d46c97f63ebc1e5fc01" + integrity sha512-+dXDXzD1sBO6HlmZDd7mXZCR/y5ECiEiGCBSGuFD/kZ0bDTofPYc6JaeGmPSF+1j1MejGUWkORbYOLDyvqCWpA== dependencies: - "@sinonjs/commons" "^3.0.0" + "@sinonjs/commons" "^3.0.1" "@sinonjs/fake-timers" "^11.2.2" "@sinonjs/samsam" "^8.0.0" - diff "^5.1.0" - nise "^5.1.5" - supports-color "^7.2.0" + diff "^5.2.0" + nise "^6.0.0" + supports-color "^7" slash@^3.0.0: version "3.0.0" @@ -4029,6 +4169,13 @@ snake-case@^3.0.4: dot-case "^3.0.4" tslib "^2.0.3" +stdin-discarder@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/stdin-discarder/-/stdin-discarder-0.1.0.tgz#22b3e400393a8e28ebf53f9958f3880622efde21" + integrity sha512-xhV7w8S+bUwlPTb4bAOUQhv8/cSS5offJuX8GQGq32ONF0ZtDWKfkdomM3HMRA+LhX6um/FZ0COqlwsjD53LeQ== + dependencies: + bl "^5.0.0" + stoppable@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/stoppable/-/stoppable-1.1.0.tgz#32da568e83ea488b08e4d7ea2c3bcc9d75015d5b" @@ -4061,20 +4208,32 @@ string-width@^5.0.1, string-width@^5.1.2: emoji-regex "^9.2.2" strip-ansi "^7.0.1" -string.prototype.matchall@^4.0.8: - version "4.0.10" - resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.10.tgz#a1553eb532221d4180c51581d6072cd65d1ee100" - integrity sha512-rGXbGmOEosIQi6Qva94HUjgPs9vKW+dkG7Y8Q5O2OYkWL6wFaTRZO8zM4mhP94uX55wgyrXzfS2aGtGzUL7EJQ== +string-width@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-6.1.0.tgz#96488d6ed23f9ad5d82d13522af9e4c4c3fd7518" + integrity sha512-k01swCJAgQmuADB0YIc+7TuatfNvTBVOoaUWJjTB9R4VJzR5vNWzf5t42ESVZFPS8xTySF7CAdV4t/aaIm3UnQ== dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" - get-intrinsic "^1.2.1" + eastasianwidth "^0.2.0" + emoji-regex "^10.2.1" + strip-ansi "^7.0.1" + +string.prototype.matchall@^4.0.10: + version "4.0.11" + resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.11.tgz#1092a72c59268d2abaad76582dccc687c0297e0a" + integrity sha512-NUdh0aDavY2og7IbBPenWqR9exH+E26Sv8e0/eTe1tltDGZL+GtBkDAnnyBtmekfK6/Dq3MkcGtzXFEd1LQrtg== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + get-intrinsic "^1.2.4" + gopd "^1.0.1" has-symbols "^1.0.3" - internal-slot "^1.0.5" - regexp.prototype.flags "^1.5.0" - set-function-name "^2.0.0" - side-channel "^1.0.4" + internal-slot "^1.0.7" + regexp.prototype.flags "^1.5.2" + set-function-name "^2.0.2" + side-channel "^1.0.6" string.prototype.trim@^1.2.8: version "1.2.8" @@ -4085,6 +4244,16 @@ string.prototype.trim@^1.2.8: define-properties "^1.2.0" es-abstract "^1.22.1" +string.prototype.trim@^1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz#b6fa326d72d2c78b6df02f7759c73f8f6274faa4" + integrity sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.0" + es-object-atoms "^1.0.0" + string.prototype.trimend@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz#1bb3afc5008661d73e2dc015cd4853732d6c471e" @@ -4094,6 +4263,15 @@ string.prototype.trimend@^1.0.7: define-properties "^1.2.0" es-abstract "^1.22.1" +string.prototype.trimend@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz#3651b8513719e8a9f48de7f2f77640b26652b229" + integrity sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" + string.prototype.trimstart@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz#d4cdb44b83a4737ffbac2d406e405d43d0184298" @@ -4103,6 +4281,15 @@ string.prototype.trimstart@^1.0.7: define-properties "^1.2.0" es-abstract "^1.22.1" +string.prototype.trimstart@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz#7ee834dda8c7c17eff3118472bb35bfedaa34dde" + integrity sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" + string_decoder@^1.1.1: version "1.3.0" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" @@ -4131,7 +4318,7 @@ strip-ansi@^6.0.0, strip-ansi@^6.0.1: dependencies: ansi-regex "^5.0.1" -strip-ansi@^7.0.1: +strip-ansi@^7.0.1, strip-ansi@^7.1.0: version "7.1.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" integrity sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ== @@ -4167,7 +4354,7 @@ supports-color@^5.3.0: dependencies: has-flag "^3.0.0" -supports-color@^7.1.0, supports-color@^7.2.0: +supports-color@^7, supports-color@^7.1.0: version "7.2.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== @@ -4237,7 +4424,7 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" -ts-api-utils@^1.0.1, ts-api-utils@^1.3.0: +ts-api-utils@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.3.0.tgz#4b490e27129f1e8e686b45cc4ab63714dc60eea1" integrity sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ== @@ -4252,23 +4439,11 @@ tsconfig-paths@^3.15.0: minimist "^1.2.6" strip-bom "^3.0.0" -tslib@^1.8.1: - version "1.14.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" - integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== - tslib@^2.0.3, tslib@^2.2.0, tslib@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== -tsutils@^3.21.0: - version "3.21.0" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" - integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== - dependencies: - tslib "^1.8.1" - tunnel-agent@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" @@ -4298,7 +4473,7 @@ type-fest@^0.20.2: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== -typed-array-buffer@^1.0.1: +typed-array-buffer@^1.0.1, typed-array-buffer@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz#1867c5d83b20fcb5ccf32649e5e2fc7424474ff3" integrity sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ== @@ -4307,7 +4482,7 @@ typed-array-buffer@^1.0.1: es-errors "^1.3.0" is-typed-array "^1.1.13" -typed-array-byte-length@^1.0.0: +typed-array-byte-length@^1.0.0, typed-array-byte-length@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz#d92972d3cff99a3fa2e765a28fcdc0f1d89dec67" integrity sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw== @@ -4318,7 +4493,7 @@ typed-array-byte-length@^1.0.0: has-proto "^1.0.3" is-typed-array "^1.1.13" -typed-array-byte-offset@^1.0.0: +typed-array-byte-offset@^1.0.0, typed-array-byte-offset@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz#f9ec1acb9259f395093e4567eb3c28a580d02063" integrity sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA== @@ -4342,6 +4517,18 @@ typed-array-length@^1.0.4: is-typed-array "^1.1.13" possible-typed-array-names "^1.0.0" +typed-array-length@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.6.tgz#57155207c76e64a3457482dfdc1c9d1d3c4c73a3" + integrity sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g== + dependencies: + call-bind "^1.0.7" + for-each "^0.3.3" + gopd "^1.0.1" + has-proto "^1.0.3" + is-typed-array "^1.1.13" + possible-typed-array-names "^1.0.0" + typed-rest-client@^1.8.4: version "1.8.11" resolved "https://registry.yarnpkg.com/typed-rest-client/-/typed-rest-client-1.8.11.tgz#6906f02e3c91e8d851579f255abf0fd60800a04d" @@ -4517,6 +4704,17 @@ which-typed-array@^1.1.14, which-typed-array@^1.1.9: gopd "^1.0.1" has-tostringtag "^1.0.1" +which-typed-array@^1.1.15: + version "1.1.15" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.15.tgz#264859e9b11a649b388bfaaf4f767df1f779b38d" + integrity sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA== + dependencies: + available-typed-arrays "^1.0.7" + call-bind "^1.0.7" + for-each "^0.3.3" + gopd "^1.0.1" + has-tostringtag "^1.0.2" + which@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1"