From 9e9181392498c9cd59aa53d2a19f2313eac6bc0b Mon Sep 17 00:00:00 2001 From: Earlopain <14981592+Earlopain@users.noreply.github.com> Date: Wed, 10 Apr 2024 21:32:03 +0200 Subject: [PATCH 001/189] Ignore non-ruby files in file watcher (#1912) Currently there is only a listener for ruby files but that might changein the future. Addons are also able to register additional file watcher events, config files as an example --- lib/ruby_lsp/server.rb | 1 + test/server_test.rb | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/lib/ruby_lsp/server.rb b/lib/ruby_lsp/server.rb index b09341381a..66c136efa4 100644 --- a/lib/ruby_lsp/server.rb +++ b/lib/ruby_lsp/server.rb @@ -610,6 +610,7 @@ def workspace_did_change_watched_files(message) uri = URI(change[:uri]) file_path = uri.to_standardized_path next if file_path.nil? || File.directory?(file_path) + next unless file_path.end_with?(".rb") load_path_entry = $LOAD_PATH.find { |load_path| file_path.start_with?(load_path) } indexable = RubyIndexer::IndexablePath.new(load_path_entry, file_path) diff --git a/test/server_test.rb b/test/server_test.rb index 152ca8db6b..278f95e990 100644 --- a/test/server_test.rb +++ b/test/server_test.rb @@ -474,6 +474,27 @@ def test_backtrace_is_printed_to_stderr_on_exceptions assert_match(%r{ruby-lsp/lib/ruby_lsp/server\.rb:\d+:in `process_message'}, stderr) end + def test_changed_file_only_indexes_ruby + @server.global_state.index.expects(:index_single).once.with do |indexable| + indexable.full_path == "/foo.rb" + end + @server.process_message({ + method: "workspace/didChangeWatchedFiles", + params: { + changes: [ + { + uri: URI("file:///foo.rb"), + type: RubyLsp::Constant::FileChangeType::CREATED, + }, + { + uri: URI("file:///.rubocop.yml"), + type: RubyLsp::Constant::FileChangeType::CREATED, + }, + ], + }, + }) + end + private def with_uninstalled_rubocop(&block) From 3850b8236ef24d545ca39357131ef2d2460890e2 Mon Sep 17 00:00:00 2001 From: Earlopain <14981592+Earlopain@users.noreply.github.com> Date: Wed, 10 Apr 2024 22:03:36 +0200 Subject: [PATCH 002/189] Remove `Singleton` from formatters (#1904) This will make it trivial to reload the rubocop config for #1457 without doing an awkward `Singleton.__init__`. With `GlobalState` being a thing now, I don't see the need for a singleton --- ADDONS.md | 6 ++---- lib/ruby_lsp/requests/support/rubocop_formatter.rb | 3 --- .../requests/support/syntax_tree_formatter.rb | 3 --- lib/ruby_lsp/server.rb | 4 ++-- test/requests/code_actions_formatting_test.rb | 2 +- test/requests/diagnostics_expectations_test.rb | 2 +- test/requests/diagnostics_test.rb | 5 ++--- test/requests/formatting_expectations_test.rb | 2 +- test/requests/formatting_test.rb | 11 ++++------- test/server_test.rb | 11 ++++++++--- 10 files changed, 21 insertions(+), 28 deletions(-) diff --git a/ADDONS.md b/ADDONS.md index 4bbdc76ba1..a988ed4579 100644 --- a/ADDONS.md +++ b/ADDONS.md @@ -222,15 +222,13 @@ class MyFormatterRubyLspAddon < RubyLsp::Addon def activate(global_state, message_queue) # The first argument is an identifier users can pick to select this formatter. To use this formatter, users must # have rubyLsp.formatter configured to "my_formatter" - # The second argument is a singleton instance that implements the `FormatterRunner` interface (see below) - global_state.register_formatter("my_formatter", MyFormatterRunner.instance) + # The second argument is a class instance that implements the `FormatterRunner` interface (see below) + global_state.register_formatter("my_formatter", MyFormatterRunner.new) end end # Custom formatter class MyFormatter - # Make it a singleton class - include Singleton # If using Sorbet to develop the addon, then include this interface to make sure the class is properly implemented include RubyLsp::Requests::Support::Formatter diff --git a/lib/ruby_lsp/requests/support/rubocop_formatter.rb b/lib/ruby_lsp/requests/support/rubocop_formatter.rb index 51b25529ad..d11355f6a4 100644 --- a/lib/ruby_lsp/requests/support/rubocop_formatter.rb +++ b/lib/ruby_lsp/requests/support/rubocop_formatter.rb @@ -3,15 +3,12 @@ return unless defined?(RubyLsp::Requests::Support::RuboCopRunner) -require "singleton" - module RubyLsp module Requests module Support class RuboCopFormatter extend T::Sig include Formatter - include Singleton sig { void } def initialize diff --git a/lib/ruby_lsp/requests/support/syntax_tree_formatter.rb b/lib/ruby_lsp/requests/support/syntax_tree_formatter.rb index bd2f6ac686..ff8ba70f80 100644 --- a/lib/ruby_lsp/requests/support/syntax_tree_formatter.rb +++ b/lib/ruby_lsp/requests/support/syntax_tree_formatter.rb @@ -8,15 +8,12 @@ return end -require "singleton" - module RubyLsp module Requests module Support # :nodoc: class SyntaxTreeFormatter extend T::Sig - include Singleton include Support::Formatter sig { void } diff --git a/lib/ruby_lsp/server.rb b/lib/ruby_lsp/server.rb index 66c136efa4..a3535388bc 100644 --- a/lib/ruby_lsp/server.rb +++ b/lib/ruby_lsp/server.rb @@ -245,10 +245,10 @@ def run_initialized end if defined?(Requests::Support::RuboCopFormatter) - @global_state.register_formatter("rubocop", Requests::Support::RuboCopFormatter.instance) + @global_state.register_formatter("rubocop", Requests::Support::RuboCopFormatter.new) end if defined?(Requests::Support::SyntaxTreeFormatter) - @global_state.register_formatter("syntax_tree", Requests::Support::SyntaxTreeFormatter.instance) + @global_state.register_formatter("syntax_tree", Requests::Support::SyntaxTreeFormatter.new) end perform_initial_indexing(indexing_config) diff --git a/test/requests/code_actions_formatting_test.rb b/test/requests/code_actions_formatting_test.rb index 2adfc27f37..8bcb493b01 100644 --- a/test/requests/code_actions_formatting_test.rb +++ b/test/requests/code_actions_formatting_test.rb @@ -79,7 +79,7 @@ def assert_corrects_to_expected(diagnostic_code, code_action_title, source, expe global_state.formatter = "rubocop" global_state.register_formatter( "rubocop", - RubyLsp::Requests::Support::RuboCopFormatter.instance, + RubyLsp::Requests::Support::RuboCopFormatter.new, ) diagnostics = RubyLsp::Requests::Diagnostics.new(global_state, document).perform diff --git a/test/requests/diagnostics_expectations_test.rb b/test/requests/diagnostics_expectations_test.rb index 96228a35fa..044592ba89 100644 --- a/test/requests/diagnostics_expectations_test.rb +++ b/test/requests/diagnostics_expectations_test.rb @@ -14,7 +14,7 @@ def run_expectations(source) global_state.formatter = "rubocop" global_state.register_formatter( "rubocop", - RubyLsp::Requests::Support::RuboCopFormatter.instance, + RubyLsp::Requests::Support::RuboCopFormatter.new, ) stdout, _ = capture_io do diff --git a/test/requests/diagnostics_test.rb b/test/requests/diagnostics_test.rb index eb02a08cfe..34d21e2b4b 100644 --- a/test/requests/diagnostics_test.rb +++ b/test/requests/diagnostics_test.rb @@ -9,7 +9,7 @@ def setup @global_state.formatter = "rubocop" @global_state.register_formatter( "rubocop", - RubyLsp::Requests::Support::RuboCopFormatter.instance, + RubyLsp::Requests::Support::RuboCopFormatter.new, ) end @@ -78,7 +78,6 @@ def foo RUBY formatter_class = Class.new do - include Singleton include RubyLsp::Requests::Support::Formatter def run_diagnostic(uri, document) @@ -96,7 +95,7 @@ def run_diagnostic(uri, document) end end - @global_state.register_formatter("my-custom-formatter", T.unsafe(formatter_class).instance) + @global_state.register_formatter("my-custom-formatter", T.unsafe(formatter_class).new) @global_state.formatter = "my-custom-formatter" diagnostics = T.must(RubyLsp::Requests::Diagnostics.new(@global_state, document).perform) diff --git a/test/requests/formatting_expectations_test.rb b/test/requests/formatting_expectations_test.rb index c0799d0ad9..910a85f13f 100644 --- a/test/requests/formatting_expectations_test.rb +++ b/test/requests/formatting_expectations_test.rb @@ -12,7 +12,7 @@ def run_expectations(source) global_state.formatter = "rubocop" global_state.register_formatter( "rubocop", - RubyLsp::Requests::Support::RuboCopFormatter.instance, + RubyLsp::Requests::Support::RuboCopFormatter.new, ) document = RubyLsp::RubyDocument.new(source: source, version: 1, uri: URI::Generic.from_path(path: __FILE__)) RubyLsp::Requests::Formatting.new(global_state, document).perform&.first&.new_text diff --git a/test/requests/formatting_test.rb b/test/requests/formatting_test.rb index 2ed2c1e4ec..53c04fd07f 100644 --- a/test/requests/formatting_test.rb +++ b/test/requests/formatting_test.rb @@ -9,11 +9,11 @@ def setup @global_state.formatter = "rubocop" @global_state.register_formatter( "rubocop", - RubyLsp::Requests::Support::RuboCopFormatter.instance, + RubyLsp::Requests::Support::RuboCopFormatter.new, ) @global_state.register_formatter( "syntax_tree", - RubyLsp::Requests::Support::SyntaxTreeFormatter.instance, + RubyLsp::Requests::Support::SyntaxTreeFormatter.new, ) @document = RubyLsp::RubyDocument.new(source: +<<~RUBY, version: 1, uri: URI::Generic.from_path(path: __FILE__)) class Foo @@ -141,9 +141,7 @@ def test_returns_nil_when_formatter_is_invalid end def test_using_a_custom_formatter - require "singleton" formatter_class = Class.new do - include Singleton include RubyLsp::Requests::Support::Formatter def run_formatting(uri, document) @@ -151,7 +149,7 @@ def run_formatting(uri, document) end end - @global_state.register_formatter("my-custom-formatter", T.unsafe(formatter_class).instance) + @global_state.register_formatter("my-custom-formatter", T.unsafe(formatter_class).new) assert_includes(formatted_document("my-custom-formatter"), "# formatter by my-custom-formatter") end @@ -181,10 +179,9 @@ def with_syntax_tree_config_file(contents) def clear_syntax_tree_runner_singleton_instance return unless defined?(RubyLsp::Requests::Support::SyntaxTreeFormatter) - Singleton.__init__(RubyLsp::Requests::Support::SyntaxTreeFormatter) @global_state.register_formatter( "syntax_tree", - RubyLsp::Requests::Support::SyntaxTreeFormatter.instance, + RubyLsp::Requests::Support::SyntaxTreeFormatter.new, ) end end diff --git a/test/server_test.rb b/test/server_test.rb index 278f95e990..e6c39bf63a 100644 --- a/test/server_test.rb +++ b/test/server_test.rb @@ -415,7 +415,7 @@ def test_shows_error_if_formatter_set_to_rubocop_but_rubocop_not_available initializationOptions: { formatter: "rubocop" }, }) - @server.global_state.register_formatter("rubocop", RubyLsp::Requests::Support::RuboCopFormatter.instance) + @server.global_state.register_formatter("rubocop", RubyLsp::Requests::Support::RuboCopFormatter.new) with_uninstalled_rubocop do @server.process_message({ method: "initialized" }) end @@ -501,7 +501,10 @@ def with_uninstalled_rubocop(&block) rubocop_paths = $LOAD_PATH.select { |path| path.include?("gems/rubocop") } rubocop_paths.each { |path| $LOAD_PATH.delete(path) } - $LOADED_FEATURES.delete_if { |path| path.include?("ruby_lsp/requests/support/rubocop_runner") } + $LOADED_FEATURES.delete_if do |path| + path.include?("ruby_lsp/requests/support/rubocop_runner") || + path.include?("ruby_lsp/requests/support/rubocop_formatter") + end unload_rubocop_runner block.call @@ -509,12 +512,14 @@ def with_uninstalled_rubocop(&block) $LOAD_PATH.unshift(*rubocop_paths) unload_rubocop_runner require "ruby_lsp/requests/support/rubocop_runner" + require "ruby_lsp/requests/support/rubocop_formatter" end def unload_rubocop_runner RubyLsp::Requests::Support.send(:remove_const, :RuboCopRunner) + RubyLsp::Requests::Support.send(:remove_const, :RuboCopFormatter) rescue NameError - # Depending on which tests have run prior to this one, `RuboCopRunner` may or may not be defined + # 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:) From aac424d4fdc4933f15dfe4308c9e211080551f25 Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Thu, 11 Apr 2024 09:28:15 -0400 Subject: [PATCH 003/189] Enhance version manager config to accept more fields (#1831) --- vscode/README.md | 7 ++++- vscode/VERSION_MANAGERS.md | 20 ++++---------- vscode/package.json | 36 ++++++++++++++++---------- vscode/src/common.ts | 2 +- vscode/src/extension.ts | 34 ++++++++++++++++++++++++ vscode/src/ruby.ts | 30 ++++++++++++++------- vscode/src/rubyLsp.ts | 14 +++++----- vscode/src/status.ts | 2 +- vscode/src/telemetry.ts | 2 +- vscode/src/test/suite/client.test.ts | 7 ++++- vscode/src/test/suite/debugger.test.ts | 2 +- vscode/src/test/suite/ruby.test.ts | 4 +-- vscode/src/test/suite/status.test.ts | 5 +++- 13 files changed, 112 insertions(+), 53 deletions(-) diff --git a/vscode/README.md b/vscode/README.md index 34e923d058..eaf5b85474 100644 --- a/vscode/README.md +++ b/vscode/README.md @@ -85,7 +85,12 @@ by clicking `Change version manager` in the language status center or by changin // "rbenv" // "rvm" // "shadowenv" -"rubyLsp.rubyVersionManager": "chruby" +// "mise" +{ + "rubyLsp.rubyVersionManager": { + "identifier": "chruby", + }, +} ``` To make sure that the Ruby LSP can find the version manager scripts, make sure that they are loaded in the shell's diff --git a/vscode/VERSION_MANAGERS.md b/vscode/VERSION_MANAGERS.md index 02dd25fba8..22cb2239c8 100644 --- a/vscode/VERSION_MANAGERS.md +++ b/vscode/VERSION_MANAGERS.md @@ -10,13 +10,15 @@ If you're using a different version manager that's not supported by this extensi executable into the PATH, you will probably need to define custom activation so that the extension can find the correct Ruby. -For these cases, set `rubyLsp.rubyVersionManager` to `"custom"` and then set `rubyLsp.customRubyCommand` to a shell -command that will activate the right Ruby version or add the Ruby `bin` folder to the `PATH`. Some examples: +For these cases, set `rubyLsp.rubyVersionManager.identifier` to `"custom"` and then set `rubyLsp.customRubyCommand` to a +shell command that will activate the right Ruby version or add the Ruby `bin` folder to the `PATH`. Some examples: ```jsonc { // Don't forget to set the manager to custom when using this option - "rubyLsp.rubyVersionManager": "custom", + "rubyLsp.rubyVersionManager": { + "identifier": "custom", + }, // Using a different version manager than the ones included by default "rubyLsp.customRubyCommand": "my_custom_version_manager activate", @@ -25,15 +27,3 @@ command that will activate the right Ruby version or add the Ruby `bin` folder t "rubyLsp.customRubyCommand": "PATH=/path/to/ruby/bin:$PATH", } ``` - -### mise (formerly rtx) - -[mise](https://github.com/jdx/mise) is a Rust clone compatible with asdf. You can use it by adding the following -snippet to your user configuration JSON - -```json -{ - "rubyLsp.rubyVersionManager": "custom", - "rubyLsp.customRubyCommand": "eval \"$(mise env -s zsh)\"" // Instructions for zsh, change for bash or fish -} -``` diff --git a/vscode/package.json b/vscode/package.json index 14faad8c7e..94cf7e3cae 100644 --- a/vscode/package.json +++ b/vscode/package.json @@ -232,20 +232,28 @@ } }, "rubyLsp.rubyVersionManager": { - "description": "The Ruby version manager to use", - "type": "string", - "enum": [ - "asdf", - "auto", - "chruby", - "none", - "rbenv", - "rvm", - "shadowenv", - "mise", - "custom" - ], - "default": "auto" + "type": "object", + "properties": { + "identifier": { + "description": "The Ruby version manager to use", + "type": "string", + "enum": [ + "asdf", + "auto", + "chruby", + "none", + "rbenv", + "rvm", + "shadowenv", + "mise", + "custom" + ], + "default": "auto" + } + }, + "default": { + "identifier": "auto" + } }, "rubyLsp.customRubyCommand": { "description": "A shell command to activate the right Ruby version or add a custom Ruby bin folder to the PATH. Only used if rubyVersionManager is set to 'custom'", diff --git a/vscode/src/common.ts b/vscode/src/common.ts index 9f5129feff..bb125a2096 100644 --- a/vscode/src/common.ts +++ b/vscode/src/common.ts @@ -22,7 +22,7 @@ export enum Command { export interface RubyInterface { error: boolean; - versionManager?: string; + versionManager: { identifier: string }; rubyVersion?: string; } diff --git a/vscode/src/extension.ts b/vscode/src/extension.ts index 2b737f08f1..53b81ee499 100644 --- a/vscode/src/extension.ts +++ b/vscode/src/extension.ts @@ -11,8 +11,42 @@ export async function activate(context: vscode.ExtensionContext) { extension = new RubyLsp(context); await extension.activate(); + + await migrateManagerConfigurations(); } export async function deactivate(): Promise { await extension.deactivate(); } + +type InspectKeys = + | "globalValue" + | "workspaceValue" + | "workspaceFolderValue" + | "globalLanguageValue" + | "workspaceLanguageValue" + | "workspaceFolderLanguageValue"; +// Function to migrate the old version manager configuration to the new format. Remove this after a few months +async function migrateManagerConfigurations() { + const configuration = vscode.workspace.getConfiguration("rubyLsp"); + const currentManagerSettings = + configuration.inspect("rubyVersionManager")!; + let identifier: string | undefined; + + const targetMap: Record = { + globalValue: vscode.ConfigurationTarget.Global, + globalLanguageValue: vscode.ConfigurationTarget.Global, + workspaceFolderLanguageValue: vscode.ConfigurationTarget.WorkspaceFolder, + workspaceFolderValue: vscode.ConfigurationTarget.WorkspaceFolder, + workspaceLanguageValue: vscode.ConfigurationTarget.Workspace, + workspaceValue: vscode.ConfigurationTarget.Workspace, + }; + + for (const [key, target] of Object.entries(targetMap)) { + identifier = currentManagerSettings[key as InspectKeys]; + + if (identifier && typeof identifier === "string") { + await configuration.update("rubyVersionManager", { identifier }, target); + } + } +} diff --git a/vscode/src/ruby.ts b/vscode/src/ruby.ts index 24278f278b..8c524591dc 100644 --- a/vscode/src/ruby.ts +++ b/vscode/src/ruby.ts @@ -29,13 +29,19 @@ export enum ManagerIdentifier { Custom = "custom", } +export interface ManagerConfiguration { + identifier: ManagerIdentifier; +} + export class Ruby implements RubyInterface { public rubyVersion?: string; // This property indicates that Ruby has been compiled with YJIT support and that we're running on a Ruby version // where it will be activated, either by the extension or by the server public yjitEnabled?: boolean; private readonly workspaceFolder: vscode.WorkspaceFolder; - #versionManager?: ManagerIdentifier; + #versionManager: ManagerConfiguration = vscode.workspace + .getConfiguration("rubyLsp") + .get("rubyVersionManager")!; private readonly shell = process.env.SHELL?.replace(/(\s+)/g, "\\$1"); private _env: NodeJS.ProcessEnv = {}; @@ -71,12 +77,18 @@ export class Ruby implements RubyInterface { : this.workspaceFolder.uri.fsPath; } - get versionManager() { + get versionManager(): ManagerConfiguration { return this.#versionManager; } - private set versionManager(versionManager: ManagerIdentifier | undefined) { - this.#versionManager = versionManager; + private set versionManager( + versionManager: ManagerConfiguration | ManagerIdentifier, + ) { + if (typeof versionManager === "string") { + this.#versionManager.identifier = versionManager; + } else { + this.#versionManager = versionManager; + } } get env() { @@ -88,14 +100,14 @@ export class Ruby implements RubyInterface { } async activateRuby( - versionManager: ManagerIdentifier = vscode.workspace + versionManager: ManagerConfiguration = vscode.workspace .getConfiguration("rubyLsp") - .get("rubyVersionManager")!, + .get("rubyVersionManager")!, ) { this.versionManager = versionManager; // If the version manager is auto, discover the actual manager before trying to activate anything - if (this.versionManager === ManagerIdentifier.Auto) { + if (this.versionManager.identifier === ManagerIdentifier.Auto) { await this.discoverVersionManager(); this.outputChannel.info( `Discovered version manager ${this.versionManager}`, @@ -103,7 +115,7 @@ export class Ruby implements RubyInterface { } try { - switch (this.versionManager) { + switch (this.versionManager.identifier) { case ManagerIdentifier.Asdf: await this.activate("asdf exec ruby"); break; @@ -281,7 +293,7 @@ export class Ruby implements RubyInterface { await vscode.workspace.fs.stat( vscode.Uri.joinPath(this.workspaceFolder.uri, ".shadowenv.d"), ); - this.versionManager = ManagerIdentifier.Shadowenv; + this.versionManager.identifier = ManagerIdentifier.Shadowenv; return; } catch (error: any) { // If .shadowenv.d doesn't exist, then we check the other version managers diff --git a/vscode/src/rubyLsp.ts b/vscode/src/rubyLsp.ts index 8c490032b7..cb458b8074 100644 --- a/vscode/src/rubyLsp.ts +++ b/vscode/src/rubyLsp.ts @@ -5,7 +5,7 @@ import { Telemetry } from "./telemetry"; import DocumentProvider from "./documentProvider"; import { Workspace } from "./workspace"; import { Command, STATUS_EMITTER } from "./common"; -import { ManagerIdentifier } from "./ruby"; +import { ManagerIdentifier, ManagerConfiguration } from "./ruby"; import { StatusItems } from "./status"; import { TestController } from "./testController"; import { Debugger } from "./debugger"; @@ -286,16 +286,18 @@ export class RubyLsp { Command.SelectVersionManager, async () => { const configuration = vscode.workspace.getConfiguration("rubyLsp"); + const managerConfig = + configuration.get("rubyVersionManager")!; const options = Object.values(ManagerIdentifier); - const manager = await vscode.window.showQuickPick(options, { - placeHolder: `Current: ${configuration.get("rubyVersionManager")}`, - }); + const manager = (await vscode.window.showQuickPick(options, { + placeHolder: `Current: ${managerConfig.identifier}`, + })) as ManagerIdentifier | undefined; if (manager !== undefined) { + managerConfig.identifier = manager; await configuration.update( "rubyVersionManager", - manager, - true, + managerConfig, true, ); } diff --git a/vscode/src/status.ts b/vscode/src/status.ts index 97c471fe73..701c883336 100644 --- a/vscode/src/status.ts +++ b/vscode/src/status.ts @@ -49,7 +49,7 @@ export class RubyVersionStatus extends StatusItem { this.item.text = "Failed to activate Ruby"; this.item.severity = vscode.LanguageStatusSeverity.Error; } else { - this.item.text = `Using Ruby ${workspace.ruby.rubyVersion} with ${workspace.ruby.versionManager}`; + this.item.text = `Using Ruby ${workspace.ruby.rubyVersion} with ${workspace.ruby.versionManager.identifier}`; this.item.severity = vscode.LanguageStatusSeverity.Information; } } diff --git a/vscode/src/telemetry.ts b/vscode/src/telemetry.ts index fdc6314514..ef08f0fce7 100644 --- a/vscode/src/telemetry.ts +++ b/vscode/src/telemetry.ts @@ -74,7 +74,7 @@ export class Telemetry { const promises: Promise[] = [ { namespace: "workbench", field: "colorTheme" }, { namespace: "rubyLsp", field: "enableExperimentalFeatures" }, - { namespace: "rubyLsp", field: "rubyVersionManager" }, + { namespace: "rubyLsp", field: "rubyVersionManager.identifier" }, { namespace: "rubyLsp", field: "formatter" }, ].map(({ namespace, field }) => { return this.sendEvent({ diff --git a/vscode/src/test/suite/client.test.ts b/vscode/src/test/suite/client.test.ts index 4a07d59847..4426f6a89b 100644 --- a/vscode/src/test/suite/client.test.ts +++ b/vscode/src/test/suite/client.test.ts @@ -116,7 +116,12 @@ suite("Client", () => { if (process.env.CI) { await vscode.workspace .getConfiguration("rubyLsp") - .update("rubyVersionManager", ManagerIdentifier.None, true, true); + .update( + "rubyVersionManager", + { identifier: ManagerIdentifier.None }, + true, + true, + ); } client = await launchClient(workspaceUri); }); diff --git a/vscode/src/test/suite/debugger.test.ts b/vscode/src/test/suite/debugger.test.ts index bcfb9d4652..d3be4367d1 100644 --- a/vscode/src/test/suite/debugger.test.ts +++ b/vscode/src/test/suite/debugger.test.ts @@ -168,7 +168,7 @@ suite("Debugger", () => { .returns({ get: (name: string) => { if (name === "rubyVersionManager") { - return manager; + return { identifier: manager }; } else if (name === "bundleGemfile") { return ""; } else if (name === "saveBeforeStart") { diff --git a/vscode/src/test/suite/ruby.test.ts b/vscode/src/test/suite/ruby.test.ts index 57c73d0f3c..8c9ab62d2c 100644 --- a/vscode/src/test/suite/ruby.test.ts +++ b/vscode/src/test/suite/ruby.test.ts @@ -29,7 +29,7 @@ suite("Ruby environment activation", () => { .returns({ get: (name: string) => { if (name === "rubyVersionManager") { - return manager; + return { identifier: manager }; } else if (name === "bundleGemfile") { return ""; } @@ -66,7 +66,7 @@ suite("Ruby environment activation", () => { .returns({ get: (name: string) => { if (name === "rubyVersionManager") { - return manager; + return { identifier: manager }; } else if (name === "bundleGemfile") { return ""; } diff --git a/vscode/src/test/suite/status.test.ts b/vscode/src/test/suite/status.test.ts index 19f83de306..1ba43bda86 100644 --- a/vscode/src/test/suite/status.test.ts +++ b/vscode/src/test/suite/status.test.ts @@ -28,7 +28,10 @@ suite("StatusItems", () => { suite("RubyVersionStatus", () => { beforeEach(() => { - ruby = { rubyVersion: "3.2.0", versionManager: "shadowenv" } as Ruby; + ruby = { + rubyVersion: "3.2.0", + versionManager: { identifier: "shadowenv" }, + } as Ruby; workspace = { ruby, lspClient: { From 7bb5c8572c2b2f98e0e5c9056cbd03a09e5e8e5d Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Thu, 11 Apr 2024 10:09:31 -0400 Subject: [PATCH 004/189] Allow configuring Mise executable path (#1914) --- vscode/package.json | 4 ++ vscode/src/ruby/mise.ts | 17 +++++--- vscode/src/test/suite/ruby/mise.test.ts | 56 +++++++++++++++++++++++++ 3 files changed, 72 insertions(+), 5 deletions(-) diff --git a/vscode/package.json b/vscode/package.json index 94cf7e3cae..4a91358b13 100644 --- a/vscode/package.json +++ b/vscode/package.json @@ -249,6 +249,10 @@ "custom" ], "default": "auto" + }, + "miseExecutablePath": { + "description": "The path to the Mise executable, if not installed in ~/.local/bin/mise", + "type": "string" } }, "default": { diff --git a/vscode/src/ruby/mise.ts b/vscode/src/ruby/mise.ts index 8ce56e8a3c..9059098d63 100644 --- a/vscode/src/ruby/mise.ts +++ b/vscode/src/ruby/mise.ts @@ -34,15 +34,22 @@ export class Mise extends VersionManager { } async findMiseUri(): Promise { - const miseUri = vscode.Uri.joinPath( - vscode.Uri.file(os.homedir()), - ".local", - "bin", - "mise", + const config = vscode.workspace.getConfiguration("rubyLsp"); + const misePath = config.get( + "rubyVersionManager.miseExecutablePath", ); + const miseUri = misePath + ? vscode.Uri.file(misePath) + : vscode.Uri.joinPath( + vscode.Uri.file(os.homedir()), + ".local", + "bin", + "mise", + ); try { await vscode.workspace.fs.stat(miseUri); + return miseUri; } catch (error: any) { // Couldn't find it } diff --git a/vscode/src/test/suite/ruby/mise.test.ts b/vscode/src/test/suite/ruby/mise.test.ts index 7f04ebd550..0283c0f8a9 100644 --- a/vscode/src/test/suite/ruby/mise.test.ts +++ b/vscode/src/test/suite/ruby/mise.test.ts @@ -1,6 +1,7 @@ import assert from "assert"; import path from "path"; import os from "os"; +import fs from "fs"; import * as vscode from "vscode"; import sinon from "sinon"; @@ -65,4 +66,59 @@ suite("Mise", () => { execStub.restore(); findStub.restore(); }); + + test("Allows configuring where Mise is installed", async () => { + const workspacePath = fs.mkdtempSync( + path.join(os.tmpdir(), "ruby-lsp-test-"), + ); + 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 mise = new Mise(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 misePath = path.join(workspacePath, "mise"); + fs.writeFileSync(misePath, "fakeMiseBinary"); + + const configStub = sinon + .stub(vscode.workspace, "getConfiguration") + .returns({ + get: (name: string) => { + if (name === "rubyVersionManager.miseExecutablePath") { + return misePath; + } + return ""; + }, + } as any); + + const { env, version, yjit } = await mise.activate(); + + assert.ok( + execStub.calledOnceWithExactly( + `${misePath} x -- ruby -W0 -rjson -e '${activationScript}'`, + { cwd: workspacePath }, + ), + ); + + assert.strictEqual(version, "3.0.0"); + assert.strictEqual(yjit, true); + assert.deepStrictEqual(env.ANY, "true"); + + execStub.restore(); + configStub.restore(); + fs.rmSync(workspacePath, { recursive: true, force: true }); + }); }); From 3ece8bc03ea121ed189dab5a696c147ba041dba6 Mon Sep 17 00:00:00 2001 From: yuta25 Date: Thu, 11 Apr 2024 23:15:47 +0900 Subject: [PATCH 005/189] [VSCode] Change the order of existence checks for Manager. Check 'asdf' last. (#1909) Change the order of existence checks for Manager. Check 'asdf' last. --- vscode/src/ruby.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vscode/src/ruby.ts b/vscode/src/ruby.ts index 8c524591dc..890f82cdd6 100644 --- a/vscode/src/ruby.ts +++ b/vscode/src/ruby.ts @@ -300,10 +300,10 @@ export class Ruby implements RubyInterface { } const managers = [ - ManagerIdentifier.Asdf, ManagerIdentifier.Chruby, ManagerIdentifier.Rbenv, ManagerIdentifier.Rvm, + ManagerIdentifier.Asdf, ]; for (const tool of managers) { From d0828bb10849a4fc4bd7523ba6590733211cdbfe Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Thu, 11 Apr 2024 11:03:32 -0400 Subject: [PATCH 006/189] Set codeowners to ruby-dx (#1916) --- .github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 4aea4de9ae..a966e8e658 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,2 +1,2 @@ # Request a review from @Shopify/ruby-dev-exp when a new PR is created -* @Shopify/ruby-dev-exp +* @Shopify/ruby-dx From d9f1af0a668b2141722f52eee786b776fa817e93 Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Thu, 11 Apr 2024 11:03:46 -0400 Subject: [PATCH 007/189] Run initialize and document synchronization in main thread (#1915) --- lib/ruby_lsp/base_server.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/ruby_lsp/base_server.rb b/lib/ruby_lsp/base_server.rb index dba1c2f441..101db1b6bd 100644 --- a/lib/ruby_lsp/base_server.rb +++ b/lib/ruby_lsp/base_server.rb @@ -59,9 +59,11 @@ def start end end - # We need to process shutdown and exit from the main thread in order to close queues and wait for other threads - # to finish. Everything else is pushed into the incoming queue + # The following requests need to be executed in the main thread directly to avoid concurrency issues. Everything + # else is pushed into the incoming queue case method + when "initialize", "textDocument/didOpen", "textDocument/didClose", "textDocument/didChange" + process_message(message) when "shutdown" $stderr.puts("Shutting down Ruby LSP...") From 004e8997d8248e63649488db31919276fae4e378 Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Thu, 11 Apr 2024 11:04:55 -0400 Subject: [PATCH 008/189] Bump extension version to v0.5.18 --- vscode/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vscode/package.json b/vscode/package.json index 4a91358b13..bc0483c9e1 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.17", + "version": "0.5.18", "publisher": "Shopify", "repository": { "type": "git", From 338a342e6df0f8f6996ee15979f7d9859272d902 Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 11 Apr 2024 17:28:53 +0000 Subject: [PATCH 009/189] Bump version to v0.16.5 --- Gemfile.lock | 2 +- VERSION | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index cf33d82316..4f90002eef 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -9,7 +9,7 @@ GIT PATH remote: . specs: - ruby-lsp (0.16.4) + ruby-lsp (0.16.5) language_server-protocol (~> 3.17.0) prism (>= 0.22.0, < 0.25) sorbet-runtime (>= 0.5.10782) diff --git a/VERSION b/VERSION index 5f2491c5ad..19270385ea 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.16.4 +0.16.5 From b39c12cbab6608c9e5df386583ef80002add42c1 Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Fri, 12 Apr 2024 09:19:23 -0400 Subject: [PATCH 010/189] Use selected encoding for computing semantic tokens (#1895) * Bump minimum Prism requirement to v0.23 * Use selected encoding for computing semantic tokens --- Gemfile.lock | 2 +- .../requests/semantic_highlighting.rb | 9 ++- .../semantic_highlighting.rb | 49 ++++++++---- lib/ruby_lsp/server.rb | 4 +- ruby-lsp.gemspec | 2 +- .../multibyte_characters.exp.json | 74 +++++++++++++++++++ test/fixtures/multibyte_characters.rb | 10 +++ ...semantic_highlighting_expectations_test.rb | 6 +- .../support/semantic_token_encoder_test.rb | 7 +- 9 files changed, 136 insertions(+), 27 deletions(-) create mode 100644 test/expectations/semantic_highlighting/multibyte_characters.exp.json create mode 100644 test/fixtures/multibyte_characters.rb diff --git a/Gemfile.lock b/Gemfile.lock index 4f90002eef..9099f880d5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ PATH specs: ruby-lsp (0.16.5) language_server-protocol (~> 3.17.0) - prism (>= 0.22.0, < 0.25) + prism (>= 0.23.0, < 0.25) sorbet-runtime (>= 0.5.10782) GEM diff --git a/lib/ruby_lsp/requests/semantic_highlighting.rb b/lib/ruby_lsp/requests/semantic_highlighting.rb index 432cc96bdb..546c988b2e 100644 --- a/lib/ruby_lsp/requests/semantic_highlighting.rb +++ b/lib/ruby_lsp/requests/semantic_highlighting.rb @@ -40,10 +40,13 @@ def provider end end - sig { params(dispatcher: Prism::Dispatcher, range: T.nilable(T::Range[Integer])).void } - def initialize(dispatcher, range: nil) + sig { params(global_state: GlobalState, dispatcher: Prism::Dispatcher, range: T.nilable(T::Range[Integer])).void } + def initialize(global_state, dispatcher, range: nil) super() - @response_builder = T.let(ResponseBuilders::SemanticHighlighting.new, ResponseBuilders::SemanticHighlighting) + @response_builder = T.let( + ResponseBuilders::SemanticHighlighting.new(global_state.encoding), + ResponseBuilders::SemanticHighlighting, + ) Listeners::SemanticHighlighting.new(dispatcher, @response_builder, range: range) Addon.addons.each do |addon| diff --git a/lib/ruby_lsp/response_builders/semantic_highlighting.rb b/lib/ruby_lsp/response_builders/semantic_highlighting.rb index 9e5ead9f0e..3d83720d26 100644 --- a/lib/ruby_lsp/response_builders/semantic_highlighting.rb +++ b/lib/ruby_lsp/response_builders/semantic_highlighting.rb @@ -55,19 +55,21 @@ class UndefinedTokenType < StandardError; end ResponseType = type_member { { fixed: Interface::SemanticTokens } } - sig { void } - def initialize - super + sig { params(encoding: Encoding).void } + def initialize(encoding) + super() + @encoding = encoding @stack = T.let([], T::Array[SemanticToken]) end sig { params(location: Prism::Location, type: Symbol, modifiers: T::Array[Symbol]).void } def add_token(location, type, modifiers = []) - length = location.end_offset - location.start_offset + length = location.end_code_units_offset(@encoding) - location.start_code_units_offset(@encoding) modifiers_indices = modifiers.filter_map { |modifier| TOKEN_MODIFIERS[modifier] } @stack.push( SemanticToken.new( - location: location, + start_line: location.start_line, + start_code_unit_column: location.start_code_units_column(@encoding), length: length, type: T.must(TOKEN_TYPES[type]), modifier: modifiers_indices, @@ -75,6 +77,15 @@ def add_token(location, type, modifiers = []) ) end + sig { params(location: Prism::Location).returns(T::Boolean) } + def last_token_matches?(location) + token = @stack.last + return false unless token + + token.start_line == location.start_line && + token.start_code_unit_column == location.start_code_units_column(@encoding) + end + sig { returns(T.nilable(SemanticToken)) } def last @stack.last @@ -88,8 +99,11 @@ def response class SemanticToken extend T::Sig - sig { returns(Prism::Location) } - attr_reader :location + sig { returns(Integer) } + attr_reader :start_line + + sig { returns(Integer) } + attr_reader :start_code_unit_column sig { returns(Integer) } attr_reader :length @@ -100,9 +114,18 @@ class SemanticToken sig { returns(T::Array[Integer]) } attr_reader :modifier - sig { params(location: Prism::Location, length: Integer, type: Integer, modifier: T::Array[Integer]).void } - def initialize(location:, length:, type:, modifier:) - @location = location + sig do + params( + start_line: Integer, + start_code_unit_column: Integer, + length: Integer, + type: Integer, + modifier: T::Array[Integer], + ).void + end + def initialize(start_line:, start_code_unit_column:, length:, type:, modifier:) + @start_line = start_line + @start_code_unit_column = start_code_unit_column @length = length @type = type @modifier = modifier @@ -146,7 +169,7 @@ def encode(tokens) # Enumerable#sort_by is not deterministic when the compared values are equal. # When that happens, we need to use the index as a tie breaker to ensure # that the order of the tokens is always the same. - [token.location.start_line, token.location.start_column, index] + [token.start_line, token.start_code_unit_column, index] end delta = sorted_tokens.flat_map do |token| @@ -167,8 +190,8 @@ def encode(tokens) # https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_semanticTokens sig { params(token: SemanticToken).returns(T::Array[Integer]) } def compute_delta(token) - row = token.location.start_line - 1 - column = token.location.start_column + row = token.start_line - 1 + column = token.start_code_unit_column begin delta_line = row - @current_row diff --git a/lib/ruby_lsp/server.rb b/lib/ruby_lsp/server.rb index a3535388bc..6c53c48255 100644 --- a/lib/ruby_lsp/server.rb +++ b/lib/ruby_lsp/server.rb @@ -334,7 +334,7 @@ def run_combined_requests(message) document_link = Requests::DocumentLink.new(uri, document.comments, dispatcher) code_lens = Requests::CodeLens.new(@global_state, uri, dispatcher) - semantic_highlighting = Requests::SemanticHighlighting.new(dispatcher) + semantic_highlighting = Requests::SemanticHighlighting.new(@global_state, dispatcher) dispatcher.dispatch(document.tree) # Store all responses retrieve in this round of visits in the cache and then return the response for the request @@ -366,7 +366,7 @@ def text_document_semantic_tokens_range(message) end_line = range.dig(:end, :line) dispatcher = Prism::Dispatcher.new - request = Requests::SemanticHighlighting.new(dispatcher, range: start_line..end_line) + request = Requests::SemanticHighlighting.new(@global_state, dispatcher, range: start_line..end_line) dispatcher.visit(document.tree) response = request.perform diff --git a/ruby-lsp.gemspec b/ruby-lsp.gemspec index b6604c36d1..3598add529 100644 --- a/ruby-lsp.gemspec +++ b/ruby-lsp.gemspec @@ -19,7 +19,7 @@ Gem::Specification.new do |s| s.require_paths = ["lib"] s.add_dependency("language_server-protocol", "~> 3.17.0") - s.add_dependency("prism", ">= 0.22.0", "< 0.25") + s.add_dependency("prism", ">= 0.23.0", "< 0.25") s.add_dependency("sorbet-runtime", ">= 0.5.10782") s.required_ruby_version = ">= 3.0" diff --git a/test/expectations/semantic_highlighting/multibyte_characters.exp.json b/test/expectations/semantic_highlighting/multibyte_characters.exp.json new file mode 100644 index 0000000000..7a594dc4d6 --- /dev/null +++ b/test/expectations/semantic_highlighting/multibyte_characters.exp.json @@ -0,0 +1,74 @@ +{ + "result": [ + { + "delta_line": 1, + "delta_start_char": 7, + "length": 3, + "token_type": 0, + "token_modifiers": 1 + }, + { + "delta_line": 0, + "delta_start_char": 0, + "length": 3, + "token_type": 0, + "token_modifiers": 0 + }, + { + "delta_line": 1, + "delta_start_char": 8, + "length": 3, + "token_type": 2, + "token_modifiers": 1 + }, + { + "delta_line": 0, + "delta_start_char": 0, + "length": 3, + "token_type": 0, + "token_modifiers": 0 + }, + { + "delta_line": 1, + "delta_start_char": 8, + "length": 1, + "token_type": 13, + "token_modifiers": 1 + }, + { + "delta_line": 1, + "delta_start_char": 6, + "length": 2, + "token_type": 8, + "token_modifiers": 0 + }, + { + "delta_line": 1, + "delta_start_char": 6, + "length": 2, + "token_type": 8, + "token_modifiers": 0 + }, + { + "delta_line": 0, + "delta_start_char": 5, + "length": 2, + "token_type": 8, + "token_modifiers": 0 + }, + { + "delta_line": 0, + "delta_start_char": 3, + "length": 6, + "token_type": 13, + "token_modifiers": 0 + }, + { + "delta_line": 1, + "delta_start_char": 11, + "length": 2, + "token_type": 8, + "token_modifiers": 0 + } + ] +} diff --git a/test/fixtures/multibyte_characters.rb b/test/fixtures/multibyte_characters.rb new file mode 100644 index 0000000000..550bfd3b01 --- /dev/null +++ b/test/fixtures/multibyte_characters.rb @@ -0,0 +1,10 @@ +# 測試註解 +module A動物 + class C貓咪 + def 叫 + 叫聲 = "喵" + 👋 = 叫聲.squish + puts 👋 + end + end +end diff --git a/test/requests/semantic_highlighting_expectations_test.rb b/test/requests/semantic_highlighting_expectations_test.rb index a9513a71f0..d2fd9c43d2 100644 --- a/test/requests/semantic_highlighting_expectations_test.rb +++ b/test/requests/semantic_highlighting_expectations_test.rb @@ -18,7 +18,9 @@ def run_expectations(source) end dispatcher = Prism::Dispatcher.new - listener = RubyLsp::Requests::SemanticHighlighting.new(dispatcher, range: processed_range) + global_state = RubyLsp::GlobalState.new + global_state.apply_options({}) + listener = RubyLsp::Requests::SemanticHighlighting.new(global_state, dispatcher, range: processed_range) dispatcher.dispatch(document.tree) listener.perform @@ -89,7 +91,7 @@ def initialize(response_builder, dispatcher) def on_call_node_enter(node) current_token = @response_builder.last - if node.message == "before_create" && node.message_loc == current_token.location + if node.message == "before_create" && @response_builder.last_token_matches?(node.message_loc) current_token.replace_type(:keyword) current_token.replace_modifier([:declaration]) end diff --git a/test/requests/support/semantic_token_encoder_test.rb b/test/requests/support/semantic_token_encoder_test.rb index 3894294831..983497170a 100644 --- a/test/requests/support/semantic_token_encoder_test.rb +++ b/test/requests/support/semantic_token_encoder_test.rb @@ -94,12 +94,9 @@ def test_encoded_modifiers_with_some_modifiers private def stub_token(start_line, start_column, length, type, modifier) - location = Prism::Location.new(Prism::Source.new(""), 123, 123) - location.expects(:start_line).returns(start_line).at_least_once - location.expects(:start_column).returns(start_column).at_least_once - RubyLsp::ResponseBuilders::SemanticHighlighting::SemanticToken.new( - location: location, + start_line: start_line, + start_code_unit_column: start_column, length: length, type: type, modifier: modifier, From 6883ece9ef1a43765ef1e6263474630895d8a6b3 Mon Sep 17 00:00:00 2001 From: Earlopain <14981592+Earlopain@users.noreply.github.com> Date: Fri, 12 Apr 2024 19:22:31 +0200 Subject: [PATCH 011/189] Fix the discovered version manager logging as `[object Object]` (#1920) This was missed in #1831 --- vscode/src/ruby.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vscode/src/ruby.ts b/vscode/src/ruby.ts index 890f82cdd6..8b97d1dc3d 100644 --- a/vscode/src/ruby.ts +++ b/vscode/src/ruby.ts @@ -110,7 +110,7 @@ export class Ruby implements RubyInterface { if (this.versionManager.identifier === ManagerIdentifier.Auto) { await this.discoverVersionManager(); this.outputChannel.info( - `Discovered version manager ${this.versionManager}`, + `Discovered version manager ${this.versionManager.identifier}`, ); } From 0daba19e03fff2d6e2464e7a8593448bd8489945 Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Fri, 12 Apr 2024 13:27:37 -0400 Subject: [PATCH 012/189] Migrate manager config before activating (#1923) --- vscode/src/extension.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vscode/src/extension.ts b/vscode/src/extension.ts index 53b81ee499..eb509b63e7 100644 --- a/vscode/src/extension.ts +++ b/vscode/src/extension.ts @@ -5,14 +5,14 @@ import { RubyLsp } from "./rubyLsp"; let extension: RubyLsp; export async function activate(context: vscode.ExtensionContext) { + await migrateManagerConfigurations(); + if (!vscode.workspace.workspaceFolders) { return; } extension = new RubyLsp(context); await extension.activate(); - - await migrateManagerConfigurations(); } export async function deactivate(): Promise { From 913677941c4e4746a1f9d7dc554bc899a96ab243 Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Fri, 12 Apr 2024 13:28:43 -0400 Subject: [PATCH 013/189] Bump extension version to v0.5.19 --- vscode/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vscode/package.json b/vscode/package.json index bc0483c9e1..fde92508f7 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.18", + "version": "0.5.19", "publisher": "Shopify", "repository": { "type": "git", From 9ee8385e78246bf28a2d85eae132da0917a2d1e3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Apr 2024 02:05:04 +0000 Subject: [PATCH 014/189] Bump the minor-and-patch group with 6 updates Bumps the minor-and-patch group with 6 updates: | Package | From | To | | --- | --- | --- | | [mocha](https://github.com/freerange/mocha) | `2.1.0` | `2.2.0` | | [rubocop-sorbet](https://github.com/shopify/rubocop-sorbet) | `0.8.0` | `0.8.1` | | [rubocop](https://github.com/rubocop/rubocop) | `1.62.1` | `1.63.1` | | [sorbet-static-and-runtime](https://github.com/sorbet/sorbet) | `0.5.11332` | `0.5.11346` | | [tapioca](https://github.com/Shopify/tapioca) | `0.13.1` | `0.13.2` | | [sorbet-runtime](https://github.com/sorbet/sorbet) | `0.5.11332` | `0.5.11346` | Updates `mocha` from 2.1.0 to 2.2.0 - [Changelog](https://github.com/freerange/mocha/blob/main/RELEASE.md) - [Commits](https://github.com/freerange/mocha/compare/v2.1.0...v2.2.0) Updates `rubocop-sorbet` from 0.8.0 to 0.8.1 - [Release notes](https://github.com/shopify/rubocop-sorbet/releases) - [Commits](https://github.com/shopify/rubocop-sorbet/compare/v0.8.0...v0.8.1) Updates `rubocop` from 1.62.1 to 1.63.1 - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop/compare/v1.62.1...v1.63.1) Updates `sorbet-static-and-runtime` from 0.5.11332 to 0.5.11346 - [Release notes](https://github.com/sorbet/sorbet/releases) - [Commits](https://github.com/sorbet/sorbet/commits) Updates `tapioca` from 0.13.1 to 0.13.2 - [Release notes](https://github.com/Shopify/tapioca/releases) - [Commits](https://github.com/Shopify/tapioca/compare/v0.13.1...v0.13.2) Updates `sorbet-runtime` from 0.5.11332 to 0.5.11346 - [Release notes](https://github.com/sorbet/sorbet/releases) - [Commits](https://github.com/sorbet/sorbet/commits) --- updated-dependencies: - dependency-name: mocha dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: rubocop-sorbet dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: rubocop dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: sorbet-static-and-runtime dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: tapioca dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: sorbet-runtime dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] --- Gemfile | 4 ++-- Gemfile.lock | 34 ++++++++++++++++------------------ 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/Gemfile b/Gemfile index 274674daa6..bff1999f4f 100644 --- a/Gemfile +++ b/Gemfile @@ -9,7 +9,7 @@ group :development do gem "debug", "~> 1.9", require: false gem "minitest-reporters", "~> 1.6" gem "minitest", "~> 5.22" - gem "mocha", "~> 2.1" + gem "mocha", "~> 2.2" gem "psych", "~> 5.1", require: false gem "rake", "~> 13.2" gem "rdoc", require: false, github: "Shopify/rdoc", branch: "create_snapper_generator" @@ -17,7 +17,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.62" + gem "rubocop", "~> 1.63" gem "simplecov", require: false gem "syntax_tree", ">= 6.1.1", "< 7" diff --git a/Gemfile.lock b/Gemfile.lock index 9099f880d5..e7d8e5046e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -29,7 +29,7 @@ GEM irb (1.12.0) rdoc reline (>= 0.4.2) - json (2.7.1) + json (2.7.2) language_server-protocol (3.17.0.3) minitest (5.22.3) minitest-reporters (1.6.1) @@ -37,7 +37,7 @@ GEM builder minitest (>= 5.0) ruby-progressbar - mocha (2.1.0) + mocha (2.2.0) ruby2_keywords (>= 0.0.5) netrc (0.11.0) parallel (1.24.0) @@ -51,14 +51,14 @@ GEM racc (1.7.3) rainbow (3.1.1) rake (13.2.1) - rbi (0.1.9) + rbi (0.1.10) prism (>= 0.18.0, < 0.25) sorbet-runtime (>= 0.5.9204) regexp_parser (2.9.0) reline (0.5.0) io-console (~> 0.5) rexml (3.2.6) - rubocop (1.62.1) + rubocop (1.63.1) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) @@ -78,7 +78,7 @@ GEM rubocop (~> 1.0) rubocop-shopify (2.15.1) rubocop (~> 1.51) - rubocop-sorbet (0.8.0) + rubocop-sorbet (0.8.1) rubocop (>= 0.90.0) ruby-progressbar (1.13.0) ruby2_keywords (0.0.5) @@ -88,14 +88,14 @@ GEM simplecov_json_formatter (~> 0.1) simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) - sorbet (0.5.11332) - sorbet-static (= 0.5.11332) - sorbet-runtime (0.5.11332) - sorbet-static (0.5.11332-universal-darwin) - sorbet-static (0.5.11332-x86_64-linux) - sorbet-static-and-runtime (0.5.11332) - sorbet (= 0.5.11332) - sorbet-runtime (= 0.5.11332) + sorbet (0.5.11346) + sorbet-static (= 0.5.11346) + sorbet-runtime (0.5.11346) + sorbet-static (0.5.11346-universal-darwin) + sorbet-static (0.5.11346-x86_64-linux) + sorbet-static-and-runtime (0.5.11346) + sorbet (= 0.5.11346) + sorbet-runtime (= 0.5.11346) spoom (1.3.0) erubi (>= 1.10.0) prism (>= 0.19.0) @@ -104,7 +104,7 @@ GEM stringio (3.1.0) syntax_tree (6.2.0) prettier_print (>= 1.2.0) - tapioca (0.13.1) + tapioca (0.13.2) bundler (>= 2.2.25) netrc (>= 0.11.0) parallel (>= 1.21.0) @@ -122,8 +122,6 @@ GEM PLATFORMS arm64-darwin - x64-mingw-ucrt - x64-mingw32 x86_64-darwin x86_64-linux @@ -132,11 +130,11 @@ DEPENDENCIES debug (~> 1.9) minitest (~> 5.22) minitest-reporters (~> 1.6) - mocha (~> 2.1) + mocha (~> 2.2) psych (~> 5.1) rake (~> 13.2) rdoc! - rubocop (~> 1.62) + rubocop (~> 1.63) rubocop-minitest (~> 0.35.0) rubocop-rake (~> 0.6.0) rubocop-shopify (~> 2.15) From e8756b5547c5a10eb6dc89bddd3ce48c78a3633c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Apr 2024 02:18:58 +0000 Subject: [PATCH 015/189] Bump test/fixtures/prism from `225c940` to `68074cf` Bumps [test/fixtures/prism](https://github.com/ruby/prism) from `225c940` to `68074cf`. - [Release notes](https://github.com/ruby/prism/releases) - [Commits](https://github.com/ruby/prism/compare/225c940ecd79631a35a36311dd2bad66612a079b...68074cfa9dad91ac85df72a377bd36b39f13e9a6) --- updated-dependencies: - dependency-name: test/fixtures/prism dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- test/fixtures/prism | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/fixtures/prism b/test/fixtures/prism index 225c940ecd..68074cfa9d 160000 --- a/test/fixtures/prism +++ b/test/fixtures/prism @@ -1 +1 @@ -Subproject commit 225c940ecd79631a35a36311dd2bad66612a079b +Subproject commit 68074cfa9dad91ac85df72a377bd36b39f13e9a6 From f2da47b00d05cedbbdb80a6d86452652ee5f2ab2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Apr 2024 02:47:43 +0000 Subject: [PATCH 016/189] Bump the minor-and-patch group in /vscode with 5 updates Bumps the minor-and-patch group in /vscode with 5 updates: | Package | From | To | | --- | --- | --- | | [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `20.12.5` | `20.12.7` | | [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) | `7.5.0` | `7.6.0` | | [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) | `7.5.0` | `7.6.0` | | [@vscode/vsce](https://github.com/Microsoft/vsce) | `2.24.0` | `2.25.0` | | [typescript](https://github.com/Microsoft/TypeScript) | `5.4.4` | `5.4.5` | Updates `@types/node` from 20.12.5 to 20.12.7 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Updates `@typescript-eslint/eslint-plugin` from 7.5.0 to 7.6.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.6.0/packages/eslint-plugin) Updates `@typescript-eslint/parser` from 7.5.0 to 7.6.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.6.0/packages/parser) Updates `@vscode/vsce` from 2.24.0 to 2.25.0 - [Release notes](https://github.com/Microsoft/vsce/releases) - [Commits](https://github.com/Microsoft/vsce/compare/v2.24.0...v2.25.0) Updates `typescript` from 5.4.4 to 5.4.5 - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml) - [Commits](https://github.com/Microsoft/TypeScript/compare/v5.4.4...v5.4.5) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: "@typescript-eslint/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: "@typescript-eslint/parser" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: "@vscode/vsce" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: typescript dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] --- vscode/package.json | 8 +- vscode/yarn.lock | 228 +++++++++++++++++++++++++++----------------- 2 files changed, 144 insertions(+), 92 deletions(-) diff --git a/vscode/package.json b/vscode/package.json index fde92508f7..8deb5b1e6d 100644 --- a/vscode/package.json +++ b/vscode/package.json @@ -526,10 +526,10 @@ "@types/node": "20.x", "@types/sinon": "^17.0.3", "@types/vscode": "^1.68.0", - "@typescript-eslint/eslint-plugin": "^7.5.0", - "@typescript-eslint/parser": "^7.5.0", + "@typescript-eslint/eslint-plugin": "^7.6.0", + "@typescript-eslint/parser": "^7.6.0", "@vscode/test-electron": "^2.3.9", - "@vscode/vsce": "^2.24.0", + "@vscode/vsce": "^2.25.0", "esbuild": "^0.20.2", "eslint": "^8.57.0", "eslint-import-resolver-typescript": "^3.6.1", @@ -538,7 +538,7 @@ "mocha": "^10.4.0", "ovsx": "^0.9.0", "prettier": "^3.2.5", - "typescript": "^5.4.4", + "typescript": "^5.4.5", "sinon": "^17.0.1", "vscode-oniguruma": "^2.0.1", "vscode-textmate": "^9.0.0" diff --git a/vscode/yarn.lock b/vscode/yarn.lock index 753cf7235b..6be42cfa51 100644 --- a/vscode/yarn.lock +++ b/vscode/yarn.lock @@ -340,7 +340,7 @@ dependencies: eslint-visitor-keys "^3.3.0" -"@eslint-community/regexpp@^4.5.1", "@eslint-community/regexpp@^4.6.1": +"@eslint-community/regexpp@^4.10.0", "@eslint-community/regexpp@^4.5.1", "@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== @@ -570,7 +570,7 @@ "@types/minimatch" "^5.1.2" "@types/node" "*" -"@types/json-schema@^7.0.12", "@types/json-schema@^7.0.9": +"@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== @@ -591,13 +591,13 @@ integrity sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg== "@types/node@*", "@types/node@20.x": - version "20.12.5" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.5.tgz#74c4f31ab17955d0b5808cdc8fd2839526ad00b3" - integrity sha512-BD+BjQ9LS/D8ST9p5uqBxghlN+S42iuNxjsUGjeZobe/ciXzk2qb1B6IXc6AnRLS+yFJRpN2IPEHMzwspfDJNw== + version "20.12.7" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.7.tgz#04080362fa3dd6c5822061aa3124f5c152cff384" + integrity sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg== dependencies: undici-types "~5.26.4" -"@types/semver@^7.3.12", "@types/semver@^7.5.0": +"@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== @@ -636,22 +636,22 @@ semver "^7.5.4" ts-api-utils "^1.0.1" -"@typescript-eslint/eslint-plugin@^7.5.0": - version "7.5.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.5.0.tgz#1dc52fe48454d5b54be2d5f089680452f1628a5a" - integrity sha512-HpqNTH8Du34nLxbKgVMGljZMG0rJd2O9ecvr2QLYp+7512ty1j42KnsFwspPXg1Vh8an9YImf6CokUBltisZFQ== - dependencies: - "@eslint-community/regexpp" "^4.5.1" - "@typescript-eslint/scope-manager" "7.5.0" - "@typescript-eslint/type-utils" "7.5.0" - "@typescript-eslint/utils" "7.5.0" - "@typescript-eslint/visitor-keys" "7.5.0" +"@typescript-eslint/eslint-plugin@^7.6.0": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.6.0.tgz#1f5df5cda490a0bcb6fbdd3382e19f1241024242" + integrity sha512-gKmTNwZnblUdnTIJu3e9kmeRRzV2j1a/LUO27KNNAnIC5zjy1aSvXSRp4rVNlmAoHlQ7HzX42NbKpcSr4jF80A== + dependencies: + "@eslint-community/regexpp" "^4.10.0" + "@typescript-eslint/scope-manager" "7.6.0" + "@typescript-eslint/type-utils" "7.6.0" + "@typescript-eslint/utils" "7.6.0" + "@typescript-eslint/visitor-keys" "7.6.0" debug "^4.3.4" graphemer "^1.4.0" - ignore "^5.2.4" + ignore "^5.3.1" natural-compare "^1.4.0" - semver "^7.5.4" - ts-api-utils "^1.0.1" + semver "^7.6.0" + ts-api-utils "^1.3.0" "@typescript-eslint/parser@^6.2.1": version "6.21.0" @@ -664,15 +664,15 @@ "@typescript-eslint/visitor-keys" "6.21.0" debug "^4.3.4" -"@typescript-eslint/parser@^7.5.0": - version "7.5.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.5.0.tgz#1eeff36309ac2253c905dd4a88b4b71b72a358ed" - integrity sha512-cj+XGhNujfD2/wzR1tabNsidnYRaFfEkcULdcIyVBYcXjBvBKOes+mpMBP7hMpOyk+gBcfXsrg4NBGAStQyxjQ== +"@typescript-eslint/parser@^7.6.0": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.6.0.tgz#0aca5de3045d68b36e88903d15addaf13d040a95" + integrity sha512-usPMPHcwX3ZoPWnBnhhorc14NJw9J4HpSXQX4urF2TPKG0au0XhJoZyX62fmvdHONUkmyUe74Hzm1//XA+BoYg== dependencies: - "@typescript-eslint/scope-manager" "7.5.0" - "@typescript-eslint/types" "7.5.0" - "@typescript-eslint/typescript-estree" "7.5.0" - "@typescript-eslint/visitor-keys" "7.5.0" + "@typescript-eslint/scope-manager" "7.6.0" + "@typescript-eslint/types" "7.6.0" + "@typescript-eslint/typescript-estree" "7.6.0" + "@typescript-eslint/visitor-keys" "7.6.0" debug "^4.3.4" "@typescript-eslint/scope-manager@5.62.0": @@ -691,13 +691,13 @@ "@typescript-eslint/types" "6.21.0" "@typescript-eslint/visitor-keys" "6.21.0" -"@typescript-eslint/scope-manager@7.5.0": - version "7.5.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.5.0.tgz#70f0a7361430ab1043a5f97386da2a0d8b2f4d56" - integrity sha512-Z1r7uJY0MDeUlql9XJ6kRVgk/sP11sr3HKXn268HZyqL7i4cEfrdFuSSY/0tUqT37l5zT0tJOsuDP16kio85iA== +"@typescript-eslint/scope-manager@7.6.0": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.6.0.tgz#1e9972f654210bd7500b31feadb61a233f5b5e9d" + integrity sha512-ngttyfExA5PsHSx0rdFgnADMYQi+Zkeiv4/ZxGYUWd0nLs63Ha0ksmp8VMxAIC0wtCFxMos7Lt3PszJssG/E6w== dependencies: - "@typescript-eslint/types" "7.5.0" - "@typescript-eslint/visitor-keys" "7.5.0" + "@typescript-eslint/types" "7.6.0" + "@typescript-eslint/visitor-keys" "7.6.0" "@typescript-eslint/type-utils@6.21.0": version "6.21.0" @@ -709,15 +709,15 @@ debug "^4.3.4" ts-api-utils "^1.0.1" -"@typescript-eslint/type-utils@7.5.0": - version "7.5.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.5.0.tgz#a8faa403232da3a3901655387c7082111f692cf9" - integrity sha512-A021Rj33+G8mx2Dqh0nMO9GyjjIBK3MqgVgZ2qlKf6CJy51wY/lkkFqq3TqqnH34XyAHUkq27IjlUkWlQRpLHw== +"@typescript-eslint/type-utils@7.6.0": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.6.0.tgz#644f75075f379827d25fe0713e252ccd4e4a428c" + integrity sha512-NxAfqAPNLG6LTmy7uZgpK8KcuiS2NZD/HlThPXQRGwz6u7MDBWRVliEEl1Gj6U7++kVJTpehkhZzCJLMK66Scw== dependencies: - "@typescript-eslint/typescript-estree" "7.5.0" - "@typescript-eslint/utils" "7.5.0" + "@typescript-eslint/typescript-estree" "7.6.0" + "@typescript-eslint/utils" "7.6.0" debug "^4.3.4" - ts-api-utils "^1.0.1" + ts-api-utils "^1.3.0" "@typescript-eslint/types@5.62.0": version "5.62.0" @@ -729,10 +729,10 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.21.0.tgz#205724c5123a8fef7ecd195075fa6e85bac3436d" integrity sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg== -"@typescript-eslint/types@7.5.0": - version "7.5.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.5.0.tgz#0a284bcdef3cb850ec9fd57992df9f29d6bde1bc" - integrity sha512-tv5B4IHeAdhR7uS4+bf8Ov3k793VEVHd45viRRkehIUZxm0WF82VPiLgHzA/Xl4TGPg1ZD49vfxBKFPecD5/mg== +"@typescript-eslint/types@7.6.0": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.6.0.tgz#53dba7c30c87e5f10a731054266dd905f1fbae38" + integrity sha512-h02rYQn8J+MureCvHVVzhl69/GAfQGPQZmOMjG1KfCl7o3HtMSlPaPUAPu6lLctXI5ySRGIYk94clD/AUMCUgQ== "@typescript-eslint/typescript-estree@5.62.0": version "5.62.0" @@ -761,19 +761,19 @@ semver "^7.5.4" ts-api-utils "^1.0.1" -"@typescript-eslint/typescript-estree@7.5.0": - version "7.5.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.5.0.tgz#aa5031c511874420f6b5edd90f8e4021525ee776" - integrity sha512-YklQQfe0Rv2PZEueLTUffiQGKQneiIEKKnfIqPIOxgM9lKSZFCjT5Ad4VqRKj/U4+kQE3fa8YQpskViL7WjdPQ== +"@typescript-eslint/typescript-estree@7.6.0": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.6.0.tgz#112a3775563799fd3f011890ac8322f80830ac17" + integrity sha512-+7Y/GP9VuYibecrCQWSKgl3GvUM5cILRttpWtnAu8GNL9j11e4tbuGZmZjJ8ejnKYyBRb2ddGQ3rEFCq3QjMJw== dependencies: - "@typescript-eslint/types" "7.5.0" - "@typescript-eslint/visitor-keys" "7.5.0" + "@typescript-eslint/types" "7.6.0" + "@typescript-eslint/visitor-keys" "7.6.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" + minimatch "^9.0.4" + semver "^7.6.0" + ts-api-utils "^1.3.0" "@typescript-eslint/utils@6.21.0": version "6.21.0" @@ -788,18 +788,18 @@ "@typescript-eslint/typescript-estree" "6.21.0" semver "^7.5.4" -"@typescript-eslint/utils@7.5.0": - version "7.5.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.5.0.tgz#bbd963647fbbe9ffea033f42c0fb7e89bb19c858" - integrity sha512-3vZl9u0R+/FLQcpy2EHyRGNqAS/ofJ3Ji8aebilfJe+fobK8+LbIFmrHciLVDxjDoONmufDcnVSF38KwMEOjzw== +"@typescript-eslint/utils@7.6.0": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.6.0.tgz#e400d782280b6f724c8a1204269d984c79202282" + integrity sha512-x54gaSsRRI+Nwz59TXpCsr6harB98qjXYzsRxGqvA5Ue3kQH+FxS7FYU81g/omn22ML2pZJkisy6Q+ElK8pBCA== dependencies: "@eslint-community/eslint-utils" "^4.4.0" - "@types/json-schema" "^7.0.12" - "@types/semver" "^7.5.0" - "@typescript-eslint/scope-manager" "7.5.0" - "@typescript-eslint/types" "7.5.0" - "@typescript-eslint/typescript-estree" "7.5.0" - semver "^7.5.4" + "@types/json-schema" "^7.0.15" + "@types/semver" "^7.5.8" + "@typescript-eslint/scope-manager" "7.6.0" + "@typescript-eslint/types" "7.6.0" + "@typescript-eslint/typescript-estree" "7.6.0" + semver "^7.6.0" "@typescript-eslint/utils@^5.10.0": version "5.62.0" @@ -831,13 +831,13 @@ "@typescript-eslint/types" "6.21.0" eslint-visitor-keys "^3.4.1" -"@typescript-eslint/visitor-keys@7.5.0": - version "7.5.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.5.0.tgz#8abcac66f93ef20b093e87a400c2d21e3a6d55ee" - integrity sha512-mcuHM/QircmA6O7fy6nn2w/3ditQkj+SgtOc8DW3uQ10Yfj42amm2i+6F2K4YAOPNNTmE6iM1ynM6lrSwdendA== +"@typescript-eslint/visitor-keys@7.6.0": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.6.0.tgz#d1ce13145844379021e1f9bd102c1d78946f4e76" + integrity sha512-4eLB7t+LlNUmXzfOu1VAIAdkjbu5xNSerURS9X/S5TUKWFRpXRQZbmtPqgKmYx8bj3J0irtQXSiWAOY82v+cgw== dependencies: - "@typescript-eslint/types" "7.5.0" - eslint-visitor-keys "^3.4.1" + "@typescript-eslint/types" "7.6.0" + eslint-visitor-keys "^3.4.3" "@ungap/structured-clone@^1.2.0": version "1.2.0" @@ -854,15 +854,17 @@ jszip "^3.10.1" semver "^7.5.2" -"@vscode/vsce@^2.24.0": - version "2.24.0" - resolved "https://registry.yarnpkg.com/@vscode/vsce/-/vsce-2.24.0.tgz#7f835b9fdd5bfedcecd62a6c4d684841a74974d4" - integrity sha512-p6CIXpH5HXDqmUkgFXvIKTjZpZxy/uDx4d/UsfhS9vQUun43KDNUbYeZocyAHgqcJlPEurgArHz9te1PPiqPyA== +"@vscode/vsce@^2.24.0", "@vscode/vsce@^2.25.0": + version "2.25.0" + resolved "https://registry.yarnpkg.com/@vscode/vsce/-/vsce-2.25.0.tgz#93421c1cfdf0c73ecf273698951ca0dc09bf6f37" + integrity sha512-VXMCGUaP6wKBadA7vFQdsksxkBAMoh4ecZgXBwauZMASAgnwYesHyLnqIyWYeRwjy2uEpitHvz/1w5ENnR30pg== dependencies: - azure-devops-node-api "^11.0.1" + azure-devops-node-api "^12.5.0" chalk "^2.4.2" cheerio "^1.0.0-rc.9" + cockatiel "^3.1.2" commander "^6.2.1" + form-data "^4.0.0" glob "^7.0.6" hosted-git-info "^4.0.2" jsonc-parser "^3.2.0" @@ -1066,6 +1068,11 @@ asynciterator.prototype@^1.0.0: dependencies: has-symbols "^1.0.3" +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== + available-typed-arrays@^1.0.6, available-typed-arrays@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz#a5cc375d6a03c2efc87a553f3e0b1522def14846" @@ -1085,10 +1092,10 @@ axobject-query@^3.2.1: dependencies: dequal "^2.0.3" -azure-devops-node-api@^11.0.1: - version "11.2.0" - resolved "https://registry.yarnpkg.com/azure-devops-node-api/-/azure-devops-node-api-11.2.0.tgz#bf04edbef60313117a0507415eed4790a420ad6b" - integrity sha512-XdiGPhrpaT5J8wdERRKs5g8E0Zy1pvOYTli7z9E8nmOn3YGp4FhtjhrOyFmX/8veWCwdI69mCHKJw6l+4J/bHA== +azure-devops-node-api@^12.5.0: + version "12.5.0" + resolved "https://registry.yarnpkg.com/azure-devops-node-api/-/azure-devops-node-api-12.5.0.tgz#38b9efd7c5ac74354fe4e8dbe42697db0b8e85a5" + integrity sha512-R5eFskGvOm3U/GzeAuxRkUsAl0hrAwGgWn6zAd2KrZmrEhWZVqLew4OOupbQlXUuojUzpGtq62SmdhJ06N88og== dependencies: tunnel "0.0.6" typed-rest-client "^1.8.4" @@ -1309,6 +1316,11 @@ cliui@^7.0.2: strip-ansi "^6.0.0" wrap-ansi "^7.0.0" +cockatiel@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/cockatiel/-/cockatiel-3.1.2.tgz#4863d7a92c3c22d78ac8c6ae35137c77f81924eb" + integrity sha512-5yARKww0dWyWg2/3xZeXgoxjHLwpVqFptj9Zy7qioJ6+/L0ARM184sgMUrQDjxw7ePJWlGhV998mKhzrxT0/Kg== + color-convert@^1.9.0: version "1.9.3" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" @@ -1333,6 +1345,13 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== +combined-stream@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== + dependencies: + delayed-stream "~1.0.0" + commander@^6.1.0, commander@^6.2.1: version "6.2.1" resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c" @@ -1463,6 +1482,11 @@ define-properties@^1.1.3, define-properties@^1.2.0, define-properties@^1.2.1: has-property-descriptors "^1.0.0" object-keys "^1.1.1" +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== + dequal@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/dequal/-/dequal-2.0.3.tgz#2644214f1997d39ed0ee0ece72335490a7ac67be" @@ -2149,6 +2173,15 @@ foreground-child@^3.1.0: cross-spawn "^7.0.0" signal-exit "^4.0.1" +form-data@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" + integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + formdata-polyfill@^4.0.10: version "4.0.10" resolved "https://registry.yarnpkg.com/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz#24807c31c9d402e002ab3d8c720144ceb8848423" @@ -2427,7 +2460,7 @@ ieee754@^1.1.13: 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.0.5, ignore@^5.1.1, ignore@^5.2.0, ignore@^5.2.4, 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== @@ -2919,6 +2952,18 @@ micromatch@^4.0.4: braces "^3.0.2" picomatch "^2.3.1" +mime-db@1.52.0: + version "1.52.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== + +mime-types@^2.1.12: + version "2.1.35" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== + dependencies: + mime-db "1.52.0" + mime@^1.3.4: version "1.6.0" resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" @@ -2936,7 +2981,7 @@ minimatch@5.0.1: dependencies: brace-expansion "^2.0.1" -minimatch@9.0.3, minimatch@^9.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== @@ -2957,6 +3002,13 @@ minimatch@^5.0.1, minimatch@^5.1.0: dependencies: brace-expansion "^2.0.1" +minimatch@^9.0.1, 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== + dependencies: + brace-expansion "^2.0.1" + minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.6: version "1.2.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" @@ -3895,10 +3947,10 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" -ts-api-utils@^1.0.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.2.1.tgz#f716c7e027494629485b21c0df6180f4d08f5e8b" - integrity sha512-RIYA36cJn2WiH9Hy77hdF9r7oEwxAtB/TS9/S4Qd90Ap4z5FSiin5zEiTL44OII1Y3IIlEvxwxFUVgrHSZ/UpA== +ts-api-utils@^1.0.1, 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== tsconfig-paths@^3.15.0: version "3.15.0" @@ -4009,10 +4061,10 @@ typed-rest-client@^1.8.4: tunnel "0.0.6" underscore "^1.12.1" -typescript@^5.4.4: - version "5.4.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.4.tgz#eb2471e7b0a5f1377523700a21669dce30c2d952" - integrity sha512-dGE2Vv8cpVvw28v8HCPqyb08EzbBURxDpuhJvTrusShUfGnhHBafDsLdS1EhhxyL6BJQE+2cT3dDPAv+MQ6oLw== +typescript@^5.4.5: + version "5.4.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.5.tgz#42ccef2c571fdbd0f6718b1d1f5e6e5ef006f611" + integrity sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ== uc.micro@^1.0.1, uc.micro@^1.0.5: version "1.0.6" From 164e017375807152efbbae29c988a96ecbced177 Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Mon, 15 Apr 2024 09:43:36 -0400 Subject: [PATCH 017/189] Run `initialized` directly without pushing to queue (#1927) --- lib/ruby_lsp/base_server.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ruby_lsp/base_server.rb b/lib/ruby_lsp/base_server.rb index 101db1b6bd..0419cb2ebb 100644 --- a/lib/ruby_lsp/base_server.rb +++ b/lib/ruby_lsp/base_server.rb @@ -62,7 +62,7 @@ def start # The following requests need to be executed in the main thread directly to avoid concurrency issues. Everything # else is pushed into the incoming queue case method - when "initialize", "textDocument/didOpen", "textDocument/didClose", "textDocument/didChange" + when "initialize", "initialized", "textDocument/didOpen", "textDocument/didClose", "textDocument/didChange" process_message(message) when "shutdown" $stderr.puts("Shutting down Ruby LSP...") From 7592b54edd40a1e7383a035b8ceeed28acffe43f Mon Sep 17 00:00:00 2001 From: Emmanuel Ferdman Date: Mon, 15 Apr 2024 17:23:00 +0300 Subject: [PATCH 018/189] Fix troubleshooting status center logo link (#1931) --- TROUBLESHOOTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TROUBLESHOOTING.md b/TROUBLESHOOTING.md index 0a65183646..892b434bc5 100644 --- a/TROUBLESHOOTING.md +++ b/TROUBLESHOOTING.md @@ -110,7 +110,7 @@ manner. Please include the steps taken to diagnose in your bug report. ### Check if the server is running -Check the [status center](https://github.com/Shopify/ruby-lsp/blob/main/extras/ruby_lsp_status_center.png). +Check the [status center](https://github.com/Shopify/ruby-lsp/blob/main/vscode/extras/ruby_lsp_status_center.png). Does the server status say it's running? If it is running, but you are missing certain features, please check our [documentation](https://shopify.github.io/ruby-lsp/RubyLsp/Requests.html) to ensure we already added support for it. From 4cc5e5ce8fa2951828fde922c3f4573874c3efc6 Mon Sep 17 00:00:00 2001 From: Aryan Soni <43973636+aryan-soni@users.noreply.github.com> Date: Mon, 15 Apr 2024 10:40:02 -0400 Subject: [PATCH 019/189] Refactor global usage of `Prism::Location` to minimize memory usage (#1917) refactor usage of location to minimize memory usage --- lib/ruby_indexer/lib/ruby_indexer/entry.rb | 36 ++++++++++++++----- lib/ruby_indexer/lib/ruby_indexer/location.rb | 26 ++++++++++++++ lib/ruby_indexer/ruby_indexer.rb | 1 + 3 files changed, 55 insertions(+), 8 deletions(-) create mode 100644 lib/ruby_indexer/lib/ruby_indexer/location.rb diff --git a/lib/ruby_indexer/lib/ruby_indexer/entry.rb b/lib/ruby_indexer/lib/ruby_indexer/entry.rb index f1a3de4244..f5e7a36876 100644 --- a/lib/ruby_indexer/lib/ruby_indexer/entry.rb +++ b/lib/ruby_indexer/lib/ruby_indexer/entry.rb @@ -11,7 +11,7 @@ class Entry sig { returns(String) } attr_reader :file_path - sig { returns(Prism::Location) } + sig { returns(RubyIndexer::Location) } attr_reader :location sig { returns(T::Array[String]) } @@ -20,13 +20,33 @@ class Entry sig { returns(Symbol) } attr_accessor :visibility - sig { params(name: String, file_path: String, location: Prism::Location, comments: T::Array[String]).void } + sig do + params( + name: String, + file_path: String, + location: T.any(Prism::Location, RubyIndexer::Location), + comments: T::Array[String], + ).void + end def initialize(name, file_path, location, comments) @name = name @file_path = file_path - @location = location @comments = comments @visibility = T.let(:public, Symbol) + + @location = T.let( + if location.is_a?(Prism::Location) + Location.new( + location.start_line, + location.end_line, + location.start_column, + location.end_column, + ) + else + location + end, + RubyIndexer::Location, + ) end sig { returns(String) } @@ -50,7 +70,7 @@ class Namespace < Entry params( name: String, file_path: String, - location: Prism::Location, + location: T.any(Prism::Location, RubyIndexer::Location), comments: T::Array[String], ).void end @@ -81,7 +101,7 @@ class Class < Namespace params( name: String, file_path: String, - location: Prism::Location, + location: T.any(Prism::Location, RubyIndexer::Location), comments: T::Array[String], parent_class: T.nilable(String), ).void @@ -181,7 +201,7 @@ class Member < Entry params( name: String, file_path: String, - location: Prism::Location, + location: T.any(Prism::Location, RubyIndexer::Location), comments: T::Array[String], owner: T.nilable(Entry::Namespace), ).void @@ -219,7 +239,7 @@ class Method < Member params( name: String, file_path: String, - location: Prism::Location, + location: T.any(Prism::Location, RubyIndexer::Location), comments: T::Array[String], parameters_node: T.nilable(Prism::ParametersNode), owner: T.nilable(Entry::Namespace), @@ -349,7 +369,7 @@ class UnresolvedAlias < Entry nesting: T::Array[String], name: String, file_path: String, - location: Prism::Location, + location: T.any(Prism::Location, RubyIndexer::Location), comments: T::Array[String], ).void end diff --git a/lib/ruby_indexer/lib/ruby_indexer/location.rb b/lib/ruby_indexer/lib/ruby_indexer/location.rb new file mode 100644 index 0000000000..5b83662273 --- /dev/null +++ b/lib/ruby_indexer/lib/ruby_indexer/location.rb @@ -0,0 +1,26 @@ +# typed: strict +# frozen_string_literal: true + +module RubyIndexer + class Location + extend T::Sig + + sig { returns(Integer) } + attr_reader :start_line, :end_line, :start_column, :end_column + + sig do + params( + start_line: Integer, + end_line: Integer, + start_column: Integer, + end_column: Integer, + ).void + end + def initialize(start_line, end_line, start_column, end_column) + @start_line = start_line + @end_line = end_line + @start_column = start_column + @end_column = end_column + end + end +end diff --git a/lib/ruby_indexer/ruby_indexer.rb b/lib/ruby_indexer/ruby_indexer.rb index adf45ed748..ee5af2dc63 100644 --- a/lib/ruby_indexer/ruby_indexer.rb +++ b/lib/ruby_indexer/ruby_indexer.rb @@ -10,6 +10,7 @@ require "ruby_indexer/lib/ruby_indexer/entry" require "ruby_indexer/lib/ruby_indexer/configuration" require "ruby_indexer/lib/ruby_indexer/prefix_tree" +require "ruby_indexer/lib/ruby_indexer/location" module RubyIndexer @configuration = T.let(Configuration.new, Configuration) From fa8b8429975f0fc5ed3fb358022f7c964310becb Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Mon, 15 Apr 2024 13:27:27 -0400 Subject: [PATCH 020/189] Randomly assign issues to contributors (#1935) --- .github/workflows/auto_assign.yml | 41 +++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/auto_assign.yml diff --git a/.github/workflows/auto_assign.yml b/.github/workflows/auto_assign.yml new file mode 100644 index 0000000000..fc643df3b2 --- /dev/null +++ b/.github/workflows/auto_assign.yml @@ -0,0 +1,41 @@ +name: Auto assign + +on: + issues: + types: [opened] + +jobs: + auto_assign: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + name: Checkout + + - name: Randomly assign reviewers to community issues + uses: actions/github-script@v7 + with: + github-token: "${{ secrets.GITHUB_TOKEN }}" + script: | + const devExpResponse = await github.rest.teams.listMembersInOrg({ + org: "shopify", + team_slug: "ruby-dev-exp", + }); + const members = devExpResponse.data.map((member) => member.login); + const issue = github.event.issue; + + if (!members.includes(issue.user.login)) { + const dxResponse = await github.rest.teams.listMembersInOrg({ + org: "shopify", + team_slug: "ruby-dx", + }); + const reviewers = dxResponse.data.map((member) => member.login); + const assignee = reviewers[Math.floor(Math.random() * reviewers.length)]; + + await github.rest.issues.addAssignees({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: issue.number, + assignees: [assignee] + }); + } From add6922b54abaae9223e272594a48c790399a6e5 Mon Sep 17 00:00:00 2001 From: Earlopain <14981592+Earlopain@users.noreply.github.com> Date: Tue, 16 Apr 2024 15:18:31 +0200 Subject: [PATCH 021/189] Allow request ids to be strings (#1929) The LSP spec allows this: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#requestMessage Addons that want to sent requests must provide an id but since the counter is internal to the server that is not easily possible at the moment. See the conversation starting at https://github.com/Shopify/ruby-lsp-rails/issues/326#issuecomment-2050336058 for more context --- lib/ruby_lsp/utils.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ruby_lsp/utils.rb b/lib/ruby_lsp/utils.rb index 14fab49d73..8fb6758f15 100644 --- a/lib/ruby_lsp/utils.rb +++ b/lib/ruby_lsp/utils.rb @@ -75,7 +75,7 @@ def to_hash class Request < Message extend T::Sig - sig { params(id: Integer, method: String, params: Object).void } + sig { params(id: T.any(Integer, String), method: String, params: Object).void } def initialize(id:, method:, params:) @id = id super(method: method, params: params) From 65359f0b121880414284819b2670bdb782905693 Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Tue, 16 Apr 2024 10:02:50 -0400 Subject: [PATCH 022/189] Update RuboCop --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index e7d8e5046e..6f88ad6914 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -58,7 +58,7 @@ GEM reline (0.5.0) io-console (~> 0.5) rexml (3.2.6) - rubocop (1.63.1) + rubocop (1.63.2) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) From 8bf8ee4aecbb7c81a47bfec223c5a070ff2d95f7 Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Tue, 16 Apr 2024 10:03:34 -0400 Subject: [PATCH 023/189] Restore Windows platforms --- Gemfile.lock | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Gemfile.lock b/Gemfile.lock index 6f88ad6914..3d6804f9e3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -122,6 +122,8 @@ GEM PLATFORMS arm64-darwin + x64-mingw-ucrt + x64-mingw32 x86_64-darwin x86_64-linux From d07d9c14b71bf821a8533b7ee2312cb5e6d5b3c1 Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Tue, 16 Apr 2024 11:18:23 -0400 Subject: [PATCH 024/189] Hardcode team members in auto assign workflow (#1943) --- .github/workflows/auto_assign.yml | 32 +++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/.github/workflows/auto_assign.yml b/.github/workflows/auto_assign.yml index fc643df3b2..c971534ac6 100644 --- a/.github/workflows/auto_assign.yml +++ b/.github/workflows/auto_assign.yml @@ -17,20 +17,28 @@ jobs: with: github-token: "${{ secrets.GITHUB_TOKEN }}" script: | - const devExpResponse = await github.rest.teams.listMembersInOrg({ - org: "shopify", - team_slug: "ruby-dev-exp", - }); - const members = devExpResponse.data.map((member) => member.login); + const fullTeam = [ + "andyw8", + "dirceu", + "paracycle", + "vinistock", + "aryan-soni", + "rafaelfranca", + "Morriar", + "st0012", + "egiurleo", + "KaanOzkan" + ]; const issue = github.event.issue; - if (!members.includes(issue.user.login)) { - const dxResponse = await github.rest.teams.listMembersInOrg({ - org: "shopify", - team_slug: "ruby-dx", - }); - const reviewers = dxResponse.data.map((member) => member.login); - const assignee = reviewers[Math.floor(Math.random() * reviewers.length)]; + if (!fullTeam.includes(issue.user.login)) { + const dxReviewers = [ + "andyw8", + "vinistock", + "aryan-soni", + "st0012", + ]; + const assignee = dxReviewers[Math.floor(Math.random() * dxReviewers.length)]; await github.rest.issues.addAssignees({ owner: context.repo.owner, From 22ae132c56eaf1457e6d410935081ffcdbb6cad8 Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Wed, 17 Apr 2024 10:42:45 -0400 Subject: [PATCH 025/189] Use special syntax to refer to GH action event data (#1948) --- .github/workflows/auto_assign.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/auto_assign.yml b/.github/workflows/auto_assign.yml index c971534ac6..2d9ee28b38 100644 --- a/.github/workflows/auto_assign.yml +++ b/.github/workflows/auto_assign.yml @@ -29,9 +29,9 @@ jobs: "egiurleo", "KaanOzkan" ]; - const issue = github.event.issue; + const author = "${{ github.event.issue.user.login }}"; - if (!fullTeam.includes(issue.user.login)) { + if (!fullTeam.includes(author)) { const dxReviewers = [ "andyw8", "vinistock", @@ -43,7 +43,7 @@ jobs: await github.rest.issues.addAssignees({ owner: context.repo.owner, repo: context.repo.repo, - issue_number: issue.number, + issue_number: ${{ github.event.issue.number }}, assignees: [assignee] }); } From b67bccf9c15f99164b33b47b8ac3b4f0a1620be4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Apr 2024 02:18:20 +0000 Subject: [PATCH 026/189] Bump the minor-and-patch group in /vscode with 4 updates Bumps the minor-and-patch group in /vscode with 4 updates: [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin), [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser), [@vscode/vsce](https://github.com/Microsoft/vsce) and [ovsx](https://github.com/eclipse/openvsx/tree/HEAD/cli). Updates `@typescript-eslint/eslint-plugin` from 7.6.0 to 7.7.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.7.0/packages/eslint-plugin) Updates `@typescript-eslint/parser` from 7.6.0 to 7.7.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.7.0/packages/parser) Updates `@vscode/vsce` from 2.25.0 to 2.26.0 - [Release notes](https://github.com/Microsoft/vsce/releases) - [Commits](https://github.com/Microsoft/vsce/compare/v2.25.0...v2.26.0) Updates `ovsx` from 0.9.0 to 0.9.1 - [Release notes](https://github.com/eclipse/openvsx/releases) - [Changelog](https://github.com/eclipse/openvsx/blob/master/cli/CHANGELOG.md) - [Commits](https://github.com/eclipse/openvsx/commits/v0.9.1/cli) --- updated-dependencies: - dependency-name: "@typescript-eslint/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: "@typescript-eslint/parser" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: "@vscode/vsce" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: ovsx dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] --- vscode/package.json | 8 +- vscode/yarn.lock | 428 +++++++++++++++++++++++++++++++++++++------- 2 files changed, 367 insertions(+), 69 deletions(-) diff --git a/vscode/package.json b/vscode/package.json index 8deb5b1e6d..32d359774e 100644 --- a/vscode/package.json +++ b/vscode/package.json @@ -526,17 +526,17 @@ "@types/node": "20.x", "@types/sinon": "^17.0.3", "@types/vscode": "^1.68.0", - "@typescript-eslint/eslint-plugin": "^7.6.0", - "@typescript-eslint/parser": "^7.6.0", + "@typescript-eslint/eslint-plugin": "^7.7.0", + "@typescript-eslint/parser": "^7.7.0", "@vscode/test-electron": "^2.3.9", - "@vscode/vsce": "^2.25.0", + "@vscode/vsce": "^2.26.0", "esbuild": "^0.20.2", "eslint": "^8.57.0", "eslint-import-resolver-typescript": "^3.6.1", "eslint-plugin-prettier": "^5.1.3", "glob": "^10.3.12", "mocha": "^10.4.0", - "ovsx": "^0.9.0", + "ovsx": "^0.9.1", "prettier": "^3.2.5", "typescript": "^5.4.5", "sinon": "^17.0.1", diff --git a/vscode/yarn.lock b/vscode/yarn.lock index 6be42cfa51..a5bb16d6ea 100644 --- a/vscode/yarn.lock +++ b/vscode/yarn.lock @@ -15,6 +15,119 @@ "@jridgewell/gen-mapping" "^0.3.0" "@jridgewell/trace-mapping" "^0.3.9" +"@azure/abort-controller@^1.0.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@azure/abort-controller/-/abort-controller-1.1.0.tgz#788ee78457a55af8a1ad342acb182383d2119249" + integrity sha512-TrRLIoSQVzfAJX9H1JeFjzAoDGcoK1IYX1UImfceTZpsyYfWr09Ss1aHW1y5TrrR3iq6RZLBwJ3E24uwPhwahw== + dependencies: + tslib "^2.2.0" + +"@azure/abort-controller@^2.0.0": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@azure/abort-controller/-/abort-controller-2.1.2.tgz#42fe0ccab23841d9905812c58f1082d27784566d" + integrity sha512-nBrLsEWm4J2u5LpAPjxADTlq3trDgVZZXHNKabeXZtpq3d3AbN/KGO82R87rdDz5/lYB024rtEf10/q0urNgsA== + dependencies: + tslib "^2.6.2" + +"@azure/core-auth@^1.4.0", "@azure/core-auth@^1.5.0": + version "1.7.2" + resolved "https://registry.yarnpkg.com/@azure/core-auth/-/core-auth-1.7.2.tgz#558b7cb7dd12b00beec07ae5df5907d74df1ebd9" + integrity sha512-Igm/S3fDYmnMq1uKS38Ae1/m37B3zigdlZw+kocwEhh5GjyKjPrXKO2J6rzpC1wAxrNil/jX9BJRqBshyjnF3g== + dependencies: + "@azure/abort-controller" "^2.0.0" + "@azure/core-util" "^1.1.0" + tslib "^2.6.2" + +"@azure/core-client@^1.4.0": + version "1.9.2" + resolved "https://registry.yarnpkg.com/@azure/core-client/-/core-client-1.9.2.tgz#6fc69cee2816883ab6c5cdd653ee4f2ff9774f74" + integrity sha512-kRdry/rav3fUKHl/aDLd/pDLcB+4pOFwPPTVEExuMyaI5r+JBbMWqRbCY1pn5BniDaU3lRxO9eaQ1AmSMehl/w== + dependencies: + "@azure/abort-controller" "^2.0.0" + "@azure/core-auth" "^1.4.0" + "@azure/core-rest-pipeline" "^1.9.1" + "@azure/core-tracing" "^1.0.0" + "@azure/core-util" "^1.6.1" + "@azure/logger" "^1.0.0" + tslib "^2.6.2" + +"@azure/core-rest-pipeline@^1.1.0", "@azure/core-rest-pipeline@^1.9.1": + version "1.15.2" + resolved "https://registry.yarnpkg.com/@azure/core-rest-pipeline/-/core-rest-pipeline-1.15.2.tgz#421729bbd8cd5f9f50b403e79941f27ac1bdc302" + integrity sha512-BmWfpjc/QXc2ipHOh6LbUzp3ONCaa6xzIssTU0DwH9bbYNXJlGUL6tujx5TrbVd/QQknmS+vlQJGrCq2oL1gZA== + dependencies: + "@azure/abort-controller" "^2.0.0" + "@azure/core-auth" "^1.4.0" + "@azure/core-tracing" "^1.0.1" + "@azure/core-util" "^1.3.0" + "@azure/logger" "^1.0.0" + http-proxy-agent "^7.0.0" + https-proxy-agent "^7.0.0" + tslib "^2.6.2" + +"@azure/core-tracing@^1.0.0", "@azure/core-tracing@^1.0.1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@azure/core-tracing/-/core-tracing-1.1.2.tgz#065dab4e093fb61899988a1cdbc827d9ad90b4ee" + integrity sha512-dawW9ifvWAWmUm9/h+/UQ2jrdvjCJ7VJEuCJ6XVNudzcOwm53BFZH4Q845vjfgoUAM8ZxokvVNxNxAITc502YA== + dependencies: + tslib "^2.6.2" + +"@azure/core-util@^1.1.0", "@azure/core-util@^1.3.0", "@azure/core-util@^1.6.1": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@azure/core-util/-/core-util-1.9.0.tgz#469afd7e6452d5388b189f90d33f7756b0b210d1" + integrity sha512-AfalUQ1ZppaKuxPPMsFEUdX6GZPB3d9paR9d/TTL7Ow2De8cJaC7ibi7kWVlFAVPCYo31OcnGymc0R89DX8Oaw== + dependencies: + "@azure/abort-controller" "^2.0.0" + 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== + dependencies: + "@azure/abort-controller" "^1.0.0" + "@azure/core-auth" "^1.5.0" + "@azure/core-client" "^1.4.0" + "@azure/core-rest-pipeline" "^1.1.0" + "@azure/core-tracing" "^1.0.0" + "@azure/core-util" "^1.3.0" + "@azure/logger" "^1.0.0" + "@azure/msal-browser" "^3.11.1" + "@azure/msal-node" "^2.6.6" + events "^3.0.0" + jws "^4.0.0" + open "^8.0.0" + stoppable "^1.1.0" + tslib "^2.2.0" + +"@azure/logger@^1.0.0": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@azure/logger/-/logger-1.1.2.tgz#3f4b876cefad328dc14aff8b850d63b611e249dc" + integrity sha512-l170uE7bsKpIU6B/giRc9i4NI0Mj+tANMMMxf7Zi/5cKzEqPayP7+X1WPrG7e+91JgY8N+7K7nF2WOi7iVhXvg== + dependencies: + tslib "^2.6.2" + +"@azure/msal-browser@^3.11.1": + version "3.13.0" + resolved "https://registry.yarnpkg.com/@azure/msal-browser/-/msal-browser-3.13.0.tgz#dc52c5d4957c33209e8a343a8c31fcf662285024" + integrity sha512-fD906nmJei3yE7la6DZTdUtXKvpwzJURkfsiz9747Icv4pit77cegSm6prJTKLQ1fw4iiZzrrWwxnhMLrTf5gQ== + dependencies: + "@azure/msal-common" "14.9.0" + +"@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== + dependencies: + "@azure/msal-common" "14.9.0" + jsonwebtoken "^9.0.0" + uuid "^8.3.0" + "@babel/code-frame@^7.23.5", "@babel/code-frame@^7.24.1", "@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" @@ -636,16 +749,16 @@ semver "^7.5.4" ts-api-utils "^1.0.1" -"@typescript-eslint/eslint-plugin@^7.6.0": - version "7.6.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.6.0.tgz#1f5df5cda490a0bcb6fbdd3382e19f1241024242" - integrity sha512-gKmTNwZnblUdnTIJu3e9kmeRRzV2j1a/LUO27KNNAnIC5zjy1aSvXSRp4rVNlmAoHlQ7HzX42NbKpcSr4jF80A== +"@typescript-eslint/eslint-plugin@^7.7.0": + version "7.7.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.7.0.tgz#bf34a02f221811505b8bf2f31060c8560c1bb0a3" + integrity sha512-GJWR0YnfrKnsRoluVO3PRb9r5aMZriiMMM/RHj5nnTrBy1/wIgk76XCtCKcnXGjpZQJQRFtGV9/0JJ6n30uwpQ== dependencies: "@eslint-community/regexpp" "^4.10.0" - "@typescript-eslint/scope-manager" "7.6.0" - "@typescript-eslint/type-utils" "7.6.0" - "@typescript-eslint/utils" "7.6.0" - "@typescript-eslint/visitor-keys" "7.6.0" + "@typescript-eslint/scope-manager" "7.7.0" + "@typescript-eslint/type-utils" "7.7.0" + "@typescript-eslint/utils" "7.7.0" + "@typescript-eslint/visitor-keys" "7.7.0" debug "^4.3.4" graphemer "^1.4.0" ignore "^5.3.1" @@ -664,15 +777,15 @@ "@typescript-eslint/visitor-keys" "6.21.0" debug "^4.3.4" -"@typescript-eslint/parser@^7.6.0": - version "7.6.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.6.0.tgz#0aca5de3045d68b36e88903d15addaf13d040a95" - integrity sha512-usPMPHcwX3ZoPWnBnhhorc14NJw9J4HpSXQX4urF2TPKG0au0XhJoZyX62fmvdHONUkmyUe74Hzm1//XA+BoYg== +"@typescript-eslint/parser@^7.7.0": + version "7.7.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.7.0.tgz#6b1b3ce76c5de002c43af8ae933613b0f2b4bcc6" + integrity sha512-fNcDm3wSwVM8QYL4HKVBggdIPAy9Q41vcvC/GtDobw3c4ndVT3K6cqudUmjHPw8EAp4ufax0o58/xvWaP2FmTg== dependencies: - "@typescript-eslint/scope-manager" "7.6.0" - "@typescript-eslint/types" "7.6.0" - "@typescript-eslint/typescript-estree" "7.6.0" - "@typescript-eslint/visitor-keys" "7.6.0" + "@typescript-eslint/scope-manager" "7.7.0" + "@typescript-eslint/types" "7.7.0" + "@typescript-eslint/typescript-estree" "7.7.0" + "@typescript-eslint/visitor-keys" "7.7.0" debug "^4.3.4" "@typescript-eslint/scope-manager@5.62.0": @@ -691,13 +804,13 @@ "@typescript-eslint/types" "6.21.0" "@typescript-eslint/visitor-keys" "6.21.0" -"@typescript-eslint/scope-manager@7.6.0": - version "7.6.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.6.0.tgz#1e9972f654210bd7500b31feadb61a233f5b5e9d" - integrity sha512-ngttyfExA5PsHSx0rdFgnADMYQi+Zkeiv4/ZxGYUWd0nLs63Ha0ksmp8VMxAIC0wtCFxMos7Lt3PszJssG/E6w== +"@typescript-eslint/scope-manager@7.7.0": + version "7.7.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.7.0.tgz#3f0db079b275bb8b0cb5be7613fb3130cfb5de77" + integrity sha512-/8INDn0YLInbe9Wt7dK4cXLDYp0fNHP5xKLHvZl3mOT5X17rK/YShXaiNmorl+/U4VKCVIjJnx4Ri5b0y+HClw== dependencies: - "@typescript-eslint/types" "7.6.0" - "@typescript-eslint/visitor-keys" "7.6.0" + "@typescript-eslint/types" "7.7.0" + "@typescript-eslint/visitor-keys" "7.7.0" "@typescript-eslint/type-utils@6.21.0": version "6.21.0" @@ -709,13 +822,13 @@ debug "^4.3.4" ts-api-utils "^1.0.1" -"@typescript-eslint/type-utils@7.6.0": - version "7.6.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.6.0.tgz#644f75075f379827d25fe0713e252ccd4e4a428c" - integrity sha512-NxAfqAPNLG6LTmy7uZgpK8KcuiS2NZD/HlThPXQRGwz6u7MDBWRVliEEl1Gj6U7++kVJTpehkhZzCJLMK66Scw== +"@typescript-eslint/type-utils@7.7.0": + version "7.7.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.7.0.tgz#36792ff4209a781b058de61631a48df17bdefbc5" + integrity sha512-bOp3ejoRYrhAlnT/bozNQi3nio9tIgv3U5C0mVDdZC7cpcQEDZXvq8inrHYghLVwuNABRqrMW5tzAv88Vy77Sg== dependencies: - "@typescript-eslint/typescript-estree" "7.6.0" - "@typescript-eslint/utils" "7.6.0" + "@typescript-eslint/typescript-estree" "7.7.0" + "@typescript-eslint/utils" "7.7.0" debug "^4.3.4" ts-api-utils "^1.3.0" @@ -729,10 +842,10 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.21.0.tgz#205724c5123a8fef7ecd195075fa6e85bac3436d" integrity sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg== -"@typescript-eslint/types@7.6.0": - version "7.6.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.6.0.tgz#53dba7c30c87e5f10a731054266dd905f1fbae38" - integrity sha512-h02rYQn8J+MureCvHVVzhl69/GAfQGPQZmOMjG1KfCl7o3HtMSlPaPUAPu6lLctXI5ySRGIYk94clD/AUMCUgQ== +"@typescript-eslint/types@7.7.0": + version "7.7.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.7.0.tgz#23af4d24bf9ce15d8d301236e3e3014143604f27" + integrity sha512-G01YPZ1Bd2hn+KPpIbrAhEWOn5lQBrjxkzHkWvP6NucMXFtfXoevK82hzQdpfuQYuhkvFDeQYbzXCjR1z9Z03w== "@typescript-eslint/typescript-estree@5.62.0": version "5.62.0" @@ -761,13 +874,13 @@ semver "^7.5.4" ts-api-utils "^1.0.1" -"@typescript-eslint/typescript-estree@7.6.0": - version "7.6.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.6.0.tgz#112a3775563799fd3f011890ac8322f80830ac17" - integrity sha512-+7Y/GP9VuYibecrCQWSKgl3GvUM5cILRttpWtnAu8GNL9j11e4tbuGZmZjJ8ejnKYyBRb2ddGQ3rEFCq3QjMJw== +"@typescript-eslint/typescript-estree@7.7.0": + version "7.7.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.7.0.tgz#b5dd6383b4c6a852d7b256a37af971e8982be97f" + integrity sha512-8p71HQPE6CbxIBy2kWHqM1KGrC07pk6RJn40n0DSc6bMOBBREZxSDJ+BmRzc8B5OdaMh1ty3mkuWRg4sCFiDQQ== dependencies: - "@typescript-eslint/types" "7.6.0" - "@typescript-eslint/visitor-keys" "7.6.0" + "@typescript-eslint/types" "7.7.0" + "@typescript-eslint/visitor-keys" "7.7.0" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" @@ -788,17 +901,17 @@ "@typescript-eslint/typescript-estree" "6.21.0" semver "^7.5.4" -"@typescript-eslint/utils@7.6.0": - version "7.6.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.6.0.tgz#e400d782280b6f724c8a1204269d984c79202282" - integrity sha512-x54gaSsRRI+Nwz59TXpCsr6harB98qjXYzsRxGqvA5Ue3kQH+FxS7FYU81g/omn22ML2pZJkisy6Q+ElK8pBCA== +"@typescript-eslint/utils@7.7.0": + version "7.7.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.7.0.tgz#3d2b6606a60ac34f3c625facfb3b3ab7e126f58d" + integrity sha512-LKGAXMPQs8U/zMRFXDZOzmMKgFv3COlxUQ+2NMPhbqgVm6R1w+nU1i4836Pmxu9jZAuIeyySNrN/6Rc657ggig== dependencies: "@eslint-community/eslint-utils" "^4.4.0" "@types/json-schema" "^7.0.15" "@types/semver" "^7.5.8" - "@typescript-eslint/scope-manager" "7.6.0" - "@typescript-eslint/types" "7.6.0" - "@typescript-eslint/typescript-estree" "7.6.0" + "@typescript-eslint/scope-manager" "7.7.0" + "@typescript-eslint/types" "7.7.0" + "@typescript-eslint/typescript-estree" "7.7.0" semver "^7.6.0" "@typescript-eslint/utils@^5.10.0": @@ -831,12 +944,12 @@ "@typescript-eslint/types" "6.21.0" eslint-visitor-keys "^3.4.1" -"@typescript-eslint/visitor-keys@7.6.0": - version "7.6.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.6.0.tgz#d1ce13145844379021e1f9bd102c1d78946f4e76" - integrity sha512-4eLB7t+LlNUmXzfOu1VAIAdkjbu5xNSerURS9X/S5TUKWFRpXRQZbmtPqgKmYx8bj3J0irtQXSiWAOY82v+cgw== +"@typescript-eslint/visitor-keys@7.7.0": + version "7.7.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.7.0.tgz#950148cf1ac11562a2d903fdf7acf76714a2dc9e" + integrity sha512-h0WHOj8MhdhY8YWkzIF30R379y0NqyOHExI9N9KCzvmu05EgG4FumeYa3ccfKUSphyWkWQE1ybVrgz/Pbam6YA== dependencies: - "@typescript-eslint/types" "7.6.0" + "@typescript-eslint/types" "7.7.0" eslint-visitor-keys "^3.4.3" "@ungap/structured-clone@^1.2.0": @@ -854,11 +967,12 @@ jszip "^3.10.1" semver "^7.5.2" -"@vscode/vsce@^2.24.0", "@vscode/vsce@^2.25.0": - version "2.25.0" - resolved "https://registry.yarnpkg.com/@vscode/vsce/-/vsce-2.25.0.tgz#93421c1cfdf0c73ecf273698951ca0dc09bf6f37" - integrity sha512-VXMCGUaP6wKBadA7vFQdsksxkBAMoh4ecZgXBwauZMASAgnwYesHyLnqIyWYeRwjy2uEpitHvz/1w5ENnR30pg== +"@vscode/vsce@^2.25.0", "@vscode/vsce@^2.26.0": + version "2.26.0" + resolved "https://registry.yarnpkg.com/@vscode/vsce/-/vsce-2.26.0.tgz#104b4f6f0b2d8af89a2b90880d91846370bf6208" + integrity sha512-v54ltgMzUG8lGY0kAgaOlry57xse1RlWzes9FotfGEx+Fr05KeR8rZicQzEMDmi9QnOgVWHuiEq+xA2HWkAz+Q== dependencies: + "@azure/identity" "^4.1.0" azure-devops-node-api "^12.5.0" chalk "^2.4.2" cheerio "^1.0.0-rc.9" @@ -901,6 +1015,13 @@ agent-base@6: 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" + integrity sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA== + dependencies: + debug "^4.3.4" + ajv@^6.12.4: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" @@ -1171,6 +1292,11 @@ buffer-crc32@~0.2.3: resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" integrity sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ== +buffer-equal-constant-time@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" + integrity sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA== + buffer@^5.5.0: version "5.7.1" resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" @@ -1473,6 +1599,11 @@ define-data-property@^1.0.1, define-data-property@^1.1.2, define-data-property@^ es-errors "^1.3.0" gopd "^1.0.1" +define-lazy-prop@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f" + integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og== + define-properties@^1.1.3, define-properties@^1.2.0, define-properties@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.1.tgz#10781cc616eb951a80a034bafcaa7377f6af2b6c" @@ -1571,6 +1702,13 @@ eastasianwidth@^0.2.0: resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== +ecdsa-sig-formatter@1.0.11: + version "1.0.11" + resolved "https://registry.yarnpkg.com/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz#ae0f0fa2d85045ef14a817daa3ce9acd0489e5bf" + integrity sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ== + dependencies: + safe-buffer "^5.0.1" + electron-to-chromium@^1.4.668: version "1.4.681" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.681.tgz#5f23fad8aa7e1f64cbb7dd9d15c7e39a1cd7e6e3" @@ -2054,6 +2192,11 @@ esutils@^2.0.2: resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== +events@^3.0.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" + integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== + expand-template@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/expand-template/-/expand-template-2.0.3.tgz#6e14b3fcee0f3a6340ecb57d2e8918692052a47c" @@ -2447,6 +2590,14 @@ http-proxy-agent@^4.0.1: agent-base "6" debug "4" +http-proxy-agent@^7.0.0: + 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== + dependencies: + 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" @@ -2455,6 +2606,14 @@ https-proxy-agent@^5.0.0: agent-base "6" debug "4" +https-proxy-agent@^7.0.0: + 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== + dependencies: + agent-base "^7.0.2" + debug "4" + ieee754@^1.1.13: version "1.2.1" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" @@ -2573,6 +2732,11 @@ is-date-object@^1.0.1, is-date-object@^1.0.5: dependencies: has-tostringtag "^1.0.0" +is-docker@^2.0.0, is-docker@^2.1.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" + integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== + is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" @@ -2702,6 +2866,13 @@ is-weakset@^2.0.1: call-bind "^1.0.2" get-intrinsic "^1.1.1" +is-wsl@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" + integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== + dependencies: + is-docker "^2.0.0" + isarray@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" @@ -2786,6 +2957,22 @@ jsonc-parser@^3.2.0: resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.1.tgz#031904571ccf929d7670ee8c547545081cb37f1a" integrity sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA== +jsonwebtoken@^9.0.0: + version "9.0.2" + resolved "https://registry.yarnpkg.com/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz#65ff91f4abef1784697d40952bb1998c504caaf3" + integrity sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ== + dependencies: + jws "^3.2.2" + lodash.includes "^4.3.0" + lodash.isboolean "^3.0.3" + lodash.isinteger "^4.0.4" + lodash.isnumber "^3.0.3" + lodash.isplainobject "^4.0.6" + lodash.isstring "^4.0.1" + lodash.once "^4.0.0" + ms "^2.1.1" + semver "^7.5.4" + "jsx-ast-utils@^2.4.1 || ^3.0.0", jsx-ast-utils@^3.2.1, jsx-ast-utils@^3.3.5: version "3.3.5" resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz#4766bd05a8e2a11af222becd19e15575e52a853a" @@ -2811,6 +2998,40 @@ just-extend@^6.2.0: resolved "https://registry.yarnpkg.com/just-extend/-/just-extend-6.2.0.tgz#b816abfb3d67ee860482e7401564672558163947" integrity sha512-cYofQu2Xpom82S6qD778jBDpwvvy39s1l/hrYij2u9AMdQcGRpaBu6kY4mVhuno5kJVi1DAz4aiphA2WI1/OAw== +jwa@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.4.1.tgz#743c32985cb9e98655530d53641b66c8645b039a" + integrity sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA== + dependencies: + buffer-equal-constant-time "1.0.1" + ecdsa-sig-formatter "1.0.11" + safe-buffer "^5.0.1" + +jwa@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/jwa/-/jwa-2.0.0.tgz#a7e9c3f29dae94027ebcaf49975c9345593410fc" + integrity sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA== + dependencies: + buffer-equal-constant-time "1.0.1" + ecdsa-sig-formatter "1.0.11" + safe-buffer "^5.0.1" + +jws@^3.2.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/jws/-/jws-3.2.2.tgz#001099f3639468c9414000e99995fa52fb478304" + integrity sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA== + dependencies: + jwa "^1.4.1" + safe-buffer "^5.0.1" + +jws@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jws/-/jws-4.0.0.tgz#2d4e8cf6a318ffaa12615e9dec7e86e6c97310f4" + integrity sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg== + dependencies: + jwa "^2.0.0" + safe-buffer "^5.0.1" + keytar@^7.7.0: version "7.9.0" resolved "https://registry.yarnpkg.com/keytar/-/keytar-7.9.0.tgz#4c6225708f51b50cbf77c5aae81721964c2918cb" @@ -2877,11 +3098,46 @@ lodash.get@^4.4.2: resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" integrity sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ== +lodash.includes@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/lodash.includes/-/lodash.includes-4.3.0.tgz#60bb98a87cb923c68ca1e51325483314849f553f" + integrity sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w== + +lodash.isboolean@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz#6c2e171db2a257cd96802fd43b01b20d5f5870f6" + integrity sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg== + +lodash.isinteger@^4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz#619c0af3d03f8b04c31f5882840b77b11cd68343" + integrity sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA== + +lodash.isnumber@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz#3ce76810c5928d03352301ac287317f11c0b1ffc" + integrity sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw== + +lodash.isplainobject@^4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" + integrity sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA== + +lodash.isstring@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451" + integrity sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw== + lodash.merge@^4.6.2: version "4.6.2" resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== +lodash.once@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac" + integrity sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg== + log-symbols@4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" @@ -3215,6 +3471,15 @@ once@^1.3.0, once@^1.3.1, once@^1.4.0: dependencies: wrappy "1" +open@^8.0.0: + version "8.4.2" + resolved "https://registry.yarnpkg.com/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9" + integrity sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ== + dependencies: + define-lazy-prop "^2.0.0" + is-docker "^2.1.1" + is-wsl "^2.2.0" + optionator@^0.9.3: version "0.9.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.3.tgz#007397d44ed1872fdc6ed31360190f81814e2c64" @@ -3227,12 +3492,12 @@ optionator@^0.9.3: prelude-ls "^1.2.1" type-check "^0.4.0" -ovsx@^0.9.0: - version "0.9.0" - resolved "https://registry.yarnpkg.com/ovsx/-/ovsx-0.9.0.tgz#cca8ccd8659d5e678a7718dcabdad8d9e794aa70" - integrity sha512-4dWT/lU/WaLWy0iSL4yOMDZZEWEjESqDxrcqxHpOzJoq40DimogsIuHi9bIAAwBYYn2e9CJcf8gDIblEPpQLKA== +ovsx@^0.9.1: + version "0.9.1" + resolved "https://registry.yarnpkg.com/ovsx/-/ovsx-0.9.1.tgz#dfd2f0d760a911247703d196ce00d4a156966ddc" + integrity sha512-faORiHeVdRFXVjvwjGvsGdfw49ocUZwUvjrrObZDzhlkKkrUS8L2afeXF8goeuv1YbTV8lmFfBYAt0C4FaoVuQ== dependencies: - "@vscode/vsce" "^2.24.0" + "@vscode/vsce" "^2.25.0" commander "^6.1.0" follow-redirects "^1.14.6" is-ci "^2.0.0" @@ -3759,8 +4024,21 @@ snake-case@^3.0.4: dot-case "^3.0.4" tslib "^2.0.3" -"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0: - name string-width-cjs +stoppable@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/stoppable/-/stoppable-1.1.0.tgz#32da568e83ea488b08e4d7ea2c3bcc9d75015d5b" + integrity sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw== + +"string-width-cjs@npm:string-width@^4.2.0": + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string-width@^4.1.0, string-width@^4.2.0: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -3834,7 +4112,14 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -3967,7 +4252,7 @@ tslib@^1.8.1: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.0.3, tslib@^2.6.2: +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== @@ -4130,6 +4415,11 @@ util-deprecate@^1.0.1, util-deprecate@~1.0.1: resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== +uuid@^8.3.0: + version "8.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" + integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== + vscode-jsonrpc@8.2.0: version "8.2.0" resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz#f43dfa35fb51e763d17cd94dcca0c9458f35abf9" @@ -4234,8 +4524,16 @@ workerpool@6.2.1: resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343" integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: - name wrap-ansi-cjs +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== From 558cba7050a44479218307c712fce14f5e9485dd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Apr 2024 02:46:33 +0000 Subject: [PATCH 027/189] Bump the minor-and-patch group with 3 updates Bumps the minor-and-patch group with 3 updates: [sorbet-static-and-runtime](https://github.com/sorbet/sorbet), [tapioca](https://github.com/Shopify/tapioca) and [sorbet-runtime](https://github.com/sorbet/sorbet). Updates `sorbet-static-and-runtime` from 0.5.11346 to 0.5.11352 - [Release notes](https://github.com/sorbet/sorbet/releases) - [Commits](https://github.com/sorbet/sorbet/commits) Updates `tapioca` from 0.13.2 to 0.13.3 - [Release notes](https://github.com/Shopify/tapioca/releases) - [Commits](https://github.com/Shopify/tapioca/compare/v0.13.2...v0.13.3) Updates `sorbet-runtime` from 0.5.11346 to 0.5.11352 - [Release notes](https://github.com/sorbet/sorbet/releases) - [Commits](https://github.com/sorbet/sorbet/commits) --- updated-dependencies: - dependency-name: sorbet-static-and-runtime dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: tapioca dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: sorbet-runtime dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 3d6804f9e3..7c3315a1aa 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -51,8 +51,8 @@ GEM racc (1.7.3) rainbow (3.1.1) rake (13.2.1) - rbi (0.1.10) - prism (>= 0.18.0, < 0.25) + rbi (0.1.11) + prism (>= 0.18.0, < 0.27) sorbet-runtime (>= 0.5.9204) regexp_parser (2.9.0) reline (0.5.0) @@ -88,14 +88,14 @@ GEM simplecov_json_formatter (~> 0.1) simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) - sorbet (0.5.11346) - sorbet-static (= 0.5.11346) - sorbet-runtime (0.5.11346) - sorbet-static (0.5.11346-universal-darwin) - sorbet-static (0.5.11346-x86_64-linux) - sorbet-static-and-runtime (0.5.11346) - sorbet (= 0.5.11346) - sorbet-runtime (= 0.5.11346) + sorbet (0.5.11352) + sorbet-static (= 0.5.11352) + sorbet-runtime (0.5.11352) + sorbet-static (0.5.11352-universal-darwin) + sorbet-static (0.5.11352-x86_64-linux) + sorbet-static-and-runtime (0.5.11352) + sorbet (= 0.5.11352) + sorbet-runtime (= 0.5.11352) spoom (1.3.0) erubi (>= 1.10.0) prism (>= 0.19.0) @@ -104,7 +104,7 @@ GEM stringio (3.1.0) syntax_tree (6.2.0) prettier_print (>= 1.2.0) - tapioca (0.13.2) + tapioca (0.13.3) bundler (>= 2.2.25) netrc (>= 0.11.0) parallel (>= 1.21.0) @@ -122,8 +122,6 @@ GEM PLATFORMS arm64-darwin - x64-mingw-ucrt - x64-mingw32 x86_64-darwin x86_64-linux From ee5769049d9916c1f4489bae5cad6c856a752a83 Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 22 Apr 2024 02:47:36 +0000 Subject: [PATCH 028/189] Update RBI files for gems 2024-04-22 [dependabot skip] --- .../gems/{json@2.7.1.rbi => json@2.7.2.rbi} | 144 +-- .../gems/{mocha@2.1.0.rbi => mocha@2.2.0.rbi} | 262 +++--- .../gems/{rbi@0.1.9.rbi => rbi@0.1.11.rbi} | 373 ++++---- ...bet@0.8.0.rbi => rubocop-sorbet@0.8.1.rbi} | 69 +- ...{rubocop@1.62.1.rbi => rubocop@1.63.2.rbi} | 819 +++++++++++------- ...{tapioca@0.13.1.rbi => tapioca@0.13.3.rbi} | 56 +- 6 files changed, 1036 insertions(+), 687 deletions(-) rename sorbet/rbi/gems/{json@2.7.1.rbi => json@2.7.2.rbi} (94%) rename sorbet/rbi/gems/{mocha@2.1.0.rbi => mocha@2.2.0.rbi} (95%) rename sorbet/rbi/gems/{rbi@0.1.9.rbi => rbi@0.1.11.rbi} (90%) rename sorbet/rbi/gems/{rubocop-sorbet@0.8.0.rbi => rubocop-sorbet@0.8.1.rbi} (97%) rename sorbet/rbi/gems/{rubocop@1.62.1.rbi => rubocop@1.63.2.rbi} (98%) rename sorbet/rbi/gems/{tapioca@0.13.1.rbi => tapioca@0.13.3.rbi} (98%) diff --git a/sorbet/rbi/gems/json@2.7.1.rbi b/sorbet/rbi/gems/json@2.7.2.rbi similarity index 94% rename from sorbet/rbi/gems/json@2.7.1.rbi rename to sorbet/rbi/gems/json@2.7.2.rbi index e22ce040e1..3ef0f88c77 100644 --- a/sorbet/rbi/gems/json@2.7.1.rbi +++ b/sorbet/rbi/gems/json@2.7.2.rbi @@ -6,7 +6,7 @@ # Extends any Class to include _json_creatable?_ method. # -# source://json//lib/json/common.rb#689 +# source://json//lib/json/common.rb#690 class Class < ::Module # Returns true if this class can be used to create an instance # from a serialised JSON string. The class has to implement a class @@ -15,7 +15,7 @@ class Class < ::Module # # @return [Boolean] # - # source://json//lib/json/common.rb#694 + # source://json//lib/json/common.rb#695 def json_creatable?; end end @@ -630,7 +630,7 @@ module JSON # Output: # {"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"} # - # source://json//lib/json/common.rb#614 + # source://json//lib/json/common.rb#615 def dump(obj, anIO = T.unsafe(nil), limit = T.unsafe(nil), kwargs = T.unsafe(nil)); end # :call-seq: @@ -647,13 +647,13 @@ module JSON # # Raises SystemStackError (stack level too deep): # JSON.fast_generate(a) # - # source://json//lib/json/common.rb#328 + # source://json//lib/json/common.rb#329 def fast_generate(obj, opts = T.unsafe(nil)); end # :stopdoc: # I want to deprecate these later, so I'll first be silent about them, and later delete them. # - # source://json//lib/json/common.rb#328 + # source://json//lib/json/common.rb#329 def fast_unparse(obj, opts = T.unsafe(nil)); end # :call-seq: @@ -692,7 +692,7 @@ module JSON # # Raises JSON::NestingError (nesting of 100 is too deep): # JSON.generate(a) # - # source://json//lib/json/common.rb#299 + # source://json//lib/json/common.rb#300 def generate(obj, opts = T.unsafe(nil)); end # :call-seq: @@ -823,7 +823,7 @@ module JSON # #"Admin", "password"=>"0wn3d"}>} # - # source://json//lib/json/common.rb#540 + # source://json//lib/json/common.rb#541 def load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end # :call-seq: @@ -834,7 +834,7 @@ module JSON # # See method #parse. # - # source://json//lib/json/common.rb#248 + # source://json//lib/json/common.rb#249 def load_file(filespec, opts = T.unsafe(nil)); end # :call-seq: @@ -845,10 +845,10 @@ module JSON # # See method #parse! # - # source://json//lib/json/common.rb#259 + # source://json//lib/json/common.rb#260 def load_file!(filespec, opts = T.unsafe(nil)); end - # source://json//lib/json/common.rb#642 + # source://json//lib/json/common.rb#643 def merge_dump_options(opts, strict: T.unsafe(nil)); end # :call-seq: @@ -899,7 +899,7 @@ module JSON # # Raises JSON::ParserError (783: unexpected token at ''): # JSON.parse('') # - # source://json//lib/json/common.rb#218 + # source://json//lib/json/common.rb#219 def parse(source, opts = T.unsafe(nil)); end # :call-seq: @@ -914,7 +914,7 @@ module JSON # which disables checking for nesting depth. # - Option +allow_nan+, if not provided, defaults to +true+. # - # source://json//lib/json/common.rb#233 + # source://json//lib/json/common.rb#234 def parse!(source, opts = T.unsafe(nil)); end # :call-seq: @@ -947,28 +947,28 @@ module JSON # } # } # - # source://json//lib/json/common.rb#373 + # source://json//lib/json/common.rb#374 def pretty_generate(obj, opts = T.unsafe(nil)); end # :stopdoc: # I want to deprecate these later, so I'll first be silent about them, and later delete them. # - # source://json//lib/json/common.rb#373 + # source://json//lib/json/common.rb#374 def pretty_unparse(obj, opts = T.unsafe(nil)); end # Recursively calls passed _Proc_ if the parsed data structure is an _Array_ or _Hash_ # - # source://json//lib/json/common.rb#558 + # source://json//lib/json/common.rb#559 def recurse_proc(result, &proc); end - # source://json//lib/json/common.rb#540 + # source://json//lib/json/common.rb#541 def restore(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end # :stopdoc: # I want to deprecate these later, so I'll first be silent about them, and # later delete them. # - # source://json//lib/json/common.rb#299 + # source://json//lib/json/common.rb#300 def unparse(obj, opts = T.unsafe(nil)); end class << self @@ -984,26 +984,26 @@ module JSON # ruby = [0, 1, nil] # JSON[ruby] # => '[0,1,null]' # - # source://json//lib/json/common.rb#21 + # source://json//lib/json/common.rb#22 def [](object, opts = T.unsafe(nil)); end - # source://json//lib/json/common.rb#84 + # source://json//lib/json/common.rb#85 def create_fast_state; end # Returns the current create identifier. # See also JSON.create_id=. # - # source://json//lib/json/common.rb#129 + # source://json//lib/json/common.rb#130 def create_id; end # Sets create identifier, which is used to decide if the _json_create_ # hook of a class should be called; initial value is +json_class+: # JSON.create_id # => 'json_class' # - # source://json//lib/json/common.rb#123 + # source://json//lib/json/common.rb#124 def create_id=(new_value); end - # source://json//lib/json/common.rb#94 + # source://json//lib/json/common.rb#95 def create_pretty_state; end # Return the constant located at _path_. The format of _path_ has to be @@ -1011,7 +1011,7 @@ module JSON # level (absolute namespace path?). If there doesn't exist a constant at # the given path, an ArgumentError is raised. # - # source://json//lib/json/common.rb#45 + # source://json//lib/json/common.rb#46 def deep_const_get(path); end # :call-seq: @@ -1042,7 +1042,7 @@ module JSON # Output: # {"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"} # - # source://json//lib/json/common.rb#614 + # source://json//lib/json/common.rb#615 def dump(obj, anIO = T.unsafe(nil), limit = T.unsafe(nil), kwargs = T.unsafe(nil)); end # Sets or returns the default options for the JSON.dump method. @@ -1050,7 +1050,7 @@ module JSON # opts = JSON.dump_default_options # opts # => {:max_nesting=>false, :allow_nan=>true, :script_safe=>false} # - # source://json//lib/json/common.rb#579 + # source://json//lib/json/common.rb#580 def dump_default_options; end # Sets or returns the default options for the JSON.dump method. @@ -1058,7 +1058,7 @@ module JSON # opts = JSON.dump_default_options # opts # => {:max_nesting=>false, :allow_nan=>true, :script_safe=>false} # - # source://json//lib/json/common.rb#579 + # source://json//lib/json/common.rb#580 def dump_default_options=(_arg0); end # :call-seq: @@ -1075,13 +1075,13 @@ module JSON # # Raises SystemStackError (stack level too deep): # JSON.fast_generate(a) # - # source://json//lib/json/common.rb#328 + # source://json//lib/json/common.rb#329 def fast_generate(obj, opts = T.unsafe(nil)); end # :stopdoc: # I want to deprecate these later, so I'll first be silent about them, and later delete them. # - # source://json//lib/json/common.rb#328 + # source://json//lib/json/common.rb#329 def fast_unparse(obj, opts = T.unsafe(nil)); end # :call-seq: @@ -1120,24 +1120,24 @@ module JSON # # Raises JSON::NestingError (nesting of 100 is too deep): # JSON.generate(a) # - # source://json//lib/json/common.rb#299 + # source://json//lib/json/common.rb#300 def generate(obj, opts = T.unsafe(nil)); end # Returns the JSON generator module that is used by JSON. This is # either JSON::Ext::Generator or JSON::Pure::Generator: # JSON.generator # => JSON::Ext::Generator # - # source://json//lib/json/common.rb#106 + # source://json//lib/json/common.rb#107 def generator; end # Set the module _generator_ to be used by JSON. # - # source://json//lib/json/common.rb#61 + # source://json//lib/json/common.rb#62 def generator=(generator); end # Encodes string using String.encode. # - # source://json//lib/json/common.rb#638 + # source://json//lib/json/common.rb#639 def iconv(to, from, string); end # :call-seq: @@ -1268,7 +1268,7 @@ module JSON # #"Admin", "password"=>"0wn3d"}>} # - # source://json//lib/json/common.rb#540 + # source://json//lib/json/common.rb#541 def load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end # Sets or returns default options for the JSON.load method. @@ -1276,7 +1276,7 @@ module JSON # opts = JSON.load_default_options # opts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true} # - # source://json//lib/json/common.rb#403 + # source://json//lib/json/common.rb#404 def load_default_options; end # Sets or returns default options for the JSON.load method. @@ -1284,7 +1284,7 @@ module JSON # opts = JSON.load_default_options # opts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true} # - # source://json//lib/json/common.rb#403 + # source://json//lib/json/common.rb#404 def load_default_options=(_arg0); end # :call-seq: @@ -1295,7 +1295,7 @@ module JSON # # See method #parse. # - # source://json//lib/json/common.rb#248 + # source://json//lib/json/common.rb#249 def load_file(filespec, opts = T.unsafe(nil)); end # :call-seq: @@ -1306,7 +1306,7 @@ module JSON # # See method #parse! # - # source://json//lib/json/common.rb#259 + # source://json//lib/json/common.rb#260 def load_file!(filespec, opts = T.unsafe(nil)); end # :call-seq: @@ -1357,7 +1357,7 @@ module JSON # # Raises JSON::ParserError (783: unexpected token at ''): # JSON.parse('') # - # source://json//lib/json/common.rb#218 + # source://json//lib/json/common.rb#219 def parse(source, opts = T.unsafe(nil)); end # :call-seq: @@ -1372,19 +1372,19 @@ module JSON # which disables checking for nesting depth. # - Option +allow_nan+, if not provided, defaults to +true+. # - # source://json//lib/json/common.rb#233 + # source://json//lib/json/common.rb#234 def parse!(source, opts = T.unsafe(nil)); end # Returns the JSON parser class that is used by JSON. This is either # JSON::Ext::Parser or JSON::Pure::Parser: # JSON.parser # => JSON::Ext::Parser # - # source://json//lib/json/common.rb#32 + # source://json//lib/json/common.rb#33 def parser; end # Set the JSON parser class _parser_ to be used by JSON. # - # source://json//lib/json/common.rb#35 + # source://json//lib/json/common.rb#36 def parser=(parser); end # :call-seq: @@ -1417,123 +1417,123 @@ module JSON # } # } # - # source://json//lib/json/common.rb#373 + # source://json//lib/json/common.rb#374 def pretty_generate(obj, opts = T.unsafe(nil)); end # :stopdoc: # I want to deprecate these later, so I'll first be silent about them, and later delete them. # - # source://json//lib/json/common.rb#373 + # source://json//lib/json/common.rb#374 def pretty_unparse(obj, opts = T.unsafe(nil)); end # Recursively calls passed _Proc_ if the parsed data structure is an _Array_ or _Hash_ # - # source://json//lib/json/common.rb#558 + # source://json//lib/json/common.rb#559 def recurse_proc(result, &proc); end - # source://json//lib/json/common.rb#540 + # source://json//lib/json/common.rb#541 def restore(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end # Sets or Returns the JSON generator state class that is used by JSON. This is # either JSON::Ext::Generator::State or JSON::Pure::Generator::State: # JSON.state # => JSON::Ext::Generator::State # - # source://json//lib/json/common.rb#111 + # source://json//lib/json/common.rb#112 def state; end # Sets or Returns the JSON generator state class that is used by JSON. This is # either JSON::Ext::Generator::State or JSON::Pure::Generator::State: # JSON.state # => JSON::Ext::Generator::State # - # source://json//lib/json/common.rb#111 + # source://json//lib/json/common.rb#112 def state=(_arg0); end # :stopdoc: # I want to deprecate these later, so I'll first be silent about them, and # later delete them. # - # source://json//lib/json/common.rb#299 + # source://json//lib/json/common.rb#300 def unparse(obj, opts = T.unsafe(nil)); end private - # source://json//lib/json/common.rb#642 + # source://json//lib/json/common.rb#643 def merge_dump_options(opts, strict: T.unsafe(nil)); end end end -# source://json//lib/json/common.rb#117 +# source://json//lib/json/common.rb#118 JSON::CREATE_ID_TLS_KEY = T.let(T.unsafe(nil), String) -# source://json//lib/json/common.rb#114 +# source://json//lib/json/common.rb#115 JSON::DEFAULT_CREATE_ID = T.let(T.unsafe(nil), String) -# source://json//lib/json/generic_object.rb#5 +# source://json//lib/json/generic_object.rb#9 class JSON::GenericObject < ::OpenStruct - # source://json//lib/json/generic_object.rb#63 + # source://json//lib/json/generic_object.rb#67 def as_json(*_arg0); end - # source://json//lib/json/generic_object.rb#47 + # source://json//lib/json/generic_object.rb#51 def to_hash; end - # source://json//lib/json/generic_object.rb#67 + # source://json//lib/json/generic_object.rb#71 def to_json(*a); end - # source://json//lib/json/generic_object.rb#59 + # source://json//lib/json/generic_object.rb#63 def |(other); end class << self - # source://json//lib/json/generic_object.rb#41 + # source://json//lib/json/generic_object.rb#45 def dump(obj, *args); end - # source://json//lib/json/generic_object.rb#21 + # source://json//lib/json/generic_object.rb#25 def from_hash(object); end # Sets the attribute json_creatable # # @param value the value to set the attribute json_creatable to. # - # source://json//lib/json/generic_object.rb#13 + # source://json//lib/json/generic_object.rb#17 def json_creatable=(_arg0); end # @return [Boolean] # - # source://json//lib/json/generic_object.rb#9 + # source://json//lib/json/generic_object.rb#13 def json_creatable?; end - # source://json//lib/json/generic_object.rb#15 + # source://json//lib/json/generic_object.rb#19 def json_create(data); end - # source://json//lib/json/generic_object.rb#36 + # source://json//lib/json/generic_object.rb#40 def load(source, proc = T.unsafe(nil), opts = T.unsafe(nil)); end end end # The base exception for JSON errors. # -# source://json//lib/json/common.rb#140 +# source://json//lib/json/common.rb#141 class JSON::JSONError < ::StandardError class << self - # source://json//lib/json/common.rb#141 + # source://json//lib/json/common.rb#142 def wrap(exception); end end end -# source://json//lib/json/common.rb#6 +# source://json//lib/json/common.rb#7 JSON::NOT_SET = T.let(T.unsafe(nil), Object) -# source://json//lib/json/common.rb#38 +# source://json//lib/json/common.rb#39 JSON::Parser = JSON::Ext::Parser -# source://json//lib/json/common.rb#76 +# source://json//lib/json/common.rb#77 JSON::State = JSON::Ext::Generator::State # For backwards compatibility # -# source://json//lib/json/common.rb#162 +# source://json//lib/json/common.rb#163 JSON::UnparserError = JSON::GeneratorError -# source://json//lib/json/common.rb#652 +# source://json//lib/json/common.rb#653 module Kernel private @@ -1544,18 +1544,18 @@ module Kernel # The _opts_ argument is passed through to generate/parse respectively. See # generate and parse for their documentation. # - # source://json//lib/json/common.rb#679 + # source://json//lib/json/common.rb#680 def JSON(object, *args); end # Outputs _objs_ to STDOUT as JSON strings in the shortest form, that is in # one line. # - # source://json//lib/json/common.rb#657 + # source://json//lib/json/common.rb#658 def j(*objs); end # Outputs _objs_ to STDOUT as JSON strings in a pretty format, with # indentation and over many lines. # - # source://json//lib/json/common.rb#666 + # source://json//lib/json/common.rb#667 def jj(*objs); end end diff --git a/sorbet/rbi/gems/mocha@2.1.0.rbi b/sorbet/rbi/gems/mocha@2.2.0.rbi similarity index 95% rename from sorbet/rbi/gems/mocha@2.1.0.rbi rename to sorbet/rbi/gems/mocha@2.2.0.rbi index 702e0fc361..513b1ce565 100644 --- a/sorbet/rbi/gems/mocha@2.1.0.rbi +++ b/sorbet/rbi/gems/mocha@2.2.0.rbi @@ -37,7 +37,7 @@ class Minitest::Test < ::Minitest::Runnable include ::Mocha::ParameterMatchers include ::Mocha::Hooks include ::Mocha::API - include ::Mocha::Integration::MiniTest::Adapter + include ::Mocha::Integration::Minitest::Adapter end # source://mocha//lib/mocha/version.rb#1 @@ -66,7 +66,7 @@ module Mocha end end -# Methods added to +Test::Unit::TestCase+, +MiniTest::Unit::TestCase+ or equivalent. +# Methods added to +Test::Unit::TestCase+, +Minitest::Unit::TestCase+ or equivalent. # The mock creation methods are {#mock}, {#stub} and {#stub_everything}, all of which return a #{Mock} # which can be further modified by {Mock#responds_like} and {Mock#responds_like_instance_of} methods, # both of which return a {Mock}, too, and can therefore, be chained to the original creation methods. @@ -100,7 +100,7 @@ module Mocha::API # # @example Using expected_methods_vs_return_values Hash to setup expectations. # def test_motor_starts_and_stops - # motor = mock('motor', :start => true, :stop => true) + # motor = mock('motor', start: true, stop: true) # assert motor.start # assert motor.stop # # an error will be raised unless both Motor#start and Motor#stop have been called @@ -115,7 +115,8 @@ module Mocha::API # Builds a new sequence which can be used to constrain the order in which expectations can occur. # - # Specify that an expected invocation must occur within a named {Sequence} by using {Expectation#in_sequence}. + # Specify that an expected invocation must occur within a named {Sequence} by calling {Expectation#in_sequence} + # on each expectation or by passing a block within which all expectations should be constrained by the {Sequence}. # # @example Ensure methods on egg are invoked in correct order. # breakfast = sequence('breakfast') @@ -135,10 +136,19 @@ module Mocha::API # # task_one.execute # task_two.execute + # @example Ensure methods on egg are invoked in the correct order using a block. + # egg = mock('egg') + # sequence('breakfast') do + # egg.expects(:crack) + # egg.expects(:fry) + # egg.expects(:eat) + # end + # @param name [String] name of sequence # @return [Sequence] a new sequence # @see Expectation#in_sequence + # @yield optional block within which expectations should be constrained by the sequence # - # source://mocha//lib/mocha/api.rb#159 + # source://mocha//lib/mocha/api.rb#170 def sequence(name); end # Builds a new state machine which can be used to constrain the order in which expectations can occur. @@ -161,19 +171,20 @@ module Mocha::API # radio.expects(:select_channel).with('BBC World Service').when(power.is('on')) # radio.expects(:adjust_volume).with(-5).when(power.is('on')) # radio.expects(:switch_off).then(power.is('off')) + # @param name [String] name of state machine # @return [StateMachine] a new state machine # @see Expectation#then # @see Expectation#when # @see StateMachine # - # source://mocha//lib/mocha/api.rb#188 + # source://mocha//lib/mocha/api.rb#207 def states(name); end # Builds a new mock object # # @example Using stubbed_methods_vs_return_values Hash to setup stubbed methods. # def test_motor_starts_and_stops - # motor = stub('motor', :start => true, :stop => true) + # motor = stub('motor', start: true, stop: true) # assert motor.start # assert motor.stop # # an error will not be raised even if either Motor#start or Motor#stop has not been called @@ -190,7 +201,7 @@ module Mocha::API # # @example Ignore invocations of irrelevant methods. # def test_motor_stops - # motor = stub_everything('motor', :stop => true) + # motor = stub_everything('motor', stop: true) # assert_nil motor.irrelevant_method_1 # => no error raised # assert_nil motor.irrelevant_method_2 # => no error raised # assert motor.stop @@ -873,16 +884,16 @@ class Mocha::Deprecation end end -# source://mocha//lib/mocha/detection/mini_test.rb#2 +# source://mocha//lib/mocha/detection/minitest.rb#2 module Mocha::Detection; end -# source://mocha//lib/mocha/detection/mini_test.rb#3 -module Mocha::Detection::MiniTest +# source://mocha//lib/mocha/detection/minitest.rb#3 +module Mocha::Detection::Minitest class << self - # source://mocha//lib/mocha/detection/mini_test.rb#4 + # source://mocha//lib/mocha/detection/minitest.rb#4 def testcase; end - # source://mocha//lib/mocha/detection/mini_test.rb#12 + # source://mocha//lib/mocha/detection/minitest.rb#12 def version; end end end @@ -1010,7 +1021,7 @@ class Mocha::Expectation # @private # - # source://mocha//lib/mocha/expectation.rb#698 + # source://mocha//lib/mocha/expectation.rb#704 def definition_location; end # @private @@ -1046,40 +1057,40 @@ class Mocha::Expectation # @private # - # source://mocha//lib/mocha/expectation.rb#674 + # source://mocha//lib/mocha/expectation.rb#680 def inspect; end # @private # @return [Boolean] # - # source://mocha//lib/mocha/expectation.rb#646 + # source://mocha//lib/mocha/expectation.rb#652 def invocations_allowed?; end # @private # - # source://mocha//lib/mocha/expectation.rb#656 + # source://mocha//lib/mocha/expectation.rb#662 def invoke(invocation); end # @private # @return [Boolean] # - # source://mocha//lib/mocha/expectation.rb#641 - def match?(invocation); end + # source://mocha//lib/mocha/expectation.rb#646 + def match?(invocation, ignoring_order: T.unsafe(nil)); end # @private # @return [Boolean] # - # source://mocha//lib/mocha/expectation.rb#636 + # source://mocha//lib/mocha/expectation.rb#641 def matches_method?(method_name); end # @private # - # source://mocha//lib/mocha/expectation.rb#691 + # source://mocha//lib/mocha/expectation.rb#697 def method_signature; end # @private # - # source://mocha//lib/mocha/expectation.rb#681 + # source://mocha//lib/mocha/expectation.rb#687 def mocha_inspect; end # Modifies expectation so that when the expected method is called, it yields multiple times per invocation with the specified +parameter_groups+. @@ -1146,6 +1157,11 @@ class Mocha::Expectation # source://mocha//lib/mocha/expectation.rb#97 def once; end + # @private + # + # source://mocha//lib/mocha/expectation.rb#636 + def ordering_constraints_not_allowing_invocation_now; end + # @private # # source://mocha//lib/mocha/expectation.rb#626 @@ -1153,6 +1169,10 @@ class Mocha::Expectation # Modifies expectation so that when the expected method is called, it raises the specified +exception+ with the specified +message+ i.e. calls +Kernel#raise(exception, message)+. # + # @example Raise specified exception if expected method is invoked. + # object = stub() + # object.stubs(:expected_method).raises(Exception, 'message') + # object.expected_method # => raises exception of class Exception and with message 'message' # @example Raise custom exception with extra constructor parameters by passing in an instance of the exception. # object = stub() # object.stubs(:expected_method).raises(MyException.new('message', 1, 2, 3)) @@ -1162,10 +1182,6 @@ class Mocha::Expectation # object.stubs(:expected_method).raises(Exception1).then.raises(Exception2) # object.expected_method # => raises exception of class Exception1 # object.expected_method # => raises exception of class Exception2 - # @example Raise specified exception if expected method is invoked. - # object = stub() - # object.stubs(:expected_method).raises(Exception, 'message') - # object.expected_method # => raises exception of class Exception and with message 'message' # @example Raise an exception on first invocation of expected method and then return values on subsequent invocations. # object = stub() # object.stubs(:expected_method).raises(Exception).then.returns(2, 3) @@ -1225,7 +1241,7 @@ class Mocha::Expectation # @private # @return [Boolean] # - # source://mocha//lib/mocha/expectation.rb#651 + # source://mocha//lib/mocha/expectation.rb#657 def satisfied?; end # @example Using {#then} as syntactic sugar when specifying values to be returned and exceptions to be raised on consecutive invocations of the expected method. @@ -1254,14 +1270,14 @@ class Mocha::Expectation # Modifies expectation so that when the expected method is called, it throws the specified +tag+ with the specific return value +object+ i.e. calls +Kernel#throw(tag, object)+. # - # @example Throw tag with return value +object+ c.f. +Kernel#throw+. - # object = stub() - # object.stubs(:expected_method).throws(:done, 'result') - # object.expected_method # => throws tag :done and causes catch block to return 'result' # @example Throw tag when expected method is invoked. # object = stub() # object.stubs(:expected_method).throws(:done) # object.expected_method # => throws tag :done + # @example Throw tag with return value +object+ c.f. +Kernel#throw+. + # object = stub() + # object.stubs(:expected_method).throws(:done, 'result') + # object.expected_method # => throws tag :done and causes catch block to return 'result' # @example Throw different tags on consecutive invocations of the expected method. # object = stub() # object.stubs(:expected_method).throws(:done).then.throws(:continue) @@ -1339,13 +1355,13 @@ class Mocha::Expectation # @private # @return [Boolean] # - # source://mocha//lib/mocha/expectation.rb#669 + # source://mocha//lib/mocha/expectation.rb#675 def used?; end # @private # @return [Boolean] # - # source://mocha//lib/mocha/expectation.rb#663 + # source://mocha//lib/mocha/expectation.rb#669 def verified?(assertion_counter = T.unsafe(nil)); end # Constrains the expectation to occur only when the +state_machine+ is in the state specified by +state_predicate+. @@ -1527,9 +1543,9 @@ class Mocha::ExpectationError < ::Exception; end # # This class should only be used by authors of test libraries and not by typical "users" of Mocha. # -# For example, it is used by +Mocha::Integration::MiniTest::Adapter+ in order to have Mocha raise a +MiniTest::Assertion+ which can then be sensibly handled by +MiniTest::Unit::TestCase+. +# For example, it is used by +Mocha::Integration::Minitest::Adapter+ in order to have Mocha raise a +Minitest::Assertion+ which can then be sensibly handled by +Minitest::Unit::TestCase+. # -# @see Mocha::Integration::MiniTest::Adapter +# @see Mocha::Integration::Minitest::Adapter # # source://mocha//lib/mocha/expectation_error_factory.rb#12 class Mocha::ExpectationErrorFactory @@ -1567,7 +1583,7 @@ class Mocha::ExpectationList # source://mocha//lib/mocha/expectation_list.rb#3 def initialize(expectations = T.unsafe(nil)); end - # source://mocha//lib/mocha/expectation_list.rb#48 + # source://mocha//lib/mocha/expectation_list.rb#52 def +(other); end # source://mocha//lib/mocha/expectation_list.rb#7 @@ -1575,18 +1591,21 @@ class Mocha::ExpectationList # @return [Boolean] # - # source://mocha//lib/mocha/expectation_list.rb#44 + # source://mocha//lib/mocha/expectation_list.rb#48 def any?; end - # source://mocha//lib/mocha/expectation_list.rb#40 + # source://mocha//lib/mocha/expectation_list.rb#44 def length; end # source://mocha//lib/mocha/expectation_list.rb#20 - def match(invocation); end + def match(invocation, ignoring_order: T.unsafe(nil)); end - # source://mocha//lib/mocha/expectation_list.rb#24 + # source://mocha//lib/mocha/expectation_list.rb#28 def match_allowing_invocation(invocation); end + # source://mocha//lib/mocha/expectation_list.rb#24 + def match_but_out_of_order(invocation); end + # @return [Boolean] # # source://mocha//lib/mocha/expectation_list.rb#16 @@ -1595,21 +1614,21 @@ class Mocha::ExpectationList # source://mocha//lib/mocha/expectation_list.rb#12 def remove_all_matching_method(method_name); end - # source://mocha//lib/mocha/expectation_list.rb#32 + # source://mocha//lib/mocha/expectation_list.rb#36 def to_a; end - # source://mocha//lib/mocha/expectation_list.rb#36 + # source://mocha//lib/mocha/expectation_list.rb#40 def to_set; end # @return [Boolean] # - # source://mocha//lib/mocha/expectation_list.rb#28 + # source://mocha//lib/mocha/expectation_list.rb#32 def verified?(assertion_counter = T.unsafe(nil)); end private - # source://mocha//lib/mocha/expectation_list.rb#54 - def matching_expectations(invocation); end + # source://mocha//lib/mocha/expectation_list.rb#58 + def matching_expectations(invocation, ignoring_order: T.unsafe(nil)); end end # Integration hooks for test library authors. @@ -1618,12 +1637,12 @@ end # # This module is provided as part of the +Mocha::API+ module and is therefore part of the public API, but should only be used by authors of test libraries and not by typical "users" of Mocha. # -# Integration with Test::Unit and MiniTest are provided as part of Mocha, because they are (or were once) part of the Ruby standard library. Integration with other test libraries is not provided as *part* of Mocha, but is supported by means of the methods in this module. +# Integration with Test::Unit and Minitest are provided as part of Mocha, because they are (or were once) part of the Ruby standard library. Integration with other test libraries is not provided as *part* of Mocha, but is supported by means of the methods in this module. # # See the code in the +Adapter+ modules for examples of how to use the methods in this module. +Mocha::ExpectationErrorFactory+ may be used if you want +Mocha+ to raise a different type of exception. # # @see Mocha::Integration::TestUnit::Adapter -# @see Mocha::Integration::MiniTest::Adapter +# @see Mocha::Integration::Minitest::Adapter # @see Mocha::ExpectationErrorFactory # @see Mocha::API # @@ -1641,7 +1660,13 @@ module Mocha::Hooks # This method should be called after each individual test has finished (including after any "teardown" code). # # source://mocha//lib/mocha/hooks.rb#38 - def mocha_teardown; end + def mocha_teardown(origin = T.unsafe(nil)); end + + # Returns a string representing the unit test name, to be included in some Mocha + # to help track down potential bugs. + # + # source://mocha//lib/mocha/hooks.rb#44 + def mocha_test_name; end # Verifies that all mock expectations have been met (only for use by authors of test libraries). # @@ -1752,55 +1777,60 @@ class Mocha::Integration::AssertionCounter def increment; end end -# source://mocha//lib/mocha/integration/mini_test/adapter.rb#7 -module Mocha::Integration::MiniTest +# source://mocha//lib/mocha/integration/minitest/adapter.rb#7 +module Mocha::Integration::Minitest class << self - # source://mocha//lib/mocha/integration/mini_test.rb#8 + # source://mocha//lib/mocha/integration/minitest.rb#8 def activate; end end end -# Integrates Mocha into recent versions of MiniTest. +# Integrates Mocha into recent versions of Minitest. # # See the source code for an example of how to integrate Mocha into a test library. # -# source://mocha//lib/mocha/integration/mini_test/adapter.rb#11 -module Mocha::Integration::MiniTest::Adapter +# source://mocha//lib/mocha/integration/minitest/adapter.rb#11 +module Mocha::Integration::Minitest::Adapter include ::Mocha::ParameterMatchers include ::Mocha::Hooks include ::Mocha::API # @private # - # source://mocha//lib/mocha/integration/mini_test/adapter.rb#45 + # source://mocha//lib/mocha/integration/minitest/adapter.rb#45 def after_teardown; end # @private # - # source://mocha//lib/mocha/integration/mini_test/adapter.rb#30 + # source://mocha//lib/mocha/integration/minitest/adapter.rb#30 def before_setup; end # @private # - # source://mocha//lib/mocha/integration/mini_test/adapter.rb#36 + # source://mocha//lib/mocha/integration/minitest/adapter.rb#36 def before_teardown; end + # @private + # + # source://mocha//lib/mocha/integration/minitest/adapter.rb#51 + def mocha_test_name; end + class << self # @private # @return [Boolean] # - # source://mocha//lib/mocha/integration/mini_test/adapter.rb#15 - def applicable_to?(mini_test_version); end + # source://mocha//lib/mocha/integration/minitest/adapter.rb#15 + def applicable_to?(minitest_version); end # @private # - # source://mocha//lib/mocha/integration/mini_test/adapter.rb#20 + # source://mocha//lib/mocha/integration/minitest/adapter.rb#20 def description; end # @private # @private # - # source://mocha//lib/mocha/integration/mini_test/adapter.rb#25 + # source://mocha//lib/mocha/integration/minitest/adapter.rb#25 def included(_mod); end end end @@ -1955,12 +1985,12 @@ class Mocha::Mock # @private # @return [Mock] a new instance of Mock # - # source://mocha//lib/mocha/mock.rb#273 + # source://mocha//lib/mocha/mock.rb#275 def initialize(mockery, name = T.unsafe(nil), receiver = T.unsafe(nil)); end # @private # - # source://mocha//lib/mocha/mock.rb#297 + # source://mocha//lib/mocha/mock.rb#299 def __expectations__; end # Adds an expectation that the specified method must be called exactly once with any parameters. @@ -1980,7 +2010,7 @@ class Mocha::Mock # object.expected_method # => error raised when expected method invoked second time # @example Setup multiple expectations using +expected_methods_vs_return_values+. # object = mock() - # object.expects(:expected_method_one => :result_one, :expected_method_two => :result_two) + # object.expects(expected_method_one: :result_one, expected_method_two: :result_two) # # # is exactly equivalent to # @@ -1997,7 +2027,7 @@ class Mocha::Mock # @private # # source://mocha//lib/mocha/mock.rb#346 - def __expire__; end + def __expire__(origin); end def __singleton_class__; end @@ -2011,7 +2041,7 @@ class Mocha::Mock # # no error raised # @example Setup multiple expectations using +stubbed_methods_vs_return_values+. # object = mock() - # object.stubs(:stubbed_method_one => :result_one, :stubbed_method_two => :result_two) + # object.stubs(stubbed_method_one: :result_one, stubbed_method_two: :result_two) # # # is exactly equivalent to # @@ -2022,7 +2052,7 @@ class Mocha::Mock # @overload stubs # @return [Expectation] last-built expectation which can be further modified by methods on {Expectation}. # - # source://mocha//lib/mocha/mock.rb#148 + # source://mocha//lib/mocha/mock.rb#149 def __stubs__(method_name_or_hash, backtrace = T.unsafe(nil)); end # @private @@ -2033,7 +2063,7 @@ class Mocha::Mock # @private # - # source://mocha//lib/mocha/mock.rb#307 + # source://mocha//lib/mocha/mock.rb#309 def all_expectations; end # @private @@ -2049,7 +2079,7 @@ class Mocha::Mock # @private # - # source://mocha//lib/mocha/mock.rb#285 + # source://mocha//lib/mocha/mock.rb#287 def everything_stubbed; end # Adds an expectation that the specified method must be called exactly once with any parameters. @@ -2069,7 +2099,7 @@ class Mocha::Mock # object.expected_method # => error raised when expected method invoked second time # @example Setup multiple expectations using +expected_methods_vs_return_values+. # object = mock() - # object.expects(:expected_method_one => :result_one, :expected_method_two => :result_two) + # object.expects(expected_method_one: :result_one, expected_method_two: :result_two) # # # is exactly equivalent to # @@ -2095,7 +2125,7 @@ class Mocha::Mock # @private # - # source://mocha//lib/mocha/mock.rb#313 + # source://mocha//lib/mocha/mock.rb#314 def method_missing(symbol, *arguments, **_arg2, &block); end # @private @@ -2150,7 +2180,7 @@ class Mocha::Mock # @return [Mock] the same {Mock} instance, thereby allowing invocations of other {Mock} methods to be chained. # @see #responds_like_instance_of # - # source://mocha//lib/mocha/mock.rb#235 + # source://mocha//lib/mocha/mock.rb#237 def quacks_like(responder); end # Constrains the {Mock} instance so that it can only expect or stub methods to which an instance of the +responder_class+ responds publicly. The constraint is only applied at method invocation time. Note that the responder instance is instantiated using +Class#allocate+. @@ -2181,7 +2211,7 @@ class Mocha::Mock # @return [Mock] the same {Mock} instance, thereby allowing invocations of other {Mock} methods to be chained. # @see #responds_like # - # source://mocha//lib/mocha/mock.rb#268 + # source://mocha//lib/mocha/mock.rb#270 def quacks_like_instance_of(responder_class); end # Constrains the {Mock} instance so that it can only expect or stub methods to which +responder+ responds publicly. The constraint is only applied at method invocation time. @@ -2231,7 +2261,7 @@ class Mocha::Mock # @return [Mock] the same {Mock} instance, thereby allowing invocations of other {Mock} methods to be chained. # @see #responds_like_instance_of # - # source://mocha//lib/mocha/mock.rb#235 + # source://mocha//lib/mocha/mock.rb#237 def responds_like(responder); end # Constrains the {Mock} instance so that it can only expect or stub methods to which an instance of the +responder_class+ responds publicly. The constraint is only applied at method invocation time. Note that the responder instance is instantiated using +Class#allocate+. @@ -2262,12 +2292,12 @@ class Mocha::Mock # @return [Mock] the same {Mock} instance, thereby allowing invocations of other {Mock} methods to be chained. # @see #responds_like # - # source://mocha//lib/mocha/mock.rb#268 + # source://mocha//lib/mocha/mock.rb#270 def responds_like_instance_of(responder_class); end # @private # - # source://mocha//lib/mocha/mock.rb#302 + # source://mocha//lib/mocha/mock.rb#304 def stub_everything; end # Adds an expectation that the specified method may be called any number of times with any parameters. @@ -2280,7 +2310,7 @@ class Mocha::Mock # # no error raised # @example Setup multiple expectations using +stubbed_methods_vs_return_values+. # object = mock() - # object.stubs(:stubbed_method_one => :result_one, :stubbed_method_two => :result_two) + # object.stubs(stubbed_method_one: :result_one, stubbed_method_two: :result_two) # # # is exactly equivalent to # @@ -2291,7 +2321,7 @@ class Mocha::Mock # @overload stubs # @return [Expectation] last-built expectation which can be further modified by methods on {Expectation}. # - # source://mocha//lib/mocha/mock.rb#148 + # source://mocha//lib/mocha/mock.rb#149 def stubs(method_name_or_hash, backtrace = T.unsafe(nil)); end # Removes the specified stubbed methods (added by calls to {#expects} or {#stubs}) and all expectations associated with them. @@ -2311,17 +2341,17 @@ class Mocha::Mock # multiplier.unstub(:triple) # @param method_names [Array] names of methods to unstub. # - # source://mocha//lib/mocha/mock.rb#180 + # source://mocha//lib/mocha/mock.rb#182 def unstub(*method_names); end private # @raise [StubbingError] # - # source://mocha//lib/mocha/mock.rb#389 + # source://mocha//lib/mocha/mock.rb#393 def check_expiry; end - # source://mocha//lib/mocha/mock.rb#383 + # source://mocha//lib/mocha/mock.rb#387 def check_responder_responds_to(symbol); end # source://mocha//lib/mocha/mock.rb#372 @@ -2336,17 +2366,17 @@ end # source://mocha//lib/mocha/mockery.rb#13 class Mocha::Mockery - # source://mocha//lib/mocha/mockery.rb#134 + # source://mocha//lib/mocha/mockery.rb#138 def logger; end # Sets the attribute logger # # @param value the value to set the attribute logger to. # - # source://mocha//lib/mocha/mockery.rb#132 + # source://mocha//lib/mocha/mockery.rb#136 def logger=(_arg0); end - # source://mocha//lib/mocha/mockery.rb#112 + # source://mocha//lib/mocha/mockery.rb#116 def mocha_inspect; end # source://mocha//lib/mocha/mockery.rb#66 @@ -2364,9 +2394,12 @@ class Mocha::Mockery # source://mocha//lib/mocha/mockery.rb#74 def new_state_machine(name); end - # source://mocha//lib/mocha/mockery.rb#120 + # source://mocha//lib/mocha/mockery.rb#124 def on_stubbing(object, method); end + # source://mocha//lib/mocha/mockery.rb#112 + def sequences; end + # source://mocha//lib/mocha/mockery.rb#108 def state_machines; end @@ -2374,7 +2407,7 @@ class Mocha::Mockery def stubba; end # source://mocha//lib/mocha/mockery.rb#94 - def teardown; end + def teardown(origin = T.unsafe(nil)); end # source://mocha//lib/mocha/mockery.rb#62 def unnamed_mock; end @@ -2384,27 +2417,27 @@ class Mocha::Mockery private - # source://mocha//lib/mocha/mockery.rb#161 + # source://mocha//lib/mocha/mockery.rb#165 def add_mock(mock); end - # source://mocha//lib/mocha/mockery.rb#166 + # source://mocha//lib/mocha/mockery.rb#170 def add_state_machine(state_machine); end # @raise [StubbingError] # - # source://mocha//lib/mocha/mockery.rb#140 + # source://mocha//lib/mocha/mockery.rb#144 def check(action, description, signature_proc, backtrace = T.unsafe(nil)); end - # source://mocha//lib/mocha/mockery.rb#149 + # source://mocha//lib/mocha/mockery.rb#153 def expectations; end - # source://mocha//lib/mocha/mockery.rb#171 + # source://mocha//lib/mocha/mockery.rb#175 def reset; end - # source://mocha//lib/mocha/mockery.rb#157 + # source://mocha//lib/mocha/mockery.rb#161 def satisfied_expectations; end - # source://mocha//lib/mocha/mockery.rb#153 + # source://mocha//lib/mocha/mockery.rb#157 def unsatisfied_expectations; end class << self @@ -2415,7 +2448,7 @@ class Mocha::Mockery def setup; end # source://mocha//lib/mocha/mockery.rb#51 - def teardown; end + def teardown(origin = T.unsafe(nil)); end # source://mocha//lib/mocha/mockery.rb#47 def verify(*args); end @@ -2477,7 +2510,7 @@ module Mocha::ObjectMethods # assert_equal true, product.save # @example Setting up multiple expectations on a non-mock object. # product = Product.new - # product.expects(:valid? => true, :save => true) + # product.expects(valid?: true, save: true) # # # exactly equivalent to # @@ -2528,7 +2561,7 @@ module Mocha::ObjectMethods # assert_equal true, product.save # @example Setting up multiple stubbed methods on a non-mock object. # product = Product.new - # product.stubs(:valid? => true, :save => true) + # product.stubs(valid?: true, save: true) # # # exactly equivalent to # @@ -2840,7 +2873,7 @@ module Mocha::ParameterMatchers # @example Actual parameter includes item which matches nested matcher. # object = mock() # object.expects(:method_1).with(includes(has_key(:key))) - # object.method_1(['foo', 'bar', {:key => 'baz'}]) + # object.method_1(['foo', 'bar', {key: 'baz'}]) # # no error raised # @example Actual parameter does not include item matching nested matcher. # object.method_1(['foo', 'bar', {:other_key => 'baz'}]) @@ -2856,10 +2889,10 @@ module Mocha::ParameterMatchers # @example Actual parameter is a Hash including the given key. # object = mock() # object.expects(:method_1).with(includes(:bar)) - # object.method_1({:foo => 1, :bar => 2}) + # object.method_1({foo: 1, bar: 2}) # # no error raised # @example Actual parameter is a Hash without the given key. - # object.method_1({:foo => 1, :baz => 2}) + # object.method_1({foo: 1, baz: 2}) # # error raised, because hash does not include key 'bar' # @example Actual parameter is a Hash with a key matching the given matcher. # object = mock() @@ -2985,8 +3018,6 @@ module Mocha::ParameterMatchers # source://mocha//lib/mocha/parameter_matchers/regexp_matches.rb#24 def regexp_matches(regexp); end - # Matches any object that responds to +message+ with +result+. To put it another way, it tests the quack, not the duck. - # # @example Actual parameter responds with "FOO" when :upcase is invoked. # object = mock() # object.expects(:method_1).with(responds_with(:upcase, "FOO")) @@ -2997,13 +3028,18 @@ module Mocha::ParameterMatchers # object.expects(:method_1).with(responds_with(:upcase, "BAR")) # object.method_1("foo") # # error raised, because "foo".upcase != "BAR" - # @param message [Symbol] method to invoke. - # @param result [Object] expected result of sending +message+. + # @example Actual parameter responds with "FOO" when :upcase is invoked and "oof" when :reverse is invoked. + # object = mock() + # object.expects(:method_1).with(responds_with(upcase: "FOO", reverse: "oof")) + # object.method_1("foo") + # # no error raised, because "foo".upcase == "FOO" and "foo".reverse == "oof" + # @overload responds_with + # @overload responds_with # @return [RespondsWith] parameter matcher. # @see Expectation#with # - # source://mocha//lib/mocha/parameter_matchers/responds_with.rb#25 - def responds_with(message, result); end + # source://mocha//lib/mocha/parameter_matchers/responds_with.rb#37 + def responds_with(*options); end # Matches any YAML that represents the specified +object+ # @@ -3121,12 +3157,12 @@ class Mocha::ParameterMatchers::Base # @example Alternative ways to combine matchers with a logical AND. # object = mock() # object.expects(:run).with(all_of(has_key(:foo), has_key(:bar))) - # object.run(:foo => 'foovalue', :bar => 'barvalue') + # object.run(foo: 'foovalue', bar: 'barvalue') # # # is exactly equivalent to # # object.expects(:run).with(has_key(:foo) & has_key(:bar)) - # object.run(:foo => 'foovalue', :bar => 'barvalue) + # object.run(foo: 'foovalue', bar: 'barvalue) # @param other [Base] parameter matcher. # @return [AllOf] parameter matcher. # @see Expectation#with @@ -3148,12 +3184,12 @@ class Mocha::ParameterMatchers::Base # @example Alternative ways to combine matchers with a logical OR. # object = mock() # object.expects(:run).with(any_of(has_key(:foo), has_key(:bar))) - # object.run(:foo => 'foovalue') + # object.run(foo: 'foovalue') # # # is exactly equivalent to # # object.expects(:run).with(has_key(:foo) | has_key(:bar)) - # object.run(:foo => 'foovalue') + # object.run(foo: 'foovalue') # @example Using an explicit {Equals} matcher in combination with {#|}. # object.expects(:run).with(equals(1) | equals(2)) # object.run(1) # passes @@ -3537,23 +3573,23 @@ end # Parameter matcher which matches if actual parameter returns expected result when specified method is invoked. # -# source://mocha//lib/mocha/parameter_matchers/responds_with.rb#30 +# source://mocha//lib/mocha/parameter_matchers/responds_with.rb#57 class Mocha::ParameterMatchers::RespondsWith < ::Mocha::ParameterMatchers::Base # @private # @return [RespondsWith] a new instance of RespondsWith # - # source://mocha//lib/mocha/parameter_matchers/responds_with.rb#32 + # source://mocha//lib/mocha/parameter_matchers/responds_with.rb#59 def initialize(message, result); end # @private # @return [Boolean] # - # source://mocha//lib/mocha/parameter_matchers/responds_with.rb#38 + # source://mocha//lib/mocha/parameter_matchers/responds_with.rb#65 def matches?(available_parameters); end # @private # - # source://mocha//lib/mocha/parameter_matchers/responds_with.rb#44 + # source://mocha//lib/mocha/parameter_matchers/responds_with.rb#71 def mocha_inspect; end end diff --git a/sorbet/rbi/gems/rbi@0.1.9.rbi b/sorbet/rbi/gems/rbi@0.1.11.rbi similarity index 90% rename from sorbet/rbi/gems/rbi@0.1.9.rbi rename to sorbet/rbi/gems/rbi@0.1.11.rbi index 2dc7699369..71b0e6847d 100644 --- a/sorbet/rbi/gems/rbi@0.1.9.rbi +++ b/sorbet/rbi/gems/rbi@0.1.11.rbi @@ -7,13 +7,13 @@ # source://rbi//lib/rbi/loc.rb#4 module RBI; end -# source://rbi//lib/rbi/model.rb#968 +# source://rbi//lib/rbi/model.rb#1041 class RBI::Arg < ::RBI::Node - # source://rbi//lib/rbi/model.rb#980 + # source://rbi//lib/rbi/model.rb#1053 sig { params(value: ::String, loc: T.nilable(::RBI::Loc)).void } def initialize(value, loc: T.unsafe(nil)); end - # source://rbi//lib/rbi/model.rb#986 + # source://rbi//lib/rbi/model.rb#1059 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end @@ -21,11 +21,11 @@ class RBI::Arg < ::RBI::Node sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/model.rb#991 + # source://rbi//lib/rbi/model.rb#1064 sig { returns(::String) } def to_s; end - # source://rbi//lib/rbi/model.rb#972 + # source://rbi//lib/rbi/model.rb#1045 sig { returns(::String) } def value; end end @@ -197,9 +197,9 @@ class RBI::BlankLine < ::RBI::Comment def accept_printer(v); end end -# source://rbi//lib/rbi/model.rb#741 +# source://rbi//lib/rbi/model.rb#814 class RBI::BlockParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#752 + # source://rbi//lib/rbi/model.rb#825 sig do params( name: ::String, @@ -210,7 +210,7 @@ class RBI::BlockParam < ::RBI::Param end def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#763 + # source://rbi//lib/rbi/model.rb#836 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end @@ -222,7 +222,7 @@ class RBI::BlockParam < ::RBI::Param sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } def print_comment_leading_space(v, last:); end - # source://rbi//lib/rbi/model.rb#758 + # source://rbi//lib/rbi/model.rb#831 sig { override.returns(::String) } def to_s; end end @@ -379,11 +379,11 @@ class RBI::Const < ::RBI::NodeWithComments def value; end end -# source://rbi//lib/rbi/model.rb#816 +# source://rbi//lib/rbi/model.rb#889 class RBI::Extend < ::RBI::Mixin include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#828 + # source://rbi//lib/rbi/model.rb#901 sig do params( name: ::String, @@ -403,7 +403,7 @@ class RBI::Extend < ::RBI::Mixin sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/model.rb#834 + # source://rbi//lib/rbi/model.rb#907 sig { override.returns(::String) } def to_s; end end @@ -568,11 +568,11 @@ end # Sorbet's misc. # -# source://rbi//lib/rbi/model.rb#1294 +# source://rbi//lib/rbi/model.rb#1372 class RBI::Helper < ::RBI::NodeWithComments include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#1308 + # source://rbi//lib/rbi/model.rb#1386 sig do params( name: ::String, @@ -595,20 +595,20 @@ class RBI::Helper < ::RBI::NodeWithComments sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/model.rb#1298 + # source://rbi//lib/rbi/model.rb#1376 sig { returns(::String) } def name; end - # source://rbi//lib/rbi/model.rb#1315 + # source://rbi//lib/rbi/model.rb#1393 sig { override.returns(::String) } def to_s; end end -# source://rbi//lib/rbi/model.rb#793 +# source://rbi//lib/rbi/model.rb#866 class RBI::Include < ::RBI::Mixin include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#805 + # source://rbi//lib/rbi/model.rb#878 sig do params( name: ::String, @@ -628,7 +628,7 @@ class RBI::Include < ::RBI::Mixin sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/model.rb#811 + # source://rbi//lib/rbi/model.rb#884 sig { override.returns(::String) } def to_s; end end @@ -668,7 +668,7 @@ class RBI::Index < ::RBI::Visitor end end -# A Node that can be refered to by a unique ID inside an index +# A Node that can be referred to by a unique ID inside an index # # @abstract Subclasses must implement the `abstract` methods below. # @@ -688,13 +688,13 @@ module RBI::Indexable def index_ids; end end -# source://rbi//lib/rbi/model.rb#996 +# source://rbi//lib/rbi/model.rb#1069 class RBI::KwArg < ::RBI::Arg - # source://rbi//lib/rbi/model.rb#1009 + # source://rbi//lib/rbi/model.rb#1082 sig { params(keyword: ::String, value: ::String, loc: T.nilable(::RBI::Loc)).void } def initialize(keyword, value, loc: T.unsafe(nil)); end - # source://rbi//lib/rbi/model.rb#1015 + # source://rbi//lib/rbi/model.rb#1088 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end @@ -702,18 +702,18 @@ class RBI::KwArg < ::RBI::Arg sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/model.rb#1000 + # source://rbi//lib/rbi/model.rb#1073 sig { returns(::String) } def keyword; end - # source://rbi//lib/rbi/model.rb#1020 + # source://rbi//lib/rbi/model.rb#1093 sig { returns(::String) } def to_s; end end -# source://rbi//lib/rbi/model.rb#682 +# source://rbi//lib/rbi/model.rb#755 class RBI::KwOptParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#697 + # source://rbi//lib/rbi/model.rb#770 sig do params( name: ::String, @@ -725,7 +725,7 @@ class RBI::KwOptParam < ::RBI::Param end def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#709 + # source://rbi//lib/rbi/model.rb#782 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end @@ -737,18 +737,18 @@ class RBI::KwOptParam < ::RBI::Param sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } def print_comment_leading_space(v, last:); end - # source://rbi//lib/rbi/model.rb#704 + # source://rbi//lib/rbi/model.rb#777 sig { override.returns(::String) } def to_s; end - # source://rbi//lib/rbi/model.rb#686 + # source://rbi//lib/rbi/model.rb#759 sig { returns(::String) } def value; end end -# source://rbi//lib/rbi/model.rb#655 +# source://rbi//lib/rbi/model.rb#728 class RBI::KwParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#666 + # source://rbi//lib/rbi/model.rb#739 sig do params( name: ::String, @@ -759,7 +759,7 @@ class RBI::KwParam < ::RBI::Param end def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#677 + # source://rbi//lib/rbi/model.rb#750 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end @@ -771,14 +771,14 @@ class RBI::KwParam < ::RBI::Param sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } def print_comment_leading_space(v, last:); end - # source://rbi//lib/rbi/model.rb#672 + # source://rbi//lib/rbi/model.rb#745 sig { override.returns(::String) } def to_s; end end -# source://rbi//lib/rbi/model.rb#714 +# source://rbi//lib/rbi/model.rb#787 class RBI::KwRestParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#725 + # source://rbi//lib/rbi/model.rb#798 sig do params( name: ::String, @@ -789,7 +789,7 @@ class RBI::KwRestParam < ::RBI::Param end def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#736 + # source://rbi//lib/rbi/model.rb#809 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end @@ -801,7 +801,7 @@ class RBI::KwRestParam < ::RBI::Param sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } def print_comment_leading_space(v, last:); end - # source://rbi//lib/rbi/model.rb#731 + # source://rbi//lib/rbi/model.rb#804 sig { override.returns(::String) } def to_s; end end @@ -907,11 +907,55 @@ class RBI::Method < ::RBI::NodeWithComments sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end + # source://rbi//lib/rbi/model.rb#568 + sig { params(name: ::String).void } + def add_block_param(name); end + + # source://rbi//lib/rbi/model.rb#558 + sig { params(name: ::String, default_value: ::String).void } + def add_kw_opt_param(name, default_value); end + + # source://rbi//lib/rbi/model.rb#553 + sig { params(name: ::String).void } + def add_kw_param(name); end + + # source://rbi//lib/rbi/model.rb#563 + sig { params(name: ::String).void } + def add_kw_rest_param(name); end + + # source://rbi//lib/rbi/model.rb#543 + sig { params(name: ::String, default_value: ::String).void } + def add_opt_param(name, default_value); end + + # source://rbi//lib/rbi/model.rb#538 + sig { params(name: ::String).void } + def add_param(name); end + + # source://rbi//lib/rbi/model.rb#548 + sig { params(name: ::String).void } + def add_rest_param(name); end + + # source://rbi//lib/rbi/model.rb#585 + sig do + params( + params: T::Array[::RBI::SigParam], + return_type: T.nilable(::String), + is_abstract: T::Boolean, + is_override: T::Boolean, + is_overridable: T::Boolean, + is_final: T::Boolean, + type_params: T::Array[::String], + checked: T.nilable(::Symbol), + block: T.proc.params(node: ::RBI::Sig).void + ).void + end + def add_sig(params: T.unsafe(nil), return_type: T.unsafe(nil), is_abstract: T.unsafe(nil), is_override: T.unsafe(nil), is_overridable: T.unsafe(nil), is_final: T.unsafe(nil), type_params: T.unsafe(nil), checked: T.unsafe(nil), &block); end + # source://rbi//lib/rbi/rewriters/merge_trees.rb#461 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#538 + # source://rbi//lib/rbi/model.rb#611 sig { returns(::String) } def fully_qualified_name; end @@ -962,7 +1006,7 @@ class RBI::Method < ::RBI::NodeWithComments # source://rbi//lib/rbi/model.rb#499 def sigs=(_arg0); end - # source://rbi//lib/rbi/model.rb#547 + # source://rbi//lib/rbi/model.rb#620 sig { override.returns(::String) } def to_s; end @@ -976,11 +1020,11 @@ class RBI::Method < ::RBI::NodeWithComments def visibility=(_arg0); end end -# source://rbi//lib/rbi/model.rb#1355 +# source://rbi//lib/rbi/model.rb#1433 class RBI::MixesInClassMethods < ::RBI::Mixin include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#1367 + # source://rbi//lib/rbi/model.rb#1445 sig do params( name: ::String, @@ -1000,7 +1044,7 @@ class RBI::MixesInClassMethods < ::RBI::Mixin sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/model.rb#1373 + # source://rbi//lib/rbi/model.rb#1451 sig { override.returns(::String) } def to_s; end end @@ -1009,11 +1053,11 @@ end # # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://rbi//lib/rbi/model.rb#770 +# source://rbi//lib/rbi/model.rb#843 class RBI::Mixin < ::RBI::NodeWithComments abstract! - # source://rbi//lib/rbi/model.rb#787 + # source://rbi//lib/rbi/model.rb#860 sig do params( name: ::String, @@ -1032,7 +1076,7 @@ class RBI::Mixin < ::RBI::NodeWithComments sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#777 + # source://rbi//lib/rbi/model.rb#850 sig { returns(T::Array[::String]) } def names; end end @@ -1202,9 +1246,9 @@ class RBI::NodeWithComments < ::RBI::Node def version_requirements; end end -# source://rbi//lib/rbi/model.rb#601 +# source://rbi//lib/rbi/model.rb#674 class RBI::OptParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#616 + # source://rbi//lib/rbi/model.rb#689 sig do params( name: ::String, @@ -1216,7 +1260,7 @@ class RBI::OptParam < ::RBI::Param end def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#623 + # source://rbi//lib/rbi/model.rb#696 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end @@ -1228,18 +1272,18 @@ class RBI::OptParam < ::RBI::Param sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } def print_comment_leading_space(v, last:); end - # source://rbi//lib/rbi/model.rb#605 + # source://rbi//lib/rbi/model.rb#678 sig { returns(::String) } def value; end end # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://rbi//lib/rbi/model.rb#552 +# source://rbi//lib/rbi/model.rb#625 class RBI::Param < ::RBI::NodeWithComments abstract! - # source://rbi//lib/rbi/model.rb#568 + # source://rbi//lib/rbi/model.rb#641 sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end @@ -1251,7 +1295,7 @@ class RBI::Param < ::RBI::NodeWithComments sig { returns(T::Array[::String]) } def comments_lines; end - # source://rbi//lib/rbi/model.rb#559 + # source://rbi//lib/rbi/model.rb#632 sig { returns(::String) } def name; end @@ -1259,7 +1303,7 @@ class RBI::Param < ::RBI::NodeWithComments sig { params(v: ::RBI::Printer, last: T::Boolean).void } def print_comment_leading_space(v, last:); end - # source://rbi//lib/rbi/model.rb#574 + # source://rbi//lib/rbi/model.rb#647 sig { override.returns(::String) } def to_s; end end @@ -1566,9 +1610,9 @@ class RBI::Printer < ::RBI::Visitor def visit_file(file); end end -# source://rbi//lib/rbi/model.rb#909 +# source://rbi//lib/rbi/model.rb#982 class RBI::Private < ::RBI::Visibility - # source://rbi//lib/rbi/model.rb#919 + # source://rbi//lib/rbi/model.rb#992 sig do params( loc: T.nilable(::RBI::Loc), @@ -1579,9 +1623,9 @@ class RBI::Private < ::RBI::Visibility def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end end -# source://rbi//lib/rbi/model.rb#893 +# source://rbi//lib/rbi/model.rb#966 class RBI::Protected < ::RBI::Visibility - # source://rbi//lib/rbi/model.rb#903 + # source://rbi//lib/rbi/model.rb#976 sig do params( loc: T.nilable(::RBI::Loc), @@ -1592,9 +1636,9 @@ class RBI::Protected < ::RBI::Visibility def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end end -# source://rbi//lib/rbi/model.rb#877 +# source://rbi//lib/rbi/model.rb#950 class RBI::Public < ::RBI::Visibility - # source://rbi//lib/rbi/model.rb#887 + # source://rbi//lib/rbi/model.rb#960 sig do params( loc: T.nilable(::RBI::Loc), @@ -1605,9 +1649,9 @@ class RBI::Public < ::RBI::Visibility def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end end -# source://rbi//lib/rbi/model.rb#579 +# source://rbi//lib/rbi/model.rb#652 class RBI::ReqParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#590 + # source://rbi//lib/rbi/model.rb#663 sig do params( name: ::String, @@ -1618,16 +1662,16 @@ class RBI::ReqParam < ::RBI::Param end def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#596 + # source://rbi//lib/rbi/model.rb#669 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end end -# source://rbi//lib/rbi/model.rb#1378 +# source://rbi//lib/rbi/model.rb#1456 class RBI::RequiresAncestor < ::RBI::NodeWithComments include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#1391 + # source://rbi//lib/rbi/model.rb#1469 sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end @@ -1639,18 +1683,18 @@ class RBI::RequiresAncestor < ::RBI::NodeWithComments sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/model.rb#1382 + # source://rbi//lib/rbi/model.rb#1460 sig { returns(::String) } def name; end - # source://rbi//lib/rbi/model.rb#1397 + # source://rbi//lib/rbi/model.rb#1475 sig { override.returns(::String) } def to_s; end end -# source://rbi//lib/rbi/model.rb#628 +# source://rbi//lib/rbi/model.rb#701 class RBI::RestParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#639 + # source://rbi//lib/rbi/model.rb#712 sig do params( name: ::String, @@ -1661,7 +1705,7 @@ class RBI::RestParam < ::RBI::Param end def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#650 + # source://rbi//lib/rbi/model.rb#723 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end @@ -1673,7 +1717,7 @@ class RBI::RestParam < ::RBI::Param sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } def print_comment_leading_space(v, last:); end - # source://rbi//lib/rbi/model.rb#645 + # source://rbi//lib/rbi/model.rb#718 sig { override.returns(::String) } def to_s; end end @@ -1900,7 +1944,7 @@ class RBI::Rewriters::Merge::Conflict < ::T::Struct def to_s; end class << self - # source://sorbet-runtime/0.5.11262/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11352/lib/types/struct.rb#13 def inherited(s); end end end @@ -2117,7 +2161,7 @@ class RBI::Rewriters::RemoveKnownDefinitions::Operation < ::T::Struct def to_s; end class << self - # source://sorbet-runtime/0.5.11262/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11352/lib/types/struct.rb#13 def inherited(s); end end end @@ -2231,11 +2275,11 @@ end # Sends # -# source://rbi//lib/rbi/model.rb#927 +# source://rbi//lib/rbi/model.rb#1000 class RBI::Send < ::RBI::NodeWithComments include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#945 + # source://rbi//lib/rbi/model.rb#1018 sig do params( method: ::String, @@ -2247,11 +2291,11 @@ class RBI::Send < ::RBI::NodeWithComments end def initialize(method, args = T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#953 + # source://rbi//lib/rbi/model.rb#1026 sig { params(arg: ::RBI::Arg).void } def <<(arg); end - # source://rbi//lib/rbi/model.rb#958 + # source://rbi//lib/rbi/model.rb#1031 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end @@ -2259,7 +2303,7 @@ class RBI::Send < ::RBI::NodeWithComments sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/model.rb#934 + # source://rbi//lib/rbi/model.rb#1007 sig { returns(T::Array[::RBI::Arg]) } def args; end @@ -2271,20 +2315,20 @@ class RBI::Send < ::RBI::NodeWithComments sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/model.rb#931 + # source://rbi//lib/rbi/model.rb#1004 sig { returns(::String) } def method; end - # source://rbi//lib/rbi/model.rb#963 + # source://rbi//lib/rbi/model.rb#1036 sig { returns(::String) } def to_s; end end # Sorbet's sigs # -# source://rbi//lib/rbi/model.rb#1027 +# source://rbi//lib/rbi/model.rb#1100 class RBI::Sig < ::RBI::Node - # source://rbi//lib/rbi/model.rb#1059 + # source://rbi//lib/rbi/model.rb#1132 sig do params( params: T::Array[::RBI::SigParam], @@ -2301,11 +2345,11 @@ class RBI::Sig < ::RBI::Node end def initialize(params: T.unsafe(nil), return_type: T.unsafe(nil), is_abstract: T.unsafe(nil), is_override: T.unsafe(nil), is_overridable: T.unsafe(nil), is_final: T.unsafe(nil), type_params: T.unsafe(nil), checked: T.unsafe(nil), loc: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#1084 + # source://rbi//lib/rbi/model.rb#1157 sig { params(param: ::RBI::SigParam).void } def <<(param); end - # source://rbi//lib/rbi/model.rb#1089 + # source://rbi//lib/rbi/model.rb#1167 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end @@ -2313,76 +2357,80 @@ class RBI::Sig < ::RBI::Node sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/model.rb#1043 + # source://rbi//lib/rbi/model.rb#1162 + sig { params(name: ::String, type: ::String).void } + def add_param(name, type); end + + # source://rbi//lib/rbi/model.rb#1116 sig { returns(T.nilable(::Symbol)) } def checked; end # @return [Symbol, nil] # - # source://rbi//lib/rbi/model.rb#1043 + # source://rbi//lib/rbi/model.rb#1116 def checked=(_arg0); end # source://rbi//lib/rbi/printer.rb#656 sig { returns(T::Boolean) } def inline_params?; end - # source://rbi//lib/rbi/model.rb#1037 + # source://rbi//lib/rbi/model.rb#1110 sig { returns(T::Boolean) } def is_abstract; end # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#1037 + # source://rbi//lib/rbi/model.rb#1110 def is_abstract=(_arg0); end # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#1037 + # source://rbi//lib/rbi/model.rb#1110 def is_final; end # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#1037 + # source://rbi//lib/rbi/model.rb#1110 def is_final=(_arg0); end # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#1037 + # source://rbi//lib/rbi/model.rb#1110 def is_overridable; end # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#1037 + # source://rbi//lib/rbi/model.rb#1110 def is_overridable=(_arg0); end # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#1037 + # source://rbi//lib/rbi/model.rb#1110 def is_override; end # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#1037 + # source://rbi//lib/rbi/model.rb#1110 def is_override=(_arg0); end # source://rbi//lib/rbi/printer.rb#651 sig { override.returns(T::Boolean) } def oneline?; end - # source://rbi//lib/rbi/model.rb#1031 + # source://rbi//lib/rbi/model.rb#1104 sig { returns(T::Array[::RBI::SigParam]) } def params; end - # source://rbi//lib/rbi/model.rb#1034 + # source://rbi//lib/rbi/model.rb#1107 sig { returns(T.nilable(::String)) } def return_type; end # @return [String, nil] # - # source://rbi//lib/rbi/model.rb#1034 + # source://rbi//lib/rbi/model.rb#1107 def return_type=(_arg0); end - # source://rbi//lib/rbi/model.rb#1040 + # source://rbi//lib/rbi/model.rb#1113 sig { returns(T::Array[::String]) } def type_params; end @@ -2401,9 +2449,9 @@ class RBI::Sig < ::RBI::Node def sig_modifiers; end end -# source://rbi//lib/rbi/model.rb#1098 +# source://rbi//lib/rbi/model.rb#1176 class RBI::SigParam < ::RBI::NodeWithComments - # source://rbi//lib/rbi/model.rb#1113 + # source://rbi//lib/rbi/model.rb#1191 sig do params( name: ::String, @@ -2415,7 +2463,7 @@ class RBI::SigParam < ::RBI::NodeWithComments end def initialize(name, type, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#1121 + # source://rbi//lib/rbi/model.rb#1199 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end @@ -2427,7 +2475,7 @@ class RBI::SigParam < ::RBI::NodeWithComments sig { returns(T::Array[::String]) } def comments_lines; end - # source://rbi//lib/rbi/model.rb#1102 + # source://rbi//lib/rbi/model.rb#1180 sig { returns(::String) } def name; end @@ -2437,7 +2485,7 @@ class RBI::SigParam < ::RBI::NodeWithComments # @return [String] # - # source://rbi//lib/rbi/model.rb#1102 + # source://rbi//lib/rbi/model.rb#1180 def type; end end @@ -2519,9 +2567,9 @@ end # Sorbet's T::Enum # -# source://rbi//lib/rbi/model.rb#1239 +# source://rbi//lib/rbi/model.rb#1317 class RBI::TEnum < ::RBI::Class - # source://rbi//lib/rbi/model.rb#1250 + # source://rbi//lib/rbi/model.rb#1328 sig do params( name: ::String, @@ -2533,11 +2581,11 @@ class RBI::TEnum < ::RBI::Class def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end end -# source://rbi//lib/rbi/model.rb#1256 +# source://rbi//lib/rbi/model.rb#1334 class RBI::TEnumBlock < ::RBI::NodeWithComments include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#1270 + # source://rbi//lib/rbi/model.rb#1348 sig do params( names: T::Array[::String], @@ -2548,7 +2596,7 @@ class RBI::TEnumBlock < ::RBI::NodeWithComments end def initialize(names = T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#1282 + # source://rbi//lib/rbi/model.rb#1360 sig { params(name: ::String).void } def <<(name); end @@ -2556,7 +2604,7 @@ class RBI::TEnumBlock < ::RBI::NodeWithComments sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/model.rb#1277 + # source://rbi//lib/rbi/model.rb#1355 sig { returns(T::Boolean) } def empty?; end @@ -2568,20 +2616,20 @@ class RBI::TEnumBlock < ::RBI::NodeWithComments sig { override.params(other: ::RBI::Node).void } def merge_with(other); end - # source://rbi//lib/rbi/model.rb#1260 + # source://rbi//lib/rbi/model.rb#1338 sig { returns(T::Array[::String]) } def names; end - # source://rbi//lib/rbi/model.rb#1287 + # source://rbi//lib/rbi/model.rb#1365 sig { override.returns(::String) } def to_s; end end # Sorbet's T::Struct # -# source://rbi//lib/rbi/model.rb#1128 +# source://rbi//lib/rbi/model.rb#1206 class RBI::TStruct < ::RBI::Class - # source://rbi//lib/rbi/model.rb#1139 + # source://rbi//lib/rbi/model.rb#1217 sig do params( name: ::String, @@ -2593,11 +2641,11 @@ class RBI::TStruct < ::RBI::Class def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end end -# source://rbi//lib/rbi/model.rb#1177 +# source://rbi//lib/rbi/model.rb#1255 class RBI::TStructConst < ::RBI::TStructField include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#1190 + # source://rbi//lib/rbi/model.rb#1268 sig do params( name: ::String, @@ -2614,7 +2662,7 @@ class RBI::TStructConst < ::RBI::TStructField sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#1196 + # source://rbi//lib/rbi/model.rb#1274 sig { override.returns(T::Array[::String]) } def fully_qualified_names; end @@ -2622,18 +2670,18 @@ class RBI::TStructConst < ::RBI::TStructField sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/model.rb#1202 + # source://rbi//lib/rbi/model.rb#1280 sig { override.returns(::String) } def to_s; end end # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://rbi//lib/rbi/model.rb#1145 +# source://rbi//lib/rbi/model.rb#1223 class RBI::TStructField < ::RBI::NodeWithComments abstract! - # source://rbi//lib/rbi/model.rb#1166 + # source://rbi//lib/rbi/model.rb#1244 sig do params( name: ::String, @@ -2653,46 +2701,46 @@ class RBI::TStructField < ::RBI::NodeWithComments sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#1155 + # source://rbi//lib/rbi/model.rb#1233 sig { returns(T.nilable(::String)) } def default; end # @return [String, nil] # - # source://rbi//lib/rbi/model.rb#1155 + # source://rbi//lib/rbi/model.rb#1233 def default=(_arg0); end # @abstract # - # source://rbi//lib/rbi/model.rb#1174 + # source://rbi//lib/rbi/model.rb#1252 sig { abstract.returns(T::Array[::String]) } def fully_qualified_names; end - # source://rbi//lib/rbi/model.rb#1152 + # source://rbi//lib/rbi/model.rb#1230 sig { returns(::String) } def name; end # @return [String] # - # source://rbi//lib/rbi/model.rb#1152 + # source://rbi//lib/rbi/model.rb#1230 def name=(_arg0); end # @return [String] # - # source://rbi//lib/rbi/model.rb#1152 + # source://rbi//lib/rbi/model.rb#1230 def type; end # @return [String] # - # source://rbi//lib/rbi/model.rb#1152 + # source://rbi//lib/rbi/model.rb#1230 def type=(_arg0); end end -# source://rbi//lib/rbi/model.rb#1207 +# source://rbi//lib/rbi/model.rb#1285 class RBI::TStructProp < ::RBI::TStructField include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#1220 + # source://rbi//lib/rbi/model.rb#1298 sig do params( name: ::String, @@ -2709,7 +2757,7 @@ class RBI::TStructProp < ::RBI::TStructField sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#1226 + # source://rbi//lib/rbi/model.rb#1304 sig { override.returns(T::Array[::String]) } def fully_qualified_names; end @@ -2717,7 +2765,7 @@ class RBI::TStructProp < ::RBI::TStructField sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/model.rb#1232 + # source://rbi//lib/rbi/model.rb#1310 sig { override.returns(::String) } def to_s; end end @@ -2750,7 +2798,7 @@ class RBI::Tree < ::RBI::NodeWithComments sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void } def annotate!(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end - # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#38 + # source://tapioca/0.13.3/lib/tapioca/rbi_ext/model.rb#38 sig do params( name: ::String, @@ -2760,19 +2808,19 @@ class RBI::Tree < ::RBI::NodeWithComments end def create_class(name, superclass_name: T.unsafe(nil), &block); end - # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#45 + # source://tapioca/0.13.3/lib/tapioca/rbi_ext/model.rb#45 sig { params(name: ::String, value: ::String).void } def create_constant(name, value:); end - # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#55 + # source://tapioca/0.13.3/lib/tapioca/rbi_ext/model.rb#55 sig { params(name: ::String).void } def create_extend(name); end - # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#50 + # source://tapioca/0.13.3/lib/tapioca/rbi_ext/model.rb#50 sig { params(name: ::String).void } def create_include(name); end - # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#89 + # source://tapioca/0.13.3/lib/tapioca/rbi_ext/model.rb#89 sig do params( name: ::String, @@ -2785,19 +2833,36 @@ class RBI::Tree < ::RBI::NodeWithComments end def create_method(name, parameters: T.unsafe(nil), return_type: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil), comments: T.unsafe(nil)); end - # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#60 + # source://tapioca/0.13.3/lib/tapioca/rbi_ext/model.rb#113 + sig do + params( + name: ::String, + sigs: T::Array[::RBI::Sig], + parameters: T::Array[::RBI::Param], + class_method: T::Boolean, + visibility: ::RBI::Visibility, + comments: T::Array[::RBI::Comment] + ).void + end + def create_method_with_sigs(name, sigs:, parameters: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil), comments: T.unsafe(nil)); end + + # source://tapioca/0.13.3/lib/tapioca/rbi_ext/model.rb#60 sig { params(name: ::String).void } def create_mixes_in_class_methods(name); end - # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#25 + # source://tapioca/0.13.3/lib/tapioca/rbi_ext/model.rb#25 sig { params(name: ::String, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) } def create_module(name, &block); end - # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#9 + # source://tapioca/0.13.3/lib/tapioca/rbi_ext/model.rb#9 sig { params(constant: ::Module, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) } def create_path(constant, &block); end - # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#74 + # source://tapioca/0.13.3/lib/tapioca/rbi_ext/model.rb#134 + sig { params(parameters: T::Hash[T.any(::String, ::Symbol), ::String], return_type: ::String).returns(::RBI::Sig) } + def create_sig(parameters:, return_type: T.unsafe(nil)); end + + # source://tapioca/0.13.3/lib/tapioca/rbi_ext/model.rb#74 sig do params( name: ::String, @@ -2863,20 +2928,20 @@ class RBI::Tree < ::RBI::NodeWithComments private - # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#116 + # source://tapioca/0.13.3/lib/tapioca/rbi_ext/model.rb#149 sig { params(node: ::RBI::Node).returns(::RBI::Node) } def create_node(node); end - # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#111 + # source://tapioca/0.13.3/lib/tapioca/rbi_ext/model.rb#144 sig { returns(T::Hash[::String, ::RBI::Node]) } def nodes_cache; end end -# source://rbi//lib/rbi/model.rb#1320 +# source://rbi//lib/rbi/model.rb#1398 class RBI::TypeMember < ::RBI::NodeWithComments include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#1335 + # source://rbi//lib/rbi/model.rb#1413 sig do params( name: ::String, @@ -2892,7 +2957,7 @@ class RBI::TypeMember < ::RBI::NodeWithComments sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/model.rb#1343 + # source://rbi//lib/rbi/model.rb#1421 sig { returns(::String) } def fully_qualified_name; end @@ -2900,17 +2965,17 @@ class RBI::TypeMember < ::RBI::NodeWithComments sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/model.rb#1324 + # source://rbi//lib/rbi/model.rb#1402 sig { returns(::String) } def name; end - # source://rbi//lib/rbi/model.rb#1350 + # source://rbi//lib/rbi/model.rb#1428 sig { override.returns(::String) } def to_s; end # @return [String] # - # source://rbi//lib/rbi/model.rb#1324 + # source://rbi//lib/rbi/model.rb#1402 def value; end end @@ -2936,15 +3001,15 @@ RBI::VERSION = T.let(T.unsafe(nil), String) # # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://rbi//lib/rbi/model.rb#841 +# source://rbi//lib/rbi/model.rb#914 class RBI::Visibility < ::RBI::NodeWithComments abstract! - # source://rbi//lib/rbi/model.rb#851 + # source://rbi//lib/rbi/model.rb#924 sig { params(visibility: ::Symbol, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } def initialize(visibility, loc: T.unsafe(nil), comments: T.unsafe(nil)); end - # source://rbi//lib/rbi/model.rb#857 + # source://rbi//lib/rbi/model.rb#930 sig { params(other: ::RBI::Visibility).returns(T::Boolean) } def ==(other); end @@ -2952,19 +3017,19 @@ class RBI::Visibility < ::RBI::NodeWithComments sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/model.rb#872 + # source://rbi//lib/rbi/model.rb#945 sig { returns(T::Boolean) } def private?; end - # source://rbi//lib/rbi/model.rb#867 + # source://rbi//lib/rbi/model.rb#940 sig { returns(T::Boolean) } def protected?; end - # source://rbi//lib/rbi/model.rb#862 + # source://rbi//lib/rbi/model.rb#935 sig { returns(T::Boolean) } def public?; end - # source://rbi//lib/rbi/model.rb#848 + # source://rbi//lib/rbi/model.rb#921 sig { returns(::Symbol) } def visibility; end end diff --git a/sorbet/rbi/gems/rubocop-sorbet@0.8.0.rbi b/sorbet/rbi/gems/rubocop-sorbet@0.8.1.rbi similarity index 97% rename from sorbet/rbi/gems/rubocop-sorbet@0.8.0.rbi rename to sorbet/rbi/gems/rubocop-sorbet@0.8.1.rbi index 3888c041e5..6f4cc551fa 100644 --- a/sorbet/rbi/gems/rubocop-sorbet@0.8.0.rbi +++ b/sorbet/rbi/gems/rubocop-sorbet@0.8.1.rbi @@ -190,16 +190,30 @@ RuboCop::Cop::Sorbet::BuggyObsoleteStrictMemoization::MSG = T.let(T.unsafe(nil), # end # # source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#35 -class RuboCop::Cop::Sorbet::CallbackConditionalsBinding < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#75 - def autocorrect(node); end +class RuboCop::Cop::Sorbet::CallbackConditionalsBinding < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#81 + def argumentless_unbound_callable_callback_conditional?(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#127 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#91 def on_send(node); end + + private + + # Find the immediately enclosing class or module name. + # Returns `nil`` if the immediate parent (skipping begin if present) is not a class or module. + # + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#128 + def immediately_enclosing_module_name(node); end end -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#36 -RuboCop::Cop::Sorbet::CallbackConditionalsBinding::CALLBACKS = T.let(T.unsafe(nil), Array) +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#39 +RuboCop::Cop::Sorbet::CallbackConditionalsBinding::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#41 +RuboCop::Cop::Sorbet::CallbackConditionalsBinding::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Disallows the usage of `checked(true)`. This usage could cause # confusion; it could lead some people to believe that a method would be checked @@ -259,15 +273,18 @@ RuboCop::Cop::Sorbet::CheckedTrueInSignature::MESSAGE = T.let(T.unsafe(nil), Str # # good # { "User" => User }.fetch(class_name) # -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/constants_from_strings.rb#37 -class RuboCop::Cop::Sorbet::ConstantsFromStrings < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/constants_from_strings.rb#38 - def constant_from_string?(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/constants_from_strings.rb#42 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/constants_from_strings.rb#36 +class RuboCop::Cop::Sorbet::ConstantsFromStrings < ::RuboCop::Cop::Base + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/constants_from_strings.rb#46 def on_send(node); end end +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/constants_from_strings.rb#37 +RuboCop::Cop::Sorbet::ConstantsFromStrings::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/constants_from_strings.rb#40 +RuboCop::Cop::Sorbet::ConstantsFromStrings::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Checks for blank lines after signatures. # # @example @@ -1392,7 +1409,7 @@ RuboCop::Cop::Sorbet::TypeAliasName::MSG = T.let(T.unsafe(nil), String) # # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#20 class RuboCop::Cop::Sorbet::ValidSigil < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#35 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#36 def autocorrect(_node); end # So we can properly subclass this cop @@ -1404,56 +1421,56 @@ class RuboCop::Cop::Sorbet::ValidSigil < ::RuboCop::Cop::Cop # checks # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#70 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#71 def check_sigil_present(sigil); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#130 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#131 def check_strictness_level(sigil, strictness); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#108 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#109 def check_strictness_not_empty(sigil, strictness); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#119 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#120 def check_strictness_valid(sigil, strictness); end # Default is `nil` # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#180 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#181 def exact_strictness; end # extraction # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#58 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#59 def extract_sigil(processed_source); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#64 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#65 def extract_strictness(sigil); end # Default is `nil` # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#174 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#175 def minimum_strictness; end # Default is `false` # # @return [Boolean] # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#163 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#164 def require_sigil_on_all_files?; end # Default is `'false'` # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#168 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#169 def suggested_strictness; end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#86 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#87 def suggested_strictness_level; end end -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#54 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#55 RuboCop::Cop::Sorbet::ValidSigil::SIGIL_REGEX = T.let(T.unsafe(nil), Regexp) -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#53 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#54 RuboCop::Cop::Sorbet::ValidSigil::STRICTNESS_LEVELS = T.let(T.unsafe(nil), Array) # Disallows the usage of `.void.checked(:tests)`. diff --git a/sorbet/rbi/gems/rubocop@1.62.1.rbi b/sorbet/rbi/gems/rubocop@1.63.2.rbi similarity index 98% rename from sorbet/rbi/gems/rubocop@1.62.1.rbi rename to sorbet/rbi/gems/rubocop@1.63.2.rbi index e1758a6acd..b31bf2d311 100644 --- a/sorbet/rbi/gems/rubocop@1.62.1.rbi +++ b/sorbet/rbi/gems/rubocop@1.63.2.rbi @@ -999,7 +999,9 @@ class RuboCop::Config # source://rubocop//lib/rubocop/config.rb#237 def base_dir_for_path_parameters; end - # source://rubocop//lib/rubocop/config.rb#266 + # @return [String, nil] + # + # source://rubocop//lib/rubocop/config.rb#267 def bundler_lock_file_path; end # source://rubocop//lib/rubocop/config.rb#51 @@ -1075,7 +1077,12 @@ class RuboCop::Config # source://rubocop//lib/rubocop/config.rb#153 def for_department(department_name); end - # source://rubocop//lib/rubocop/config.rb#289 + # Returns target's locked gem versions (i.e. from Gemfile.lock or gems.locked) + # + # source://rubocop//lib/rubocop/config.rb#292 + def gem_versions_in_target; end + + # source://rubocop//lib/rubocop/config.rb#296 def inspect; end # True if this is a config file that is shipped with RuboCop @@ -1120,7 +1127,7 @@ class RuboCop::Config # source://rubocop//lib/rubocop/config.rb#220 def patterns_to_include; end - # source://rubocop//lib/rubocop/config.rb#277 + # source://rubocop//lib/rubocop/config.rb#278 def pending_cops; end # Returns true if there's a chance that an Include pattern matches hidden @@ -1166,18 +1173,31 @@ class RuboCop::Config private - # source://rubocop//lib/rubocop/config.rb#324 + # source://rubocop//lib/rubocop/config.rb#347 def department_of(qualified_cop_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#312 + # source://rubocop//lib/rubocop/config.rb#335 def enable_cop?(qualified_cop_name, cop_options); end - # source://rubocop//lib/rubocop/config.rb#299 + # @param gem_version [Gem::Version] an object like `Gem::Version.new("7.1.2.3")` + # @return [Float] The major and minor version, like `7.1` + # + # source://rubocop//lib/rubocop/config.rb#321 + def gem_version_to_major_minor_float(gem_version); end + + # source://rubocop//lib/rubocop/config.rb#328 + def read_gem_versions_from_target_lockfile; end + + # @return [Float, nil] The Rails version as a `major.minor` Float. + # + # source://rubocop//lib/rubocop/config.rb#308 def read_rails_version_from_bundler_lock_file; end - # source://rubocop//lib/rubocop/config.rb#295 + # @return [Float, nil] The Rails version as a `major.minor` Float. + # + # source://rubocop//lib/rubocop/config.rb#303 def target_rails_version_from_bundler_lock_file; end class << self @@ -2913,18 +2933,18 @@ class RuboCop::Cop::Base # @return [Base] a new instance of Base # - # source://rubocop//lib/rubocop/cop/base.rb#129 + # source://rubocop//lib/rubocop/cop/base.rb#153 def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#243 + # source://rubocop//lib/rubocop/cop/base.rb#269 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#162 + # source://rubocop//lib/rubocop/cop/base.rb#186 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) @@ -2932,25 +2952,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#172 + # source://rubocop//lib/rubocop/cop/base.rb#198 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#313 + # source://rubocop//lib/rubocop/cop/base.rb#340 def always_autocorrect?; end # Called before any investigation # # @api private # - # source://rubocop//lib/rubocop/cop/base.rb#299 + # source://rubocop//lib/rubocop/cop/base.rb#326 def begin_investigation(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end # @api private # - # source://rubocop//lib/rubocop/cop/base.rb#284 + # source://rubocop//lib/rubocop/cop/base.rb#311 def callbacks_needed; end # Returns the value of attribute config. @@ -2958,29 +2978,29 @@ class RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/base.rb#43 def config; end - # source://rubocop//lib/rubocop/cop/base.rb#223 + # source://rubocop//lib/rubocop/cop/base.rb#249 def config_to_allow_offenses; end - # source://rubocop//lib/rubocop/cop/base.rb#227 + # source://rubocop//lib/rubocop/cop/base.rb#253 def config_to_allow_offenses=(hash); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#319 + # source://rubocop//lib/rubocop/cop/base.rb#346 def contextual_autocorrect?; end # Configuration Helpers # - # source://rubocop//lib/rubocop/cop/base.rb#217 + # source://rubocop//lib/rubocop/cop/base.rb#243 def cop_config; end - # source://rubocop//lib/rubocop/cop/base.rb#209 + # source://rubocop//lib/rubocop/cop/base.rb#235 def cop_name; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#255 + # source://rubocop//lib/rubocop/cop/base.rb#282 def excluded_file?(file); end # This method should be overridden when a cop's behavior depends @@ -2999,51 +3019,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#205 + # source://rubocop//lib/rubocop/cop/base.rb#231 def external_dependency_checksum; end - # source://rubocop//lib/rubocop/cop/base.rb#323 + # source://rubocop//lib/rubocop/cop/base.rb#350 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#156 + # source://rubocop//lib/rubocop/cop/base.rb#180 def message(_range = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/base.rb#209 + # source://rubocop//lib/rubocop/cop/base.rb#235 def name; end # @deprecated Make potential errors with previous API more obvious # - # source://rubocop//lib/rubocop/cop/base.rb#275 + # source://rubocop//lib/rubocop/cop/base.rb#302 def offenses; end # Called after all on_... have been called # When refining this method, always call `super` # - # source://rubocop//lib/rubocop/cop/base.rb#143 + # source://rubocop//lib/rubocop/cop/base.rb#167 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#137 + # source://rubocop//lib/rubocop/cop/base.rb#161 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#149 + # source://rubocop//lib/rubocop/cop/base.rb#173 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#260 + # source://rubocop//lib/rubocop/cop/base.rb#287 def parse(source, path = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/base.rb#235 + # source://rubocop//lib/rubocop/cop/base.rb#261 def parser_engine; end # Returns the value of attribute processed_source. @@ -3055,99 +3075,104 @@ class RuboCop::Cop::Base # # @api private # - # source://rubocop//lib/rubocop/cop/base.rb#266 + # source://rubocop//lib/rubocop/cop/base.rb#293 def ready; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#247 + # source://rubocop//lib/rubocop/cop/base.rb#273 def relevant_file?(file); end - # source://rubocop//lib/rubocop/cop/base.rb#239 + # source://rubocop//lib/rubocop/cop/base.rb#265 def target_rails_version; end - # source://rubocop//lib/rubocop/cop/base.rb#231 + # source://rubocop//lib/rubocop/cop/base.rb#257 def target_ruby_version; end private - # source://rubocop//lib/rubocop/cop/base.rb#451 + # source://rubocop//lib/rubocop/cop/base.rb#478 def annotate(message); end - # source://rubocop//lib/rubocop/cop/base.rb#335 + # source://rubocop//lib/rubocop/cop/base.rb#362 def apply_correction(corrector); end # @return [Symbol] offense status # - # source://rubocop//lib/rubocop/cop/base.rb#415 + # source://rubocop//lib/rubocop/cop/base.rb#442 def attempt_correction(range, corrector); end # Reserved for Cop::Cop # - # source://rubocop//lib/rubocop/cop/base.rb#331 + # source://rubocop//lib/rubocop/cop/base.rb#358 def callback_argument(range); end # Called to complete an investigation # - # source://rubocop//lib/rubocop/cop/base.rb#364 + # source://rubocop//lib/rubocop/cop/base.rb#391 def complete_investigation; end # @return [Symbol, Corrector] offense status # - # source://rubocop//lib/rubocop/cop/base.rb#389 + # source://rubocop//lib/rubocop/cop/base.rb#416 def correct(range); end - # source://rubocop//lib/rubocop/cop/base.rb#349 + # source://rubocop//lib/rubocop/cop/base.rb#376 def current_corrector; end # Reserved for Commissioner: # - # source://rubocop//lib/rubocop/cop/base.rb#341 + # source://rubocop//lib/rubocop/cop/base.rb#368 def current_offense_locations; end - # source://rubocop//lib/rubocop/cop/base.rb#353 + # source://rubocop//lib/rubocop/cop/base.rb#380 def current_offenses; end - # source://rubocop//lib/rubocop/cop/base.rb#345 + # source://rubocop//lib/rubocop/cop/base.rb#372 def currently_disabled_lines; end - # source://rubocop//lib/rubocop/cop/base.rb#479 + # source://rubocop//lib/rubocop/cop/base.rb#506 def custom_severity; end - # source://rubocop//lib/rubocop/cop/base.rb#475 + # source://rubocop//lib/rubocop/cop/base.rb#502 def default_severity; end - # source://rubocop//lib/rubocop/cop/base.rb#429 + # source://rubocop//lib/rubocop/cop/base.rb#456 def disable_uncorrectable(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#465 + # source://rubocop//lib/rubocop/cop/base.rb#492 def enabled_line?(line_number); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#457 + # source://rubocop//lib/rubocop/cop/base.rb#484 def file_name_matches_any?(file, parameter, default_result); end - # source://rubocop//lib/rubocop/cop/base.rb#447 + # source://rubocop//lib/rubocop/cop/base.rb#474 def find_message(range, message); end - # source://rubocop//lib/rubocop/cop/base.rb#471 + # source://rubocop//lib/rubocop/cop/base.rb#498 def find_severity(_range, severity); end - # source://rubocop//lib/rubocop/cop/base.rb#492 + # source://rubocop//lib/rubocop/cop/base.rb#519 def range_for_original(range); end - # source://rubocop//lib/rubocop/cop/base.rb#436 + # source://rubocop//lib/rubocop/cop/base.rb#463 def range_from_node_or_range(node_or_range); end - # source://rubocop//lib/rubocop/cop/base.rb#384 + # source://rubocop//lib/rubocop/cop/base.rb#411 def reset_investigation; end + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/base.rb#527 + def target_satisfies_all_gem_version_requirements?; end + # @return [Symbol] offense status # - # source://rubocop//lib/rubocop/cop/base.rb#404 + # source://rubocop//lib/rubocop/cop/base.rb#431 def use_corrector(range, corrector); end class << self @@ -3162,18 +3187,18 @@ class RuboCop::Cop::Base # Naming # - # source://rubocop//lib/rubocop/cop/base.rb#89 + # source://rubocop//lib/rubocop/cop/base.rb#90 def badge; end # @api private # - # source://rubocop//lib/rubocop/cop/base.rb#289 + # source://rubocop//lib/rubocop/cop/base.rb#316 def callbacks_needed; end - # source://rubocop//lib/rubocop/cop/base.rb#93 + # source://rubocop//lib/rubocop/cop/base.rb#94 def cop_name; end - # source://rubocop//lib/rubocop/cop/base.rb#97 + # source://rubocop//lib/rubocop/cop/base.rb#98 def department; end # Cops (other than builtin) are encouraged to implement this @@ -3186,9 +3211,14 @@ class RuboCop::Cop::Base # Call for abstract Cop classes # - # source://rubocop//lib/rubocop/cop/base.rb#77 + # source://rubocop//lib/rubocop/cop/base.rb#78 def exclude_from_registry; end + # Returns the value of attribute gem_requirements. + # + # source://rubocop//lib/rubocop/cop/base.rb#135 + def gem_requirements; end + # @private # # source://rubocop//lib/rubocop/cop/base.rb#71 @@ -3196,12 +3226,12 @@ class RuboCop::Cop::Base # Override and return the Force class(es) you need to join # - # source://rubocop//lib/rubocop/cop/base.rb#114 + # source://rubocop//lib/rubocop/cop/base.rb#115 def joining_forces; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#101 + # source://rubocop//lib/rubocop/cop/base.rb#102 def lint?; end # Returns true if the cop name or the cop namespace matches any of the @@ -3209,15 +3239,30 @@ class RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#107 + # source://rubocop//lib/rubocop/cop/base.rb#108 def match?(given_names); end + # Register a version requirement for the given gem name. + # This cop will be skipped unless the target satisfies *all* requirements. + # + # @api public + # @param gem_name [String] + # @param version_requirements [Array] The version requirements, + # using the same syntax as a Gemfile, e.g. ">= 1.2.3" + # + # If omitted, any version of the gem will be accepted. + # + # https://guides.rubygems.org/patterns/#declaring-dependencies + # + # source://rubocop//lib/rubocop/cop/base.rb#148 + def requires_gem(gem_name, *version_requirements); end + # Returns if class supports autocorrect. # It is recommended to extend AutoCorrector instead of overriding # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#83 + # source://rubocop//lib/rubocop/cop/base.rb#84 def support_autocorrect?; end # Override if your cop should be called repeatedly for multiple investigations @@ -3230,22 +3275,22 @@ class RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#125 + # source://rubocop//lib/rubocop/cop/base.rb#126 def support_multiple_source?; end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#375 + # source://rubocop//lib/rubocop/cop/base.rb#402 def builtin?; end - # source://rubocop//lib/rubocop/cop/base.rb#357 + # source://rubocop//lib/rubocop/cop/base.rb#384 def restrict_on_send; end end end -# source://rubocop//lib/rubocop/cop/base.rb#361 +# source://rubocop//lib/rubocop/cop/base.rb#388 RuboCop::Cop::Base::EMPTY_OFFENSES = T.let(T.unsafe(nil), Array) # Reports of an investigation. @@ -4134,6 +4179,9 @@ module RuboCop::Cop::CodeLength # source://rubocop//lib/rubocop/cop/mixin/code_length.rb#45 def irrelevant_line(source_line); end + # source://rubocop//lib/rubocop/cop/mixin/code_length.rb#58 + def location(node); end + # source://rubocop//lib/rubocop/cop/mixin/code_length.rb#19 def max_length; end @@ -17383,6 +17431,11 @@ RuboCop::Cop::Lint::ConstantResolution::MSG = T.let(T.unsafe(nil), String) # MyDebugger.debug_this # ---- # +# Some gems also ship files that will start a debugging session when required, +# for example `require 'debug/start'` from `ruby/debug`. These requires can +# be configured through `DebuggerRequires`. It has the same structure as +# `DebuggerMethods`, which you can read about above. +# # @example # # # bad (ok during development) @@ -17415,43 +17468,56 @@ RuboCop::Cop::Lint::ConstantResolution::MSG = T.let(T.unsafe(nil), String) # def some_method # my_debugger # end +# @example DebuggerRequires: [my_debugger/start] +# +# # bad (ok during development) # -# source://rubocop//lib/rubocop/cop/lint/debugger.rb#67 +# require 'my_debugger/start' +# +# source://rubocop//lib/rubocop/cop/lint/debugger.rb#78 class RuboCop::Cop::Lint::Debugger < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#71 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#82 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#117 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#142 def assumed_argument?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#96 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#121 def assumed_usage_context?(node); end - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#106 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#131 def chained_method_name(send_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#90 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#108 def debugger_method?(send_node); end - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#83 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#94 def debugger_methods; end - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#79 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#114 + def debugger_require?(send_node); end + + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#101 + def debugger_requires; end + + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#90 def message(node); end end -# source://rubocop//lib/rubocop/cop/lint/debugger.rb#69 +# source://rubocop//lib/rubocop/cop/lint/debugger.rb#80 RuboCop::Cop::Lint::Debugger::BLOCK_TYPES = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/debugger.rb#68 +# source://rubocop//lib/rubocop/cop/lint/debugger.rb#79 RuboCop::Cop::Lint::Debugger::MSG = T.let(T.unsafe(nil), String) # Checks for uses of the deprecated class method usages. @@ -20466,7 +20532,7 @@ class RuboCop::Cop::Lint::MixedCaseRange < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#56 + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#58 def each_unsafe_regexp_range(node); end # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#37 @@ -20480,31 +20546,31 @@ class RuboCop::Cop::Lint::MixedCaseRange < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#72 + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#74 def build_source_range(range_start, range_end); end - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#76 + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#78 def range_for(char); end - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#82 + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#84 def range_pairs(expr); end - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#102 - def rewrite_regexp_range(source); end + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#104 + def regexp_range(source); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#92 + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#94 def skip_expression?(expr); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#96 + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#98 def skip_range?(range_start, range_end); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#86 + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#88 def unsafe_range?(range_start, range_end); end end @@ -22481,21 +22547,21 @@ class RuboCop::Cop::Lint::RedundantWithIndex < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#36 + # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#37 def on_block(node); end - # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#36 + # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#37 def on_numblock(node); end - # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#57 + # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#60 def redundant_with_index?(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#67 + # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#70 def message(node); end - # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#75 + # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#78 def with_index_range(send); end end @@ -24514,7 +24580,7 @@ class RuboCop::Cop::Lint::UnreachableLoop < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#194 + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#200 def conditional_continue_keyword?(break_statement); end # @return [Boolean] @@ -24524,7 +24590,7 @@ class RuboCop::Cop::Lint::UnreachableLoop < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#184 + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#190 def preceded_by_continue_statement?(break_statement); end # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#130 @@ -25887,6 +25953,11 @@ module RuboCop::Cop::MethodComplexity # # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#61 def complexity(body); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/mixin/method_complexity.rb#73 + def location(node); end end # Common code for cops that deal with preferred methods. @@ -27505,43 +27576,66 @@ class RuboCop::Cop::Naming::BlockForwarding < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#55 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#54 def on_def(node); end - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#55 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#54 def on_defs(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#95 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#114 def anonymous_block_argument?(node); end - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#127 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#87 + def block_argument_name_matched?(block_pass_node, last_argument); end + + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#146 def block_forwarding_name; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#81 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#77 def expected_block_forwarding_style?(node, last_argument); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#99 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#118 def explicit_block_argument?(node); end - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#103 + # Prevents the following syntax error: + # + # # foo.rb + # def foo(&) + # block_method do + # bar(&) + # end + # end + # + # $ ruby -vc foo.rb + # ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-darwin22] + # foo.rb: foo.rb:4: anonymous block parameter is also used within block (SyntaxError) + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#106 + def invalidates_syntax?(block_pass_node); end + + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#122 def register_offense(block_argument, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#119 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#138 def use_block_argument_as_local_variable?(node, last_argument); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#91 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#110 def use_kwarg_in_method_definition?(node); end class << self @@ -27767,8 +27861,6 @@ class RuboCop::Cop::Naming::FileName < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/naming/file_name.rb#165 def find_definition(node); end - # @yield [source_range(processed_source.buffer, 1, 0), msg] - # # source://rubocop//lib/rubocop/cop/naming/file_name.rb#65 def for_bad_filename(file_path); end @@ -28020,13 +28112,13 @@ class RuboCop::Cop::Naming::InclusiveLanguage < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#126 def check_token?(type); end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#244 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#243 def create_message(word, message = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#218 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#217 def create_multiple_word_message_for_file(words); end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#214 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#213 def create_single_word_message_for_file(word); end # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#189 @@ -28035,10 +28127,10 @@ class RuboCop::Cop::Naming::InclusiveLanguage < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#160 def extract_regexp(term, term_definition); end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#252 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#251 def find_flagged_term(word); end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#266 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#265 def format_suggestions(suggestions); end # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#197 @@ -28047,10 +28139,10 @@ class RuboCop::Cop::Naming::InclusiveLanguage < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#100 def investigate_tokens; end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#232 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#231 def mask_input(str); end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#281 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#280 def offense_range(token, word); end # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#130 @@ -28059,13 +28151,13 @@ class RuboCop::Cop::Naming::InclusiveLanguage < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#144 def preprocess_flagged_terms; end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#259 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#258 def preprocess_suggestions(suggestions); end # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#179 def process_allowed_regex(allowed); end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#222 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#221 def scan_for_words(input); end # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#174 @@ -30812,7 +30904,7 @@ class RuboCop::Cop::Style::Alias < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/alias.rb#51 + # source://rubocop//lib/rubocop/cop/style/alias.rb#52 def on_alias(node); end # source://rubocop//lib/rubocop/cop/style/alias.rb#41 @@ -30820,47 +30912,47 @@ class RuboCop::Cop::Style::Alias < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/alias.rb#85 + # source://rubocop//lib/rubocop/cop/style/alias.rb#86 def add_offense_for_args(node, &block); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/alias.rb#75 + # source://rubocop//lib/rubocop/cop/style/alias.rb#76 def alias_keyword_possible?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/alias.rb#79 + # source://rubocop//lib/rubocop/cop/style/alias.rb#80 def alias_method_possible?(node); end - # source://rubocop//lib/rubocop/cop/style/alias.rb#65 + # source://rubocop//lib/rubocop/cop/style/alias.rb#66 def autocorrect(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/alias.rb#124 + # source://rubocop//lib/rubocop/cop/style/alias.rb#125 def bareword?(sym_node); end - # source://rubocop//lib/rubocop/cop/style/alias.rb#128 + # source://rubocop//lib/rubocop/cop/style/alias.rb#129 def correct_alias_method_to_alias(corrector, send_node); end - # source://rubocop//lib/rubocop/cop/style/alias.rb#135 + # source://rubocop//lib/rubocop/cop/style/alias.rb#136 def correct_alias_to_alias_method(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/alias.rb#142 + # source://rubocop//lib/rubocop/cop/style/alias.rb#143 def correct_alias_with_symbol_args(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/alias.rb#147 + # source://rubocop//lib/rubocop/cop/style/alias.rb#148 def identifier(node); end - # source://rubocop//lib/rubocop/cop/style/alias.rb#113 + # source://rubocop//lib/rubocop/cop/style/alias.rb#114 def lexical_scope_type(node); end # In this expression, will `self` be the same as the innermost enclosing # class or module block (:lexical)? Or will it be something else # (:dynamic)? If we're in an instance_eval block, return that. # - # source://rubocop//lib/rubocop/cop/style/alias.rb#96 + # source://rubocop//lib/rubocop/cop/style/alias.rb#97 def scope_type(node); end end @@ -31109,7 +31201,7 @@ class RuboCop::Cop::Style::ArgumentsForwarding < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#185 def add_forward_all_offenses(node, send_classifications, forwardable_args); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#350 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#351 def add_parens_if_missing(node, corrector); end # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#212 @@ -31117,10 +31209,10 @@ class RuboCop::Cop::Style::ArgumentsForwarding < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#342 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#343 def allow_only_rest_arguments?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#334 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#335 def arguments_range(node, first_node); end # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#263 @@ -31131,7 +31223,7 @@ class RuboCop::Cop::Style::ArgumentsForwarding < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#494 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#495 def explicit_block_name?; end # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#168 @@ -31156,7 +31248,7 @@ class RuboCop::Cop::Style::ArgumentsForwarding < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#282 def redundant_named_arg(arg, config_name, keyword); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#324 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#325 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 @@ -31170,7 +31262,7 @@ class RuboCop::Cop::Style::ArgumentsForwarding < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#346 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#347 def use_anonymous_forwarding?; end class << self @@ -31199,115 +31291,115 @@ RuboCop::Cop::Style::ArgumentsForwarding::KWARGS_MSG = T.let(T.unsafe(nil), Stri # Classifies send nodes for possible rest/kwrest/all (including block) forwarding. # -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#357 +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#358 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#369 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#370 def initialize(def_node, send_node, referenced_lvars, forwardable_args, **config); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#397 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#398 def classification; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#364 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#365 def extract_forwarded_kwrest_arg(param0 = T.unsafe(nil), param1); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#391 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#392 def forwarded_block_arg; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#367 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#368 def forwarded_block_arg?(param0 = T.unsafe(nil), param1); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#385 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#386 def forwarded_kwrest_arg; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#379 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#380 def forwarded_rest_arg; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#361 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#362 def forwarded_rest_arg?(param0 = T.unsafe(nil), param1); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#465 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#466 def additional_kwargs?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#461 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#462 def additional_kwargs_or_forwarded_kwargs?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#475 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#476 def allow_offense_for_no_block?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#446 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#447 def any_arg_referenced?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#430 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#431 def arguments; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#409 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#410 def can_forward_all?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#469 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#470 def forward_additional_kwargs?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#426 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#427 def forwarded_rest_and_kwrest_args; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#488 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#489 def missing_rest_arg_or_kwrest_arg?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#479 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#480 def no_additional_args?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#454 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#455 def no_post_splat_args?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#422 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#423 def offensive_block_forwarding?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#442 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#443 def referenced_block_arg?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#438 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#439 def referenced_kwrest_arg?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#434 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#435 def referenced_rest_arg?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#418 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#419 def ruby_32_missing_rest_or_kwest?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#450 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#451 def target_ruby_version; end end @@ -32905,9 +32997,7 @@ RuboCop::Cop::Style::ClassVars::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # @example # # bad # array.reject(&:nil?) -# array.delete_if(&:nil?) # array.reject { |e| e.nil? } -# array.delete_if { |e| e.nil? } # array.select { |e| !e.nil? } # array.grep_v(nil) # array.grep_v(NilClass) @@ -32917,7 +33007,9 @@ RuboCop::Cop::Style::ClassVars::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # # # bad # hash.reject!(&:nil?) +# array.delete_if(&:nil?) # hash.reject! { |k, v| v.nil? } +# array.delete_if { |e| e.nil? } # hash.select! { |k, v| !v.nil? } # # # good @@ -34075,36 +34167,36 @@ class RuboCop::Cop::Style::Copyright < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/copyright.rb#47 + # source://rubocop//lib/rubocop/cop/style/copyright.rb#45 + def autocorrect(corrector); end + + # source://rubocop//lib/rubocop/cop/style/copyright.rb#56 def autocorrect_notice; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/copyright.rb#78 + # source://rubocop//lib/rubocop/cop/style/copyright.rb#83 def encoding_token?(processed_source, token_index); end - # source://rubocop//lib/rubocop/cop/style/copyright.rb#64 + # source://rubocop//lib/rubocop/cop/style/copyright.rb#69 def insert_notice_before(processed_source); end - # source://rubocop//lib/rubocop/cop/style/copyright.rb#43 + # source://rubocop//lib/rubocop/cop/style/copyright.rb#52 def notice; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/copyright.rb#85 + # source://rubocop//lib/rubocop/cop/style/copyright.rb#90 def notice_found?(processed_source); end - # source://rubocop//lib/rubocop/cop/style/copyright.rb#51 - def offense_range; end - # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/copyright.rb#71 + # source://rubocop//lib/rubocop/cop/style/copyright.rb#76 def shebang_token?(processed_source, token_index); end # @raise [Warning] # - # source://rubocop//lib/rubocop/cop/style/copyright.rb#55 + # source://rubocop//lib/rubocop/cop/style/copyright.rb#60 def verify_autocorrect_notice!; end end @@ -35827,19 +35919,19 @@ class RuboCop::Cop::Style::EvalWithLocation < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#184 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#186 def add_offense_for_different_line(node, line_node, line_diff); end # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#131 def add_offense_for_incorrect_line(method_name, line_node, sign, line_diff); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#199 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#201 def add_offense_for_missing_line(node, code); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#206 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#208 def add_offense_for_missing_location(node, code); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#178 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#180 def add_offense_for_same_line(node, line_node); end # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#143 @@ -35851,16 +35943,16 @@ class RuboCop::Cop::Style::EvalWithLocation < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#95 def check_location(node, code); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#191 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#193 def expected_line(sign, line_diff); end # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#122 def file_and_line(node); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#166 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#168 def line_difference(line_node, code); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#218 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#220 def missing_line(node, code); end # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#109 @@ -35876,7 +35968,7 @@ class RuboCop::Cop::Style::EvalWithLocation < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#118 def special_line_keyword?(node); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#170 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#172 def string_first_line(str_node); end # @return [Boolean] @@ -35971,10 +36063,10 @@ class RuboCop::Cop::Style::ExactRegexpMatch < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#56 + # source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#57 def exact_match_pattern?(parsed_regexp); end - # source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#63 + # source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#64 def new_method(node); end end @@ -36736,25 +36828,25 @@ RuboCop::Cop::Style::For::PREFER_FOR = T.let(T.unsafe(nil), String) # # @example EnforcedStyle: format (default) # # bad -# puts sprintf('%10s', 'hoge') -# puts '%10s' % 'hoge' +# puts sprintf('%10s', 'foo') +# puts '%10s' % 'foo' # # # good -# puts format('%10s', 'hoge') +# puts format('%10s', 'foo') # @example EnforcedStyle: sprintf # # bad -# puts format('%10s', 'hoge') -# puts '%10s' % 'hoge' +# puts format('%10s', 'foo') +# puts '%10s' % 'foo' # # # good -# puts sprintf('%10s', 'hoge') +# puts sprintf('%10s', 'foo') # @example EnforcedStyle: percent # # bad -# puts format('%10s', 'hoge') -# puts sprintf('%10s', 'hoge') +# puts format('%10s', 'foo') +# puts sprintf('%10s', 'foo') # # # good -# puts '%10s' % 'hoge' +# puts '%10s' % 'foo' # # source://rubocop//lib/rubocop/cop/style/format_string.rb#50 class RuboCop::Cop::Style::FormatString < ::RuboCop::Cop::Base @@ -39700,6 +39792,109 @@ end # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#43 RuboCop::Cop::Style::MapCompactWithConditionalBlock::MSG = T.let(T.unsafe(nil), String) +# Checks for usages of `each` with `<<`, `push`, or `append` which +# can be replaced by `map`. +# +# If `PreferredMethods` is configured for `map` in `Style/CollectionMethods`, +# this cop uses the specified method for replacement. +# +# NOTE: The return value of `Enumerable#each` is `self`, whereas the +# return value of `Enumerable#map` is an `Array`. They are not autocorrected +# when a return value could be used because these types differ. +# +# NOTE: It only detects when the mapping destination is a local variable +# initialized as an empty array and referred to only by the pushing operation. +# This is because, if not, it's challenging to statically guarantee that the +# mapping destination variable remains an empty array: +# +# [source,ruby] +# ---- +# ret = [] +# src.each { |e| ret << e * 2 } # `<<` method may mutate `ret` +# +# dest = [] +# src.each { |e| dest << transform(e, dest) } # `transform` method may mutate `dest` +# ---- +# +# @example +# # bad +# dest = [] +# src.each { |e| dest << e * 2 } +# dest +# +# # good +# dest = src.map { |e| e * 2 } +# +# # good - contains another operation +# dest = [] +# src.each { |e| dest << e * 2; puts e } +# dest +# +# source://rubocop//lib/rubocop/cop/style/map_into_array.rb#50 +class RuboCop::Cop::Style::MapIntoArray < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#75 + def after_leaving_scope(scope, _variable_table); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#57 + def each_block_with_push?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#66 + def empty_array_asgn?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#69 + def lvar_ref?(param0 = T.unsafe(nil), param1); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#79 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#79 + def on_numblock(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#155 + def correct_push_node(corrector, push_node); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#163 + def correct_return_value_handling(corrector, block, dest_var); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#108 + def dest_used_only_for_mapping?(block, dest_var, asgn); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#102 + def find_closest_assignment(block, dest_var); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#94 + def find_dest_var(block); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#127 + def new_method_name; end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#116 + def register_offense(block, dest_var, asgn); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#148 + def remove_assignment(corrector, asgn); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#133 + def return_value_used?(node); end + + class << self + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#71 + def joining_forces; end + end +end + +# source://rubocop//lib/rubocop/cop/style/map_into_array.rb#54 +RuboCop::Cop::Style::MapIntoArray::MSG = T.let(T.unsafe(nil), String) + # Looks for uses of `map.to_h` or `collect.to_h` that could be # written with just `to_h` in Ruby >= 2.6. # @@ -41630,7 +41825,7 @@ class RuboCop::Cop::Style::MutableConstant < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-sorbet/0.7.8/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#18 + # source://rubocop-sorbet/0.8.1/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 @@ -41648,7 +41843,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.7.8/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#12 + # source://rubocop-sorbet/0.8.1/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#12 def t_let(param0 = T.unsafe(nil)); end private @@ -44313,10 +44508,20 @@ class RuboCop::Cop::Style::RedundantArgument < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#94 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#108 + def argument_matched?(target_argument, redundant_argument); end + + # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#100 def argument_range(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#87 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#120 + def exclude_cntrl_character?(target_argument, redundant_argument); end + + # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#93 def redundant_arg_for_method(method_name); end # @return [Boolean] @@ -44925,16 +45130,19 @@ class RuboCop::Cop::Style::RedundantCurrentDirectoryInPath < ::RuboCop::Cop::Bas include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#23 + # source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#24 def on_send(node); end end -# source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#21 +# source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#22 RuboCop::Cop::Style::RedundantCurrentDirectoryInPath::CURRENT_DIRECTORY_PATH = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#20 RuboCop::Cop::Style::RedundantCurrentDirectoryInPath::MSG = T.let(T.unsafe(nil), String) +# source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#21 +RuboCop::Cop::Style::RedundantCurrentDirectoryInPath::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Checks for redundant uses of double splat hash braces. # # @example @@ -45697,17 +45905,12 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#168 - def allowed_type?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#186 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#180 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#144 def argument_newline?(node); end # @return [Boolean] @@ -45715,12 +45918,12 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#101 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#160 def find_node_for_line(line); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#133 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#131 def inside_string_literal?(range, token); end # @return [Boolean] @@ -45735,7 +45938,7 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#193 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#187 def method_call_with_arguments?(node); end # A method call without parentheses such as the following cannot remove `\`: @@ -45745,7 +45948,7 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#141 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#139 def method_with_argument?(current_token, next_token); end # @return [Boolean] @@ -45760,12 +45963,12 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#172 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#166 def same_line?(node, line); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#197 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#191 def start_with_arithmetic_operator?(source_line); end # @return [Boolean] @@ -51810,22 +52013,22 @@ class RuboCop::Cop::Team # source://rubocop//lib/rubocop/cop/team.rb#121 def autocorrect(processed_source, report, original:, offset:); end - # source://rubocop//lib/rubocop/cop/team.rb#182 + # source://rubocop//lib/rubocop/cop/team.rb#185 def autocorrect_report(report, offset:, original:); end # source://rubocop//lib/rubocop/cop/team.rb#140 def be_ready; end - # source://rubocop//lib/rubocop/cop/team.rb#188 + # source://rubocop//lib/rubocop/cop/team.rb#191 def collate_corrections(report, offset:, original:); end - # source://rubocop//lib/rubocop/cop/team.rb#204 + # source://rubocop//lib/rubocop/cop/team.rb#207 def each_corrector(report); end - # source://rubocop//lib/rubocop/cop/team.rb#254 + # source://rubocop//lib/rubocop/cop/team.rb#257 def handle_error(error, location, cop); end - # source://rubocop//lib/rubocop/cop/team.rb#246 + # source://rubocop//lib/rubocop/cop/team.rb#249 def handle_warning(error, location); end # @return [Commissioner::InvestigationReport] @@ -51833,7 +52036,7 @@ class RuboCop::Cop::Team # source://rubocop//lib/rubocop/cop/team.rb#154 def investigate_partial(cops, processed_source, offset:, original:); end - # source://rubocop//lib/rubocop/cop/team.rb#231 + # source://rubocop//lib/rubocop/cop/team.rb#234 def process_errors(file, errors); end # source://rubocop//lib/rubocop/cop/team.rb#148 @@ -51854,10 +52057,10 @@ class RuboCop::Cop::Team # source://rubocop//lib/rubocop/cop/team.rb#170 def support_target_ruby_version?(cop); end - # source://rubocop//lib/rubocop/cop/team.rb#219 + # source://rubocop//lib/rubocop/cop/team.rb#222 def suppress_clobbering; end - # source://rubocop//lib/rubocop/cop/team.rb#225 + # source://rubocop//lib/rubocop/cop/team.rb#228 def validate_config; end class << self @@ -54379,10 +54582,10 @@ class RuboCop::Formatter::ClangStyleFormatter < ::RuboCop::Formatter::SimpleText private - # source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#51 + # source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#47 def report_highlighted_area(highlighted_area); end - # source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#41 + # source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#37 def report_line(location); end # source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#17 @@ -54390,7 +54593,7 @@ class RuboCop::Formatter::ClangStyleFormatter < ::RuboCop::Formatter::SimpleText # @return [Boolean] # - # source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#37 + # source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#33 def valid_line?(offense); end end @@ -55333,10 +55536,10 @@ class RuboCop::Formatter::TapFormatter < ::RuboCop::Formatter::ClangStyleFormatt private - # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#66 + # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#62 def annotate_message(msg); end - # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#70 + # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#66 def message(offense); end # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#39 @@ -55682,31 +55885,59 @@ RuboCop::LSP::Severity::SEVERITIES = T.let(T.unsafe(nil), Hash) # # source://rubocop//lib/rubocop/lockfile.rb#7 class RuboCop::Lockfile - # Gems that the bundle depends on - # # @api private + # @param lockfile_path [String, Pathname, nil] + # @return [Lockfile] a new instance of Lockfile # # source://rubocop//lib/rubocop/lockfile.rb#9 + def initialize(lockfile_path = T.unsafe(nil)); end + + # Gems that the bundle directly depends on. + # + # @api private + # @return [Array, nil] + # + # source://rubocop//lib/rubocop/lockfile.rb#17 def dependencies; end - # All activated gems, including transitive dependencies + # Returns the locked versions of gems from this lockfile. # # @api private + # @param include_transitive_dependencies: [Boolean] When false, only direct dependencies + # are returned, i.e. those listed explicitly in the `Gemfile`. # - # source://rubocop//lib/rubocop/lockfile.rb#16 + # source://rubocop//lib/rubocop/lockfile.rb#37 + def gem_versions(include_transitive_dependencies: T.unsafe(nil)); end + + # All activated gems, including transitive dependencies. + # + # @api private + # @return [Array, nil] + # + # source://rubocop//lib/rubocop/lockfile.rb#25 def gems; end + # Whether this lockfile includes the named gem, directly or indirectly. + # # @api private + # @param name [String] # @return [Boolean] # - # source://rubocop//lib/rubocop/lockfile.rb#24 + # source://rubocop//lib/rubocop/lockfile.rb#53 def includes_gem?(name); end private # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/lockfile.rb#73 + def bundler_lock_parser_defined?; end + + # @api private + # @return [Bundler::LockfileParser, nil] # - # source://rubocop//lib/rubocop/lockfile.rb#30 + # source://rubocop//lib/rubocop/lockfile.rb#60 def parser; end end @@ -56558,36 +56789,36 @@ module RuboCop::RSpec; end # # source://rubocop//lib/rubocop/rspec/expect_offense.rb#103 module RuboCop::RSpec::ExpectOffense - # source://rubocop//lib/rubocop/rspec/expect_offense.rb#130 + # source://rubocop//lib/rubocop/rspec/expect_offense.rb#138 def expect_correction(correction, loop: T.unsafe(nil), source: T.unsafe(nil)); end # @raise [RuboCop::Runner::InfiniteCorrectionLoop] # - # source://rubocop//lib/rubocop/rspec/expect_offense.rb#167 + # source://rubocop//lib/rubocop/rspec/expect_offense.rb#175 def expect_no_corrections; end - # source://rubocop//lib/rubocop/rspec/expect_offense.rb#181 + # source://rubocop//lib/rubocop/rspec/expect_offense.rb#189 def expect_no_offenses(source, file = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/rspec/expect_offense.rb#114 + # source://rubocop//lib/rubocop/rspec/expect_offense.rb#115 def expect_offense(source, file = T.unsafe(nil), severity: T.unsafe(nil), chomp: T.unsafe(nil), **replacements); end # source://rubocop//lib/rubocop/rspec/expect_offense.rb#104 def format_offense(source, **replacements); end - # source://rubocop//lib/rubocop/rspec/expect_offense.rb#189 + # source://rubocop//lib/rubocop/rspec/expect_offense.rb#197 def parse_annotations(source, raise_error: T.unsafe(nil), **replacements); end - # source://rubocop//lib/rubocop/rspec/expect_offense.rb#199 + # source://rubocop//lib/rubocop/rspec/expect_offense.rb#207 def parse_processed_source(source, file = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/rspec/expect_offense.rb#207 + # source://rubocop//lib/rubocop/rspec/expect_offense.rb#215 def set_formatter_options; end end # Parsed representation of code annotated with the `^^^ Message` style # -# source://rubocop//lib/rubocop/rspec/expect_offense.rb#214 +# source://rubocop//lib/rubocop/rspec/expect_offense.rb#222 class RuboCop::RSpec::ExpectOffense::AnnotatedSource # @note annotations are sorted so that reconstructing the annotation # text via {#to_s} is deterministic @@ -56595,10 +56826,10 @@ class RuboCop::RSpec::ExpectOffense::AnnotatedSource # @param annotations [Array<(Integer, String)>] each entry is the annotated line number and the annotation text # @return [AnnotatedSource] a new instance of AnnotatedSource # - # source://rubocop//lib/rubocop/rspec/expect_offense.rb#246 + # source://rubocop//lib/rubocop/rspec/expect_offense.rb#254 def initialize(lines, annotations); end - # source://rubocop//lib/rubocop/rspec/expect_offense.rb#251 + # source://rubocop//lib/rubocop/rspec/expect_offense.rb#259 def ==(other); end # Construct annotated source string (like what we parse) @@ -56623,7 +56854,7 @@ class RuboCop::RSpec::ExpectOffense::AnnotatedSource # source1.to_s == source2.to_s # => true # @return [String] # - # source://rubocop//lib/rubocop/rspec/expect_offense.rb#293 + # source://rubocop//lib/rubocop/rspec/expect_offense.rb#301 def inspect; end # Dirty hack: expectations with [...] are rewritten when they match @@ -56631,14 +56862,14 @@ class RuboCop::RSpec::ExpectOffense::AnnotatedSource # # @return [Boolean] # - # source://rubocop//lib/rubocop/rspec/expect_offense.rb#257 + # source://rubocop//lib/rubocop/rspec/expect_offense.rb#265 def match_annotations?(other); end # Return the plain source code without annotations # # @return [String] # - # source://rubocop//lib/rubocop/rspec/expect_offense.rb#307 + # source://rubocop//lib/rubocop/rspec/expect_offense.rb#315 def plain_source; end # Construct annotated source string (like what we parse) @@ -56664,7 +56895,7 @@ class RuboCop::RSpec::ExpectOffense::AnnotatedSource # source1.to_s == source2.to_s # => true # @return [String] # - # source://rubocop//lib/rubocop/rspec/expect_offense.rb#293 + # source://rubocop//lib/rubocop/rspec/expect_offense.rb#301 def to_s; end # Annotate the source code with the RuboCop offenses provided @@ -56672,19 +56903,19 @@ class RuboCop::RSpec::ExpectOffense::AnnotatedSource # @param offenses [Array] # @return [self] # - # source://rubocop//lib/rubocop/rspec/expect_offense.rb#316 + # source://rubocop//lib/rubocop/rspec/expect_offense.rb#324 def with_offense_annotations(offenses); end protected # Returns the value of attribute annotations. # - # source://rubocop//lib/rubocop/rspec/expect_offense.rb#331 + # source://rubocop//lib/rubocop/rspec/expect_offense.rb#339 def annotations; end # Returns the value of attribute lines. # - # source://rubocop//lib/rubocop/rspec/expect_offense.rb#331 + # source://rubocop//lib/rubocop/rspec/expect_offense.rb#339 def lines; end class << self @@ -56694,15 +56925,15 @@ class RuboCop::RSpec::ExpectOffense::AnnotatedSource # @param annotated_source [String] string passed to the matchers # @return [AnnotatedSource] # - # source://rubocop//lib/rubocop/rspec/expect_offense.rb#224 + # source://rubocop//lib/rubocop/rspec/expect_offense.rb#232 def parse(annotated_source); end end end -# source://rubocop//lib/rubocop/rspec/expect_offense.rb#216 +# source://rubocop//lib/rubocop/rspec/expect_offense.rb#224 RuboCop::RSpec::ExpectOffense::AnnotatedSource::ABBREV = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/rspec/expect_offense.rb#215 +# source://rubocop//lib/rubocop/rspec/expect_offense.rb#223 RuboCop::RSpec::ExpectOffense::AnnotatedSource::ANNOTATION_PATTERN = T.let(T.unsafe(nil), Regexp) # Common methods and behaviors for dealing with remote config files. @@ -56977,145 +57208,145 @@ RuboCop::ResultCache::NON_CHANGING = T.let(T.unsafe(nil), Array) class RuboCop::Runner # @return [Runner] a new instance of Runner # - # source://rubocop//lib/rubocop/runner.rb#59 + # source://rubocop//lib/rubocop/runner.rb#62 def initialize(options, config_store); end # Sets the attribute aborting # # @param value the value to set the attribute aborting to. # - # source://rubocop//lib/rubocop/runner.rb#57 + # source://rubocop//lib/rubocop/runner.rb#60 def aborting=(_arg0); end # @return [Boolean] # - # source://rubocop//lib/rubocop/runner.rb#83 + # source://rubocop//lib/rubocop/runner.rb#86 def aborting?; end # Returns the value of attribute errors. # - # source://rubocop//lib/rubocop/runner.rb#56 + # source://rubocop//lib/rubocop/runner.rb#59 def errors; end - # source://rubocop//lib/rubocop/runner.rb#67 + # source://rubocop//lib/rubocop/runner.rb#70 def run(paths); end # Returns the value of attribute warnings. # - # source://rubocop//lib/rubocop/runner.rb#56 + # source://rubocop//lib/rubocop/runner.rb#59 def warnings; end private - # source://rubocop//lib/rubocop/runner.rb#196 + # source://rubocop//lib/rubocop/runner.rb#199 def add_redundant_disables(file, offenses, source); end - # source://rubocop//lib/rubocop/runner.rb#170 + # source://rubocop//lib/rubocop/runner.rb#173 def cached_result(file, team); end # @return [Boolean] # - # source://rubocop//lib/rubocop/runner.rb#250 + # source://rubocop//lib/rubocop/runner.rb#253 def cached_run?; end # Check whether a run created source identical to a previous run, which # means that we definitely have an infinite loop. # - # source://rubocop//lib/rubocop/runner.rb#328 + # source://rubocop//lib/rubocop/runner.rb#331 def check_for_infinite_loop(processed_source, offenses_by_iteration); end # @return [Boolean] # - # source://rubocop//lib/rubocop/runner.rb#222 + # source://rubocop//lib/rubocop/runner.rb#225 def check_for_redundant_disables?(source); end # @return [Boolean] # - # source://rubocop//lib/rubocop/runner.rb#423 + # source://rubocop//lib/rubocop/runner.rb#426 def considered_failure?(offense); end - # source://rubocop//lib/rubocop/runner.rb#456 + # source://rubocop//lib/rubocop/runner.rb#459 def default_config(cop_name); end - # source://rubocop//lib/rubocop/runner.rb#272 + # source://rubocop//lib/rubocop/runner.rb#275 def do_inspection_loop(file); end - # source://rubocop//lib/rubocop/runner.rb#133 + # source://rubocop//lib/rubocop/runner.rb#136 def each_inspected_file(files); end # @return [Boolean] # - # source://rubocop//lib/rubocop/runner.rb#236 + # source://rubocop//lib/rubocop/runner.rb#239 def except_redundant_cop_disable_directive?; end - # source://rubocop//lib/rubocop/runner.rb#357 + # source://rubocop//lib/rubocop/runner.rb#360 def extract_ruby_sources(processed_source); end - # source://rubocop//lib/rubocop/runner.rb#245 + # source://rubocop//lib/rubocop/runner.rb#248 def file_finished(file, offenses); end - # source://rubocop//lib/rubocop/runner.rb#174 + # source://rubocop//lib/rubocop/runner.rb#177 def file_offense_cache(file); end - # source://rubocop//lib/rubocop/runner.rb#162 + # source://rubocop//lib/rubocop/runner.rb#165 def file_offenses(file); end - # source://rubocop//lib/rubocop/runner.rb#240 + # source://rubocop//lib/rubocop/runner.rb#243 def file_started(file); end - # source://rubocop//lib/rubocop/runner.rb#403 + # source://rubocop//lib/rubocop/runner.rb#406 def filter_cop_classes(cop_classes, config); end - # source://rubocop//lib/rubocop/runner.rb#104 + # source://rubocop//lib/rubocop/runner.rb#107 def find_target_files(paths); end - # source://rubocop//lib/rubocop/runner.rb#414 + # source://rubocop//lib/rubocop/runner.rb#417 def formatter_set; end - # source://rubocop//lib/rubocop/runner.rb#471 + # source://rubocop//lib/rubocop/runner.rb#474 def get_processed_source(file); end - # source://rubocop//lib/rubocop/runner.rb#342 + # source://rubocop//lib/rubocop/runner.rb#345 def inspect_file(processed_source, team = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/runner.rb#115 + # source://rubocop//lib/rubocop/runner.rb#118 def inspect_files(files); end - # source://rubocop//lib/rubocop/runner.rb#303 + # source://rubocop//lib/rubocop/runner.rb#306 def iterate_until_no_changes(source, offenses_by_iteration); end - # source://rubocop//lib/rubocop/runner.rb#148 + # source://rubocop//lib/rubocop/runner.rb#151 def list_files(paths); end # @return [Boolean] # - # source://rubocop//lib/rubocop/runner.rb#452 + # source://rubocop//lib/rubocop/runner.rb#455 def mark_as_safe_by_config?(config); end - # source://rubocop//lib/rubocop/runner.rb#460 + # source://rubocop//lib/rubocop/runner.rb#463 def minimum_severity_to_fail; end - # source://rubocop//lib/rubocop/runner.rb#364 + # source://rubocop//lib/rubocop/runner.rb#367 def mobilize_team(processed_source); end - # source://rubocop//lib/rubocop/runner.rb#369 + # source://rubocop//lib/rubocop/runner.rb#372 def mobilized_cop_classes(config); end - # source://rubocop//lib/rubocop/runner.rb#432 + # source://rubocop//lib/rubocop/runner.rb#435 def offenses_to_report(offenses); end - # source://rubocop//lib/rubocop/runner.rb#152 + # source://rubocop//lib/rubocop/runner.rb#155 def process_file(file); end - # source://rubocop//lib/rubocop/runner.rb#393 + # source://rubocop//lib/rubocop/runner.rb#396 def qualify_option_cop_names; end # @yield [cop] # - # source://rubocop//lib/rubocop/runner.rb#228 + # source://rubocop//lib/rubocop/runner.rb#231 def redundant_cop_disable_directive(file); end - # source://rubocop//lib/rubocop/runner.rb#262 + # source://rubocop//lib/rubocop/runner.rb#265 def save_in_cache(cache, offenses); end # A Cop::Team instance is stateful and may change when inspecting. @@ -57123,41 +57354,41 @@ class RuboCop::Runner # otherwise dormant team that can be used for config- and option- # level caching in ResultCache. # - # source://rubocop//lib/rubocop/runner.rb#499 + # source://rubocop//lib/rubocop/runner.rb#502 def standby_team(config); end # @return [Boolean] # - # source://rubocop//lib/rubocop/runner.rb#410 + # source://rubocop//lib/rubocop/runner.rb#413 def style_guide_cops_only?(config); end # @return [Boolean] # - # source://rubocop//lib/rubocop/runner.rb#444 + # source://rubocop//lib/rubocop/runner.rb#447 def supports_safe_autocorrect?(offense); end # @yield [team] # - # source://rubocop//lib/rubocop/runner.rb#211 + # source://rubocop//lib/rubocop/runner.rb#214 def team_for_redundant_disables(file, offenses, source); end # Warms up the RuboCop cache by forking a suitable number of RuboCop # instances that each inspects its allotted group of files. # - # source://rubocop//lib/rubocop/runner.rb#91 + # source://rubocop//lib/rubocop/runner.rb#94 def warm_cache(target_files); end class << self # @return [Array<#call>] # - # source://rubocop//lib/rubocop/runner.rb#29 + # source://rubocop//lib/rubocop/runner.rb#32 def ruby_extractors; end private # @return [#call] # - # source://rubocop//lib/rubocop/runner.rb#36 + # source://rubocop//lib/rubocop/runner.rb#39 def default_ruby_extractor; end end end @@ -57180,12 +57411,12 @@ end # @api private # -# source://rubocop//lib/rubocop/runner.rb#49 +# source://rubocop//lib/rubocop/runner.rb#52 RuboCop::Runner::MAX_ITERATIONS = T.let(T.unsafe(nil), Integer) # @api private # -# source://rubocop//lib/rubocop/runner.rb#52 +# source://rubocop//lib/rubocop/runner.rb#55 RuboCop::Runner::REDUNDANT_COP_DISABLE_DIRECTIVE_RULES = T.let(T.unsafe(nil), Array) # Take a string with embedded escapes, and convert the escapes as the Ruby diff --git a/sorbet/rbi/gems/tapioca@0.13.1.rbi b/sorbet/rbi/gems/tapioca@0.13.3.rbi similarity index 98% rename from sorbet/rbi/gems/tapioca@0.13.1.rbi rename to sorbet/rbi/gems/tapioca@0.13.3.rbi index 2ea240e882..64b8e7d8b7 100644 --- a/sorbet/rbi/gems/tapioca@0.13.1.rbi +++ b/sorbet/rbi/gems/tapioca@0.13.3.rbi @@ -54,7 +54,7 @@ module RBI; end # source://tapioca//lib/tapioca/rbi_ext/model.rb#5 class RBI::Tree < ::RBI::NodeWithComments - # source://rbi/0.1.9/lib/rbi/model.rb#119 + # source://rbi/0.1.11/lib/rbi/model.rb#119 sig do params( loc: T.nilable(::RBI::Loc), @@ -64,19 +64,19 @@ class RBI::Tree < ::RBI::NodeWithComments end def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi/0.1.9/lib/rbi/model.rb#126 + # source://rbi/0.1.11/lib/rbi/model.rb#126 sig { params(node: ::RBI::Node).void } def <<(node); end - # source://rbi/0.1.9/lib/rbi/printer.rb#226 + # source://rbi/0.1.11/lib/rbi/printer.rb#226 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi/0.1.9/lib/rbi/rewriters/add_sig_templates.rb#66 + # source://rbi/0.1.11/lib/rbi/rewriters/add_sig_templates.rb#66 sig { params(with_todo_comment: T::Boolean).void } def add_sig_templates!(with_todo_comment: T.unsafe(nil)); end - # source://rbi/0.1.9/lib/rbi/rewriters/annotate.rb#49 + # source://rbi/0.1.11/lib/rbi/rewriters/annotate.rb#49 sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void } def annotate!(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end @@ -115,7 +115,7 @@ class RBI::Tree < ::RBI::NodeWithComments end def create_method(name, parameters: T.unsafe(nil), return_type: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil), comments: T.unsafe(nil)); end - # source://tapioca//lib/tapioca/rbi_ext/model.rb#112 + # source://tapioca//lib/tapioca/rbi_ext/model.rb#113 sig do params( name: ::String, @@ -140,9 +140,9 @@ class RBI::Tree < ::RBI::NodeWithComments sig { params(constant: ::Module, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) } def create_path(constant, &block); end - # source://tapioca//lib/tapioca/rbi_ext/model.rb#133 - sig { params(parameters: T::Array[::RBI::TypedParam], return_type: ::String).returns(::RBI::Sig) } - def create_sig(parameters: T.unsafe(nil), return_type: T.unsafe(nil)); end + # source://tapioca//lib/tapioca/rbi_ext/model.rb#134 + sig { params(parameters: T::Hash[T.any(::String, ::Symbol), ::String], return_type: ::String).returns(::RBI::Sig) } + def create_sig(parameters:, return_type: T.unsafe(nil)); end # source://tapioca//lib/tapioca/rbi_ext/model.rb#74 sig do @@ -157,27 +157,27 @@ class RBI::Tree < ::RBI::NodeWithComments end def create_type_variable(name, type:, variance: T.unsafe(nil), fixed: T.unsafe(nil), upper: T.unsafe(nil), lower: T.unsafe(nil)); end - # source://rbi/0.1.9/lib/rbi/rewriters/deannotate.rb#41 + # source://rbi/0.1.11/lib/rbi/rewriters/deannotate.rb#41 sig { params(annotation: ::String).void } def deannotate!(annotation); end - # source://rbi/0.1.9/lib/rbi/model.rb#132 + # source://rbi/0.1.11/lib/rbi/model.rb#132 sig { returns(T::Boolean) } def empty?; end - # source://rbi/0.1.9/lib/rbi/rewriters/filter_versions.rb#118 + # source://rbi/0.1.11/lib/rbi/rewriters/filter_versions.rb#118 sig { params(version: ::Gem::Version).void } def filter_versions!(version); end - # source://rbi/0.1.9/lib/rbi/rewriters/group_nodes.rb#38 + # source://rbi/0.1.11/lib/rbi/rewriters/group_nodes.rb#38 sig { void } def group_nodes!; end - # source://rbi/0.1.9/lib/rbi/index.rb#68 + # source://rbi/0.1.11/lib/rbi/index.rb#68 sig { returns(::RBI::Index) } def index; end - # source://rbi/0.1.9/lib/rbi/rewriters/merge_trees.rb#324 + # source://rbi/0.1.11/lib/rbi/rewriters/merge_trees.rb#324 sig do params( other: ::RBI::Tree, @@ -188,44 +188,44 @@ class RBI::Tree < ::RBI::NodeWithComments end def merge(other, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end - # source://rbi/0.1.9/lib/rbi/rewriters/nest_non_public_methods.rb#46 + # source://rbi/0.1.11/lib/rbi/rewriters/nest_non_public_methods.rb#46 sig { void } def nest_non_public_methods!; end - # source://rbi/0.1.9/lib/rbi/rewriters/nest_singleton_methods.rb#36 + # source://rbi/0.1.11/lib/rbi/rewriters/nest_singleton_methods.rb#36 sig { void } def nest_singleton_methods!; end - # source://rbi/0.1.9/lib/rbi/model.rb#110 + # source://rbi/0.1.11/lib/rbi/model.rb#110 sig { returns(T::Array[::RBI::Node]) } def nodes; end - # source://rbi/0.1.9/lib/rbi/printer.rb#233 + # source://rbi/0.1.11/lib/rbi/printer.rb#233 sig { override.returns(T::Boolean) } def oneline?; end - # source://rbi/0.1.9/lib/rbi/rewriters/sort_nodes.rb#119 + # source://rbi/0.1.11/lib/rbi/rewriters/sort_nodes.rb#119 sig { void } def sort_nodes!; end private - # source://tapioca//lib/tapioca/rbi_ext/model.rb#148 + # source://tapioca//lib/tapioca/rbi_ext/model.rb#149 sig { params(node: ::RBI::Node).returns(::RBI::Node) } def create_node(node); end - # source://tapioca//lib/tapioca/rbi_ext/model.rb#143 + # source://tapioca//lib/tapioca/rbi_ext/model.rb#144 sig { returns(T::Hash[::String, ::RBI::Node]) } def nodes_cache; end end -# source://tapioca//lib/tapioca/rbi_ext/model.rb#158 +# source://tapioca//lib/tapioca/rbi_ext/model.rb#159 class RBI::TypedParam < ::T::Struct const :param, ::RBI::Param const :type, ::String class << self - # source://sorbet-runtime/0.5.11319/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11352/lib/types/struct.rb#13 def inherited(s); end end end @@ -1142,7 +1142,7 @@ class Tapioca::ConfigHelper::ConfigError < ::T::Struct const :message_parts, T::Array[::Tapioca::ConfigHelper::ConfigErrorMessagePart] class << self - # source://sorbet-runtime/0.5.11319/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11352/lib/types/struct.rb#13 def inherited(s); end end end @@ -1153,7 +1153,7 @@ class Tapioca::ConfigHelper::ConfigErrorMessagePart < ::T::Struct const :colors, T::Array[::Symbol] class << self - # source://sorbet-runtime/0.5.11319/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11352/lib/types/struct.rb#13 def inherited(s); end end end @@ -2453,7 +2453,7 @@ class Tapioca::Loaders::Loader # @param engine [T.class_of(Rails::Engine)] # @return [Array] # - # source://sorbet-runtime/0.5.11319/lib/types/private/methods/_methods.rb#257 + # source://sorbet-runtime/0.5.11352/lib/types/private/methods/_methods.rb#257 def eager_load_paths(*args, **_arg1, &blk); end # source://tapioca//lib/tapioca/loaders/loader.rb#198 @@ -3361,7 +3361,7 @@ module Tapioca::Static::SymbolLoader # @return [Array] # - # source://sorbet-runtime/0.5.11319/lib/types/private/methods/_methods.rb#257 + # source://sorbet-runtime/0.5.11352/lib/types/private/methods/_methods.rb#257 def engines(*args, **_arg1, &blk); end # source://tapioca//lib/tapioca/static/symbol_loader.rb#82 From 6d08d8aa030f5168b554a75ceef4751917d74db2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Apr 2024 03:05:36 +0000 Subject: [PATCH 029/189] Bump test/fixtures/prism from `68074cf` to `eeae958` Bumps [test/fixtures/prism](https://github.com/ruby/prism) from `68074cf` to `eeae958`. - [Release notes](https://github.com/ruby/prism/releases) - [Commits](https://github.com/ruby/prism/compare/68074cfa9dad91ac85df72a377bd36b39f13e9a6...eeae95867505807d9f0b071bd81a32896a63f576) --- updated-dependencies: - dependency-name: test/fixtures/prism dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- test/fixtures/prism | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/fixtures/prism b/test/fixtures/prism index 68074cfa9d..eeae958675 160000 --- a/test/fixtures/prism +++ b/test/fixtures/prism @@ -1 +1 @@ -Subproject commit 68074cfa9dad91ac85df72a377bd36b39f13e9a6 +Subproject commit eeae95867505807d9f0b071bd81a32896a63f576 From 1e54245cb9857c685b1692adff460c2676fbaf5a Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Mon, 22 Apr 2024 12:57:48 -0400 Subject: [PATCH 030/189] Restore platforms --- Gemfile.lock | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Gemfile.lock b/Gemfile.lock index 7c3315a1aa..753f7bc7fc 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -122,6 +122,8 @@ GEM PLATFORMS arm64-darwin + x64-mingw-ucrt + x64-mingw32 x86_64-darwin x86_64-linux From 35186c494bcd335e71c0f3a03c686d659984b34d Mon Sep 17 00:00:00 2001 From: Nithin Bekal Date: Mon, 22 Apr 2024 13:48:33 -0400 Subject: [PATCH 031/189] docs: Rename ruby_ls to ruby_lsp in neovim setup (#1936) Update neovim setup to use the name ruby_lsp --- EDITORS.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/EDITORS.md b/EDITORS.md index f677f23a6b..b9bbf0ac57 100644 --- a/EDITORS.md +++ b/EDITORS.md @@ -30,7 +30,7 @@ When you run `eglot` command it will run `ruby-lsp` process for you. ### nvim-lspconfig -The [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig/blob/master/lua/lspconfig/server_configurations/ruby_ls.lua) +The [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig/blob/master/lua/lspconfig/server_configurations/ruby_lsp.lua) plugin has support for Ruby LSP. ### Mason @@ -42,7 +42,7 @@ along with [mason-lspconfig.nvim](https://github.com/williamboman/mason-lspconfi local capabilities = vim.lsp.protocol.make_client_capabilities() local mason_lspconfig = require("mason-lspconfig") local servers = { - ruby_ls = {}, + ruby_lsp = {}, } mason_lspconfig.setup { @@ -150,7 +150,7 @@ local function add_ruby_deps_command(client, bufnr) end -require("lspconfig").ruby_ls.setup({ +require("lspconfig").ruby_lsp.setup({ on_attach = function(client, buffer) setup_diagnostics(client, buffer) add_ruby_deps_command(client, buffer) From 058059691ae382588290b35f44aac58a65062274 Mon Sep 17 00:00:00 2001 From: Earlopain <14981592+Earlopain@users.noreply.github.com> Date: Mon, 22 Apr 2024 19:50:08 +0200 Subject: [PATCH 032/189] Fix logging manager on activation failure (#1952) Same as #1920 --- vscode/src/ruby.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vscode/src/ruby.ts b/vscode/src/ruby.ts index 8b97d1dc3d..57b4150ec7 100644 --- a/vscode/src/ruby.ts +++ b/vscode/src/ruby.ts @@ -174,7 +174,7 @@ export class Ruby implements RubyInterface { } await vscode.window.showErrorMessage( - `Failed to activate ${this.versionManager} environment: ${error.message}`, + `Failed to activate ${this.versionManager.identifier} environment: ${error.message}`, ); } } From 2c4c2d68920197f05b5401c7544360cec8301c6a Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Mon, 22 Apr 2024 15:01:30 -0400 Subject: [PATCH 033/189] Use prism v0.26.0 (#1953) Use Prism v0.26.0 --- Gemfile.lock | 4 +- .../lib/ruby_indexer/collector.rb | 2 +- lib/ruby_lsp/document.rb | 6 +- lib/ruby_lsp/internal.rb | 8 + lib/ruby_lsp/listeners/document_link.rb | 2 +- lib/ruby_lsp/ruby_document.rb | 2 +- ruby-lsp.gemspec | 2 +- .../{prism@0.24.0.rbi => prism@0.26.0.rbi} | 18870 ++++++++++------ test/requests/code_actions_formatting_test.rb | 4 +- test/requests/show_syntax_tree_test.rb | 9 +- 10 files changed, 11818 insertions(+), 7091 deletions(-) rename sorbet/rbi/gems/{prism@0.24.0.rbi => prism@0.26.0.rbi} (57%) diff --git a/Gemfile.lock b/Gemfile.lock index 753f7bc7fc..375f69c5ae 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ PATH specs: ruby-lsp (0.16.5) language_server-protocol (~> 3.17.0) - prism (>= 0.23.0, < 0.25) + prism (>= 0.23.0, < 0.27) sorbet-runtime (>= 0.5.10782) GEM @@ -45,7 +45,7 @@ GEM ast (~> 2.4.1) racc prettier_print (1.2.1) - prism (0.24.0) + prism (0.26.0) psych (5.1.2) stringio racc (1.7.3) diff --git a/lib/ruby_indexer/lib/ruby_indexer/collector.rb b/lib/ruby_indexer/lib/ruby_indexer/collector.rb index dab6b359d4..a3cc1b64de 100644 --- a/lib/ruby_indexer/lib/ruby_indexer/collector.rb +++ b/lib/ruby_indexer/lib/ruby_indexer/collector.rb @@ -7,7 +7,7 @@ class Collector LEAVE_EVENT = T.let(Object.new.freeze, Object) - sig { params(index: Index, parse_result: Prism::ParseResult, file_path: String).void } + sig { params(index: Index, parse_result: Prism::ParseResult[Prism::ProgramNode], file_path: String).void } def initialize(index, parse_result, file_path) @index = index @file_path = file_path diff --git a/lib/ruby_lsp/document.rb b/lib/ruby_lsp/document.rb index b8b18de6a7..4d334c9d9a 100644 --- a/lib/ruby_lsp/document.rb +++ b/lib/ruby_lsp/document.rb @@ -8,7 +8,7 @@ class Document abstract! - sig { returns(Prism::ParseResult) } + sig { returns(Prism::ParseResult[Prism::ProgramNode]) } attr_reader :parse_result sig { returns(String) } @@ -31,7 +31,7 @@ def initialize(source:, version:, uri:, encoding: Encoding::UTF_8) @version = T.let(version, Integer) @uri = T.let(uri, URI::Generic) @needs_parsing = T.let(true, T::Boolean) - @parse_result = T.let(parse, Prism::ParseResult) + @parse_result = T.let(parse, Prism::ParseResult[Prism::ProgramNode]) end sig { returns(Prism::ProgramNode) } @@ -93,7 +93,7 @@ def push_edits(edits, version:) @cache.clear end - sig { abstract.returns(Prism::ParseResult) } + sig { abstract.returns(Prism::ParseResult[Prism::ProgramNode]) } def parse; end sig { returns(T::Boolean) } diff --git a/lib/ruby_lsp/internal.rb b/lib/ruby_lsp/internal.rb index 7aa48b34fa..c0d9fcb113 100644 --- a/lib/ruby_lsp/internal.rb +++ b/lib/ruby_lsp/internal.rb @@ -19,6 +19,14 @@ require "prism/visitor" require "language_server-protocol" +# Prism v0.26.0 introduced generics for ParseResult, but it causes some problems so the intention is to remove it. +# Once that is done, we can remove this patch. +module Prism + class ParseResult + extend T::Generic + end +end + require "ruby-lsp" require "ruby_lsp/base_server" require "ruby_indexer/ruby_indexer" diff --git a/lib/ruby_lsp/listeners/document_link.rb b/lib/ruby_lsp/listeners/document_link.rb index f531407436..422f8d70a6 100644 --- a/lib/ruby_lsp/listeners/document_link.rb +++ b/lib/ruby_lsp/listeners/document_link.rb @@ -124,7 +124,7 @@ def extract_document_link(node) match = comment.location.slice.match(%r{source://.*#\d+$}) return unless match - uri = T.cast(URI(T.must(match[0])), URI::Source) + uri = T.cast(URI(match[0]), URI::Source) gem_version = resolve_version(uri) return if gem_version.nil? diff --git a/lib/ruby_lsp/ruby_document.rb b/lib/ruby_lsp/ruby_document.rb index 7a4fd040b9..79ec56c5bd 100644 --- a/lib/ruby_lsp/ruby_document.rb +++ b/lib/ruby_lsp/ruby_document.rb @@ -3,7 +3,7 @@ module RubyLsp class RubyDocument < Document - sig { override.returns(Prism::ParseResult) } + sig { override.returns(Prism::ParseResult[Prism::ProgramNode]) } def parse return @parse_result unless @needs_parsing diff --git a/ruby-lsp.gemspec b/ruby-lsp.gemspec index 3598add529..ffc9b072ec 100644 --- a/ruby-lsp.gemspec +++ b/ruby-lsp.gemspec @@ -19,7 +19,7 @@ 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.25") + s.add_dependency("prism", ">= 0.23.0", "< 0.27") s.add_dependency("sorbet-runtime", ">= 0.5.10782") s.required_ruby_version = ">= 3.0" diff --git a/sorbet/rbi/gems/prism@0.24.0.rbi b/sorbet/rbi/gems/prism@0.26.0.rbi similarity index 57% rename from sorbet/rbi/gems/prism@0.24.0.rbi rename to sorbet/rbi/gems/prism@0.26.0.rbi index 07688d12c1..05521696fc 100644 --- a/sorbet/rbi/gems/prism@0.24.0.rbi +++ b/sorbet/rbi/gems/prism@0.26.0.rbi @@ -4,12 +4,33 @@ # This is an autogenerated file for types exported from the `prism` gem. # Please instead update this file by running `bin/tapioca gem prism`. +# typed: strict + +# =begin +# This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/rbi/prism/node.rbi.erb +# if you are looking to modify the template +# =end # =begin # This file is generated by the templates/template.rb script and should not be -# modified manually. See templates/rbi/prism.rbi.erb +# modified manually. See templates/rbi/prism/visitor.rbi.erb # if you are looking to modify the template # =end +# We keep these shims in here because our client libraries might not have +# 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. # # "Parsing Ruby is suddenly manageable!" @@ -36,7 +57,13 @@ module Prism # # For supported options, see Prism::parse. # - # source://prism//lib/prism.rb#46 + # source://prism//lib/prism.rb#47 + sig do + params( + source: String, + options: T::Hash[Symbol, T.untyped] + ).returns(Prism::ParseResult[T::Array[T.untyped]]) + end def lex_compat(source, **options); end # Mirror the Prism.lex_file API by using the serialization API. @@ -49,7 +76,8 @@ module Prism # returns the same tokens. Raises SyntaxError if the syntax in source is # invalid. # - # source://prism//lib/prism.rb#56 + # source://prism//lib/prism.rb#57 + sig { params(source: String).returns(T::Array[T.untyped]) } def lex_ripper(source); end # :call-seq: @@ -57,7 +85,8 @@ module Prism # # Load the serialized AST using the source as a reference into a tree. # - # source://prism//lib/prism.rb#64 + # source://prism//lib/prism.rb#65 + sig { params(source: String, serialized: String).returns(Prism::ParseResult[Prism::ProgramNode]) } def load(source, serialized); end # Mirror the Prism.parse API by using the serialization API. @@ -66,19 +95,14 @@ module Prism # Mirror the Prism.parse_comments API by using the serialization API. def parse_comments(*_arg0); end - # :call-seq: - # Prism::parse_failure?(source, **options) -> bool - # - # Returns true if the source parses with errors. + # Mirror the Prism.parse_failure? API by using the serialization API. # # @return [Boolean] - # - # source://prism//lib/prism.rb#72 - def parse_failure?(source, **options); end + def parse_failure?(*_arg0); end # Mirror the Prism.parse_file API by using the serialization API. This uses - # native strings instead of Ruby strings because it allows us to use mmap when - # it is available. + # native strings instead of Ruby strings because it allows us to use mmap + # when it is available. def parse_file(*_arg0); end # Mirror the Prism.parse_file_comments API by using the serialization @@ -86,15 +110,10 @@ module Prism # to use mmap when it is available. def parse_file_comments(*_arg0); end - # :call-seq: - # Prism::parse_file_failure?(filepath, **options) -> bool - # - # Returns true if the file at filepath parses with errors. + # Mirror the Prism.parse_file_failure? API by using the serialization API. # # @return [Boolean] - # - # source://prism//lib/prism.rb#80 - def parse_file_failure?(filepath, **options); end + def parse_file_failure?(*_arg0); end # Mirror the Prism.parse_file_success? API by using the serialization API. # @@ -107,6 +126,9 @@ module Prism # Mirror the Prism.parse_lex_file API by using the serialization API. def parse_lex_file(*_arg0); end + # Mirror the Prism.parse_stream API by using the serialization API. + def parse_stream(*_arg0); end + # Mirror the Prism.parse_success? API by using the serialization API. # # @return [Boolean] @@ -119,86 +141,104 @@ end # alias $foo $bar # ^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#97 +# source://prism//lib/prism/node.rb#135 class Prism::AliasGlobalVariableNode < ::Prism::Node - # def initialize: (Node new_name, Node old_name, Location keyword_loc, Location location) -> void + # 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#99 + # source://prism//lib/prism/node.rb#137 + sig do + params( + source: Prism::Source, + new_name: Prism::Node, + old_name: Prism::Node, + keyword_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, new_name, old_name, keyword_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#109 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#147 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#114 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#152 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#124 + # source://prism//lib/prism/node.rb#162 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#119 + # source://prism//lib/prism/node.rb#157 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> AliasGlobalVariableNode + # def copy: (?new_name: Prism::node, ?old_name: Prism::node, ?keyword_loc: Location, ?location: Location) -> AliasGlobalVariableNode # - # source://prism//lib/prism/node.rb#129 - sig { params(params: T.untyped).returns(Prism::AliasGlobalVariableNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#167 + sig do + params( + new_name: Prism::Node, + old_name: Prism::Node, + keyword_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::AliasGlobalVariableNode) + end + def copy(new_name: T.unsafe(nil), old_name: T.unsafe(nil), keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#114 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#152 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { new_name: Node, old_name: Node, keyword_loc: Location, location: Location } + # 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#143 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#175 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#166 + # source://prism//lib/prism/node.rb#199 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#161 + # source://prism//lib/prism/node.rb#194 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#154 + # source://prism//lib/prism/node.rb#186 sig { returns(Prism::Location) } def keyword_loc; end - # attr_reader new_name: Node + # attr_reader new_name: Prism::node # - # source://prism//lib/prism/node.rb#148 + # source://prism//lib/prism/node.rb#180 sig { returns(Prism::Node) } def new_name; end - # attr_reader old_name: Node + # attr_reader old_name: Prism::node # - # source://prism//lib/prism/node.rb#151 + # source://prism//lib/prism/node.rb#183 sig { returns(Prism::Node) } def old_name; end @@ -217,7 +257,8 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#190 + # source://prism//lib/prism/node.rb#223 + sig { override.returns(Symbol) } def type; end class << self @@ -228,7 +269,7 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#200 + # source://prism//lib/prism/node.rb#233 def type; end end end @@ -238,86 +279,104 @@ end # alias foo bar # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#209 +# source://prism//lib/prism/node.rb#242 class Prism::AliasMethodNode < ::Prism::Node - # def initialize: (Node new_name, Node old_name, Location keyword_loc, Location location) -> void + # 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#211 + # source://prism//lib/prism/node.rb#244 + sig do + params( + source: Prism::Source, + new_name: Prism::Node, + old_name: Prism::Node, + keyword_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, new_name, old_name, keyword_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#221 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#254 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#226 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#259 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#236 + # source://prism//lib/prism/node.rb#269 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#231 + # source://prism//lib/prism/node.rb#264 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> AliasMethodNode + # def copy: (?new_name: Prism::node, ?old_name: Prism::node, ?keyword_loc: Location, ?location: Location) -> AliasMethodNode # - # source://prism//lib/prism/node.rb#241 - sig { params(params: T.untyped).returns(Prism::AliasMethodNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#274 + sig do + params( + new_name: Prism::Node, + old_name: Prism::Node, + keyword_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::AliasMethodNode) + end + def copy(new_name: T.unsafe(nil), old_name: T.unsafe(nil), keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#226 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#259 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { new_name: Node, old_name: Node, keyword_loc: Location, location: Location } + # 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#255 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#282 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#278 + # source://prism//lib/prism/node.rb#306 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#273 + # source://prism//lib/prism/node.rb#301 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#266 + # source://prism//lib/prism/node.rb#293 sig { returns(Prism::Location) } def keyword_loc; end - # attr_reader new_name: Node + # attr_reader new_name: Prism::node # - # source://prism//lib/prism/node.rb#260 + # source://prism//lib/prism/node.rb#287 sig { returns(Prism::Node) } def new_name; end - # attr_reader old_name: Node + # attr_reader old_name: Prism::node # - # source://prism//lib/prism/node.rb#263 + # source://prism//lib/prism/node.rb#290 sig { returns(Prism::Node) } def old_name; end @@ -336,7 +395,8 @@ class Prism::AliasMethodNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#302 + # source://prism//lib/prism/node.rb#330 + sig { override.returns(Symbol) } def type; end class << self @@ -347,7 +407,7 @@ class Prism::AliasMethodNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#312 + # source://prism//lib/prism/node.rb#340 def type; end end end @@ -357,86 +417,104 @@ end # foo => bar | baz # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#321 +# source://prism//lib/prism/node.rb#349 class Prism::AlternationPatternNode < ::Prism::Node - # def initialize: (Node left, Node right, Location operator_loc, Location location) -> void + # 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#323 + # source://prism//lib/prism/node.rb#351 + sig do + params( + source: Prism::Source, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, left, right, operator_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#333 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#361 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#338 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#366 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#348 + # source://prism//lib/prism/node.rb#376 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#343 + # source://prism//lib/prism/node.rb#371 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> AlternationPatternNode + # def copy: (?left: Prism::node, ?right: Prism::node, ?operator_loc: Location, ?location: Location) -> AlternationPatternNode # - # source://prism//lib/prism/node.rb#353 - sig { params(params: T.untyped).returns(Prism::AlternationPatternNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#381 + sig do + params( + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::AlternationPatternNode) + end + def copy(left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#338 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#366 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { left: Node, right: Node, operator_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { left: Prism::node, right: Prism::node, operator_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#367 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#389 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#390 + # source://prism//lib/prism/node.rb#413 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end - # attr_reader left: Node + # attr_reader left: Prism::node # - # source://prism//lib/prism/node.rb#372 + # source://prism//lib/prism/node.rb#394 sig { returns(Prism::Node) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#385 + # source://prism//lib/prism/node.rb#408 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#378 + # source://prism//lib/prism/node.rb#400 sig { returns(Prism::Location) } def operator_loc; end - # attr_reader right: Node + # attr_reader right: Prism::node # - # source://prism//lib/prism/node.rb#375 + # source://prism//lib/prism/node.rb#397 sig { returns(Prism::Node) } def right; end @@ -455,7 +533,8 @@ class Prism::AlternationPatternNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#414 + # source://prism//lib/prism/node.rb#437 + sig { override.returns(Symbol) } def type; end class << self @@ -466,7 +545,7 @@ class Prism::AlternationPatternNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#424 + # source://prism//lib/prism/node.rb#447 def type; end end end @@ -476,63 +555,81 @@ end # left and right # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#433 +# source://prism//lib/prism/node.rb#456 class Prism::AndNode < ::Prism::Node - # def initialize: (Node left, Node right, Location operator_loc, Location location) -> void + # 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#435 + # source://prism//lib/prism/node.rb#458 + sig do + params( + source: Prism::Source, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, left, right, operator_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#445 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#468 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#450 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#473 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#460 + # source://prism//lib/prism/node.rb#483 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#455 + # source://prism//lib/prism/node.rb#478 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> AndNode + # def copy: (?left: Prism::node, ?right: Prism::node, ?operator_loc: Location, ?location: Location) -> AndNode # - # source://prism//lib/prism/node.rb#465 - sig { params(params: T.untyped).returns(Prism::AndNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#488 + sig do + params( + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::AndNode) + end + def copy(left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#450 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#473 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { left: Node, right: Node, operator_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { left: Prism::node, right: Prism::node, operator_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#479 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#496 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#517 + # source://prism//lib/prism/node.rb#535 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); 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). @@ -543,13 +640,13 @@ class Prism::AndNode < ::Prism::Node # 1 && 2 # ^ # - # source://prism//lib/prism/node.rb#490 + # source://prism//lib/prism/node.rb#507 sig { returns(Prism::Node) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#512 + # source://prism//lib/prism/node.rb#530 sig { returns(String) } def operator; end @@ -558,7 +655,7 @@ class Prism::AndNode < ::Prism::Node # left and right # ^^^ # - # source://prism//lib/prism/node.rb#505 + # source://prism//lib/prism/node.rb#522 sig { returns(Prism::Location) } def operator_loc; end @@ -570,7 +667,7 @@ class Prism::AndNode < ::Prism::Node # 1 and 2 # ^ # - # source://prism//lib/prism/node.rb#499 + # source://prism//lib/prism/node.rb#516 sig { returns(Prism::Node) } def right; end @@ -589,7 +686,8 @@ class Prism::AndNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#541 + # source://prism//lib/prism/node.rb#559 + sig { override.returns(Symbol) } def type; end class << self @@ -600,7 +698,7 @@ class Prism::AndNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#551 + # source://prism//lib/prism/node.rb#569 def type; end end end @@ -610,77 +708,93 @@ end # return foo, bar, baz # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#560 +# source://prism//lib/prism/node.rb#578 class Prism::ArgumentsNode < ::Prism::Node - # def initialize: (Integer flags, Array[Node] arguments, Location location) -> void + # def initialize: (Integer flags, Array[Prism::node] arguments, Location location) -> void # # @return [ArgumentsNode] a new instance of ArgumentsNode # - # source://prism//lib/prism/node.rb#562 + # source://prism//lib/prism/node.rb#580 + sig do + params( + source: Prism::Source, + flags: Integer, + arguments: T::Array[Prism::Node], + location: Prism::Location + ).void + end def initialize(source, flags, arguments, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#571 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#589 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # attr_reader arguments: Array[Node] + # attr_reader arguments: Array[Prism::node] # - # source://prism//lib/prism/node.rb#613 + # source://prism//lib/prism/node.rb#626 sig { returns(T::Array[Prism::Node]) } def arguments; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#576 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#594 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#586 + # source://prism//lib/prism/node.rb#604 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#581 + # source://prism//lib/prism/node.rb#599 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def contains_keyword_splat?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#617 + # source://prism//lib/prism/node.rb#630 sig { returns(T::Boolean) } def contains_keyword_splat?; end - # def copy: (**params) -> ArgumentsNode + # def copy: (?flags: Integer, ?arguments: Array[Prism::node], ?location: Location) -> ArgumentsNode # - # source://prism//lib/prism/node.rb#591 - sig { params(params: T.untyped).returns(Prism::ArgumentsNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#609 + sig do + params( + flags: Integer, + arguments: T::Array[Prism::Node], + location: Prism::Location + ).returns(Prism::ArgumentsNode) + end + def copy(flags: T.unsafe(nil), arguments: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#576 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#594 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, arguments: Array[Node], location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, arguments: Array[Prism::node], location: Location } # - # source://prism//lib/prism/node.rb#604 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#617 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#622 + # source://prism//lib/prism/node.rb#635 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of @@ -698,14 +812,15 @@ class Prism::ArgumentsNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#644 + # source://prism//lib/prism/node.rb#657 + sig { override.returns(Symbol) } def type; end private # private attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#609 + # source://prism//lib/prism/node.rb#622 sig { returns(Integer) } def flags; end @@ -717,19 +832,19 @@ class Prism::ArgumentsNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#654 + # source://prism//lib/prism/node.rb#667 def type; end end end # Flags for arguments nodes. # -# source://prism//lib/prism/node.rb#19241 +# source://prism//lib/prism/node.rb#18830 module Prism::ArgumentsNodeFlags; end # if arguments contain keyword splat # -# source://prism//lib/prism/node.rb#19243 +# source://prism//lib/prism/node.rb#18832 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. @@ -737,100 +852,120 @@ Prism::ArgumentsNodeFlags::CONTAINS_KEYWORD_SPLAT = T.let(T.unsafe(nil), Integer # [1, 2, 3] # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#663 +# source://prism//lib/prism/node.rb#676 class Prism::ArrayNode < ::Prism::Node - # def initialize: (Integer flags, Array[Node] elements, Location? opening_loc, Location? closing_loc, Location location) -> void + # 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#665 + # source://prism//lib/prism/node.rb#678 + sig do + params( + source: Prism::Source, + flags: Integer, + elements: T::Array[Prism::Node], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end def initialize(source, flags, elements, opening_loc, closing_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#676 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#689 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#681 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#694 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#758 + # source://prism//lib/prism/node.rb#766 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#735 + # source://prism//lib/prism/node.rb#742 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#691 + # source://prism//lib/prism/node.rb#704 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#686 + # source://prism//lib/prism/node.rb#699 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def contains_splat?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#748 + # source://prism//lib/prism/node.rb#756 sig { returns(T::Boolean) } def contains_splat?; end - # def copy: (**params) -> ArrayNode + # def copy: (?flags: Integer, ?elements: Array[Prism::node], ?opening_loc: Location?, ?closing_loc: Location?, ?location: Location) -> ArrayNode # - # source://prism//lib/prism/node.rb#696 - sig { params(params: T.untyped).returns(Prism::ArrayNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#709 + sig do + params( + flags: Integer, + elements: T::Array[Prism::Node], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::ArrayNode) + end + def copy(flags: T.unsafe(nil), elements: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#681 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#694 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, elements: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location } + # 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#711 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#717 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # attr_reader elements: Array[Node] + # attr_reader elements: Array[Prism::node] # - # source://prism//lib/prism/node.rb#720 + # source://prism//lib/prism/node.rb#726 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 # - # source://prism//lib/prism/node.rb#763 + # source://prism//lib/prism/node.rb#771 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#753 + # source://prism//lib/prism/node.rb#761 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#723 + # source://prism//lib/prism/node.rb#729 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end @@ -849,14 +984,15 @@ class Prism::ArrayNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#787 + # source://prism//lib/prism/node.rb#795 + sig { override.returns(Symbol) } def type; end private # private attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#716 + # source://prism//lib/prism/node.rb#722 sig { returns(Integer) } def flags; end @@ -868,19 +1004,19 @@ class Prism::ArrayNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#797 + # source://prism//lib/prism/node.rb#805 def type; end end end # Flags for array nodes. # -# source://prism//lib/prism/node.rb#19247 +# source://prism//lib/prism/node.rb#18836 module Prism::ArrayNodeFlags; end # if array contains splat nodes # -# source://prism//lib/prism/node.rb#19249 +# source://prism//lib/prism/node.rb#18838 Prism::ArrayNodeFlags::CONTAINS_SPLAT = T.let(T.unsafe(nil), Integer) # Represents an array pattern in pattern matching. @@ -900,30 +1036,42 @@ Prism::ArrayNodeFlags::CONTAINS_SPLAT = T.let(T.unsafe(nil), Integer) # foo in Bar[1, 2, 3] # ^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#818 +# source://prism//lib/prism/node.rb#826 class Prism::ArrayPatternNode < ::Prism::Node - # def initialize: (Node? constant, Array[Node] requireds, Node? rest, Array[Node] posts, Location? opening_loc, Location? closing_loc, Location location) -> void + # 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#820 + # source://prism//lib/prism/node.rb#828 + sig do + params( + source: Prism::Source, + constant: T.nilable(Prism::Node), + requireds: T::Array[Prism::Node], + rest: T.nilable(Prism::Node), + posts: T::Array[Prism::Node], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end def initialize(source, constant, requireds, rest, posts, opening_loc, closing_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#833 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#841 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#838 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#846 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#922 + # source://prism//lib/prism/node.rb#923 sig { returns(T.nilable(String)) } def closing; end @@ -935,75 +1083,87 @@ class Prism::ArrayPatternNode < ::Prism::Node # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#853 + # source://prism//lib/prism/node.rb#861 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#843 + # source://prism//lib/prism/node.rb#851 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # attr_reader constant: Node? + # attr_reader constant: Prism::node? # - # source://prism//lib/prism/node.rb#880 + # source://prism//lib/prism/node.rb#879 sig { returns(T.nilable(Prism::Node)) } def constant; end - # def copy: (**params) -> ArrayPatternNode + # 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#858 - sig { params(params: T.untyped).returns(Prism::ArrayPatternNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#866 + sig do + params( + constant: T.nilable(Prism::Node), + requireds: T::Array[Prism::Node], + rest: T.nilable(Prism::Node), + posts: T::Array[Prism::Node], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::ArrayPatternNode) + end + def copy(constant: T.unsafe(nil), requireds: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#838 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#846 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { constant: Node?, requireds: Array[Node], rest: Node?, posts: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location } + # 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#875 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#874 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#927 + # source://prism//lib/prism/node.rb#928 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#917 + # source://prism//lib/prism/node.rb#918 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#892 + # source://prism//lib/prism/node.rb#891 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end - # attr_reader posts: Array[Node] + # attr_reader posts: Array[Prism::node] # - # source://prism//lib/prism/node.rb#889 + # source://prism//lib/prism/node.rb#888 sig { returns(T::Array[Prism::Node]) } def posts; end - # attr_reader requireds: Array[Node] + # attr_reader requireds: Array[Prism::node] # - # source://prism//lib/prism/node.rb#883 + # source://prism//lib/prism/node.rb#882 sig { returns(T::Array[Prism::Node]) } def requireds; end - # attr_reader rest: Node? + # attr_reader rest: Prism::node? # - # source://prism//lib/prism/node.rb#886 + # source://prism//lib/prism/node.rb#885 sig { returns(T.nilable(Prism::Node)) } def rest; end @@ -1022,7 +1182,8 @@ class Prism::ArrayPatternNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#962 + # source://prism//lib/prism/node.rb#963 + sig { override.returns(Symbol) } def type; end class << self @@ -1033,7 +1194,7 @@ class Prism::ArrayPatternNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#972 + # source://prism//lib/prism/node.rb#973 def type; end end end @@ -1043,63 +1204,81 @@ end # { a => b } # ^^^^^^ # -# source://prism//lib/prism/node.rb#981 +# source://prism//lib/prism/node.rb#982 class Prism::AssocNode < ::Prism::Node - # def initialize: (Node key, Node value, Location? operator_loc, Location location) -> void + # 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#983 + # source://prism//lib/prism/node.rb#984 + sig do + params( + source: Prism::Source, + key: Prism::Node, + value: Prism::Node, + operator_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end def initialize(source, key, value, operator_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#993 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#994 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#998 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#999 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1008 + # source://prism//lib/prism/node.rb#1009 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1003 + # source://prism//lib/prism/node.rb#1004 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> AssocNode + # def copy: (?key: Prism::node, ?value: Prism::node, ?operator_loc: Location?, ?location: Location) -> AssocNode # - # source://prism//lib/prism/node.rb#1013 - sig { params(params: T.untyped).returns(Prism::AssocNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#1014 + sig do + params( + key: Prism::Node, + value: Prism::Node, + operator_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::AssocNode) + end + def copy(key: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#998 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#999 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { key: Node, value: Node, operator_loc: Location?, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { key: Prism::node, value: Prism::node, operator_loc: Location?, location: Location } # - # source://prism//lib/prism/node.rb#1027 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#1022 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#1074 + # source://prism//lib/prism/node.rb#1070 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); 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). @@ -1113,13 +1292,13 @@ class Prism::AssocNode < ::Prism::Node # { def a; end => 1 } # ^^^^^^^^^^ # - # source://prism//lib/prism/node.rb#1041 + # source://prism//lib/prism/node.rb#1036 sig { returns(Prism::Node) } def key; end # def operator: () -> String? # - # source://prism//lib/prism/node.rb#1069 + # source://prism//lib/prism/node.rb#1065 sig { returns(T.nilable(String)) } def operator; end @@ -1128,7 +1307,7 @@ class Prism::AssocNode < ::Prism::Node # { foo => bar } # ^^ # - # source://prism//lib/prism/node.rb#1056 + # source://prism//lib/prism/node.rb#1051 sig { returns(T.nilable(Prism::Location)) } def operator_loc; end @@ -1147,7 +1326,8 @@ class Prism::AssocNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#1098 + # source://prism//lib/prism/node.rb#1094 + sig { override.returns(Symbol) } def type; end # The value of the association, if present. This can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). @@ -1158,7 +1338,7 @@ class Prism::AssocNode < ::Prism::Node # { x: 1 } # ^ # - # source://prism//lib/prism/node.rb#1050 + # source://prism//lib/prism/node.rb#1045 sig { returns(Prism::Node) } def value; end @@ -1170,7 +1350,7 @@ class Prism::AssocNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#1108 + # source://prism//lib/prism/node.rb#1104 def type; end end end @@ -1180,68 +1360,84 @@ end # { **foo } # ^^^^^ # -# source://prism//lib/prism/node.rb#1117 +# source://prism//lib/prism/node.rb#1113 class Prism::AssocSplatNode < ::Prism::Node - # def initialize: (Node? value, Location operator_loc, Location location) -> void + # def initialize: (Prism::node? value, Location operator_loc, Location location) -> void # # @return [AssocSplatNode] a new instance of AssocSplatNode # - # source://prism//lib/prism/node.rb#1119 + # source://prism//lib/prism/node.rb#1115 + sig do + params( + source: Prism::Source, + value: T.nilable(Prism::Node), + operator_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, value, operator_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1128 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#1124 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1133 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#1129 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1145 + # source://prism//lib/prism/node.rb#1141 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1138 + # source://prism//lib/prism/node.rb#1134 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> AssocSplatNode + # def copy: (?value: Prism::node?, ?operator_loc: Location, ?location: Location) -> AssocSplatNode # - # source://prism//lib/prism/node.rb#1150 - sig { params(params: T.untyped).returns(Prism::AssocSplatNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#1146 + sig do + params( + value: T.nilable(Prism::Node), + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::AssocSplatNode) + end + def copy(value: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1133 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#1129 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { value: Node?, operator_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::node?, operator_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#1163 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#1154 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#1189 + # source://prism//lib/prism/node.rb#1181 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # - # source://prism//lib/prism/node.rb#1184 + # source://prism//lib/prism/node.rb#1176 sig { returns(String) } def operator; end @@ -1250,7 +1446,7 @@ class Prism::AssocSplatNode < ::Prism::Node # { **x } # ^^ # - # source://prism//lib/prism/node.rb#1177 + # source://prism//lib/prism/node.rb#1168 sig { returns(Prism::Location) } def operator_loc; end @@ -1269,7 +1465,8 @@ class Prism::AssocSplatNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#1215 + # source://prism//lib/prism/node.rb#1207 + sig { override.returns(Symbol) } def type; end # The value to be splatted, if present. Will be missing when keyword rest argument forwarding is used. @@ -1277,7 +1474,7 @@ class Prism::AssocSplatNode < ::Prism::Node # { **foo } # ^^^ # - # source://prism//lib/prism/node.rb#1171 + # source://prism//lib/prism/node.rb#1162 sig { returns(T.nilable(Prism::Node)) } def value; end @@ -1289,11 +1486,14 @@ class Prism::AssocSplatNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#1225 + # source://prism//lib/prism/node.rb#1217 def type; end end end +# The FFI backend is used on other Ruby implementations. +# +# source://prism//lib/prism.rb#84 Prism::BACKEND = T.let(T.unsafe(nil), Symbol) # Represents reading a reference to a field in the previous match. @@ -1301,63 +1501,66 @@ Prism::BACKEND = T.let(T.unsafe(nil), Symbol) # $' # ^^ # -# source://prism//lib/prism/node.rb#1234 +# source://prism//lib/prism/node.rb#1226 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#1236 + # source://prism//lib/prism/node.rb#1228 + sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } def initialize(source, name, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1244 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#1236 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1249 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#1241 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1259 + # source://prism//lib/prism/node.rb#1251 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1254 + # source://prism//lib/prism/node.rb#1246 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> BackReferenceReadNode + # def copy: (?name: Symbol, ?location: Location) -> BackReferenceReadNode # - # source://prism//lib/prism/node.rb#1264 - sig { params(params: T.untyped).returns(Prism::BackReferenceReadNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#1256 + 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#1249 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#1241 + 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#1276 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#1264 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#1289 + # source://prism//lib/prism/node.rb#1277 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # The name of the back-reference variable, including the leading `$`. @@ -1366,7 +1569,7 @@ class Prism::BackReferenceReadNode < ::Prism::Node # # $+ # name `:$+` # - # source://prism//lib/prism/node.rb#1285 + # source://prism//lib/prism/node.rb#1273 sig { returns(Symbol) } def name; end @@ -1385,7 +1588,8 @@ class Prism::BackReferenceReadNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#1309 + # source://prism//lib/prism/node.rb#1297 + sig { override.returns(Symbol) } def type; end class << self @@ -1396,7 +1600,7 @@ class Prism::BackReferenceReadNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#1319 + # source://prism//lib/prism/node.rb#1307 def type; end end end @@ -1406,24 +1610,24 @@ end # implement each one that they need. For a default implementation that # continues walking the tree, see the Visitor class. # -# source://prism//lib/prism/visitor.rb#13 +# source://prism//lib/prism/visitor.rb#14 class Prism::BasicVisitor # Calls `accept` on the given node if it is not `nil`, which in turn should # call back into this visitor by calling the appropriate `visit_*` method. # - # source://prism//lib/prism/visitor.rb#16 + # source://prism//lib/prism/visitor.rb#17 sig { params(node: T.nilable(Prism::Node)).void } def visit(node); end # Visits each node in `nodes` by calling `accept` on each one. # - # source://prism//lib/prism/visitor.rb#21 + # source://prism//lib/prism/visitor.rb#23 sig { params(nodes: T::Array[T.nilable(Prism::Node)]).void } def visit_all(nodes); end # Visits the child nodes of `node` by calling `accept` on each one. # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::Node).void } def visit_child_nodes(node); end end @@ -1435,113 +1639,137 @@ end # end # ^^^^^ # -# source://prism//lib/prism/node.rb#1330 +# source://prism//lib/prism/node.rb#1318 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#1332 + # source://prism//lib/prism/node.rb#1320 + sig do + params( + source: Prism::Source, + begin_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + rescue_clause: T.nilable(Prism::RescueNode), + else_clause: T.nilable(Prism::ElseNode), + ensure_clause: T.nilable(Prism::EnsureNode), + end_keyword_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end def initialize(source, begin_keyword_loc, statements, rescue_clause, else_clause, ensure_clause, end_keyword_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1345 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#1333 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def begin_keyword: () -> String? # - # source://prism//lib/prism/node.rb#1433 + # source://prism//lib/prism/node.rb#1414 sig { returns(T.nilable(String)) } def begin_keyword; end # attr_reader begin_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#1396 + # source://prism//lib/prism/node.rb#1375 sig { returns(T.nilable(Prism::Location)) } def begin_keyword_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1354 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#1342 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1369 + # source://prism//lib/prism/node.rb#1357 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1359 + # source://prism//lib/prism/node.rb#1347 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> BeginNode + # 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#1374 - sig { params(params: T.untyped).returns(Prism::BeginNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#1362 + sig do + params( + begin_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + rescue_clause: T.nilable(Prism::RescueNode), + else_clause: T.nilable(Prism::ElseNode), + ensure_clause: T.nilable(Prism::EnsureNode), + end_keyword_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::BeginNode) + end + def copy(begin_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), rescue_clause: T.unsafe(nil), else_clause: T.unsafe(nil), ensure_clause: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1354 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#1342 + 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#1391 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#1370 + 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#1414 + # source://prism//lib/prism/node.rb#1394 sig { returns(T.nilable(Prism::ElseNode)) } def else_clause; end # def end_keyword: () -> String? # - # source://prism//lib/prism/node.rb#1438 + # source://prism//lib/prism/node.rb#1419 sig { returns(T.nilable(String)) } def end_keyword; end # attr_reader end_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#1420 + # source://prism//lib/prism/node.rb#1400 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end # attr_reader ensure_clause: EnsureNode? # - # source://prism//lib/prism/node.rb#1417 + # source://prism//lib/prism/node.rb#1397 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 # - # source://prism//lib/prism/node.rb#1443 + # source://prism//lib/prism/node.rb#1424 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader rescue_clause: RescueNode? # - # source://prism//lib/prism/node.rb#1411 + # source://prism//lib/prism/node.rb#1391 sig { returns(T.nilable(Prism::RescueNode)) } def rescue_clause; end - # source://prism//lib/prism/node.rb#1349 + # source://prism//lib/prism/node.rb#1337 def set_newline_flag(newline_marked); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#1408 + # source://prism//lib/prism/node.rb#1388 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -1560,7 +1788,8 @@ class Prism::BeginNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#1488 + # source://prism//lib/prism/node.rb#1469 + sig { override.returns(Symbol) } def type; end class << self @@ -1571,7 +1800,7 @@ class Prism::BeginNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#1498 + # source://prism//lib/prism/node.rb#1479 def type; end end end @@ -1581,80 +1810,96 @@ end # bar(&args) # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#1507 +# source://prism//lib/prism/node.rb#1488 class Prism::BlockArgumentNode < ::Prism::Node - # def initialize: (Node? expression, Location operator_loc, Location location) -> void + # def initialize: (Prism::node? expression, Location operator_loc, Location location) -> void # # @return [BlockArgumentNode] a new instance of BlockArgumentNode # - # source://prism//lib/prism/node.rb#1509 + # source://prism//lib/prism/node.rb#1490 + sig do + params( + source: Prism::Source, + expression: T.nilable(Prism::Node), + operator_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, expression, operator_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1518 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#1499 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1523 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#1504 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1535 + # source://prism//lib/prism/node.rb#1516 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1528 + # source://prism//lib/prism/node.rb#1509 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> BlockArgumentNode + # def copy: (?expression: Prism::node?, ?operator_loc: Location, ?location: Location) -> BlockArgumentNode # - # source://prism//lib/prism/node.rb#1540 - sig { params(params: T.untyped).returns(Prism::BlockArgumentNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#1521 + sig do + params( + expression: T.nilable(Prism::Node), + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::BlockArgumentNode) + end + def copy(expression: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1523 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#1504 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { expression: Node?, operator_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { expression: Prism::node?, operator_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#1553 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#1529 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # attr_reader expression: Node? + # attr_reader expression: Prism::node? # - # source://prism//lib/prism/node.rb#1558 + # source://prism//lib/prism/node.rb#1534 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 # - # source://prism//lib/prism/node.rb#1573 + # source://prism//lib/prism/node.rb#1550 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # - # source://prism//lib/prism/node.rb#1568 + # source://prism//lib/prism/node.rb#1545 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#1561 + # source://prism//lib/prism/node.rb#1537 sig { returns(Prism::Location) } def operator_loc; end @@ -1673,7 +1918,8 @@ class Prism::BlockArgumentNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#1599 + # source://prism//lib/prism/node.rb#1576 + sig { override.returns(Symbol) } def type; end class << self @@ -1684,7 +1930,7 @@ class Prism::BlockArgumentNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#1609 + # source://prism//lib/prism/node.rb#1586 def type; end end end @@ -1694,68 +1940,71 @@ end # a { |; b| } # ^ # -# source://prism//lib/prism/node.rb#1618 +# source://prism//lib/prism/node.rb#1595 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#1620 + # source://prism//lib/prism/node.rb#1597 + sig { params(source: Prism::Source, flags: Integer, name: Symbol, location: Prism::Location).void } def initialize(source, flags, name, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1629 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#1606 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1634 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#1611 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1644 + # source://prism//lib/prism/node.rb#1621 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1639 + # source://prism//lib/prism/node.rb#1616 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> BlockLocalVariableNode + # def copy: (?flags: Integer, ?name: Symbol, ?location: Location) -> BlockLocalVariableNode # - # source://prism//lib/prism/node.rb#1649 - sig { params(params: T.untyped).returns(Prism::BlockLocalVariableNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#1626 + 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#1634 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#1611 + 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#1662 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#1634 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#1680 + # source://prism//lib/prism/node.rb#1652 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#1671 + # source://prism//lib/prism/node.rb#1643 sig { returns(Symbol) } def name; end @@ -1763,7 +2012,7 @@ class Prism::BlockLocalVariableNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#1675 + # source://prism//lib/prism/node.rb#1647 sig { returns(T::Boolean) } def repeated_parameter?; end @@ -1782,14 +2031,15 @@ class Prism::BlockLocalVariableNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#1702 + # source://prism//lib/prism/node.rb#1674 + sig { override.returns(Symbol) } def type; end private # private attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#1667 + # source://prism//lib/prism/node.rb#1639 sig { returns(Integer) } def flags; end @@ -1801,7 +2051,7 @@ class Prism::BlockLocalVariableNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#1712 + # source://prism//lib/prism/node.rb#1684 def type; end end end @@ -1811,104 +2061,126 @@ end # [1, 2, 3].each { |i| puts x } # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#1721 +# source://prism//lib/prism/node.rb#1693 class Prism::BlockNode < ::Prism::Node - # def initialize: (Array[Symbol] locals, Node? parameters, Node? body, Location opening_loc, Location closing_loc, Location location) -> void + # 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#1723 + # source://prism//lib/prism/node.rb#1695 + sig do + params( + source: Prism::Source, + locals: T::Array[Symbol], + parameters: T.nilable(Prism::Node), + body: T.nilable(Prism::Node), + opening_loc: Prism::Location, + closing_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, locals, parameters, body, opening_loc, closing_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1735 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#1707 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # attr_reader body: Node? + # attr_reader body: Prism::node? # - # source://prism//lib/prism/node.rb#1785 + # source://prism//lib/prism/node.rb#1749 sig { returns(T.nilable(Prism::Node)) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1740 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#1712 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#1806 + # source://prism//lib/prism/node.rb#1772 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#1794 + # source://prism//lib/prism/node.rb#1759 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1753 + # source://prism//lib/prism/node.rb#1725 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1745 + # source://prism//lib/prism/node.rb#1717 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> BlockNode + # 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#1758 - sig { params(params: T.untyped).returns(Prism::BlockNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#1730 + sig do + params( + locals: T::Array[Symbol], + parameters: T.nilable(Prism::Node), + body: T.nilable(Prism::Node), + opening_loc: Prism::Location, + closing_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::BlockNode) + end + def copy(locals: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1740 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#1712 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], parameters: Node?, body: Node?, opening_loc: Location, closing_loc: Location, location: Location } + # 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#1774 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#1738 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#1811 + # source://prism//lib/prism/node.rb#1777 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#1779 + # source://prism//lib/prism/node.rb#1743 sig { returns(T::Array[Symbol]) } def locals; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#1801 + # source://prism//lib/prism/node.rb#1767 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#1788 + # source://prism//lib/prism/node.rb#1752 sig { returns(Prism::Location) } def opening_loc; end - # attr_reader parameters: Node? + # attr_reader parameters: Prism::node? # - # source://prism//lib/prism/node.rb#1782 + # source://prism//lib/prism/node.rb#1746 sig { returns(T.nilable(Prism::Node)) } def parameters; end @@ -1927,7 +2199,8 @@ class Prism::BlockNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#1845 + # source://prism//lib/prism/node.rb#1811 + sig { override.returns(Symbol) } def type; end class << self @@ -1938,7 +2211,7 @@ class Prism::BlockNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#1855 + # source://prism//lib/prism/node.rb#1821 def type; end end end @@ -1949,86 +2222,106 @@ end # ^^ # end # -# source://prism//lib/prism/node.rb#1865 +# source://prism//lib/prism/node.rb#1831 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#1867 + # source://prism//lib/prism/node.rb#1833 + sig do + params( + source: Prism::Source, + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, flags, name, name_loc, operator_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1878 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#1844 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1883 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#1849 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1893 + # source://prism//lib/prism/node.rb#1859 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1888 + # source://prism//lib/prism/node.rb#1854 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> BlockParameterNode + # def copy: (?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location, ?location: Location) -> BlockParameterNode # - # source://prism//lib/prism/node.rb#1898 - sig { params(params: T.untyped).returns(Prism::BlockParameterNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#1864 + sig do + params( + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::BlockParameterNode) + end + def copy(flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1883 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#1849 + 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#1913 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#1872 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#1954 + # source://prism//lib/prism/node.rb#1915 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol? # - # source://prism//lib/prism/node.rb#1922 + # source://prism//lib/prism/node.rb#1881 sig { returns(T.nilable(Symbol)) } def name; end # attr_reader name_loc: Location? # - # source://prism//lib/prism/node.rb#1925 + # source://prism//lib/prism/node.rb#1884 sig { returns(T.nilable(Prism::Location)) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#1949 + # source://prism//lib/prism/node.rb#1910 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#1937 + # source://prism//lib/prism/node.rb#1897 sig { returns(Prism::Location) } def operator_loc; end @@ -2036,7 +2329,7 @@ class Prism::BlockParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#1944 + # source://prism//lib/prism/node.rb#1905 sig { returns(T::Boolean) } def repeated_parameter?; end @@ -2055,14 +2348,15 @@ class Prism::BlockParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#1982 + # source://prism//lib/prism/node.rb#1943 + sig { override.returns(Symbol) } def type; end private # private attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#1918 + # source://prism//lib/prism/node.rb#1877 sig { returns(Integer) } def flags; end @@ -2074,7 +2368,7 @@ class Prism::BlockParameterNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#1992 + # source://prism//lib/prism/node.rb#1953 def type; end end end @@ -2088,98 +2382,118 @@ end # ^^^^^^^^^^^^^^^^^ # end # -# source://prism//lib/prism/node.rb#2005 +# source://prism//lib/prism/node.rb#1966 class Prism::BlockParametersNode < ::Prism::Node - # def initialize: (ParametersNode? parameters, Array[Node] locals, Location? opening_loc, Location? closing_loc, Location location) -> void + # 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#2007 + # source://prism//lib/prism/node.rb#1968 + sig do + params( + source: Prism::Source, + parameters: T.nilable(Prism::ParametersNode), + locals: T::Array[Prism::BlockLocalVariableNode], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end def initialize(source, parameters, locals, opening_loc, closing_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2018 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#1979 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2023 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#1984 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#2097 + # source://prism//lib/prism/node.rb#2053 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#2079 + # source://prism//lib/prism/node.rb#2034 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#2036 + # source://prism//lib/prism/node.rb#1997 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#2028 + # source://prism//lib/prism/node.rb#1989 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> BlockParametersNode + # def copy: (?parameters: ParametersNode?, ?locals: Array[BlockLocalVariableNode], ?opening_loc: Location?, ?closing_loc: Location?, ?location: Location) -> BlockParametersNode # - # source://prism//lib/prism/node.rb#2041 - sig { params(params: T.untyped).returns(Prism::BlockParametersNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#2002 + sig do + params( + parameters: T.nilable(Prism::ParametersNode), + locals: T::Array[Prism::BlockLocalVariableNode], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::BlockParametersNode) + end + def copy(parameters: T.unsafe(nil), locals: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2023 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#1984 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { parameters: ParametersNode?, locals: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location } + # 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#2056 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#2010 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#2102 + # source://prism//lib/prism/node.rb#2058 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end - # attr_reader locals: Array[Node] + # attr_reader locals: Array[BlockLocalVariableNode] # - # source://prism//lib/prism/node.rb#2064 - sig { returns(T::Array[Prism::Node]) } + # source://prism//lib/prism/node.rb#2018 + sig { returns(T::Array[Prism::BlockLocalVariableNode]) } def locals; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#2092 + # source://prism//lib/prism/node.rb#2048 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#2067 + # source://prism//lib/prism/node.rb#2021 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader parameters: ParametersNode? # - # source://prism//lib/prism/node.rb#2061 + # source://prism//lib/prism/node.rb#2015 sig { returns(T.nilable(Prism::ParametersNode)) } def parameters; end @@ -2198,7 +2512,8 @@ class Prism::BlockParametersNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#2130 + # source://prism//lib/prism/node.rb#2086 + sig { override.returns(Symbol) } def type; end class << self @@ -2209,7 +2524,7 @@ class Prism::BlockParametersNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#2140 + # source://prism//lib/prism/node.rb#2096 def type; end end end @@ -2219,80 +2534,96 @@ end # break foo # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#2149 +# source://prism//lib/prism/node.rb#2105 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#2151 + # source://prism//lib/prism/node.rb#2107 + sig do + params( + source: Prism::Source, + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, arguments, keyword_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2160 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#2116 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#2200 + # source://prism//lib/prism/node.rb#2151 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2165 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#2121 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#2177 + # source://prism//lib/prism/node.rb#2133 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#2170 + # source://prism//lib/prism/node.rb#2126 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> BreakNode + # def copy: (?arguments: ArgumentsNode?, ?keyword_loc: Location, ?location: Location) -> BreakNode # - # source://prism//lib/prism/node.rb#2182 - sig { params(params: T.untyped).returns(Prism::BreakNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#2138 + sig do + params( + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::BreakNode) + end + def copy(arguments: T.unsafe(nil), keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2165 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#2121 + 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#2195 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#2146 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#2215 + # source://prism//lib/prism/node.rb#2167 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#2210 + # source://prism//lib/prism/node.rb#2162 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#2203 + # source://prism//lib/prism/node.rb#2154 sig { returns(Prism::Location) } def keyword_loc; end @@ -2311,7 +2642,8 @@ class Prism::BreakNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#2241 + # source://prism//lib/prism/node.rb#2193 + sig { override.returns(Symbol) } def type; end class << self @@ -2322,7 +2654,7 @@ class Prism::BreakNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#2251 + # source://prism//lib/prism/node.rb#2203 def type; end end end @@ -2332,126 +2664,154 @@ end # foo.bar &&= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#2260 +# source://prism//lib/prism/node.rb#2212 class Prism::CallAndWriteNode < ::Prism::Node - # def initialize: (Integer flags, Node? receiver, Location? call_operator_loc, Location? message_loc, Symbol read_name, Symbol write_name, Location operator_loc, 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, Location operator_loc, Prism::node value, Location location) -> void # # @return [CallAndWriteNode] a new instance of CallAndWriteNode # - # source://prism//lib/prism/node.rb#2262 + # source://prism//lib/prism/node.rb#2214 + sig do + params( + source: Prism::Source, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end def initialize(source, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2277 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#2229 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def attribute_write?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2381 + # source://prism//lib/prism/node.rb#2325 sig { returns(T::Boolean) } def attribute_write?; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#2391 + # source://prism//lib/prism/node.rb#2335 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#2331 + # source://prism//lib/prism/node.rb#2272 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2282 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#2234 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#2295 + # source://prism//lib/prism/node.rb#2247 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#2287 + # source://prism//lib/prism/node.rb#2239 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> CallAndWriteNode + # 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#2300 - sig { params(params: T.untyped).returns(Prism::CallAndWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#2252 + sig do + params( + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::CallAndWriteNode) + end + def copy(flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), message_loc: T.unsafe(nil), read_name: T.unsafe(nil), write_name: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2282 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#2234 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: 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, operator_loc: Location, value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#2319 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#2260 + sig { params(keys: T.nilable(T::Array[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#2386 + # source://prism//lib/prism/node.rb#2330 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#2406 + # source://prism//lib/prism/node.rb#2350 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def message: () -> String? # - # source://prism//lib/prism/node.rb#2396 + # source://prism//lib/prism/node.rb#2340 sig { returns(T.nilable(String)) } def message; end # attr_reader message_loc: Location? # - # source://prism//lib/prism/node.rb#2343 + # source://prism//lib/prism/node.rb#2285 sig { returns(T.nilable(Prism::Location)) } def message_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#2401 + # source://prism//lib/prism/node.rb#2345 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#2361 + # source://prism//lib/prism/node.rb#2304 sig { returns(Prism::Location) } def operator_loc; end # attr_reader read_name: Symbol # - # source://prism//lib/prism/node.rb#2355 + # source://prism//lib/prism/node.rb#2298 sig { returns(Symbol) } def read_name; end - # attr_reader receiver: Node? + # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#2328 + # source://prism//lib/prism/node.rb#2269 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -2459,7 +2819,7 @@ class Prism::CallAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2371 + # source://prism//lib/prism/node.rb#2315 sig { returns(T::Boolean) } def safe_navigation?; end @@ -2478,12 +2838,13 @@ class Prism::CallAndWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#2440 + # source://prism//lib/prism/node.rb#2384 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#2367 + # source://prism//lib/prism/node.rb#2311 sig { returns(Prism::Node) } def value; end @@ -2491,13 +2852,13 @@ class Prism::CallAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2376 + # source://prism//lib/prism/node.rb#2320 sig { returns(T::Boolean) } def variable_call?; end # attr_reader write_name: Symbol # - # source://prism//lib/prism/node.rb#2358 + # source://prism//lib/prism/node.rb#2301 sig { returns(Symbol) } def write_name; end @@ -2505,7 +2866,7 @@ class Prism::CallAndWriteNode < ::Prism::Node # private attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#2324 + # source://prism//lib/prism/node.rb#2265 sig { returns(Integer) } def flags; end @@ -2517,7 +2878,7 @@ class Prism::CallAndWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#2450 + # source://prism//lib/prism/node.rb#2394 def type; end end end @@ -2542,24 +2903,39 @@ end # foo&.bar # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#2474 +# source://prism//lib/prism/node.rb#2418 class Prism::CallNode < ::Prism::Node - # def initialize: (Integer flags, Node? receiver, Location? call_operator_loc, Symbol name, Location? message_loc, Location? opening_loc, ArgumentsNode? arguments, Location? closing_loc, Node? block, Location location) -> void + # 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#2476 + # source://prism//lib/prism/node.rb#2420 + sig do + params( + source: Prism::Source, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + name: Symbol, + message_loc: T.nilable(Prism::Location), + opening_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: T.nilable(Prism::Location), + block: T.nilable(Prism::Node), + location: Prism::Location + ).void + end def initialize(source, flags, receiver, call_operator_loc, name, message_loc, opening_loc, arguments, closing_loc, block, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2492 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#2436 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#2596 + # source://prism//lib/prism/node.rb#2531 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end @@ -2567,119 +2943,134 @@ class Prism::CallNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2625 + # source://prism//lib/prism/node.rb#2561 sig { returns(T::Boolean) } def attribute_write?; end - # attr_reader block: Node? + # attr_reader block: Prism::node? # - # source://prism//lib/prism/node.rb#2611 + # source://prism//lib/prism/node.rb#2547 sig { returns(T.nilable(Prism::Node)) } def block; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#2635 + # source://prism//lib/prism/node.rb#2571 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#2557 + # source://prism//lib/prism/node.rb#2489 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2497 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#2441 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#2650 + # source://prism//lib/prism/node.rb#2586 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#2599 + # source://prism//lib/prism/node.rb#2534 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#2511 + # source://prism//lib/prism/node.rb#2455 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#2502 + # source://prism//lib/prism/node.rb#2446 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> CallNode + # 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#2516 - sig { params(params: T.untyped).returns(Prism::CallNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#2460 + sig do + params( + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + name: Symbol, + message_loc: T.nilable(Prism::Location), + opening_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: T.nilable(Prism::Location), + block: T.nilable(Prism::Node), + location: Prism::Location + ).returns(Prism::CallNode) + end + def copy(flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), name: T.unsafe(nil), message_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2497 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#2441 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Node?, call_operator_loc: Location?, name: Symbol, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, block: Node?, location: Location } + # 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#2536 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#2468 + sig { params(keys: T.nilable(T::Array[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#2630 + # source://prism//lib/prism/node.rb#2566 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#2655 + # source://prism//lib/prism/node.rb#2591 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def message: () -> String? # - # source://prism//lib/prism/node.rb#2640 + # source://prism//lib/prism/node.rb#2576 sig { returns(T.nilable(String)) } def message; end # attr_reader message_loc: Location? # - # source://prism//lib/prism/node.rb#2572 + # source://prism//lib/prism/node.rb#2505 sig { returns(T.nilable(Prism::Location)) } def message_loc; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#2569 + # source://prism//lib/prism/node.rb#2502 sig { returns(Symbol) } def name; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#2645 + # source://prism//lib/prism/node.rb#2581 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#2584 + # source://prism//lib/prism/node.rb#2518 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end @@ -2694,7 +3085,7 @@ class Prism::CallNode < ::Prism::Node # foo + bar # ^^^ # - # source://prism//lib/prism/node.rb#2554 + # source://prism//lib/prism/node.rb#2486 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -2702,7 +3093,7 @@ class Prism::CallNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2615 + # source://prism//lib/prism/node.rb#2551 sig { returns(T::Boolean) } def safe_navigation?; end @@ -2721,14 +3112,15 @@ class Prism::CallNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#2699 + # source://prism//lib/prism/node.rb#2635 + sig { override.returns(Symbol) } def type; end # def variable_call?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2620 + # source://prism//lib/prism/node.rb#2556 sig { returns(T::Boolean) } def variable_call?; end @@ -2736,7 +3128,7 @@ class Prism::CallNode < ::Prism::Node # private attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#2541 + # source://prism//lib/prism/node.rb#2473 sig { returns(Integer) } def flags; end @@ -2748,34 +3140,34 @@ class Prism::CallNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#2709 + # source://prism//lib/prism/node.rb#2645 def type; end end end # Flags for call nodes. # -# source://prism//lib/prism/node.rb#19253 +# source://prism//lib/prism/node.rb#18842 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#19261 +# source://prism//lib/prism/node.rb#18850 Prism::CallNodeFlags::ATTRIBUTE_WRITE = T.let(T.unsafe(nil), Integer) # a call that ignores method visibility # -# source://prism//lib/prism/node.rb#19264 +# source://prism//lib/prism/node.rb#18853 Prism::CallNodeFlags::IGNORE_VISIBILITY = T.let(T.unsafe(nil), Integer) # &. operator # -# source://prism//lib/prism/node.rb#19255 +# source://prism//lib/prism/node.rb#18844 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#19258 +# source://prism//lib/prism/node.rb#18847 Prism::CallNodeFlags::VARIABLE_CALL = T.let(T.unsafe(nil), Integer) # Represents the use of an assignment operator on a call. @@ -2783,126 +3175,156 @@ Prism::CallNodeFlags::VARIABLE_CALL = T.let(T.unsafe(nil), Integer) # foo.bar += baz # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#2718 +# source://prism//lib/prism/node.rb#2654 class Prism::CallOperatorWriteNode < ::Prism::Node - # def initialize: (Integer flags, Node? receiver, Location? call_operator_loc, Location? message_loc, Symbol read_name, Symbol write_name, Symbol operator, Location operator_loc, 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 operator, Location operator_loc, Prism::node value, Location location) -> void # # @return [CallOperatorWriteNode] a new instance of CallOperatorWriteNode # - # source://prism//lib/prism/node.rb#2720 + # source://prism//lib/prism/node.rb#2656 + sig do + params( + source: Prism::Source, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + operator: Symbol, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end def initialize(source, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator, operator_loc, value, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2736 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#2672 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def attribute_write?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2844 + # source://prism//lib/prism/node.rb#2771 sig { returns(T::Boolean) } def attribute_write?; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#2854 + # source://prism//lib/prism/node.rb#2781 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#2791 + # source://prism//lib/prism/node.rb#2715 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2741 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#2677 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#2754 + # source://prism//lib/prism/node.rb#2690 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#2746 + # source://prism//lib/prism/node.rb#2682 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> CallOperatorWriteNode + # 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 # - # source://prism//lib/prism/node.rb#2759 - sig { params(params: T.untyped).returns(Prism::CallOperatorWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#2695 + sig do + params( + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + operator: Symbol, + 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2741 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#2677 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator: Symbol, operator_loc: Location, value: 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, operator: Symbol, operator_loc: Location, value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#2779 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#2703 + sig { params(keys: T.nilable(T::Array[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#2849 + # source://prism//lib/prism/node.rb#2776 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#2864 + # source://prism//lib/prism/node.rb#2791 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def message: () -> String? # - # source://prism//lib/prism/node.rb#2859 + # source://prism//lib/prism/node.rb#2786 sig { returns(T.nilable(String)) } def message; end # attr_reader message_loc: Location? # - # source://prism//lib/prism/node.rb#2803 + # source://prism//lib/prism/node.rb#2728 sig { returns(T.nilable(Prism::Location)) } def message_loc; end # attr_reader operator: Symbol # - # source://prism//lib/prism/node.rb#2821 + # source://prism//lib/prism/node.rb#2747 sig { returns(Symbol) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#2824 + # source://prism//lib/prism/node.rb#2750 sig { returns(Prism::Location) } def operator_loc; end # attr_reader read_name: Symbol # - # source://prism//lib/prism/node.rb#2815 + # source://prism//lib/prism/node.rb#2741 sig { returns(Symbol) } def read_name; end - # attr_reader receiver: Node? + # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#2788 + # source://prism//lib/prism/node.rb#2712 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -2910,7 +3332,7 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2834 + # source://prism//lib/prism/node.rb#2761 sig { returns(T::Boolean) } def safe_navigation?; end @@ -2929,12 +3351,13 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#2899 + # source://prism//lib/prism/node.rb#2826 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#2830 + # source://prism//lib/prism/node.rb#2757 sig { returns(Prism::Node) } def value; end @@ -2942,13 +3365,13 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2839 + # source://prism//lib/prism/node.rb#2766 sig { returns(T::Boolean) } def variable_call?; end # attr_reader write_name: Symbol # - # source://prism//lib/prism/node.rb#2818 + # source://prism//lib/prism/node.rb#2744 sig { returns(Symbol) } def write_name; end @@ -2956,7 +3379,7 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # private attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#2784 + # source://prism//lib/prism/node.rb#2708 sig { returns(Integer) } def flags; end @@ -2968,7 +3391,7 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#2909 + # source://prism//lib/prism/node.rb#2836 def type; end end end @@ -2978,126 +3401,154 @@ end # foo.bar ||= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#2918 +# source://prism//lib/prism/node.rb#2845 class Prism::CallOrWriteNode < ::Prism::Node - # def initialize: (Integer flags, Node? receiver, Location? call_operator_loc, Location? message_loc, Symbol read_name, Symbol write_name, Location operator_loc, 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, Location operator_loc, Prism::node value, Location location) -> void # # @return [CallOrWriteNode] a new instance of CallOrWriteNode # - # source://prism//lib/prism/node.rb#2920 + # source://prism//lib/prism/node.rb#2847 + sig do + params( + source: Prism::Source, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end def initialize(source, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2935 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#2862 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def attribute_write?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3039 + # source://prism//lib/prism/node.rb#2958 sig { returns(T::Boolean) } def attribute_write?; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#3049 + # source://prism//lib/prism/node.rb#2968 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#2989 + # source://prism//lib/prism/node.rb#2905 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2940 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#2867 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#2953 + # source://prism//lib/prism/node.rb#2880 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#2945 + # source://prism//lib/prism/node.rb#2872 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> CallOrWriteNode + # 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#2958 - sig { params(params: T.untyped).returns(Prism::CallOrWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#2885 + sig do + params( + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::CallOrWriteNode) + end + def copy(flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), message_loc: T.unsafe(nil), read_name: T.unsafe(nil), write_name: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2940 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#2867 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: 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, operator_loc: Location, value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#2977 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#2893 + sig { params(keys: T.nilable(T::Array[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#3044 + # source://prism//lib/prism/node.rb#2963 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#3064 + # source://prism//lib/prism/node.rb#2983 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def message: () -> String? # - # source://prism//lib/prism/node.rb#3054 + # source://prism//lib/prism/node.rb#2973 sig { returns(T.nilable(String)) } def message; end # attr_reader message_loc: Location? # - # source://prism//lib/prism/node.rb#3001 + # source://prism//lib/prism/node.rb#2918 sig { returns(T.nilable(Prism::Location)) } def message_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#3059 + # source://prism//lib/prism/node.rb#2978 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#3019 + # source://prism//lib/prism/node.rb#2937 sig { returns(Prism::Location) } def operator_loc; end # attr_reader read_name: Symbol # - # source://prism//lib/prism/node.rb#3013 + # source://prism//lib/prism/node.rb#2931 sig { returns(Symbol) } def read_name; end - # attr_reader receiver: Node? + # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#2986 + # source://prism//lib/prism/node.rb#2902 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -3105,7 +3556,7 @@ class Prism::CallOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3029 + # source://prism//lib/prism/node.rb#2948 sig { returns(T::Boolean) } def safe_navigation?; end @@ -3124,12 +3575,13 @@ class Prism::CallOrWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#3098 + # source://prism//lib/prism/node.rb#3017 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#3025 + # source://prism//lib/prism/node.rb#2944 sig { returns(Prism::Node) } def value; end @@ -3137,13 +3589,13 @@ class Prism::CallOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3034 + # source://prism//lib/prism/node.rb#2953 sig { returns(T::Boolean) } def variable_call?; end # attr_reader write_name: Symbol # - # source://prism//lib/prism/node.rb#3016 + # source://prism//lib/prism/node.rb#2934 sig { returns(Symbol) } def write_name; end @@ -3151,7 +3603,7 @@ class Prism::CallOrWriteNode < ::Prism::Node # private attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#2982 + # source://prism//lib/prism/node.rb#2898 sig { returns(Integer) } def flags; end @@ -3163,7 +3615,7 @@ class Prism::CallOrWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#3108 + # source://prism//lib/prism/node.rb#3027 def type; end end end @@ -3181,114 +3633,136 @@ end # for foo.bar in baz do end # ^^^^^^^ # -# source://prism//lib/prism/node.rb#3125 +# source://prism//lib/prism/node.rb#3044 class Prism::CallTargetNode < ::Prism::Node - # def initialize: (Integer flags, Node receiver, Location call_operator_loc, Symbol name, Location message_loc, Location location) -> void + # 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#3127 + # source://prism//lib/prism/node.rb#3046 + sig do + params( + source: Prism::Source, + flags: Integer, + receiver: Prism::Node, + call_operator_loc: Prism::Location, + name: Symbol, + message_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, flags, receiver, call_operator_loc, name, message_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3139 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#3058 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def attribute_write?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3213 + # source://prism//lib/prism/node.rb#3126 sig { returns(T::Boolean) } def attribute_write?; end # def call_operator: () -> String # - # source://prism//lib/prism/node.rb#3223 + # source://prism//lib/prism/node.rb#3136 sig { returns(String) } def call_operator; end # attr_reader call_operator_loc: Location # - # source://prism//lib/prism/node.rb#3187 + # source://prism//lib/prism/node.rb#3098 sig { returns(Prism::Location) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3144 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#3063 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3154 + # source://prism//lib/prism/node.rb#3073 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3149 + # source://prism//lib/prism/node.rb#3068 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> CallTargetNode + # 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#3159 - sig { params(params: T.untyped).returns(Prism::CallTargetNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#3078 + sig do + params( + flags: Integer, + receiver: Prism::Node, + call_operator_loc: Prism::Location, + name: Symbol, + message_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::CallTargetNode) + end + def copy(flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), name: T.unsafe(nil), message_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3144 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#3063 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Node, call_operator_loc: Location, name: Symbol, message_loc: Location, location: Location } + # 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#3175 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#3086 + sig { params(keys: T.nilable(T::Array[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#3218 + # source://prism//lib/prism/node.rb#3131 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#3233 + # source://prism//lib/prism/node.rb#3146 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def message: () -> String # - # source://prism//lib/prism/node.rb#3228 + # source://prism//lib/prism/node.rb#3141 sig { returns(String) } def message; end # attr_reader message_loc: Location # - # source://prism//lib/prism/node.rb#3196 + # source://prism//lib/prism/node.rb#3108 sig { returns(Prism::Location) } def message_loc; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#3193 + # source://prism//lib/prism/node.rb#3105 sig { returns(Symbol) } def name; end - # attr_reader receiver: Node + # attr_reader receiver: Prism::node # - # source://prism//lib/prism/node.rb#3184 + # source://prism//lib/prism/node.rb#3095 sig { returns(Prism::Node) } def receiver; end @@ -3296,7 +3770,7 @@ class Prism::CallTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3203 + # source://prism//lib/prism/node.rb#3116 sig { returns(T::Boolean) } def safe_navigation?; end @@ -3315,14 +3789,15 @@ class Prism::CallTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#3259 + # source://prism//lib/prism/node.rb#3172 + sig { override.returns(Symbol) } def type; end # def variable_call?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3208 + # source://prism//lib/prism/node.rb#3121 sig { returns(T::Boolean) } def variable_call?; end @@ -3330,7 +3805,7 @@ class Prism::CallTargetNode < ::Prism::Node # private attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#3180 + # source://prism//lib/prism/node.rb#3091 sig { returns(Integer) } def flags; end @@ -3342,7 +3817,7 @@ class Prism::CallTargetNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#3269 + # source://prism//lib/prism/node.rb#3182 def type; end end end @@ -3352,80 +3827,98 @@ end # foo => [bar => baz] # ^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3278 +# source://prism//lib/prism/node.rb#3191 class Prism::CapturePatternNode < ::Prism::Node - # def initialize: (Node value, Node target, Location operator_loc, Location location) -> void + # 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#3280 + # source://prism//lib/prism/node.rb#3193 + sig do + params( + source: Prism::Source, + value: Prism::Node, + target: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, value, target, operator_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3290 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#3203 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3295 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#3208 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3305 + # source://prism//lib/prism/node.rb#3218 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3300 + # source://prism//lib/prism/node.rb#3213 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> CapturePatternNode + # def copy: (?value: Prism::node, ?target: Prism::node, ?operator_loc: Location, ?location: Location) -> CapturePatternNode # - # source://prism//lib/prism/node.rb#3310 - sig { params(params: T.untyped).returns(Prism::CapturePatternNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#3223 + sig do + params( + value: Prism::Node, + target: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::CapturePatternNode) + end + def copy(value: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3295 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#3208 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { value: Node, target: Node, operator_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::node, target: Prism::node, operator_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#3324 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#3231 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#3347 + # source://prism//lib/prism/node.rb#3255 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # - # source://prism//lib/prism/node.rb#3342 + # source://prism//lib/prism/node.rb#3250 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#3335 + # source://prism//lib/prism/node.rb#3242 sig { returns(Prism::Location) } def operator_loc; end - # attr_reader target: Node + # attr_reader target: Prism::node # - # source://prism//lib/prism/node.rb#3332 + # source://prism//lib/prism/node.rb#3239 sig { returns(Prism::Node) } def target; end @@ -3444,12 +3937,13 @@ class Prism::CapturePatternNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#3371 + # source://prism//lib/prism/node.rb#3279 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#3329 + # source://prism//lib/prism/node.rb#3236 sig { returns(Prism::Node) } def value; end @@ -3461,7 +3955,7 @@ class Prism::CapturePatternNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#3381 + # source://prism//lib/prism/node.rb#3289 def type; end end end @@ -3473,104 +3967,126 @@ end # end # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3392 +# source://prism//lib/prism/node.rb#3300 class Prism::CaseMatchNode < ::Prism::Node - # def initialize: (Node? predicate, Array[Node] conditions, ElseNode? consequent, Location case_keyword_loc, Location end_keyword_loc, Location location) -> void + # 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#3394 + # source://prism//lib/prism/node.rb#3302 + sig do + params( + source: Prism::Source, + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::Node], + consequent: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3406 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#3314 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def case_keyword: () -> String # - # source://prism//lib/prism/node.rb#3473 + # source://prism//lib/prism/node.rb#3375 sig { returns(String) } def case_keyword; end # attr_reader case_keyword_loc: Location # - # source://prism//lib/prism/node.rb#3460 + # source://prism//lib/prism/node.rb#3360 sig { returns(Prism::Location) } def case_keyword_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3411 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#3319 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3425 + # source://prism//lib/prism/node.rb#3333 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3416 + # source://prism//lib/prism/node.rb#3324 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # attr_reader conditions: Array[Node] + # attr_reader conditions: Array[Prism::node] # - # source://prism//lib/prism/node.rb#3454 + # source://prism//lib/prism/node.rb#3354 sig { returns(T::Array[Prism::Node]) } def conditions; end # attr_reader consequent: ElseNode? # - # source://prism//lib/prism/node.rb#3457 + # source://prism//lib/prism/node.rb#3357 sig { returns(T.nilable(Prism::ElseNode)) } def consequent; end - # def copy: (**params) -> CaseMatchNode + # 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#3430 - sig { params(params: T.untyped).returns(Prism::CaseMatchNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#3338 + sig do + params( + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::Node], + consequent: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::CaseMatchNode) + end + def copy(predicate: T.unsafe(nil), conditions: T.unsafe(nil), consequent: T.unsafe(nil), case_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3411 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#3319 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { predicate: Node?, conditions: Array[Node], consequent: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location, location: Location } + # 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#3446 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#3346 + 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#3478 + # source://prism//lib/prism/node.rb#3380 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#3466 + # source://prism//lib/prism/node.rb#3367 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 # - # source://prism//lib/prism/node.rb#3483 + # source://prism//lib/prism/node.rb#3385 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end - # attr_reader predicate: Node? + # attr_reader predicate: Prism::node? # - # source://prism//lib/prism/node.rb#3451 + # source://prism//lib/prism/node.rb#3351 sig { returns(T.nilable(Prism::Node)) } def predicate; end @@ -3589,7 +4105,8 @@ class Prism::CaseMatchNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#3517 + # source://prism//lib/prism/node.rb#3419 + sig { override.returns(Symbol) } def type; end class << self @@ -3600,7 +4117,7 @@ class Prism::CaseMatchNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#3527 + # source://prism//lib/prism/node.rb#3429 def type; end end end @@ -3612,104 +4129,126 @@ end # end # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3538 +# source://prism//lib/prism/node.rb#3440 class Prism::CaseNode < ::Prism::Node - # def initialize: (Node? predicate, Array[Node] conditions, ElseNode? consequent, Location case_keyword_loc, Location end_keyword_loc, Location location) -> void + # 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#3540 + # source://prism//lib/prism/node.rb#3442 + sig do + params( + source: Prism::Source, + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::Node], + consequent: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3552 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#3454 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def case_keyword: () -> String # - # source://prism//lib/prism/node.rb#3619 + # source://prism//lib/prism/node.rb#3515 sig { returns(String) } def case_keyword; end # attr_reader case_keyword_loc: Location # - # source://prism//lib/prism/node.rb#3606 + # source://prism//lib/prism/node.rb#3500 sig { returns(Prism::Location) } def case_keyword_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3557 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#3459 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3571 + # source://prism//lib/prism/node.rb#3473 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3562 + # source://prism//lib/prism/node.rb#3464 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # attr_reader conditions: Array[Node] + # attr_reader conditions: Array[Prism::node] # - # source://prism//lib/prism/node.rb#3600 + # source://prism//lib/prism/node.rb#3494 sig { returns(T::Array[Prism::Node]) } def conditions; end # attr_reader consequent: ElseNode? # - # source://prism//lib/prism/node.rb#3603 + # source://prism//lib/prism/node.rb#3497 sig { returns(T.nilable(Prism::ElseNode)) } def consequent; end - # def copy: (**params) -> CaseNode + # 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#3576 - sig { params(params: T.untyped).returns(Prism::CaseNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#3478 + sig do + params( + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::Node], + consequent: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::CaseNode) + end + def copy(predicate: T.unsafe(nil), conditions: T.unsafe(nil), consequent: T.unsafe(nil), case_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3557 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#3459 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { predicate: Node?, conditions: Array[Node], consequent: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location, location: Location } + # 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#3592 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#3486 + 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#3624 + # source://prism//lib/prism/node.rb#3520 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#3612 + # source://prism//lib/prism/node.rb#3507 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 # - # source://prism//lib/prism/node.rb#3629 + # source://prism//lib/prism/node.rb#3525 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end - # attr_reader predicate: Node? + # attr_reader predicate: Prism::node? # - # source://prism//lib/prism/node.rb#3597 + # source://prism//lib/prism/node.rb#3491 sig { returns(T.nilable(Prism::Node)) } def predicate; end @@ -3728,7 +4267,8 @@ class Prism::CaseNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#3663 + # source://prism//lib/prism/node.rb#3559 + sig { override.returns(Symbol) } def type; end class << self @@ -3739,7 +4279,7 @@ class Prism::CaseNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#3673 + # source://prism//lib/prism/node.rb#3569 def type; end end end @@ -3749,128 +4289,156 @@ end # class Foo end # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3682 +# source://prism//lib/prism/node.rb#3578 class Prism::ClassNode < ::Prism::Node - # def initialize: (Array[Symbol] locals, Location class_keyword_loc, Node constant_path, Location? inheritance_operator_loc, Node? superclass, Node? body, Location end_keyword_loc, Symbol name, Location location) -> void + # 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#3684 + # source://prism//lib/prism/node.rb#3580 + sig do + params( + source: Prism::Source, + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + constant_path: Prism::Node, + inheritance_operator_loc: T.nilable(Prism::Location), + superclass: T.nilable(Prism::Node), + body: T.nilable(Prism::Node), + end_keyword_loc: Prism::Location, + name: Symbol, + location: Prism::Location + ).void + end def initialize(source, locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, body, end_keyword_loc, name, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3699 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#3595 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # attr_reader body: Node? + # attr_reader body: Prism::node? # - # source://prism//lib/prism/node.rb#3774 + # source://prism//lib/prism/node.rb#3661 sig { returns(T.nilable(Prism::Node)) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3704 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#3600 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def class_keyword: () -> String # - # source://prism//lib/prism/node.rb#3787 + # source://prism//lib/prism/node.rb#3675 sig { returns(String) } def class_keyword; end # attr_reader class_keyword_loc: Location # - # source://prism//lib/prism/node.rb#3750 + # source://prism//lib/prism/node.rb#3635 sig { returns(Prism::Location) } def class_keyword_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3718 + # source://prism//lib/prism/node.rb#3614 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3709 + # source://prism//lib/prism/node.rb#3605 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # attr_reader constant_path: Node + # attr_reader constant_path: Prism::node # - # source://prism//lib/prism/node.rb#3756 + # source://prism//lib/prism/node.rb#3642 sig { returns(Prism::Node) } def constant_path; end - # def copy: (**params) -> ClassNode + # 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#3723 - sig { params(params: T.untyped).returns(Prism::ClassNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#3619 + sig do + params( + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + constant_path: Prism::Node, + inheritance_operator_loc: T.nilable(Prism::Location), + superclass: T.nilable(Prism::Node), + body: T.nilable(Prism::Node), + end_keyword_loc: Prism::Location, + name: Symbol, + location: Prism::Location + ).returns(Prism::ClassNode) + end + def copy(locals: T.unsafe(nil), class_keyword_loc: T.unsafe(nil), constant_path: T.unsafe(nil), inheritance_operator_loc: T.unsafe(nil), superclass: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), name: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3704 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#3600 + 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: Node, inheritance_operator_loc: Location?, superclass: Node?, body: Node?, end_keyword_loc: Location, name: Symbol, location: Location } + # 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#3742 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#3627 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def end_keyword: () -> String # - # source://prism//lib/prism/node.rb#3797 + # source://prism//lib/prism/node.rb#3685 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#3777 + # source://prism//lib/prism/node.rb#3664 sig { returns(Prism::Location) } def end_keyword_loc; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def inheritance_operator: () -> String? # - # source://prism//lib/prism/node.rb#3792 + # source://prism//lib/prism/node.rb#3680 sig { returns(T.nilable(String)) } def inheritance_operator; end # attr_reader inheritance_operator_loc: Location? # - # source://prism//lib/prism/node.rb#3759 + # source://prism//lib/prism/node.rb#3645 sig { returns(T.nilable(Prism::Location)) } def inheritance_operator_loc; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#3802 + # source://prism//lib/prism/node.rb#3690 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#3747 + # source://prism//lib/prism/node.rb#3632 sig { returns(T::Array[Symbol]) } def locals; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#3783 + # source://prism//lib/prism/node.rb#3671 sig { returns(Symbol) } def name; end - # attr_reader superclass: Node? + # attr_reader superclass: Prism::node? # - # source://prism//lib/prism/node.rb#3771 + # source://prism//lib/prism/node.rb#3658 sig { returns(T.nilable(Prism::Node)) } def superclass; end @@ -3889,7 +4457,8 @@ class Prism::ClassNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#3840 + # source://prism//lib/prism/node.rb#3728 + sig { override.returns(Symbol) } def type; end class << self @@ -3900,7 +4469,7 @@ class Prism::ClassNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#3850 + # source://prism//lib/prism/node.rb#3738 def type; end end end @@ -3910,89 +4479,109 @@ end # @@target &&= value # ^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3859 +# source://prism//lib/prism/node.rb#3747 class Prism::ClassVariableAndWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void + # 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#3861 + # source://prism//lib/prism/node.rb#3749 + 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 # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3872 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#3760 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3877 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#3765 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3887 + # source://prism//lib/prism/node.rb#3775 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3882 + # source://prism//lib/prism/node.rb#3770 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ClassVariableAndWriteNode + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ClassVariableAndWriteNode # - # source://prism//lib/prism/node.rb#3892 - sig { params(params: T.untyped).returns(Prism::ClassVariableAndWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#3780 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::ClassVariableAndWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3877 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#3765 + 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: Node, 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#3907 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#3788 + 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#125 + # source://prism//lib/prism/desugar_compiler.rb#127 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#3936 + # source://prism//lib/prism/node.rb#3819 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#3912 + # source://prism//lib/prism/node.rb#3793 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#3915 + # source://prism//lib/prism/node.rb#3796 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#3931 + # source://prism//lib/prism/node.rb#3814 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#3921 + # source://prism//lib/prism/node.rb#3803 sig { returns(Prism::Location) } def operator_loc; end @@ -4011,12 +4600,13 @@ class Prism::ClassVariableAndWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#3960 + # source://prism//lib/prism/node.rb#3843 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#3927 + # source://prism//lib/prism/node.rb#3810 sig { returns(Prism::Node) } def value; end @@ -4028,7 +4618,7 @@ class Prism::ClassVariableAndWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#3970 + # source://prism//lib/prism/node.rb#3853 def type; end end end @@ -4038,89 +4628,111 @@ end # @@target += value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3979 +# source://prism//lib/prism/node.rb#3862 class Prism::ClassVariableOperatorWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Symbol operator, Location location) -> void + # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Symbol operator, Location location) -> void # # @return [ClassVariableOperatorWriteNode] a new instance of ClassVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#3981 + # source://prism//lib/prism/node.rb#3864 + 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 # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3993 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#3876 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3998 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#3881 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4008 + # source://prism//lib/prism/node.rb#3891 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4003 + # source://prism//lib/prism/node.rb#3886 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ClassVariableOperatorWriteNode + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?operator: Symbol, ?location: Location) -> ClassVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#4013 - sig { params(params: T.untyped).returns(Prism::ClassVariableOperatorWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#3896 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3998 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#3881 + 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: Node, operator: Symbol, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, operator: Symbol, location: Location } # - # source://prism//lib/prism/node.rb#4029 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#3904 + 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#137 + # source://prism//lib/prism/desugar_compiler.rb#139 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#4056 + # source://prism//lib/prism/node.rb#3933 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4034 + # source://prism//lib/prism/node.rb#3909 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#4037 + # source://prism//lib/prism/node.rb#3912 sig { returns(Prism::Location) } def name_loc; end # attr_reader operator: Symbol # - # source://prism//lib/prism/node.rb#4052 + # source://prism//lib/prism/node.rb#3929 sig { returns(Symbol) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#4043 + # source://prism//lib/prism/node.rb#3919 sig { returns(Prism::Location) } def operator_loc; end @@ -4139,12 +4751,13 @@ class Prism::ClassVariableOperatorWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#4081 + # source://prism//lib/prism/node.rb#3958 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#4049 + # source://prism//lib/prism/node.rb#3926 sig { returns(Prism::Node) } def value; end @@ -4156,7 +4769,7 @@ class Prism::ClassVariableOperatorWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#4091 + # source://prism//lib/prism/node.rb#3968 def type; end end end @@ -4166,89 +4779,109 @@ end # @@target ||= value # ^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4100 +# source://prism//lib/prism/node.rb#3977 class Prism::ClassVariableOrWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void + # 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#4102 + # source://prism//lib/prism/node.rb#3979 + 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 # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4113 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#3990 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4118 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#3995 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4128 + # source://prism//lib/prism/node.rb#4005 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4123 + # source://prism//lib/prism/node.rb#4000 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ClassVariableOrWriteNode + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ClassVariableOrWriteNode # - # source://prism//lib/prism/node.rb#4133 - sig { params(params: T.untyped).returns(Prism::ClassVariableOrWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#4010 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::ClassVariableOrWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4118 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#3995 + 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: Node, 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#4148 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#4018 + 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#131 + # source://prism//lib/prism/desugar_compiler.rb#133 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#4177 + # source://prism//lib/prism/node.rb#4049 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4153 + # source://prism//lib/prism/node.rb#4023 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#4156 + # source://prism//lib/prism/node.rb#4026 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#4172 + # source://prism//lib/prism/node.rb#4044 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#4162 + # source://prism//lib/prism/node.rb#4033 sig { returns(Prism::Location) } def operator_loc; end @@ -4267,12 +4900,13 @@ class Prism::ClassVariableOrWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#4201 + # source://prism//lib/prism/node.rb#4073 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#4168 + # source://prism//lib/prism/node.rb#4040 sig { returns(Prism::Node) } def value; end @@ -4284,7 +4918,7 @@ class Prism::ClassVariableOrWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#4211 + # source://prism//lib/prism/node.rb#4083 def type; end end end @@ -4294,63 +4928,66 @@ end # @@foo # ^^^^^ # -# source://prism//lib/prism/node.rb#4220 +# source://prism//lib/prism/node.rb#4092 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#4222 + # source://prism//lib/prism/node.rb#4094 + sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } def initialize(source, name, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4230 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#4102 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4235 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#4107 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4245 + # source://prism//lib/prism/node.rb#4117 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4240 + # source://prism//lib/prism/node.rb#4112 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ClassVariableReadNode + # def copy: (?name: Symbol, ?location: Location) -> ClassVariableReadNode # - # source://prism//lib/prism/node.rb#4250 - sig { params(params: T.untyped).returns(Prism::ClassVariableReadNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#4122 + 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#4235 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#4107 + 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#4262 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#4130 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#4275 + # source://prism//lib/prism/node.rb#4143 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); 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). @@ -4359,7 +4996,7 @@ class Prism::ClassVariableReadNode < ::Prism::Node # # @@_test # name `:@@_test` # - # source://prism//lib/prism/node.rb#4271 + # source://prism//lib/prism/node.rb#4139 sig { returns(Symbol) } def name; end @@ -4378,7 +5015,8 @@ class Prism::ClassVariableReadNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#4295 + # source://prism//lib/prism/node.rb#4163 + sig { override.returns(Symbol) } def type; end class << self @@ -4389,7 +5027,7 @@ class Prism::ClassVariableReadNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#4305 + # source://prism//lib/prism/node.rb#4173 def type; end end end @@ -4399,68 +5037,71 @@ end # @@foo, @@bar = baz # ^^^^^ ^^^^^ # -# source://prism//lib/prism/node.rb#4314 +# source://prism//lib/prism/node.rb#4182 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#4316 + # source://prism//lib/prism/node.rb#4184 + sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } def initialize(source, name, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4324 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#4192 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4329 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#4197 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4339 + # source://prism//lib/prism/node.rb#4207 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4334 + # source://prism//lib/prism/node.rb#4202 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ClassVariableTargetNode + # def copy: (?name: Symbol, ?location: Location) -> ClassVariableTargetNode # - # source://prism//lib/prism/node.rb#4344 - sig { params(params: T.untyped).returns(Prism::ClassVariableTargetNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#4212 + 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#4329 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#4197 + 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#4356 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#4220 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#4365 + # source://prism//lib/prism/node.rb#4229 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4361 + # source://prism//lib/prism/node.rb#4225 sig { returns(Symbol) } def name; end @@ -4479,7 +5120,8 @@ class Prism::ClassVariableTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#4385 + # source://prism//lib/prism/node.rb#4249 + sig { override.returns(Symbol) } def type; end class << self @@ -4490,7 +5132,7 @@ class Prism::ClassVariableTargetNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#4395 + # source://prism//lib/prism/node.rb#4259 def type; end end end @@ -4500,87 +5142,117 @@ end # @@foo = 1 # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4404 +# source://prism//lib/prism/node.rb#4268 class Prism::ClassVariableWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Node value, Location? operator_loc, Location location) -> void + # 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#4406 + # source://prism//lib/prism/node.rb#4270 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, name, name_loc, value, operator_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4417 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#4281 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4422 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#4286 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4432 + # source://prism//lib/prism/node.rb#4296 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4427 + # source://prism//lib/prism/node.rb#4291 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ClassVariableWriteNode + # def copy: (?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location, ?location: Location) -> ClassVariableWriteNode # - # source://prism//lib/prism/node.rb#4437 - sig { params(params: T.untyped).returns(Prism::ClassVariableWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#4301 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::ClassVariableWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4422 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#4286 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Node, operator_loc: Location?, location: Location } + # 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#4452 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#4309 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#4487 + # source://prism//lib/prism/node.rb#4357 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end - # attr_reader name: Symbol + # The name of the class variable, which is a `@@` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). + # + # @@abc = 123 # name `@@abc` + # + # @@_test = :test # name `@@_test` # - # source://prism//lib/prism/node.rb#4457 + # source://prism//lib/prism/node.rb#4318 sig { returns(Symbol) } def name; end - # attr_reader name_loc: Location + # The location of the variable name. + # + # @@foo = :bar + # ^^^^^ # - # source://prism//lib/prism/node.rb#4460 + # source://prism//lib/prism/node.rb#4324 sig { returns(Prism::Location) } def name_loc; end - # def operator: () -> String? + # def operator: () -> String # - # source://prism//lib/prism/node.rb#4482 - sig { returns(T.nilable(String)) } + # source://prism//lib/prism/node.rb#4352 + sig { returns(String) } def operator; end - # attr_reader operator_loc: Location? + # The location of the `=` operator. # - # source://prism//lib/prism/node.rb#4469 - sig { returns(T.nilable(Prism::Location)) } + # @@foo = :bar + # ^ + # + # source://prism//lib/prism/node.rb#4344 + sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of @@ -4598,12 +5270,20 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#4511 + # source://prism//lib/prism/node.rb#4381 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # The value to assign to the class variable. Can be any node that + # represents a non-void expression. + # + # @@foo = :bar + # ^^^^ + # + # @@_xyz = 123 + # ^^^ # - # source://prism//lib/prism/node.rb#4466 + # source://prism//lib/prism/node.rb#4338 sig { returns(Prism::Node) } def value; end @@ -4615,7 +5295,7 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#4521 + # source://prism//lib/prism/node.rb#4391 def type; end end end @@ -4623,27 +5303,36 @@ 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#258 +# source://prism//lib/prism/parse_result.rb#288 class Prism::Comment + abstract! + # Create a new comment object with the given location. # # @return [Comment] a new instance of Comment # - # source://prism//lib/prism/parse_result.rb#263 + # source://prism//lib/prism/parse_result.rb#293 + 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#268 + # source://prism//lib/prism/parse_result.rb#298 + 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#260 - sig { returns(Prism::Location) } + # source://prism//lib/prism/parse_result.rb#290 def location; end - sig { returns(T::Boolean) } + # Returns the content of the comment by slicing it from the source code. + # + # source://prism//lib/prism/parse_result.rb#303 + sig { returns(String) } + def slice; end + + sig { abstract.returns(T::Boolean) } def trailing?; end end @@ -4664,910 +5353,927 @@ end # Prism.parse("1 + 2").value.accept(SExpressions.new) # # => [:program, [[[:call, [[:integer], [:arguments, [[:integer]]]]]]]] # -# source://prism//lib/prism/compiler.rb#26 -class Prism::Compiler +# source://prism//lib/prism/compiler.rb#27 +class Prism::Compiler < ::Prism::Visitor # Visit an individual node. # - # source://prism//lib/prism/compiler.rb#28 + # source://prism//lib/prism/compiler.rb#29 + sig { params(node: T.nilable(Prism::Node)).returns(T.nilable(Result)) } def visit(node); end # Visit the child nodes of the given node. # Compile a AliasGlobalVariableNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_alias_global_variable_node(node); end # Visit the child nodes of the given node. # Compile a AliasMethodNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_alias_method_node(node); end # Visit a list of nodes. # - # source://prism//lib/prism/compiler.rb#33 + # source://prism//lib/prism/compiler.rb#34 + sig { params(nodes: T::Array[T.nilable(Prism::Node)]).returns(T::Array[T.nilable(Result)]) } def visit_all(nodes); end # Visit the child nodes of the given node. # Compile a AlternationPatternNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_alternation_pattern_node(node); end # Visit the child nodes of the given node. # Compile a AndNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_and_node(node); end # Visit the child nodes of the given node. # Compile a ArgumentsNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_arguments_node(node); end # Visit the child nodes of the given node. # Compile a ArrayNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_array_node(node); end # Visit the child nodes of the given node. # Compile a ArrayPatternNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_array_pattern_node(node); end # Visit the child nodes of the given node. # Compile a AssocNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_assoc_node(node); end # Visit the child nodes of the given node. # Compile a AssocSplatNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_assoc_splat_node(node); end # Visit the child nodes of the given node. # Compile a BackReferenceReadNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_back_reference_read_node(node); end # Visit the child nodes of the given node. # Compile a BeginNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_begin_node(node); end # Visit the child nodes of the given node. # Compile a BlockArgumentNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_block_argument_node(node); end # Visit the child nodes of the given node. # Compile a BlockLocalVariableNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_block_local_variable_node(node); end # Visit the child nodes of the given node. # Compile a BlockNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_block_node(node); end # Visit the child nodes of the given node. # Compile a BlockParameterNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_block_parameter_node(node); end # Visit the child nodes of the given node. # Compile a BlockParametersNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_block_parameters_node(node); end # Visit the child nodes of the given node. # Compile a BreakNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_break_node(node); end # Visit the child nodes of the given node. # Compile a CallAndWriteNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_call_and_write_node(node); end # Visit the child nodes of the given node. # Compile a CallNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_call_node(node); end # Visit the child nodes of the given node. # Compile a CallOperatorWriteNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_call_operator_write_node(node); end # Visit the child nodes of the given node. # Compile a CallOrWriteNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_call_or_write_node(node); end # Visit the child nodes of the given node. # Compile a CallTargetNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_call_target_node(node); end # Visit the child nodes of the given node. # Compile a CapturePatternNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_capture_pattern_node(node); end # Visit the child nodes of the given node. # Compile a CaseMatchNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_case_match_node(node); end # Visit the child nodes of the given node. # Compile a CaseNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_case_node(node); end # Visit the child nodes of the given node. # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 + sig { params(node: Prism::Node).returns(T::Array[T.nilable(Result)]) } def visit_child_nodes(node); end # Visit the child nodes of the given node. # Compile a ClassNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_class_node(node); end # Visit the child nodes of the given node. # Compile a ClassVariableAndWriteNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_class_variable_and_write_node(node); end # Visit the child nodes of the given node. # Compile a ClassVariableOperatorWriteNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_class_variable_operator_write_node(node); end # Visit the child nodes of the given node. # Compile a ClassVariableOrWriteNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_class_variable_or_write_node(node); end # Visit the child nodes of the given node. # Compile a ClassVariableReadNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_class_variable_read_node(node); end # Visit the child nodes of the given node. # Compile a ClassVariableTargetNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_class_variable_target_node(node); end # Visit the child nodes of the given node. # Compile a ClassVariableWriteNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_class_variable_write_node(node); end # Visit the child nodes of the given node. # Compile a ConstantAndWriteNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_constant_and_write_node(node); end # Visit the child nodes of the given node. # Compile a ConstantOperatorWriteNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_constant_operator_write_node(node); end # Visit the child nodes of the given node. # Compile a ConstantOrWriteNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_constant_or_write_node(node); end # Visit the child nodes of the given node. # Compile a ConstantPathAndWriteNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_constant_path_and_write_node(node); end # Visit the child nodes of the given node. # Compile a ConstantPathNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_constant_path_node(node); end # Visit the child nodes of the given node. # Compile a ConstantPathOperatorWriteNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_constant_path_operator_write_node(node); end # Visit the child nodes of the given node. # Compile a ConstantPathOrWriteNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_constant_path_or_write_node(node); end # Visit the child nodes of the given node. # Compile a ConstantPathTargetNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_constant_path_target_node(node); end # Visit the child nodes of the given node. # Compile a ConstantPathWriteNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_constant_path_write_node(node); end # Visit the child nodes of the given node. # Compile a ConstantReadNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_constant_read_node(node); end # Visit the child nodes of the given node. # Compile a ConstantTargetNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_constant_target_node(node); end # Visit the child nodes of the given node. # Compile a ConstantWriteNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_constant_write_node(node); end # Visit the child nodes of the given node. # Compile a DefNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_def_node(node); end # Visit the child nodes of the given node. # Compile a DefinedNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_defined_node(node); end # Visit the child nodes of the given node. # Compile a ElseNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_else_node(node); end # Visit the child nodes of the given node. # Compile a EmbeddedStatementsNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_embedded_statements_node(node); end # Visit the child nodes of the given node. # Compile a EmbeddedVariableNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_embedded_variable_node(node); end # Visit the child nodes of the given node. # Compile a EnsureNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_ensure_node(node); end # Visit the child nodes of the given node. # Compile a FalseNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_false_node(node); end # Visit the child nodes of the given node. # Compile a FindPatternNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_find_pattern_node(node); end # Visit the child nodes of the given node. # Compile a FlipFlopNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_flip_flop_node(node); end # Visit the child nodes of the given node. # Compile a FloatNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_float_node(node); end # Visit the child nodes of the given node. # Compile a ForNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_for_node(node); end # Visit the child nodes of the given node. # Compile a ForwardingArgumentsNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_forwarding_arguments_node(node); end # Visit the child nodes of the given node. # Compile a ForwardingParameterNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_forwarding_parameter_node(node); end # Visit the child nodes of the given node. # Compile a ForwardingSuperNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_forwarding_super_node(node); end # Visit the child nodes of the given node. # Compile a GlobalVariableAndWriteNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_global_variable_and_write_node(node); end # Visit the child nodes of the given node. # Compile a GlobalVariableOperatorWriteNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_global_variable_operator_write_node(node); end # Visit the child nodes of the given node. # Compile a GlobalVariableOrWriteNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_global_variable_or_write_node(node); end # Visit the child nodes of the given node. # Compile a GlobalVariableReadNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_global_variable_read_node(node); end # Visit the child nodes of the given node. # Compile a GlobalVariableTargetNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_global_variable_target_node(node); end # Visit the child nodes of the given node. # Compile a GlobalVariableWriteNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_global_variable_write_node(node); end # Visit the child nodes of the given node. # Compile a HashNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_hash_node(node); end # Visit the child nodes of the given node. # Compile a HashPatternNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_hash_pattern_node(node); end # Visit the child nodes of the given node. # Compile a IfNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_if_node(node); end # Visit the child nodes of the given node. # Compile a ImaginaryNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_imaginary_node(node); end # Visit the child nodes of the given node. # Compile a ImplicitNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_implicit_node(node); end # Visit the child nodes of the given node. # Compile a ImplicitRestNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_implicit_rest_node(node); end # Visit the child nodes of the given node. # Compile a InNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_in_node(node); end # Visit the child nodes of the given node. # Compile a IndexAndWriteNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_index_and_write_node(node); end # Visit the child nodes of the given node. # Compile a IndexOperatorWriteNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_index_operator_write_node(node); end # Visit the child nodes of the given node. # Compile a IndexOrWriteNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_index_or_write_node(node); end # Visit the child nodes of the given node. # Compile a IndexTargetNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_index_target_node(node); end # Visit the child nodes of the given node. # Compile a InstanceVariableAndWriteNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_instance_variable_and_write_node(node); end # Visit the child nodes of the given node. # Compile a InstanceVariableOperatorWriteNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_instance_variable_operator_write_node(node); end # Visit the child nodes of the given node. # Compile a InstanceVariableOrWriteNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_instance_variable_or_write_node(node); end # Visit the child nodes of the given node. # Compile a InstanceVariableReadNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_instance_variable_read_node(node); end # Visit the child nodes of the given node. # Compile a InstanceVariableTargetNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_instance_variable_target_node(node); end # Visit the child nodes of the given node. # Compile a InstanceVariableWriteNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_instance_variable_write_node(node); end # Visit the child nodes of the given node. # Compile a IntegerNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_integer_node(node); end # Visit the child nodes of the given node. # Compile a InterpolatedMatchLastLineNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_interpolated_match_last_line_node(node); end # Visit the child nodes of the given node. # Compile a InterpolatedRegularExpressionNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_interpolated_regular_expression_node(node); end # Visit the child nodes of the given node. # Compile a InterpolatedStringNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_interpolated_string_node(node); end # Visit the child nodes of the given node. # Compile a InterpolatedSymbolNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_interpolated_symbol_node(node); end # Visit the child nodes of the given node. # Compile a InterpolatedXStringNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_interpolated_x_string_node(node); end + # Visit the child nodes of the given node. + # Compile a ItParametersNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_it_parameters_node(node); end + # Visit the child nodes of the given node. # Compile a KeywordHashNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_keyword_hash_node(node); end # Visit the child nodes of the given node. # Compile a KeywordRestParameterNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_keyword_rest_parameter_node(node); end # Visit the child nodes of the given node. # Compile a LambdaNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_lambda_node(node); end # Visit the child nodes of the given node. # Compile a LocalVariableAndWriteNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_local_variable_and_write_node(node); end # Visit the child nodes of the given node. # Compile a LocalVariableOperatorWriteNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_local_variable_operator_write_node(node); end # Visit the child nodes of the given node. # Compile a LocalVariableOrWriteNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_local_variable_or_write_node(node); end # Visit the child nodes of the given node. # Compile a LocalVariableReadNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_local_variable_read_node(node); end # Visit the child nodes of the given node. # Compile a LocalVariableTargetNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_local_variable_target_node(node); end # Visit the child nodes of the given node. # Compile a LocalVariableWriteNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_local_variable_write_node(node); end # Visit the child nodes of the given node. # Compile a MatchLastLineNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_match_last_line_node(node); end # Visit the child nodes of the given node. # Compile a MatchPredicateNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_match_predicate_node(node); end # Visit the child nodes of the given node. # Compile a MatchRequiredNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_match_required_node(node); end # Visit the child nodes of the given node. # Compile a MatchWriteNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_match_write_node(node); end # Visit the child nodes of the given node. # Compile a MissingNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_missing_node(node); end # Visit the child nodes of the given node. # Compile a ModuleNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_module_node(node); end # Visit the child nodes of the given node. # Compile a MultiTargetNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_multi_target_node(node); end # Visit the child nodes of the given node. # Compile a MultiWriteNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_multi_write_node(node); end # Visit the child nodes of the given node. # Compile a NextNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_next_node(node); end # Visit the child nodes of the given node. # Compile a NilNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_nil_node(node); end # Visit the child nodes of the given node. # Compile a NoKeywordsParameterNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_no_keywords_parameter_node(node); end # Visit the child nodes of the given node. # Compile a NumberedParametersNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_numbered_parameters_node(node); end # Visit the child nodes of the given node. # Compile a NumberedReferenceReadNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_numbered_reference_read_node(node); end # Visit the child nodes of the given node. # Compile a OptionalKeywordParameterNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_optional_keyword_parameter_node(node); end # Visit the child nodes of the given node. # Compile a OptionalParameterNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_optional_parameter_node(node); end # Visit the child nodes of the given node. # Compile a OrNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_or_node(node); end # Visit the child nodes of the given node. # Compile a ParametersNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_parameters_node(node); end # Visit the child nodes of the given node. # Compile a ParenthesesNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_parentheses_node(node); end # Visit the child nodes of the given node. # Compile a PinnedExpressionNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_pinned_expression_node(node); end # Visit the child nodes of the given node. # Compile a PinnedVariableNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_pinned_variable_node(node); end # Visit the child nodes of the given node. # Compile a PostExecutionNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_post_execution_node(node); end # Visit the child nodes of the given node. # Compile a PreExecutionNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_pre_execution_node(node); end # Visit the child nodes of the given node. # Compile a ProgramNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_program_node(node); end # Visit the child nodes of the given node. # Compile a RangeNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_range_node(node); end # Visit the child nodes of the given node. # Compile a RationalNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_rational_node(node); end # Visit the child nodes of the given node. # Compile a RedoNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_redo_node(node); end # Visit the child nodes of the given node. # Compile a RegularExpressionNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_regular_expression_node(node); end # Visit the child nodes of the given node. # Compile a RequiredKeywordParameterNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_required_keyword_parameter_node(node); end # Visit the child nodes of the given node. # Compile a RequiredParameterNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_required_parameter_node(node); end # Visit the child nodes of the given node. # Compile a RescueModifierNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_rescue_modifier_node(node); end # Visit the child nodes of the given node. # Compile a RescueNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_rescue_node(node); end # Visit the child nodes of the given node. # Compile a RestParameterNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_rest_parameter_node(node); end # Visit the child nodes of the given node. # Compile a RetryNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_retry_node(node); end # Visit the child nodes of the given node. # Compile a ReturnNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_return_node(node); end # Visit the child nodes of the given node. # Compile a SelfNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_self_node(node); end + # Visit the child nodes of the given node. + # Compile a ShareableConstantNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_shareable_constant_node(node); end + # Visit the child nodes of the given node. # Compile a SingletonClassNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_singleton_class_node(node); end # Visit the child nodes of the given node. # Compile a SourceEncodingNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_source_encoding_node(node); end # Visit the child nodes of the given node. # Compile a SourceFileNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_source_file_node(node); end # Visit the child nodes of the given node. # Compile a SourceLineNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_source_line_node(node); end # Visit the child nodes of the given node. # Compile a SplatNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_splat_node(node); end # Visit the child nodes of the given node. # Compile a StatementsNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_statements_node(node); end # Visit the child nodes of the given node. # Compile a StringNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_string_node(node); end # Visit the child nodes of the given node. # Compile a SuperNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_super_node(node); end # Visit the child nodes of the given node. # Compile a SymbolNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_symbol_node(node); end # Visit the child nodes of the given node. # Compile a TrueNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_true_node(node); end # Visit the child nodes of the given node. # Compile a UndefNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_undef_node(node); end # Visit the child nodes of the given node. # Compile a UnlessNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_unless_node(node); end # Visit the child nodes of the given node. # Compile a UntilNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_until_node(node); end # Visit the child nodes of the given node. # Compile a WhenNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_when_node(node); end # Visit the child nodes of the given node. # Compile a WhileNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_while_node(node); end # Visit the child nodes of the given node. # Compile a XStringNode node # - # source://prism//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#39 def visit_x_string_node(node); end # Visit the child nodes of the given node. # Compile a YieldNode node # - # source://prism//lib/prism/compiler.rb#38 + # 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. @@ -5575,89 +6281,109 @@ end # Target &&= value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4530 +# source://prism//lib/prism/node.rb#4400 class Prism::ConstantAndWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void + # 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#4532 + # source://prism//lib/prism/node.rb#4402 + 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 # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4543 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#4413 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4548 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#4418 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4558 + # source://prism//lib/prism/node.rb#4428 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4553 + # source://prism//lib/prism/node.rb#4423 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ConstantAndWriteNode + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ConstantAndWriteNode # - # source://prism//lib/prism/node.rb#4563 - sig { params(params: T.untyped).returns(Prism::ConstantAndWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#4433 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::ConstantAndWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4548 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#4418 + 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: Node, 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#4578 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#4441 + 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#143 + # source://prism//lib/prism/desugar_compiler.rb#145 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#4607 + # source://prism//lib/prism/node.rb#4472 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4583 + # source://prism//lib/prism/node.rb#4446 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#4586 + # source://prism//lib/prism/node.rb#4449 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#4602 + # source://prism//lib/prism/node.rb#4467 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#4592 + # source://prism//lib/prism/node.rb#4456 sig { returns(Prism::Location) } def operator_loc; end @@ -5676,12 +6402,13 @@ class Prism::ConstantAndWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#4631 + # source://prism//lib/prism/node.rb#4496 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#4598 + # source://prism//lib/prism/node.rb#4463 sig { returns(Prism::Node) } def value; end @@ -5693,7 +6420,7 @@ class Prism::ConstantAndWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#4641 + # source://prism//lib/prism/node.rb#4506 def type; end end end @@ -5703,89 +6430,111 @@ end # Target += value # ^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4650 +# source://prism//lib/prism/node.rb#4515 class Prism::ConstantOperatorWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Symbol operator, Location location) -> void + # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Symbol operator, Location location) -> void # # @return [ConstantOperatorWriteNode] a new instance of ConstantOperatorWriteNode # - # source://prism//lib/prism/node.rb#4652 + # source://prism//lib/prism/node.rb#4517 + 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 # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4664 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#4529 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4669 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#4534 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4679 + # source://prism//lib/prism/node.rb#4544 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4674 + # source://prism//lib/prism/node.rb#4539 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ConstantOperatorWriteNode + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?operator: Symbol, ?location: Location) -> ConstantOperatorWriteNode # - # source://prism//lib/prism/node.rb#4684 - sig { params(params: T.untyped).returns(Prism::ConstantOperatorWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#4549 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4669 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#4534 + 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: Node, operator: Symbol, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, operator: Symbol, location: Location } # - # source://prism//lib/prism/node.rb#4700 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#4557 + 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#155 + # source://prism//lib/prism/desugar_compiler.rb#157 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#4727 + # source://prism//lib/prism/node.rb#4586 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4705 + # source://prism//lib/prism/node.rb#4562 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#4708 + # source://prism//lib/prism/node.rb#4565 sig { returns(Prism::Location) } def name_loc; end # attr_reader operator: Symbol # - # source://prism//lib/prism/node.rb#4723 + # source://prism//lib/prism/node.rb#4582 sig { returns(Symbol) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#4714 + # source://prism//lib/prism/node.rb#4572 sig { returns(Prism::Location) } def operator_loc; end @@ -5804,12 +6553,13 @@ class Prism::ConstantOperatorWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#4752 + # source://prism//lib/prism/node.rb#4611 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#4720 + # source://prism//lib/prism/node.rb#4579 sig { returns(Prism::Node) } def value; end @@ -5821,7 +6571,7 @@ class Prism::ConstantOperatorWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#4762 + # source://prism//lib/prism/node.rb#4621 def type; end end end @@ -5831,89 +6581,109 @@ end # Target ||= value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4771 +# source://prism//lib/prism/node.rb#4630 class Prism::ConstantOrWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void + # 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#4773 + # source://prism//lib/prism/node.rb#4632 + 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 # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4784 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#4643 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4789 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#4648 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4799 + # source://prism//lib/prism/node.rb#4658 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4794 + # source://prism//lib/prism/node.rb#4653 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ConstantOrWriteNode + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ConstantOrWriteNode # - # source://prism//lib/prism/node.rb#4804 - sig { params(params: T.untyped).returns(Prism::ConstantOrWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#4663 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::ConstantOrWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4789 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#4648 + 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: Node, 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#4819 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#4671 + 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#149 + # source://prism//lib/prism/desugar_compiler.rb#151 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#4848 + # source://prism//lib/prism/node.rb#4702 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4824 + # source://prism//lib/prism/node.rb#4676 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#4827 + # source://prism//lib/prism/node.rb#4679 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#4843 + # source://prism//lib/prism/node.rb#4697 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#4833 + # source://prism//lib/prism/node.rb#4686 sig { returns(Prism::Location) } def operator_loc; end @@ -5932,12 +6702,13 @@ class Prism::ConstantOrWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#4872 + # source://prism//lib/prism/node.rb#4726 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#4839 + # source://prism//lib/prism/node.rb#4693 sig { returns(Prism::Node) } def value; end @@ -5949,7 +6720,7 @@ class Prism::ConstantOrWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#4882 + # source://prism//lib/prism/node.rb#4736 def type; end end end @@ -5959,80 +6730,98 @@ end # Parent::Child &&= value # ^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4891 +# source://prism//lib/prism/node.rb#4745 class Prism::ConstantPathAndWriteNode < ::Prism::Node - # def initialize: (ConstantPathNode target, Location operator_loc, Node value, Location location) -> void + # 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#4893 + # source://prism//lib/prism/node.rb#4747 + sig do + params( + source: Prism::Source, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end def initialize(source, target, operator_loc, value, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4903 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#4757 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4908 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#4762 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4918 + # source://prism//lib/prism/node.rb#4772 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4913 + # source://prism//lib/prism/node.rb#4767 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ConstantPathAndWriteNode + # def copy: (?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ConstantPathAndWriteNode # - # source://prism//lib/prism/node.rb#4923 - sig { params(params: T.untyped).returns(Prism::ConstantPathAndWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#4777 + sig do + params( + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::ConstantPathAndWriteNode) + end + def copy(target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4908 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#4762 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Node, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#4937 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#4785 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#4960 + # source://prism//lib/prism/node.rb#4809 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # - # source://prism//lib/prism/node.rb#4955 + # source://prism//lib/prism/node.rb#4804 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#4945 + # source://prism//lib/prism/node.rb#4793 sig { returns(Prism::Location) } def operator_loc; end # attr_reader target: ConstantPathNode # - # source://prism//lib/prism/node.rb#4942 + # source://prism//lib/prism/node.rb#4790 sig { returns(Prism::ConstantPathNode) } def target; end @@ -6051,12 +6840,13 @@ class Prism::ConstantPathAndWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#4984 + # source://prism//lib/prism/node.rb#4833 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#4951 + # source://prism//lib/prism/node.rb#4800 sig { returns(Prism::Node) } def value; end @@ -6068,7 +6858,7 @@ class Prism::ConstantPathAndWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#4994 + # source://prism//lib/prism/node.rb#4843 def type; end end end @@ -6078,97 +6868,117 @@ end # Foo::Bar # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#5003 +# source://prism//lib/prism/node.rb#4852 class Prism::ConstantPathNode < ::Prism::Node - # def initialize: (Node? parent, Node child, Location delimiter_loc, Location location) -> void + # def initialize: (Prism::node? parent, ConstantReadNode | MissingNode child, Location delimiter_loc, Location location) -> void # # @return [ConstantPathNode] a new instance of ConstantPathNode # - # source://prism//lib/prism/node.rb#5005 + # source://prism//lib/prism/node.rb#4854 + sig do + params( + source: Prism::Source, + parent: T.nilable(Prism::Node), + child: T.any(Prism::ConstantReadNode, Prism::MissingNode), + delimiter_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, parent, child, delimiter_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5015 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#4864 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # attr_reader child: Node + # attr_reader child: ConstantReadNode | MissingNode # - # source://prism//lib/prism/node.rb#5060 - sig { returns(Prism::Node) } + # source://prism//lib/prism/node.rb#4903 + sig { returns(T.any(Prism::ConstantReadNode, Prism::MissingNode)) } def child; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5020 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#4869 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5033 + # source://prism//lib/prism/node.rb#4882 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5025 + # source://prism//lib/prism/node.rb#4874 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ConstantPathNode + # def copy: (?parent: Prism::node?, ?child: ConstantReadNode | MissingNode, ?delimiter_loc: Location, ?location: Location) -> ConstantPathNode # - # source://prism//lib/prism/node.rb#5038 - sig { params(params: T.untyped).returns(Prism::ConstantPathNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#4887 + sig do + params( + parent: T.nilable(Prism::Node), + child: T.any(Prism::ConstantReadNode, Prism::MissingNode), + delimiter_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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5020 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#4869 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { parent: Node?, child: Node, delimiter_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { parent: Prism::node?, child: ConstantReadNode | MissingNode, delimiter_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#5052 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#4895 + 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#5070 + # source://prism//lib/prism/node.rb#4914 sig { returns(String) } def delimiter; end # attr_reader delimiter_loc: Location # - # source://prism//lib/prism/node.rb#5063 + # source://prism//lib/prism/node.rb#4906 sig { returns(Prism::Location) } def delimiter_loc; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # Returns the full name of this constant path. For example: "Foo::Bar" # - # source://prism//lib/prism/node_ext.rb#129 + # source://prism//lib/prism/node_ext.rb#162 + 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#112 + # source://prism//lib/prism/node_ext.rb#141 + sig { returns(T::Array[Symbol]) } def full_name_parts; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#5075 + # source://prism//lib/prism/node.rb#4919 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end - # attr_reader parent: Node? + # attr_reader parent: Prism::node? # - # source://prism//lib/prism/node.rb#5057 + # source://prism//lib/prism/node.rb#4900 sig { returns(T.nilable(Prism::Node)) } def parent; end @@ -6187,7 +6997,8 @@ class Prism::ConstantPathNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#5103 + # source://prism//lib/prism/node.rb#4947 + sig { override.returns(Symbol) } def type; end class << self @@ -6198,7 +7009,7 @@ class Prism::ConstantPathNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#5113 + # source://prism//lib/prism/node.rb#4957 def type; end end end @@ -6210,88 +7021,115 @@ end # var::Bar::Baz -> raises because the first part of the constant path is a # local variable # -# source://prism//lib/prism/node_ext.rb#108 +# source://prism//lib/prism/node_ext.rb#132 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 +class Prism::ConstantPathNode::MissingNodesInConstantPathError < ::StandardError; end + # Represents assigning to a constant path using an operator that isn't `=`. # # Parent::Child += value # ^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#5122 +# source://prism//lib/prism/node.rb#4966 class Prism::ConstantPathOperatorWriteNode < ::Prism::Node - # def initialize: (ConstantPathNode target, Location operator_loc, Node value, Symbol operator, Location location) -> void + # def initialize: (ConstantPathNode target, Location operator_loc, Prism::node value, Symbol operator, Location location) -> void # # @return [ConstantPathOperatorWriteNode] a new instance of ConstantPathOperatorWriteNode # - # source://prism//lib/prism/node.rb#5124 + # source://prism//lib/prism/node.rb#4968 + sig do + params( + source: Prism::Source, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node, + operator: Symbol, + location: Prism::Location + ).void + end def initialize(source, target, operator_loc, value, operator, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5135 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#4979 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5140 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#4984 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5150 + # source://prism//lib/prism/node.rb#4994 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5145 + # source://prism//lib/prism/node.rb#4989 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ConstantPathOperatorWriteNode + # def copy: (?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node, ?operator: Symbol, ?location: Location) -> ConstantPathOperatorWriteNode # - # source://prism//lib/prism/node.rb#5155 - sig { params(params: T.untyped).returns(Prism::ConstantPathOperatorWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#4999 + sig do + params( + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node, + 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5140 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#4984 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Node, operator: Symbol, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Prism::node, operator: Symbol, location: Location } # - # source://prism//lib/prism/node.rb#5170 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#5007 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#5191 + # source://prism//lib/prism/node.rb#5029 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader operator: Symbol # - # source://prism//lib/prism/node.rb#5187 + # source://prism//lib/prism/node.rb#5025 sig { returns(Symbol) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#5178 + # source://prism//lib/prism/node.rb#5015 sig { returns(Prism::Location) } def operator_loc; end # attr_reader target: ConstantPathNode # - # source://prism//lib/prism/node.rb#5175 + # source://prism//lib/prism/node.rb#5012 sig { returns(Prism::ConstantPathNode) } def target; end @@ -6310,12 +7148,13 @@ class Prism::ConstantPathOperatorWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#5216 + # source://prism//lib/prism/node.rb#5054 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#5184 + # source://prism//lib/prism/node.rb#5022 sig { returns(Prism::Node) } def value; end @@ -6327,7 +7166,7 @@ class Prism::ConstantPathOperatorWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#5226 + # source://prism//lib/prism/node.rb#5064 def type; end end end @@ -6337,80 +7176,98 @@ end # Parent::Child ||= value # ^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#5235 +# source://prism//lib/prism/node.rb#5073 class Prism::ConstantPathOrWriteNode < ::Prism::Node - # def initialize: (ConstantPathNode target, Location operator_loc, Node value, Location location) -> void + # 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#5237 + # source://prism//lib/prism/node.rb#5075 + sig do + params( + source: Prism::Source, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end def initialize(source, target, operator_loc, value, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5247 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#5085 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5252 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#5090 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5262 + # source://prism//lib/prism/node.rb#5100 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5257 + # source://prism//lib/prism/node.rb#5095 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ConstantPathOrWriteNode + # def copy: (?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ConstantPathOrWriteNode # - # source://prism//lib/prism/node.rb#5267 - sig { params(params: T.untyped).returns(Prism::ConstantPathOrWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#5105 + sig do + params( + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::ConstantPathOrWriteNode) + end + def copy(target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5252 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#5090 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Node, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#5281 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#5113 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#5304 + # source://prism//lib/prism/node.rb#5137 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # - # source://prism//lib/prism/node.rb#5299 + # source://prism//lib/prism/node.rb#5132 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#5289 + # source://prism//lib/prism/node.rb#5121 sig { returns(Prism::Location) } def operator_loc; end # attr_reader target: ConstantPathNode # - # source://prism//lib/prism/node.rb#5286 + # source://prism//lib/prism/node.rb#5118 sig { returns(Prism::ConstantPathNode) } def target; end @@ -6429,12 +7286,13 @@ class Prism::ConstantPathOrWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#5328 + # source://prism//lib/prism/node.rb#5161 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#5295 + # source://prism//lib/prism/node.rb#5128 sig { returns(Prism::Node) } def value; end @@ -6446,7 +7304,7 @@ class Prism::ConstantPathOrWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#5338 + # source://prism//lib/prism/node.rb#5171 def type; end end end @@ -6456,97 +7314,117 @@ end # Foo::Foo, Bar::Bar = baz # ^^^^^^^^ ^^^^^^^^ # -# source://prism//lib/prism/node.rb#5347 +# source://prism//lib/prism/node.rb#5180 class Prism::ConstantPathTargetNode < ::Prism::Node - # def initialize: (Node? parent, Node child, Location delimiter_loc, Location location) -> void + # def initialize: (Prism::node? parent, ConstantReadNode | MissingNode child, Location delimiter_loc, Location location) -> void # # @return [ConstantPathTargetNode] a new instance of ConstantPathTargetNode # - # source://prism//lib/prism/node.rb#5349 + # source://prism//lib/prism/node.rb#5182 + sig do + params( + source: Prism::Source, + parent: T.nilable(Prism::Node), + child: T.any(Prism::ConstantReadNode, Prism::MissingNode), + delimiter_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, parent, child, delimiter_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5359 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#5192 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # attr_reader child: Node + # attr_reader child: ConstantReadNode | MissingNode # - # source://prism//lib/prism/node.rb#5404 - sig { returns(Prism::Node) } + # source://prism//lib/prism/node.rb#5231 + sig { returns(T.any(Prism::ConstantReadNode, Prism::MissingNode)) } def child; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5364 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#5197 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5377 + # source://prism//lib/prism/node.rb#5210 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5369 + # source://prism//lib/prism/node.rb#5202 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ConstantPathTargetNode + # def copy: (?parent: Prism::node?, ?child: ConstantReadNode | MissingNode, ?delimiter_loc: Location, ?location: Location) -> ConstantPathTargetNode # - # source://prism//lib/prism/node.rb#5382 - sig { params(params: T.untyped).returns(Prism::ConstantPathTargetNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#5215 + sig do + params( + parent: T.nilable(Prism::Node), + child: T.any(Prism::ConstantReadNode, Prism::MissingNode), + delimiter_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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5364 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#5197 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { parent: Node?, child: Node, delimiter_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { parent: Prism::node?, child: ConstantReadNode | MissingNode, delimiter_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#5396 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#5223 + 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#5414 + # source://prism//lib/prism/node.rb#5242 sig { returns(String) } def delimiter; end # attr_reader delimiter_loc: Location # - # source://prism//lib/prism/node.rb#5407 + # source://prism//lib/prism/node.rb#5234 sig { returns(Prism::Location) } def delimiter_loc; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # Returns the full name of this constant path. For example: "Foo::Bar" # - # source://prism//lib/prism/node_ext.rb#152 + # source://prism//lib/prism/node_ext.rb#190 + 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#137 + # source://prism//lib/prism/node_ext.rb#170 + sig { returns(T::Array[Symbol]) } def full_name_parts; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#5419 + # source://prism//lib/prism/node.rb#5247 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end - # attr_reader parent: Node? + # attr_reader parent: Prism::node? # - # source://prism//lib/prism/node.rb#5401 + # source://prism//lib/prism/node.rb#5228 sig { returns(T.nilable(Prism::Node)) } def parent; end @@ -6565,7 +7443,8 @@ class Prism::ConstantPathTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#5447 + # source://prism//lib/prism/node.rb#5275 + sig { override.returns(Symbol) } def type; end class << self @@ -6576,7 +7455,7 @@ class Prism::ConstantPathTargetNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#5457 + # source://prism//lib/prism/node.rb#5285 def type; end end end @@ -6592,80 +7471,98 @@ end # ::Foo::Bar = 1 # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#5472 +# source://prism//lib/prism/node.rb#5300 class Prism::ConstantPathWriteNode < ::Prism::Node - # def initialize: (ConstantPathNode target, Location operator_loc, Node value, Location location) -> void + # 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#5474 + # source://prism//lib/prism/node.rb#5302 + sig do + params( + source: Prism::Source, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end def initialize(source, target, operator_loc, value, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5484 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#5312 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5489 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#5317 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5499 + # source://prism//lib/prism/node.rb#5327 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5494 + # source://prism//lib/prism/node.rb#5322 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ConstantPathWriteNode + # def copy: (?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ConstantPathWriteNode # - # source://prism//lib/prism/node.rb#5504 - sig { params(params: T.untyped).returns(Prism::ConstantPathWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#5332 + sig do + params( + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::ConstantPathWriteNode) + end + def copy(target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5489 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#5317 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Node, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#5518 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#5340 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#5541 + # source://prism//lib/prism/node.rb#5364 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # - # source://prism//lib/prism/node.rb#5536 + # source://prism//lib/prism/node.rb#5359 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#5526 + # source://prism//lib/prism/node.rb#5348 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#5345 sig { returns(Prism::ConstantPathNode) } def target; end @@ -6684,12 +7581,13 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#5565 + # source://prism//lib/prism/node.rb#5388 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#5532 + # source://prism//lib/prism/node.rb#5355 sig { returns(Prism::Node) } def value; end @@ -6701,7 +7599,7 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#5575 + # source://prism//lib/prism/node.rb#5398 def type; end end end @@ -6711,74 +7609,79 @@ end # Foo # ^^^ # -# source://prism//lib/prism/node.rb#5584 +# source://prism//lib/prism/node.rb#5407 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#5586 + # source://prism//lib/prism/node.rb#5409 + sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } def initialize(source, name, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5594 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#5417 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5599 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#5422 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5609 + # source://prism//lib/prism/node.rb#5432 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5604 + # source://prism//lib/prism/node.rb#5427 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ConstantReadNode + # def copy: (?name: Symbol, ?location: Location) -> ConstantReadNode # - # source://prism//lib/prism/node.rb#5614 - sig { params(params: T.untyped).returns(Prism::ConstantReadNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#5437 + 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#5599 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#5422 + 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#5626 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#5445 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # Returns the full name of this constant. For example: "Foo" # - # source://prism//lib/prism/node_ext.rb#96 + # source://prism//lib/prism/node_ext.rb#107 + 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#91 + # source://prism//lib/prism/node_ext.rb#102 + sig { returns(T::Array[Symbol]) } def full_name_parts; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#5639 + # source://prism//lib/prism/node.rb#5458 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # The name of the [constant](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#constants). @@ -6787,7 +7690,7 @@ class Prism::ConstantReadNode < ::Prism::Node # # SOME_CONSTANT # name `:SOME_CONSTANT` # - # source://prism//lib/prism/node.rb#5635 + # source://prism//lib/prism/node.rb#5454 sig { returns(Symbol) } def name; end @@ -6806,7 +7709,8 @@ class Prism::ConstantReadNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#5659 + # source://prism//lib/prism/node.rb#5478 + sig { override.returns(Symbol) } def type; end class << self @@ -6817,7 +7721,7 @@ class Prism::ConstantReadNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#5669 + # source://prism//lib/prism/node.rb#5488 def type; end end end @@ -6827,79 +7731,84 @@ end # Foo, Bar = baz # ^^^ ^^^ # -# source://prism//lib/prism/node.rb#5678 +# source://prism//lib/prism/node.rb#5497 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#5680 + # source://prism//lib/prism/node.rb#5499 + sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } def initialize(source, name, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5688 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#5507 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5693 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#5512 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5703 + # source://prism//lib/prism/node.rb#5522 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5698 + # source://prism//lib/prism/node.rb#5517 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ConstantTargetNode + # def copy: (?name: Symbol, ?location: Location) -> ConstantTargetNode # - # source://prism//lib/prism/node.rb#5708 - sig { params(params: T.untyped).returns(Prism::ConstantTargetNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#5527 + 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#5693 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#5512 + 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#5720 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#5535 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # Returns the full name of this constant. For example: "Foo" # - # source://prism//lib/prism/node_ext.rb#165 + # source://prism//lib/prism/node_ext.rb#203 + 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#160 + # source://prism//lib/prism/node_ext.rb#198 + sig { returns(T::Array[Symbol]) } def full_name_parts; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#5729 + # source://prism//lib/prism/node.rb#5544 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#5725 + # source://prism//lib/prism/node.rb#5540 sig { returns(Symbol) } def name; end @@ -6918,7 +7827,8 @@ class Prism::ConstantTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#5749 + # source://prism//lib/prism/node.rb#5564 + sig { override.returns(Symbol) } def type; end class << self @@ -6929,7 +7839,7 @@ class Prism::ConstantTargetNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#5759 + # source://prism//lib/prism/node.rb#5574 def type; end end end @@ -6939,86 +7849,119 @@ end # Foo = 1 # ^^^^^^^ # -# source://prism//lib/prism/node.rb#5768 +# source://prism//lib/prism/node.rb#5583 class Prism::ConstantWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Node value, Location operator_loc, Location location) -> void + # 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#5770 + # source://prism//lib/prism/node.rb#5585 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, name, name_loc, value, operator_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5781 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#5596 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5786 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#5601 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5796 + # source://prism//lib/prism/node.rb#5611 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5791 + # source://prism//lib/prism/node.rb#5606 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ConstantWriteNode + # def copy: (?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location, ?location: Location) -> ConstantWriteNode # - # source://prism//lib/prism/node.rb#5801 - sig { params(params: T.untyped).returns(Prism::ConstantWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#5616 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::ConstantWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5786 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#5601 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location } + # 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#5816 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#5624 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # Returns the full name of this constant. For example: "Foo" + # + # source://prism//lib/prism/node_ext.rb#120 + 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 + sig { returns(T::Array[Symbol]) } + def full_name_parts; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#5845 + # source://prism//lib/prism/node.rb#5655 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#5821 + # source://prism//lib/prism/node.rb#5629 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#5824 + # source://prism//lib/prism/node.rb#5632 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#5840 + # source://prism//lib/prism/node.rb#5650 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#5833 + # source://prism//lib/prism/node.rb#5642 sig { returns(Prism::Location) } def operator_loc; end @@ -7037,12 +7980,13 @@ class Prism::ConstantWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#5869 + # source://prism//lib/prism/node.rb#5679 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#5830 + # source://prism//lib/prism/node.rb#5639 sig { returns(Prism::Node) } def value; end @@ -7054,13 +7998,11 @@ class Prism::ConstantWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#5879 + # source://prism//lib/prism/node.rb#5689 def type; end end end -class Prism::DATAComment < Prism::Comment; 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: # @@ -7070,6 +8012,7 @@ class Prism::DATAComment < Prism::Comment; end # [ # Prism::IntegerNode.new( # Prism::IntegerBaseFlags::DECIMAL, +# 1, # Prism::Location.new(source, 1, 1), # source # ) @@ -7084,7 +8027,7 @@ class Prism::DATAComment < Prism::Comment; end # source = Prism::Source.new("[1]") # # ArrayNode( -# IntegerNode(Prism::IntegerBaseFlags::DECIMAL, Location(source, 1, 1)), source), +# IntegerNode(Prism::IntegerBaseFlags::DECIMAL, 1, Location(source, 1, 1)), source), # Location(source, 0, 1), # Location(source, 2, 1), # source @@ -7093,753 +8036,763 @@ class Prism::DATAComment < Prism::Comment; end # This is mostly helpful in the context of writing tests, but can also be used # to generate trees programmatically. # -# source://prism//lib/prism/dsl.rb#40 +# source://prism//lib/prism/dsl.rb#42 module Prism::DSL private # Create a new AliasGlobalVariableNode node # - # source://prism//lib/prism/dsl.rb#49 + # source://prism//lib/prism/dsl.rb#51 def AliasGlobalVariableNode(new_name, old_name, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new AliasMethodNode node # - # source://prism//lib/prism/dsl.rb#54 + # source://prism//lib/prism/dsl.rb#56 def AliasMethodNode(new_name, old_name, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new AlternationPatternNode node # - # source://prism//lib/prism/dsl.rb#59 + # source://prism//lib/prism/dsl.rb#61 def AlternationPatternNode(left, right, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new AndNode node # - # source://prism//lib/prism/dsl.rb#64 + # source://prism//lib/prism/dsl.rb#66 def AndNode(left, right, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ArgumentsNode node # - # source://prism//lib/prism/dsl.rb#69 + # source://prism//lib/prism/dsl.rb#71 def ArgumentsNode(flags, arguments, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ArrayNode node # - # source://prism//lib/prism/dsl.rb#74 + # source://prism//lib/prism/dsl.rb#76 def ArrayNode(flags, elements, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ArrayPatternNode node # - # source://prism//lib/prism/dsl.rb#79 + # source://prism//lib/prism/dsl.rb#81 def ArrayPatternNode(constant, requireds, rest, posts, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new AssocNode node # - # source://prism//lib/prism/dsl.rb#84 + # source://prism//lib/prism/dsl.rb#86 def AssocNode(key, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new AssocSplatNode node # - # source://prism//lib/prism/dsl.rb#89 + # source://prism//lib/prism/dsl.rb#91 def AssocSplatNode(value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new BackReferenceReadNode node # - # source://prism//lib/prism/dsl.rb#94 + # source://prism//lib/prism/dsl.rb#96 def BackReferenceReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new BeginNode node # - # source://prism//lib/prism/dsl.rb#99 + # source://prism//lib/prism/dsl.rb#101 def BeginNode(begin_keyword_loc, statements, rescue_clause, else_clause, ensure_clause, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new BlockArgumentNode node # - # source://prism//lib/prism/dsl.rb#104 + # source://prism//lib/prism/dsl.rb#106 def BlockArgumentNode(expression, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new BlockLocalVariableNode node # - # source://prism//lib/prism/dsl.rb#109 + # source://prism//lib/prism/dsl.rb#111 def BlockLocalVariableNode(flags, name, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new BlockNode node # - # source://prism//lib/prism/dsl.rb#114 + # source://prism//lib/prism/dsl.rb#116 def BlockNode(locals, parameters, body, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new BlockParameterNode node # - # source://prism//lib/prism/dsl.rb#119 + # source://prism//lib/prism/dsl.rb#121 def BlockParameterNode(flags, name, name_loc, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new BlockParametersNode node # - # source://prism//lib/prism/dsl.rb#124 + # source://prism//lib/prism/dsl.rb#126 def BlockParametersNode(parameters, locals, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new BreakNode node # - # source://prism//lib/prism/dsl.rb#129 + # source://prism//lib/prism/dsl.rb#131 def BreakNode(arguments, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new CallAndWriteNode node # - # source://prism//lib/prism/dsl.rb#134 + # source://prism//lib/prism/dsl.rb#136 def CallAndWriteNode(flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new CallNode node # - # source://prism//lib/prism/dsl.rb#139 + # source://prism//lib/prism/dsl.rb#141 def CallNode(flags, receiver, call_operator_loc, name, message_loc, opening_loc, arguments, closing_loc, block, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new CallOperatorWriteNode node # - # source://prism//lib/prism/dsl.rb#144 + # 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 # Create a new CallOrWriteNode node # - # source://prism//lib/prism/dsl.rb#149 + # source://prism//lib/prism/dsl.rb#151 def CallOrWriteNode(flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new CallTargetNode node # - # source://prism//lib/prism/dsl.rb#154 + # source://prism//lib/prism/dsl.rb#156 def CallTargetNode(flags, receiver, call_operator_loc, name, message_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new CapturePatternNode node # - # source://prism//lib/prism/dsl.rb#159 + # source://prism//lib/prism/dsl.rb#161 def CapturePatternNode(value, target, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new CaseMatchNode node # - # source://prism//lib/prism/dsl.rb#164 + # source://prism//lib/prism/dsl.rb#166 def CaseMatchNode(predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new CaseNode node # - # source://prism//lib/prism/dsl.rb#169 + # source://prism//lib/prism/dsl.rb#171 def CaseNode(predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ClassNode node # - # source://prism//lib/prism/dsl.rb#174 + # source://prism//lib/prism/dsl.rb#176 def ClassNode(locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, body, end_keyword_loc, name, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ClassVariableAndWriteNode node # - # source://prism//lib/prism/dsl.rb#179 + # source://prism//lib/prism/dsl.rb#181 def ClassVariableAndWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ClassVariableOperatorWriteNode node # - # source://prism//lib/prism/dsl.rb#184 + # 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 # Create a new ClassVariableOrWriteNode node # - # source://prism//lib/prism/dsl.rb#189 + # source://prism//lib/prism/dsl.rb#191 def ClassVariableOrWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ClassVariableReadNode node # - # source://prism//lib/prism/dsl.rb#194 + # source://prism//lib/prism/dsl.rb#196 def ClassVariableReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ClassVariableTargetNode node # - # source://prism//lib/prism/dsl.rb#199 + # source://prism//lib/prism/dsl.rb#201 def ClassVariableTargetNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ClassVariableWriteNode node # - # source://prism//lib/prism/dsl.rb#204 + # source://prism//lib/prism/dsl.rb#206 def ClassVariableWriteNode(name, name_loc, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ConstantAndWriteNode node # - # source://prism//lib/prism/dsl.rb#209 + # source://prism//lib/prism/dsl.rb#211 def ConstantAndWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ConstantOperatorWriteNode node # - # source://prism//lib/prism/dsl.rb#214 + # 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 # Create a new ConstantOrWriteNode node # - # source://prism//lib/prism/dsl.rb#219 + # source://prism//lib/prism/dsl.rb#221 def ConstantOrWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ConstantPathAndWriteNode node # - # source://prism//lib/prism/dsl.rb#224 + # source://prism//lib/prism/dsl.rb#226 def ConstantPathAndWriteNode(target, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ConstantPathNode node # - # source://prism//lib/prism/dsl.rb#229 + # source://prism//lib/prism/dsl.rb#231 def ConstantPathNode(parent, child, delimiter_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ConstantPathOperatorWriteNode node # - # source://prism//lib/prism/dsl.rb#234 + # source://prism//lib/prism/dsl.rb#236 def ConstantPathOperatorWriteNode(target, operator_loc, value, operator, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ConstantPathOrWriteNode node # - # source://prism//lib/prism/dsl.rb#239 + # source://prism//lib/prism/dsl.rb#241 def ConstantPathOrWriteNode(target, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ConstantPathTargetNode node # - # source://prism//lib/prism/dsl.rb#244 + # source://prism//lib/prism/dsl.rb#246 def ConstantPathTargetNode(parent, child, delimiter_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ConstantPathWriteNode node # - # source://prism//lib/prism/dsl.rb#249 + # source://prism//lib/prism/dsl.rb#251 def ConstantPathWriteNode(target, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ConstantReadNode node # - # source://prism//lib/prism/dsl.rb#254 + # source://prism//lib/prism/dsl.rb#256 def ConstantReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ConstantTargetNode node # - # source://prism//lib/prism/dsl.rb#259 + # source://prism//lib/prism/dsl.rb#261 def ConstantTargetNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ConstantWriteNode node # - # source://prism//lib/prism/dsl.rb#264 + # source://prism//lib/prism/dsl.rb#266 def ConstantWriteNode(name, name_loc, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new DefNode node # - # source://prism//lib/prism/dsl.rb#269 + # source://prism//lib/prism/dsl.rb#271 def DefNode(name, name_loc, receiver, parameters, body, locals, def_keyword_loc, operator_loc, lparen_loc, rparen_loc, equal_loc, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new DefinedNode node # - # source://prism//lib/prism/dsl.rb#274 + # source://prism//lib/prism/dsl.rb#276 def DefinedNode(lparen_loc, value, rparen_loc, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ElseNode node # - # source://prism//lib/prism/dsl.rb#279 + # source://prism//lib/prism/dsl.rb#281 def ElseNode(else_keyword_loc, statements, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new EmbeddedStatementsNode node # - # source://prism//lib/prism/dsl.rb#284 + # source://prism//lib/prism/dsl.rb#286 def EmbeddedStatementsNode(opening_loc, statements, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new EmbeddedVariableNode node # - # source://prism//lib/prism/dsl.rb#289 + # source://prism//lib/prism/dsl.rb#291 def EmbeddedVariableNode(operator_loc, variable, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new EnsureNode node # - # source://prism//lib/prism/dsl.rb#294 + # source://prism//lib/prism/dsl.rb#296 def EnsureNode(ensure_keyword_loc, statements, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new FalseNode node # - # source://prism//lib/prism/dsl.rb#299 + # source://prism//lib/prism/dsl.rb#301 def FalseNode(source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new FindPatternNode node # - # source://prism//lib/prism/dsl.rb#304 + # source://prism//lib/prism/dsl.rb#306 def FindPatternNode(constant, left, requireds, right, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new FlipFlopNode node # - # source://prism//lib/prism/dsl.rb#309 + # source://prism//lib/prism/dsl.rb#311 def FlipFlopNode(flags, left, right, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new FloatNode node # - # source://prism//lib/prism/dsl.rb#314 - def FloatNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#316 + def FloatNode(value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ForNode node # - # source://prism//lib/prism/dsl.rb#319 + # source://prism//lib/prism/dsl.rb#321 def ForNode(index, collection, statements, for_keyword_loc, in_keyword_loc, do_keyword_loc, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ForwardingArgumentsNode node # - # source://prism//lib/prism/dsl.rb#324 + # source://prism//lib/prism/dsl.rb#326 def ForwardingArgumentsNode(source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ForwardingParameterNode node # - # source://prism//lib/prism/dsl.rb#329 + # source://prism//lib/prism/dsl.rb#331 def ForwardingParameterNode(source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ForwardingSuperNode node # - # source://prism//lib/prism/dsl.rb#334 + # source://prism//lib/prism/dsl.rb#336 def ForwardingSuperNode(block, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new GlobalVariableAndWriteNode node # - # source://prism//lib/prism/dsl.rb#339 + # source://prism//lib/prism/dsl.rb#341 def GlobalVariableAndWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new GlobalVariableOperatorWriteNode node # - # source://prism//lib/prism/dsl.rb#344 + # 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 # Create a new GlobalVariableOrWriteNode node # - # source://prism//lib/prism/dsl.rb#349 + # source://prism//lib/prism/dsl.rb#351 def GlobalVariableOrWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new GlobalVariableReadNode node # - # source://prism//lib/prism/dsl.rb#354 + # source://prism//lib/prism/dsl.rb#356 def GlobalVariableReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new GlobalVariableTargetNode node # - # source://prism//lib/prism/dsl.rb#359 + # source://prism//lib/prism/dsl.rb#361 def GlobalVariableTargetNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new GlobalVariableWriteNode node # - # source://prism//lib/prism/dsl.rb#364 + # source://prism//lib/prism/dsl.rb#366 def GlobalVariableWriteNode(name, name_loc, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new HashNode node # - # source://prism//lib/prism/dsl.rb#369 + # source://prism//lib/prism/dsl.rb#371 def HashNode(opening_loc, elements, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new HashPatternNode node # - # source://prism//lib/prism/dsl.rb#374 + # source://prism//lib/prism/dsl.rb#376 def HashPatternNode(constant, elements, rest, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new IfNode node # - # source://prism//lib/prism/dsl.rb#379 + # source://prism//lib/prism/dsl.rb#381 def IfNode(if_keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ImaginaryNode node # - # source://prism//lib/prism/dsl.rb#384 + # source://prism//lib/prism/dsl.rb#386 def ImaginaryNode(numeric, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ImplicitNode node # - # source://prism//lib/prism/dsl.rb#389 + # source://prism//lib/prism/dsl.rb#391 def ImplicitNode(value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ImplicitRestNode node # - # source://prism//lib/prism/dsl.rb#394 + # source://prism//lib/prism/dsl.rb#396 def ImplicitRestNode(source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new InNode node # - # source://prism//lib/prism/dsl.rb#399 + # source://prism//lib/prism/dsl.rb#401 def InNode(pattern, statements, in_loc, then_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new IndexAndWriteNode node # - # source://prism//lib/prism/dsl.rb#404 + # source://prism//lib/prism/dsl.rb#406 def IndexAndWriteNode(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new IndexOperatorWriteNode node # - # source://prism//lib/prism/dsl.rb#409 + # 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 # Create a new IndexOrWriteNode node # - # source://prism//lib/prism/dsl.rb#414 + # source://prism//lib/prism/dsl.rb#416 def IndexOrWriteNode(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new IndexTargetNode node # - # source://prism//lib/prism/dsl.rb#419 + # source://prism//lib/prism/dsl.rb#421 def IndexTargetNode(flags, receiver, opening_loc, arguments, closing_loc, block, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new InstanceVariableAndWriteNode node # - # source://prism//lib/prism/dsl.rb#424 + # source://prism//lib/prism/dsl.rb#426 def InstanceVariableAndWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new InstanceVariableOperatorWriteNode node # - # source://prism//lib/prism/dsl.rb#429 + # 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 # Create a new InstanceVariableOrWriteNode node # - # source://prism//lib/prism/dsl.rb#434 + # source://prism//lib/prism/dsl.rb#436 def InstanceVariableOrWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new InstanceVariableReadNode node # - # source://prism//lib/prism/dsl.rb#439 + # source://prism//lib/prism/dsl.rb#441 def InstanceVariableReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new InstanceVariableTargetNode node # - # source://prism//lib/prism/dsl.rb#444 + # source://prism//lib/prism/dsl.rb#446 def InstanceVariableTargetNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new InstanceVariableWriteNode node # - # source://prism//lib/prism/dsl.rb#449 + # source://prism//lib/prism/dsl.rb#451 def InstanceVariableWriteNode(name, name_loc, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new IntegerNode node # - # source://prism//lib/prism/dsl.rb#454 - def IntegerNode(flags, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#456 + def IntegerNode(flags, value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new InterpolatedMatchLastLineNode node # - # source://prism//lib/prism/dsl.rb#459 + # source://prism//lib/prism/dsl.rb#461 def InterpolatedMatchLastLineNode(flags, opening_loc, parts, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new InterpolatedRegularExpressionNode node # - # source://prism//lib/prism/dsl.rb#464 + # source://prism//lib/prism/dsl.rb#466 def InterpolatedRegularExpressionNode(flags, opening_loc, parts, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new InterpolatedStringNode node # - # source://prism//lib/prism/dsl.rb#469 - def InterpolatedStringNode(opening_loc, parts, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#471 + def InterpolatedStringNode(flags, opening_loc, parts, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new InterpolatedSymbolNode node # - # source://prism//lib/prism/dsl.rb#474 + # source://prism//lib/prism/dsl.rb#476 def InterpolatedSymbolNode(opening_loc, parts, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new InterpolatedXStringNode node # - # source://prism//lib/prism/dsl.rb#479 + # source://prism//lib/prism/dsl.rb#481 def InterpolatedXStringNode(opening_loc, parts, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # Create a new ItParametersNode node + # + # source://prism//lib/prism/dsl.rb#486 + def ItParametersNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + # Create a new KeywordHashNode node # - # source://prism//lib/prism/dsl.rb#484 + # source://prism//lib/prism/dsl.rb#491 def KeywordHashNode(flags, elements, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new KeywordRestParameterNode node # - # source://prism//lib/prism/dsl.rb#489 + # source://prism//lib/prism/dsl.rb#496 def KeywordRestParameterNode(flags, name, name_loc, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new LambdaNode node # - # source://prism//lib/prism/dsl.rb#494 + # source://prism//lib/prism/dsl.rb#501 def LambdaNode(locals, operator_loc, opening_loc, closing_loc, parameters, body, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new LocalVariableAndWriteNode node # - # source://prism//lib/prism/dsl.rb#499 + # source://prism//lib/prism/dsl.rb#506 def LocalVariableAndWriteNode(name_loc, operator_loc, value, name, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new LocalVariableOperatorWriteNode node # - # source://prism//lib/prism/dsl.rb#504 + # 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 # Create a new LocalVariableOrWriteNode node # - # source://prism//lib/prism/dsl.rb#509 + # source://prism//lib/prism/dsl.rb#516 def LocalVariableOrWriteNode(name_loc, operator_loc, value, name, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new LocalVariableReadNode node # - # source://prism//lib/prism/dsl.rb#514 + # source://prism//lib/prism/dsl.rb#521 def LocalVariableReadNode(name, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new LocalVariableTargetNode node # - # source://prism//lib/prism/dsl.rb#519 + # source://prism//lib/prism/dsl.rb#526 def LocalVariableTargetNode(name, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new LocalVariableWriteNode node # - # source://prism//lib/prism/dsl.rb#524 + # source://prism//lib/prism/dsl.rb#531 def LocalVariableWriteNode(name, depth, name_loc, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new Location object # - # source://prism//lib/prism/dsl.rb#44 + # source://prism//lib/prism/dsl.rb#46 def Location(source = T.unsafe(nil), start_offset = T.unsafe(nil), length = T.unsafe(nil)); end # Create a new MatchLastLineNode node # - # source://prism//lib/prism/dsl.rb#529 + # source://prism//lib/prism/dsl.rb#536 def MatchLastLineNode(flags, opening_loc, content_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new MatchPredicateNode node # - # source://prism//lib/prism/dsl.rb#534 + # source://prism//lib/prism/dsl.rb#541 def MatchPredicateNode(value, pattern, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new MatchRequiredNode node # - # source://prism//lib/prism/dsl.rb#539 + # source://prism//lib/prism/dsl.rb#546 def MatchRequiredNode(value, pattern, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new MatchWriteNode node # - # source://prism//lib/prism/dsl.rb#544 + # source://prism//lib/prism/dsl.rb#551 def MatchWriteNode(call, targets, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new MissingNode node # - # source://prism//lib/prism/dsl.rb#549 + # source://prism//lib/prism/dsl.rb#556 def MissingNode(source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ModuleNode node # - # source://prism//lib/prism/dsl.rb#554 + # source://prism//lib/prism/dsl.rb#561 def ModuleNode(locals, module_keyword_loc, constant_path, body, end_keyword_loc, name, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new MultiTargetNode node # - # source://prism//lib/prism/dsl.rb#559 + # source://prism//lib/prism/dsl.rb#566 def MultiTargetNode(lefts, rest, rights, lparen_loc, rparen_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new MultiWriteNode node # - # source://prism//lib/prism/dsl.rb#564 + # source://prism//lib/prism/dsl.rb#571 def MultiWriteNode(lefts, rest, rights, lparen_loc, rparen_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new NextNode node # - # source://prism//lib/prism/dsl.rb#569 + # source://prism//lib/prism/dsl.rb#576 def NextNode(arguments, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new NilNode node # - # source://prism//lib/prism/dsl.rb#574 + # source://prism//lib/prism/dsl.rb#581 def NilNode(source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new NoKeywordsParameterNode node # - # source://prism//lib/prism/dsl.rb#579 + # source://prism//lib/prism/dsl.rb#586 def NoKeywordsParameterNode(operator_loc, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new NumberedParametersNode node # - # source://prism//lib/prism/dsl.rb#584 + # source://prism//lib/prism/dsl.rb#591 def NumberedParametersNode(maximum, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new NumberedReferenceReadNode node # - # source://prism//lib/prism/dsl.rb#589 + # source://prism//lib/prism/dsl.rb#596 def NumberedReferenceReadNode(number, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new OptionalKeywordParameterNode node # - # source://prism//lib/prism/dsl.rb#594 + # source://prism//lib/prism/dsl.rb#601 def OptionalKeywordParameterNode(flags, name, name_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new OptionalParameterNode node # - # source://prism//lib/prism/dsl.rb#599 + # source://prism//lib/prism/dsl.rb#606 def OptionalParameterNode(flags, name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new OrNode node # - # source://prism//lib/prism/dsl.rb#604 + # source://prism//lib/prism/dsl.rb#611 def OrNode(left, right, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ParametersNode node # - # source://prism//lib/prism/dsl.rb#609 + # source://prism//lib/prism/dsl.rb#616 def ParametersNode(requireds, optionals, rest, posts, keywords, keyword_rest, block, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ParenthesesNode node # - # source://prism//lib/prism/dsl.rb#614 + # source://prism//lib/prism/dsl.rb#621 def ParenthesesNode(body, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new PinnedExpressionNode node # - # source://prism//lib/prism/dsl.rb#619 + # source://prism//lib/prism/dsl.rb#626 def PinnedExpressionNode(expression, operator_loc, lparen_loc, rparen_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new PinnedVariableNode node # - # source://prism//lib/prism/dsl.rb#624 + # source://prism//lib/prism/dsl.rb#631 def PinnedVariableNode(variable, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new PostExecutionNode node # - # source://prism//lib/prism/dsl.rb#629 + # source://prism//lib/prism/dsl.rb#636 def PostExecutionNode(statements, keyword_loc, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new PreExecutionNode node # - # source://prism//lib/prism/dsl.rb#634 + # source://prism//lib/prism/dsl.rb#641 def PreExecutionNode(statements, keyword_loc, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ProgramNode node # - # source://prism//lib/prism/dsl.rb#639 + # source://prism//lib/prism/dsl.rb#646 def ProgramNode(locals, statements, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new RangeNode node # - # source://prism//lib/prism/dsl.rb#644 + # source://prism//lib/prism/dsl.rb#651 def RangeNode(flags, left, right, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new RationalNode node # - # source://prism//lib/prism/dsl.rb#649 + # source://prism//lib/prism/dsl.rb#656 def RationalNode(numeric, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new RedoNode node # - # source://prism//lib/prism/dsl.rb#654 + # source://prism//lib/prism/dsl.rb#661 def RedoNode(source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new RegularExpressionNode node # - # source://prism//lib/prism/dsl.rb#659 + # source://prism//lib/prism/dsl.rb#666 def RegularExpressionNode(flags, opening_loc, content_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new RequiredKeywordParameterNode node # - # source://prism//lib/prism/dsl.rb#664 + # source://prism//lib/prism/dsl.rb#671 def RequiredKeywordParameterNode(flags, name, name_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new RequiredParameterNode node # - # source://prism//lib/prism/dsl.rb#669 + # source://prism//lib/prism/dsl.rb#676 def RequiredParameterNode(flags, name, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new RescueModifierNode node # - # source://prism//lib/prism/dsl.rb#674 + # source://prism//lib/prism/dsl.rb#681 def RescueModifierNode(expression, keyword_loc, rescue_expression, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new RescueNode node # - # source://prism//lib/prism/dsl.rb#679 + # source://prism//lib/prism/dsl.rb#686 def RescueNode(keyword_loc, exceptions, operator_loc, reference, statements, consequent, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new RestParameterNode node # - # source://prism//lib/prism/dsl.rb#684 + # source://prism//lib/prism/dsl.rb#691 def RestParameterNode(flags, name, name_loc, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new RetryNode node # - # source://prism//lib/prism/dsl.rb#689 + # source://prism//lib/prism/dsl.rb#696 def RetryNode(source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ReturnNode node # - # source://prism//lib/prism/dsl.rb#694 + # source://prism//lib/prism/dsl.rb#701 def ReturnNode(keyword_loc, arguments, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new SelfNode node # - # source://prism//lib/prism/dsl.rb#699 + # source://prism//lib/prism/dsl.rb#706 def SelfNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + # Create a new ShareableConstantNode node + # + # source://prism//lib/prism/dsl.rb#711 + def ShareableConstantNode(flags, write, source = T.unsafe(nil), location = T.unsafe(nil)); end + # Create a new SingletonClassNode node # - # source://prism//lib/prism/dsl.rb#704 + # source://prism//lib/prism/dsl.rb#716 def SingletonClassNode(locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new SourceEncodingNode node # - # source://prism//lib/prism/dsl.rb#709 + # source://prism//lib/prism/dsl.rb#721 def SourceEncodingNode(source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new SourceFileNode node # - # source://prism//lib/prism/dsl.rb#714 - def SourceFileNode(filepath, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#726 + def SourceFileNode(flags, filepath, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new SourceLineNode node # - # source://prism//lib/prism/dsl.rb#719 + # source://prism//lib/prism/dsl.rb#731 def SourceLineNode(source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new SplatNode node # - # source://prism//lib/prism/dsl.rb#724 + # source://prism//lib/prism/dsl.rb#736 def SplatNode(operator_loc, expression, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new StatementsNode node # - # source://prism//lib/prism/dsl.rb#729 + # source://prism//lib/prism/dsl.rb#741 def StatementsNode(body, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new StringNode node # - # source://prism//lib/prism/dsl.rb#734 + # source://prism//lib/prism/dsl.rb#746 def StringNode(flags, opening_loc, content_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new SuperNode node # - # source://prism//lib/prism/dsl.rb#739 + # source://prism//lib/prism/dsl.rb#751 def SuperNode(keyword_loc, lparen_loc, arguments, rparen_loc, block, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new SymbolNode node # - # source://prism//lib/prism/dsl.rb#744 + # source://prism//lib/prism/dsl.rb#756 def SymbolNode(flags, opening_loc, value_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new TrueNode node # - # source://prism//lib/prism/dsl.rb#749 + # source://prism//lib/prism/dsl.rb#761 def TrueNode(source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new UndefNode node # - # source://prism//lib/prism/dsl.rb#754 + # source://prism//lib/prism/dsl.rb#766 def UndefNode(names, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new UnlessNode node # - # source://prism//lib/prism/dsl.rb#759 + # source://prism//lib/prism/dsl.rb#771 def UnlessNode(keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new UntilNode node # - # source://prism//lib/prism/dsl.rb#764 + # source://prism//lib/prism/dsl.rb#776 def UntilNode(flags, keyword_loc, closing_loc, predicate, statements, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new WhenNode node # - # source://prism//lib/prism/dsl.rb#769 - def WhenNode(keyword_loc, conditions, statements, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#781 + def WhenNode(keyword_loc, conditions, then_keyword_loc, statements, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new WhileNode node # - # source://prism//lib/prism/dsl.rb#774 + # source://prism//lib/prism/dsl.rb#786 def WhileNode(flags, keyword_loc, closing_loc, predicate, statements, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new XStringNode node # - # source://prism//lib/prism/dsl.rb#779 + # source://prism//lib/prism/dsl.rb#791 def XStringNode(flags, opening_loc, content_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new YieldNode node # - # source://prism//lib/prism/dsl.rb#784 + # source://prism//lib/prism/dsl.rb#796 def YieldNode(keyword_loc, lparen_loc, arguments, rparen_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end end @@ -7860,6 +8813,7 @@ module Prism::Debug 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 @@ -7882,6 +8836,7 @@ module Prism::Debug def prism_locals(source); end def profile_file(_arg0); end + def static_inspect(*_arg0); end end end @@ -7893,6 +8848,70 @@ end # 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. # @@ -7925,170 +8944,206 @@ end # end # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#5889 +# source://prism//lib/prism/node.rb#5699 class Prism::DefNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Node? receiver, ParametersNode? parameters, 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 + # 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#5891 + # source://prism//lib/prism/node.rb#5701 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + receiver: T.nilable(Prism::Node), + parameters: T.nilable(Prism::ParametersNode), + body: T.nilable(Prism::Node), + locals: T::Array[Symbol], + def_keyword_loc: Prism::Location, + operator_loc: T.nilable(Prism::Location), + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + equal_loc: T.nilable(Prism::Location), + end_keyword_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end def initialize(source, name, name_loc, receiver, parameters, body, locals, def_keyword_loc, operator_loc, lparen_loc, rparen_loc, equal_loc, end_keyword_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5910 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#5720 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # attr_reader body: Node? + # attr_reader body: Prism::node? # - # source://prism//lib/prism/node.rb#5977 + # source://prism//lib/prism/node.rb#5773 sig { returns(T.nilable(Prism::Node)) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5915 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#5725 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5929 + # source://prism//lib/prism/node.rb#5739 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5920 + # source://prism//lib/prism/node.rb#5730 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> DefNode + # 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#5934 - sig { params(params: T.untyped).returns(Prism::DefNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#5744 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + receiver: T.nilable(Prism::Node), + parameters: T.nilable(Prism::ParametersNode), + body: T.nilable(Prism::Node), + locals: T::Array[Symbol], + def_keyword_loc: Prism::Location, + operator_loc: T.nilable(Prism::Location), + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + equal_loc: T.nilable(Prism::Location), + end_keyword_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::DefNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), receiver: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil), locals: T.unsafe(nil), def_keyword_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil), equal_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5915 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#5725 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, receiver: Node?, parameters: ParametersNode?, body: Node?, locals: Array[Symbol], def_keyword_loc: Location, operator_loc: Location?, lparen_loc: Location?, rparen_loc: Location?, equal_loc: Location?, end_keyword_loc: Location?, location: Location } + # 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#5957 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#5752 + 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#6050 + # source://prism//lib/prism/node.rb#5852 sig { returns(String) } def def_keyword; end # attr_reader def_keyword_loc: Location # - # source://prism//lib/prism/node.rb#5983 + # source://prism//lib/prism/node.rb#5779 sig { returns(Prism::Location) } def def_keyword_loc; end # def end_keyword: () -> String? # - # source://prism//lib/prism/node.rb#6075 + # source://prism//lib/prism/node.rb#5877 sig { returns(T.nilable(String)) } def end_keyword; end # attr_reader end_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#6037 + # source://prism//lib/prism/node.rb#5838 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end # def equal: () -> String? # - # source://prism//lib/prism/node.rb#6070 + # source://prism//lib/prism/node.rb#5872 sig { returns(T.nilable(String)) } def equal; end # attr_reader equal_loc: Location? # - # source://prism//lib/prism/node.rb#6025 + # source://prism//lib/prism/node.rb#5825 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 # - # source://prism//lib/prism/node.rb#6080 + # source://prism//lib/prism/node.rb#5882 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#5980 + # source://prism//lib/prism/node.rb#5776 sig { returns(T::Array[Symbol]) } def locals; end # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#6060 + # source://prism//lib/prism/node.rb#5862 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#6001 + # source://prism//lib/prism/node.rb#5799 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#5962 + # source://prism//lib/prism/node.rb#5757 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#5965 + # source://prism//lib/prism/node.rb#5760 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String? # - # source://prism//lib/prism/node.rb#6055 + # source://prism//lib/prism/node.rb#5857 sig { returns(T.nilable(String)) } def operator; end # attr_reader operator_loc: Location? # - # source://prism//lib/prism/node.rb#5989 + # source://prism//lib/prism/node.rb#5786 sig { returns(T.nilable(Prism::Location)) } def operator_loc; end # attr_reader parameters: ParametersNode? # - # source://prism//lib/prism/node.rb#5974 + # source://prism//lib/prism/node.rb#5770 sig { returns(T.nilable(Prism::ParametersNode)) } def parameters; end - # attr_reader receiver: Node? + # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#5971 + # source://prism//lib/prism/node.rb#5767 sig { returns(T.nilable(Prism::Node)) } def receiver; end # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#6065 + # source://prism//lib/prism/node.rb#5867 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#6013 + # source://prism//lib/prism/node.rb#5812 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end @@ -8107,7 +9162,8 @@ class Prism::DefNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#6126 + # source://prism//lib/prism/node.rb#5928 + sig { override.returns(Symbol) } def type; end class << self @@ -8118,7 +9174,7 @@ class Prism::DefNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#6136 + # source://prism//lib/prism/node.rb#5938 def type; end end end @@ -8128,98 +9184,118 @@ end # defined?(a) # ^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#6145 +# source://prism//lib/prism/node.rb#5947 class Prism::DefinedNode < ::Prism::Node - # def initialize: (Location? lparen_loc, Node value, Location? rparen_loc, Location keyword_loc, Location location) -> void + # 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#6147 + # source://prism//lib/prism/node.rb#5949 + sig do + params( + source: Prism::Source, + lparen_loc: T.nilable(Prism::Location), + value: Prism::Node, + rparen_loc: T.nilable(Prism::Location), + keyword_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, lparen_loc, value, rparen_loc, keyword_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6158 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#5960 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6163 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#5965 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6173 + # source://prism//lib/prism/node.rb#5975 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6168 + # source://prism//lib/prism/node.rb#5970 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> DefinedNode + # def copy: (?lparen_loc: Location?, ?value: Prism::node, ?rparen_loc: Location?, ?keyword_loc: Location, ?location: Location) -> DefinedNode # - # source://prism//lib/prism/node.rb#6178 - sig { params(params: T.untyped).returns(Prism::DefinedNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#5980 + sig do + params( + lparen_loc: T.nilable(Prism::Location), + value: Prism::Node, + rparen_loc: T.nilable(Prism::Location), + keyword_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::DefinedNode) + end + def copy(lparen_loc: T.unsafe(nil), value: T.unsafe(nil), rparen_loc: T.unsafe(nil), keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6163 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#5965 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { lparen_loc: Location?, value: Node, rparen_loc: Location?, keyword_loc: Location, location: Location } + # 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#6193 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#5988 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#6247 + # source://prism//lib/prism/node.rb#6045 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#6242 + # source://prism//lib/prism/node.rb#6040 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#6225 + # source://prism//lib/prism/node.rb#6022 sig { returns(Prism::Location) } def keyword_loc; end # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#6232 + # source://prism//lib/prism/node.rb#6030 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#6198 + # source://prism//lib/prism/node.rb#5993 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#6237 + # source://prism//lib/prism/node.rb#6035 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#6213 + # source://prism//lib/prism/node.rb#6009 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end @@ -8238,12 +9314,13 @@ class Prism::DefinedNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#6271 + # source://prism//lib/prism/node.rb#6069 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#6210 + # source://prism//lib/prism/node.rb#6006 sig { returns(Prism::Node) } def value; end @@ -8255,7 +9332,7 @@ class Prism::DefinedNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#6281 + # source://prism//lib/prism/node.rb#6079 def type; end end end @@ -8301,15 +9378,17 @@ end # DesugarCompiler is a compiler that desugars Ruby code into a more primitive # form. This is useful for consumers that want to deal with fewer node types. # -# source://prism//lib/prism/desugar_compiler.rb#216 +# source://prism//lib/prism/desugar_compiler.rb#218 class Prism::DesugarCompiler < ::Prism::MutationCompiler + Result = type_member { { fixed: Prism::Node } } + # @@foo &&= bar # # becomes # # @@foo && @@foo = bar # - # source://prism//lib/prism/desugar_compiler.rb#222 + # source://prism//lib/prism/desugar_compiler.rb#224 def visit_class_variable_and_write_node(node); end # @@foo += bar @@ -8318,7 +9397,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # @@foo = @@foo + bar # - # source://prism//lib/prism/desugar_compiler.rb#240 + # source://prism//lib/prism/desugar_compiler.rb#242 def visit_class_variable_operator_write_node(node); end # @@foo ||= bar @@ -8327,7 +9406,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # defined?(@@foo) ? @@foo : @@foo = bar # - # source://prism//lib/prism/desugar_compiler.rb#231 + # source://prism//lib/prism/desugar_compiler.rb#233 def visit_class_variable_or_write_node(node); end # Foo &&= bar @@ -8336,7 +9415,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # Foo && Foo = bar # - # source://prism//lib/prism/desugar_compiler.rb#249 + # source://prism//lib/prism/desugar_compiler.rb#251 def visit_constant_and_write_node(node); end # Foo += bar @@ -8345,7 +9424,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # Foo = Foo + bar # - # source://prism//lib/prism/desugar_compiler.rb#267 + # source://prism//lib/prism/desugar_compiler.rb#269 def visit_constant_operator_write_node(node); end # Foo ||= bar @@ -8354,7 +9433,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # defined?(Foo) ? Foo : Foo = bar # - # source://prism//lib/prism/desugar_compiler.rb#258 + # source://prism//lib/prism/desugar_compiler.rb#260 def visit_constant_or_write_node(node); end # $foo &&= bar @@ -8363,7 +9442,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # $foo && $foo = bar # - # source://prism//lib/prism/desugar_compiler.rb#276 + # source://prism//lib/prism/desugar_compiler.rb#278 def visit_global_variable_and_write_node(node); end # $foo += bar @@ -8372,7 +9451,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # $foo = $foo + bar # - # source://prism//lib/prism/desugar_compiler.rb#294 + # source://prism//lib/prism/desugar_compiler.rb#296 def visit_global_variable_operator_write_node(node); end # $foo ||= bar @@ -8381,22 +9460,22 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # defined?($foo) ? $foo : $foo = bar # - # source://prism//lib/prism/desugar_compiler.rb#285 + # source://prism//lib/prism/desugar_compiler.rb#287 def visit_global_variable_or_write_node(node); end # becomes # - # source://prism//lib/prism/desugar_compiler.rb#303 + # source://prism//lib/prism/desugar_compiler.rb#305 def visit_instance_variable_and_write_node(node); end # becomes # - # source://prism//lib/prism/desugar_compiler.rb#321 + # source://prism//lib/prism/desugar_compiler.rb#323 def visit_instance_variable_operator_write_node(node); end # becomes # - # source://prism//lib/prism/desugar_compiler.rb#312 + # source://prism//lib/prism/desugar_compiler.rb#314 def visit_instance_variable_or_write_node(node); end # foo &&= bar @@ -8405,7 +9484,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # foo && foo = bar # - # source://prism//lib/prism/desugar_compiler.rb#330 + # source://prism//lib/prism/desugar_compiler.rb#332 def visit_local_variable_and_write_node(node); end # foo += bar @@ -8414,7 +9493,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # foo = foo + bar # - # source://prism//lib/prism/desugar_compiler.rb#348 + # source://prism//lib/prism/desugar_compiler.rb#350 def visit_local_variable_operator_write_node(node); end # foo ||= bar @@ -8423,7 +9502,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # foo || foo = bar # - # source://prism//lib/prism/desugar_compiler.rb#339 + # source://prism//lib/prism/desugar_compiler.rb#341 def visit_local_variable_or_write_node(node); end end @@ -8503,41 +9582,41 @@ class Prism::DesugarOrWriteDefinedNode def write_class; end end -# source://prism//lib/prism/desugar_compiler.rb#99 +# source://prism//lib/prism/desugar_compiler.rb#101 class Prism::DesugarOrWriteNode # @return [DesugarOrWriteNode] a new instance of DesugarOrWriteNode # - # source://prism//lib/prism/desugar_compiler.rb#102 + # source://prism//lib/prism/desugar_compiler.rb#104 def initialize(node, source, read_class, write_class, *arguments); end # Returns the value of attribute arguments. # - # source://prism//lib/prism/desugar_compiler.rb#100 + # source://prism//lib/prism/desugar_compiler.rb#102 def arguments; end # Desugar `x ||= y` to `x || x = y` # - # source://prism//lib/prism/desugar_compiler.rb#111 + # source://prism//lib/prism/desugar_compiler.rb#113 def compile; end # Returns the value of attribute node. # - # source://prism//lib/prism/desugar_compiler.rb#100 + # source://prism//lib/prism/desugar_compiler.rb#102 def node; end # Returns the value of attribute read_class. # - # source://prism//lib/prism/desugar_compiler.rb#100 + # source://prism//lib/prism/desugar_compiler.rb#102 def read_class; end # Returns the value of attribute source. # - # source://prism//lib/prism/desugar_compiler.rb#100 + # source://prism//lib/prism/desugar_compiler.rb#102 def source; end # Returns the value of attribute write_class. # - # source://prism//lib/prism/desugar_compiler.rb#100 + # source://prism//lib/prism/desugar_compiler.rb#102 def write_class; end end @@ -8572,2443 +9651,2475 @@ end # integer = result.value.statements.body.first.receiver.receiver # dispatcher.dispatch_once(integer) # -# source://prism//lib/prism/dispatcher.rb#40 +# source://prism//lib/prism/dispatcher.rb#41 class Prism::Dispatcher < ::Prism::Visitor # Initialize a new dispatcher. # # @return [Dispatcher] a new instance of Dispatcher # - # source://prism//lib/prism/dispatcher.rb#45 + # source://prism//lib/prism/dispatcher.rb#46 def initialize; end # Walks `root` dispatching events to all registered listeners. # # def dispatch: (Node) -> void # - # source://prism//lib/prism/visitor.rb#16 + # source://prism//lib/prism/visitor.rb#17 def dispatch(node); end # Dispatches a single event for `node` to all registered listeners. # # def dispatch_once: (Node) -> void # - # source://prism//lib/prism/dispatcher.rb#64 + # source://prism//lib/prism/dispatcher.rb#65 def dispatch_once(node); end # attr_reader listeners: Hash[Symbol, Array[Listener]] # - # source://prism//lib/prism/dispatcher.rb#42 + # source://prism//lib/prism/dispatcher.rb#43 def listeners; end # Register a listener for one or more events. # # def register: (Listener, *Symbol) -> void # - # source://prism//lib/prism/dispatcher.rb#52 + # source://prism//lib/prism/dispatcher.rb#53 def register(listener, *events); end # Dispatch enter and leave events for AliasGlobalVariableNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#70 + # source://prism//lib/prism/dispatcher.rb#71 def visit_alias_global_variable_node(node); end # Dispatch enter and leave events for AliasMethodNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#78 + # source://prism//lib/prism/dispatcher.rb#79 def visit_alias_method_node(node); end # Dispatch enter and leave events for AlternationPatternNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#86 + # source://prism//lib/prism/dispatcher.rb#87 def visit_alternation_pattern_node(node); end # Dispatch enter and leave events for AndNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#94 + # source://prism//lib/prism/dispatcher.rb#95 def visit_and_node(node); end # Dispatch enter and leave events for ArgumentsNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#102 + # source://prism//lib/prism/dispatcher.rb#103 def visit_arguments_node(node); end # Dispatch enter and leave events for ArrayNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#110 + # source://prism//lib/prism/dispatcher.rb#111 def visit_array_node(node); end # Dispatch enter and leave events for ArrayPatternNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#118 + # source://prism//lib/prism/dispatcher.rb#119 def visit_array_pattern_node(node); end # Dispatch enter and leave events for AssocNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#126 + # source://prism//lib/prism/dispatcher.rb#127 def visit_assoc_node(node); end # Dispatch enter and leave events for AssocSplatNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#134 + # source://prism//lib/prism/dispatcher.rb#135 def visit_assoc_splat_node(node); end # Dispatch enter and leave events for BackReferenceReadNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#142 + # source://prism//lib/prism/dispatcher.rb#143 def visit_back_reference_read_node(node); end # Dispatch enter and leave events for BeginNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#150 + # source://prism//lib/prism/dispatcher.rb#151 def visit_begin_node(node); end # Dispatch enter and leave events for BlockArgumentNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#158 + # source://prism//lib/prism/dispatcher.rb#159 def visit_block_argument_node(node); end # Dispatch enter and leave events for BlockLocalVariableNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#166 + # source://prism//lib/prism/dispatcher.rb#167 def visit_block_local_variable_node(node); end # Dispatch enter and leave events for BlockNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#174 + # source://prism//lib/prism/dispatcher.rb#175 def visit_block_node(node); end # Dispatch enter and leave events for BlockParameterNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#182 + # source://prism//lib/prism/dispatcher.rb#183 def visit_block_parameter_node(node); end # Dispatch enter and leave events for BlockParametersNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#190 + # source://prism//lib/prism/dispatcher.rb#191 def visit_block_parameters_node(node); end # Dispatch enter and leave events for BreakNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#198 + # source://prism//lib/prism/dispatcher.rb#199 def visit_break_node(node); end # Dispatch enter and leave events for CallAndWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#206 + # source://prism//lib/prism/dispatcher.rb#207 def visit_call_and_write_node(node); end # Dispatch enter and leave events for CallNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#214 + # source://prism//lib/prism/dispatcher.rb#215 def visit_call_node(node); end # Dispatch enter and leave events for CallOperatorWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#222 + # source://prism//lib/prism/dispatcher.rb#223 def visit_call_operator_write_node(node); end # Dispatch enter and leave events for CallOrWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#230 + # source://prism//lib/prism/dispatcher.rb#231 def visit_call_or_write_node(node); end # Dispatch enter and leave events for CallTargetNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#238 + # source://prism//lib/prism/dispatcher.rb#239 def visit_call_target_node(node); end # Dispatch enter and leave events for CapturePatternNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#246 + # source://prism//lib/prism/dispatcher.rb#247 def visit_capture_pattern_node(node); end # Dispatch enter and leave events for CaseMatchNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#254 + # source://prism//lib/prism/dispatcher.rb#255 def visit_case_match_node(node); end # Dispatch enter and leave events for CaseNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#262 + # source://prism//lib/prism/dispatcher.rb#263 def visit_case_node(node); end # Dispatch enter and leave events for ClassNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#270 + # source://prism//lib/prism/dispatcher.rb#271 def visit_class_node(node); end # Dispatch enter and leave events for ClassVariableAndWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#278 + # source://prism//lib/prism/dispatcher.rb#279 def visit_class_variable_and_write_node(node); end # Dispatch enter and leave events for ClassVariableOperatorWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#286 + # source://prism//lib/prism/dispatcher.rb#287 def visit_class_variable_operator_write_node(node); end # Dispatch enter and leave events for ClassVariableOrWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#294 + # source://prism//lib/prism/dispatcher.rb#295 def visit_class_variable_or_write_node(node); end # Dispatch enter and leave events for ClassVariableReadNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#302 + # source://prism//lib/prism/dispatcher.rb#303 def visit_class_variable_read_node(node); end # Dispatch enter and leave events for ClassVariableTargetNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#310 + # source://prism//lib/prism/dispatcher.rb#311 def visit_class_variable_target_node(node); end # Dispatch enter and leave events for ClassVariableWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#318 + # source://prism//lib/prism/dispatcher.rb#319 def visit_class_variable_write_node(node); end # Dispatch enter and leave events for ConstantAndWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#326 + # source://prism//lib/prism/dispatcher.rb#327 def visit_constant_and_write_node(node); end # Dispatch enter and leave events for ConstantOperatorWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#334 + # source://prism//lib/prism/dispatcher.rb#335 def visit_constant_operator_write_node(node); end # Dispatch enter and leave events for ConstantOrWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#342 + # source://prism//lib/prism/dispatcher.rb#343 def visit_constant_or_write_node(node); end # Dispatch enter and leave events for ConstantPathAndWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#350 + # source://prism//lib/prism/dispatcher.rb#351 def visit_constant_path_and_write_node(node); end # Dispatch enter and leave events for ConstantPathNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#358 + # source://prism//lib/prism/dispatcher.rb#359 def visit_constant_path_node(node); end # Dispatch enter and leave events for ConstantPathOperatorWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#366 + # source://prism//lib/prism/dispatcher.rb#367 def visit_constant_path_operator_write_node(node); end # Dispatch enter and leave events for ConstantPathOrWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#374 + # source://prism//lib/prism/dispatcher.rb#375 def visit_constant_path_or_write_node(node); end # Dispatch enter and leave events for ConstantPathTargetNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#382 + # source://prism//lib/prism/dispatcher.rb#383 def visit_constant_path_target_node(node); end # Dispatch enter and leave events for ConstantPathWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#390 + # source://prism//lib/prism/dispatcher.rb#391 def visit_constant_path_write_node(node); end # Dispatch enter and leave events for ConstantReadNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#398 + # source://prism//lib/prism/dispatcher.rb#399 def visit_constant_read_node(node); end # Dispatch enter and leave events for ConstantTargetNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#406 + # source://prism//lib/prism/dispatcher.rb#407 def visit_constant_target_node(node); end # Dispatch enter and leave events for ConstantWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#414 + # source://prism//lib/prism/dispatcher.rb#415 def visit_constant_write_node(node); end # Dispatch enter and leave events for DefNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#422 + # source://prism//lib/prism/dispatcher.rb#423 def visit_def_node(node); end # Dispatch enter and leave events for DefinedNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#430 + # source://prism//lib/prism/dispatcher.rb#431 def visit_defined_node(node); end # Dispatch enter and leave events for ElseNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#438 + # source://prism//lib/prism/dispatcher.rb#439 def visit_else_node(node); end # Dispatch enter and leave events for EmbeddedStatementsNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#446 + # source://prism//lib/prism/dispatcher.rb#447 def visit_embedded_statements_node(node); end # Dispatch enter and leave events for EmbeddedVariableNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#454 + # source://prism//lib/prism/dispatcher.rb#455 def visit_embedded_variable_node(node); end # Dispatch enter and leave events for EnsureNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#462 + # source://prism//lib/prism/dispatcher.rb#463 def visit_ensure_node(node); end # Dispatch enter and leave events for FalseNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#470 + # source://prism//lib/prism/dispatcher.rb#471 def visit_false_node(node); end # Dispatch enter and leave events for FindPatternNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#478 + # source://prism//lib/prism/dispatcher.rb#479 def visit_find_pattern_node(node); end # Dispatch enter and leave events for FlipFlopNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#486 + # source://prism//lib/prism/dispatcher.rb#487 def visit_flip_flop_node(node); end # Dispatch enter and leave events for FloatNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#494 + # source://prism//lib/prism/dispatcher.rb#495 def visit_float_node(node); end # Dispatch enter and leave events for ForNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#502 + # source://prism//lib/prism/dispatcher.rb#503 def visit_for_node(node); end # Dispatch enter and leave events for ForwardingArgumentsNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#510 + # source://prism//lib/prism/dispatcher.rb#511 def visit_forwarding_arguments_node(node); end # Dispatch enter and leave events for ForwardingParameterNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#518 + # source://prism//lib/prism/dispatcher.rb#519 def visit_forwarding_parameter_node(node); end # Dispatch enter and leave events for ForwardingSuperNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#526 + # source://prism//lib/prism/dispatcher.rb#527 def visit_forwarding_super_node(node); end # Dispatch enter and leave events for GlobalVariableAndWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#534 + # source://prism//lib/prism/dispatcher.rb#535 def visit_global_variable_and_write_node(node); end # Dispatch enter and leave events for GlobalVariableOperatorWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#542 + # source://prism//lib/prism/dispatcher.rb#543 def visit_global_variable_operator_write_node(node); end # Dispatch enter and leave events for GlobalVariableOrWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#550 + # source://prism//lib/prism/dispatcher.rb#551 def visit_global_variable_or_write_node(node); end # Dispatch enter and leave events for GlobalVariableReadNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#558 + # source://prism//lib/prism/dispatcher.rb#559 def visit_global_variable_read_node(node); end # Dispatch enter and leave events for GlobalVariableTargetNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#566 + # source://prism//lib/prism/dispatcher.rb#567 def visit_global_variable_target_node(node); end # Dispatch enter and leave events for GlobalVariableWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#574 + # source://prism//lib/prism/dispatcher.rb#575 def visit_global_variable_write_node(node); end # Dispatch enter and leave events for HashNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#582 + # source://prism//lib/prism/dispatcher.rb#583 def visit_hash_node(node); end # Dispatch enter and leave events for HashPatternNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#590 + # source://prism//lib/prism/dispatcher.rb#591 def visit_hash_pattern_node(node); end # Dispatch enter and leave events for IfNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#598 + # source://prism//lib/prism/dispatcher.rb#599 def visit_if_node(node); end # Dispatch enter and leave events for ImaginaryNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#606 + # source://prism//lib/prism/dispatcher.rb#607 def visit_imaginary_node(node); end # Dispatch enter and leave events for ImplicitNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#614 + # source://prism//lib/prism/dispatcher.rb#615 def visit_implicit_node(node); end # Dispatch enter and leave events for ImplicitRestNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#622 + # source://prism//lib/prism/dispatcher.rb#623 def visit_implicit_rest_node(node); end # Dispatch enter and leave events for InNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#630 + # source://prism//lib/prism/dispatcher.rb#631 def visit_in_node(node); end # Dispatch enter and leave events for IndexAndWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#638 + # source://prism//lib/prism/dispatcher.rb#639 def visit_index_and_write_node(node); end # Dispatch enter and leave events for IndexOperatorWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#646 + # source://prism//lib/prism/dispatcher.rb#647 def visit_index_operator_write_node(node); end # Dispatch enter and leave events for IndexOrWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#654 + # source://prism//lib/prism/dispatcher.rb#655 def visit_index_or_write_node(node); end # Dispatch enter and leave events for IndexTargetNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#662 + # source://prism//lib/prism/dispatcher.rb#663 def visit_index_target_node(node); end # Dispatch enter and leave events for InstanceVariableAndWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#670 + # source://prism//lib/prism/dispatcher.rb#671 def visit_instance_variable_and_write_node(node); end # Dispatch enter and leave events for InstanceVariableOperatorWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#678 + # source://prism//lib/prism/dispatcher.rb#679 def visit_instance_variable_operator_write_node(node); end # Dispatch enter and leave events for InstanceVariableOrWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#686 + # source://prism//lib/prism/dispatcher.rb#687 def visit_instance_variable_or_write_node(node); end # Dispatch enter and leave events for InstanceVariableReadNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#694 + # source://prism//lib/prism/dispatcher.rb#695 def visit_instance_variable_read_node(node); end # Dispatch enter and leave events for InstanceVariableTargetNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#702 + # source://prism//lib/prism/dispatcher.rb#703 def visit_instance_variable_target_node(node); end # Dispatch enter and leave events for InstanceVariableWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#710 + # source://prism//lib/prism/dispatcher.rb#711 def visit_instance_variable_write_node(node); end # Dispatch enter and leave events for IntegerNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#718 + # source://prism//lib/prism/dispatcher.rb#719 def visit_integer_node(node); end # Dispatch enter and leave events for InterpolatedMatchLastLineNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#726 + # source://prism//lib/prism/dispatcher.rb#727 def visit_interpolated_match_last_line_node(node); end # Dispatch enter and leave events for InterpolatedRegularExpressionNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#734 + # source://prism//lib/prism/dispatcher.rb#735 def visit_interpolated_regular_expression_node(node); end # Dispatch enter and leave events for InterpolatedStringNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#742 + # source://prism//lib/prism/dispatcher.rb#743 def visit_interpolated_string_node(node); end # Dispatch enter and leave events for InterpolatedSymbolNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#750 + # source://prism//lib/prism/dispatcher.rb#751 def visit_interpolated_symbol_node(node); end # Dispatch enter and leave events for InterpolatedXStringNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#758 + # source://prism//lib/prism/dispatcher.rb#759 def visit_interpolated_x_string_node(node); end + # Dispatch enter and leave events for ItParametersNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#767 + def visit_it_parameters_node(node); end + # Dispatch enter and leave events for KeywordHashNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#766 + # source://prism//lib/prism/dispatcher.rb#775 def visit_keyword_hash_node(node); end # Dispatch enter and leave events for KeywordRestParameterNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#774 + # source://prism//lib/prism/dispatcher.rb#783 def visit_keyword_rest_parameter_node(node); end # Dispatch enter and leave events for LambdaNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#782 + # source://prism//lib/prism/dispatcher.rb#791 def visit_lambda_node(node); end # Dispatch enter and leave events for LocalVariableAndWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#790 + # source://prism//lib/prism/dispatcher.rb#799 def visit_local_variable_and_write_node(node); end # Dispatch enter and leave events for LocalVariableOperatorWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#798 + # source://prism//lib/prism/dispatcher.rb#807 def visit_local_variable_operator_write_node(node); end # Dispatch enter and leave events for LocalVariableOrWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#806 + # source://prism//lib/prism/dispatcher.rb#815 def visit_local_variable_or_write_node(node); end # Dispatch enter and leave events for LocalVariableReadNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#814 + # source://prism//lib/prism/dispatcher.rb#823 def visit_local_variable_read_node(node); end # Dispatch enter and leave events for LocalVariableTargetNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#822 + # source://prism//lib/prism/dispatcher.rb#831 def visit_local_variable_target_node(node); end # Dispatch enter and leave events for LocalVariableWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#830 + # source://prism//lib/prism/dispatcher.rb#839 def visit_local_variable_write_node(node); end # Dispatch enter and leave events for MatchLastLineNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#838 + # source://prism//lib/prism/dispatcher.rb#847 def visit_match_last_line_node(node); end # Dispatch enter and leave events for MatchPredicateNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#846 + # source://prism//lib/prism/dispatcher.rb#855 def visit_match_predicate_node(node); end # Dispatch enter and leave events for MatchRequiredNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#854 + # source://prism//lib/prism/dispatcher.rb#863 def visit_match_required_node(node); end # Dispatch enter and leave events for MatchWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#862 + # source://prism//lib/prism/dispatcher.rb#871 def visit_match_write_node(node); end # Dispatch enter and leave events for MissingNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#870 + # source://prism//lib/prism/dispatcher.rb#879 def visit_missing_node(node); end # Dispatch enter and leave events for ModuleNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#878 + # source://prism//lib/prism/dispatcher.rb#887 def visit_module_node(node); end # Dispatch enter and leave events for MultiTargetNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#886 + # source://prism//lib/prism/dispatcher.rb#895 def visit_multi_target_node(node); end # Dispatch enter and leave events for MultiWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#894 + # source://prism//lib/prism/dispatcher.rb#903 def visit_multi_write_node(node); end # Dispatch enter and leave events for NextNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#902 + # source://prism//lib/prism/dispatcher.rb#911 def visit_next_node(node); end # Dispatch enter and leave events for NilNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#910 + # source://prism//lib/prism/dispatcher.rb#919 def visit_nil_node(node); end # Dispatch enter and leave events for NoKeywordsParameterNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#918 + # source://prism//lib/prism/dispatcher.rb#927 def visit_no_keywords_parameter_node(node); end # Dispatch enter and leave events for NumberedParametersNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#926 + # source://prism//lib/prism/dispatcher.rb#935 def visit_numbered_parameters_node(node); end # Dispatch enter and leave events for NumberedReferenceReadNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#934 + # source://prism//lib/prism/dispatcher.rb#943 def visit_numbered_reference_read_node(node); end # Dispatch enter and leave events for OptionalKeywordParameterNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#942 + # source://prism//lib/prism/dispatcher.rb#951 def visit_optional_keyword_parameter_node(node); end # Dispatch enter and leave events for OptionalParameterNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#950 + # source://prism//lib/prism/dispatcher.rb#959 def visit_optional_parameter_node(node); end # Dispatch enter and leave events for OrNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#958 + # source://prism//lib/prism/dispatcher.rb#967 def visit_or_node(node); end # Dispatch enter and leave events for ParametersNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#966 + # source://prism//lib/prism/dispatcher.rb#975 def visit_parameters_node(node); end # Dispatch enter and leave events for ParenthesesNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#974 + # source://prism//lib/prism/dispatcher.rb#983 def visit_parentheses_node(node); end # Dispatch enter and leave events for PinnedExpressionNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#982 + # source://prism//lib/prism/dispatcher.rb#991 def visit_pinned_expression_node(node); end # Dispatch enter and leave events for PinnedVariableNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#990 + # source://prism//lib/prism/dispatcher.rb#999 def visit_pinned_variable_node(node); end # Dispatch enter and leave events for PostExecutionNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#998 + # source://prism//lib/prism/dispatcher.rb#1007 def visit_post_execution_node(node); end # Dispatch enter and leave events for PreExecutionNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1006 + # source://prism//lib/prism/dispatcher.rb#1015 def visit_pre_execution_node(node); end # Dispatch enter and leave events for ProgramNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1014 + # source://prism//lib/prism/dispatcher.rb#1023 def visit_program_node(node); end # Dispatch enter and leave events for RangeNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1022 + # source://prism//lib/prism/dispatcher.rb#1031 def visit_range_node(node); end # Dispatch enter and leave events for RationalNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1030 + # source://prism//lib/prism/dispatcher.rb#1039 def visit_rational_node(node); end # Dispatch enter and leave events for RedoNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1038 + # source://prism//lib/prism/dispatcher.rb#1047 def visit_redo_node(node); end # Dispatch enter and leave events for RegularExpressionNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1046 + # source://prism//lib/prism/dispatcher.rb#1055 def visit_regular_expression_node(node); end # Dispatch enter and leave events for RequiredKeywordParameterNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1054 + # source://prism//lib/prism/dispatcher.rb#1063 def visit_required_keyword_parameter_node(node); end # Dispatch enter and leave events for RequiredParameterNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1062 + # source://prism//lib/prism/dispatcher.rb#1071 def visit_required_parameter_node(node); end # Dispatch enter and leave events for RescueModifierNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1070 + # source://prism//lib/prism/dispatcher.rb#1079 def visit_rescue_modifier_node(node); end # Dispatch enter and leave events for RescueNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1078 + # source://prism//lib/prism/dispatcher.rb#1087 def visit_rescue_node(node); end # Dispatch enter and leave events for RestParameterNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1086 + # source://prism//lib/prism/dispatcher.rb#1095 def visit_rest_parameter_node(node); end # Dispatch enter and leave events for RetryNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1094 + # source://prism//lib/prism/dispatcher.rb#1103 def visit_retry_node(node); end # Dispatch enter and leave events for ReturnNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1102 + # source://prism//lib/prism/dispatcher.rb#1111 def visit_return_node(node); end # Dispatch enter and leave events for SelfNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1110 + # source://prism//lib/prism/dispatcher.rb#1119 def visit_self_node(node); end + # Dispatch enter and leave events for ShareableConstantNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1127 + def visit_shareable_constant_node(node); end + # Dispatch enter and leave events for SingletonClassNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1118 + # source://prism//lib/prism/dispatcher.rb#1135 def visit_singleton_class_node(node); end # Dispatch enter and leave events for SourceEncodingNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1126 + # source://prism//lib/prism/dispatcher.rb#1143 def visit_source_encoding_node(node); end # Dispatch enter and leave events for SourceFileNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1134 + # source://prism//lib/prism/dispatcher.rb#1151 def visit_source_file_node(node); end # Dispatch enter and leave events for SourceLineNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1142 + # source://prism//lib/prism/dispatcher.rb#1159 def visit_source_line_node(node); end # Dispatch enter and leave events for SplatNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1150 + # source://prism//lib/prism/dispatcher.rb#1167 def visit_splat_node(node); end # Dispatch enter and leave events for StatementsNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1158 + # source://prism//lib/prism/dispatcher.rb#1175 def visit_statements_node(node); end # Dispatch enter and leave events for StringNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1166 + # source://prism//lib/prism/dispatcher.rb#1183 def visit_string_node(node); end # Dispatch enter and leave events for SuperNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1174 + # source://prism//lib/prism/dispatcher.rb#1191 def visit_super_node(node); end # Dispatch enter and leave events for SymbolNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1182 + # source://prism//lib/prism/dispatcher.rb#1199 def visit_symbol_node(node); end # Dispatch enter and leave events for TrueNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1190 + # source://prism//lib/prism/dispatcher.rb#1207 def visit_true_node(node); end # Dispatch enter and leave events for UndefNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1198 + # source://prism//lib/prism/dispatcher.rb#1215 def visit_undef_node(node); end # Dispatch enter and leave events for UnlessNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1206 + # source://prism//lib/prism/dispatcher.rb#1223 def visit_unless_node(node); end # Dispatch enter and leave events for UntilNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1214 + # source://prism//lib/prism/dispatcher.rb#1231 def visit_until_node(node); end # Dispatch enter and leave events for WhenNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1222 + # source://prism//lib/prism/dispatcher.rb#1239 def visit_when_node(node); end # Dispatch enter and leave events for WhileNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1230 + # source://prism//lib/prism/dispatcher.rb#1247 def visit_while_node(node); end # Dispatch enter and leave events for XStringNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1238 + # source://prism//lib/prism/dispatcher.rb#1255 def visit_x_string_node(node); end # Dispatch enter and leave events for YieldNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1246 + # source://prism//lib/prism/dispatcher.rb#1263 def visit_yield_node(node); end end -# source://prism//lib/prism/dispatcher.rb#1252 +# source://prism//lib/prism/dispatcher.rb#1269 class Prism::Dispatcher::DispatchOnce < ::Prism::Visitor # @return [DispatchOnce] a new instance of DispatchOnce # - # source://prism//lib/prism/dispatcher.rb#1255 + # source://prism//lib/prism/dispatcher.rb#1272 def initialize(listeners); end # Returns the value of attribute listeners. # - # source://prism//lib/prism/dispatcher.rb#1253 + # source://prism//lib/prism/dispatcher.rb#1270 def listeners; end # Dispatch enter and leave events for AliasGlobalVariableNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1260 + # source://prism//lib/prism/dispatcher.rb#1277 def visit_alias_global_variable_node(node); end # Dispatch enter and leave events for AliasMethodNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1266 + # source://prism//lib/prism/dispatcher.rb#1283 def visit_alias_method_node(node); end # Dispatch enter and leave events for AlternationPatternNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1272 + # source://prism//lib/prism/dispatcher.rb#1289 def visit_alternation_pattern_node(node); end # Dispatch enter and leave events for AndNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1278 + # source://prism//lib/prism/dispatcher.rb#1295 def visit_and_node(node); end # Dispatch enter and leave events for ArgumentsNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1284 + # source://prism//lib/prism/dispatcher.rb#1301 def visit_arguments_node(node); end # Dispatch enter and leave events for ArrayNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1290 + # source://prism//lib/prism/dispatcher.rb#1307 def visit_array_node(node); end # Dispatch enter and leave events for ArrayPatternNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1296 + # source://prism//lib/prism/dispatcher.rb#1313 def visit_array_pattern_node(node); end # Dispatch enter and leave events for AssocNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1302 + # source://prism//lib/prism/dispatcher.rb#1319 def visit_assoc_node(node); end # Dispatch enter and leave events for AssocSplatNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1308 + # source://prism//lib/prism/dispatcher.rb#1325 def visit_assoc_splat_node(node); end # Dispatch enter and leave events for BackReferenceReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1314 + # source://prism//lib/prism/dispatcher.rb#1331 def visit_back_reference_read_node(node); end # Dispatch enter and leave events for BeginNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1320 + # source://prism//lib/prism/dispatcher.rb#1337 def visit_begin_node(node); end # Dispatch enter and leave events for BlockArgumentNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1326 + # source://prism//lib/prism/dispatcher.rb#1343 def visit_block_argument_node(node); end # Dispatch enter and leave events for BlockLocalVariableNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1332 + # source://prism//lib/prism/dispatcher.rb#1349 def visit_block_local_variable_node(node); end # Dispatch enter and leave events for BlockNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1338 + # source://prism//lib/prism/dispatcher.rb#1355 def visit_block_node(node); end # Dispatch enter and leave events for BlockParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1344 + # source://prism//lib/prism/dispatcher.rb#1361 def visit_block_parameter_node(node); end # Dispatch enter and leave events for BlockParametersNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1350 + # source://prism//lib/prism/dispatcher.rb#1367 def visit_block_parameters_node(node); end # Dispatch enter and leave events for BreakNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1356 + # source://prism//lib/prism/dispatcher.rb#1373 def visit_break_node(node); end # Dispatch enter and leave events for CallAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1362 + # source://prism//lib/prism/dispatcher.rb#1379 def visit_call_and_write_node(node); end # Dispatch enter and leave events for CallNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1368 + # source://prism//lib/prism/dispatcher.rb#1385 def visit_call_node(node); end # Dispatch enter and leave events for CallOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1374 + # source://prism//lib/prism/dispatcher.rb#1391 def visit_call_operator_write_node(node); end # Dispatch enter and leave events for CallOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1380 + # source://prism//lib/prism/dispatcher.rb#1397 def visit_call_or_write_node(node); end # Dispatch enter and leave events for CallTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1386 + # source://prism//lib/prism/dispatcher.rb#1403 def visit_call_target_node(node); end # Dispatch enter and leave events for CapturePatternNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1392 + # source://prism//lib/prism/dispatcher.rb#1409 def visit_capture_pattern_node(node); end # Dispatch enter and leave events for CaseMatchNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1398 + # source://prism//lib/prism/dispatcher.rb#1415 def visit_case_match_node(node); end # Dispatch enter and leave events for CaseNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1404 + # source://prism//lib/prism/dispatcher.rb#1421 def visit_case_node(node); end # Dispatch enter and leave events for ClassNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1410 + # source://prism//lib/prism/dispatcher.rb#1427 def visit_class_node(node); end # Dispatch enter and leave events for ClassVariableAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1416 + # source://prism//lib/prism/dispatcher.rb#1433 def visit_class_variable_and_write_node(node); end # Dispatch enter and leave events for ClassVariableOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1422 + # source://prism//lib/prism/dispatcher.rb#1439 def visit_class_variable_operator_write_node(node); end # Dispatch enter and leave events for ClassVariableOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1428 + # source://prism//lib/prism/dispatcher.rb#1445 def visit_class_variable_or_write_node(node); end # Dispatch enter and leave events for ClassVariableReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1434 + # source://prism//lib/prism/dispatcher.rb#1451 def visit_class_variable_read_node(node); end # Dispatch enter and leave events for ClassVariableTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1440 + # source://prism//lib/prism/dispatcher.rb#1457 def visit_class_variable_target_node(node); end # Dispatch enter and leave events for ClassVariableWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1446 + # source://prism//lib/prism/dispatcher.rb#1463 def visit_class_variable_write_node(node); end # Dispatch enter and leave events for ConstantAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1452 + # source://prism//lib/prism/dispatcher.rb#1469 def visit_constant_and_write_node(node); end # Dispatch enter and leave events for ConstantOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1458 + # source://prism//lib/prism/dispatcher.rb#1475 def visit_constant_operator_write_node(node); end # Dispatch enter and leave events for ConstantOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1464 + # source://prism//lib/prism/dispatcher.rb#1481 def visit_constant_or_write_node(node); end # Dispatch enter and leave events for ConstantPathAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1470 + # source://prism//lib/prism/dispatcher.rb#1487 def visit_constant_path_and_write_node(node); end # Dispatch enter and leave events for ConstantPathNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1476 + # source://prism//lib/prism/dispatcher.rb#1493 def visit_constant_path_node(node); end # Dispatch enter and leave events for ConstantPathOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1482 + # source://prism//lib/prism/dispatcher.rb#1499 def visit_constant_path_operator_write_node(node); end # Dispatch enter and leave events for ConstantPathOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1488 + # source://prism//lib/prism/dispatcher.rb#1505 def visit_constant_path_or_write_node(node); end # Dispatch enter and leave events for ConstantPathTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1494 + # source://prism//lib/prism/dispatcher.rb#1511 def visit_constant_path_target_node(node); end # Dispatch enter and leave events for ConstantPathWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1500 + # source://prism//lib/prism/dispatcher.rb#1517 def visit_constant_path_write_node(node); end # Dispatch enter and leave events for ConstantReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1506 + # source://prism//lib/prism/dispatcher.rb#1523 def visit_constant_read_node(node); end # Dispatch enter and leave events for ConstantTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1512 + # source://prism//lib/prism/dispatcher.rb#1529 def visit_constant_target_node(node); end # Dispatch enter and leave events for ConstantWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1518 + # source://prism//lib/prism/dispatcher.rb#1535 def visit_constant_write_node(node); end # Dispatch enter and leave events for DefNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1524 + # source://prism//lib/prism/dispatcher.rb#1541 def visit_def_node(node); end # Dispatch enter and leave events for DefinedNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1530 + # source://prism//lib/prism/dispatcher.rb#1547 def visit_defined_node(node); end # Dispatch enter and leave events for ElseNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1536 + # source://prism//lib/prism/dispatcher.rb#1553 def visit_else_node(node); end # Dispatch enter and leave events for EmbeddedStatementsNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1542 + # source://prism//lib/prism/dispatcher.rb#1559 def visit_embedded_statements_node(node); end # Dispatch enter and leave events for EmbeddedVariableNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1548 + # source://prism//lib/prism/dispatcher.rb#1565 def visit_embedded_variable_node(node); end # Dispatch enter and leave events for EnsureNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1554 + # source://prism//lib/prism/dispatcher.rb#1571 def visit_ensure_node(node); end # Dispatch enter and leave events for FalseNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1560 + # source://prism//lib/prism/dispatcher.rb#1577 def visit_false_node(node); end # Dispatch enter and leave events for FindPatternNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1566 + # source://prism//lib/prism/dispatcher.rb#1583 def visit_find_pattern_node(node); end # Dispatch enter and leave events for FlipFlopNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1572 + # source://prism//lib/prism/dispatcher.rb#1589 def visit_flip_flop_node(node); end # Dispatch enter and leave events for FloatNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1578 + # source://prism//lib/prism/dispatcher.rb#1595 def visit_float_node(node); end # Dispatch enter and leave events for ForNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1584 + # source://prism//lib/prism/dispatcher.rb#1601 def visit_for_node(node); end # Dispatch enter and leave events for ForwardingArgumentsNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1590 + # source://prism//lib/prism/dispatcher.rb#1607 def visit_forwarding_arguments_node(node); end # Dispatch enter and leave events for ForwardingParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1596 + # source://prism//lib/prism/dispatcher.rb#1613 def visit_forwarding_parameter_node(node); end # Dispatch enter and leave events for ForwardingSuperNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1602 + # source://prism//lib/prism/dispatcher.rb#1619 def visit_forwarding_super_node(node); end # Dispatch enter and leave events for GlobalVariableAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1608 + # source://prism//lib/prism/dispatcher.rb#1625 def visit_global_variable_and_write_node(node); end # Dispatch enter and leave events for GlobalVariableOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1614 + # source://prism//lib/prism/dispatcher.rb#1631 def visit_global_variable_operator_write_node(node); end # Dispatch enter and leave events for GlobalVariableOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1620 + # source://prism//lib/prism/dispatcher.rb#1637 def visit_global_variable_or_write_node(node); end # Dispatch enter and leave events for GlobalVariableReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1626 + # source://prism//lib/prism/dispatcher.rb#1643 def visit_global_variable_read_node(node); end # Dispatch enter and leave events for GlobalVariableTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1632 + # source://prism//lib/prism/dispatcher.rb#1649 def visit_global_variable_target_node(node); end # Dispatch enter and leave events for GlobalVariableWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1638 + # source://prism//lib/prism/dispatcher.rb#1655 def visit_global_variable_write_node(node); end # Dispatch enter and leave events for HashNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1644 + # source://prism//lib/prism/dispatcher.rb#1661 def visit_hash_node(node); end # Dispatch enter and leave events for HashPatternNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1650 + # source://prism//lib/prism/dispatcher.rb#1667 def visit_hash_pattern_node(node); end # Dispatch enter and leave events for IfNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1656 + # source://prism//lib/prism/dispatcher.rb#1673 def visit_if_node(node); end # Dispatch enter and leave events for ImaginaryNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1662 + # source://prism//lib/prism/dispatcher.rb#1679 def visit_imaginary_node(node); end # Dispatch enter and leave events for ImplicitNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1668 + # source://prism//lib/prism/dispatcher.rb#1685 def visit_implicit_node(node); end # Dispatch enter and leave events for ImplicitRestNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1674 + # source://prism//lib/prism/dispatcher.rb#1691 def visit_implicit_rest_node(node); end # Dispatch enter and leave events for InNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1680 + # source://prism//lib/prism/dispatcher.rb#1697 def visit_in_node(node); end # Dispatch enter and leave events for IndexAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1686 + # source://prism//lib/prism/dispatcher.rb#1703 def visit_index_and_write_node(node); end # Dispatch enter and leave events for IndexOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1692 + # source://prism//lib/prism/dispatcher.rb#1709 def visit_index_operator_write_node(node); end # Dispatch enter and leave events for IndexOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1698 + # source://prism//lib/prism/dispatcher.rb#1715 def visit_index_or_write_node(node); end # Dispatch enter and leave events for IndexTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1704 + # source://prism//lib/prism/dispatcher.rb#1721 def visit_index_target_node(node); end # Dispatch enter and leave events for InstanceVariableAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1710 + # source://prism//lib/prism/dispatcher.rb#1727 def visit_instance_variable_and_write_node(node); end # Dispatch enter and leave events for InstanceVariableOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1716 + # source://prism//lib/prism/dispatcher.rb#1733 def visit_instance_variable_operator_write_node(node); end # Dispatch enter and leave events for InstanceVariableOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1722 + # source://prism//lib/prism/dispatcher.rb#1739 def visit_instance_variable_or_write_node(node); end # Dispatch enter and leave events for InstanceVariableReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1728 + # source://prism//lib/prism/dispatcher.rb#1745 def visit_instance_variable_read_node(node); end # Dispatch enter and leave events for InstanceVariableTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1734 + # source://prism//lib/prism/dispatcher.rb#1751 def visit_instance_variable_target_node(node); end # Dispatch enter and leave events for InstanceVariableWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1740 + # source://prism//lib/prism/dispatcher.rb#1757 def visit_instance_variable_write_node(node); end # Dispatch enter and leave events for IntegerNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1746 + # source://prism//lib/prism/dispatcher.rb#1763 def visit_integer_node(node); end # Dispatch enter and leave events for InterpolatedMatchLastLineNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1752 + # source://prism//lib/prism/dispatcher.rb#1769 def visit_interpolated_match_last_line_node(node); end # Dispatch enter and leave events for InterpolatedRegularExpressionNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1758 + # source://prism//lib/prism/dispatcher.rb#1775 def visit_interpolated_regular_expression_node(node); end # Dispatch enter and leave events for InterpolatedStringNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1764 + # source://prism//lib/prism/dispatcher.rb#1781 def visit_interpolated_string_node(node); end # Dispatch enter and leave events for InterpolatedSymbolNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1770 + # source://prism//lib/prism/dispatcher.rb#1787 def visit_interpolated_symbol_node(node); end # Dispatch enter and leave events for InterpolatedXStringNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1776 + # source://prism//lib/prism/dispatcher.rb#1793 def visit_interpolated_x_string_node(node); end + # Dispatch enter and leave events for ItParametersNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1799 + def visit_it_parameters_node(node); end + # Dispatch enter and leave events for KeywordHashNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1782 + # source://prism//lib/prism/dispatcher.rb#1805 def visit_keyword_hash_node(node); end # Dispatch enter and leave events for KeywordRestParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1788 + # source://prism//lib/prism/dispatcher.rb#1811 def visit_keyword_rest_parameter_node(node); end # Dispatch enter and leave events for LambdaNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1794 + # source://prism//lib/prism/dispatcher.rb#1817 def visit_lambda_node(node); end # Dispatch enter and leave events for LocalVariableAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1800 + # source://prism//lib/prism/dispatcher.rb#1823 def visit_local_variable_and_write_node(node); end # Dispatch enter and leave events for LocalVariableOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1806 + # source://prism//lib/prism/dispatcher.rb#1829 def visit_local_variable_operator_write_node(node); end # Dispatch enter and leave events for LocalVariableOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1812 + # source://prism//lib/prism/dispatcher.rb#1835 def visit_local_variable_or_write_node(node); end # Dispatch enter and leave events for LocalVariableReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1818 + # source://prism//lib/prism/dispatcher.rb#1841 def visit_local_variable_read_node(node); end # Dispatch enter and leave events for LocalVariableTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1824 + # source://prism//lib/prism/dispatcher.rb#1847 def visit_local_variable_target_node(node); end # Dispatch enter and leave events for LocalVariableWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1830 + # source://prism//lib/prism/dispatcher.rb#1853 def visit_local_variable_write_node(node); end # Dispatch enter and leave events for MatchLastLineNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1836 + # source://prism//lib/prism/dispatcher.rb#1859 def visit_match_last_line_node(node); end # Dispatch enter and leave events for MatchPredicateNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1842 + # source://prism//lib/prism/dispatcher.rb#1865 def visit_match_predicate_node(node); end # Dispatch enter and leave events for MatchRequiredNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1848 + # source://prism//lib/prism/dispatcher.rb#1871 def visit_match_required_node(node); end # Dispatch enter and leave events for MatchWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1854 + # source://prism//lib/prism/dispatcher.rb#1877 def visit_match_write_node(node); end # Dispatch enter and leave events for MissingNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1860 + # source://prism//lib/prism/dispatcher.rb#1883 def visit_missing_node(node); end # Dispatch enter and leave events for ModuleNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1866 + # source://prism//lib/prism/dispatcher.rb#1889 def visit_module_node(node); end # Dispatch enter and leave events for MultiTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1872 + # source://prism//lib/prism/dispatcher.rb#1895 def visit_multi_target_node(node); end # Dispatch enter and leave events for MultiWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1878 + # source://prism//lib/prism/dispatcher.rb#1901 def visit_multi_write_node(node); end # Dispatch enter and leave events for NextNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1884 + # source://prism//lib/prism/dispatcher.rb#1907 def visit_next_node(node); end # Dispatch enter and leave events for NilNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1890 + # source://prism//lib/prism/dispatcher.rb#1913 def visit_nil_node(node); end # Dispatch enter and leave events for NoKeywordsParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1896 + # source://prism//lib/prism/dispatcher.rb#1919 def visit_no_keywords_parameter_node(node); end # Dispatch enter and leave events for NumberedParametersNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1902 + # source://prism//lib/prism/dispatcher.rb#1925 def visit_numbered_parameters_node(node); end # Dispatch enter and leave events for NumberedReferenceReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1908 + # source://prism//lib/prism/dispatcher.rb#1931 def visit_numbered_reference_read_node(node); end # Dispatch enter and leave events for OptionalKeywordParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1914 + # source://prism//lib/prism/dispatcher.rb#1937 def visit_optional_keyword_parameter_node(node); end # Dispatch enter and leave events for OptionalParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1920 + # source://prism//lib/prism/dispatcher.rb#1943 def visit_optional_parameter_node(node); end # Dispatch enter and leave events for OrNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1926 + # source://prism//lib/prism/dispatcher.rb#1949 def visit_or_node(node); end # Dispatch enter and leave events for ParametersNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1932 + # source://prism//lib/prism/dispatcher.rb#1955 def visit_parameters_node(node); end # Dispatch enter and leave events for ParenthesesNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1938 + # source://prism//lib/prism/dispatcher.rb#1961 def visit_parentheses_node(node); end # Dispatch enter and leave events for PinnedExpressionNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1944 + # source://prism//lib/prism/dispatcher.rb#1967 def visit_pinned_expression_node(node); end # Dispatch enter and leave events for PinnedVariableNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1950 + # source://prism//lib/prism/dispatcher.rb#1973 def visit_pinned_variable_node(node); end # Dispatch enter and leave events for PostExecutionNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1956 + # source://prism//lib/prism/dispatcher.rb#1979 def visit_post_execution_node(node); end # Dispatch enter and leave events for PreExecutionNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1962 + # source://prism//lib/prism/dispatcher.rb#1985 def visit_pre_execution_node(node); end # Dispatch enter and leave events for ProgramNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1968 + # source://prism//lib/prism/dispatcher.rb#1991 def visit_program_node(node); end # Dispatch enter and leave events for RangeNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1974 + # source://prism//lib/prism/dispatcher.rb#1997 def visit_range_node(node); end # Dispatch enter and leave events for RationalNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1980 + # source://prism//lib/prism/dispatcher.rb#2003 def visit_rational_node(node); end # Dispatch enter and leave events for RedoNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1986 + # source://prism//lib/prism/dispatcher.rb#2009 def visit_redo_node(node); end # Dispatch enter and leave events for RegularExpressionNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1992 + # source://prism//lib/prism/dispatcher.rb#2015 def visit_regular_expression_node(node); end # Dispatch enter and leave events for RequiredKeywordParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1998 + # source://prism//lib/prism/dispatcher.rb#2021 def visit_required_keyword_parameter_node(node); end # Dispatch enter and leave events for RequiredParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2004 + # source://prism//lib/prism/dispatcher.rb#2027 def visit_required_parameter_node(node); end # Dispatch enter and leave events for RescueModifierNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2010 + # source://prism//lib/prism/dispatcher.rb#2033 def visit_rescue_modifier_node(node); end # Dispatch enter and leave events for RescueNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2016 + # source://prism//lib/prism/dispatcher.rb#2039 def visit_rescue_node(node); end # Dispatch enter and leave events for RestParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2022 + # source://prism//lib/prism/dispatcher.rb#2045 def visit_rest_parameter_node(node); end # Dispatch enter and leave events for RetryNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2028 + # source://prism//lib/prism/dispatcher.rb#2051 def visit_retry_node(node); end # Dispatch enter and leave events for ReturnNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2034 + # source://prism//lib/prism/dispatcher.rb#2057 def visit_return_node(node); end # Dispatch enter and leave events for SelfNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2040 + # source://prism//lib/prism/dispatcher.rb#2063 def visit_self_node(node); end + # Dispatch enter and leave events for ShareableConstantNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2069 + def visit_shareable_constant_node(node); end + # Dispatch enter and leave events for SingletonClassNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2046 + # source://prism//lib/prism/dispatcher.rb#2075 def visit_singleton_class_node(node); end # Dispatch enter and leave events for SourceEncodingNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2052 + # source://prism//lib/prism/dispatcher.rb#2081 def visit_source_encoding_node(node); end # Dispatch enter and leave events for SourceFileNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2058 + # source://prism//lib/prism/dispatcher.rb#2087 def visit_source_file_node(node); end # Dispatch enter and leave events for SourceLineNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2064 + # source://prism//lib/prism/dispatcher.rb#2093 def visit_source_line_node(node); end # Dispatch enter and leave events for SplatNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2070 + # source://prism//lib/prism/dispatcher.rb#2099 def visit_splat_node(node); end # Dispatch enter and leave events for StatementsNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2076 + # source://prism//lib/prism/dispatcher.rb#2105 def visit_statements_node(node); end # Dispatch enter and leave events for StringNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2082 + # source://prism//lib/prism/dispatcher.rb#2111 def visit_string_node(node); end # Dispatch enter and leave events for SuperNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2088 + # source://prism//lib/prism/dispatcher.rb#2117 def visit_super_node(node); end # Dispatch enter and leave events for SymbolNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2094 + # source://prism//lib/prism/dispatcher.rb#2123 def visit_symbol_node(node); end # Dispatch enter and leave events for TrueNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2100 + # source://prism//lib/prism/dispatcher.rb#2129 def visit_true_node(node); end # Dispatch enter and leave events for UndefNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2106 + # source://prism//lib/prism/dispatcher.rb#2135 def visit_undef_node(node); end # Dispatch enter and leave events for UnlessNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2112 + # source://prism//lib/prism/dispatcher.rb#2141 def visit_unless_node(node); end # Dispatch enter and leave events for UntilNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2118 + # source://prism//lib/prism/dispatcher.rb#2147 def visit_until_node(node); end # Dispatch enter and leave events for WhenNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2124 + # source://prism//lib/prism/dispatcher.rb#2153 def visit_when_node(node); end # Dispatch enter and leave events for WhileNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2130 + # source://prism//lib/prism/dispatcher.rb#2159 def visit_while_node(node); end # Dispatch enter and leave events for XStringNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2136 + # source://prism//lib/prism/dispatcher.rb#2165 def visit_x_string_node(node); end # Dispatch enter and leave events for YieldNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2142 + # source://prism//lib/prism/dispatcher.rb#2171 def visit_yield_node(node); end end # This visitor provides the ability to call Node#to_dot, which converts a # subtree into a graphviz dot graph. # -# source://prism//lib/prism/dot_visitor.rb#13 +# source://prism//lib/prism/dot_visitor.rb#14 class Prism::DotVisitor < ::Prism::Visitor # Initialize a new dot visitor. # # @return [DotVisitor] a new instance of DotVisitor # - # source://prism//lib/prism/dot_visitor.rb#105 + # source://prism//lib/prism/dot_visitor.rb#106 def initialize; end # The digraph that is being built. # - # source://prism//lib/prism/dot_visitor.rb#102 + # source://prism//lib/prism/dot_visitor.rb#103 def digraph; end # Convert this visitor into a graphviz dot graph string. # - # source://prism//lib/prism/dot_visitor.rb#110 + # source://prism//lib/prism/dot_visitor.rb#111 def to_dot; end # Visit a AliasGlobalVariableNode node. # - # source://prism//lib/prism/dot_visitor.rb#115 + # source://prism//lib/prism/dot_visitor.rb#116 def visit_alias_global_variable_node(node); end # Visit a AliasMethodNode node. # - # source://prism//lib/prism/dot_visitor.rb#140 + # source://prism//lib/prism/dot_visitor.rb#141 def visit_alias_method_node(node); end # Visit a AlternationPatternNode node. # - # source://prism//lib/prism/dot_visitor.rb#165 + # source://prism//lib/prism/dot_visitor.rb#166 def visit_alternation_pattern_node(node); end # Visit a AndNode node. # - # source://prism//lib/prism/dot_visitor.rb#190 + # source://prism//lib/prism/dot_visitor.rb#191 def visit_and_node(node); end # Visit a ArgumentsNode node. # - # source://prism//lib/prism/dot_visitor.rb#215 + # source://prism//lib/prism/dot_visitor.rb#216 def visit_arguments_node(node); end # Visit a ArrayNode node. # - # source://prism//lib/prism/dot_visitor.rb#245 + # source://prism//lib/prism/dot_visitor.rb#246 def visit_array_node(node); end # Visit a ArrayPatternNode node. # - # source://prism//lib/prism/dot_visitor.rb#285 + # source://prism//lib/prism/dot_visitor.rb#286 def visit_array_pattern_node(node); end # Visit a AssocNode node. # - # source://prism//lib/prism/dot_visitor.rb#347 + # source://prism//lib/prism/dot_visitor.rb#348 def visit_assoc_node(node); end # Visit a AssocSplatNode node. # - # source://prism//lib/prism/dot_visitor.rb#374 + # source://prism//lib/prism/dot_visitor.rb#375 def visit_assoc_splat_node(node); end # Visit a BackReferenceReadNode node. # - # source://prism//lib/prism/dot_visitor.rb#397 + # source://prism//lib/prism/dot_visitor.rb#398 def visit_back_reference_read_node(node); end # Visit a BeginNode node. # - # source://prism//lib/prism/dot_visitor.rb#414 + # source://prism//lib/prism/dot_visitor.rb#415 def visit_begin_node(node); end # Visit a BlockArgumentNode node. # - # source://prism//lib/prism/dot_visitor.rb#462 + # source://prism//lib/prism/dot_visitor.rb#463 def visit_block_argument_node(node); end # Visit a BlockLocalVariableNode node. # - # source://prism//lib/prism/dot_visitor.rb#485 + # source://prism//lib/prism/dot_visitor.rb#486 def visit_block_local_variable_node(node); end # Visit a BlockNode node. # - # source://prism//lib/prism/dot_visitor.rb#505 + # source://prism//lib/prism/dot_visitor.rb#506 def visit_block_node(node); end # Visit a BlockParameterNode node. # - # source://prism//lib/prism/dot_visitor.rb#540 + # source://prism//lib/prism/dot_visitor.rb#541 def visit_block_parameter_node(node); end # Visit a BlockParametersNode node. # - # source://prism//lib/prism/dot_visitor.rb#568 + # source://prism//lib/prism/dot_visitor.rb#569 def visit_block_parameters_node(node); end # Visit a BreakNode node. # - # source://prism//lib/prism/dot_visitor.rb#611 + # source://prism//lib/prism/dot_visitor.rb#612 def visit_break_node(node); end # Visit a CallAndWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#634 + # source://prism//lib/prism/dot_visitor.rb#635 def visit_call_and_write_node(node); end # Visit a CallNode node. # - # source://prism//lib/prism/dot_visitor.rb#680 + # source://prism//lib/prism/dot_visitor.rb#681 def visit_call_node(node); end # Visit a CallOperatorWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#738 + # source://prism//lib/prism/dot_visitor.rb#739 def visit_call_operator_write_node(node); end # Visit a CallOrWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#787 + # source://prism//lib/prism/dot_visitor.rb#788 def visit_call_or_write_node(node); end # Visit a CallTargetNode node. # - # source://prism//lib/prism/dot_visitor.rb#833 + # source://prism//lib/prism/dot_visitor.rb#834 def visit_call_target_node(node); end # Visit a CapturePatternNode node. # - # source://prism//lib/prism/dot_visitor.rb#863 + # source://prism//lib/prism/dot_visitor.rb#864 def visit_capture_pattern_node(node); end # Visit a CaseMatchNode node. # - # source://prism//lib/prism/dot_visitor.rb#888 + # source://prism//lib/prism/dot_visitor.rb#889 def visit_case_match_node(node); end # Visit a CaseNode node. # - # source://prism//lib/prism/dot_visitor.rb#933 + # source://prism//lib/prism/dot_visitor.rb#934 def visit_case_node(node); end # Visit a ClassNode node. # - # source://prism//lib/prism/dot_visitor.rb#978 + # source://prism//lib/prism/dot_visitor.rb#979 def visit_class_node(node); end # Visit a ClassVariableAndWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1025 + # source://prism//lib/prism/dot_visitor.rb#1026 def visit_class_variable_and_write_node(node); end # Visit a ClassVariableOperatorWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1052 + # source://prism//lib/prism/dot_visitor.rb#1053 def visit_class_variable_operator_write_node(node); end # Visit a ClassVariableOrWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1082 + # source://prism//lib/prism/dot_visitor.rb#1083 def visit_class_variable_or_write_node(node); end # Visit a ClassVariableReadNode node. # - # source://prism//lib/prism/dot_visitor.rb#1109 + # source://prism//lib/prism/dot_visitor.rb#1110 def visit_class_variable_read_node(node); end # Visit a ClassVariableTargetNode node. # - # source://prism//lib/prism/dot_visitor.rb#1126 + # source://prism//lib/prism/dot_visitor.rb#1127 def visit_class_variable_target_node(node); end # Visit a ClassVariableWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1143 + # source://prism//lib/prism/dot_visitor.rb#1144 def visit_class_variable_write_node(node); end # Visit a ConstantAndWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1172 + # source://prism//lib/prism/dot_visitor.rb#1171 def visit_constant_and_write_node(node); end # Visit a ConstantOperatorWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1199 + # source://prism//lib/prism/dot_visitor.rb#1198 def visit_constant_operator_write_node(node); end # Visit a ConstantOrWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1229 + # source://prism//lib/prism/dot_visitor.rb#1228 def visit_constant_or_write_node(node); end # Visit a ConstantPathAndWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1256 + # source://prism//lib/prism/dot_visitor.rb#1255 def visit_constant_path_and_write_node(node); end # Visit a ConstantPathNode node. # - # source://prism//lib/prism/dot_visitor.rb#1281 + # source://prism//lib/prism/dot_visitor.rb#1280 def visit_constant_path_node(node); end # Visit a ConstantPathOperatorWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1308 + # source://prism//lib/prism/dot_visitor.rb#1307 def visit_constant_path_operator_write_node(node); end # Visit a ConstantPathOrWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1336 + # source://prism//lib/prism/dot_visitor.rb#1335 def visit_constant_path_or_write_node(node); end # Visit a ConstantPathTargetNode node. # - # source://prism//lib/prism/dot_visitor.rb#1361 + # source://prism//lib/prism/dot_visitor.rb#1360 def visit_constant_path_target_node(node); end # Visit a ConstantPathWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1388 + # source://prism//lib/prism/dot_visitor.rb#1387 def visit_constant_path_write_node(node); end # Visit a ConstantReadNode node. # - # source://prism//lib/prism/dot_visitor.rb#1413 + # source://prism//lib/prism/dot_visitor.rb#1412 def visit_constant_read_node(node); end # Visit a ConstantTargetNode node. # - # source://prism//lib/prism/dot_visitor.rb#1430 + # source://prism//lib/prism/dot_visitor.rb#1429 def visit_constant_target_node(node); end # Visit a ConstantWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1447 + # source://prism//lib/prism/dot_visitor.rb#1446 def visit_constant_write_node(node); end # Visit a DefNode node. # - # source://prism//lib/prism/dot_visitor.rb#1474 + # source://prism//lib/prism/dot_visitor.rb#1473 def visit_def_node(node); end # Visit a DefinedNode node. # - # source://prism//lib/prism/dot_visitor.rb#1543 + # source://prism//lib/prism/dot_visitor.rb#1542 def visit_defined_node(node); end # Visit a ElseNode node. # - # source://prism//lib/prism/dot_visitor.rb#1574 + # source://prism//lib/prism/dot_visitor.rb#1573 def visit_else_node(node); end # Visit a EmbeddedStatementsNode node. # - # source://prism//lib/prism/dot_visitor.rb#1602 + # source://prism//lib/prism/dot_visitor.rb#1601 def visit_embedded_statements_node(node); end # Visit a EmbeddedVariableNode node. # - # source://prism//lib/prism/dot_visitor.rb#1628 + # source://prism//lib/prism/dot_visitor.rb#1627 def visit_embedded_variable_node(node); end # Visit a EnsureNode node. # - # source://prism//lib/prism/dot_visitor.rb#1649 + # source://prism//lib/prism/dot_visitor.rb#1648 def visit_ensure_node(node); end # Visit a FalseNode node. # - # source://prism//lib/prism/dot_visitor.rb#1675 + # source://prism//lib/prism/dot_visitor.rb#1674 def visit_false_node(node); end # Visit a FindPatternNode node. # - # source://prism//lib/prism/dot_visitor.rb#1689 + # source://prism//lib/prism/dot_visitor.rb#1688 def visit_find_pattern_node(node); end # Visit a FlipFlopNode node. # - # source://prism//lib/prism/dot_visitor.rb#1740 + # source://prism//lib/prism/dot_visitor.rb#1739 def visit_flip_flop_node(node); end # Visit a FloatNode node. # - # source://prism//lib/prism/dot_visitor.rb#1772 + # source://prism//lib/prism/dot_visitor.rb#1771 def visit_float_node(node); end # Visit a ForNode node. # - # source://prism//lib/prism/dot_visitor.rb#1786 + # source://prism//lib/prism/dot_visitor.rb#1788 def visit_for_node(node); end # Visit a ForwardingArgumentsNode node. # - # source://prism//lib/prism/dot_visitor.rb#1828 + # source://prism//lib/prism/dot_visitor.rb#1830 def visit_forwarding_arguments_node(node); end # Visit a ForwardingParameterNode node. # - # source://prism//lib/prism/dot_visitor.rb#1842 + # source://prism//lib/prism/dot_visitor.rb#1844 def visit_forwarding_parameter_node(node); end # Visit a ForwardingSuperNode node. # - # source://prism//lib/prism/dot_visitor.rb#1856 + # source://prism//lib/prism/dot_visitor.rb#1858 def visit_forwarding_super_node(node); end # Visit a GlobalVariableAndWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1876 + # source://prism//lib/prism/dot_visitor.rb#1878 def visit_global_variable_and_write_node(node); end # Visit a GlobalVariableOperatorWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1903 + # source://prism//lib/prism/dot_visitor.rb#1905 def visit_global_variable_operator_write_node(node); end # Visit a GlobalVariableOrWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1933 + # source://prism//lib/prism/dot_visitor.rb#1935 def visit_global_variable_or_write_node(node); end # Visit a GlobalVariableReadNode node. # - # source://prism//lib/prism/dot_visitor.rb#1960 + # source://prism//lib/prism/dot_visitor.rb#1962 def visit_global_variable_read_node(node); end # Visit a GlobalVariableTargetNode node. # - # source://prism//lib/prism/dot_visitor.rb#1977 + # source://prism//lib/prism/dot_visitor.rb#1979 def visit_global_variable_target_node(node); end # Visit a GlobalVariableWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1994 + # source://prism//lib/prism/dot_visitor.rb#1996 def visit_global_variable_write_node(node); end # Visit a HashNode node. # - # source://prism//lib/prism/dot_visitor.rb#2021 + # source://prism//lib/prism/dot_visitor.rb#2023 def visit_hash_node(node); end # Visit a HashPatternNode node. # - # source://prism//lib/prism/dot_visitor.rb#2054 + # source://prism//lib/prism/dot_visitor.rb#2056 def visit_hash_pattern_node(node); end # Visit a IfNode node. # - # source://prism//lib/prism/dot_visitor.rb#2103 + # source://prism//lib/prism/dot_visitor.rb#2105 def visit_if_node(node); end # Visit a ImaginaryNode node. # - # source://prism//lib/prism/dot_visitor.rb#2148 + # source://prism//lib/prism/dot_visitor.rb#2150 def visit_imaginary_node(node); end # Visit a ImplicitNode node. # - # source://prism//lib/prism/dot_visitor.rb#2166 + # source://prism//lib/prism/dot_visitor.rb#2168 def visit_implicit_node(node); end # Visit a ImplicitRestNode node. # - # source://prism//lib/prism/dot_visitor.rb#2184 + # source://prism//lib/prism/dot_visitor.rb#2186 def visit_implicit_rest_node(node); end # Visit a InNode node. # - # source://prism//lib/prism/dot_visitor.rb#2198 + # source://prism//lib/prism/dot_visitor.rb#2200 def visit_in_node(node); end # Visit a IndexAndWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#2230 + # source://prism//lib/prism/dot_visitor.rb#2232 def visit_index_and_write_node(node); end # Visit a IndexOperatorWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#2283 + # source://prism//lib/prism/dot_visitor.rb#2285 def visit_index_operator_write_node(node); end # Visit a IndexOrWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#2339 + # source://prism//lib/prism/dot_visitor.rb#2341 def visit_index_or_write_node(node); end # Visit a IndexTargetNode node. # - # source://prism//lib/prism/dot_visitor.rb#2392 + # source://prism//lib/prism/dot_visitor.rb#2394 def visit_index_target_node(node); end # Visit a InstanceVariableAndWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#2431 + # source://prism//lib/prism/dot_visitor.rb#2433 def visit_instance_variable_and_write_node(node); end # Visit a InstanceVariableOperatorWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#2458 + # source://prism//lib/prism/dot_visitor.rb#2460 def visit_instance_variable_operator_write_node(node); end # Visit a InstanceVariableOrWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#2488 + # source://prism//lib/prism/dot_visitor.rb#2490 def visit_instance_variable_or_write_node(node); end # Visit a InstanceVariableReadNode node. # - # source://prism//lib/prism/dot_visitor.rb#2515 + # source://prism//lib/prism/dot_visitor.rb#2517 def visit_instance_variable_read_node(node); end # Visit a InstanceVariableTargetNode node. # - # source://prism//lib/prism/dot_visitor.rb#2532 + # source://prism//lib/prism/dot_visitor.rb#2534 def visit_instance_variable_target_node(node); end # Visit a InstanceVariableWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#2549 + # source://prism//lib/prism/dot_visitor.rb#2551 def visit_instance_variable_write_node(node); end # Visit a IntegerNode node. # - # source://prism//lib/prism/dot_visitor.rb#2576 + # source://prism//lib/prism/dot_visitor.rb#2578 def visit_integer_node(node); end # Visit a InterpolatedMatchLastLineNode node. # - # source://prism//lib/prism/dot_visitor.rb#2593 + # source://prism//lib/prism/dot_visitor.rb#2598 def visit_interpolated_match_last_line_node(node); end # Visit a InterpolatedRegularExpressionNode node. # - # source://prism//lib/prism/dot_visitor.rb#2629 + # source://prism//lib/prism/dot_visitor.rb#2634 def visit_interpolated_regular_expression_node(node); end # Visit a InterpolatedStringNode node. # - # source://prism//lib/prism/dot_visitor.rb#2665 + # source://prism//lib/prism/dot_visitor.rb#2670 def visit_interpolated_string_node(node); end # Visit a InterpolatedSymbolNode node. # - # source://prism//lib/prism/dot_visitor.rb#2702 + # source://prism//lib/prism/dot_visitor.rb#2710 def visit_interpolated_symbol_node(node); end # Visit a InterpolatedXStringNode node. # - # source://prism//lib/prism/dot_visitor.rb#2739 + # source://prism//lib/prism/dot_visitor.rb#2747 def visit_interpolated_x_string_node(node); end + # Visit a ItParametersNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2780 + def visit_it_parameters_node(node); end + # Visit a KeywordHashNode node. # - # source://prism//lib/prism/dot_visitor.rb#2772 + # source://prism//lib/prism/dot_visitor.rb#2794 def visit_keyword_hash_node(node); end # Visit a KeywordRestParameterNode node. # - # source://prism//lib/prism/dot_visitor.rb#2802 + # source://prism//lib/prism/dot_visitor.rb#2824 def visit_keyword_rest_parameter_node(node); end # Visit a LambdaNode node. # - # source://prism//lib/prism/dot_visitor.rb#2830 + # source://prism//lib/prism/dot_visitor.rb#2852 def visit_lambda_node(node); end # Visit a LocalVariableAndWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#2868 + # source://prism//lib/prism/dot_visitor.rb#2890 def visit_local_variable_and_write_node(node); end # Visit a LocalVariableOperatorWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#2898 + # source://prism//lib/prism/dot_visitor.rb#2920 def visit_local_variable_operator_write_node(node); end # Visit a LocalVariableOrWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#2931 + # source://prism//lib/prism/dot_visitor.rb#2953 def visit_local_variable_or_write_node(node); end # Visit a LocalVariableReadNode node. # - # source://prism//lib/prism/dot_visitor.rb#2961 + # source://prism//lib/prism/dot_visitor.rb#2983 def visit_local_variable_read_node(node); end # Visit a LocalVariableTargetNode node. # - # source://prism//lib/prism/dot_visitor.rb#2981 + # source://prism//lib/prism/dot_visitor.rb#3003 def visit_local_variable_target_node(node); end # Visit a LocalVariableWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#3001 + # source://prism//lib/prism/dot_visitor.rb#3023 def visit_local_variable_write_node(node); end # Visit a MatchLastLineNode node. # - # source://prism//lib/prism/dot_visitor.rb#3031 + # source://prism//lib/prism/dot_visitor.rb#3053 def visit_match_last_line_node(node); end # Visit a MatchPredicateNode node. # - # source://prism//lib/prism/dot_visitor.rb#3060 + # source://prism//lib/prism/dot_visitor.rb#3082 def visit_match_predicate_node(node); end # Visit a MatchRequiredNode node. # - # source://prism//lib/prism/dot_visitor.rb#3085 + # source://prism//lib/prism/dot_visitor.rb#3107 def visit_match_required_node(node); end # Visit a MatchWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#3110 + # source://prism//lib/prism/dot_visitor.rb#3132 def visit_match_write_node(node); end # Visit a MissingNode node. # - # source://prism//lib/prism/dot_visitor.rb#3141 + # source://prism//lib/prism/dot_visitor.rb#3163 def visit_missing_node(node); end # Visit a ModuleNode node. # - # source://prism//lib/prism/dot_visitor.rb#3155 + # source://prism//lib/prism/dot_visitor.rb#3177 def visit_module_node(node); end # Visit a MultiTargetNode node. # - # source://prism//lib/prism/dot_visitor.rb#3191 + # source://prism//lib/prism/dot_visitor.rb#3213 def visit_multi_target_node(node); end # Visit a MultiWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#3247 + # source://prism//lib/prism/dot_visitor.rb#3269 def visit_multi_write_node(node); end # Visit a NextNode node. # - # source://prism//lib/prism/dot_visitor.rb#3310 + # source://prism//lib/prism/dot_visitor.rb#3332 def visit_next_node(node); end # Visit a NilNode node. # - # source://prism//lib/prism/dot_visitor.rb#3333 + # source://prism//lib/prism/dot_visitor.rb#3355 def visit_nil_node(node); end # Visit a NoKeywordsParameterNode node. # - # source://prism//lib/prism/dot_visitor.rb#3347 + # source://prism//lib/prism/dot_visitor.rb#3369 def visit_no_keywords_parameter_node(node); end # Visit a NumberedParametersNode node. # - # source://prism//lib/prism/dot_visitor.rb#3367 + # source://prism//lib/prism/dot_visitor.rb#3389 def visit_numbered_parameters_node(node); end # Visit a NumberedReferenceReadNode node. # - # source://prism//lib/prism/dot_visitor.rb#3384 + # source://prism//lib/prism/dot_visitor.rb#3406 def visit_numbered_reference_read_node(node); end # Visit a OptionalKeywordParameterNode node. # - # source://prism//lib/prism/dot_visitor.rb#3401 + # source://prism//lib/prism/dot_visitor.rb#3423 def visit_optional_keyword_parameter_node(node); end # Visit a OptionalParameterNode node. # - # source://prism//lib/prism/dot_visitor.rb#3428 + # source://prism//lib/prism/dot_visitor.rb#3450 def visit_optional_parameter_node(node); end # Visit a OrNode node. # - # source://prism//lib/prism/dot_visitor.rb#3458 + # source://prism//lib/prism/dot_visitor.rb#3480 def visit_or_node(node); end # Visit a ParametersNode node. # - # source://prism//lib/prism/dot_visitor.rb#3483 + # source://prism//lib/prism/dot_visitor.rb#3505 def visit_parameters_node(node); end # Visit a ParenthesesNode node. # - # source://prism//lib/prism/dot_visitor.rb#3567 + # source://prism//lib/prism/dot_visitor.rb#3589 def visit_parentheses_node(node); end # Visit a PinnedExpressionNode node. # - # source://prism//lib/prism/dot_visitor.rb#3593 + # source://prism//lib/prism/dot_visitor.rb#3615 def visit_pinned_expression_node(node); end # Visit a PinnedVariableNode node. # - # source://prism//lib/prism/dot_visitor.rb#3620 + # source://prism//lib/prism/dot_visitor.rb#3642 def visit_pinned_variable_node(node); end # Visit a PostExecutionNode node. # - # source://prism//lib/prism/dot_visitor.rb#3641 + # source://prism//lib/prism/dot_visitor.rb#3663 def visit_post_execution_node(node); end # Visit a PreExecutionNode node. # - # source://prism//lib/prism/dot_visitor.rb#3670 + # source://prism//lib/prism/dot_visitor.rb#3692 def visit_pre_execution_node(node); end # Visit a ProgramNode node. # - # source://prism//lib/prism/dot_visitor.rb#3699 + # source://prism//lib/prism/dot_visitor.rb#3721 def visit_program_node(node); end # Visit a RangeNode node. # - # source://prism//lib/prism/dot_visitor.rb#3720 + # source://prism//lib/prism/dot_visitor.rb#3742 def visit_range_node(node); end # Visit a RationalNode node. # - # source://prism//lib/prism/dot_visitor.rb#3752 + # source://prism//lib/prism/dot_visitor.rb#3774 def visit_rational_node(node); end # Visit a RedoNode node. # - # source://prism//lib/prism/dot_visitor.rb#3770 + # source://prism//lib/prism/dot_visitor.rb#3792 def visit_redo_node(node); end # Visit a RegularExpressionNode node. # - # source://prism//lib/prism/dot_visitor.rb#3784 + # source://prism//lib/prism/dot_visitor.rb#3806 def visit_regular_expression_node(node); end # Visit a RequiredKeywordParameterNode node. # - # source://prism//lib/prism/dot_visitor.rb#3813 + # source://prism//lib/prism/dot_visitor.rb#3835 def visit_required_keyword_parameter_node(node); end # Visit a RequiredParameterNode node. # - # source://prism//lib/prism/dot_visitor.rb#3836 + # source://prism//lib/prism/dot_visitor.rb#3858 def visit_required_parameter_node(node); end # Visit a RescueModifierNode node. # - # source://prism//lib/prism/dot_visitor.rb#3856 + # source://prism//lib/prism/dot_visitor.rb#3878 def visit_rescue_modifier_node(node); end # Visit a RescueNode node. # - # source://prism//lib/prism/dot_visitor.rb#3881 + # source://prism//lib/prism/dot_visitor.rb#3903 def visit_rescue_node(node); end # Visit a RestParameterNode node. # - # source://prism//lib/prism/dot_visitor.rb#3934 + # source://prism//lib/prism/dot_visitor.rb#3956 def visit_rest_parameter_node(node); end # Visit a RetryNode node. # - # source://prism//lib/prism/dot_visitor.rb#3962 + # source://prism//lib/prism/dot_visitor.rb#3984 def visit_retry_node(node); end # Visit a ReturnNode node. # - # source://prism//lib/prism/dot_visitor.rb#3976 + # source://prism//lib/prism/dot_visitor.rb#3998 def visit_return_node(node); end # Visit a SelfNode node. # - # source://prism//lib/prism/dot_visitor.rb#3999 + # source://prism//lib/prism/dot_visitor.rb#4021 def visit_self_node(node); end + # Visit a ShareableConstantNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4035 + def visit_shareable_constant_node(node); end + # Visit a SingletonClassNode node. # - # source://prism//lib/prism/dot_visitor.rb#4013 + # source://prism//lib/prism/dot_visitor.rb#4056 def visit_singleton_class_node(node); end # Visit a SourceEncodingNode node. # - # source://prism//lib/prism/dot_visitor.rb#4049 + # source://prism//lib/prism/dot_visitor.rb#4092 def visit_source_encoding_node(node); end # Visit a SourceFileNode node. # - # source://prism//lib/prism/dot_visitor.rb#4063 + # source://prism//lib/prism/dot_visitor.rb#4106 def visit_source_file_node(node); end # Visit a SourceLineNode node. # - # source://prism//lib/prism/dot_visitor.rb#4080 + # source://prism//lib/prism/dot_visitor.rb#4126 def visit_source_line_node(node); end # Visit a SplatNode node. # - # source://prism//lib/prism/dot_visitor.rb#4094 + # source://prism//lib/prism/dot_visitor.rb#4140 def visit_splat_node(node); end # Visit a StatementsNode node. # - # source://prism//lib/prism/dot_visitor.rb#4117 + # source://prism//lib/prism/dot_visitor.rb#4163 def visit_statements_node(node); end # Visit a StringNode node. # - # source://prism//lib/prism/dot_visitor.rb#4144 + # source://prism//lib/prism/dot_visitor.rb#4190 def visit_string_node(node); end # Visit a SuperNode node. # - # source://prism//lib/prism/dot_visitor.rb#4177 + # source://prism//lib/prism/dot_visitor.rb#4223 def visit_super_node(node); end # Visit a SymbolNode node. # - # source://prism//lib/prism/dot_visitor.rb#4216 + # source://prism//lib/prism/dot_visitor.rb#4262 def visit_symbol_node(node); end # Visit a TrueNode node. # - # source://prism//lib/prism/dot_visitor.rb#4251 + # source://prism//lib/prism/dot_visitor.rb#4297 def visit_true_node(node); end # Visit a UndefNode node. # - # source://prism//lib/prism/dot_visitor.rb#4265 + # source://prism//lib/prism/dot_visitor.rb#4311 def visit_undef_node(node); end # Visit a UnlessNode node. # - # source://prism//lib/prism/dot_visitor.rb#4295 + # source://prism//lib/prism/dot_visitor.rb#4341 def visit_unless_node(node); end # Visit a UntilNode node. # - # source://prism//lib/prism/dot_visitor.rb#4338 + # source://prism//lib/prism/dot_visitor.rb#4384 def visit_until_node(node); end # Visit a WhenNode node. # - # source://prism//lib/prism/dot_visitor.rb#4373 + # source://prism//lib/prism/dot_visitor.rb#4419 def visit_when_node(node); end # Visit a WhileNode node. # - # source://prism//lib/prism/dot_visitor.rb#4409 + # source://prism//lib/prism/dot_visitor.rb#4460 def visit_while_node(node); end # Visit a XStringNode node. # - # source://prism//lib/prism/dot_visitor.rb#4444 + # source://prism//lib/prism/dot_visitor.rb#4495 def visit_x_string_node(node); end # Visit a YieldNode node. # - # source://prism//lib/prism/dot_visitor.rb#4473 + # source://prism//lib/prism/dot_visitor.rb#4524 def visit_yield_node(node); end private @@ -11016,168 +12127,180 @@ 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#4519 + # source://prism//lib/prism/dot_visitor.rb#4570 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#4527 + # source://prism//lib/prism/dot_visitor.rb#4578 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#4535 + # source://prism//lib/prism/dot_visitor.rb#4586 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#4546 + # source://prism//lib/prism/dot_visitor.rb#4597 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#4555 + # source://prism//lib/prism/dot_visitor.rb#4606 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 + 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#4566 + # source://prism//lib/prism/dot_visitor.rb#4626 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#4513 + # source://prism//lib/prism/dot_visitor.rb#4564 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#4574 + # source://prism//lib/prism/dot_visitor.rb#4634 def loop_flags_inspect(node); end # Generate a unique node ID for a node throughout the digraph. # - # source://prism//lib/prism/dot_visitor.rb#4508 + # source://prism//lib/prism/dot_visitor.rb#4559 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#4582 + # source://prism//lib/prism/dot_visitor.rb#4642 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#4590 + # source://prism//lib/prism/dot_visitor.rb#4650 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#4598 + # source://prism//lib/prism/dot_visitor.rb#4658 def regular_expression_flags_inspect(node); end + # Inspect a node that has shareable_constant_node_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4676 + 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#4616 + # source://prism//lib/prism/dot_visitor.rb#4686 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#4626 + # source://prism//lib/prism/dot_visitor.rb#4697 def symbol_flags_inspect(node); end end -# source://prism//lib/prism/dot_visitor.rb#58 +# source://prism//lib/prism/dot_visitor.rb#59 class Prism::DotVisitor::Digraph # @return [Digraph] a new instance of Digraph # - # source://prism//lib/prism/dot_visitor.rb#61 + # source://prism//lib/prism/dot_visitor.rb#62 def initialize; end - # source://prism//lib/prism/dot_visitor.rb#75 + # source://prism//lib/prism/dot_visitor.rb#76 def edge(value); end # Returns the value of attribute edges. # - # source://prism//lib/prism/dot_visitor.rb#59 + # source://prism//lib/prism/dot_visitor.rb#60 def edges; end - # source://prism//lib/prism/dot_visitor.rb#67 + # source://prism//lib/prism/dot_visitor.rb#68 def node(value); end # Returns the value of attribute nodes. # - # source://prism//lib/prism/dot_visitor.rb#59 + # source://prism//lib/prism/dot_visitor.rb#60 def nodes; end - # source://prism//lib/prism/dot_visitor.rb#79 + # source://prism//lib/prism/dot_visitor.rb#80 def to_dot; end - # source://prism//lib/prism/dot_visitor.rb#71 + # source://prism//lib/prism/dot_visitor.rb#72 def waypoint(value); end # Returns the value of attribute waypoints. # - # source://prism//lib/prism/dot_visitor.rb#59 + # source://prism//lib/prism/dot_visitor.rb#60 def waypoints; end end -# source://prism//lib/prism/dot_visitor.rb#14 +# source://prism//lib/prism/dot_visitor.rb#15 class Prism::DotVisitor::Field # @return [Field] a new instance of Field # - # source://prism//lib/prism/dot_visitor.rb#17 + # source://prism//lib/prism/dot_visitor.rb#18 def initialize(name, value, port); end # Returns the value of attribute name. # - # source://prism//lib/prism/dot_visitor.rb#15 + # source://prism//lib/prism/dot_visitor.rb#16 def name; end # Returns the value of attribute port. # - # source://prism//lib/prism/dot_visitor.rb#15 + # source://prism//lib/prism/dot_visitor.rb#16 def port; end - # source://prism//lib/prism/dot_visitor.rb#23 + # source://prism//lib/prism/dot_visitor.rb#24 def to_dot; end # Returns the value of attribute value. # - # source://prism//lib/prism/dot_visitor.rb#15 + # source://prism//lib/prism/dot_visitor.rb#16 def value; end end -# source://prism//lib/prism/dot_visitor.rb#32 +# source://prism//lib/prism/dot_visitor.rb#33 class Prism::DotVisitor::Table # @return [Table] a new instance of Table # - # source://prism//lib/prism/dot_visitor.rb#35 + # source://prism//lib/prism/dot_visitor.rb#36 def initialize(name); end - # source://prism//lib/prism/dot_visitor.rb#40 + # source://prism//lib/prism/dot_visitor.rb#41 def field(name, value = T.unsafe(nil), port: T.unsafe(nil)); end # Returns the value of attribute fields. # - # source://prism//lib/prism/dot_visitor.rb#33 + # source://prism//lib/prism/dot_visitor.rb#34 def fields; end # Returns the value of attribute name. # - # source://prism//lib/prism/dot_visitor.rb#33 + # source://prism//lib/prism/dot_visitor.rb#34 def name; end - # source://prism//lib/prism/dot_visitor.rb#44 + # source://prism//lib/prism/dot_visitor.rb#45 def to_dot; end end @@ -11186,92 +12309,110 @@ end # if a then b else c end # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#6290 +# source://prism//lib/prism/node.rb#6088 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#6292 + # source://prism//lib/prism/node.rb#6090 + sig do + params( + source: Prism::Source, + else_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + end_keyword_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end def initialize(source, else_keyword_loc, statements, end_keyword_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6302 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#6100 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6307 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#6105 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6319 + # source://prism//lib/prism/node.rb#6117 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6312 + # source://prism//lib/prism/node.rb#6110 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ElseNode + # def copy: (?else_keyword_loc: Location, ?statements: StatementsNode?, ?end_keyword_loc: Location?, ?location: Location) -> ElseNode # - # source://prism//lib/prism/node.rb#6324 - sig { params(params: T.untyped).returns(Prism::ElseNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#6122 + sig do + params( + else_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + end_keyword_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::ElseNode) + end + def copy(else_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6307 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#6105 + 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#6338 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#6130 + 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#6365 + # source://prism//lib/prism/node.rb#6159 sig { returns(String) } def else_keyword; end # attr_reader else_keyword_loc: Location # - # source://prism//lib/prism/node.rb#6343 + # source://prism//lib/prism/node.rb#6135 sig { returns(Prism::Location) } def else_keyword_loc; end # def end_keyword: () -> String? # - # source://prism//lib/prism/node.rb#6370 + # source://prism//lib/prism/node.rb#6164 sig { returns(T.nilable(String)) } def end_keyword; end # attr_reader end_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#6352 + # source://prism//lib/prism/node.rb#6145 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 # - # source://prism//lib/prism/node.rb#6375 + # source://prism//lib/prism/node.rb#6169 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#6349 + # source://prism//lib/prism/node.rb#6142 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -11290,7 +12431,8 @@ class Prism::ElseNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#6402 + # source://prism//lib/prism/node.rb#6196 + sig { override.returns(Symbol) } def type; end class << self @@ -11301,7 +12443,7 @@ class Prism::ElseNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#6412 + # source://prism//lib/prism/node.rb#6206 def type; end end end @@ -11309,18 +12451,20 @@ end # EmbDocComment objects correspond to comments that are surrounded by =begin # and =end. # -# source://prism//lib/prism/parse_result.rb#290 +# source://prism//lib/prism/parse_result.rb#325 class Prism::EmbDocComment < ::Prism::Comment # Returns a string representation of this comment. # - # source://prism//lib/prism/parse_result.rb#297 + # source://prism//lib/prism/parse_result.rb#332 + sig { returns(String) } def inspect; end # This can only be true for inline comments. # # @return [Boolean] # - # source://prism//lib/prism/parse_result.rb#292 + # source://prism//lib/prism/parse_result.rb#327 + sig { override.returns(T::Boolean) } def trailing?; end end @@ -11329,92 +12473,110 @@ end # "foo #{bar}" # ^^^^^^ # -# source://prism//lib/prism/node.rb#6421 +# source://prism//lib/prism/node.rb#6215 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#6423 + # source://prism//lib/prism/node.rb#6217 + sig do + params( + source: Prism::Source, + opening_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + closing_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, opening_loc, statements, closing_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6433 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#6227 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6438 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#6232 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#6495 + # source://prism//lib/prism/node.rb#6285 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#6483 + # source://prism//lib/prism/node.rb#6272 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6450 + # source://prism//lib/prism/node.rb#6244 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6443 + # source://prism//lib/prism/node.rb#6237 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> EmbeddedStatementsNode + # def copy: (?opening_loc: Location, ?statements: StatementsNode?, ?closing_loc: Location, ?location: Location) -> EmbeddedStatementsNode # - # source://prism//lib/prism/node.rb#6455 - sig { params(params: T.untyped).returns(Prism::EmbeddedStatementsNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] + # source://prism//lib/prism/node.rb#6249 + sig do + params( + opening_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + closing_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::EmbeddedStatementsNode) + end + def copy(opening_loc: T.unsafe(nil), statements: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6438 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#6232 + 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#6469 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#6257 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#6500 + # source://prism//lib/prism/node.rb#6290 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String # - # source://prism//lib/prism/node.rb#6490 + # source://prism//lib/prism/node.rb#6280 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#6474 + # source://prism//lib/prism/node.rb#6262 sig { returns(Prism::Location) } def opening_loc; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#6480 + # source://prism//lib/prism/node.rb#6269 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -11433,7 +12595,8 @@ class Prism::EmbeddedStatementsNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#6527 + # source://prism//lib/prism/node.rb#6317 + sig { override.returns(Symbol) } def type; end class << self @@ -11444,7 +12607,7 @@ class Prism::EmbeddedStatementsNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#6537 + # source://prism//lib/prism/node.rb#6327 def type; end end end @@ -11454,74 +12617,90 @@ end # "foo #@bar" # ^^^^^ # -# source://prism//lib/prism/node.rb#6546 +# source://prism//lib/prism/node.rb#6336 class Prism::EmbeddedVariableNode < ::Prism::Node - # def initialize: (Location operator_loc, Node variable, Location location) -> void + # def initialize: (Location operator_loc, Prism::node variable, Location location) -> void # # @return [EmbeddedVariableNode] a new instance of EmbeddedVariableNode # - # source://prism//lib/prism/node.rb#6548 + # source://prism//lib/prism/node.rb#6338 + sig do + params( + source: Prism::Source, + operator_loc: Prism::Location, + variable: Prism::Node, + location: Prism::Location + ).void + end def initialize(source, operator_loc, variable, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6557 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#6347 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6562 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#6352 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6572 + # source://prism//lib/prism/node.rb#6362 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6567 + # source://prism//lib/prism/node.rb#6357 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> EmbeddedVariableNode + # def copy: (?operator_loc: Location, ?variable: Prism::node, ?location: Location) -> EmbeddedVariableNode # - # source://prism//lib/prism/node.rb#6577 - sig { params(params: T.untyped).returns(Prism::EmbeddedVariableNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#6367 + sig do + params( + operator_loc: Prism::Location, + variable: Prism::Node, + location: Prism::Location + ).returns(Prism::EmbeddedVariableNode) + end + def copy(operator_loc: T.unsafe(nil), variable: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6562 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#6352 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { operator_loc: Location, variable: Node, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { operator_loc: Location, variable: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#6590 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#6375 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#6610 + # source://prism//lib/prism/node.rb#6396 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # - # source://prism//lib/prism/node.rb#6605 + # source://prism//lib/prism/node.rb#6391 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#6595 + # source://prism//lib/prism/node.rb#6380 sig { returns(Prism::Location) } def operator_loc; end @@ -11540,12 +12719,13 @@ class Prism::EmbeddedVariableNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#6632 + # source://prism//lib/prism/node.rb#6418 + sig { override.returns(Symbol) } def type; end - # attr_reader variable: Node + # attr_reader variable: Prism::node # - # source://prism//lib/prism/node.rb#6601 + # source://prism//lib/prism/node.rb#6387 sig { returns(Prism::Node) } def variable; end @@ -11557,24 +12737,24 @@ class Prism::EmbeddedVariableNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#6642 + # source://prism//lib/prism/node.rb#6428 def type; end end end # Flags for nodes that have unescaped content. # -# source://prism//lib/prism/node.rb#19268 +# source://prism//lib/prism/node.rb#18857 module Prism::EncodingFlags; end # internal bytes forced the encoding to binary # -# source://prism//lib/prism/node.rb#19273 +# source://prism//lib/prism/node.rb#18862 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#19270 +# source://prism//lib/prism/node.rb#18859 Prism::EncodingFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # Represents an `ensure` clause in a `begin` statement. @@ -11586,92 +12766,110 @@ Prism::EncodingFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # bar # end # -# source://prism//lib/prism/node.rb#6655 +# source://prism//lib/prism/node.rb#6441 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#6657 + # source://prism//lib/prism/node.rb#6443 + sig do + params( + source: Prism::Source, + ensure_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + end_keyword_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, ensure_keyword_loc, statements, end_keyword_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6667 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#6453 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6672 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#6458 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6684 + # source://prism//lib/prism/node.rb#6470 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6677 + # source://prism//lib/prism/node.rb#6463 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> EnsureNode + # def copy: (?ensure_keyword_loc: Location, ?statements: StatementsNode?, ?end_keyword_loc: Location, ?location: Location) -> EnsureNode # - # source://prism//lib/prism/node.rb#6689 - sig { params(params: T.untyped).returns(Prism::EnsureNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#6475 + sig do + params( + ensure_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + end_keyword_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::EnsureNode) + end + def copy(ensure_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6672 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#6458 + 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#6703 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#6483 + 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#6729 + # source://prism//lib/prism/node.rb#6511 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#6717 + # source://prism//lib/prism/node.rb#6498 sig { returns(Prism::Location) } def end_keyword_loc; end # def ensure_keyword: () -> String # - # source://prism//lib/prism/node.rb#6724 + # source://prism//lib/prism/node.rb#6506 sig { returns(String) } def ensure_keyword; end # attr_reader ensure_keyword_loc: Location # - # source://prism//lib/prism/node.rb#6708 + # source://prism//lib/prism/node.rb#6488 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 # - # source://prism//lib/prism/node.rb#6734 + # source://prism//lib/prism/node.rb#6516 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#6714 + # source://prism//lib/prism/node.rb#6495 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -11690,7 +12888,8 @@ class Prism::EnsureNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#6761 + # source://prism//lib/prism/node.rb#6543 + sig { override.returns(Symbol) } def type; end class << self @@ -11701,7 +12900,7 @@ class Prism::EnsureNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#6771 + # source://prism//lib/prism/node.rb#6553 def type; end end end @@ -11711,63 +12910,66 @@ end # false # ^^^^^ # -# source://prism//lib/prism/node.rb#6780 +# source://prism//lib/prism/node.rb#6562 class Prism::FalseNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [FalseNode] a new instance of FalseNode # - # source://prism//lib/prism/node.rb#6782 + # source://prism//lib/prism/node.rb#6564 + sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6789 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#6571 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6794 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#6576 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6804 + # source://prism//lib/prism/node.rb#6586 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6799 + # source://prism//lib/prism/node.rb#6581 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> FalseNode + # def copy: (?location: Location) -> FalseNode # - # source://prism//lib/prism/node.rb#6809 - sig { params(params: T.untyped).returns(Prism::FalseNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#6591 + 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#6794 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#6576 + 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#6820 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#6599 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#6826 + # source://prism//lib/prism/node.rb#6605 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of @@ -11785,7 +12987,8 @@ class Prism::FalseNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#6845 + # source://prism//lib/prism/node.rb#6624 + sig { override.returns(Symbol) } def type; end class << self @@ -11796,7 +12999,7 @@ class Prism::FalseNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#6855 + # source://prism//lib/prism/node.rb#6634 def type; end end end @@ -11812,110 +13015,134 @@ end # foo in Foo(*bar, baz, *qux) # ^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#6870 +# source://prism//lib/prism/node.rb#6649 class Prism::FindPatternNode < ::Prism::Node - # def initialize: (Node? constant, Node left, Array[Node] requireds, Node right, Location? opening_loc, Location? closing_loc, Location location) -> void + # 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#6872 + # source://prism//lib/prism/node.rb#6651 + sig do + params( + source: Prism::Source, + constant: T.nilable(Prism::Node), + left: Prism::Node, + requireds: T::Array[Prism::Node], + right: Prism::Node, + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end def initialize(source, constant, left, requireds, right, opening_loc, closing_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6885 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#6664 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6890 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#6669 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#6974 + # source://prism//lib/prism/node.rb#6746 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#6956 + # source://prism//lib/prism/node.rb#6727 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6905 + # source://prism//lib/prism/node.rb#6684 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6895 + # source://prism//lib/prism/node.rb#6674 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # attr_reader constant: Node? + # attr_reader constant: Prism::node? # - # source://prism//lib/prism/node.rb#6932 + # source://prism//lib/prism/node.rb#6702 sig { returns(T.nilable(Prism::Node)) } def constant; end - # def copy: (**params) -> FindPatternNode + # 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#6910 - sig { params(params: T.untyped).returns(Prism::FindPatternNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#6689 + sig do + params( + constant: T.nilable(Prism::Node), + left: Prism::Node, + requireds: T::Array[Prism::Node], + right: Prism::Node, + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::FindPatternNode) + end + def copy(constant: T.unsafe(nil), left: T.unsafe(nil), requireds: T.unsafe(nil), right: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6890 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#6669 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { constant: Node?, left: Node, requireds: Array[Node], right: Node, opening_loc: Location?, closing_loc: Location?, location: Location } + # 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#6927 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#6697 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#6979 + # source://prism//lib/prism/node.rb#6751 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end - # attr_reader left: Node + # attr_reader left: Prism::node # - # source://prism//lib/prism/node.rb#6935 + # source://prism//lib/prism/node.rb#6705 sig { returns(Prism::Node) } def left; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#6969 + # source://prism//lib/prism/node.rb#6741 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#6944 + # source://prism//lib/prism/node.rb#6714 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end - # attr_reader requireds: Array[Node] + # attr_reader requireds: Array[Prism::node] # - # source://prism//lib/prism/node.rb#6938 + # source://prism//lib/prism/node.rb#6708 sig { returns(T::Array[Prism::Node]) } def requireds; end - # attr_reader right: Node + # attr_reader right: Prism::node # - # source://prism//lib/prism/node.rb#6941 + # source://prism//lib/prism/node.rb#6711 sig { returns(Prism::Node) } def right; end @@ -11934,7 +13161,8 @@ class Prism::FindPatternNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#7011 + # source://prism//lib/prism/node.rb#6783 + sig { override.returns(Symbol) } def type; end class << self @@ -11945,7 +13173,7 @@ class Prism::FindPatternNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#7021 + # source://prism//lib/prism/node.rb#6793 def type; end end end @@ -11955,94 +13183,114 @@ end # baz if foo .. bar # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#7030 +# source://prism//lib/prism/node.rb#6802 class Prism::FlipFlopNode < ::Prism::Node - # def initialize: (Integer flags, Node? left, Node? right, Location operator_loc, Location location) -> void + # 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#7032 + # source://prism//lib/prism/node.rb#6804 + sig do + params( + source: Prism::Source, + flags: Integer, + left: T.nilable(Prism::Node), + right: T.nilable(Prism::Node), + operator_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, flags, left, right, operator_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7043 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#6815 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7048 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#6820 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7061 + # source://prism//lib/prism/node.rb#6833 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7053 + # source://prism//lib/prism/node.rb#6825 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> FlipFlopNode + # def copy: (?flags: Integer, ?left: Prism::node?, ?right: Prism::node?, ?operator_loc: Location, ?location: Location) -> FlipFlopNode # - # source://prism//lib/prism/node.rb#7066 - sig { params(params: T.untyped).returns(Prism::FlipFlopNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#6838 + sig do + params( + flags: Integer, + left: T.nilable(Prism::Node), + right: T.nilable(Prism::Node), + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::FlipFlopNode) + end + def copy(flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7048 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#6820 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, left: Node?, right: Node?, operator_loc: Location, location: Location } + # 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#7081 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#6846 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def exclude_end?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#7103 + # source://prism//lib/prism/node.rb#6869 sig { returns(T::Boolean) } def exclude_end?; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#7113 + # source://prism//lib/prism/node.rb#6879 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end - # attr_reader left: Node? + # attr_reader left: Prism::node? # - # source://prism//lib/prism/node.rb#7090 + # source://prism//lib/prism/node.rb#6855 sig { returns(T.nilable(Prism::Node)) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#7108 + # source://prism//lib/prism/node.rb#6874 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#7096 + # source://prism//lib/prism/node.rb#6861 sig { returns(Prism::Location) } def operator_loc; end - # attr_reader right: Node? + # attr_reader right: Prism::node? # - # source://prism//lib/prism/node.rb#7093 + # source://prism//lib/prism/node.rb#6858 sig { returns(T.nilable(Prism::Node)) } def right; end @@ -12061,14 +13309,15 @@ class Prism::FlipFlopNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#7147 + # source://prism//lib/prism/node.rb#6913 + sig { override.returns(Symbol) } def type; end private # private attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#7086 + # source://prism//lib/prism/node.rb#6851 sig { returns(Integer) } def flags; end @@ -12080,7 +13329,7 @@ class Prism::FlipFlopNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#7157 + # source://prism//lib/prism/node.rb#6923 def type; end end end @@ -12090,63 +13339,66 @@ end # 1.0 # ^^^ # -# source://prism//lib/prism/node.rb#7166 +# source://prism//lib/prism/node.rb#6932 class Prism::FloatNode < ::Prism::Node - # def initialize: (Location location) -> void + # def initialize: (Float value, Location location) -> void # # @return [FloatNode] a new instance of FloatNode # - # source://prism//lib/prism/node.rb#7168 - def initialize(source, location); end + # source://prism//lib/prism/node.rb#6934 + sig { params(source: Prism::Source, value: Float, location: Prism::Location).void } + def initialize(source, value, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7175 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#6942 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7180 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#6947 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7190 + # source://prism//lib/prism/node.rb#6957 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7185 + # source://prism//lib/prism/node.rb#6952 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> FloatNode + # def copy: (?value: Float, ?location: Location) -> FloatNode # - # source://prism//lib/prism/node.rb#7195 - sig { params(params: T.untyped).returns(Prism::FloatNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#6962 + 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#7180 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#6947 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { value: Float, location: Location } # - # source://prism//lib/prism/node.rb#7206 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#6970 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#7212 + # source://prism//lib/prism/node.rb#6979 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of @@ -12164,12 +13416,14 @@ class Prism::FloatNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#7231 + # source://prism//lib/prism/node.rb#6999 + sig { override.returns(Symbol) } def type; end - # Returns the value of the node as a Ruby Float. + # The value of the floating point number as a Float. # - # source://prism//lib/prism/node_ext.rb#62 + # source://prism//lib/prism/node.rb#6975 + sig { returns(Float) } def value; end class << self @@ -12180,7 +13434,7 @@ class Prism::FloatNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#7241 + # source://prism//lib/prism/node.rb#7009 def type; end end end @@ -12190,128 +13444,154 @@ end # for i in a end # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#7250 +# source://prism//lib/prism/node.rb#7018 class Prism::ForNode < ::Prism::Node - # def initialize: (Node index, Node collection, StatementsNode? statements, Location for_keyword_loc, Location in_keyword_loc, Location? do_keyword_loc, Location end_keyword_loc, Location location) -> void + # 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#7252 + # source://prism//lib/prism/node.rb#7020 + sig do + params( + source: Prism::Source, + index: Prism::Node, + collection: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + for_keyword_loc: Prism::Location, + in_keyword_loc: Prism::Location, + do_keyword_loc: T.nilable(Prism::Location), + end_keyword_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, index, collection, statements, for_keyword_loc, in_keyword_loc, do_keyword_loc, end_keyword_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7266 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#7034 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7271 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#7039 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end - # attr_reader collection: Node + # attr_reader collection: Prism::node # - # source://prism//lib/prism/node.rb#7316 + # source://prism//lib/prism/node.rb#7074 sig { returns(Prism::Node) } def collection; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7285 + # source://prism//lib/prism/node.rb#7053 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7276 + # source://prism//lib/prism/node.rb#7044 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ForNode + # 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#7290 - sig { params(params: T.untyped).returns(Prism::ForNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#7058 + sig do + params( + index: Prism::Node, + collection: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + for_keyword_loc: Prism::Location, + in_keyword_loc: Prism::Location, + do_keyword_loc: T.nilable(Prism::Location), + end_keyword_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::ForNode) + end + def copy(index: T.unsafe(nil), collection: T.unsafe(nil), statements: T.unsafe(nil), for_keyword_loc: T.unsafe(nil), in_keyword_loc: T.unsafe(nil), do_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7271 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#7039 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { index: Node, collection: Node, statements: StatementsNode?, for_keyword_loc: Location, in_keyword_loc: Location, do_keyword_loc: Location?, end_keyword_loc: Location, location: Location } + # 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#7308 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#7066 + 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#7363 + # source://prism//lib/prism/node.rb#7125 sig { returns(T.nilable(String)) } def do_keyword; end # attr_reader do_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#7334 + # source://prism//lib/prism/node.rb#7094 sig { returns(T.nilable(Prism::Location)) } def do_keyword_loc; end # def end_keyword: () -> String # - # source://prism//lib/prism/node.rb#7368 + # source://prism//lib/prism/node.rb#7130 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#7346 + # source://prism//lib/prism/node.rb#7107 sig { returns(Prism::Location) } def end_keyword_loc; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def for_keyword: () -> String # - # source://prism//lib/prism/node.rb#7353 + # source://prism//lib/prism/node.rb#7115 sig { returns(String) } def for_keyword; end # attr_reader for_keyword_loc: Location # - # source://prism//lib/prism/node.rb#7322 + # source://prism//lib/prism/node.rb#7080 sig { returns(Prism::Location) } def for_keyword_loc; end # def in_keyword: () -> String # - # source://prism//lib/prism/node.rb#7358 + # source://prism//lib/prism/node.rb#7120 sig { returns(String) } def in_keyword; end # attr_reader in_keyword_loc: Location # - # source://prism//lib/prism/node.rb#7328 + # source://prism//lib/prism/node.rb#7087 sig { returns(Prism::Location) } def in_keyword_loc; end - # attr_reader index: Node + # attr_reader index: Prism::node # - # source://prism//lib/prism/node.rb#7313 + # source://prism//lib/prism/node.rb#7071 sig { returns(Prism::Node) } def index; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#7373 + # source://prism//lib/prism/node.rb#7135 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#7319 + # source://prism//lib/prism/node.rb#7077 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -12330,7 +13610,8 @@ class Prism::ForNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#7406 + # source://prism//lib/prism/node.rb#7168 + sig { override.returns(Symbol) } def type; end class << self @@ -12341,7 +13622,7 @@ class Prism::ForNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#7416 + # source://prism//lib/prism/node.rb#7178 def type; end end end @@ -12353,63 +13634,66 @@ end # ^^^ # end # -# source://prism//lib/prism/node.rb#7427 +# source://prism//lib/prism/node.rb#7189 class Prism::ForwardingArgumentsNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [ForwardingArgumentsNode] a new instance of ForwardingArgumentsNode # - # source://prism//lib/prism/node.rb#7429 + # source://prism//lib/prism/node.rb#7191 + sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7436 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#7198 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7441 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#7203 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7451 + # source://prism//lib/prism/node.rb#7213 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7446 + # source://prism//lib/prism/node.rb#7208 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ForwardingArgumentsNode + # def copy: (?location: Location) -> ForwardingArgumentsNode # - # source://prism//lib/prism/node.rb#7456 - sig { params(params: T.untyped).returns(Prism::ForwardingArgumentsNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#7218 + 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#7441 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#7203 + 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#7467 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#7226 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#7473 + # source://prism//lib/prism/node.rb#7232 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of @@ -12427,7 +13711,8 @@ class Prism::ForwardingArgumentsNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#7492 + # source://prism//lib/prism/node.rb#7251 + sig { override.returns(Symbol) } def type; end class << self @@ -12438,7 +13723,7 @@ class Prism::ForwardingArgumentsNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#7502 + # source://prism//lib/prism/node.rb#7261 def type; end end end @@ -12449,63 +13734,66 @@ end # ^^^ # end # -# source://prism//lib/prism/node.rb#7512 +# source://prism//lib/prism/node.rb#7271 class Prism::ForwardingParameterNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [ForwardingParameterNode] a new instance of ForwardingParameterNode # - # source://prism//lib/prism/node.rb#7514 + # source://prism//lib/prism/node.rb#7273 + sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7521 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#7280 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7526 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#7285 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7536 + # source://prism//lib/prism/node.rb#7295 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7531 + # source://prism//lib/prism/node.rb#7290 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ForwardingParameterNode + # def copy: (?location: Location) -> ForwardingParameterNode # - # source://prism//lib/prism/node.rb#7541 - sig { params(params: T.untyped).returns(Prism::ForwardingParameterNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#7300 + 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#7526 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#7285 + 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#7552 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#7308 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#7558 + # source://prism//lib/prism/node.rb#7314 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of @@ -12523,7 +13811,8 @@ class Prism::ForwardingParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#7577 + # source://prism//lib/prism/node.rb#7333 + sig { override.returns(Symbol) } def type; end class << self @@ -12534,7 +13823,7 @@ class Prism::ForwardingParameterNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#7587 + # source://prism//lib/prism/node.rb#7343 def type; end end end @@ -12544,69 +13833,72 @@ end # super # ^^^^^ # -# source://prism//lib/prism/node.rb#7596 +# source://prism//lib/prism/node.rb#7352 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#7598 + # source://prism//lib/prism/node.rb#7354 + sig { params(source: Prism::Source, block: T.nilable(Prism::BlockNode), location: Prism::Location).void } def initialize(source, block, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7606 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#7362 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader block: BlockNode? # - # source://prism//lib/prism/node.rb#7645 + # source://prism//lib/prism/node.rb#7397 sig { returns(T.nilable(Prism::BlockNode)) } def block; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7611 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#7367 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7623 + # source://prism//lib/prism/node.rb#7379 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7616 + # source://prism//lib/prism/node.rb#7372 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ForwardingSuperNode + # def copy: (?block: BlockNode?, ?location: Location) -> ForwardingSuperNode # - # source://prism//lib/prism/node.rb#7628 - sig { params(params: T.untyped).returns(Prism::ForwardingSuperNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#7384 + 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#7611 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#7367 + 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#7640 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#7392 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#7649 + # source://prism//lib/prism/node.rb#7401 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of @@ -12624,7 +13916,8 @@ class Prism::ForwardingSuperNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#7674 + # source://prism//lib/prism/node.rb#7426 + sig { override.returns(Symbol) } def type; end class << self @@ -12635,7 +13928,7 @@ class Prism::ForwardingSuperNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#7684 + # source://prism//lib/prism/node.rb#7436 def type; end end end @@ -12645,89 +13938,109 @@ end # $target &&= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#7693 +# source://prism//lib/prism/node.rb#7445 class Prism::GlobalVariableAndWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void + # 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#7695 + # source://prism//lib/prism/node.rb#7447 + 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 # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7706 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#7458 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7711 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#7463 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7721 + # source://prism//lib/prism/node.rb#7473 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7716 + # source://prism//lib/prism/node.rb#7468 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> GlobalVariableAndWriteNode + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> GlobalVariableAndWriteNode # - # source://prism//lib/prism/node.rb#7726 - sig { params(params: T.untyped).returns(Prism::GlobalVariableAndWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#7478 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::GlobalVariableAndWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7711 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#7463 + 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: Node, 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#7741 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#7486 + 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#161 + # source://prism//lib/prism/desugar_compiler.rb#163 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#7770 + # source://prism//lib/prism/node.rb#7517 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#7746 + # source://prism//lib/prism/node.rb#7491 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#7749 + # source://prism//lib/prism/node.rb#7494 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#7765 + # source://prism//lib/prism/node.rb#7512 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#7755 + # source://prism//lib/prism/node.rb#7501 sig { returns(Prism::Location) } def operator_loc; end @@ -12746,12 +14059,13 @@ class Prism::GlobalVariableAndWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#7794 + # source://prism//lib/prism/node.rb#7541 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#7761 + # source://prism//lib/prism/node.rb#7508 sig { returns(Prism::Node) } def value; end @@ -12763,7 +14077,7 @@ class Prism::GlobalVariableAndWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#7804 + # source://prism//lib/prism/node.rb#7551 def type; end end end @@ -12773,89 +14087,111 @@ end # $target += value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#7813 +# source://prism//lib/prism/node.rb#7560 class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Symbol operator, Location location) -> void + # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Symbol operator, Location location) -> void # # @return [GlobalVariableOperatorWriteNode] a new instance of GlobalVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#7815 + # source://prism//lib/prism/node.rb#7562 + 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 # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7827 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#7574 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7832 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#7579 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7842 + # source://prism//lib/prism/node.rb#7589 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7837 + # source://prism//lib/prism/node.rb#7584 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> GlobalVariableOperatorWriteNode + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?operator: Symbol, ?location: Location) -> GlobalVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#7847 - sig { params(params: T.untyped).returns(Prism::GlobalVariableOperatorWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#7594 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7832 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#7579 + 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: Node, operator: Symbol, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, operator: Symbol, location: Location } # - # source://prism//lib/prism/node.rb#7863 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#7602 + 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#173 + # source://prism//lib/prism/desugar_compiler.rb#175 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#7890 + # source://prism//lib/prism/node.rb#7631 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#7868 + # source://prism//lib/prism/node.rb#7607 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#7871 + # source://prism//lib/prism/node.rb#7610 sig { returns(Prism::Location) } def name_loc; end # attr_reader operator: Symbol # - # source://prism//lib/prism/node.rb#7886 + # source://prism//lib/prism/node.rb#7627 sig { returns(Symbol) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#7877 + # source://prism//lib/prism/node.rb#7617 sig { returns(Prism::Location) } def operator_loc; end @@ -12874,12 +14210,13 @@ class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#7915 + # source://prism//lib/prism/node.rb#7656 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#7883 + # source://prism//lib/prism/node.rb#7624 sig { returns(Prism::Node) } def value; end @@ -12891,7 +14228,7 @@ class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#7925 + # source://prism//lib/prism/node.rb#7666 def type; end end end @@ -12901,89 +14238,109 @@ end # $target ||= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#7934 +# source://prism//lib/prism/node.rb#7675 class Prism::GlobalVariableOrWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void + # 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#7936 + # source://prism//lib/prism/node.rb#7677 + 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 # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7947 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#7688 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7952 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#7693 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7962 + # source://prism//lib/prism/node.rb#7703 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7957 + # source://prism//lib/prism/node.rb#7698 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> GlobalVariableOrWriteNode + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> GlobalVariableOrWriteNode # - # source://prism//lib/prism/node.rb#7967 - sig { params(params: T.untyped).returns(Prism::GlobalVariableOrWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#7708 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::GlobalVariableOrWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7952 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#7693 + 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: Node, 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#7982 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#7716 + 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#167 + # source://prism//lib/prism/desugar_compiler.rb#169 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#8011 + # source://prism//lib/prism/node.rb#7747 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#7987 + # source://prism//lib/prism/node.rb#7721 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#7990 + # source://prism//lib/prism/node.rb#7724 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#8006 + # source://prism//lib/prism/node.rb#7742 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#7996 + # source://prism//lib/prism/node.rb#7731 sig { returns(Prism::Location) } def operator_loc; end @@ -13002,12 +14359,13 @@ class Prism::GlobalVariableOrWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#8035 + # source://prism//lib/prism/node.rb#7771 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#8002 + # source://prism//lib/prism/node.rb#7738 sig { returns(Prism::Node) } def value; end @@ -13019,7 +14377,7 @@ class Prism::GlobalVariableOrWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#8045 + # source://prism//lib/prism/node.rb#7781 def type; end end end @@ -13029,63 +14387,66 @@ end # $foo # ^^^^ # -# source://prism//lib/prism/node.rb#8054 +# source://prism//lib/prism/node.rb#7790 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#8056 + # source://prism//lib/prism/node.rb#7792 + sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } def initialize(source, name, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8064 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#7800 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8069 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#7805 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8079 + # source://prism//lib/prism/node.rb#7815 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8074 + # source://prism//lib/prism/node.rb#7810 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> GlobalVariableReadNode + # def copy: (?name: Symbol, ?location: Location) -> GlobalVariableReadNode # - # source://prism//lib/prism/node.rb#8084 - sig { params(params: T.untyped).returns(Prism::GlobalVariableReadNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#7820 + 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#8069 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#7805 + 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#8096 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#7828 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#8109 + # source://prism//lib/prism/node.rb#7841 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); 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. @@ -13094,7 +14455,7 @@ class Prism::GlobalVariableReadNode < ::Prism::Node # # $_Test # name `:$_Test` # - # source://prism//lib/prism/node.rb#8105 + # source://prism//lib/prism/node.rb#7837 sig { returns(Symbol) } def name; end @@ -13113,7 +14474,8 @@ class Prism::GlobalVariableReadNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#8129 + # source://prism//lib/prism/node.rb#7861 + sig { override.returns(Symbol) } def type; end class << self @@ -13124,7 +14486,7 @@ class Prism::GlobalVariableReadNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#8139 + # source://prism//lib/prism/node.rb#7871 def type; end end end @@ -13134,68 +14496,71 @@ end # $foo, $bar = baz # ^^^^ ^^^^ # -# source://prism//lib/prism/node.rb#8148 +# source://prism//lib/prism/node.rb#7880 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#8150 + # source://prism//lib/prism/node.rb#7882 + sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } def initialize(source, name, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8158 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#7890 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8163 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#7895 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8173 + # source://prism//lib/prism/node.rb#7905 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8168 + # source://prism//lib/prism/node.rb#7900 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> GlobalVariableTargetNode + # def copy: (?name: Symbol, ?location: Location) -> GlobalVariableTargetNode # - # source://prism//lib/prism/node.rb#8178 - sig { params(params: T.untyped).returns(Prism::GlobalVariableTargetNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#7910 + 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#8163 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#7895 + 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#8190 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#7918 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#8199 + # source://prism//lib/prism/node.rb#7927 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#8195 + # source://prism//lib/prism/node.rb#7923 sig { returns(Symbol) } def name; end @@ -13214,7 +14579,8 @@ class Prism::GlobalVariableTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#8219 + # source://prism//lib/prism/node.rb#7947 + sig { override.returns(Symbol) } def type; end class << self @@ -13225,7 +14591,7 @@ class Prism::GlobalVariableTargetNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#8229 + # source://prism//lib/prism/node.rb#7957 def type; end end end @@ -13235,86 +14601,106 @@ end # $foo = 1 # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#8238 +# source://prism//lib/prism/node.rb#7966 class Prism::GlobalVariableWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Node value, Location operator_loc, Location location) -> void + # 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#8240 + # source://prism//lib/prism/node.rb#7968 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, name, name_loc, value, operator_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8251 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#7979 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8256 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#7984 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8266 + # source://prism//lib/prism/node.rb#7994 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8261 + # source://prism//lib/prism/node.rb#7989 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> GlobalVariableWriteNode + # def copy: (?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location, ?location: Location) -> GlobalVariableWriteNode # - # source://prism//lib/prism/node.rb#8271 - sig { params(params: T.untyped).returns(Prism::GlobalVariableWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#7999 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::GlobalVariableWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8256 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#7984 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location } + # 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#8286 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#8007 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#8315 + # source://prism//lib/prism/node.rb#8038 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#8291 + # source://prism//lib/prism/node.rb#8012 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#8294 + # source://prism//lib/prism/node.rb#8015 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#8310 + # source://prism//lib/prism/node.rb#8033 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#8303 + # source://prism//lib/prism/node.rb#8025 sig { returns(Prism::Location) } def operator_loc; end @@ -13333,12 +14719,13 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#8339 + # source://prism//lib/prism/node.rb#8062 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#8300 + # source://prism//lib/prism/node.rb#8022 sig { returns(Prism::Node) } def value; end @@ -13350,7 +14737,7 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#8349 + # source://prism//lib/prism/node.rb#8072 def type; end end end @@ -13360,30 +14747,39 @@ end # { a => b } # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#8358 +# source://prism//lib/prism/node.rb#8081 class Prism::HashNode < ::Prism::Node - # def initialize: (Location opening_loc, Array[Node] elements, Location closing_loc, Location location) -> void + # 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#8360 + # source://prism//lib/prism/node.rb#8083 + sig do + params( + source: Prism::Source, + opening_loc: Prism::Location, + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)], + closing_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, opening_loc, elements, closing_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8370 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#8093 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8375 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#8098 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#8442 + # source://prism//lib/prism/node.rb#8161 sig { returns(String) } def closing; end @@ -13392,41 +14788,46 @@ class Prism::HashNode < ::Prism::Node # { a => b } # ^ # - # source://prism//lib/prism/node.rb#8430 + # source://prism//lib/prism/node.rb#8148 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8385 + # source://prism//lib/prism/node.rb#8108 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8380 + # source://prism//lib/prism/node.rb#8103 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> HashNode + # def copy: (?opening_loc: Location, ?elements: Array[AssocNode | AssocSplatNode], ?closing_loc: Location, ?location: Location) -> HashNode # - # source://prism//lib/prism/node.rb#8390 - sig { params(params: T.untyped).returns(Prism::HashNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#8113 + sig do + params( + opening_loc: Prism::Location, + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)], + closing_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::HashNode) + end + def copy(opening_loc: T.unsafe(nil), elements: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8375 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#8098 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location, elements: Array[Node], closing_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location, elements: Array[AssocNode | AssocSplatNode], closing_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#8404 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#8121 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # The elements of the hash. These can be either `AssocNode`s or `AssocSplatNode`s. @@ -13437,18 +14838,22 @@ class Prism::HashNode < ::Prism::Node # { **foo } # ^^^^^ # - # source://prism//lib/prism/node.rb#8424 - sig { returns(T::Array[Prism::Node]) } + # source://prism//lib/prism/node.rb#8142 + 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 # - # source://prism//lib/prism/node.rb#8447 + # source://prism//lib/prism/node.rb#8166 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String # - # source://prism//lib/prism/node.rb#8437 + # source://prism//lib/prism/node.rb#8156 sig { returns(String) } def opening; end @@ -13457,7 +14862,7 @@ class Prism::HashNode < ::Prism::Node # { a => b } # ^ # - # source://prism//lib/prism/node.rb#8412 + # source://prism//lib/prism/node.rb#8129 sig { returns(Prism::Location) } def opening_loc; end @@ -13476,7 +14881,8 @@ class Prism::HashNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#8469 + # source://prism//lib/prism/node.rb#8188 + sig { override.returns(Symbol) } def type; end class << self @@ -13487,7 +14893,7 @@ class Prism::HashNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#8479 + # source://prism//lib/prism/node.rb#8198 def type; end end end @@ -13500,105 +14906,127 @@ end # foo => { a: 1, b: 2, **c } # ^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#8491 +# source://prism//lib/prism/node.rb#8210 class Prism::HashPatternNode < ::Prism::Node - # def initialize: (Node? constant, Array[Node] elements, Node? rest, Location? opening_loc, Location? closing_loc, Location location) -> void + # 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#8493 + # source://prism//lib/prism/node.rb#8212 + sig do + params( + source: Prism::Source, + constant: T.nilable(Prism::Node), + elements: T::Array[Prism::AssocNode], + rest: T.nilable(T.any(Prism::AssocSplatNode, Prism::NoKeywordsParameterNode)), + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end def initialize(source, constant, elements, rest, opening_loc, closing_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8505 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#8224 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8510 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#8229 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#8589 + # source://prism//lib/prism/node.rb#8302 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#8571 + # source://prism//lib/prism/node.rb#8283 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8524 + # source://prism//lib/prism/node.rb#8243 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8515 + # source://prism//lib/prism/node.rb#8234 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # attr_reader constant: Node? + # attr_reader constant: Prism::node? # - # source://prism//lib/prism/node.rb#8550 + # source://prism//lib/prism/node.rb#8261 sig { returns(T.nilable(Prism::Node)) } def constant; end - # def copy: (**params) -> HashPatternNode + # 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#8529 - sig { params(params: T.untyped).returns(Prism::HashPatternNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#8248 + sig do + params( + constant: T.nilable(Prism::Node), + elements: T::Array[Prism::AssocNode], + rest: T.nilable(T.any(Prism::AssocSplatNode, Prism::NoKeywordsParameterNode)), + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::HashPatternNode) + end + def copy(constant: T.unsafe(nil), elements: T.unsafe(nil), rest: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8510 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#8229 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { constant: Node?, elements: Array[Node], rest: Node?, opening_loc: Location?, closing_loc: Location?, location: Location } + # 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#8545 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#8256 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # attr_reader elements: Array[Node] + # attr_reader elements: Array[AssocNode] # - # source://prism//lib/prism/node.rb#8553 - sig { returns(T::Array[Prism::Node]) } + # source://prism//lib/prism/node.rb#8264 + 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 # - # source://prism//lib/prism/node.rb#8594 + # source://prism//lib/prism/node.rb#8307 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#8584 + # source://prism//lib/prism/node.rb#8297 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#8559 + # source://prism//lib/prism/node.rb#8270 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end - # attr_reader rest: Node? + # attr_reader rest: AssocSplatNode | NoKeywordsParameterNode | nil # - # source://prism//lib/prism/node.rb#8556 - sig { returns(T.nilable(Prism::Node)) } + # source://prism//lib/prism/node.rb#8267 + sig { returns(T.nilable(T.any(Prism::AssocSplatNode, Prism::NoKeywordsParameterNode))) } def rest; end # Sometimes you want to check an instance of a node against a list of @@ -13616,7 +15044,8 @@ class Prism::HashPatternNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#8628 + # source://prism//lib/prism/node.rb#8341 + sig { override.returns(Symbol) } def type; end class << self @@ -13627,7 +15056,7 @@ class Prism::HashPatternNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#8638 + # source://prism//lib/prism/node.rb#8351 def type; end end end @@ -13650,119 +15079,143 @@ end # if foo then bar end # ^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#8650 +# source://prism//lib/prism/node.rb#8363 class Prism::IfNode < ::Prism::Node - # def initialize: (Location? if_keyword_loc, Node predicate, Location? then_keyword_loc, StatementsNode? statements, Node? consequent, Location? end_keyword_loc, Location location) -> void + # 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#8652 + # source://prism//lib/prism/node.rb#8365 + sig do + params( + source: Prism::Source, + if_keyword_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + consequent: T.nilable(Prism::Node), + end_keyword_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end def initialize(source, if_keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8665 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#8378 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8674 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#8387 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8688 + # source://prism//lib/prism/node.rb#8401 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8679 + # source://prism//lib/prism/node.rb#8392 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # attr_reader consequent: Node? + # attr_reader consequent: Prism::node? # - # source://prism//lib/prism/node.rb#8745 + # source://prism//lib/prism/node.rb#8451 sig { returns(T.nilable(Prism::Node)) } def consequent; end - # def copy: (**params) -> IfNode + # 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#8693 - sig { params(params: T.untyped).returns(Prism::IfNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#8406 + sig do + params( + if_keyword_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + consequent: T.nilable(Prism::Node), + end_keyword_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::IfNode) + end + def copy(if_keyword_loc: T.unsafe(nil), predicate: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8674 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#8387 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { if_keyword_loc: Location?, predicate: Node, then_keyword_loc: Location?, statements: StatementsNode?, consequent: Node?, end_keyword_loc: Location?, location: Location } + # 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#8710 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#8414 + 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#8771 + # source://prism//lib/prism/node.rb#8478 sig { returns(T.nilable(String)) } def end_keyword; end # attr_reader end_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#8748 + # source://prism//lib/prism/node.rb#8454 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def if_keyword: () -> String? # - # source://prism//lib/prism/node.rb#8761 + # source://prism//lib/prism/node.rb#8468 sig { returns(T.nilable(String)) } def if_keyword; end # attr_reader if_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#8715 + # source://prism//lib/prism/node.rb#8419 sig { returns(T.nilable(Prism::Location)) } def if_keyword_loc; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#8776 + # source://prism//lib/prism/node.rb#8483 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end - # attr_reader predicate: Node + # attr_reader predicate: Prism::node # - # source://prism//lib/prism/node.rb#8727 + # source://prism//lib/prism/node.rb#8432 sig { returns(Prism::Node) } def predicate; end - # source://prism//lib/prism/node.rb#8669 + # source://prism//lib/prism/node.rb#8382 def set_newline_flag(newline_marked); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#8742 + # source://prism//lib/prism/node.rb#8448 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # def then_keyword: () -> String? # - # source://prism//lib/prism/node.rb#8766 + # source://prism//lib/prism/node.rb#8473 sig { returns(T.nilable(String)) } def then_keyword; end # attr_reader then_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#8730 + # source://prism//lib/prism/node.rb#8435 sig { returns(T.nilable(Prism::Location)) } def then_keyword_loc; end @@ -13781,7 +15234,8 @@ class Prism::IfNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#8812 + # source://prism//lib/prism/node.rb#8519 + sig { override.returns(Symbol) } def type; end class << self @@ -13792,7 +15246,7 @@ class Prism::IfNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#8822 + # source://prism//lib/prism/node.rb#8529 def type; end end end @@ -13802,69 +15256,83 @@ end # 1.0i # ^^^^ # -# source://prism//lib/prism/node.rb#8831 +# source://prism//lib/prism/node.rb#8538 class Prism::ImaginaryNode < ::Prism::Node - # def initialize: (Node numeric, Location location) -> void + # def initialize: (FloatNode | IntegerNode | RationalNode numeric, Location location) -> void # # @return [ImaginaryNode] a new instance of ImaginaryNode # - # source://prism//lib/prism/node.rb#8833 + # source://prism//lib/prism/node.rb#8540 + sig do + params( + source: Prism::Source, + numeric: T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode), + location: Prism::Location + ).void + end def initialize(source, numeric, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8841 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#8548 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8846 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#8553 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8856 + # source://prism//lib/prism/node.rb#8563 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8851 + # source://prism//lib/prism/node.rb#8558 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ImaginaryNode + # def copy: (?numeric: FloatNode | IntegerNode | RationalNode, ?location: Location) -> ImaginaryNode # - # source://prism//lib/prism/node.rb#8861 - sig { params(params: T.untyped).returns(Prism::ImaginaryNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#8568 + sig do + params( + numeric: T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode), + location: Prism::Location + ).returns(Prism::ImaginaryNode) + end + def copy(numeric: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8846 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#8553 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { numeric: Node, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { numeric: FloatNode | IntegerNode | RationalNode, location: Location } # - # source://prism//lib/prism/node.rb#8873 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#8576 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#8882 + # source://prism//lib/prism/node.rb#8585 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end - # attr_reader numeric: Node + # attr_reader numeric: FloatNode | IntegerNode | RationalNode # - # source://prism//lib/prism/node.rb#8878 - sig { returns(Prism::Node) } + # source://prism//lib/prism/node.rb#8581 + sig { returns(T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode)) } def numeric; end # Sometimes you want to check an instance of a node against a list of @@ -13882,12 +15350,14 @@ class Prism::ImaginaryNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#8903 + # source://prism//lib/prism/node.rb#8606 + sig { override.returns(Symbol) } def type; end # Returns the value of the node as a Ruby Complex. # - # source://prism//lib/prism/node_ext.rb#69 + # source://prism//lib/prism/node_ext.rb#87 + sig { returns(Complex) } def value; end class << self @@ -13898,7 +15368,7 @@ class Prism::ImaginaryNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#8913 + # source://prism//lib/prism/node.rb#8616 def type; end end end @@ -13914,63 +15384,66 @@ end # foo in { bar: } # ^^^^ # -# source://prism//lib/prism/node.rb#8928 +# source://prism//lib/prism/node.rb#8631 class Prism::ImplicitNode < ::Prism::Node - # def initialize: (Node value, Location location) -> void + # def initialize: (Prism::node value, Location location) -> void # # @return [ImplicitNode] a new instance of ImplicitNode # - # source://prism//lib/prism/node.rb#8930 + # source://prism//lib/prism/node.rb#8633 + sig { params(source: Prism::Source, value: Prism::Node, location: Prism::Location).void } def initialize(source, value, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8938 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#8641 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8943 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#8646 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8953 + # source://prism//lib/prism/node.rb#8656 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8948 + # source://prism//lib/prism/node.rb#8651 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ImplicitNode + # def copy: (?value: Prism::node, ?location: Location) -> ImplicitNode # - # source://prism//lib/prism/node.rb#8958 - sig { params(params: T.untyped).returns(Prism::ImplicitNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#8661 + 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#8943 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#8646 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { value: Node, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#8970 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#8669 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#8979 + # source://prism//lib/prism/node.rb#8678 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of @@ -13988,12 +15461,13 @@ class Prism::ImplicitNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#9000 + # source://prism//lib/prism/node.rb#8699 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#8975 + # source://prism//lib/prism/node.rb#8674 sig { returns(Prism::Node) } def value; end @@ -14005,7 +15479,7 @@ class Prism::ImplicitNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#9010 + # source://prism//lib/prism/node.rb#8709 def type; end end end @@ -14024,63 +15498,66 @@ end # foo, = bar # ^ # -# source://prism//lib/prism/node.rb#9028 +# source://prism//lib/prism/node.rb#8727 class Prism::ImplicitRestNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [ImplicitRestNode] a new instance of ImplicitRestNode # - # source://prism//lib/prism/node.rb#9030 + # source://prism//lib/prism/node.rb#8729 + sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9037 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#8736 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9042 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#8741 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9052 + # source://prism//lib/prism/node.rb#8751 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#9047 + # source://prism//lib/prism/node.rb#8746 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ImplicitRestNode + # def copy: (?location: Location) -> ImplicitRestNode # - # source://prism//lib/prism/node.rb#9057 - sig { params(params: T.untyped).returns(Prism::ImplicitRestNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#8756 + 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#9042 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#8741 + 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#9068 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#8764 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#9074 + # source://prism//lib/prism/node.rb#8770 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of @@ -14098,7 +15575,8 @@ class Prism::ImplicitRestNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#9093 + # source://prism//lib/prism/node.rb#8789 + sig { override.returns(Symbol) } def type; end class << self @@ -14109,7 +15587,7 @@ class Prism::ImplicitRestNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#9103 + # source://prism//lib/prism/node.rb#8799 def type; end end end @@ -14119,98 +15597,118 @@ end # case a; in b then c end # ^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#9112 +# source://prism//lib/prism/node.rb#8808 class Prism::InNode < ::Prism::Node - # def initialize: (Node pattern, StatementsNode? statements, Location in_loc, Location? then_loc, Location location) -> void + # 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#9114 + # source://prism//lib/prism/node.rb#8810 + sig do + params( + source: Prism::Source, + pattern: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + in_loc: Prism::Location, + then_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end def initialize(source, pattern, statements, in_loc, then_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9125 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#8821 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9130 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#8826 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9143 + # source://prism//lib/prism/node.rb#8839 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#9135 + # source://prism//lib/prism/node.rb#8831 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> InNode + # def copy: (?pattern: Prism::node, ?statements: StatementsNode?, ?in_loc: Location, ?then_loc: Location?, ?location: Location) -> InNode # - # source://prism//lib/prism/node.rb#9148 - sig { params(params: T.untyped).returns(Prism::InNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#8844 + sig do + params( + pattern: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + in_loc: Prism::Location, + then_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::InNode) + end + def copy(pattern: T.unsafe(nil), statements: T.unsafe(nil), in_loc: T.unsafe(nil), then_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9130 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#8826 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { pattern: Node, statements: StatementsNode?, in_loc: Location, then_loc: Location?, location: Location } + # 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#9163 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#8852 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def in: () -> String # - # source://prism//lib/prism/node.rb#9193 + # source://prism//lib/prism/node.rb#8884 sig { returns(String) } def in; end # attr_reader in_loc: Location # - # source://prism//lib/prism/node.rb#9174 + # source://prism//lib/prism/node.rb#8863 sig { returns(Prism::Location) } def in_loc; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#9203 + # source://prism//lib/prism/node.rb#8894 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end - # attr_reader pattern: Node + # attr_reader pattern: Prism::node # - # source://prism//lib/prism/node.rb#9168 + # source://prism//lib/prism/node.rb#8857 sig { returns(Prism::Node) } def pattern; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#9171 + # source://prism//lib/prism/node.rb#8860 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # def then: () -> String? # - # source://prism//lib/prism/node.rb#9198 + # source://prism//lib/prism/node.rb#8889 sig { returns(T.nilable(String)) } def then; end # attr_reader then_loc: Location? # - # source://prism//lib/prism/node.rb#9180 + # source://prism//lib/prism/node.rb#8870 sig { returns(T.nilable(Prism::Location)) } def then_loc; end @@ -14229,7 +15727,8 @@ class Prism::InNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#9232 + # source://prism//lib/prism/node.rb#8923 + sig { override.returns(Symbol) } def type; end class << self @@ -14240,7 +15739,7 @@ class Prism::InNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#9242 + # source://prism//lib/prism/node.rb#8933 def type; end end end @@ -14250,24 +15749,39 @@ end # foo.bar[baz] &&= value # ^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#9251 +# source://prism//lib/prism/node.rb#8942 class Prism::IndexAndWriteNode < ::Prism::Node - # def initialize: (Integer flags, Node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Node? block, Location operator_loc, 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, Location operator_loc, Prism::node value, Location location) -> void # # @return [IndexAndWriteNode] a new instance of IndexAndWriteNode # - # source://prism//lib/prism/node.rb#9253 + # source://prism//lib/prism/node.rb#8944 + 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 # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9269 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#8960 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#9344 + # source://prism//lib/prism/node.rb#9025 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end @@ -14275,119 +15789,134 @@ class Prism::IndexAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9376 + # source://prism//lib/prism/node.rb#9059 sig { returns(T::Boolean) } def attribute_write?; end - # attr_reader block: Node? + # attr_reader block: Prism::node? # - # source://prism//lib/prism/node.rb#9353 + # source://prism//lib/prism/node.rb#9035 sig { returns(T.nilable(Prism::Node)) } def block; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#9386 + # source://prism//lib/prism/node.rb#9069 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#9326 + # source://prism//lib/prism/node.rb#9005 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9274 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#8965 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#9396 + # source://prism//lib/prism/node.rb#9079 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#9347 + # source://prism//lib/prism/node.rb#9028 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9289 + # source://prism//lib/prism/node.rb#8980 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#9279 + # source://prism//lib/prism/node.rb#8970 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> IndexAndWriteNode + # 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#9294 - sig { params(params: T.untyped).returns(Prism::IndexAndWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#8985 + sig do + params( + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::Node), + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::IndexAndWriteNode) + end + def copy(flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9274 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#8965 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, operator_loc: Location, value: Node, location: Location } + # 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#9314 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#8993 + sig { params(keys: T.nilable(T::Array[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#9381 + # source://prism//lib/prism/node.rb#9064 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#9406 + # source://prism//lib/prism/node.rb#9089 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String # - # source://prism//lib/prism/node.rb#9391 + # source://prism//lib/prism/node.rb#9074 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#9338 + # source://prism//lib/prism/node.rb#9018 sig { returns(Prism::Location) } def opening_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#9401 + # source://prism//lib/prism/node.rb#9084 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#9356 + # source://prism//lib/prism/node.rb#9038 sig { returns(Prism::Location) } def operator_loc; end - # attr_reader receiver: Node? + # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#9323 + # source://prism//lib/prism/node.rb#9002 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -14395,7 +15924,7 @@ class Prism::IndexAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9366 + # source://prism//lib/prism/node.rb#9049 sig { returns(T::Boolean) } def safe_navigation?; end @@ -14414,12 +15943,13 @@ class Prism::IndexAndWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#9451 + # source://prism//lib/prism/node.rb#9134 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#9362 + # source://prism//lib/prism/node.rb#9045 sig { returns(Prism::Node) } def value; end @@ -14427,7 +15957,7 @@ class Prism::IndexAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9371 + # source://prism//lib/prism/node.rb#9054 sig { returns(T::Boolean) } def variable_call?; end @@ -14435,7 +15965,7 @@ class Prism::IndexAndWriteNode < ::Prism::Node # private attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#9319 + # source://prism//lib/prism/node.rb#8998 sig { returns(Integer) } def flags; end @@ -14447,7 +15977,7 @@ class Prism::IndexAndWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#9461 + # source://prism//lib/prism/node.rb#9144 def type; end end end @@ -14457,24 +15987,40 @@ end # foo.bar[baz] += value # ^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#9470 +# source://prism//lib/prism/node.rb#9153 class Prism::IndexOperatorWriteNode < ::Prism::Node - # def initialize: (Integer flags, Node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Node? block, Symbol operator, Location operator_loc, 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 operator, Location operator_loc, Prism::node value, Location location) -> void # # @return [IndexOperatorWriteNode] a new instance of IndexOperatorWriteNode # - # source://prism//lib/prism/node.rb#9472 + # source://prism//lib/prism/node.rb#9155 + 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: 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 accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9489 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#9172 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#9565 + # source://prism//lib/prism/node.rb#9237 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end @@ -14482,119 +16028,135 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9600 + # source://prism//lib/prism/node.rb#9274 sig { returns(T::Boolean) } def attribute_write?; end - # attr_reader block: Node? + # attr_reader block: Prism::node? # - # source://prism//lib/prism/node.rb#9574 + # source://prism//lib/prism/node.rb#9247 sig { returns(T.nilable(Prism::Node)) } def block; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#9610 + # source://prism//lib/prism/node.rb#9284 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#9547 + # source://prism//lib/prism/node.rb#9217 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9494 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#9177 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#9620 + # source://prism//lib/prism/node.rb#9294 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#9568 + # source://prism//lib/prism/node.rb#9240 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9509 + # source://prism//lib/prism/node.rb#9192 + sig { override.returns(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#9182 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> IndexOperatorWriteNode + # 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#9514 - sig { params(params: T.untyped).returns(Prism::IndexOperatorWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#9197 + 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#9494 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#9177 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, operator: Symbol, operator_loc: Location, value: Node, location: Location } + # 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#9535 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#9205 + sig { params(keys: T.nilable(T::Array[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#9605 + # source://prism//lib/prism/node.rb#9279 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#9625 + # source://prism//lib/prism/node.rb#9299 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String # - # source://prism//lib/prism/node.rb#9615 + # source://prism//lib/prism/node.rb#9289 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#9559 + # source://prism//lib/prism/node.rb#9230 sig { returns(Prism::Location) } def opening_loc; end # attr_reader operator: Symbol # - # source://prism//lib/prism/node.rb#9577 + # source://prism//lib/prism/node.rb#9250 sig { returns(Symbol) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#9580 + # source://prism//lib/prism/node.rb#9253 sig { returns(Prism::Location) } def operator_loc; end - # attr_reader receiver: Node? + # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#9544 + # source://prism//lib/prism/node.rb#9214 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -14602,7 +16164,7 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9590 + # source://prism//lib/prism/node.rb#9264 sig { returns(T::Boolean) } def safe_navigation?; end @@ -14621,12 +16183,13 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#9671 + # source://prism//lib/prism/node.rb#9345 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#9586 + # source://prism//lib/prism/node.rb#9260 sig { returns(Prism::Node) } def value; end @@ -14634,7 +16197,7 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9595 + # source://prism//lib/prism/node.rb#9269 sig { returns(T::Boolean) } def variable_call?; end @@ -14642,7 +16205,7 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # private attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#9540 + # source://prism//lib/prism/node.rb#9210 sig { returns(Integer) } def flags; end @@ -14654,7 +16217,7 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#9681 + # source://prism//lib/prism/node.rb#9355 def type; end end end @@ -14664,24 +16227,39 @@ end # foo.bar[baz] ||= value # ^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#9690 +# source://prism//lib/prism/node.rb#9364 class Prism::IndexOrWriteNode < ::Prism::Node - # def initialize: (Integer flags, Node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Node? block, Location operator_loc, 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, Location operator_loc, Prism::node value, Location location) -> void # # @return [IndexOrWriteNode] a new instance of IndexOrWriteNode # - # source://prism//lib/prism/node.rb#9692 + # source://prism//lib/prism/node.rb#9366 + 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 # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9708 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#9382 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#9783 + # source://prism//lib/prism/node.rb#9447 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end @@ -14689,119 +16267,134 @@ class Prism::IndexOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9815 + # source://prism//lib/prism/node.rb#9481 sig { returns(T::Boolean) } def attribute_write?; end - # attr_reader block: Node? + # attr_reader block: Prism::node? # - # source://prism//lib/prism/node.rb#9792 + # source://prism//lib/prism/node.rb#9457 sig { returns(T.nilable(Prism::Node)) } def block; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#9825 + # source://prism//lib/prism/node.rb#9491 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#9765 + # source://prism//lib/prism/node.rb#9427 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9713 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#9387 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#9835 + # source://prism//lib/prism/node.rb#9501 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#9786 + # source://prism//lib/prism/node.rb#9450 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9728 + # source://prism//lib/prism/node.rb#9402 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#9718 + # source://prism//lib/prism/node.rb#9392 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> IndexOrWriteNode + # 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#9733 - sig { params(params: T.untyped).returns(Prism::IndexOrWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#9407 + sig do + params( + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::Node), + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::IndexOrWriteNode) + end + def copy(flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9713 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#9387 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, operator_loc: Location, value: Node, location: Location } + # 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#9753 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#9415 + sig { params(keys: T.nilable(T::Array[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#9820 + # source://prism//lib/prism/node.rb#9486 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#9845 + # source://prism//lib/prism/node.rb#9511 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String # - # source://prism//lib/prism/node.rb#9830 + # source://prism//lib/prism/node.rb#9496 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#9777 + # source://prism//lib/prism/node.rb#9440 sig { returns(Prism::Location) } def opening_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#9840 + # source://prism//lib/prism/node.rb#9506 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#9795 + # source://prism//lib/prism/node.rb#9460 sig { returns(Prism::Location) } def operator_loc; end - # attr_reader receiver: Node? + # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#9762 + # source://prism//lib/prism/node.rb#9424 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -14809,7 +16402,7 @@ class Prism::IndexOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9805 + # source://prism//lib/prism/node.rb#9471 sig { returns(T::Boolean) } def safe_navigation?; end @@ -14828,12 +16421,13 @@ class Prism::IndexOrWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#9890 + # source://prism//lib/prism/node.rb#9556 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#9801 + # source://prism//lib/prism/node.rb#9467 sig { returns(Prism::Node) } def value; end @@ -14841,7 +16435,7 @@ class Prism::IndexOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9810 + # source://prism//lib/prism/node.rb#9476 sig { returns(T::Boolean) } def variable_call?; end @@ -14849,7 +16443,7 @@ class Prism::IndexOrWriteNode < ::Prism::Node # private attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#9758 + # source://prism//lib/prism/node.rb#9420 sig { returns(Integer) } def flags; end @@ -14861,7 +16455,7 @@ class Prism::IndexOrWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#9900 + # source://prism//lib/prism/node.rb#9566 def type; end end end @@ -14879,24 +16473,36 @@ end # for foo[bar] in baz do end # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#9917 +# source://prism//lib/prism/node.rb#9583 class Prism::IndexTargetNode < ::Prism::Node - # def initialize: (Integer flags, Node receiver, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Node? block, Location location) -> void + # 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#9919 + # source://prism//lib/prism/node.rb#9585 + sig do + params( + source: Prism::Source, + flags: Integer, + receiver: Prism::Node, + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::Node), + location: Prism::Location + ).void + end def initialize(source, flags, receiver, opening_loc, arguments, closing_loc, block, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9932 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#9598 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#9991 + # source://prism//lib/prism/node.rb#9649 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end @@ -14904,95 +16510,107 @@ class Prism::IndexTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10014 + # source://prism//lib/prism/node.rb#9673 sig { returns(T::Boolean) } def attribute_write?; end - # attr_reader block: Node? + # attr_reader block: Prism::node? # - # source://prism//lib/prism/node.rb#10000 + # source://prism//lib/prism/node.rb#9659 sig { returns(T.nilable(Prism::Node)) } def block; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9937 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#9603 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#10029 + # source://prism//lib/prism/node.rb#9688 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#9994 + # source://prism//lib/prism/node.rb#9652 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9951 + # source://prism//lib/prism/node.rb#9617 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#9942 + # source://prism//lib/prism/node.rb#9608 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> IndexTargetNode + # 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#9956 - sig { params(params: T.untyped).returns(Prism::IndexTargetNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#9622 + sig do + params( + flags: Integer, + receiver: Prism::Node, + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::Node), + location: Prism::Location + ).returns(Prism::IndexTargetNode) + end + def copy(flags: T.unsafe(nil), receiver: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9937 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#9603 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Node, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, location: Location } + # 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#9973 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#9630 + sig { params(keys: T.nilable(T::Array[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#10019 + # source://prism//lib/prism/node.rb#9678 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#10034 + # source://prism//lib/prism/node.rb#9693 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String # - # source://prism//lib/prism/node.rb#10024 + # source://prism//lib/prism/node.rb#9683 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#9985 + # source://prism//lib/prism/node.rb#9642 sig { returns(Prism::Location) } def opening_loc; end - # attr_reader receiver: Node + # attr_reader receiver: Prism::node # - # source://prism//lib/prism/node.rb#9982 + # source://prism//lib/prism/node.rb#9639 sig { returns(Prism::Node) } def receiver; end @@ -15000,7 +16618,7 @@ class Prism::IndexTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10004 + # source://prism//lib/prism/node.rb#9663 sig { returns(T::Boolean) } def safe_navigation?; end @@ -15019,14 +16637,15 @@ class Prism::IndexTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#10071 + # source://prism//lib/prism/node.rb#9730 + sig { override.returns(Symbol) } def type; end # def variable_call?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10009 + # source://prism//lib/prism/node.rb#9668 sig { returns(T::Boolean) } def variable_call?; end @@ -15034,7 +16653,7 @@ class Prism::IndexTargetNode < ::Prism::Node # private attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#9978 + # source://prism//lib/prism/node.rb#9635 sig { returns(Integer) } def flags; end @@ -15046,7 +16665,7 @@ class Prism::IndexTargetNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#10081 + # source://prism//lib/prism/node.rb#9740 def type; end end end @@ -15054,11 +16673,12 @@ 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#275 +# source://prism//lib/prism/parse_result.rb#310 class Prism::InlineComment < ::Prism::Comment # Returns a string representation of this comment. # - # source://prism//lib/prism/parse_result.rb#283 + # source://prism//lib/prism/parse_result.rb#318 + sig { returns(String) } def inspect; end # Returns true if this comment happens on the same line as other code and @@ -15066,7 +16686,7 @@ class Prism::InlineComment < ::Prism::Comment # # @return [Boolean] # - # source://prism//lib/prism/parse_result.rb#278 + # source://prism//lib/prism/parse_result.rb#313 sig { override.returns(T::Boolean) } def trailing?; end end @@ -15076,89 +16696,109 @@ end # @target &&= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#10090 +# source://prism//lib/prism/node.rb#9749 class Prism::InstanceVariableAndWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void + # 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#10092 + # source://prism//lib/prism/node.rb#9751 + 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 # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10103 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#9762 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10108 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#9767 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10118 + # source://prism//lib/prism/node.rb#9777 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10113 + # source://prism//lib/prism/node.rb#9772 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> InstanceVariableAndWriteNode + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> InstanceVariableAndWriteNode # - # source://prism//lib/prism/node.rb#10123 - sig { params(params: T.untyped).returns(Prism::InstanceVariableAndWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#9782 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::InstanceVariableAndWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10108 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#9767 + 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: Node, 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#10138 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#9790 + 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#179 + # 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 # - # source://prism//lib/prism/node.rb#10167 + # source://prism//lib/prism/node.rb#9821 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#10143 + # source://prism//lib/prism/node.rb#9795 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#10146 + # source://prism//lib/prism/node.rb#9798 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#10162 + # source://prism//lib/prism/node.rb#9816 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#10152 + # source://prism//lib/prism/node.rb#9805 sig { returns(Prism::Location) } def operator_loc; end @@ -15177,12 +16817,13 @@ class Prism::InstanceVariableAndWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#10191 + # source://prism//lib/prism/node.rb#9845 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#10158 + # source://prism//lib/prism/node.rb#9812 sig { returns(Prism::Node) } def value; end @@ -15194,7 +16835,7 @@ class Prism::InstanceVariableAndWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#10201 + # source://prism//lib/prism/node.rb#9855 def type; end end end @@ -15204,89 +16845,111 @@ end # @target += value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#10210 +# source://prism//lib/prism/node.rb#9864 class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Symbol operator, Location location) -> void + # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Symbol operator, Location location) -> void # # @return [InstanceVariableOperatorWriteNode] a new instance of InstanceVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#10212 + # source://prism//lib/prism/node.rb#9866 + 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 # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10224 - sig { params(visitor: Prism::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#10229 - sig { returns(T::Array[T.nilable(Prism::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#10239 + # 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#10234 + # source://prism//lib/prism/node.rb#9888 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> InstanceVariableOperatorWriteNode + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?operator: Symbol, ?location: Location) -> InstanceVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#10244 - sig { params(params: T.untyped).returns(Prism::InstanceVariableOperatorWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#9898 + 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 # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10229 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # 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: Node, operator: Symbol, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, operator: Symbol, location: Location } # - # source://prism//lib/prism/node.rb#10260 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # 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#191 + # 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 # - # source://prism//lib/prism/node.rb#10287 + # source://prism//lib/prism/node.rb#9935 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#10265 + # source://prism//lib/prism/node.rb#9911 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#10268 + # source://prism//lib/prism/node.rb#9914 sig { returns(Prism::Location) } def name_loc; end # attr_reader operator: Symbol # - # source://prism//lib/prism/node.rb#10283 + # source://prism//lib/prism/node.rb#9931 sig { returns(Symbol) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#10274 + # source://prism//lib/prism/node.rb#9921 sig { returns(Prism::Location) } def operator_loc; end @@ -15305,12 +16968,13 @@ class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#10312 + # source://prism//lib/prism/node.rb#9960 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#10280 + # source://prism//lib/prism/node.rb#9928 sig { returns(Prism::Node) } def value; end @@ -15322,7 +16986,7 @@ class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#10322 + # source://prism//lib/prism/node.rb#9970 def type; end end end @@ -15332,89 +16996,109 @@ end # @target ||= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#10331 +# source://prism//lib/prism/node.rb#9979 class Prism::InstanceVariableOrWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void + # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void # # @return [InstanceVariableOrWriteNode] a new instance of InstanceVariableOrWriteNode # - # source://prism//lib/prism/node.rb#10333 + # source://prism//lib/prism/node.rb#9981 + 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 # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10344 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#9992 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10349 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#9997 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10359 + # source://prism//lib/prism/node.rb#10007 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10354 + # source://prism//lib/prism/node.rb#10002 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> InstanceVariableOrWriteNode + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> InstanceVariableOrWriteNode # - # source://prism//lib/prism/node.rb#10364 - sig { params(params: T.untyped).returns(Prism::InstanceVariableOrWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#10012 + 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#10349 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#9997 + 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: Node, 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#10379 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#10020 + 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#185 + # 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 # - # source://prism//lib/prism/node.rb#10408 + # source://prism//lib/prism/node.rb#10051 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#10384 + # source://prism//lib/prism/node.rb#10025 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#10387 + # source://prism//lib/prism/node.rb#10028 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#10403 + # source://prism//lib/prism/node.rb#10046 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#10393 + # source://prism//lib/prism/node.rb#10035 sig { returns(Prism::Location) } def operator_loc; end @@ -15433,12 +17117,13 @@ class Prism::InstanceVariableOrWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#10432 + # source://prism//lib/prism/node.rb#10075 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#10399 + # source://prism//lib/prism/node.rb#10042 sig { returns(Prism::Node) } def value; end @@ -15450,7 +17135,7 @@ class Prism::InstanceVariableOrWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#10442 + # source://prism//lib/prism/node.rb#10085 def type; end end end @@ -15460,63 +17145,66 @@ end # @foo # ^^^^ # -# source://prism//lib/prism/node.rb#10451 +# source://prism//lib/prism/node.rb#10094 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#10453 + # source://prism//lib/prism/node.rb#10096 + sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } def initialize(source, name, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10461 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#10104 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10466 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#10109 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10476 + # source://prism//lib/prism/node.rb#10119 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10471 + # source://prism//lib/prism/node.rb#10114 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> InstanceVariableReadNode + # def copy: (?name: Symbol, ?location: Location) -> InstanceVariableReadNode # - # source://prism//lib/prism/node.rb#10481 - sig { params(params: T.untyped).returns(Prism::InstanceVariableReadNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#10124 + 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#10466 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#10109 + 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#10493 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#10132 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#10506 + # source://prism//lib/prism/node.rb#10145 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); 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). @@ -15525,7 +17213,7 @@ class Prism::InstanceVariableReadNode < ::Prism::Node # # @_test # name `:@_test` # - # source://prism//lib/prism/node.rb#10502 + # source://prism//lib/prism/node.rb#10141 sig { returns(Symbol) } def name; end @@ -15544,7 +17232,8 @@ class Prism::InstanceVariableReadNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#10526 + # source://prism//lib/prism/node.rb#10165 + sig { override.returns(Symbol) } def type; end class << self @@ -15555,7 +17244,7 @@ class Prism::InstanceVariableReadNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#10536 + # source://prism//lib/prism/node.rb#10175 def type; end end end @@ -15565,68 +17254,71 @@ end # @foo, @bar = baz # ^^^^ ^^^^ # -# source://prism//lib/prism/node.rb#10545 +# source://prism//lib/prism/node.rb#10184 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#10547 + # source://prism//lib/prism/node.rb#10186 + sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } def initialize(source, name, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10555 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#10194 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10560 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#10199 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10570 + # source://prism//lib/prism/node.rb#10209 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10565 + # source://prism//lib/prism/node.rb#10204 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> InstanceVariableTargetNode + # def copy: (?name: Symbol, ?location: Location) -> InstanceVariableTargetNode # - # source://prism//lib/prism/node.rb#10575 - sig { params(params: T.untyped).returns(Prism::InstanceVariableTargetNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#10214 + 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#10560 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#10199 + 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#10587 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#10222 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#10596 + # source://prism//lib/prism/node.rb#10231 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#10592 + # source://prism//lib/prism/node.rb#10227 sig { returns(Symbol) } def name; end @@ -15645,7 +17337,8 @@ class Prism::InstanceVariableTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#10616 + # source://prism//lib/prism/node.rb#10251 + sig { override.returns(Symbol) } def type; end class << self @@ -15656,7 +17349,7 @@ class Prism::InstanceVariableTargetNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#10626 + # source://prism//lib/prism/node.rb#10261 def type; end end end @@ -15666,86 +17359,116 @@ end # @foo = 1 # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#10635 +# source://prism//lib/prism/node.rb#10270 class Prism::InstanceVariableWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Node value, Location operator_loc, Location location) -> void + # 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#10637 + # source://prism//lib/prism/node.rb#10272 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, name, name_loc, value, operator_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10648 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#10283 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10653 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#10288 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10663 + # source://prism//lib/prism/node.rb#10298 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10658 + # source://prism//lib/prism/node.rb#10293 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> InstanceVariableWriteNode + # def copy: (?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location, ?location: Location) -> InstanceVariableWriteNode # - # source://prism//lib/prism/node.rb#10668 - sig { params(params: T.untyped).returns(Prism::InstanceVariableWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#10303 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::InstanceVariableWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10653 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#10288 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location } + # 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#10683 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#10311 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#10712 + # source://prism//lib/prism/node.rb#10359 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end - # attr_reader name: Symbol + # The name of the instance variable, which is a `@` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). + # + # @x = :y # name `:@x` # - # source://prism//lib/prism/node.rb#10688 + # @_foo = "bar" # name `@_foo` + # + # source://prism//lib/prism/node.rb#10320 sig { returns(Symbol) } def name; end - # attr_reader name_loc: Location + # The location of the variable name. # - # source://prism//lib/prism/node.rb#10691 + # @_x = 1 + # ^^^ + # + # source://prism//lib/prism/node.rb#10326 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#10707 + # source://prism//lib/prism/node.rb#10354 sig { returns(String) } def operator; end - # attr_reader operator_loc: Location + # The location of the `=` operator. # - # source://prism//lib/prism/node.rb#10700 + # @x = y + # ^ + # + # source://prism//lib/prism/node.rb#10346 sig { returns(Prism::Location) } def operator_loc; end @@ -15764,12 +17487,20 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#10736 + # source://prism//lib/prism/node.rb#10383 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # The value to assign to the instance variable. Can be any node that + # represents a non-void expression. + # + # @foo = :bar + # ^^^^ # - # source://prism//lib/prism/node.rb#10697 + # @_x = 1234 + # ^^^^ + # + # source://prism//lib/prism/node.rb#10340 sig { returns(Prism::Node) } def value; end @@ -15781,34 +17512,34 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#10746 + # source://prism//lib/prism/node.rb#10393 def type; end end end # Flags for integer nodes that correspond to the base of the integer. # -# source://prism//lib/prism/node.rb#19277 +# source://prism//lib/prism/node.rb#18866 module Prism::IntegerBaseFlags; end # 0b prefix # -# source://prism//lib/prism/node.rb#19279 +# source://prism//lib/prism/node.rb#18868 Prism::IntegerBaseFlags::BINARY = T.let(T.unsafe(nil), Integer) # 0d or no prefix # -# source://prism//lib/prism/node.rb#19282 +# source://prism//lib/prism/node.rb#18871 Prism::IntegerBaseFlags::DECIMAL = T.let(T.unsafe(nil), Integer) # 0x prefix # -# source://prism//lib/prism/node.rb#19288 +# source://prism//lib/prism/node.rb#18877 Prism::IntegerBaseFlags::HEXADECIMAL = T.let(T.unsafe(nil), Integer) # 0o or 0 prefix # -# source://prism//lib/prism/node.rb#19285 +# source://prism//lib/prism/node.rb#18874 Prism::IntegerBaseFlags::OCTAL = T.let(T.unsafe(nil), Integer) # Represents an integer number literal. @@ -15816,94 +17547,97 @@ Prism::IntegerBaseFlags::OCTAL = T.let(T.unsafe(nil), Integer) # 1 # ^ # -# source://prism//lib/prism/node.rb#10755 +# source://prism//lib/prism/node.rb#10402 class Prism::IntegerNode < ::Prism::Node - # def initialize: (Integer flags, Location location) -> void + # def initialize: (Integer flags, Integer value, Location location) -> void # # @return [IntegerNode] a new instance of IntegerNode # - # source://prism//lib/prism/node.rb#10757 - def initialize(source, flags, location); end + # source://prism//lib/prism/node.rb#10404 + sig { params(source: Prism::Source, flags: Integer, value: Integer, location: Prism::Location).void } + def initialize(source, flags, value, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10765 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#10413 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def binary?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10807 + # source://prism//lib/prism/node.rb#10454 sig { returns(T::Boolean) } def binary?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10770 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#10418 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10780 + # source://prism//lib/prism/node.rb#10428 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10775 + # source://prism//lib/prism/node.rb#10423 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> IntegerNode + # def copy: (?flags: Integer, ?value: Integer, ?location: Location) -> IntegerNode # - # source://prism//lib/prism/node.rb#10785 - sig { params(params: T.untyped).returns(Prism::IntegerNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#10433 + sig { params(flags: Integer, value: Integer, location: Prism::Location).returns(Prism::IntegerNode) } + def copy(flags: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end # def decimal?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10812 + # source://prism//lib/prism/node.rb#10459 sig { returns(T::Boolean) } def decimal?; end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10770 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#10418 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, value: Integer, location: Location } # - # source://prism//lib/prism/node.rb#10797 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#10441 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def hexadecimal?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10822 + # source://prism//lib/prism/node.rb#10469 sig { returns(T::Boolean) } def hexadecimal?; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#10827 + # source://prism//lib/prism/node.rb#10474 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def octal?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10817 + # source://prism//lib/prism/node.rb#10464 sig { returns(T::Boolean) } def octal?; end @@ -15922,19 +17656,21 @@ class Prism::IntegerNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#10848 + # source://prism//lib/prism/node.rb#10496 + sig { override.returns(Symbol) } def type; end - # Returns the value of the node as a Ruby Integer. + # The value of the integer literal as a number. # - # source://prism//lib/prism/node_ext.rb#76 + # source://prism//lib/prism/node.rb#10450 + sig { returns(Integer) } def value; end private # private attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#10802 + # source://prism//lib/prism/node.rb#10446 sig { returns(Integer) } def flags; end @@ -15946,7 +17682,7 @@ class Prism::IntegerNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#10858 + # source://prism//lib/prism/node.rb#10506 def type; end end end @@ -15956,87 +17692,103 @@ end # if /foo #{bar} baz/ then end # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#10867 +# source://prism//lib/prism/node.rb#10515 class Prism::InterpolatedMatchLastLineNode < ::Prism::Node include ::Prism::RegularExpressionOptions - # def initialize: (Integer flags, Location opening_loc, Array[Node] parts, Location closing_loc, Location location) -> void + # def initialize: (Integer flags, Location opening_loc, Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] parts, Location closing_loc, Location location) -> void # # @return [InterpolatedMatchLastLineNode] a new instance of InterpolatedMatchLastLineNode # - # source://prism//lib/prism/node.rb#10869 + # source://prism//lib/prism/node.rb#10517 + sig do + params( + source: Prism::Source, + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, flags, opening_loc, parts, closing_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10880 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#10528 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def ascii_8bit?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10970 + # source://prism//lib/prism/node.rb#10613 sig { returns(T::Boolean) } def ascii_8bit?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10890 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#10538 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#11005 + # source://prism//lib/prism/node.rb#10648 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#10938 + # source://prism//lib/prism/node.rb#10580 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10900 + # source://prism//lib/prism/node.rb#10548 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10895 + # source://prism//lib/prism/node.rb#10543 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> InterpolatedMatchLastLineNode + # def copy: (?flags: Integer, ?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location, ?location: Location) -> InterpolatedMatchLastLineNode # - # source://prism//lib/prism/node.rb#10905 - sig { params(params: T.untyped).returns(Prism::InterpolatedMatchLastLineNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#10553 + sig do + params( + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::InterpolatedMatchLastLineNode) + end + def copy(flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10890 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#10538 + 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[Node], closing_loc: Location, location: Location } + # 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#10920 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#10561 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def euc_jp?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10965 + # source://prism//lib/prism/node.rb#10608 sig { returns(T::Boolean) } def euc_jp?; end @@ -16044,15 +17796,18 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10950 + # source://prism//lib/prism/node.rb#10593 sig { returns(T::Boolean) } def extended?; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def forced_binary_encoding?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10990 + # source://prism//lib/prism/node.rb#10633 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -16060,7 +17815,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10995 + # source://prism//lib/prism/node.rb#10638 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end @@ -16068,7 +17823,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10985 + # source://prism//lib/prism/node.rb#10628 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -16076,20 +17831,21 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10945 + # source://prism//lib/prism/node.rb#10588 sig { returns(T::Boolean) } def ignore_case?; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#11010 + # source://prism//lib/prism/node.rb#10653 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def multi_line?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10955 + # source://prism//lib/prism/node.rb#10598 sig { returns(T::Boolean) } def multi_line?; end @@ -16097,29 +17853,32 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10960 + # source://prism//lib/prism/node.rb#10603 sig { returns(T::Boolean) } def once?; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#11000 + # source://prism//lib/prism/node.rb#10643 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#10929 + # source://prism//lib/prism/node.rb#10570 sig { returns(Prism::Location) } def opening_loc; end - # attr_reader parts: Array[Node] + sig { returns(Integer) } + def options; end + + # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] # - # source://prism//lib/prism/node.rb#10935 - sig { returns(T::Array[Prism::Node]) } + # source://prism//lib/prism/node.rb#10577 + sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } def parts; end - # source://prism//lib/prism/node.rb#10884 + # source://prism//lib/prism/node.rb#10532 def set_newline_flag(newline_marked); end # Sometimes you want to check an instance of a node against a list of @@ -16137,14 +17896,15 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#11034 + # source://prism//lib/prism/node.rb#10677 + sig { override.returns(Symbol) } def type; end # def utf_8?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10980 + # source://prism//lib/prism/node.rb#10623 sig { returns(T::Boolean) } def utf_8?; end @@ -16152,7 +17912,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10975 + # source://prism//lib/prism/node.rb#10618 sig { returns(T::Boolean) } def windows_31j?; end @@ -16160,7 +17920,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # private attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#10925 + # source://prism//lib/prism/node.rb#10566 sig { returns(Integer) } def flags; end @@ -16172,7 +17932,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#11044 + # source://prism//lib/prism/node.rb#10687 def type; end end end @@ -16182,87 +17942,103 @@ end # /foo #{bar} baz/ # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11053 +# source://prism//lib/prism/node.rb#10696 class Prism::InterpolatedRegularExpressionNode < ::Prism::Node include ::Prism::RegularExpressionOptions - # def initialize: (Integer flags, Location opening_loc, Array[Node] parts, Location closing_loc, Location location) -> void + # def initialize: (Integer flags, Location opening_loc, Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] parts, Location closing_loc, Location location) -> void # # @return [InterpolatedRegularExpressionNode] a new instance of InterpolatedRegularExpressionNode # - # source://prism//lib/prism/node.rb#11055 + # source://prism//lib/prism/node.rb#10698 + sig do + params( + source: Prism::Source, + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, flags, opening_loc, parts, closing_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11066 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#10709 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def ascii_8bit?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11156 + # source://prism//lib/prism/node.rb#10794 sig { returns(T::Boolean) } def ascii_8bit?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11076 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#10719 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#11191 + # source://prism//lib/prism/node.rb#10829 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#11124 + # source://prism//lib/prism/node.rb#10761 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11086 + # source://prism//lib/prism/node.rb#10729 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11081 + # source://prism//lib/prism/node.rb#10724 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> InterpolatedRegularExpressionNode + # def copy: (?flags: Integer, ?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location, ?location: Location) -> InterpolatedRegularExpressionNode # - # source://prism//lib/prism/node.rb#11091 - sig { params(params: T.untyped).returns(Prism::InterpolatedRegularExpressionNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#10734 + sig do + params( + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::InterpolatedRegularExpressionNode) + end + def copy(flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11076 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#10719 + 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[Node], closing_loc: Location, location: Location } + # 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#11106 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#10742 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def euc_jp?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11151 + # source://prism//lib/prism/node.rb#10789 sig { returns(T::Boolean) } def euc_jp?; end @@ -16270,15 +18046,18 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11136 + # source://prism//lib/prism/node.rb#10774 sig { returns(T::Boolean) } def extended?; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def forced_binary_encoding?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11176 + # source://prism//lib/prism/node.rb#10814 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -16286,7 +18065,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11181 + # source://prism//lib/prism/node.rb#10819 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end @@ -16294,7 +18073,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11171 + # source://prism//lib/prism/node.rb#10809 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -16302,20 +18081,21 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11131 + # source://prism//lib/prism/node.rb#10769 sig { returns(T::Boolean) } def ignore_case?; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#11196 + # source://prism//lib/prism/node.rb#10834 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def multi_line?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11141 + # source://prism//lib/prism/node.rb#10779 sig { returns(T::Boolean) } def multi_line?; end @@ -16323,29 +18103,32 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11146 + # source://prism//lib/prism/node.rb#10784 sig { returns(T::Boolean) } def once?; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#11186 + # source://prism//lib/prism/node.rb#10824 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#11115 + # source://prism//lib/prism/node.rb#10751 sig { returns(Prism::Location) } def opening_loc; end - # attr_reader parts: Array[Node] + sig { returns(Integer) } + def options; end + + # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] # - # source://prism//lib/prism/node.rb#11121 - sig { returns(T::Array[Prism::Node]) } + # source://prism//lib/prism/node.rb#10758 + sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } def parts; end - # source://prism//lib/prism/node.rb#11070 + # source://prism//lib/prism/node.rb#10713 def set_newline_flag(newline_marked); end # Sometimes you want to check an instance of a node against a list of @@ -16363,14 +18146,15 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#11220 + # source://prism//lib/prism/node.rb#10858 + sig { override.returns(Symbol) } def type; end # def utf_8?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11166 + # source://prism//lib/prism/node.rb#10804 sig { returns(T::Boolean) } def utf_8?; end @@ -16378,7 +18162,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11161 + # source://prism//lib/prism/node.rb#10799 sig { returns(T::Boolean) } def windows_31j?; end @@ -16386,7 +18170,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # private attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#11111 + # source://prism//lib/prism/node.rb#10747 sig { returns(Integer) } def flags; end @@ -16398,7 +18182,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#11230 + # source://prism//lib/prism/node.rb#10868 def type; end end end @@ -16408,98 +18192,139 @@ end # "foo #{bar} baz" # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11239 +# source://prism//lib/prism/node.rb#10877 class Prism::InterpolatedStringNode < ::Prism::Node include ::Prism::HeredocQuery - # def initialize: (Location? opening_loc, Array[Node] parts, Location? closing_loc, Location location) -> void + # def initialize: (Integer flags, Location? opening_loc, Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode] parts, Location? closing_loc, Location location) -> void # # @return [InterpolatedStringNode] a new instance of InterpolatedStringNode # - # source://prism//lib/prism/node.rb#11241 - def initialize(source, opening_loc, parts, closing_loc, location); end + # source://prism//lib/prism/node.rb#10879 + sig do + params( + source: Prism::Source, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode, Prism::InterpolatedStringNode)], + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(source, flags, opening_loc, parts, closing_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11251 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#10890 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11261 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#10900 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#11328 + # source://prism//lib/prism/node.rb#10977 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#11310 + # source://prism//lib/prism/node.rb#10948 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11271 + # source://prism//lib/prism/node.rb#10910 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11266 + # source://prism//lib/prism/node.rb#10905 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> InterpolatedStringNode + # 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#11276 - sig { params(params: T.untyped).returns(Prism::InterpolatedStringNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#10915 + sig do + params( + flags: Integer, + opening_loc: T.nilable(Prism::Location), + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode, Prism::InterpolatedStringNode)], + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::InterpolatedStringNode) + end + def copy(flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11261 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#10900 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location?, parts: Array[Node], closing_loc: Location?, location: Location } + # 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#11290 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#10923 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def frozen?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10962 + sig { returns(T::Boolean) } + def frozen?; end + + sig { returns(T::Boolean) } + def heredoc?; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#11333 + # source://prism//lib/prism/node.rb#10982 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end - # def opening: () -> String? + # def mutable?: () -> bool # - # source://prism//lib/prism/node.rb#11323 - sig { returns(T.nilable(String)) } - def opening; end + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10967 + sig { returns(T::Boolean) } + def mutable?; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#10972 + sig { returns(T.nilable(String)) } + def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#11295 + # source://prism//lib/prism/node.rb#10932 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end - # attr_reader parts: Array[Node] + # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode] # - # source://prism//lib/prism/node.rb#11307 - sig { returns(T::Array[Prism::Node]) } + # source://prism//lib/prism/node.rb#10945 + 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#11255 + # source://prism//lib/prism/node.rb#10894 def set_newline_flag(newline_marked); end # Sometimes you want to check an instance of a node against a list of @@ -16517,9 +18342,18 @@ class Prism::InterpolatedStringNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#11355 + # source://prism//lib/prism/node.rb#11006 + sig { override.returns(Symbol) } def type; end + private + + # private attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#10928 + 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. @@ -16528,106 +18362,135 @@ class Prism::InterpolatedStringNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#11365 + # source://prism//lib/prism/node.rb#11016 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#18881 +module Prism::InterpolatedStringNodeFlags; end + +# source://prism//lib/prism/node.rb#18883 +Prism::InterpolatedStringNodeFlags::FROZEN = T.let(T.unsafe(nil), Integer) + +# source://prism//lib/prism/node.rb#18886 +Prism::InterpolatedStringNodeFlags::MUTABLE = T.let(T.unsafe(nil), Integer) + # Represents a symbol literal that contains interpolation. # # :"foo #{bar} baz" # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11374 +# source://prism//lib/prism/node.rb#11025 class Prism::InterpolatedSymbolNode < ::Prism::Node - # def initialize: (Location? opening_loc, Array[Node] parts, Location? closing_loc, Location location) -> void + # 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#11376 + # source://prism//lib/prism/node.rb#11027 + sig do + params( + source: Prism::Source, + opening_loc: T.nilable(Prism::Location), + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end def initialize(source, opening_loc, parts, closing_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11386 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#11037 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11396 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#11047 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#11463 + # source://prism//lib/prism/node.rb#11110 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#11445 + # source://prism//lib/prism/node.rb#11091 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11406 + # source://prism//lib/prism/node.rb#11057 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11401 + # source://prism//lib/prism/node.rb#11052 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> InterpolatedSymbolNode + # def copy: (?opening_loc: Location?, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location?, ?location: Location) -> InterpolatedSymbolNode # - # source://prism//lib/prism/node.rb#11411 - sig { params(params: T.untyped).returns(Prism::InterpolatedSymbolNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#11062 + sig do + params( + opening_loc: T.nilable(Prism::Location), + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::InterpolatedSymbolNode) + end + def copy(opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11396 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#11047 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location?, parts: Array[Node], closing_loc: Location?, location: Location } + # 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#11425 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#11070 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#11468 + # source://prism//lib/prism/node.rb#11115 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#11458 + # source://prism//lib/prism/node.rb#11105 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#11430 + # source://prism//lib/prism/node.rb#11075 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end - # attr_reader parts: Array[Node] + # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] # - # source://prism//lib/prism/node.rb#11442 - sig { returns(T::Array[Prism::Node]) } + # source://prism//lib/prism/node.rb#11088 + sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } def parts; end - # source://prism//lib/prism/node.rb#11390 + # source://prism//lib/prism/node.rb#11041 def set_newline_flag(newline_marked); end # Sometimes you want to check an instance of a node against a list of @@ -16645,7 +18508,8 @@ class Prism::InterpolatedSymbolNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#11490 + # source://prism//lib/prism/node.rb#11137 + sig { override.returns(Symbol) } def type; end class << self @@ -16656,7 +18520,7 @@ class Prism::InterpolatedSymbolNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#11500 + # source://prism//lib/prism/node.rb#11147 def type; end end end @@ -16666,98 +18530,119 @@ end # `foo #{bar} baz` # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11509 +# source://prism//lib/prism/node.rb#11156 class Prism::InterpolatedXStringNode < ::Prism::Node include ::Prism::HeredocQuery - # def initialize: (Location opening_loc, Array[Node] parts, Location closing_loc, Location location) -> void + # def initialize: (Location opening_loc, Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] parts, Location closing_loc, Location location) -> void # # @return [InterpolatedXStringNode] a new instance of InterpolatedXStringNode # - # source://prism//lib/prism/node.rb#11511 + # source://prism//lib/prism/node.rb#11158 + sig do + params( + source: Prism::Source, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, opening_loc, parts, closing_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11521 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#11168 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11531 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#11178 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#11586 + # source://prism//lib/prism/node.rb#11229 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#11574 + # source://prism//lib/prism/node.rb#11216 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11541 + # source://prism//lib/prism/node.rb#11188 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11536 + # source://prism//lib/prism/node.rb#11183 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> InterpolatedXStringNode + # def copy: (?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location, ?location: Location) -> InterpolatedXStringNode # - # source://prism//lib/prism/node.rb#11546 - sig { params(params: T.untyped).returns(Prism::InterpolatedXStringNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#11193 + sig do + params( + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::InterpolatedXStringNode) + end + def copy(opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11531 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#11178 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location, parts: Array[Node], closing_loc: Location, location: Location } + # 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#11560 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#11201 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + sig { returns(T::Boolean) } + def heredoc?; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#11591 + # source://prism//lib/prism/node.rb#11234 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String # - # source://prism//lib/prism/node.rb#11581 + # source://prism//lib/prism/node.rb#11224 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#11565 + # source://prism//lib/prism/node.rb#11206 sig { returns(Prism::Location) } def opening_loc; end - # attr_reader parts: Array[Node] + # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] # - # source://prism//lib/prism/node.rb#11571 - sig { returns(T::Array[Prism::Node]) } + # source://prism//lib/prism/node.rb#11213 + sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } def parts; end - # source://prism//lib/prism/node.rb#11525 + # source://prism//lib/prism/node.rb#11172 def set_newline_flag(newline_marked); end # Sometimes you want to check an instance of a node against a list of @@ -16775,7 +18660,107 @@ class Prism::InterpolatedXStringNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#11613 + # source://prism//lib/prism/node.rb#11256 + 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#11266 + def type; end + end +end + +# Represents an implicit set of parameters through the use of the `it` keyword within a block or lambda. +# +# -> { it + it } +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#11275 +class Prism::ItParametersNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [ItParametersNode] a new instance of ItParametersNode + # + # source://prism//lib/prism/node.rb#11277 + sig { params(source: Prism::Source, location: Prism::Location).void } + def initialize(source, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11284 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11289 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11299 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11294 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?location: Location) -> ItParametersNode + # + # source://prism//lib/prism/node.rb#11304 + 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#11289 + 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#11312 + sig { params(keys: T.nilable(T::Array[Symbol])).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 + # + # source://prism//lib/prism/node.rb#11318 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11337 + sig { override.returns(Symbol) } def type; end class << self @@ -16786,7 +18771,7 @@ class Prism::InterpolatedXStringNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#11623 + # source://prism//lib/prism/node.rb#11347 def type; end end end @@ -16796,76 +18781,92 @@ end # foo(a: b) # ^^^^ # -# source://prism//lib/prism/node.rb#11632 +# source://prism//lib/prism/node.rb#11356 class Prism::KeywordHashNode < ::Prism::Node - # def initialize: (Integer flags, Array[Node] elements, Location location) -> void + # def initialize: (Integer flags, Array[AssocNode | AssocSplatNode] elements, Location location) -> void # # @return [KeywordHashNode] a new instance of KeywordHashNode # - # source://prism//lib/prism/node.rb#11634 + # source://prism//lib/prism/node.rb#11358 + sig do + params( + source: Prism::Source, + flags: Integer, + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)], + location: Prism::Location + ).void + end def initialize(source, flags, elements, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11643 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#11367 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11648 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#11372 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11658 + # source://prism//lib/prism/node.rb#11382 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11653 + # source://prism//lib/prism/node.rb#11377 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> KeywordHashNode + # def copy: (?flags: Integer, ?elements: Array[AssocNode | AssocSplatNode], ?location: Location) -> KeywordHashNode # - # source://prism//lib/prism/node.rb#11663 - sig { params(params: T.untyped).returns(Prism::KeywordHashNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#11387 + sig do + params( + flags: Integer, + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)], + location: Prism::Location + ).returns(Prism::KeywordHashNode) + end + def copy(flags: T.unsafe(nil), elements: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11648 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#11372 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, elements: Array[Node], location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, elements: Array[AssocNode | AssocSplatNode], location: Location } # - # source://prism//lib/prism/node.rb#11676 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#11395 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # attr_reader elements: Array[Node] + # attr_reader elements: Array[AssocNode | AssocSplatNode] # - # source://prism//lib/prism/node.rb#11685 - sig { returns(T::Array[Prism::Node]) } + # source://prism//lib/prism/node.rb#11404 + 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 # - # source://prism//lib/prism/node.rb#11694 + # source://prism//lib/prism/node.rb#11413 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def symbol_keys?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11689 + # source://prism//lib/prism/node.rb#11408 sig { returns(T::Boolean) } def symbol_keys?; end @@ -16884,14 +18885,15 @@ class Prism::KeywordHashNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#11716 + # source://prism//lib/prism/node.rb#11435 + sig { override.returns(Symbol) } def type; end private # private attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#11681 + # source://prism//lib/prism/node.rb#11400 sig { returns(Integer) } def flags; end @@ -16903,19 +18905,19 @@ class Prism::KeywordHashNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#11726 + # source://prism//lib/prism/node.rb#11445 def type; end end end # Flags for keyword hash nodes. # -# source://prism//lib/prism/node.rb#19292 +# source://prism//lib/prism/node.rb#18890 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#19294 +# source://prism//lib/prism/node.rb#18892 Prism::KeywordHashNodeFlags::SYMBOL_KEYS = T.let(T.unsafe(nil), Integer) # Represents a keyword rest parameter to a method, block, or lambda definition. @@ -16924,86 +18926,106 @@ Prism::KeywordHashNodeFlags::SYMBOL_KEYS = T.let(T.unsafe(nil), Integer) # ^^^ # end # -# source://prism//lib/prism/node.rb#11736 +# source://prism//lib/prism/node.rb#11455 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#11738 + # source://prism//lib/prism/node.rb#11457 + sig do + params( + source: Prism::Source, + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, flags, name, name_loc, operator_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11749 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#11468 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11754 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#11473 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11764 + # source://prism//lib/prism/node.rb#11483 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11759 + # source://prism//lib/prism/node.rb#11478 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> KeywordRestParameterNode + # def copy: (?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location, ?location: Location) -> KeywordRestParameterNode # - # source://prism//lib/prism/node.rb#11769 - sig { params(params: T.untyped).returns(Prism::KeywordRestParameterNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#11488 + sig do + params( + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::KeywordRestParameterNode) + end + def copy(flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11754 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#11473 + 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#11784 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#11496 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#11825 + # source://prism//lib/prism/node.rb#11539 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol? # - # source://prism//lib/prism/node.rb#11793 + # source://prism//lib/prism/node.rb#11505 sig { returns(T.nilable(Symbol)) } def name; end # attr_reader name_loc: Location? # - # source://prism//lib/prism/node.rb#11796 + # source://prism//lib/prism/node.rb#11508 sig { returns(T.nilable(Prism::Location)) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#11820 + # source://prism//lib/prism/node.rb#11534 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#11808 + # source://prism//lib/prism/node.rb#11521 sig { returns(Prism::Location) } def operator_loc; end @@ -17011,7 +19033,7 @@ class Prism::KeywordRestParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11815 + # source://prism//lib/prism/node.rb#11529 sig { returns(T::Boolean) } def repeated_parameter?; end @@ -17030,14 +19052,15 @@ class Prism::KeywordRestParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#11853 + # source://prism//lib/prism/node.rb#11567 + sig { override.returns(Symbol) } def type; end private # private attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#11789 + # source://prism//lib/prism/node.rb#11501 sig { returns(Integer) } def flags; end @@ -17049,7 +19072,7 @@ class Prism::KeywordRestParameterNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#11863 + # source://prism//lib/prism/node.rb#11577 def type; end end end @@ -17059,116 +19082,140 @@ end # ->(value) { value * 2 } # ^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11872 +# source://prism//lib/prism/node.rb#11586 class Prism::LambdaNode < ::Prism::Node - # def initialize: (Array[Symbol] locals, Location operator_loc, Location opening_loc, Location closing_loc, Node? parameters, Node? body, Location location) -> void + # 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#11874 + # source://prism//lib/prism/node.rb#11588 + sig do + params( + source: Prism::Source, + locals: T::Array[Symbol], + operator_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location, + parameters: T.nilable(Prism::Node), + body: T.nilable(Prism::Node), + location: Prism::Location + ).void + end def initialize(source, locals, operator_loc, opening_loc, closing_loc, parameters, body, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11887 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#11601 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # attr_reader body: Node? + # attr_reader body: Prism::node? # - # source://prism//lib/prism/node.rb#11956 + # source://prism//lib/prism/node.rb#11664 sig { returns(T.nilable(Prism::Node)) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11892 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#11606 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#11970 + # source://prism//lib/prism/node.rb#11678 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#11947 + # source://prism//lib/prism/node.rb#11654 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11905 + # source://prism//lib/prism/node.rb#11619 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11897 + # source://prism//lib/prism/node.rb#11611 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> LambdaNode + # 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#11910 - sig { params(params: T.untyped).returns(Prism::LambdaNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#11624 + sig do + params( + locals: T::Array[Symbol], + operator_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location, + parameters: T.nilable(Prism::Node), + body: T.nilable(Prism::Node), + location: Prism::Location + ).returns(Prism::LambdaNode) + end + def copy(locals: T.unsafe(nil), operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11892 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#11606 + 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: Node?, body: Node?, location: Location } + # 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#11927 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#11632 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#11975 + # source://prism//lib/prism/node.rb#11683 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#11932 + # source://prism//lib/prism/node.rb#11637 sig { returns(T::Array[Symbol]) } def locals; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#11965 + # source://prism//lib/prism/node.rb#11673 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#11941 + # source://prism//lib/prism/node.rb#11647 sig { returns(Prism::Location) } def opening_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#11960 + # source://prism//lib/prism/node.rb#11668 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#11935 + # source://prism//lib/prism/node.rb#11640 sig { returns(Prism::Location) } def operator_loc; end - # attr_reader parameters: Node? + # attr_reader parameters: Prism::node? # - # source://prism//lib/prism/node.rb#11953 + # source://prism//lib/prism/node.rb#11661 sig { returns(T.nilable(Prism::Node)) } def parameters; end @@ -17187,7 +19234,8 @@ class Prism::LambdaNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#12010 + # source://prism//lib/prism/node.rb#11718 + sig { override.returns(Symbol) } def type; end class << self @@ -17198,7 +19246,7 @@ class Prism::LambdaNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#12020 + # source://prism//lib/prism/node.rb#11728 def type; end end end @@ -17213,29 +19261,29 @@ end class Prism::LexCompat # @return [LexCompat] a new instance of LexCompat # - # source://prism//lib/prism/lex_compat.rb#600 + # source://prism//lib/prism/lex_compat.rb#602 def initialize(source, **options); end # Returns the value of attribute options. # - # source://prism//lib/prism/lex_compat.rb#598 + # source://prism//lib/prism/lex_compat.rb#600 def options; end - # source://prism//lib/prism/lex_compat.rb#605 + # source://prism//lib/prism/lex_compat.rb#607 def result; end # Returns the value of attribute source. # - # source://prism//lib/prism/lex_compat.rb#598 + # source://prism//lib/prism/lex_compat.rb#600 def source; end end # Ripper doesn't include the rest of the token in the event, so we need to # trim it down to just the content on the first line when comparing. # -# source://prism//lib/prism/lex_compat.rb#211 +# source://prism//lib/prism/lex_compat.rb#213 class Prism::LexCompat::EndContentToken < ::Prism::LexCompat::Token - # source://prism//lib/prism/lex_compat.rb#212 + # source://prism//lib/prism/lex_compat.rb#214 def ==(other); end end @@ -17243,13 +19291,13 @@ end # heredoc that should be appended onto the list of tokens when the heredoc # closes. # -# source://prism//lib/prism/lex_compat.rb#272 +# source://prism//lib/prism/lex_compat.rb#274 module Prism::LexCompat::Heredoc class << self # Here we will split between the two types of heredocs and return the # object that will store their tokens. # - # source://prism//lib/prism/lex_compat.rb#584 + # source://prism//lib/prism/lex_compat.rb#586 def build(opening); end end end @@ -17258,23 +19306,23 @@ end # that need to be split on "\\\n" to mimic Ripper's behavior. We also need # to keep track of the state that the heredoc was opened in. # -# source://prism//lib/prism/lex_compat.rb#296 +# source://prism//lib/prism/lex_compat.rb#298 class Prism::LexCompat::Heredoc::DashHeredoc # @return [DashHeredoc] a new instance of DashHeredoc # - # source://prism//lib/prism/lex_compat.rb#299 + # source://prism//lib/prism/lex_compat.rb#301 def initialize(split); end - # source://prism//lib/prism/lex_compat.rb#304 + # source://prism//lib/prism/lex_compat.rb#306 def <<(token); end - # source://prism//lib/prism/lex_compat.rb#297 + # source://prism//lib/prism/lex_compat.rb#299 def split; end - # source://prism//lib/prism/lex_compat.rb#308 + # source://prism//lib/prism/lex_compat.rb#310 def to_a; end - # source://prism//lib/prism/lex_compat.rb#297 + # source://prism//lib/prism/lex_compat.rb#299 def tokens; end end @@ -17289,45 +19337,45 @@ end # some extra manipulation on the tokens to make them match Ripper's # output by mirroring the dedent logic that Ripper uses. # -# source://prism//lib/prism/lex_compat.rb#355 +# source://prism//lib/prism/lex_compat.rb#357 class Prism::LexCompat::Heredoc::DedentingHeredoc # @return [DedentingHeredoc] a new instance of DedentingHeredoc # - # source://prism//lib/prism/lex_compat.rb#360 + # source://prism//lib/prism/lex_compat.rb#362 def initialize; end # As tokens are coming in, we track the minimum amount of common leading # whitespace on plain string content tokens. This allows us to later # remove that amount of whitespace from the beginning of each line. # - # source://prism//lib/prism/lex_compat.rb#371 + # source://prism//lib/prism/lex_compat.rb#373 def <<(token); end # Returns the value of attribute dedent. # - # source://prism//lib/prism/lex_compat.rb#358 + # source://prism//lib/prism/lex_compat.rb#360 def dedent; end # Returns the value of attribute dedent_next. # - # source://prism//lib/prism/lex_compat.rb#358 + # source://prism//lib/prism/lex_compat.rb#360 def dedent_next; end # Returns the value of attribute embexpr_balance. # - # source://prism//lib/prism/lex_compat.rb#358 + # source://prism//lib/prism/lex_compat.rb#360 def embexpr_balance; end - # source://prism//lib/prism/lex_compat.rb#408 + # source://prism//lib/prism/lex_compat.rb#410 def to_a; end # Returns the value of attribute tokens. # - # source://prism//lib/prism/lex_compat.rb#358 + # source://prism//lib/prism/lex_compat.rb#360 def tokens; end end -# source://prism//lib/prism/lex_compat.rb#356 +# source://prism//lib/prism/lex_compat.rb#358 Prism::LexCompat::Heredoc::DedentingHeredoc::TAB_WIDTH = T.let(T.unsafe(nil), Integer) # Heredocs that are no dash or tilde heredocs are just a list of tokens. @@ -17335,20 +19383,20 @@ Prism::LexCompat::Heredoc::DedentingHeredoc::TAB_WIDTH = T.let(T.unsafe(nil), In # order back into the token stream and set the state of the last token to # the state that the heredoc was opened in. # -# source://prism//lib/prism/lex_compat.rb#277 +# source://prism//lib/prism/lex_compat.rb#279 class Prism::LexCompat::Heredoc::PlainHeredoc # @return [PlainHeredoc] a new instance of PlainHeredoc # - # source://prism//lib/prism/lex_compat.rb#280 + # source://prism//lib/prism/lex_compat.rb#282 def initialize; end - # source://prism//lib/prism/lex_compat.rb#284 + # source://prism//lib/prism/lex_compat.rb#286 def <<(token); end - # source://prism//lib/prism/lex_compat.rb#288 + # source://prism//lib/prism/lex_compat.rb#290 def to_a; end - # source://prism//lib/prism/lex_compat.rb#278 + # source://prism//lib/prism/lex_compat.rb#280 def tokens; end end @@ -17357,27 +19405,27 @@ end # through named captures in regular expressions). In that case we don't # compare the state. # -# source://prism//lib/prism/lex_compat.rb#229 +# source://prism//lib/prism/lex_compat.rb#231 class Prism::LexCompat::IdentToken < ::Prism::LexCompat::Token - # source://prism//lib/prism/lex_compat.rb#230 + # source://prism//lib/prism/lex_compat.rb#232 def ==(other); end end # Tokens where state should be ignored # used for :on_comment, :on_heredoc_end, :on_embexpr_end # -# source://prism//lib/prism/lex_compat.rb#219 +# source://prism//lib/prism/lex_compat.rb#221 class Prism::LexCompat::IgnoreStateToken < ::Prism::LexCompat::Token - # source://prism//lib/prism/lex_compat.rb#220 + # source://prism//lib/prism/lex_compat.rb#222 def ==(other); end end # Ignored newlines can occasionally have a LABEL state attached to them, so # we compare the state differently here. # -# source://prism//lib/prism/lex_compat.rb#240 +# source://prism//lib/prism/lex_compat.rb#242 class Prism::LexCompat::IgnoredNewlineToken < ::Prism::LexCompat::Token - # source://prism//lib/prism/lex_compat.rb#241 + # source://prism//lib/prism/lex_compat.rb#243 def ==(other); end end @@ -17390,9 +19438,9 @@ end # more accurately, so we need to allow comparing against both END and # END|LABEL. # -# source://prism//lib/prism/lex_compat.rb#260 +# source://prism//lib/prism/lex_compat.rb#262 class Prism::LexCompat::ParamToken < ::Prism::LexCompat::Token - # source://prism//lib/prism/lex_compat.rb#261 + # source://prism//lib/prism/lex_compat.rb#263 def ==(other); end end @@ -17411,44 +19459,44 @@ Prism::LexCompat::RIPPER = T.let(T.unsafe(nil), Hash) class Prism::LexCompat::Token < ::SimpleDelegator # The type of the token. # - # source://prism//lib/prism/lex_compat.rb#194 + # source://prism//lib/prism/lex_compat.rb#196 def event; end # The location of the token in the source. # - # source://prism//lib/prism/lex_compat.rb#189 + # source://prism//lib/prism/lex_compat.rb#191 def location; end # The state of the lexer when this token was produced. # - # source://prism//lib/prism/lex_compat.rb#204 + # source://prism//lib/prism/lex_compat.rb#206 def state; end # The slice of the source that this token represents. # - # source://prism//lib/prism/lex_compat.rb#199 + # source://prism//lib/prism/lex_compat.rb#201 def value; end end # This is a class that wraps the Ripper lexer to produce almost exactly the # same tokens. # -# source://prism//lib/prism/lex_compat.rb#853 +# source://prism//lib/prism/lex_compat.rb#855 class Prism::LexRipper # @return [LexRipper] a new instance of LexRipper # - # source://prism//lib/prism/lex_compat.rb#856 + # source://prism//lib/prism/lex_compat.rb#858 def initialize(source); end - # source://prism//lib/prism/lex_compat.rb#860 + # source://prism//lib/prism/lex_compat.rb#862 def result; end - # source://prism//lib/prism/lex_compat.rb#854 + # source://prism//lib/prism/lex_compat.rb#856 def source; end private - # source://prism//lib/prism/lex_compat.rb#894 + # source://prism//lib/prism/lex_compat.rb#896 def lex(source); end end @@ -17457,95 +19505,117 @@ end # target &&= value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#12029 +# source://prism//lib/prism/node.rb#11737 class Prism::LocalVariableAndWriteNode < ::Prism::Node - # def initialize: (Location name_loc, Location operator_loc, Node value, Symbol name, Integer depth, Location location) -> void + # 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#12031 + # source://prism//lib/prism/node.rb#11739 + 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 # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12043 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#11751 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12048 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#11756 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12058 + # source://prism//lib/prism/node.rb#11766 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12053 + # source://prism//lib/prism/node.rb#11761 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> LocalVariableAndWriteNode + # def copy: (?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?depth: Integer, ?location: Location) -> LocalVariableAndWriteNode # - # source://prism//lib/prism/node.rb#12063 - sig { params(params: T.untyped).returns(Prism::LocalVariableAndWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#11771 + sig do + params( + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + depth: Integer, + location: Prism::Location + ).returns(Prism::LocalVariableAndWriteNode) + end + def copy(name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12048 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#11756 + 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: Node, name: Symbol, depth: Integer, location: Location } + # 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#12079 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#11779 + 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#12102 + # source://prism//lib/prism/node.rb#11804 sig { returns(Integer) } def depth; end - # source://prism//lib/prism/desugar_compiler.rb#197 + # source://prism//lib/prism/desugar_compiler.rb#199 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#12111 + # source://prism//lib/prism/node.rb#11813 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#12099 + # source://prism//lib/prism/node.rb#11801 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#12084 + # source://prism//lib/prism/node.rb#11784 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#12106 + # source://prism//lib/prism/node.rb#11808 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#12090 + # source://prism//lib/prism/node.rb#11791 sig { returns(Prism::Location) } def operator_loc; end @@ -17564,12 +19634,13 @@ class Prism::LocalVariableAndWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#12136 + # source://prism//lib/prism/node.rb#11838 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#12096 + # source://prism//lib/prism/node.rb#11798 sig { returns(Prism::Node) } def value; end @@ -17581,7 +19652,7 @@ class Prism::LocalVariableAndWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#12146 + # source://prism//lib/prism/node.rb#11848 def type; end end end @@ -17591,95 +19662,119 @@ end # target += value # ^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#12155 +# source://prism//lib/prism/node.rb#11857 class Prism::LocalVariableOperatorWriteNode < ::Prism::Node - # def initialize: (Location name_loc, Location operator_loc, Node value, Symbol name, Symbol operator, Integer depth, Location location) -> void + # def initialize: (Location name_loc, Location operator_loc, Prism::node value, Symbol name, Symbol operator, Integer depth, Location location) -> void # # @return [LocalVariableOperatorWriteNode] a new instance of LocalVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#12157 + # source://prism//lib/prism/node.rb#11859 + sig do + params( + source: Prism::Source, + name_loc: Prism::Location, + 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 accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12170 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#11872 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12175 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#11877 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12185 + # source://prism//lib/prism/node.rb#11887 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12180 + # source://prism//lib/prism/node.rb#11882 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> LocalVariableOperatorWriteNode + # 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#12190 - sig { params(params: T.untyped).returns(Prism::LocalVariableOperatorWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#11892 + 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#12175 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#11877 + 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: Node, name: Symbol, operator: Symbol, depth: Integer, location: Location } + # 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#12207 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#11900 + 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#12233 + # source://prism//lib/prism/node.rb#11928 sig { returns(Integer) } def depth; end - # source://prism//lib/prism/desugar_compiler.rb#209 + # 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#12237 + # source://prism//lib/prism/node.rb#11932 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#12227 + # source://prism//lib/prism/node.rb#11922 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#12212 + # source://prism//lib/prism/node.rb#11905 sig { returns(Prism::Location) } def name_loc; end # attr_reader operator: Symbol # - # source://prism//lib/prism/node.rb#12230 + # source://prism//lib/prism/node.rb#11925 sig { returns(Symbol) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#12218 + # source://prism//lib/prism/node.rb#11912 sig { returns(Prism::Location) } def operator_loc; end @@ -17698,12 +19793,13 @@ class Prism::LocalVariableOperatorWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#12263 + # source://prism//lib/prism/node.rb#11958 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#12224 + # source://prism//lib/prism/node.rb#11919 sig { returns(Prism::Node) } def value; end @@ -17715,7 +19811,7 @@ class Prism::LocalVariableOperatorWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#12273 + # source://prism//lib/prism/node.rb#11968 def type; end end end @@ -17725,95 +19821,117 @@ end # target ||= value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#12282 +# source://prism//lib/prism/node.rb#11977 class Prism::LocalVariableOrWriteNode < ::Prism::Node - # def initialize: (Location name_loc, Location operator_loc, Node value, Symbol name, Integer depth, Location location) -> void + # 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#12284 + # source://prism//lib/prism/node.rb#11979 + 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 # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12296 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#11991 + sig { 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 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#11996 + sig { 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#12006 + sig { override.returns(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#12001 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> LocalVariableOrWriteNode + # def copy: (?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?depth: Integer, ?location: Location) -> LocalVariableOrWriteNode # - # source://prism//lib/prism/node.rb#12316 - sig { params(params: T.untyped).returns(Prism::LocalVariableOrWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#12011 + sig do + params( + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + depth: Integer, + location: Prism::Location + ).returns(Prism::LocalVariableOrWriteNode) + end + def copy(name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12301 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#11996 + 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: Node, name: Symbol, depth: Integer, location: Location } + # 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#12332 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#12019 + 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#12355 + # source://prism//lib/prism/node.rb#12044 sig { returns(Integer) } def depth; end - # source://prism//lib/prism/desugar_compiler.rb#203 + # source://prism//lib/prism/desugar_compiler.rb#205 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#12364 + # source://prism//lib/prism/node.rb#12053 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#12352 + # source://prism//lib/prism/node.rb#12041 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#12337 + # source://prism//lib/prism/node.rb#12024 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#12359 + # source://prism//lib/prism/node.rb#12048 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#12343 + # source://prism//lib/prism/node.rb#12031 sig { returns(Prism::Location) } def operator_loc; end @@ -17832,12 +19950,13 @@ class Prism::LocalVariableOrWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#12389 + # source://prism//lib/prism/node.rb#12078 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#12349 + # source://prism//lib/prism/node.rb#12038 sig { returns(Prism::Node) } def value; end @@ -17849,7 +19968,7 @@ class Prism::LocalVariableOrWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#12399 + # source://prism//lib/prism/node.rb#12088 def type; end end end @@ -17859,58 +19978,57 @@ end # foo # ^^^ # -# source://prism//lib/prism/node.rb#12408 +# source://prism//lib/prism/node.rb#12097 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#12410 + # source://prism//lib/prism/node.rb#12099 + sig { params(source: Prism::Source, name: Symbol, depth: Integer, location: Prism::Location).void } def initialize(source, name, depth, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12419 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#12108 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12424 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#12113 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12434 + # source://prism//lib/prism/node.rb#12123 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12429 + # source://prism//lib/prism/node.rb#12118 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> LocalVariableReadNode + # def copy: (?name: Symbol, ?depth: Integer, ?location: Location) -> LocalVariableReadNode # - # source://prism//lib/prism/node.rb#12439 - sig { params(params: T.untyped).returns(Prism::LocalVariableReadNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#12128 + 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#12424 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#12113 + 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#12452 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#12136 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # The number of visible scopes that should be searched to find the origin of this local variable. @@ -17921,13 +20039,17 @@ 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#12478 + # source://prism//lib/prism/node.rb#12162 sig { returns(Integer) } def depth; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#12482 + # source://prism//lib/prism/node.rb#12166 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # The name of the local variable, which is an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). @@ -17944,7 +20066,7 @@ class Prism::LocalVariableReadNode < ::Prism::Node # # it # name `:0it` # - # source://prism//lib/prism/node.rb#12469 + # source://prism//lib/prism/node.rb#12153 sig { returns(Symbol) } def name; end @@ -17963,7 +20085,8 @@ class Prism::LocalVariableReadNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#12503 + # source://prism//lib/prism/node.rb#12187 + sig { override.returns(Symbol) } def type; end class << self @@ -17974,7 +20097,7 @@ class Prism::LocalVariableReadNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#12513 + # source://prism//lib/prism/node.rb#12197 def type; end end end @@ -17984,74 +20107,77 @@ end # foo, bar = baz # ^^^ ^^^ # -# source://prism//lib/prism/node.rb#12522 +# source://prism//lib/prism/node.rb#12206 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#12524 + # source://prism//lib/prism/node.rb#12208 + sig { params(source: Prism::Source, name: Symbol, depth: Integer, location: Prism::Location).void } def initialize(source, name, depth, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12533 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#12217 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12538 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#12222 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12548 + # source://prism//lib/prism/node.rb#12232 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12543 + # source://prism//lib/prism/node.rb#12227 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> LocalVariableTargetNode + # def copy: (?name: Symbol, ?depth: Integer, ?location: Location) -> LocalVariableTargetNode # - # source://prism//lib/prism/node.rb#12553 - sig { params(params: T.untyped).returns(Prism::LocalVariableTargetNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#12237 + 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#12538 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#12222 + 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#12566 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#12245 + 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#12574 + # source://prism//lib/prism/node.rb#12253 sig { returns(Integer) } def depth; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#12578 + # source://prism//lib/prism/node.rb#12257 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#12571 + # source://prism//lib/prism/node.rb#12250 sig { returns(Symbol) } def name; end @@ -18070,7 +20196,8 @@ class Prism::LocalVariableTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#12599 + # source://prism//lib/prism/node.rb#12278 + sig { override.returns(Symbol) } def type; end class << self @@ -18081,7 +20208,7 @@ class Prism::LocalVariableTargetNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#12609 + # source://prism//lib/prism/node.rb#12288 def type; end end end @@ -18091,92 +20218,114 @@ end # foo = 1 # ^^^^^^^ # -# source://prism//lib/prism/node.rb#12618 +# source://prism//lib/prism/node.rb#12297 class Prism::LocalVariableWriteNode < ::Prism::Node - # def initialize: (Symbol name, Integer depth, Location name_loc, Node value, Location operator_loc, Location location) -> void + # 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#12620 + # source://prism//lib/prism/node.rb#12299 + sig do + params( + source: Prism::Source, + name: Symbol, + depth: Integer, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, name, depth, name_loc, value, operator_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12632 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#12311 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12637 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#12316 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12647 + # source://prism//lib/prism/node.rb#12326 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12642 + # source://prism//lib/prism/node.rb#12321 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> LocalVariableWriteNode + # def copy: (?name: Symbol, ?depth: Integer, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location, ?location: Location) -> LocalVariableWriteNode # - # source://prism//lib/prism/node.rb#12652 - sig { params(params: T.untyped).returns(Prism::LocalVariableWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#12331 + sig do + params( + name: Symbol, + depth: Integer, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::LocalVariableWriteNode) + end + def copy(name: T.unsafe(nil), depth: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12637 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#12316 + 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: Node, operator_loc: Location, location: Location } + # 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#12668 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#12339 + 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#12676 + # source://prism//lib/prism/node.rb#12347 sig { returns(Integer) } def depth; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#12700 + # source://prism//lib/prism/node.rb#12373 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#12673 + # source://prism//lib/prism/node.rb#12344 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#12679 + # source://prism//lib/prism/node.rb#12350 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#12695 + # source://prism//lib/prism/node.rb#12368 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#12688 + # source://prism//lib/prism/node.rb#12360 sig { returns(Prism::Location) } def operator_loc; end @@ -18195,12 +20344,13 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#12725 + # source://prism//lib/prism/node.rb#12398 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#12685 + # source://prism//lib/prism/node.rb#12357 sig { returns(Prism::Node) } def value; end @@ -18212,231 +20362,273 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#12735 + # source://prism//lib/prism/node.rb#12408 def type; end end end # This represents a location in the source. # -# source://prism//lib/prism/parse_result.rb#98 +# source://prism//lib/prism/parse_result.rb#104 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#116 + # source://prism//lib/prism/parse_result.rb#119 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#232 + # source://prism//lib/prism/parse_result.rb#269 + sig { params(other: T.untyped).returns(T::Boolean) } def ==(other); end - # The list of comments attached to this location + # Returns a new location that is the result of chopping off the last byte. # - # source://prism//lib/prism/parse_result.rb#112 + # source://prism//lib/prism/parse_result.rb#165 + 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 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#124 - sig { params(options: T.untyped).returns(Prism::Location) } - def copy(**options); end + # source://prism//lib/prism/parse_result.rb#160 + 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#222 + # source://prism//lib/prism/parse_result.rb#259 + 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#211 + # source://prism//lib/prism/parse_result.rb#248 + 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#160 + # source://prism//lib/prism/parse_result.rb#197 + 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#217 + # source://prism//lib/prism/parse_result.rb#254 + 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#165 + # source://prism//lib/prism/parse_result.rb#202 + 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#205 + # source://prism//lib/prism/parse_result.rb#242 sig { returns(Integer) } def end_column; end # The line number where this location ends. # - # source://prism//lib/prism/parse_result.rb#181 + # source://prism//lib/prism/parse_result.rb#218 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#154 + # source://prism//lib/prism/parse_result.rb#191 sig { returns(Integer) } def end_offset; end # Returns a string representation of this location. # - # source://prism//lib/prism/parse_result.rb#133 + # source://prism//lib/prism/parse_result.rb#170 + sig { returns(String) } def inspect; end # Returns a new location that stretches from this location to the given # other location. Raises an error if this location is not before the other # location or if they don't share the same source. # - # source://prism//lib/prism/parse_result.rb#241 + # source://prism//lib/prism/parse_result.rb#278 + 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 + 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 + sig { returns(T::Array[Prism::Comment]) } + def leading_comments; end + # The length of this location in bytes. # - # source://prism//lib/prism/parse_result.rb#109 + # source://prism//lib/prism/parse_result.rb#115 def length; end # Implement the pretty print interface for Location. # - # source://prism//lib/prism/parse_result.rb#227 + # source://prism//lib/prism/parse_result.rb#264 + 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#138 + # source://prism//lib/prism/parse_result.rb#175 sig { returns(String) } def slice; end # The column number in characters where this location ends from the start of # the line. # - # source://prism//lib/prism/parse_result.rb#193 + # source://prism//lib/prism/parse_result.rb#230 + 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#144 + # source://prism//lib/prism/parse_result.rb#181 + 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#199 + # source://prism//lib/prism/parse_result.rb#236 + 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#149 + # source://prism//lib/prism/parse_result.rb#186 + 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#187 + # source://prism//lib/prism/parse_result.rb#224 sig { returns(Integer) } def start_column; end # The line number where this location starts. # - # source://prism//lib/prism/parse_result.rb#170 + # source://prism//lib/prism/parse_result.rb#207 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#175 + # source://prism//lib/prism/parse_result.rb#212 + 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#106 - sig { returns(Integer) } + # source://prism//lib/prism/parse_result.rb#112 def start_offset; end + # Attach a comment to the trailing comments of this location. + # + # source://prism//lib/prism/parse_result.rb#149 + 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 + sig { returns(T::Array[Prism::Comment]) } + def trailing_comments; end + protected # A Source object that is used to determine more information from the given # offset and length. # - # source://prism//lib/prism/parse_result.rb#101 + # source://prism//lib/prism/parse_result.rb#107 def source; end - - class << self - # Returns a null location that does not correspond to a source and points to - # the beginning of the file. Useful for when you want a location object but - # do not care where it points. - # - # source://prism//lib/prism/parse_result.rb#251 - def null; end - end end # Flags for while and until loop nodes. # -# source://prism//lib/prism/node.rb#19298 +# source://prism//lib/prism/node.rb#18896 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#19300 +# source://prism//lib/prism/node.rb#18898 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#303 +# source://prism//lib/prism/parse_result.rb#338 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#311 + # source://prism//lib/prism/parse_result.rb#346 + 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#327 + # source://prism//lib/prism/parse_result.rb#362 + 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#332 + # source://prism//lib/prism/parse_result.rb#367 + 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#317 + # source://prism//lib/prism/parse_result.rb#352 + 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#305 + # source://prism//lib/prism/parse_result.rb#340 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#322 + # source://prism//lib/prism/parse_result.rb#357 + 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#308 + # source://prism//lib/prism/parse_result.rb#343 def value_loc; end end @@ -18445,7 +20637,7 @@ end # if /foo/i then end # ^^^^^^ # -# source://prism//lib/prism/node.rb#12744 +# source://prism//lib/prism/node.rb#12417 class Prism::MatchLastLineNode < ::Prism::Node include ::Prism::RegularExpressionOptions @@ -18453,91 +20645,109 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [MatchLastLineNode] a new instance of MatchLastLineNode # - # source://prism//lib/prism/node.rb#12746 + # source://prism//lib/prism/node.rb#12419 + sig do + params( + source: Prism::Source, + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String, + location: Prism::Location + ).void + end def initialize(source, flags, opening_loc, content_loc, closing_loc, unescaped, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12758 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#12431 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def ascii_8bit?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12850 + # source://prism//lib/prism/node.rb#12518 sig { returns(T::Boolean) } def ascii_8bit?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12763 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#12436 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#12890 + # source://prism//lib/prism/node.rb#12558 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#12815 + # source://prism//lib/prism/node.rb#12482 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12773 + # source://prism//lib/prism/node.rb#12446 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12768 + # source://prism//lib/prism/node.rb#12441 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def content: () -> String # - # source://prism//lib/prism/node.rb#12885 + # source://prism//lib/prism/node.rb#12553 sig { returns(String) } def content; end # attr_reader content_loc: Location # - # source://prism//lib/prism/node.rb#12809 + # source://prism//lib/prism/node.rb#12475 sig { returns(Prism::Location) } def content_loc; end - # def copy: (**params) -> MatchLastLineNode + # def copy: (?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String, ?location: Location) -> MatchLastLineNode # - # source://prism//lib/prism/node.rb#12778 - sig { params(params: T.untyped).returns(Prism::MatchLastLineNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#12451 + sig do + params( + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String, + location: Prism::Location + ).returns(Prism::MatchLastLineNode) + end + def copy(flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12763 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#12436 + 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#12794 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#12459 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def euc_jp?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12845 + # source://prism//lib/prism/node.rb#12513 sig { returns(T::Boolean) } def euc_jp?; end @@ -18545,15 +20755,18 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12830 + # source://prism//lib/prism/node.rb#12498 sig { returns(T::Boolean) } def extended?; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def forced_binary_encoding?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12870 + # source://prism//lib/prism/node.rb#12538 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -18561,7 +20774,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12875 + # source://prism//lib/prism/node.rb#12543 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end @@ -18569,7 +20782,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12865 + # source://prism//lib/prism/node.rb#12533 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -18577,20 +20790,21 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12825 + # source://prism//lib/prism/node.rb#12493 sig { returns(T::Boolean) } def ignore_case?; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#12895 + # source://prism//lib/prism/node.rb#12563 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def multi_line?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12835 + # source://prism//lib/prism/node.rb#12503 sig { returns(T::Boolean) } def multi_line?; end @@ -18598,22 +20812,25 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12840 + # source://prism//lib/prism/node.rb#12508 sig { returns(T::Boolean) } def once?; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#12880 + # source://prism//lib/prism/node.rb#12548 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#12803 + # source://prism//lib/prism/node.rb#12468 sig { returns(Prism::Location) } def opening_loc; end + sig { returns(Integer) } + def options; end + # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a @@ -18629,12 +20846,13 @@ class Prism::MatchLastLineNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#12920 + # source://prism//lib/prism/node.rb#12588 + sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#12821 + # source://prism//lib/prism/node.rb#12489 sig { returns(String) } def unescaped; end @@ -18642,7 +20860,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12860 + # source://prism//lib/prism/node.rb#12528 sig { returns(T::Boolean) } def utf_8?; end @@ -18650,7 +20868,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12855 + # source://prism//lib/prism/node.rb#12523 sig { returns(T::Boolean) } def windows_31j?; end @@ -18658,7 +20876,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # private attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#12799 + # source://prism//lib/prism/node.rb#12464 sig { returns(Integer) } def flags; end @@ -18670,7 +20888,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#12930 + # source://prism//lib/prism/node.rb#12598 def type; end end end @@ -18680,80 +20898,98 @@ end # foo in bar # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#12939 +# source://prism//lib/prism/node.rb#12607 class Prism::MatchPredicateNode < ::Prism::Node - # def initialize: (Node value, Node pattern, Location operator_loc, Location location) -> void + # 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#12941 + # source://prism//lib/prism/node.rb#12609 + sig do + params( + source: Prism::Source, + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, value, pattern, operator_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12951 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#12619 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12956 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#12624 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12966 + # source://prism//lib/prism/node.rb#12634 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12961 + # source://prism//lib/prism/node.rb#12629 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> MatchPredicateNode + # def copy: (?value: Prism::node, ?pattern: Prism::node, ?operator_loc: Location, ?location: Location) -> MatchPredicateNode # - # source://prism//lib/prism/node.rb#12971 - sig { params(params: T.untyped).returns(Prism::MatchPredicateNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#12639 + sig do + params( + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::MatchPredicateNode) + end + def copy(value: T.unsafe(nil), pattern: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12956 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#12624 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { value: Node, pattern: Node, operator_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::node, pattern: Prism::node, operator_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#12985 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#12647 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#13008 + # source://prism//lib/prism/node.rb#12671 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # - # source://prism//lib/prism/node.rb#13003 + # source://prism//lib/prism/node.rb#12666 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#12996 + # source://prism//lib/prism/node.rb#12658 sig { returns(Prism::Location) } def operator_loc; end - # attr_reader pattern: Node + # attr_reader pattern: Prism::node # - # source://prism//lib/prism/node.rb#12993 + # source://prism//lib/prism/node.rb#12655 sig { returns(Prism::Node) } def pattern; end @@ -18772,12 +21008,13 @@ class Prism::MatchPredicateNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#13032 + # source://prism//lib/prism/node.rb#12695 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#12990 + # source://prism//lib/prism/node.rb#12652 sig { returns(Prism::Node) } def value; end @@ -18789,7 +21026,7 @@ class Prism::MatchPredicateNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#13042 + # source://prism//lib/prism/node.rb#12705 def type; end end end @@ -18799,80 +21036,98 @@ end # foo => bar # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#13051 +# source://prism//lib/prism/node.rb#12714 class Prism::MatchRequiredNode < ::Prism::Node - # def initialize: (Node value, Node pattern, Location operator_loc, Location location) -> void + # 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#13053 + # source://prism//lib/prism/node.rb#12716 + sig do + params( + source: Prism::Source, + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, value, pattern, operator_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13063 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#12726 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13068 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#12731 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13078 + # source://prism//lib/prism/node.rb#12741 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13073 + # source://prism//lib/prism/node.rb#12736 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> MatchRequiredNode + # def copy: (?value: Prism::node, ?pattern: Prism::node, ?operator_loc: Location, ?location: Location) -> MatchRequiredNode # - # source://prism//lib/prism/node.rb#13083 - sig { params(params: T.untyped).returns(Prism::MatchRequiredNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#12746 + sig do + params( + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::MatchRequiredNode) + end + def copy(value: T.unsafe(nil), pattern: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13068 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#12731 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { value: Node, pattern: Node, operator_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::node, pattern: Prism::node, operator_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#13097 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#12754 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#13120 + # source://prism//lib/prism/node.rb#12778 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # - # source://prism//lib/prism/node.rb#13115 + # source://prism//lib/prism/node.rb#12773 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#13108 + # source://prism//lib/prism/node.rb#12765 sig { returns(Prism::Location) } def operator_loc; end - # attr_reader pattern: Node + # attr_reader pattern: Prism::node # - # source://prism//lib/prism/node.rb#13105 + # source://prism//lib/prism/node.rb#12762 sig { returns(Prism::Node) } def pattern; end @@ -18891,12 +21146,13 @@ class Prism::MatchRequiredNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#13144 + # source://prism//lib/prism/node.rb#12802 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#13102 + # source://prism//lib/prism/node.rb#12759 sig { returns(Prism::Node) } def value; end @@ -18908,7 +21164,7 @@ class Prism::MatchRequiredNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#13154 + # source://prism//lib/prism/node.rb#12812 def type; end end end @@ -18918,75 +21174,91 @@ end # /(?bar)/ =~ baz # ^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#13163 +# source://prism//lib/prism/node.rb#12821 class Prism::MatchWriteNode < ::Prism::Node - # def initialize: (CallNode call, Array[Node] targets, Location location) -> void + # def initialize: (CallNode call, Array[LocalVariableTargetNode] targets, Location location) -> void # # @return [MatchWriteNode] a new instance of MatchWriteNode # - # source://prism//lib/prism/node.rb#13165 + # source://prism//lib/prism/node.rb#12823 + sig do + params( + source: Prism::Source, + call: Prism::CallNode, + targets: T::Array[Prism::LocalVariableTargetNode], + location: Prism::Location + ).void + end def initialize(source, call, targets, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13174 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#12832 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader call: CallNode # - # source://prism//lib/prism/node.rb#13212 + # source://prism//lib/prism/node.rb#12865 sig { returns(Prism::CallNode) } def call; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13179 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#12837 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13189 + # source://prism//lib/prism/node.rb#12847 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13184 + # source://prism//lib/prism/node.rb#12842 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> MatchWriteNode + # def copy: (?call: CallNode, ?targets: Array[LocalVariableTargetNode], ?location: Location) -> MatchWriteNode # - # source://prism//lib/prism/node.rb#13194 - sig { params(params: T.untyped).returns(Prism::MatchWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#12852 + sig do + params( + call: Prism::CallNode, + targets: T::Array[Prism::LocalVariableTargetNode], + location: Prism::Location + ).returns(Prism::MatchWriteNode) + end + def copy(call: T.unsafe(nil), targets: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13179 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#12837 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { call: CallNode, targets: Array[Node], location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { call: CallNode, targets: Array[LocalVariableTargetNode], location: Location } # - # source://prism//lib/prism/node.rb#13207 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#12860 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#13219 + # source://prism//lib/prism/node.rb#12872 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end - # attr_reader targets: Array[Node] + # attr_reader targets: Array[LocalVariableTargetNode] # - # source://prism//lib/prism/node.rb#13215 - sig { returns(T::Array[Prism::Node]) } + # source://prism//lib/prism/node.rb#12868 + sig { returns(T::Array[Prism::LocalVariableTargetNode]) } def targets; end # Sometimes you want to check an instance of a node against a list of @@ -19004,7 +21276,8 @@ class Prism::MatchWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#13241 + # source://prism//lib/prism/node.rb#12894 + sig { override.returns(Symbol) } def type; end class << self @@ -19015,70 +21288,73 @@ class Prism::MatchWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#13251 + # source://prism//lib/prism/node.rb#12904 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#13257 +# source://prism//lib/prism/node.rb#12910 class Prism::MissingNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [MissingNode] a new instance of MissingNode # - # source://prism//lib/prism/node.rb#13259 + # source://prism//lib/prism/node.rb#12912 + sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13266 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#12919 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13271 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#12924 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13281 + # source://prism//lib/prism/node.rb#12934 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13276 + # source://prism//lib/prism/node.rb#12929 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> MissingNode + # def copy: (?location: Location) -> MissingNode # - # source://prism//lib/prism/node.rb#13286 - sig { params(params: T.untyped).returns(Prism::MissingNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#12939 + 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#13271 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#12924 + 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#13297 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#12947 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#13303 + # source://prism//lib/prism/node.rb#12953 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of @@ -19096,7 +21372,8 @@ class Prism::MissingNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#13322 + # source://prism//lib/prism/node.rb#12972 + sig { override.returns(Symbol) } def type; end class << self @@ -19107,7 +21384,7 @@ class Prism::MissingNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#13332 + # source://prism//lib/prism/node.rb#12982 def type; end end end @@ -19117,110 +21394,134 @@ end # module Foo end # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#13341 +# source://prism//lib/prism/node.rb#12991 class Prism::ModuleNode < ::Prism::Node - # def initialize: (Array[Symbol] locals, Location module_keyword_loc, Node constant_path, Node? body, Location end_keyword_loc, Symbol name, Location location) -> void + # 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#13343 + # source://prism//lib/prism/node.rb#12993 + sig do + params( + source: Prism::Source, + locals: T::Array[Symbol], + module_keyword_loc: Prism::Location, + constant_path: Prism::Node, + body: T.nilable(Prism::Node), + end_keyword_loc: Prism::Location, + name: Symbol, + location: Prism::Location + ).void + end def initialize(source, locals, module_keyword_loc, constant_path, body, end_keyword_loc, name, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13356 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#13006 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # attr_reader body: Node? + # attr_reader body: Prism::node? # - # source://prism//lib/prism/node.rb#13413 + # source://prism//lib/prism/node.rb#13055 sig { returns(T.nilable(Prism::Node)) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13361 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#13011 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13374 + # source://prism//lib/prism/node.rb#13024 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13366 + # source://prism//lib/prism/node.rb#13016 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # attr_reader constant_path: Node + # attr_reader constant_path: Prism::node # - # source://prism//lib/prism/node.rb#13410 + # source://prism//lib/prism/node.rb#13052 sig { returns(Prism::Node) } def constant_path; end - # def copy: (**params) -> ModuleNode + # 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#13379 - sig { params(params: T.untyped).returns(Prism::ModuleNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#13029 + sig do + params( + locals: T::Array[Symbol], + module_keyword_loc: Prism::Location, + constant_path: Prism::Node, + body: T.nilable(Prism::Node), + end_keyword_loc: Prism::Location, + name: Symbol, + location: Prism::Location + ).returns(Prism::ModuleNode) + end + def copy(locals: T.unsafe(nil), module_keyword_loc: T.unsafe(nil), constant_path: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), name: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13361 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#13011 + 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: Node, body: Node?, end_keyword_loc: Location, name: Symbol, location: Location } + # 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#13396 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#13037 + 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#13431 + # source://prism//lib/prism/node.rb#13074 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#13416 + # source://prism//lib/prism/node.rb#13058 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 # - # source://prism//lib/prism/node.rb#13436 + # source://prism//lib/prism/node.rb#13079 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#13401 + # source://prism//lib/prism/node.rb#13042 sig { returns(T::Array[Symbol]) } def locals; end # def module_keyword: () -> String # - # source://prism//lib/prism/node.rb#13426 + # source://prism//lib/prism/node.rb#13069 sig { returns(String) } def module_keyword; end # attr_reader module_keyword_loc: Location # - # source://prism//lib/prism/node.rb#13404 + # source://prism//lib/prism/node.rb#13045 sig { returns(Prism::Location) } def module_keyword_loc; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#13422 + # source://prism//lib/prism/node.rb#13065 sig { returns(Symbol) } def name; end @@ -19239,7 +21540,8 @@ class Prism::ModuleNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#13467 + # source://prism//lib/prism/node.rb#13110 + sig { override.returns(Symbol) } def type; end class << self @@ -19250,7 +21552,7 @@ class Prism::ModuleNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#13477 + # source://prism//lib/prism/node.rb#13120 def type; end end end @@ -19260,104 +21562,130 @@ end # a, (b, c) = 1, 2, 3 # ^^^^^^ # -# source://prism//lib/prism/node.rb#13486 +# source://prism//lib/prism/node.rb#13129 class Prism::MultiTargetNode < ::Prism::Node - # def initialize: (Array[Node] lefts, Node? rest, Array[Node] rights, Location? lparen_loc, Location? rparen_loc, Location location) -> void + # 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#13488 + # source://prism//lib/prism/node.rb#13131 + sig do + params( + source: Prism::Source, + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + rest: T.nilable(Prism::Node), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end def initialize(source, lefts, rest, rights, lparen_loc, rparen_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13500 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#13143 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13505 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#13148 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13519 + # source://prism//lib/prism/node.rb#13162 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13510 + # source://prism//lib/prism/node.rb#13153 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> MultiTargetNode + # 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#13524 - sig { params(params: T.untyped).returns(Prism::MultiTargetNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#13167 + sig do + params( + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + rest: T.nilable(Prism::Node), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::MultiTargetNode) + end + def copy(lefts: T.unsafe(nil), rest: T.unsafe(nil), rights: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13505 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#13148 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { lefts: Array[Node], rest: Node?, rights: Array[Node], lparen_loc: Location?, rparen_loc: Location?, location: Location } + # 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#13540 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#13175 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#13589 + # source://prism//lib/prism/node.rb#13226 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end - # attr_reader lefts: Array[Node] + # attr_reader lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode] # - # source://prism//lib/prism/node.rb#13545 - sig { returns(T::Array[Prism::Node]) } + # source://prism//lib/prism/node.rb#13180 + sig do + returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)]) + end def lefts; end # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#13579 + # source://prism//lib/prism/node.rb#13216 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#13554 + # source://prism//lib/prism/node.rb#13189 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end - # attr_reader rest: Node? + # attr_reader rest: Prism::node? # - # source://prism//lib/prism/node.rb#13548 + # source://prism//lib/prism/node.rb#13183 sig { returns(T.nilable(Prism::Node)) } def rest; end - # attr_reader rights: Array[Node] + # attr_reader rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode] # - # source://prism//lib/prism/node.rb#13551 - sig { returns(T::Array[Prism::Node]) } + # source://prism//lib/prism/node.rb#13186 + sig do + returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode)]) + end def rights; end # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#13584 + # source://prism//lib/prism/node.rb#13221 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#13566 + # source://prism//lib/prism/node.rb#13202 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end @@ -19376,7 +21704,8 @@ class Prism::MultiTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#13618 + # source://prism//lib/prism/node.rb#13255 + sig { override.returns(Symbol) } def type; end class << self @@ -19387,7 +21716,7 @@ class Prism::MultiTargetNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#13628 + # source://prism//lib/prism/node.rb#13265 def type; end end end @@ -19397,116 +21726,146 @@ end # a, b, c = 1, 2, 3 # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#13637 +# source://prism//lib/prism/node.rb#13274 class Prism::MultiWriteNode < ::Prism::Node - # def initialize: (Array[Node] lefts, Node? rest, Array[Node] rights, Location? lparen_loc, Location? rparen_loc, Location operator_loc, Node value, Location location) -> void + # 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#13639 + # source://prism//lib/prism/node.rb#13276 + sig do + params( + source: Prism::Source, + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode)], + rest: T.nilable(Prism::Node), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end def initialize(source, lefts, rest, rights, lparen_loc, rparen_loc, operator_loc, value, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13653 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#13290 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13658 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#13295 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13673 + # source://prism//lib/prism/node.rb#13310 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13663 + # source://prism//lib/prism/node.rb#13300 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> MultiWriteNode + # 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#13678 - sig { params(params: T.untyped).returns(Prism::MultiWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#13315 + sig do + params( + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode)], + rest: T.nilable(Prism::Node), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::MultiWriteNode) + end + def copy(lefts: T.unsafe(nil), rest: T.unsafe(nil), rights: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13658 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#13295 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { lefts: Array[Node], rest: Node?, rights: Array[Node], lparen_loc: Location?, rparen_loc: Location?, operator_loc: Location, value: Node, location: Location } + # 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#13696 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#13323 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#13759 + # source://prism//lib/prism/node.rb#13389 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end - # attr_reader lefts: Array[Node] + # attr_reader lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode] # - # source://prism//lib/prism/node.rb#13701 - sig { returns(T::Array[Prism::Node]) } + # source://prism//lib/prism/node.rb#13328 + sig do + returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode)]) + end def lefts; end # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#13744 + # source://prism//lib/prism/node.rb#13374 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#13710 + # source://prism//lib/prism/node.rb#13337 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#13754 + # source://prism//lib/prism/node.rb#13384 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#13734 + # source://prism//lib/prism/node.rb#13363 sig { returns(Prism::Location) } def operator_loc; end - # attr_reader rest: Node? + # attr_reader rest: Prism::node? # - # source://prism//lib/prism/node.rb#13704 + # source://prism//lib/prism/node.rb#13331 sig { returns(T.nilable(Prism::Node)) } def rest; end - # attr_reader rights: Array[Node] + # attr_reader rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode] # - # source://prism//lib/prism/node.rb#13707 - sig { returns(T::Array[Prism::Node]) } + # source://prism//lib/prism/node.rb#13334 + sig do + returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode)]) + end def rights; end # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#13749 + # source://prism//lib/prism/node.rb#13379 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#13722 + # source://prism//lib/prism/node.rb#13350 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end @@ -19525,12 +21884,13 @@ class Prism::MultiWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#13791 + # source://prism//lib/prism/node.rb#13421 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#13740 + # source://prism//lib/prism/node.rb#13370 sig { returns(Prism::Node) } def value; end @@ -19542,7 +21902,7 @@ class Prism::MultiWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#13801 + # source://prism//lib/prism/node.rb#13431 def type; end end end @@ -19551,747 +21911,759 @@ end # visited. This is useful for consumers that want to mutate the tree, as you # can change subtrees in place without effecting the rest of the tree. # -# source://prism//lib/prism/mutation_compiler.rb#12 +# source://prism//lib/prism/mutation_compiler.rb#13 class Prism::MutationCompiler < ::Prism::Compiler # Copy a AliasGlobalVariableNode node # - # source://prism//lib/prism/mutation_compiler.rb#14 + # source://prism//lib/prism/mutation_compiler.rb#15 def visit_alias_global_variable_node(node); end # Copy a AliasMethodNode node # - # source://prism//lib/prism/mutation_compiler.rb#19 + # source://prism//lib/prism/mutation_compiler.rb#20 def visit_alias_method_node(node); end # Copy a AlternationPatternNode node # - # source://prism//lib/prism/mutation_compiler.rb#24 + # source://prism//lib/prism/mutation_compiler.rb#25 def visit_alternation_pattern_node(node); end # Copy a AndNode node # - # source://prism//lib/prism/mutation_compiler.rb#29 + # source://prism//lib/prism/mutation_compiler.rb#30 def visit_and_node(node); end # Copy a ArgumentsNode node # - # source://prism//lib/prism/mutation_compiler.rb#34 + # source://prism//lib/prism/mutation_compiler.rb#35 def visit_arguments_node(node); end # Copy a ArrayNode node # - # source://prism//lib/prism/mutation_compiler.rb#39 + # source://prism//lib/prism/mutation_compiler.rb#40 def visit_array_node(node); end # Copy a ArrayPatternNode node # - # source://prism//lib/prism/mutation_compiler.rb#44 + # source://prism//lib/prism/mutation_compiler.rb#45 def visit_array_pattern_node(node); end # Copy a AssocNode node # - # source://prism//lib/prism/mutation_compiler.rb#49 + # source://prism//lib/prism/mutation_compiler.rb#50 def visit_assoc_node(node); end # Copy a AssocSplatNode node # - # source://prism//lib/prism/mutation_compiler.rb#54 + # source://prism//lib/prism/mutation_compiler.rb#55 def visit_assoc_splat_node(node); end # Copy a BackReferenceReadNode node # - # source://prism//lib/prism/mutation_compiler.rb#59 + # source://prism//lib/prism/mutation_compiler.rb#60 def visit_back_reference_read_node(node); end # Copy a BeginNode node # - # source://prism//lib/prism/mutation_compiler.rb#64 + # source://prism//lib/prism/mutation_compiler.rb#65 def visit_begin_node(node); end # Copy a BlockArgumentNode node # - # source://prism//lib/prism/mutation_compiler.rb#69 + # source://prism//lib/prism/mutation_compiler.rb#70 def visit_block_argument_node(node); end # Copy a BlockLocalVariableNode node # - # source://prism//lib/prism/mutation_compiler.rb#74 + # source://prism//lib/prism/mutation_compiler.rb#75 def visit_block_local_variable_node(node); end # Copy a BlockNode node # - # source://prism//lib/prism/mutation_compiler.rb#79 + # source://prism//lib/prism/mutation_compiler.rb#80 def visit_block_node(node); end # Copy a BlockParameterNode node # - # source://prism//lib/prism/mutation_compiler.rb#84 + # source://prism//lib/prism/mutation_compiler.rb#85 def visit_block_parameter_node(node); end # Copy a BlockParametersNode node # - # source://prism//lib/prism/mutation_compiler.rb#89 + # source://prism//lib/prism/mutation_compiler.rb#90 def visit_block_parameters_node(node); end # Copy a BreakNode node # - # source://prism//lib/prism/mutation_compiler.rb#94 + # source://prism//lib/prism/mutation_compiler.rb#95 def visit_break_node(node); end # Copy a CallAndWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#99 + # source://prism//lib/prism/mutation_compiler.rb#100 def visit_call_and_write_node(node); end # Copy a CallNode node # - # source://prism//lib/prism/mutation_compiler.rb#104 + # source://prism//lib/prism/mutation_compiler.rb#105 def visit_call_node(node); end # Copy a CallOperatorWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#109 + # source://prism//lib/prism/mutation_compiler.rb#110 def visit_call_operator_write_node(node); end # Copy a CallOrWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#114 + # source://prism//lib/prism/mutation_compiler.rb#115 def visit_call_or_write_node(node); end # Copy a CallTargetNode node # - # source://prism//lib/prism/mutation_compiler.rb#119 + # source://prism//lib/prism/mutation_compiler.rb#120 def visit_call_target_node(node); end # Copy a CapturePatternNode node # - # source://prism//lib/prism/mutation_compiler.rb#124 + # source://prism//lib/prism/mutation_compiler.rb#125 def visit_capture_pattern_node(node); end # Copy a CaseMatchNode node # - # source://prism//lib/prism/mutation_compiler.rb#129 + # source://prism//lib/prism/mutation_compiler.rb#130 def visit_case_match_node(node); end # Copy a CaseNode node # - # source://prism//lib/prism/mutation_compiler.rb#134 + # source://prism//lib/prism/mutation_compiler.rb#135 def visit_case_node(node); end # Copy a ClassNode node # - # source://prism//lib/prism/mutation_compiler.rb#139 + # source://prism//lib/prism/mutation_compiler.rb#140 def visit_class_node(node); end # Copy a ClassVariableAndWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#144 + # source://prism//lib/prism/mutation_compiler.rb#145 def visit_class_variable_and_write_node(node); end # Copy a ClassVariableOperatorWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#149 + # source://prism//lib/prism/mutation_compiler.rb#150 def visit_class_variable_operator_write_node(node); end # Copy a ClassVariableOrWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#154 + # source://prism//lib/prism/mutation_compiler.rb#155 def visit_class_variable_or_write_node(node); end # Copy a ClassVariableReadNode node # - # source://prism//lib/prism/mutation_compiler.rb#159 + # source://prism//lib/prism/mutation_compiler.rb#160 def visit_class_variable_read_node(node); end # Copy a ClassVariableTargetNode node # - # source://prism//lib/prism/mutation_compiler.rb#164 + # source://prism//lib/prism/mutation_compiler.rb#165 def visit_class_variable_target_node(node); end # Copy a ClassVariableWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#169 + # source://prism//lib/prism/mutation_compiler.rb#170 def visit_class_variable_write_node(node); end # Copy a ConstantAndWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#174 + # source://prism//lib/prism/mutation_compiler.rb#175 def visit_constant_and_write_node(node); end # Copy a ConstantOperatorWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#179 + # source://prism//lib/prism/mutation_compiler.rb#180 def visit_constant_operator_write_node(node); end # Copy a ConstantOrWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#184 + # source://prism//lib/prism/mutation_compiler.rb#185 def visit_constant_or_write_node(node); end # Copy a ConstantPathAndWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#189 + # source://prism//lib/prism/mutation_compiler.rb#190 def visit_constant_path_and_write_node(node); end # Copy a ConstantPathNode node # - # source://prism//lib/prism/mutation_compiler.rb#194 + # source://prism//lib/prism/mutation_compiler.rb#195 def visit_constant_path_node(node); end # Copy a ConstantPathOperatorWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#199 + # source://prism//lib/prism/mutation_compiler.rb#200 def visit_constant_path_operator_write_node(node); end # Copy a ConstantPathOrWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#204 + # source://prism//lib/prism/mutation_compiler.rb#205 def visit_constant_path_or_write_node(node); end # Copy a ConstantPathTargetNode node # - # source://prism//lib/prism/mutation_compiler.rb#209 + # source://prism//lib/prism/mutation_compiler.rb#210 def visit_constant_path_target_node(node); end # Copy a ConstantPathWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#214 + # source://prism//lib/prism/mutation_compiler.rb#215 def visit_constant_path_write_node(node); end # Copy a ConstantReadNode node # - # source://prism//lib/prism/mutation_compiler.rb#219 + # source://prism//lib/prism/mutation_compiler.rb#220 def visit_constant_read_node(node); end # Copy a ConstantTargetNode node # - # source://prism//lib/prism/mutation_compiler.rb#224 + # source://prism//lib/prism/mutation_compiler.rb#225 def visit_constant_target_node(node); end # Copy a ConstantWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#229 + # source://prism//lib/prism/mutation_compiler.rb#230 def visit_constant_write_node(node); end # Copy a DefNode node # - # source://prism//lib/prism/mutation_compiler.rb#234 + # source://prism//lib/prism/mutation_compiler.rb#235 def visit_def_node(node); end # Copy a DefinedNode node # - # source://prism//lib/prism/mutation_compiler.rb#239 + # source://prism//lib/prism/mutation_compiler.rb#240 def visit_defined_node(node); end # Copy a ElseNode node # - # source://prism//lib/prism/mutation_compiler.rb#244 + # source://prism//lib/prism/mutation_compiler.rb#245 def visit_else_node(node); end # Copy a EmbeddedStatementsNode node # - # source://prism//lib/prism/mutation_compiler.rb#249 + # source://prism//lib/prism/mutation_compiler.rb#250 def visit_embedded_statements_node(node); end # Copy a EmbeddedVariableNode node # - # source://prism//lib/prism/mutation_compiler.rb#254 + # source://prism//lib/prism/mutation_compiler.rb#255 def visit_embedded_variable_node(node); end # Copy a EnsureNode node # - # source://prism//lib/prism/mutation_compiler.rb#259 + # source://prism//lib/prism/mutation_compiler.rb#260 def visit_ensure_node(node); end # Copy a FalseNode node # - # source://prism//lib/prism/mutation_compiler.rb#264 + # source://prism//lib/prism/mutation_compiler.rb#265 def visit_false_node(node); end # Copy a FindPatternNode node # - # source://prism//lib/prism/mutation_compiler.rb#269 + # source://prism//lib/prism/mutation_compiler.rb#270 def visit_find_pattern_node(node); end # Copy a FlipFlopNode node # - # source://prism//lib/prism/mutation_compiler.rb#274 + # source://prism//lib/prism/mutation_compiler.rb#275 def visit_flip_flop_node(node); end # Copy a FloatNode node # - # source://prism//lib/prism/mutation_compiler.rb#279 + # source://prism//lib/prism/mutation_compiler.rb#280 def visit_float_node(node); end # Copy a ForNode node # - # source://prism//lib/prism/mutation_compiler.rb#284 + # source://prism//lib/prism/mutation_compiler.rb#285 def visit_for_node(node); end # Copy a ForwardingArgumentsNode node # - # source://prism//lib/prism/mutation_compiler.rb#289 + # source://prism//lib/prism/mutation_compiler.rb#290 def visit_forwarding_arguments_node(node); end # Copy a ForwardingParameterNode node # - # source://prism//lib/prism/mutation_compiler.rb#294 + # source://prism//lib/prism/mutation_compiler.rb#295 def visit_forwarding_parameter_node(node); end # Copy a ForwardingSuperNode node # - # source://prism//lib/prism/mutation_compiler.rb#299 + # source://prism//lib/prism/mutation_compiler.rb#300 def visit_forwarding_super_node(node); end # Copy a GlobalVariableAndWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#304 + # source://prism//lib/prism/mutation_compiler.rb#305 def visit_global_variable_and_write_node(node); end # Copy a GlobalVariableOperatorWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#309 + # source://prism//lib/prism/mutation_compiler.rb#310 def visit_global_variable_operator_write_node(node); end # Copy a GlobalVariableOrWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#314 + # source://prism//lib/prism/mutation_compiler.rb#315 def visit_global_variable_or_write_node(node); end # Copy a GlobalVariableReadNode node # - # source://prism//lib/prism/mutation_compiler.rb#319 + # source://prism//lib/prism/mutation_compiler.rb#320 def visit_global_variable_read_node(node); end # Copy a GlobalVariableTargetNode node # - # source://prism//lib/prism/mutation_compiler.rb#324 + # source://prism//lib/prism/mutation_compiler.rb#325 def visit_global_variable_target_node(node); end # Copy a GlobalVariableWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#329 + # source://prism//lib/prism/mutation_compiler.rb#330 def visit_global_variable_write_node(node); end # Copy a HashNode node # - # source://prism//lib/prism/mutation_compiler.rb#334 + # source://prism//lib/prism/mutation_compiler.rb#335 def visit_hash_node(node); end # Copy a HashPatternNode node # - # source://prism//lib/prism/mutation_compiler.rb#339 + # source://prism//lib/prism/mutation_compiler.rb#340 def visit_hash_pattern_node(node); end # Copy a IfNode node # - # source://prism//lib/prism/mutation_compiler.rb#344 + # source://prism//lib/prism/mutation_compiler.rb#345 def visit_if_node(node); end # Copy a ImaginaryNode node # - # source://prism//lib/prism/mutation_compiler.rb#349 + # source://prism//lib/prism/mutation_compiler.rb#350 def visit_imaginary_node(node); end # Copy a ImplicitNode node # - # source://prism//lib/prism/mutation_compiler.rb#354 + # source://prism//lib/prism/mutation_compiler.rb#355 def visit_implicit_node(node); end # Copy a ImplicitRestNode node # - # source://prism//lib/prism/mutation_compiler.rb#359 + # source://prism//lib/prism/mutation_compiler.rb#360 def visit_implicit_rest_node(node); end # Copy a InNode node # - # source://prism//lib/prism/mutation_compiler.rb#364 + # source://prism//lib/prism/mutation_compiler.rb#365 def visit_in_node(node); end # Copy a IndexAndWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#369 + # source://prism//lib/prism/mutation_compiler.rb#370 def visit_index_and_write_node(node); end # Copy a IndexOperatorWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#374 + # source://prism//lib/prism/mutation_compiler.rb#375 def visit_index_operator_write_node(node); end # Copy a IndexOrWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#379 + # source://prism//lib/prism/mutation_compiler.rb#380 def visit_index_or_write_node(node); end # Copy a IndexTargetNode node # - # source://prism//lib/prism/mutation_compiler.rb#384 + # source://prism//lib/prism/mutation_compiler.rb#385 def visit_index_target_node(node); end # Copy a InstanceVariableAndWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#389 + # source://prism//lib/prism/mutation_compiler.rb#390 def visit_instance_variable_and_write_node(node); end # Copy a InstanceVariableOperatorWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#394 + # source://prism//lib/prism/mutation_compiler.rb#395 def visit_instance_variable_operator_write_node(node); end # Copy a InstanceVariableOrWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#399 + # source://prism//lib/prism/mutation_compiler.rb#400 def visit_instance_variable_or_write_node(node); end # Copy a InstanceVariableReadNode node # - # source://prism//lib/prism/mutation_compiler.rb#404 + # source://prism//lib/prism/mutation_compiler.rb#405 def visit_instance_variable_read_node(node); end # Copy a InstanceVariableTargetNode node # - # source://prism//lib/prism/mutation_compiler.rb#409 + # source://prism//lib/prism/mutation_compiler.rb#410 def visit_instance_variable_target_node(node); end # Copy a InstanceVariableWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#414 + # source://prism//lib/prism/mutation_compiler.rb#415 def visit_instance_variable_write_node(node); end # Copy a IntegerNode node # - # source://prism//lib/prism/mutation_compiler.rb#419 + # source://prism//lib/prism/mutation_compiler.rb#420 def visit_integer_node(node); end # Copy a InterpolatedMatchLastLineNode node # - # source://prism//lib/prism/mutation_compiler.rb#424 + # source://prism//lib/prism/mutation_compiler.rb#425 def visit_interpolated_match_last_line_node(node); end # Copy a InterpolatedRegularExpressionNode node # - # source://prism//lib/prism/mutation_compiler.rb#429 + # source://prism//lib/prism/mutation_compiler.rb#430 def visit_interpolated_regular_expression_node(node); end # Copy a InterpolatedStringNode node # - # source://prism//lib/prism/mutation_compiler.rb#434 + # source://prism//lib/prism/mutation_compiler.rb#435 def visit_interpolated_string_node(node); end # Copy a InterpolatedSymbolNode node # - # source://prism//lib/prism/mutation_compiler.rb#439 + # source://prism//lib/prism/mutation_compiler.rb#440 def visit_interpolated_symbol_node(node); end # Copy a InterpolatedXStringNode node # - # source://prism//lib/prism/mutation_compiler.rb#444 + # source://prism//lib/prism/mutation_compiler.rb#445 def visit_interpolated_x_string_node(node); end + # Copy a ItParametersNode node + # + # source://prism//lib/prism/mutation_compiler.rb#450 + def visit_it_parameters_node(node); end + # Copy a KeywordHashNode node # - # source://prism//lib/prism/mutation_compiler.rb#449 + # source://prism//lib/prism/mutation_compiler.rb#455 def visit_keyword_hash_node(node); end # Copy a KeywordRestParameterNode node # - # source://prism//lib/prism/mutation_compiler.rb#454 + # source://prism//lib/prism/mutation_compiler.rb#460 def visit_keyword_rest_parameter_node(node); end # Copy a LambdaNode node # - # source://prism//lib/prism/mutation_compiler.rb#459 + # source://prism//lib/prism/mutation_compiler.rb#465 def visit_lambda_node(node); end # Copy a LocalVariableAndWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#464 + # source://prism//lib/prism/mutation_compiler.rb#470 def visit_local_variable_and_write_node(node); end # Copy a LocalVariableOperatorWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#469 + # source://prism//lib/prism/mutation_compiler.rb#475 def visit_local_variable_operator_write_node(node); end # Copy a LocalVariableOrWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#474 + # source://prism//lib/prism/mutation_compiler.rb#480 def visit_local_variable_or_write_node(node); end # Copy a LocalVariableReadNode node # - # source://prism//lib/prism/mutation_compiler.rb#479 + # source://prism//lib/prism/mutation_compiler.rb#485 def visit_local_variable_read_node(node); end # Copy a LocalVariableTargetNode node # - # source://prism//lib/prism/mutation_compiler.rb#484 + # source://prism//lib/prism/mutation_compiler.rb#490 def visit_local_variable_target_node(node); end # Copy a LocalVariableWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#489 + # source://prism//lib/prism/mutation_compiler.rb#495 def visit_local_variable_write_node(node); end # Copy a MatchLastLineNode node # - # source://prism//lib/prism/mutation_compiler.rb#494 + # source://prism//lib/prism/mutation_compiler.rb#500 def visit_match_last_line_node(node); end # Copy a MatchPredicateNode node # - # source://prism//lib/prism/mutation_compiler.rb#499 + # source://prism//lib/prism/mutation_compiler.rb#505 def visit_match_predicate_node(node); end # Copy a MatchRequiredNode node # - # source://prism//lib/prism/mutation_compiler.rb#504 + # source://prism//lib/prism/mutation_compiler.rb#510 def visit_match_required_node(node); end # Copy a MatchWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#509 + # source://prism//lib/prism/mutation_compiler.rb#515 def visit_match_write_node(node); end # Copy a MissingNode node # - # source://prism//lib/prism/mutation_compiler.rb#514 + # source://prism//lib/prism/mutation_compiler.rb#520 def visit_missing_node(node); end # Copy a ModuleNode node # - # source://prism//lib/prism/mutation_compiler.rb#519 + # source://prism//lib/prism/mutation_compiler.rb#525 def visit_module_node(node); end # Copy a MultiTargetNode node # - # source://prism//lib/prism/mutation_compiler.rb#524 + # source://prism//lib/prism/mutation_compiler.rb#530 def visit_multi_target_node(node); end # Copy a MultiWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#529 + # source://prism//lib/prism/mutation_compiler.rb#535 def visit_multi_write_node(node); end # Copy a NextNode node # - # source://prism//lib/prism/mutation_compiler.rb#534 + # source://prism//lib/prism/mutation_compiler.rb#540 def visit_next_node(node); end # Copy a NilNode node # - # source://prism//lib/prism/mutation_compiler.rb#539 + # source://prism//lib/prism/mutation_compiler.rb#545 def visit_nil_node(node); end # Copy a NoKeywordsParameterNode node # - # source://prism//lib/prism/mutation_compiler.rb#544 + # source://prism//lib/prism/mutation_compiler.rb#550 def visit_no_keywords_parameter_node(node); end # Copy a NumberedParametersNode node # - # source://prism//lib/prism/mutation_compiler.rb#549 + # source://prism//lib/prism/mutation_compiler.rb#555 def visit_numbered_parameters_node(node); end # Copy a NumberedReferenceReadNode node # - # source://prism//lib/prism/mutation_compiler.rb#554 + # source://prism//lib/prism/mutation_compiler.rb#560 def visit_numbered_reference_read_node(node); end # Copy a OptionalKeywordParameterNode node # - # source://prism//lib/prism/mutation_compiler.rb#559 + # source://prism//lib/prism/mutation_compiler.rb#565 def visit_optional_keyword_parameter_node(node); end # Copy a OptionalParameterNode node # - # source://prism//lib/prism/mutation_compiler.rb#564 + # source://prism//lib/prism/mutation_compiler.rb#570 def visit_optional_parameter_node(node); end # Copy a OrNode node # - # source://prism//lib/prism/mutation_compiler.rb#569 + # source://prism//lib/prism/mutation_compiler.rb#575 def visit_or_node(node); end # Copy a ParametersNode node # - # source://prism//lib/prism/mutation_compiler.rb#574 + # source://prism//lib/prism/mutation_compiler.rb#580 def visit_parameters_node(node); end # Copy a ParenthesesNode node # - # source://prism//lib/prism/mutation_compiler.rb#579 + # source://prism//lib/prism/mutation_compiler.rb#585 def visit_parentheses_node(node); end # Copy a PinnedExpressionNode node # - # source://prism//lib/prism/mutation_compiler.rb#584 + # source://prism//lib/prism/mutation_compiler.rb#590 def visit_pinned_expression_node(node); end # Copy a PinnedVariableNode node # - # source://prism//lib/prism/mutation_compiler.rb#589 + # source://prism//lib/prism/mutation_compiler.rb#595 def visit_pinned_variable_node(node); end # Copy a PostExecutionNode node # - # source://prism//lib/prism/mutation_compiler.rb#594 + # source://prism//lib/prism/mutation_compiler.rb#600 def visit_post_execution_node(node); end # Copy a PreExecutionNode node # - # source://prism//lib/prism/mutation_compiler.rb#599 + # source://prism//lib/prism/mutation_compiler.rb#605 def visit_pre_execution_node(node); end # Copy a ProgramNode node # - # source://prism//lib/prism/mutation_compiler.rb#604 + # source://prism//lib/prism/mutation_compiler.rb#610 def visit_program_node(node); end # Copy a RangeNode node # - # source://prism//lib/prism/mutation_compiler.rb#609 + # source://prism//lib/prism/mutation_compiler.rb#615 def visit_range_node(node); end # Copy a RationalNode node # - # source://prism//lib/prism/mutation_compiler.rb#614 + # source://prism//lib/prism/mutation_compiler.rb#620 def visit_rational_node(node); end # Copy a RedoNode node # - # source://prism//lib/prism/mutation_compiler.rb#619 + # source://prism//lib/prism/mutation_compiler.rb#625 def visit_redo_node(node); end # Copy a RegularExpressionNode node # - # source://prism//lib/prism/mutation_compiler.rb#624 + # source://prism//lib/prism/mutation_compiler.rb#630 def visit_regular_expression_node(node); end # Copy a RequiredKeywordParameterNode node # - # source://prism//lib/prism/mutation_compiler.rb#629 + # source://prism//lib/prism/mutation_compiler.rb#635 def visit_required_keyword_parameter_node(node); end # Copy a RequiredParameterNode node # - # source://prism//lib/prism/mutation_compiler.rb#634 + # source://prism//lib/prism/mutation_compiler.rb#640 def visit_required_parameter_node(node); end # Copy a RescueModifierNode node # - # source://prism//lib/prism/mutation_compiler.rb#639 + # source://prism//lib/prism/mutation_compiler.rb#645 def visit_rescue_modifier_node(node); end # Copy a RescueNode node # - # source://prism//lib/prism/mutation_compiler.rb#644 + # source://prism//lib/prism/mutation_compiler.rb#650 def visit_rescue_node(node); end # Copy a RestParameterNode node # - # source://prism//lib/prism/mutation_compiler.rb#649 + # source://prism//lib/prism/mutation_compiler.rb#655 def visit_rest_parameter_node(node); end # Copy a RetryNode node # - # source://prism//lib/prism/mutation_compiler.rb#654 + # source://prism//lib/prism/mutation_compiler.rb#660 def visit_retry_node(node); end # Copy a ReturnNode node # - # source://prism//lib/prism/mutation_compiler.rb#659 + # source://prism//lib/prism/mutation_compiler.rb#665 def visit_return_node(node); end # Copy a SelfNode node # - # source://prism//lib/prism/mutation_compiler.rb#664 + # source://prism//lib/prism/mutation_compiler.rb#670 def visit_self_node(node); end + # Copy a ShareableConstantNode node + # + # source://prism//lib/prism/mutation_compiler.rb#675 + def visit_shareable_constant_node(node); end + # Copy a SingletonClassNode node # - # source://prism//lib/prism/mutation_compiler.rb#669 + # source://prism//lib/prism/mutation_compiler.rb#680 def visit_singleton_class_node(node); end # Copy a SourceEncodingNode node # - # source://prism//lib/prism/mutation_compiler.rb#674 + # source://prism//lib/prism/mutation_compiler.rb#685 def visit_source_encoding_node(node); end # Copy a SourceFileNode node # - # source://prism//lib/prism/mutation_compiler.rb#679 + # source://prism//lib/prism/mutation_compiler.rb#690 def visit_source_file_node(node); end # Copy a SourceLineNode node # - # source://prism//lib/prism/mutation_compiler.rb#684 + # source://prism//lib/prism/mutation_compiler.rb#695 def visit_source_line_node(node); end # Copy a SplatNode node # - # source://prism//lib/prism/mutation_compiler.rb#689 + # source://prism//lib/prism/mutation_compiler.rb#700 def visit_splat_node(node); end # Copy a StatementsNode node # - # source://prism//lib/prism/mutation_compiler.rb#694 + # source://prism//lib/prism/mutation_compiler.rb#705 def visit_statements_node(node); end # Copy a StringNode node # - # source://prism//lib/prism/mutation_compiler.rb#699 + # source://prism//lib/prism/mutation_compiler.rb#710 def visit_string_node(node); end # Copy a SuperNode node # - # source://prism//lib/prism/mutation_compiler.rb#704 + # source://prism//lib/prism/mutation_compiler.rb#715 def visit_super_node(node); end # Copy a SymbolNode node # - # source://prism//lib/prism/mutation_compiler.rb#709 + # source://prism//lib/prism/mutation_compiler.rb#720 def visit_symbol_node(node); end # Copy a TrueNode node # - # source://prism//lib/prism/mutation_compiler.rb#714 + # source://prism//lib/prism/mutation_compiler.rb#725 def visit_true_node(node); end # Copy a UndefNode node # - # source://prism//lib/prism/mutation_compiler.rb#719 + # source://prism//lib/prism/mutation_compiler.rb#730 def visit_undef_node(node); end # Copy a UnlessNode node # - # source://prism//lib/prism/mutation_compiler.rb#724 + # source://prism//lib/prism/mutation_compiler.rb#735 def visit_unless_node(node); end # Copy a UntilNode node # - # source://prism//lib/prism/mutation_compiler.rb#729 + # source://prism//lib/prism/mutation_compiler.rb#740 def visit_until_node(node); end # Copy a WhenNode node # - # source://prism//lib/prism/mutation_compiler.rb#734 + # source://prism//lib/prism/mutation_compiler.rb#745 def visit_when_node(node); end # Copy a WhileNode node # - # source://prism//lib/prism/mutation_compiler.rb#739 + # source://prism//lib/prism/mutation_compiler.rb#750 def visit_while_node(node); end # Copy a XStringNode node # - # source://prism//lib/prism/mutation_compiler.rb#744 + # source://prism//lib/prism/mutation_compiler.rb#755 def visit_x_string_node(node); end # Copy a YieldNode node # - # source://prism//lib/prism/mutation_compiler.rb#749 + # source://prism//lib/prism/mutation_compiler.rb#760 def visit_yield_node(node); end + + Result = type_member end # Represents the use of the `next` keyword. @@ -20299,80 +22671,96 @@ end # next 1 # ^^^^^^ # -# source://prism//lib/prism/node.rb#13810 +# source://prism//lib/prism/node.rb#13440 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#13812 + # source://prism//lib/prism/node.rb#13442 + sig do + params( + source: Prism::Source, + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, arguments, keyword_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13821 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#13451 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#13861 + # source://prism//lib/prism/node.rb#13486 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13826 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#13456 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13838 + # source://prism//lib/prism/node.rb#13468 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13831 + # source://prism//lib/prism/node.rb#13461 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> NextNode + # def copy: (?arguments: ArgumentsNode?, ?keyword_loc: Location, ?location: Location) -> NextNode # - # source://prism//lib/prism/node.rb#13843 - sig { params(params: T.untyped).returns(Prism::NextNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#13473 + sig do + params( + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::NextNode) + end + def copy(arguments: T.unsafe(nil), keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13826 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#13456 + 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#13856 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#13481 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#13876 + # source://prism//lib/prism/node.rb#13502 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#13871 + # source://prism//lib/prism/node.rb#13497 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#13864 + # source://prism//lib/prism/node.rb#13489 sig { returns(Prism::Location) } def keyword_loc; end @@ -20391,7 +22779,8 @@ class Prism::NextNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#13902 + # source://prism//lib/prism/node.rb#13528 + sig { override.returns(Symbol) } def type; end class << self @@ -20402,7 +22791,7 @@ class Prism::NextNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#13912 + # source://prism//lib/prism/node.rb#13538 def type; end end end @@ -20412,63 +22801,66 @@ end # nil # ^^^ # -# source://prism//lib/prism/node.rb#13921 +# source://prism//lib/prism/node.rb#13547 class Prism::NilNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [NilNode] a new instance of NilNode # - # source://prism//lib/prism/node.rb#13923 + # source://prism//lib/prism/node.rb#13549 + sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13930 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#13556 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13935 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#13561 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13945 + # source://prism//lib/prism/node.rb#13571 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13940 + # source://prism//lib/prism/node.rb#13566 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> NilNode + # def copy: (?location: Location) -> NilNode # - # source://prism//lib/prism/node.rb#13950 - sig { params(params: T.untyped).returns(Prism::NilNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#13576 + 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#13935 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#13561 + 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#13961 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#13584 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#13967 + # source://prism//lib/prism/node.rb#13590 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of @@ -20486,7 +22878,8 @@ class Prism::NilNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#13986 + # source://prism//lib/prism/node.rb#13609 + sig { override.returns(Symbol) } def type; end class << self @@ -20497,7 +22890,7 @@ class Prism::NilNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#13996 + # source://prism//lib/prism/node.rb#13619 def type; end end end @@ -20508,86 +22901,102 @@ end # ^^^^^ # end # -# source://prism//lib/prism/node.rb#14006 +# source://prism//lib/prism/node.rb#13629 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#14008 + # source://prism//lib/prism/node.rb#13631 + sig do + params( + source: Prism::Source, + operator_loc: Prism::Location, + keyword_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, operator_loc, keyword_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14017 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#13640 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14022 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#13645 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14032 + # source://prism//lib/prism/node.rb#13655 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14027 + # source://prism//lib/prism/node.rb#13650 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> NoKeywordsParameterNode + # def copy: (?operator_loc: Location, ?keyword_loc: Location, ?location: Location) -> NoKeywordsParameterNode # - # source://prism//lib/prism/node.rb#14037 - sig { params(params: T.untyped).returns(Prism::NoKeywordsParameterNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#13660 + sig do + params( + operator_loc: Prism::Location, + keyword_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::NoKeywordsParameterNode) + end + def copy(operator_loc: T.unsafe(nil), keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14022 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#13645 + 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#14050 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#13668 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#14078 + # source://prism//lib/prism/node.rb#13698 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#14073 + # source://prism//lib/prism/node.rb#13693 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#14061 + # source://prism//lib/prism/node.rb#13680 sig { returns(Prism::Location) } def keyword_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#14068 + # source://prism//lib/prism/node.rb#13688 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#14055 + # source://prism//lib/prism/node.rb#13673 sig { returns(Prism::Location) } def operator_loc; end @@ -20606,7 +23015,8 @@ class Prism::NoKeywordsParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#14099 + # source://prism//lib/prism/node.rb#13719 + sig { override.returns(Symbol) } def type; end class << self @@ -20617,7 +23027,7 @@ class Prism::NoKeywordsParameterNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#14109 + # source://prism//lib/prism/node.rb#13729 def type; end end end @@ -20625,14 +23035,16 @@ end # This represents a node in the tree. It is the parent class of all of the # various node types. # -# source://prism//lib/prism/node.rb#11 +# source://prism//lib/prism/node.rb#12 class Prism::Node + abstract! + # Accepts a visitor and calls back into the specialized visit function. # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#62 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#90 + sig { abstract.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # Returns an array of child nodes, including `nil`s in the place of optional @@ -20640,8 +23052,8 @@ class Prism::Node # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#68 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#96 + sig { abstract.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # Returns an array of child nodes and locations that could potentially have @@ -20649,7 +23061,8 @@ class Prism::Node # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#82 + # source://prism//lib/prism/node.rb#110 + sig { abstract.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # Returns an array of child nodes, excluding any `nil`s in the place of @@ -20657,8 +23070,8 @@ class Prism::Node # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#76 - sig { returns(T::Array[Prism::Node]) } + # source://prism//lib/prism/node.rb#104 + sig { abstract.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # Returns an array of child nodes, including `nil`s in the place of optional @@ -20666,40 +23079,66 @@ class Prism::Node # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#68 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#96 + sig { abstract.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end + # The end offset of the node in the source. This method is effectively a + # delegate method to the location object. + # + # source://prism//lib/prism/node.rb#34 + sig { returns(Integer) } + def end_offset; end + + sig { abstract.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # Returns a string representation of the node. + # + # @raise [NoMethodError] + # + # source://prism//lib/prism/node.rb#121 + sig { abstract.params(inspector: Prism::NodeInspector).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + # A Location instance that represents the location of this node in the # source. # - # source://prism//lib/prism/node.rb#18 + # source://prism//lib/prism/node.rb#19 sig { returns(Prism::Location) } def location; end # @return [Boolean] # - # source://prism//lib/prism/node.rb#23 + # source://prism//lib/prism/node.rb#39 def newline?; end # Similar to inspect, but respects the current level of indentation given by # the pretty print object. # - # source://prism//lib/prism/node.rb#42 + # source://prism//lib/prism/node.rb#58 + sig { params(q: T.untyped).void } def pretty_print(q); end - # source://prism//lib/prism/node.rb#27 + # source://prism//lib/prism/node.rb#43 def set_newline_flag(newline_marked); end # Slice the location of the node from the source. # - # source://prism//lib/prism/node.rb#36 + # source://prism//lib/prism/node.rb#52 sig { returns(String) } def slice; end + # The start offset of the node in the source. This method is effectively a + # delegate method to the location object. + # + # source://prism//lib/prism/node.rb#27 + sig { returns(Integer) } + def start_offset; end + # Convert this node into a graphviz dot graph string. # - # source://prism//lib/prism/node.rb#50 + # source://prism//lib/prism/node.rb#66 sig { returns(String) } def to_dot; end @@ -20708,16 +23147,34 @@ class Prism::Node # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#88 - sig { returns(Symbol) } + # source://prism//lib/prism/node.rb#116 + sig { abstract.returns(Symbol) } def type; end private # A pointer to the source that this node was created from. # - # source://prism//lib/prism/node.rb#13 + # source://prism//lib/prism/node.rb#14 def source; end + + class << self + # Returns a list of the fields that exist for this node class. Fields + # describe the structure of the node. This kind of reflection is useful for + # things like recursively visiting each node _and_ field in the tree. + # + # @raise [NoMethodError] + # + # source://prism//lib/prism/node.rb#74 + def fields; end + + # Returns the type of the node as a symbol. + # + # @raise [NoMethodError] + # + # source://prism//lib/prism/node.rb#126 + def type; end + end end # This object is responsible for generating the output for the inspect method @@ -20733,55 +23190,44 @@ class Prism::NodeInspector # Appends a line to the output with the current prefix. # # source://prism//lib/prism/node_inspector.rb#15 - sig { params(line: String).void } def <<(line); end # Returns a new inspector that can be used to inspect a child node. # # source://prism//lib/prism/node_inspector.rb#59 - sig { params(append: String).returns(Prism::NodeInspector) } def child_inspector(append); end # Generates a string that represents a child node. # # source://prism//lib/prism/node_inspector.rb#54 - sig { params(node: Prism::Node, append: String).returns(String) } 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 - # This generates a string that is used as the header of the inspect output - sig { params(node: Prism::Node).returns(String) } 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 - # Generates a string that represents a list of nodes. It handles properly - sig { params(prefix: String, nodes: T::Array[Prism::Node]).returns(String) } def list(prefix, nodes); end # Generates a string that represents a location field on a node. # # source://prism//lib/prism/node_inspector.rb#45 - sig { params(value: Prism::Location).returns(String) } def location(value); end # source://prism//lib/prism/node_inspector.rb#7 - sig { returns(String) } def output; end # source://prism//lib/prism/node_inspector.rb#7 - sig { returns(String) } def prefix; end # Returns the output as a string. # # source://prism//lib/prism/node_inspector.rb#64 - sig { returns(String) } def to_str; end end @@ -20790,68 +23236,71 @@ end # -> { _1 + _2 } # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#14118 +# source://prism//lib/prism/node.rb#13738 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#14120 + # source://prism//lib/prism/node.rb#13740 + sig { params(source: Prism::Source, maximum: Integer, location: Prism::Location).void } def initialize(source, maximum, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14128 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#13748 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14133 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#13753 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14143 + # source://prism//lib/prism/node.rb#13763 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14138 + # source://prism//lib/prism/node.rb#13758 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> NumberedParametersNode + # def copy: (?maximum: Integer, ?location: Location) -> NumberedParametersNode # - # source://prism//lib/prism/node.rb#14148 - sig { params(params: T.untyped).returns(Prism::NumberedParametersNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#13768 + 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#14133 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#13753 + 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#14160 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#13776 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#14169 + # source://prism//lib/prism/node.rb#13785 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader maximum: Integer # - # source://prism//lib/prism/node.rb#14165 + # source://prism//lib/prism/node.rb#13781 sig { returns(Integer) } def maximum; end @@ -20870,7 +23319,8 @@ class Prism::NumberedParametersNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#14189 + # source://prism//lib/prism/node.rb#13805 + sig { override.returns(Symbol) } def type; end class << self @@ -20881,7 +23331,7 @@ class Prism::NumberedParametersNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#14199 + # source://prism//lib/prism/node.rb#13815 def type; end end end @@ -20891,74 +23341,77 @@ end # $1 # ^^ # -# source://prism//lib/prism/node.rb#14208 +# source://prism//lib/prism/node.rb#13824 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#14210 + # source://prism//lib/prism/node.rb#13826 + sig { params(source: Prism::Source, number: Integer, location: Prism::Location).void } def initialize(source, number, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14218 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#13834 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14223 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#13839 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14233 + # source://prism//lib/prism/node.rb#13849 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14228 + # source://prism//lib/prism/node.rb#13844 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> NumberedReferenceReadNode + # def copy: (?number: Integer, ?location: Location) -> NumberedReferenceReadNode # - # source://prism//lib/prism/node.rb#14238 - sig { params(params: T.untyped).returns(Prism::NumberedReferenceReadNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#13854 + 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#14223 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#13839 + 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#14250 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#13862 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#14265 + # source://prism//lib/prism/node.rb#13877 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end - # The (1-indexed, from the left) number of the capture group. Numbered references that would overflow a `uint32` result in a `number` of exactly `2**32 - 1`. + # The (1-indexed, from the left) number of the capture group. Numbered references that are too large result in this value being `0`. # # $1 # number `1` # # $5432 # number `5432` # - # $4294967296 # number `4294967295` + # $4294967296 # number `0` # - # source://prism//lib/prism/node.rb#14261 + # source://prism//lib/prism/node.rb#13873 sig { returns(Integer) } def number; end @@ -20977,7 +23430,8 @@ class Prism::NumberedReferenceReadNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#14285 + # source://prism//lib/prism/node.rb#13897 + sig { override.returns(Symbol) } def type; end class << self @@ -20988,7 +23442,7 @@ class Prism::NumberedReferenceReadNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#14295 + # source://prism//lib/prism/node.rb#13907 def type; end end end @@ -20999,74 +23453,94 @@ end # ^^^^ # end # -# source://prism//lib/prism/node.rb#14305 +# source://prism//lib/prism/node.rb#13917 class Prism::OptionalKeywordParameterNode < ::Prism::Node - # def initialize: (Integer flags, Symbol name, Location name_loc, Node value, Location location) -> void + # 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#14307 + # source://prism//lib/prism/node.rb#13919 + sig do + params( + source: Prism::Source, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end def initialize(source, flags, name, name_loc, value, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14318 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#13930 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14323 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#13935 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14333 + # source://prism//lib/prism/node.rb#13945 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14328 + # source://prism//lib/prism/node.rb#13940 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> OptionalKeywordParameterNode + # def copy: (?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?location: Location) -> OptionalKeywordParameterNode # - # source://prism//lib/prism/node.rb#14338 - sig { params(params: T.untyped).returns(Prism::OptionalKeywordParameterNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#13950 + sig do + params( + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::OptionalKeywordParameterNode) + end + def copy(flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14323 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#13935 + 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: Node, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, name_loc: Location, value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#14353 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#13958 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#14380 + # source://prism//lib/prism/node.rb#13986 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#14362 + # source://prism//lib/prism/node.rb#13967 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#14365 + # source://prism//lib/prism/node.rb#13970 sig { returns(Prism::Location) } def name_loc; end @@ -21074,7 +23548,7 @@ class Prism::OptionalKeywordParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#14375 + # source://prism//lib/prism/node.rb#13981 sig { returns(T::Boolean) } def repeated_parameter?; end @@ -21093,12 +23567,13 @@ class Prism::OptionalKeywordParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#14405 + # source://prism//lib/prism/node.rb#14011 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#14371 + # source://prism//lib/prism/node.rb#13977 sig { returns(Prism::Node) } def value; end @@ -21106,7 +23581,7 @@ class Prism::OptionalKeywordParameterNode < ::Prism::Node # private attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#14358 + # source://prism//lib/prism/node.rb#13963 sig { returns(Integer) } def flags; end @@ -21118,7 +23593,7 @@ class Prism::OptionalKeywordParameterNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#14415 + # source://prism//lib/prism/node.rb#14021 def type; end end end @@ -21129,86 +23604,108 @@ end # ^^^^^ # end # -# source://prism//lib/prism/node.rb#14425 +# source://prism//lib/prism/node.rb#14031 class Prism::OptionalParameterNode < ::Prism::Node - # def initialize: (Integer flags, Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void + # 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#14427 + # source://prism//lib/prism/node.rb#14033 + sig do + params( + source: Prism::Source, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end def initialize(source, flags, name, name_loc, operator_loc, value, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14439 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#14045 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14444 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#14050 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14454 + # source://prism//lib/prism/node.rb#14060 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14449 + # source://prism//lib/prism/node.rb#14055 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> OptionalParameterNode + # def copy: (?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> OptionalParameterNode # - # source://prism//lib/prism/node.rb#14459 - sig { params(params: T.untyped).returns(Prism::OptionalParameterNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#14065 + sig do + params( + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::OptionalParameterNode) + end + def copy(flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14444 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#14050 + 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: Node, location: Location } + # 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#14475 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#14073 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#14513 + # source://prism//lib/prism/node.rb#14113 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#14484 + # source://prism//lib/prism/node.rb#14082 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#14487 + # source://prism//lib/prism/node.rb#14085 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#14508 + # source://prism//lib/prism/node.rb#14108 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#14493 + # source://prism//lib/prism/node.rb#14092 sig { returns(Prism::Location) } def operator_loc; end @@ -21216,7 +23713,7 @@ class Prism::OptionalParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#14503 + # source://prism//lib/prism/node.rb#14103 sig { returns(T::Boolean) } def repeated_parameter?; end @@ -21235,12 +23732,13 @@ class Prism::OptionalParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#14539 + # source://prism//lib/prism/node.rb#14139 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#14499 + # source://prism//lib/prism/node.rb#14099 sig { returns(Prism::Node) } def value; end @@ -21248,7 +23746,7 @@ class Prism::OptionalParameterNode < ::Prism::Node # private attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#14480 + # source://prism//lib/prism/node.rb#14078 sig { returns(Integer) } def flags; end @@ -21260,7 +23758,7 @@ class Prism::OptionalParameterNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#14549 + # source://prism//lib/prism/node.rb#14149 def type; end end end @@ -21270,63 +23768,81 @@ end # left or right # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#14558 +# source://prism//lib/prism/node.rb#14158 class Prism::OrNode < ::Prism::Node - # def initialize: (Node left, Node right, Location operator_loc, Location location) -> void + # 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#14560 + # source://prism//lib/prism/node.rb#14160 + sig do + params( + source: Prism::Source, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, left, right, operator_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14570 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#14170 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14575 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#14175 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14585 + # source://prism//lib/prism/node.rb#14185 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14580 + # source://prism//lib/prism/node.rb#14180 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> OrNode + # def copy: (?left: Prism::node, ?right: Prism::node, ?operator_loc: Location, ?location: Location) -> OrNode # - # source://prism//lib/prism/node.rb#14590 - sig { params(params: T.untyped).returns(Prism::OrNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#14190 + sig do + params( + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::OrNode) + end + def copy(left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14575 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#14175 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { left: Node, right: Node, operator_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { left: Prism::node, right: Prism::node, operator_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#14604 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#14198 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#14642 + # source://prism//lib/prism/node.rb#14237 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); 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). @@ -21337,13 +23853,13 @@ class Prism::OrNode < ::Prism::Node # 1 || 2 # ^ # - # source://prism//lib/prism/node.rb#14615 + # source://prism//lib/prism/node.rb#14209 sig { returns(Prism::Node) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#14637 + # source://prism//lib/prism/node.rb#14232 sig { returns(String) } def operator; end @@ -21352,7 +23868,7 @@ class Prism::OrNode < ::Prism::Node # left or right # ^^ # - # source://prism//lib/prism/node.rb#14630 + # source://prism//lib/prism/node.rb#14224 sig { returns(Prism::Location) } def operator_loc; end @@ -21364,7 +23880,7 @@ class Prism::OrNode < ::Prism::Node # 1 or 2 # ^ # - # source://prism//lib/prism/node.rb#14624 + # source://prism//lib/prism/node.rb#14218 sig { returns(Prism::Node) } def right; end @@ -21383,7 +23899,8 @@ class Prism::OrNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#14666 + # source://prism//lib/prism/node.rb#14261 + sig { override.returns(Symbol) } def type; end class << self @@ -21394,261 +23911,261 @@ class Prism::OrNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#14676 + # source://prism//lib/prism/node.rb#14271 def type; end end end # A parser for the pack template language. # -# source://prism//lib/prism/pack.rb#5 +# source://prism//lib/prism/pack.rb#6 module Prism::Pack class << self def parse(_arg0, _arg1, _arg2); end end end -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::AGNOSTIC_ENDIAN = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::BACK = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::BER = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::BIG_ENDIAN = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::COMMENT = T.let(T.unsafe(nil), Symbol) # A directive in the pack template language. # -# source://prism//lib/prism/pack.rb#59 +# source://prism//lib/prism/pack.rb#60 class Prism::Pack::Directive # Initialize a new directive with the given values. # # @return [Directive] a new instance of Directive # - # source://prism//lib/prism/pack.rb#88 + # source://prism//lib/prism/pack.rb#89 def initialize(version, variant, source, type, signed, endian, size, length_type, length); end # Provide a human-readable description of the directive. # - # source://prism//lib/prism/pack.rb#130 + # source://prism//lib/prism/pack.rb#131 def describe; end # The type of endianness of the directive. # - # source://prism//lib/prism/pack.rb#76 + # source://prism//lib/prism/pack.rb#77 def endian; end # The length of this directive (used for integers). # - # source://prism//lib/prism/pack.rb#85 + # source://prism//lib/prism/pack.rb#86 def length; end # The length type of this directive (used for integers). # - # source://prism//lib/prism/pack.rb#82 + # source://prism//lib/prism/pack.rb#83 def length_type; end # The type of signedness of the directive. # - # source://prism//lib/prism/pack.rb#73 + # source://prism//lib/prism/pack.rb#74 def signed; end # The size of the directive. # - # source://prism//lib/prism/pack.rb#79 + # source://prism//lib/prism/pack.rb#80 def size; end # A byteslice of the source string that this directive represents. # - # source://prism//lib/prism/pack.rb#67 + # source://prism//lib/prism/pack.rb#68 def source; end # The type of the directive. # - # source://prism//lib/prism/pack.rb#70 + # source://prism//lib/prism/pack.rb#71 def type; end # A symbol representing whether or not we are packing or unpacking. # - # source://prism//lib/prism/pack.rb#64 + # source://prism//lib/prism/pack.rb#65 def variant; end # A symbol representing the version of Ruby. # - # source://prism//lib/prism/pack.rb#61 + # source://prism//lib/prism/pack.rb#62 def version; end end # The descriptions of the various types of endianness. # -# source://prism//lib/prism/pack.rb#101 +# source://prism//lib/prism/pack.rb#102 Prism::Pack::Directive::ENDIAN_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) # The descriptions of the various types of signedness. # -# source://prism//lib/prism/pack.rb#110 +# source://prism//lib/prism/pack.rb#111 Prism::Pack::Directive::SIGNED_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) # The descriptions of the various types of sizes. # -# source://prism//lib/prism/pack.rb#117 +# source://prism//lib/prism/pack.rb#118 Prism::Pack::Directive::SIZE_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::ENDIAN_NA = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::FLOAT = T.let(T.unsafe(nil), Symbol) # The result of parsing a pack template. # -# source://prism//lib/prism/pack.rb#195 +# source://prism//lib/prism/pack.rb#198 class Prism::Pack::Format # Create a new Format with the given directives and encoding. # # @return [Format] a new instance of Format # - # source://prism//lib/prism/pack.rb#203 + # source://prism//lib/prism/pack.rb#206 def initialize(directives, encoding); end # Provide a human-readable description of the format. # - # source://prism//lib/prism/pack.rb#209 + # source://prism//lib/prism/pack.rb#212 def describe; end # A list of the directives in the template. # - # source://prism//lib/prism/pack.rb#197 + # source://prism//lib/prism/pack.rb#200 def directives; end # The encoding of the template. # - # source://prism//lib/prism/pack.rb#200 + # source://prism//lib/prism/pack.rb#203 def encoding; end end -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::INTEGER = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::LENGTH_FIXED = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::LENGTH_MAX = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::LENGTH_NA = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::LENGTH_RELATIVE = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::LITTLE_ENDIAN = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::MOVE = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::NATIVE_ENDIAN = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::NULL = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::SIGNED = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::SIGNED_NA = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::SIZE_16 = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::SIZE_32 = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::SIZE_64 = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::SIZE_8 = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::SIZE_INT = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::SIZE_LONG = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::SIZE_LONG_LONG = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::SIZE_NA = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::SIZE_P = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::SIZE_SHORT = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::SPACE = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::STRING_BASE64 = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::STRING_FIXED = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::STRING_HEX_HIGH = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::STRING_HEX_LOW = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::STRING_LSB = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::STRING_MIME = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::STRING_MSB = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::STRING_NULL_PADDED = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::STRING_NULL_TERMINATED = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::STRING_POINTER = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::STRING_SPACE_PADDED = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::STRING_UU = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::UNSIGNED = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::UTF8 = T.let(T.unsafe(nil), Symbol) # Flags for parameter nodes. # -# source://prism//lib/prism/node.rb#19304 +# source://prism//lib/prism/node.rb#18902 module Prism::ParameterFlags; end # a parameter name that has been repeated in the method signature # -# source://prism//lib/prism/node.rb#19306 +# source://prism//lib/prism/node.rb#18904 Prism::ParameterFlags::REPEATED_PARAMETER = T.let(T.unsafe(nil), Integer) # Represents the list of parameters on a method, block, or lambda definition. @@ -21657,110 +24174,141 @@ Prism::ParameterFlags::REPEATED_PARAMETER = T.let(T.unsafe(nil), Integer) # ^^^^^^^ # end # -# source://prism//lib/prism/node.rb#14686 +# source://prism//lib/prism/node.rb#14281 class Prism::ParametersNode < ::Prism::Node - # def initialize: (Array[Node] requireds, Array[Node] optionals, Node? rest, Array[Node] posts, Array[Node] keywords, Node? 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] 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#14688 + # source://prism//lib/prism/node.rb#14283 + 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)], + keywords: T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)], + keyword_rest: T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode)), + block: T.nilable(Prism::BlockParameterNode), + location: Prism::Location + ).void + end def initialize(source, requireds, optionals, rest, posts, keywords, keyword_rest, block, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14702 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#14297 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader block: BlockParameterNode? # - # source://prism//lib/prism/node.rb#14771 + # source://prism//lib/prism/node.rb#14356 sig { returns(T.nilable(Prism::BlockParameterNode)) } def block; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14707 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#14302 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14725 + # source://prism//lib/prism/node.rb#14320 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14712 + # source://prism//lib/prism/node.rb#14307 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ParametersNode + # 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 # - # source://prism//lib/prism/node.rb#14730 - sig { params(params: T.untyped).returns(Prism::ParametersNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#14325 + 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)], + keywords: T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)], + keyword_rest: T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode)), + block: T.nilable(Prism::BlockParameterNode), + location: Prism::Location + ).returns(Prism::ParametersNode) + end + def copy(requireds: T.unsafe(nil), optionals: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), keywords: T.unsafe(nil), keyword_rest: T.unsafe(nil), block: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14707 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#14302 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { requireds: Array[Node], optionals: Array[Node], rest: Node?, posts: Array[Node], keywords: Array[Node], keyword_rest: Node?, 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], keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode], keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil, block: BlockParameterNode?, location: Location } # - # source://prism//lib/prism/node.rb#14748 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#14333 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#14775 + # source://prism//lib/prism/node.rb#14360 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end - # attr_reader keyword_rest: Node? + # attr_reader keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil # - # source://prism//lib/prism/node.rb#14768 - sig { returns(T.nilable(Prism::Node)) } + # source://prism//lib/prism/node.rb#14353 + sig do + returns(T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode))) + end def keyword_rest; end - # attr_reader keywords: Array[Node] + # attr_reader keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode] # - # source://prism//lib/prism/node.rb#14765 - sig { returns(T::Array[Prism::Node]) } + # source://prism//lib/prism/node.rb#14350 + sig { returns(T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)]) } def keywords; end - # attr_reader optionals: Array[Node] + # attr_reader optionals: Array[OptionalParameterNode] # - # source://prism//lib/prism/node.rb#14756 - sig { returns(T::Array[Prism::Node]) } + # source://prism//lib/prism/node.rb#14341 + sig { returns(T::Array[Prism::OptionalParameterNode]) } def optionals; end - # attr_reader posts: Array[Node] + # attr_reader posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode] # - # source://prism//lib/prism/node.rb#14762 - sig { returns(T::Array[Prism::Node]) } + # source://prism//lib/prism/node.rb#14347 + sig do + returns(T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode)]) + end def posts; end - # attr_reader requireds: Array[Node] + # attr_reader requireds: Array[RequiredParameterNode | MultiTargetNode] # - # source://prism//lib/prism/node.rb#14753 - sig { returns(T::Array[Prism::Node]) } + # source://prism//lib/prism/node.rb#14338 + sig { returns(T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)]) } def requireds; end - # attr_reader rest: Node? + # attr_reader rest: RestParameterNode | ImplicitRestNode | nil # - # source://prism//lib/prism/node.rb#14759 - sig { returns(T.nilable(Prism::Node)) } + # source://prism//lib/prism/node.rb#14344 + 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#172 + # source://prism//lib/prism/node_ext.rb#210 + sig { returns(T::Array[T.any([Symbol, Symbol], [Symbol])]) } def signature; end # Sometimes you want to check an instance of a node against a list of @@ -21778,7 +24326,8 @@ class Prism::ParametersNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#14816 + # source://prism//lib/prism/node.rb#14401 + sig { override.returns(Symbol) } def type; end class << self @@ -21789,7 +24338,7 @@ class Prism::ParametersNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#14826 + # source://prism//lib/prism/node.rb#14411 def type; end end end @@ -21799,96 +24348,114 @@ end # (10 + 34) # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#14835 +# source://prism//lib/prism/node.rb#14420 class Prism::ParenthesesNode < ::Prism::Node - # def initialize: (Node? body, Location opening_loc, Location closing_loc, Location location) -> void + # 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#14837 + # source://prism//lib/prism/node.rb#14422 + sig do + params( + source: Prism::Source, + body: T.nilable(Prism::Node), + opening_loc: Prism::Location, + closing_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, body, opening_loc, closing_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14847 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#14432 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # attr_reader body: Node? + # attr_reader body: Prism::node? # - # source://prism//lib/prism/node.rb#14892 + # source://prism//lib/prism/node.rb#14471 sig { returns(T.nilable(Prism::Node)) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14856 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#14441 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#14913 + # source://prism//lib/prism/node.rb#14494 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#14901 + # source://prism//lib/prism/node.rb#14481 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14868 + # source://prism//lib/prism/node.rb#14453 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14861 + # source://prism//lib/prism/node.rb#14446 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ParenthesesNode + # def copy: (?body: Prism::node?, ?opening_loc: Location, ?closing_loc: Location, ?location: Location) -> ParenthesesNode # - # source://prism//lib/prism/node.rb#14873 - sig { params(params: T.untyped).returns(Prism::ParenthesesNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#14458 + sig do + params( + body: T.nilable(Prism::Node), + opening_loc: Prism::Location, + closing_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::ParenthesesNode) + end + def copy(body: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14856 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#14441 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { body: Node?, opening_loc: Location, closing_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { body: Prism::node?, opening_loc: Location, closing_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#14887 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#14466 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#14918 + # source://prism//lib/prism/node.rb#14499 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String # - # source://prism//lib/prism/node.rb#14908 + # source://prism//lib/prism/node.rb#14489 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#14895 + # source://prism//lib/prism/node.rb#14474 sig { returns(Prism::Location) } def opening_loc; end - # source://prism//lib/prism/node.rb#14851 + # source://prism//lib/prism/node.rb#14436 def set_newline_flag(newline_marked); end # Sometimes you want to check an instance of a node against a list of @@ -21906,7 +24473,8 @@ class Prism::ParenthesesNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#14945 + # source://prism//lib/prism/node.rb#14526 + sig { override.returns(Symbol) } def type; end class << self @@ -21917,90 +24485,113 @@ class Prism::ParenthesesNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#14955 + # source://prism//lib/prism/node.rb#14536 def type; end end end # This represents an error that was encountered during parsing. # -# source://prism//lib/prism/parse_result.rb#338 +# source://prism//lib/prism/parse_result.rb#373 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#349 - def initialize(message, location, level); end + # source://prism//lib/prism/parse_result.rb#388 + 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#356 + # source://prism//lib/prism/parse_result.rb#396 + 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#361 + # source://prism//lib/prism/parse_result.rb#401 + sig { returns(String) } def inspect; end # The level of this error. # - # source://prism//lib/prism/parse_result.rb#346 + # source://prism//lib/prism/parse_result.rb#385 def level; end # A Location object representing the location of this error in the source. # - # source://prism//lib/prism/parse_result.rb#343 - sig { returns(Prism::Location) } + # source://prism//lib/prism/parse_result.rb#382 def location; end # The message associated with this error. # - # source://prism//lib/prism/parse_result.rb#340 - sig { returns(String) } + # source://prism//lib/prism/parse_result.rb#379 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 + def type; end end # This represents the result of a call to ::parse or ::parse_file. It contains # the AST, any comments that were encounters, and any errors that were # encountered. # -# source://prism//lib/prism/parse_result.rb#398 +# source://prism//lib/prism/parse_result.rb#443 class Prism::ParseResult # Create a new parse result object with the given values. # # @return [ParseResult] a new instance of ParseResult # - # source://prism//lib/prism/parse_result.rb#425 + # source://prism//lib/prism/parse_result.rb#470 + sig do + params( + value: Value, + comments: T::Array[Prism::Comment], + magic_comments: T::Array[Prism::MagicComment], + data_loc: T.nilable(Prism::Location), + errors: T::Array[Prism::ParseError], + warnings: T::Array[Prism::ParseWarning], + source: Prism::Source + ).void + end def initialize(value, comments, magic_comments, data_loc, errors, warnings, source); end # Attach the list of comments to their respective locations in the tree. # - # source://prism//lib/prism/parse_result/comments.rb#173 + # source://prism//lib/prism/parse_result/comments.rb#190 def attach_comments!; end # The list of comments that were encountered during parsing. # - # source://prism//lib/prism/parse_result.rb#405 - sig { returns(T::Array[Prism::Comment]) } + # source://prism//lib/prism/parse_result.rb#450 def comments; end # An optional location that represents the location of the __END__ marker # and the rest of the content of the file. This content is loaded into the # DATA constant when the file being parsed is the main file being executed. # - # source://prism//lib/prism/parse_result.rb#413 + # source://prism//lib/prism/parse_result.rb#458 def data_loc; end # Implement the hash pattern matching interface for ParseResult. # - # source://prism//lib/prism/parse_result.rb#436 + # source://prism//lib/prism/parse_result.rb#481 + 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#486 + sig { returns(Encoding) } + def encoding; end + # The list of errors that were generated during parsing. # - # source://prism//lib/prism/parse_result.rb#416 - sig { returns(T::Array[Prism::ParseError]) } + # source://prism//lib/prism/parse_result.rb#461 def errors; end # Returns true if there were errors during parsing and false if there were @@ -22008,12 +24599,13 @@ class Prism::ParseResult # # @return [Boolean] # - # source://prism//lib/prism/parse_result.rb#448 + # source://prism//lib/prism/parse_result.rb#498 + sig { returns(T::Boolean) } def failure?; end # The list of magic comments that were encountered during parsing. # - # source://prism//lib/prism/parse_result.rb#408 + # source://prism//lib/prism/parse_result.rb#453 def magic_comments; end # Walk the tree and mark nodes that are on a new line. @@ -22023,8 +24615,7 @@ class Prism::ParseResult # A Source instance that represents the source code that was parsed. # - # source://prism//lib/prism/parse_result.rb#422 - sig { returns(Prism::Source) } + # source://prism//lib/prism/parse_result.rb#467 def source; end # Returns true if there were no errors during parsing and false if there @@ -22032,22 +24623,23 @@ class Prism::ParseResult # # @return [Boolean] # - # source://prism//lib/prism/parse_result.rb#442 + # source://prism//lib/prism/parse_result.rb#492 + sig { returns(T::Boolean) } def success?; end # The value that was generated by parsing. Normally this holds the AST, but # it can sometimes how a list of tokens or other results passed back from # the parser. # - # source://prism//lib/prism/parse_result.rb#402 - sig { returns(Prism::ProgramNode) } + # source://prism//lib/prism/parse_result.rb#447 def value; end # The list of warnings that were generated during parsing. # - # source://prism//lib/prism/parse_result.rb#419 - sig { returns(T::Array[Prism::ParseWarning]) } + # source://prism//lib/prism/parse_result.rb#464 def warnings; end + + Value = type_member end # When we've parsed the source, we have both the syntax tree and the list of @@ -22072,18 +24664,18 @@ class Prism::ParseResult::Comments # # @return [Comments] a new instance of Comments # - # source://prism//lib/prism/parse_result/comments.rb#78 + # source://prism//lib/prism/parse_result/comments.rb#86 def initialize(parse_result); end # Attach the comments to their respective locations in the tree by # mutating the parse result. # - # source://prism//lib/prism/parse_result/comments.rb#84 + # source://prism//lib/prism/parse_result/comments.rb#92 def attach!; end # The parse result that we are attaching comments to. # - # source://prism//lib/prism/parse_result/comments.rb#74 + # source://prism//lib/prism/parse_result/comments.rb#82 def parse_result; end private @@ -22091,36 +24683,39 @@ class Prism::ParseResult::Comments # Responsible for finding the nearest targets to the given comment within # the context of the given encapsulating node. # - # source://prism//lib/prism/parse_result/comments.rb#103 + # source://prism//lib/prism/parse_result/comments.rb#119 def nearest_targets(node, comment); end end # A target for attaching comments that is based on a location field on a # node. For example, the `end` token of a ClassNode. # -# source://prism//lib/prism/parse_result/comments.rb#49 +# source://prism//lib/prism/parse_result/comments.rb#53 class Prism::ParseResult::Comments::LocationTarget # @return [LocationTarget] a new instance of LocationTarget # - # source://prism//lib/prism/parse_result/comments.rb#52 + # source://prism//lib/prism/parse_result/comments.rb#56 def initialize(location); end - # source://prism//lib/prism/parse_result/comments.rb#68 - def <<(comment); end - # @return [Boolean] # - # source://prism//lib/prism/parse_result/comments.rb#64 + # source://prism//lib/prism/parse_result/comments.rb#68 def encloses?(comment); end - # source://prism//lib/prism/parse_result/comments.rb#60 + # source://prism//lib/prism/parse_result/comments.rb#64 def end_offset; end - # source://prism//lib/prism/parse_result/comments.rb#50 + # source://prism//lib/prism/parse_result/comments.rb#72 + def leading_comment(comment); end + + # source://prism//lib/prism/parse_result/comments.rb#54 def location; end - # source://prism//lib/prism/parse_result/comments.rb#56 + # source://prism//lib/prism/parse_result/comments.rb#60 def start_offset; end + + # source://prism//lib/prism/parse_result/comments.rb#76 + def trailing_comment(comment); end end # A target for attaching comments that is based on a specific node's @@ -22133,9 +24728,6 @@ class Prism::ParseResult::Comments::NodeTarget # source://prism//lib/prism/parse_result/comments.rb#25 def initialize(node); end - # source://prism//lib/prism/parse_result/comments.rb#42 - def <<(comment); end - # @return [Boolean] # # source://prism//lib/prism/parse_result/comments.rb#37 @@ -22144,11 +24736,17 @@ class Prism::ParseResult::Comments::NodeTarget # source://prism//lib/prism/parse_result/comments.rb#33 def end_offset; end + # source://prism//lib/prism/parse_result/comments.rb#42 + def leading_comment(comment); end + # source://prism//lib/prism/parse_result/comments.rb#23 def node; end # source://prism//lib/prism/parse_result/comments.rb#29 def start_offset; end + + # source://prism//lib/prism/parse_result/comments.rb#46 + def trailing_comment(comment); end end # The :line tracepoint event gets fired whenever the Ruby VM encounters an @@ -22204,41 +24802,48 @@ end # This represents a warning that was encountered during parsing. # -# source://prism//lib/prism/parse_result.rb#367 +# source://prism//lib/prism/parse_result.rb#407 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#378 - def initialize(message, location, level); end + # source://prism//lib/prism/parse_result.rb#422 + 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#385 + # source://prism//lib/prism/parse_result.rb#430 + 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#390 + # source://prism//lib/prism/parse_result.rb#435 + sig { returns(String) } def inspect; end # The level of this warning. # - # source://prism//lib/prism/parse_result.rb#375 + # source://prism//lib/prism/parse_result.rb#419 def level; end # A Location object representing the location of this warning in the source. # - # source://prism//lib/prism/parse_result.rb#372 - sig { returns(Prism::Location) } + # source://prism//lib/prism/parse_result.rb#416 def location; end # The message associated with this warning. # - # source://prism//lib/prism/parse_result.rb#369 - sig { returns(String) } + # source://prism//lib/prism/parse_result.rb#413 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 + def type; end end # A pattern is an object that wraps a Ruby pattern matching expression. The @@ -22288,6 +24893,8 @@ class Prism::Pattern # Compile the query into a callable object that can be used to match against # nodes. # + # @raise [CompilationError] + # # source://prism//lib/prism/pattern.rb#70 def compile; end @@ -22301,7 +24908,7 @@ class Prism::Pattern # matches the pattern. If no block is given, an enumerator will be returned # that will yield each node that matches the pattern. # - # source://prism//lib/prism/pattern.rb#79 + # source://prism//lib/prism/pattern.rb#86 def scan(root); end private @@ -22309,75 +24916,75 @@ class Prism::Pattern # Shortcut for combining two procs into one that returns true if both return # true. # - # source://prism//lib/prism/pattern.rb#95 + # source://prism//lib/prism/pattern.rb#102 def combine_and(left, right); end # Shortcut for combining two procs into one that returns true if either # returns true. # - # source://prism//lib/prism/pattern.rb#101 + # source://prism//lib/prism/pattern.rb#108 def combine_or(left, right); end # in foo | bar # - # source://prism//lib/prism/pattern.rb#136 + # source://prism//lib/prism/pattern.rb#143 def compile_alternation_pattern_node(node); end # in [foo, bar, baz] # - # source://prism//lib/prism/pattern.rb#111 + # source://prism//lib/prism/pattern.rb#118 def compile_array_pattern_node(node); end # in Prism::ConstantReadNode # - # source://prism//lib/prism/pattern.rb#141 + # source://prism//lib/prism/pattern.rb#148 def compile_constant_path_node(node); end # in ConstantReadNode # in String # - # source://prism//lib/prism/pattern.rb#153 + # source://prism//lib/prism/pattern.rb#160 def compile_constant_read_node(node); end # Raise an error because the given node is not supported. # # @raise [CompilationError] # - # source://prism//lib/prism/pattern.rb#106 + # source://prism//lib/prism/pattern.rb#113 def compile_error(node); end # in InstanceVariableReadNode[name: Symbol] # in { name: Symbol } # - # source://prism//lib/prism/pattern.rb#171 + # source://prism//lib/prism/pattern.rb#178 def compile_hash_pattern_node(node); end # in nil # - # source://prism//lib/prism/pattern.rb#196 + # source://prism//lib/prism/pattern.rb#208 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#225 + # source://prism//lib/prism/pattern.rb#237 def compile_node(node); end # in /foo/ # - # source://prism//lib/prism/pattern.rb#201 + # source://prism//lib/prism/pattern.rb#213 def compile_regular_expression_node(node); end # in "" # in "foo" # - # source://prism//lib/prism/pattern.rb#209 + # source://prism//lib/prism/pattern.rb#221 def compile_string_node(node); end # in :+ # in :foo # - # source://prism//lib/prism/pattern.rb#217 + # source://prism//lib/prism/pattern.rb#229 def compile_symbol_node(node); end end @@ -22400,104 +25007,124 @@ end # foo in ^(bar) # ^^^^^^ # -# source://prism//lib/prism/node.rb#14964 +# source://prism//lib/prism/node.rb#14545 class Prism::PinnedExpressionNode < ::Prism::Node - # def initialize: (Node expression, Location operator_loc, Location lparen_loc, Location rparen_loc, Location location) -> void + # 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#14966 + # source://prism//lib/prism/node.rb#14547 + sig do + params( + source: Prism::Source, + expression: Prism::Node, + operator_loc: Prism::Location, + lparen_loc: Prism::Location, + rparen_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, expression, operator_loc, lparen_loc, rparen_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14977 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#14558 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14982 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # 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#14992 + # source://prism//lib/prism/node.rb#14573 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14987 + # source://prism//lib/prism/node.rb#14568 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> PinnedExpressionNode + # def copy: (?expression: Prism::node, ?operator_loc: Location, ?lparen_loc: Location, ?rparen_loc: Location, ?location: Location) -> PinnedExpressionNode # - # source://prism//lib/prism/node.rb#14997 - sig { params(params: T.untyped).returns(Prism::PinnedExpressionNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#14578 + sig do + params( + expression: Prism::Node, + operator_loc: Prism::Location, + lparen_loc: Prism::Location, + rparen_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::PinnedExpressionNode) + end + def copy(expression: T.unsafe(nil), operator_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14982 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # 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) -> { expression: Node, operator_loc: Location, lparen_loc: Location, rparen_loc: Location, location: Location } + # 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#15012 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#14586 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # attr_reader expression: Node + # attr_reader expression: Prism::node # - # source://prism//lib/prism/node.rb#15017 + # source://prism//lib/prism/node.rb#14591 sig { returns(Prism::Node) } def expression; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#15054 + # source://prism//lib/prism/node.rb#14631 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def lparen: () -> String # - # source://prism//lib/prism/node.rb#15044 + # source://prism//lib/prism/node.rb#14621 sig { returns(String) } def lparen; end # attr_reader lparen_loc: Location # - # source://prism//lib/prism/node.rb#15026 + # source://prism//lib/prism/node.rb#14601 sig { returns(Prism::Location) } def lparen_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#15039 + # source://prism//lib/prism/node.rb#14616 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#15020 + # source://prism//lib/prism/node.rb#14594 sig { returns(Prism::Location) } def operator_loc; end # def rparen: () -> String # - # source://prism//lib/prism/node.rb#15049 + # source://prism//lib/prism/node.rb#14626 sig { returns(String) } def rparen; end # attr_reader rparen_loc: Location # - # source://prism//lib/prism/node.rb#15032 + # source://prism//lib/prism/node.rb#14608 sig { returns(Prism::Location) } def rparen_loc; end @@ -22516,7 +25143,8 @@ class Prism::PinnedExpressionNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#15078 + # source://prism//lib/prism/node.rb#14655 + sig { override.returns(Symbol) } def type; end class << self @@ -22527,7 +25155,7 @@ class Prism::PinnedExpressionNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#15088 + # source://prism//lib/prism/node.rb#14665 def type; end end end @@ -22537,74 +25165,90 @@ end # foo in ^bar # ^^^^ # -# source://prism//lib/prism/node.rb#15097 +# source://prism//lib/prism/node.rb#14674 class Prism::PinnedVariableNode < ::Prism::Node - # def initialize: (Node variable, Location operator_loc, Location location) -> void + # def initialize: (Prism::node variable, Location operator_loc, Location location) -> void # # @return [PinnedVariableNode] a new instance of PinnedVariableNode # - # source://prism//lib/prism/node.rb#15099 + # source://prism//lib/prism/node.rb#14676 + sig do + params( + source: Prism::Source, + variable: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, variable, operator_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15108 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#14685 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15113 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#14690 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15123 + # source://prism//lib/prism/node.rb#14700 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15118 + # source://prism//lib/prism/node.rb#14695 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> PinnedVariableNode + # def copy: (?variable: Prism::node, ?operator_loc: Location, ?location: Location) -> PinnedVariableNode # - # source://prism//lib/prism/node.rb#15128 - sig { params(params: T.untyped).returns(Prism::PinnedVariableNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#14705 + sig do + params( + variable: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::PinnedVariableNode) + end + def copy(variable: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15113 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # 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) -> { variable: Node, operator_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { variable: Prism::node, operator_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#15141 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#14713 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#15161 + # source://prism//lib/prism/node.rb#14734 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # - # source://prism//lib/prism/node.rb#15156 + # source://prism//lib/prism/node.rb#14729 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#15149 + # source://prism//lib/prism/node.rb#14721 sig { returns(Prism::Location) } def operator_loc; end @@ -22623,12 +25267,13 @@ class Prism::PinnedVariableNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#15183 + # source://prism//lib/prism/node.rb#14756 + sig { override.returns(Symbol) } def type; end - # attr_reader variable: Node + # attr_reader variable: Prism::node # - # source://prism//lib/prism/node.rb#15146 + # source://prism//lib/prism/node.rb#14718 sig { returns(Prism::Node) } def variable; end @@ -22640,7 +25285,7 @@ class Prism::PinnedVariableNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#15193 + # source://prism//lib/prism/node.rb#14766 def type; end end end @@ -22650,104 +25295,124 @@ end # END { foo } # ^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#15202 +# source://prism//lib/prism/node.rb#14775 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#15204 + # source://prism//lib/prism/node.rb#14777 + sig do + params( + source: Prism::Source, + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, statements, keyword_loc, opening_loc, closing_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15215 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#14788 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15220 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#14793 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#15289 + # source://prism//lib/prism/node.rb#14858 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#15272 + # source://prism//lib/prism/node.rb#14840 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15232 + # source://prism//lib/prism/node.rb#14805 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15225 + # source://prism//lib/prism/node.rb#14798 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> PostExecutionNode + # def copy: (?statements: StatementsNode?, ?keyword_loc: Location, ?opening_loc: Location, ?closing_loc: Location, ?location: Location) -> PostExecutionNode # - # source://prism//lib/prism/node.rb#15237 - sig { params(params: T.untyped).returns(Prism::PostExecutionNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#14810 + sig do + params( + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::PostExecutionNode) + end + def copy(statements: T.unsafe(nil), keyword_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15220 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#14793 + 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#15252 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#14818 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#15294 + # source://prism//lib/prism/node.rb#14863 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#15279 + # source://prism//lib/prism/node.rb#14848 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#15260 + # source://prism//lib/prism/node.rb#14826 sig { returns(Prism::Location) } def keyword_loc; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#15284 + # source://prism//lib/prism/node.rb#14853 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#15266 + # source://prism//lib/prism/node.rb#14833 sig { returns(Prism::Location) } def opening_loc; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#15257 + # source://prism//lib/prism/node.rb#14823 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -22766,7 +25431,8 @@ class Prism::PostExecutionNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#15322 + # source://prism//lib/prism/node.rb#14891 + sig { override.returns(Symbol) } def type; end class << self @@ -22777,7 +25443,7 @@ class Prism::PostExecutionNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#15332 + # source://prism//lib/prism/node.rb#14901 def type; end end end @@ -22787,104 +25453,124 @@ end # BEGIN { foo } # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#15341 +# source://prism//lib/prism/node.rb#14910 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#15343 + # source://prism//lib/prism/node.rb#14912 + sig do + params( + source: Prism::Source, + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, statements, keyword_loc, opening_loc, closing_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15354 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#14923 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15359 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#14928 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#15428 + # source://prism//lib/prism/node.rb#14993 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#15411 + # source://prism//lib/prism/node.rb#14975 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15371 + # source://prism//lib/prism/node.rb#14940 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15364 + # source://prism//lib/prism/node.rb#14933 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> PreExecutionNode + # def copy: (?statements: StatementsNode?, ?keyword_loc: Location, ?opening_loc: Location, ?closing_loc: Location, ?location: Location) -> PreExecutionNode # - # source://prism//lib/prism/node.rb#15376 - sig { params(params: T.untyped).returns(Prism::PreExecutionNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#14945 + sig do + params( + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::PreExecutionNode) + end + def copy(statements: T.unsafe(nil), keyword_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15359 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#14928 + 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#15391 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#14953 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#15433 + # source://prism//lib/prism/node.rb#14998 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#15418 + # source://prism//lib/prism/node.rb#14983 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#15399 + # source://prism//lib/prism/node.rb#14961 sig { returns(Prism::Location) } def keyword_loc; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#15423 + # source://prism//lib/prism/node.rb#14988 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#15405 + # source://prism//lib/prism/node.rb#14968 sig { returns(Prism::Location) } def opening_loc; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#15396 + # source://prism//lib/prism/node.rb#14958 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -22903,7 +25589,8 @@ class Prism::PreExecutionNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#15461 + # source://prism//lib/prism/node.rb#15026 + sig { override.returns(Symbol) } def type; end class << self @@ -22914,81 +25601,97 @@ class Prism::PreExecutionNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#15471 + # source://prism//lib/prism/node.rb#15036 def type; end end end # The top level node of any parse tree. # -# source://prism//lib/prism/node.rb#15477 +# source://prism//lib/prism/node.rb#15042 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#15479 - def initialize(source, locals, statements, location); end - + # source://prism//lib/prism/node.rb#15044 + sig do + params( + source: Prism::Source, + locals: T::Array[Symbol], + statements: Prism::StatementsNode, + location: Prism::Location + ).void + end + def initialize(source, locals, statements, location); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15488 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#15053 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15493 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#15058 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15503 + # source://prism//lib/prism/node.rb#15068 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15498 + # source://prism//lib/prism/node.rb#15063 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ProgramNode + # def copy: (?locals: Array[Symbol], ?statements: StatementsNode, ?location: Location) -> ProgramNode # - # source://prism//lib/prism/node.rb#15508 - sig { params(params: T.untyped).returns(Prism::ProgramNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#15073 + sig do + params( + locals: T::Array[Symbol], + statements: Prism::StatementsNode, + location: Prism::Location + ).returns(Prism::ProgramNode) + end + def copy(locals: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15493 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#15058 + 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#15521 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#15081 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#15533 + # source://prism//lib/prism/node.rb#15093 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#15526 + # source://prism//lib/prism/node.rb#15086 sig { returns(T::Array[Symbol]) } def locals; end # attr_reader statements: StatementsNode # - # source://prism//lib/prism/node.rb#15529 + # source://prism//lib/prism/node.rb#15089 sig { returns(Prism::StatementsNode) } def statements; end @@ -23007,7 +25710,8 @@ class Prism::ProgramNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#15555 + # source://prism//lib/prism/node.rb#15115 + sig { override.returns(Symbol) } def type; end class << self @@ -23018,19 +25722,19 @@ class Prism::ProgramNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#15565 + # source://prism//lib/prism/node.rb#15125 def type; end end end # Flags for range and flip-flop nodes. # -# source://prism//lib/prism/node.rb#19310 +# source://prism//lib/prism/node.rb#18908 module Prism::RangeFlags; end # ... operator # -# source://prism//lib/prism/node.rb#19312 +# source://prism//lib/prism/node.rb#18910 Prism::RangeFlags::EXCLUDE_END = T.let(T.unsafe(nil), Integer) # Represents the use of the `..` or `...` operators. @@ -23041,71 +25745,91 @@ Prism::RangeFlags::EXCLUDE_END = T.let(T.unsafe(nil), Integer) # c if a =~ /left/ ... b =~ /right/ # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#15577 +# source://prism//lib/prism/node.rb#15137 class Prism::RangeNode < ::Prism::Node - # def initialize: (Integer flags, Node? left, Node? right, Location operator_loc, Location location) -> void + # 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#15579 + # source://prism//lib/prism/node.rb#15139 + sig do + params( + source: Prism::Source, + flags: Integer, + left: T.nilable(Prism::Node), + right: T.nilable(Prism::Node), + operator_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, flags, left, right, operator_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15590 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#15150 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15595 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#15155 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15608 + # source://prism//lib/prism/node.rb#15168 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15600 + # source://prism//lib/prism/node.rb#15160 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> RangeNode + # def copy: (?flags: Integer, ?left: Prism::node?, ?right: Prism::node?, ?operator_loc: Location, ?location: Location) -> RangeNode # - # source://prism//lib/prism/node.rb#15613 - sig { params(params: T.untyped).returns(Prism::RangeNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#15173 + sig do + params( + flags: Integer, + left: T.nilable(Prism::Node), + right: T.nilable(Prism::Node), + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::RangeNode) + end + def copy(flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15595 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#15155 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, left: Node?, right: Node?, operator_loc: Location, location: Location } + # 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#15628 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#15181 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def exclude_end?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15663 + # source://prism//lib/prism/node.rb#15217 sig { returns(T::Boolean) } def exclude_end?; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#15673 + # source://prism//lib/prism/node.rb#15227 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); 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). @@ -23116,19 +25840,19 @@ class Prism::RangeNode < ::Prism::Node # hello...goodbye # ^^^^^ # - # source://prism//lib/prism/node.rb#15643 + # source://prism//lib/prism/node.rb#15196 sig { returns(T.nilable(Prism::Node)) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#15668 + # source://prism//lib/prism/node.rb#15222 sig { returns(String) } def operator; end # The location of the `..` or `...` operator. # - # source://prism//lib/prism/node.rb#15656 + # source://prism//lib/prism/node.rb#15209 sig { returns(Prism::Location) } def operator_loc; end @@ -23141,7 +25865,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#15653 + # source://prism//lib/prism/node.rb#15206 sig { returns(T.nilable(Prism::Node)) } def right; end @@ -23160,14 +25884,15 @@ class Prism::RangeNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#15707 + # source://prism//lib/prism/node.rb#15261 + sig { override.returns(Symbol) } def type; end private # private attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#15633 + # source://prism//lib/prism/node.rb#15186 sig { returns(Integer) } def flags; end @@ -23179,7 +25904,7 @@ class Prism::RangeNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#15717 + # source://prism//lib/prism/node.rb#15271 def type; end end end @@ -23189,68 +25914,71 @@ end # 1.0r # ^^^^ # -# source://prism//lib/prism/node.rb#15726 +# source://prism//lib/prism/node.rb#15280 class Prism::RationalNode < ::Prism::Node - # def initialize: (Node numeric, Location location) -> void + # def initialize: (Prism::node numeric, Location location) -> void # # @return [RationalNode] a new instance of RationalNode # - # source://prism//lib/prism/node.rb#15728 + # source://prism//lib/prism/node.rb#15282 + sig { params(source: Prism::Source, numeric: Prism::Node, location: Prism::Location).void } def initialize(source, numeric, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15736 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#15290 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15741 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#15295 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15751 + # source://prism//lib/prism/node.rb#15305 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15746 + # source://prism//lib/prism/node.rb#15300 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> RationalNode + # def copy: (?numeric: Prism::node, ?location: Location) -> RationalNode # - # source://prism//lib/prism/node.rb#15756 - sig { params(params: T.untyped).returns(Prism::RationalNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#15310 + sig { params(numeric: Prism::Node, location: Prism::Location).returns(Prism::RationalNode) } + def copy(numeric: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15741 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#15295 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { numeric: Node, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { numeric: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#15768 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#15318 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#15777 + # source://prism//lib/prism/node.rb#15327 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end - # attr_reader numeric: Node + # attr_reader numeric: Prism::node # - # source://prism//lib/prism/node.rb#15773 + # source://prism//lib/prism/node.rb#15323 sig { returns(Prism::Node) } def numeric; end @@ -23269,12 +25997,14 @@ class Prism::RationalNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#15798 + # source://prism//lib/prism/node.rb#15348 + sig { override.returns(Symbol) } def type; end # Returns the value of the node as a Ruby Rational. # - # source://prism//lib/prism/node_ext.rb#83 + # source://prism//lib/prism/node_ext.rb#94 + sig { returns(Rational) } def value; end class << self @@ -23285,7 +26015,7 @@ class Prism::RationalNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#15808 + # source://prism//lib/prism/node.rb#15358 def type; end end end @@ -23295,63 +26025,66 @@ end # redo # ^^^^ # -# source://prism//lib/prism/node.rb#15817 +# source://prism//lib/prism/node.rb#15367 class Prism::RedoNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [RedoNode] a new instance of RedoNode # - # source://prism//lib/prism/node.rb#15819 + # source://prism//lib/prism/node.rb#15369 + sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15826 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#15376 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15831 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#15381 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15841 + # source://prism//lib/prism/node.rb#15391 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15836 + # source://prism//lib/prism/node.rb#15386 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> RedoNode + # def copy: (?location: Location) -> RedoNode # - # source://prism//lib/prism/node.rb#15846 - sig { params(params: T.untyped).returns(Prism::RedoNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#15396 + 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#15831 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#15381 + 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#15857 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#15404 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#15863 + # source://prism//lib/prism/node.rb#15410 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of @@ -23369,7 +26102,8 @@ class Prism::RedoNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#15882 + # source://prism//lib/prism/node.rb#15429 + sig { override.returns(Symbol) } def type; end class << self @@ -23380,69 +26114,209 @@ class Prism::RedoNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#15892 + # source://prism//lib/prism/node.rb#15439 def type; end end end +# The Reflection module provides the ability to reflect on the structure of +# the syntax tree itself, as opposed to looking at a single syntax tree. This +# is useful in metaprogramming contexts. +# +# source://prism//lib/prism/reflection.rb#13 +module Prism::Reflection + class << self + # Returns the fields for the given node. + # + # source://prism//lib/prism/reflection.rb#114 + sig { params(node: T.class_of(Prism::Node)).returns(T::Array[Prism::Reflection::Field]) } + def fields_for(node); end + end +end + +# A constant field represents a constant value on a node. Effectively, it +# represents an identifier found within the source. It resolves to a symbol +# in Ruby. +# +# source://prism//lib/prism/reflection.rb#45 +class Prism::Reflection::ConstantField < ::Prism::Reflection::Field; end + +# A constant list field represents a list of constant values on a node. It +# resolves to an array of symbols in Ruby. +# +# source://prism//lib/prism/reflection.rb#55 +class Prism::Reflection::ConstantListField < ::Prism::Reflection::Field; end + +# A double field represents a double-precision floating point value. It is +# used exclusively to represent the value of a floating point literal. It +# resolves to a Float in Ruby. +# +# source://prism//lib/prism/reflection.rb#110 +class Prism::Reflection::DoubleField < ::Prism::Reflection::Field; end + +# A field represents a single piece of data on a node. It is the base class +# for all other field types. +# +# source://prism//lib/prism/reflection.rb#16 +class Prism::Reflection::Field + # Initializes the field with the given name. + # + # @return [Field] a new instance of Field + # + # source://prism//lib/prism/reflection.rb#21 + sig { params(name: Symbol).void } + def initialize(name); end + + # The name of the field. + # + # source://prism//lib/prism/reflection.rb#18 + def name; end +end + +# A flags field represents a bitset of flags on a node. It resolves to an +# integer in Ruby. Note that the flags cannot be accessed directly on the +# node because the integer is kept private. Instead, the various flags in +# the bitset should be accessed through their query methods. +# +# source://prism//lib/prism/reflection.rb#90 +class Prism::Reflection::FlagsField < ::Prism::Reflection::Field + # Initializes the flags field with the given name and flags. + # + # @return [FlagsField] a new instance of FlagsField + # + # source://prism//lib/prism/reflection.rb#95 + sig { params(name: Symbol, flags: T::Array[Symbol]).void } + def initialize(name, flags); end + + # The names of the flags in the bitset. + # + # source://prism//lib/prism/reflection.rb#92 + def flags; end +end + +# An integer field represents an arbitrarily-sized integer value. It is used +# exclusively to represent the value of an integer literal. It resolves to +# an Integer in Ruby. +# +# source://prism//lib/prism/reflection.rb#104 +class Prism::Reflection::IntegerField < ::Prism::Reflection::Field; end + +# A location field represents the location of some part of the node in the +# source code. For example, the location of a keyword or an operator. It +# resolves to a Prism::Location in Ruby. +# +# source://prism//lib/prism/reflection.rb#67 +class Prism::Reflection::LocationField < ::Prism::Reflection::Field; end + +# A node field represents a single child node in the syntax tree. It +# resolves to a Prism::Node in Ruby. +# +# source://prism//lib/prism/reflection.rb#28 +class Prism::Reflection::NodeField < ::Prism::Reflection::Field; end + +# A node list field represents a list of child nodes in the syntax tree. It +# resolves to an array of Prism::Node instances in Ruby. +# +# source://prism//lib/prism/reflection.rb#39 +class Prism::Reflection::NodeListField < ::Prism::Reflection::Field; end + +# An optional constant field represents a constant value on a node that may +# or may not be present. It resolves to either a symbol or nil in Ruby. +# +# source://prism//lib/prism/reflection.rb#50 +class Prism::Reflection::OptionalConstantField < ::Prism::Reflection::Field; end + +# An optional location field represents the location of some part of the +# node in the source code that may or may not be present. It resolves to +# either a Prism::Location or nil in Ruby. +# +# source://prism//lib/prism/reflection.rb#73 +class Prism::Reflection::OptionalLocationField < ::Prism::Reflection::Field; end + +# An optional node field represents a single child node in the syntax tree +# that may or may not be present. It resolves to either a Prism::Node or nil +# in Ruby. +# +# source://prism//lib/prism/reflection.rb#34 +class Prism::Reflection::OptionalNodeField < ::Prism::Reflection::Field; end + +# A string field represents a string value on a node. It almost always +# represents the unescaped value of a string-like literal. It resolves to a +# string in Ruby. +# +# source://prism//lib/prism/reflection.rb#61 +class Prism::Reflection::StringField < ::Prism::Reflection::Field; end + +# A uint32 field represents an unsigned 32-bit integer value on a node. It +# resolves to an Integer in Ruby. +# +# source://prism//lib/prism/reflection.rb#83 +class Prism::Reflection::UInt32Field < ::Prism::Reflection::Field; end + +# A uint8 field represents an unsigned 8-bit integer value on a node. It +# resolves to an Integer in Ruby. +# +# source://prism//lib/prism/reflection.rb#78 +class Prism::Reflection::UInt8Field < ::Prism::Reflection::Field; end + # Flags for regular expression and match last line nodes. # -# source://prism//lib/prism/node.rb#19316 +# source://prism//lib/prism/node.rb#18914 module Prism::RegularExpressionFlags; end # n - forces the ASCII-8BIT encoding # -# source://prism//lib/prism/node.rb#19333 +# source://prism//lib/prism/node.rb#18931 Prism::RegularExpressionFlags::ASCII_8BIT = T.let(T.unsafe(nil), Integer) # e - forces the EUC-JP encoding # -# source://prism//lib/prism/node.rb#19330 +# source://prism//lib/prism/node.rb#18928 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#19321 +# source://prism//lib/prism/node.rb#18919 Prism::RegularExpressionFlags::EXTENDED = T.let(T.unsafe(nil), Integer) # internal bytes forced the encoding to binary # -# source://prism//lib/prism/node.rb#19345 +# source://prism//lib/prism/node.rb#18943 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#19348 +# source://prism//lib/prism/node.rb#18946 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#19342 +# source://prism//lib/prism/node.rb#18940 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#19318 +# source://prism//lib/prism/node.rb#18916 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#19324 +# source://prism//lib/prism/node.rb#18922 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#19327 +# source://prism//lib/prism/node.rb#18925 Prism::RegularExpressionFlags::ONCE = T.let(T.unsafe(nil), Integer) # u - forces the UTF-8 encoding # -# source://prism//lib/prism/node.rb#19339 +# source://prism//lib/prism/node.rb#18937 Prism::RegularExpressionFlags::UTF_8 = T.let(T.unsafe(nil), Integer) # s - forces the Windows-31J encoding # -# source://prism//lib/prism/node.rb#19336 +# source://prism//lib/prism/node.rb#18934 Prism::RegularExpressionFlags::WINDOWS_31J = T.let(T.unsafe(nil), Integer) # Represents a regular expression literal with no interpolation. @@ -23450,7 +26324,7 @@ Prism::RegularExpressionFlags::WINDOWS_31J = T.let(T.unsafe(nil), Integer) # /foo/i # ^^^^^^ # -# source://prism//lib/prism/node.rb#15901 +# source://prism//lib/prism/node.rb#15448 class Prism::RegularExpressionNode < ::Prism::Node include ::Prism::RegularExpressionOptions @@ -23458,91 +26332,109 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [RegularExpressionNode] a new instance of RegularExpressionNode # - # source://prism//lib/prism/node.rb#15903 + # source://prism//lib/prism/node.rb#15450 + sig do + params( + source: Prism::Source, + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String, + location: Prism::Location + ).void + end def initialize(source, flags, opening_loc, content_loc, closing_loc, unescaped, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15915 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#15462 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def ascii_8bit?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16007 + # source://prism//lib/prism/node.rb#15549 sig { returns(T::Boolean) } def ascii_8bit?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15920 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#15467 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#16047 + # source://prism//lib/prism/node.rb#15589 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#15972 + # source://prism//lib/prism/node.rb#15513 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15930 + # source://prism//lib/prism/node.rb#15477 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15925 + # source://prism//lib/prism/node.rb#15472 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def content: () -> String # - # source://prism//lib/prism/node.rb#16042 + # source://prism//lib/prism/node.rb#15584 sig { returns(String) } def content; end # attr_reader content_loc: Location # - # source://prism//lib/prism/node.rb#15966 + # source://prism//lib/prism/node.rb#15506 sig { returns(Prism::Location) } def content_loc; end - # def copy: (**params) -> RegularExpressionNode + # def copy: (?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String, ?location: Location) -> RegularExpressionNode # - # source://prism//lib/prism/node.rb#15935 - sig { params(params: T.untyped).returns(Prism::RegularExpressionNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#15482 + sig do + params( + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String, + location: Prism::Location + ).returns(Prism::RegularExpressionNode) + end + def copy(flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15920 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#15467 + 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#15951 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#15490 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def euc_jp?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16002 + # source://prism//lib/prism/node.rb#15544 sig { returns(T::Boolean) } def euc_jp?; end @@ -23550,15 +26442,18 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15987 + # source://prism//lib/prism/node.rb#15529 sig { returns(T::Boolean) } def extended?; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def forced_binary_encoding?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16027 + # source://prism//lib/prism/node.rb#15569 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -23566,7 +26461,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16032 + # source://prism//lib/prism/node.rb#15574 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end @@ -23574,7 +26469,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16022 + # source://prism//lib/prism/node.rb#15564 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -23582,20 +26477,21 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15982 + # source://prism//lib/prism/node.rb#15524 sig { returns(T::Boolean) } def ignore_case?; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#16052 + # source://prism//lib/prism/node.rb#15594 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def multi_line?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15992 + # source://prism//lib/prism/node.rb#15534 sig { returns(T::Boolean) } def multi_line?; end @@ -23603,22 +26499,25 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15997 + # source://prism//lib/prism/node.rb#15539 sig { returns(T::Boolean) } def once?; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#16037 + # source://prism//lib/prism/node.rb#15579 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#15960 + # source://prism//lib/prism/node.rb#15499 sig { returns(Prism::Location) } def opening_loc; end + sig { returns(Integer) } + def options; end + # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a @@ -23634,12 +26533,13 @@ class Prism::RegularExpressionNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#16077 + # source://prism//lib/prism/node.rb#15619 + sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#15978 + # source://prism//lib/prism/node.rb#15520 sig { returns(String) } def unescaped; end @@ -23647,7 +26547,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16017 + # source://prism//lib/prism/node.rb#15559 sig { returns(T::Boolean) } def utf_8?; end @@ -23655,7 +26555,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16012 + # source://prism//lib/prism/node.rb#15554 sig { returns(T::Boolean) } def windows_31j?; end @@ -23663,7 +26563,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # private attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#15956 + # source://prism//lib/prism/node.rb#15495 sig { returns(Integer) } def flags; end @@ -23675,7 +26575,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#16087 + # source://prism//lib/prism/node.rb#15629 def type; end end end @@ -23695,74 +26595,92 @@ end # ^^ # end # -# source://prism//lib/prism/node.rb#16097 +# source://prism//lib/prism/node.rb#15639 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#16099 + # source://prism//lib/prism/node.rb#15641 + sig do + params( + source: Prism::Source, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, flags, name, name_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16109 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#15651 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16114 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#15656 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16124 + # source://prism//lib/prism/node.rb#15666 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16119 + # source://prism//lib/prism/node.rb#15661 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> RequiredKeywordParameterNode + # def copy: (?flags: Integer, ?name: Symbol, ?name_loc: Location, ?location: Location) -> RequiredKeywordParameterNode # - # source://prism//lib/prism/node.rb#16129 - sig { params(params: T.untyped).returns(Prism::RequiredKeywordParameterNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#15671 + sig do + params( + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::RequiredKeywordParameterNode) + end + def copy(flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16114 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#15656 + 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#16143 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#15679 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#16167 + # source://prism//lib/prism/node.rb#15704 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#16152 + # source://prism//lib/prism/node.rb#15688 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#16155 + # source://prism//lib/prism/node.rb#15691 sig { returns(Prism::Location) } def name_loc; end @@ -23770,7 +26688,7 @@ class Prism::RequiredKeywordParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16162 + # source://prism//lib/prism/node.rb#15699 sig { returns(T::Boolean) } def repeated_parameter?; end @@ -23789,14 +26707,15 @@ class Prism::RequiredKeywordParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#16190 + # source://prism//lib/prism/node.rb#15727 + sig { override.returns(Symbol) } def type; end private # private attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#16148 + # source://prism//lib/prism/node.rb#15684 sig { returns(Integer) } def flags; end @@ -23808,7 +26727,7 @@ class Prism::RequiredKeywordParameterNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#16200 + # source://prism//lib/prism/node.rb#15737 def type; end end end @@ -23819,68 +26738,71 @@ end # ^ # end # -# source://prism//lib/prism/node.rb#16210 +# source://prism//lib/prism/node.rb#15747 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#16212 + # source://prism//lib/prism/node.rb#15749 + sig { params(source: Prism::Source, flags: Integer, name: Symbol, location: Prism::Location).void } def initialize(source, flags, name, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16221 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#15758 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16226 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#15763 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16236 + # source://prism//lib/prism/node.rb#15773 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16231 + # source://prism//lib/prism/node.rb#15768 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> RequiredParameterNode + # def copy: (?flags: Integer, ?name: Symbol, ?location: Location) -> RequiredParameterNode # - # source://prism//lib/prism/node.rb#16241 - sig { params(params: T.untyped).returns(Prism::RequiredParameterNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#15778 + 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#16226 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#15763 + 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#16254 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#15786 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#16272 + # source://prism//lib/prism/node.rb#15804 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#16263 + # source://prism//lib/prism/node.rb#15795 sig { returns(Symbol) } def name; end @@ -23888,7 +26810,7 @@ class Prism::RequiredParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16267 + # source://prism//lib/prism/node.rb#15799 sig { returns(T::Boolean) } def repeated_parameter?; end @@ -23907,14 +26829,15 @@ class Prism::RequiredParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#16294 + # source://prism//lib/prism/node.rb#15826 + sig { override.returns(Symbol) } def type; end private # private attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#16259 + # source://prism//lib/prism/node.rb#15791 sig { returns(Integer) } def flags; end @@ -23926,7 +26849,7 @@ class Prism::RequiredParameterNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#16304 + # source://prism//lib/prism/node.rb#15836 def type; end end end @@ -23936,90 +26859,108 @@ end # foo rescue nil # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#16313 +# source://prism//lib/prism/node.rb#15845 class Prism::RescueModifierNode < ::Prism::Node - # def initialize: (Node expression, Location keyword_loc, Node rescue_expression, Location location) -> void + # 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#16315 + # source://prism//lib/prism/node.rb#15847 + sig do + params( + source: Prism::Source, + expression: Prism::Node, + keyword_loc: Prism::Location, + rescue_expression: Prism::Node, + location: Prism::Location + ).void + end def initialize(source, expression, keyword_loc, rescue_expression, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16325 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#15857 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16334 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#15866 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16344 + # source://prism//lib/prism/node.rb#15876 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16339 + # source://prism//lib/prism/node.rb#15871 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> RescueModifierNode + # def copy: (?expression: Prism::node, ?keyword_loc: Location, ?rescue_expression: Prism::node, ?location: Location) -> RescueModifierNode # - # source://prism//lib/prism/node.rb#16349 - sig { params(params: T.untyped).returns(Prism::RescueModifierNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#15881 + sig do + params( + expression: Prism::Node, + keyword_loc: Prism::Location, + rescue_expression: Prism::Node, + location: Prism::Location + ).returns(Prism::RescueModifierNode) + end + def copy(expression: T.unsafe(nil), keyword_loc: T.unsafe(nil), rescue_expression: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16334 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#15866 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { expression: Node, keyword_loc: Location, rescue_expression: Node, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { expression: Prism::node, keyword_loc: Location, rescue_expression: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#16363 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#15889 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # attr_reader expression: Node + # attr_reader expression: Prism::node # - # source://prism//lib/prism/node.rb#16368 + # source://prism//lib/prism/node.rb#15894 sig { returns(Prism::Node) } def expression; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#16386 + # source://prism//lib/prism/node.rb#15913 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#16381 + # source://prism//lib/prism/node.rb#15908 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#16371 + # source://prism//lib/prism/node.rb#15897 sig { returns(Prism::Location) } def keyword_loc; end - # attr_reader rescue_expression: Node + # attr_reader rescue_expression: Prism::node # - # source://prism//lib/prism/node.rb#16377 + # source://prism//lib/prism/node.rb#15904 sig { returns(Prism::Node) } def rescue_expression; end - # source://prism//lib/prism/node.rb#16329 + # source://prism//lib/prism/node.rb#15861 def set_newline_flag(newline_marked); end # Sometimes you want to check an instance of a node against a list of @@ -24037,7 +26978,8 @@ class Prism::RescueModifierNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#16410 + # source://prism//lib/prism/node.rb#15937 + sig { override.returns(Symbol) } def type; end class << self @@ -24048,7 +26990,7 @@ class Prism::RescueModifierNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#16420 + # source://prism//lib/prism/node.rb#15947 def type; end end end @@ -24063,110 +27005,134 @@ end # # `Foo, *splat, Bar` are in the `exceptions` field. `ex` is in the `exception` field. # -# source://prism//lib/prism/node.rb#16434 +# source://prism//lib/prism/node.rb#15961 class Prism::RescueNode < ::Prism::Node - # def initialize: (Location keyword_loc, Array[Node] exceptions, Location? operator_loc, Node? reference, StatementsNode? statements, RescueNode? consequent, Location location) -> void + # 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#16436 + # source://prism//lib/prism/node.rb#15963 + sig do + params( + source: Prism::Source, + keyword_loc: Prism::Location, + exceptions: T::Array[Prism::Node], + operator_loc: T.nilable(Prism::Location), + reference: T.nilable(Prism::Node), + statements: T.nilable(Prism::StatementsNode), + consequent: T.nilable(Prism::RescueNode), + location: Prism::Location + ).void + end def initialize(source, keyword_loc, exceptions, operator_loc, reference, statements, consequent, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16449 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#15976 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16454 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#15981 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16469 + # source://prism//lib/prism/node.rb#15996 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16459 + # source://prism//lib/prism/node.rb#15986 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader consequent: RescueNode? # - # source://prism//lib/prism/node.rb#16523 + # source://prism//lib/prism/node.rb#16043 sig { returns(T.nilable(Prism::RescueNode)) } def consequent; end - # def copy: (**params) -> RescueNode + # 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#16474 - sig { params(params: T.untyped).returns(Prism::RescueNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#16001 + sig do + params( + keyword_loc: Prism::Location, + exceptions: T::Array[Prism::Node], + operator_loc: T.nilable(Prism::Location), + reference: T.nilable(Prism::Node), + statements: T.nilable(Prism::StatementsNode), + consequent: T.nilable(Prism::RescueNode), + location: Prism::Location + ).returns(Prism::RescueNode) + end + def copy(keyword_loc: T.unsafe(nil), exceptions: T.unsafe(nil), operator_loc: T.unsafe(nil), reference: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16454 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#15981 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, exceptions: Array[Node], operator_loc: Location?, reference: Node?, statements: StatementsNode?, consequent: RescueNode?, location: Location } + # 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#16491 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#16009 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # attr_reader exceptions: Array[Node] + # attr_reader exceptions: Array[Prism::node] # - # source://prism//lib/prism/node.rb#16502 + # source://prism//lib/prism/node.rb#16021 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 # - # source://prism//lib/prism/node.rb#16537 + # source://prism//lib/prism/node.rb#16057 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#16527 + # source://prism//lib/prism/node.rb#16047 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#16496 + # source://prism//lib/prism/node.rb#16014 sig { returns(Prism::Location) } def keyword_loc; end # def operator: () -> String? # - # source://prism//lib/prism/node.rb#16532 + # source://prism//lib/prism/node.rb#16052 sig { returns(T.nilable(String)) } def operator; end # attr_reader operator_loc: Location? # - # source://prism//lib/prism/node.rb#16505 + # source://prism//lib/prism/node.rb#16024 sig { returns(T.nilable(Prism::Location)) } def operator_loc; end - # attr_reader reference: Node? + # attr_reader reference: Prism::node? # - # source://prism//lib/prism/node.rb#16517 + # source://prism//lib/prism/node.rb#16037 sig { returns(T.nilable(Prism::Node)) } def reference; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#16520 + # source://prism//lib/prism/node.rb#16040 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -24185,7 +27151,8 @@ class Prism::RescueNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#16577 + # source://prism//lib/prism/node.rb#16097 + sig { override.returns(Symbol) } def type; end class << self @@ -24196,7 +27163,7 @@ class Prism::RescueNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#16587 + # source://prism//lib/prism/node.rb#16107 def type; end end end @@ -24207,86 +27174,106 @@ end # ^^ # end # -# source://prism//lib/prism/node.rb#16597 +# source://prism//lib/prism/node.rb#16117 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#16599 + # source://prism//lib/prism/node.rb#16119 + sig do + params( + source: Prism::Source, + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, flags, name, name_loc, operator_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16610 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#16130 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16615 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#16135 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16625 + # source://prism//lib/prism/node.rb#16145 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16620 + # source://prism//lib/prism/node.rb#16140 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> RestParameterNode + # def copy: (?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location, ?location: Location) -> RestParameterNode # - # source://prism//lib/prism/node.rb#16630 - sig { params(params: T.untyped).returns(Prism::RestParameterNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#16150 + sig do + params( + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::RestParameterNode) + end + def copy(flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16615 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#16135 + 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#16645 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#16158 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#16686 + # source://prism//lib/prism/node.rb#16201 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol? # - # source://prism//lib/prism/node.rb#16654 + # source://prism//lib/prism/node.rb#16167 sig { returns(T.nilable(Symbol)) } def name; end # attr_reader name_loc: Location? # - # source://prism//lib/prism/node.rb#16657 + # source://prism//lib/prism/node.rb#16170 sig { returns(T.nilable(Prism::Location)) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#16681 + # source://prism//lib/prism/node.rb#16196 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#16669 + # source://prism//lib/prism/node.rb#16183 sig { returns(Prism::Location) } def operator_loc; end @@ -24294,7 +27281,7 @@ class Prism::RestParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16676 + # source://prism//lib/prism/node.rb#16191 sig { returns(T::Boolean) } def repeated_parameter?; end @@ -24313,14 +27300,15 @@ class Prism::RestParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#16714 + # source://prism//lib/prism/node.rb#16229 + sig { override.returns(Symbol) } def type; end private # private attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#16650 + # source://prism//lib/prism/node.rb#16163 sig { returns(Integer) } def flags; end @@ -24332,7 +27320,7 @@ class Prism::RestParameterNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#16724 + # source://prism//lib/prism/node.rb#16239 def type; end end end @@ -24342,63 +27330,66 @@ end # retry # ^^^^^ # -# source://prism//lib/prism/node.rb#16733 +# source://prism//lib/prism/node.rb#16248 class Prism::RetryNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [RetryNode] a new instance of RetryNode # - # source://prism//lib/prism/node.rb#16735 + # source://prism//lib/prism/node.rb#16250 + sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16742 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#16257 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16747 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#16262 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16757 + # source://prism//lib/prism/node.rb#16272 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16752 + # source://prism//lib/prism/node.rb#16267 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> RetryNode + # def copy: (?location: Location) -> RetryNode # - # source://prism//lib/prism/node.rb#16762 - sig { params(params: T.untyped).returns(Prism::RetryNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#16277 + 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#16747 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#16262 + 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#16773 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#16285 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#16779 + # source://prism//lib/prism/node.rb#16291 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of @@ -24416,7 +27407,8 @@ class Prism::RetryNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#16798 + # source://prism//lib/prism/node.rb#16310 + sig { override.returns(Symbol) } def type; end class << self @@ -24427,7 +27419,7 @@ class Prism::RetryNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#16808 + # source://prism//lib/prism/node.rb#16320 def type; end end end @@ -24437,80 +27429,96 @@ end # return 1 # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#16817 +# source://prism//lib/prism/node.rb#16329 class Prism::ReturnNode < ::Prism::Node # def initialize: (Location keyword_loc, ArgumentsNode? arguments, Location location) -> void # # @return [ReturnNode] a new instance of ReturnNode # - # source://prism//lib/prism/node.rb#16819 + # source://prism//lib/prism/node.rb#16331 + sig do + params( + source: Prism::Source, + keyword_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + location: Prism::Location + ).void + end def initialize(source, keyword_loc, arguments, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16828 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#16340 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#16874 + # source://prism//lib/prism/node.rb#16382 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16833 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#16345 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16845 + # source://prism//lib/prism/node.rb#16357 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16838 + # source://prism//lib/prism/node.rb#16350 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ReturnNode + # def copy: (?keyword_loc: Location, ?arguments: ArgumentsNode?, ?location: Location) -> ReturnNode # - # source://prism//lib/prism/node.rb#16850 - sig { params(params: T.untyped).returns(Prism::ReturnNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#16362 + sig do + params( + 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16833 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#16345 + 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 } # - # source://prism//lib/prism/node.rb#16863 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#16370 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#16883 + # source://prism//lib/prism/node.rb#16391 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#16878 + # source://prism//lib/prism/node.rb#16386 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#16868 + # source://prism//lib/prism/node.rb#16375 sig { returns(Prism::Location) } def keyword_loc; end @@ -24529,7 +27537,8 @@ class Prism::ReturnNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#16909 + # source://prism//lib/prism/node.rb#16417 + sig { override.returns(Symbol) } def type; end class << self @@ -24540,7 +27549,7 @@ class Prism::ReturnNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#16919 + # source://prism//lib/prism/node.rb#16427 def type; end end end @@ -24550,63 +27559,66 @@ end # self # ^^^^ # -# source://prism//lib/prism/node.rb#16928 +# source://prism//lib/prism/node.rb#16436 class Prism::SelfNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [SelfNode] a new instance of SelfNode # - # source://prism//lib/prism/node.rb#16930 + # source://prism//lib/prism/node.rb#16438 + sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16937 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#16445 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16942 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#16450 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16952 + # source://prism//lib/prism/node.rb#16460 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16947 + # source://prism//lib/prism/node.rb#16455 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> SelfNode + # def copy: (?location: Location) -> SelfNode # - # source://prism//lib/prism/node.rb#16957 - sig { params(params: T.untyped).returns(Prism::SelfNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#16465 + 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#16942 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#16450 + 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#16968 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#16473 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#16974 + # source://prism//lib/prism/node.rb#16479 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of @@ -24624,7 +27636,8 @@ class Prism::SelfNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#16993 + # source://prism//lib/prism/node.rb#16498 + sig { override.returns(Symbol) } def type; end class << self @@ -24635,292 +27648,508 @@ class Prism::SelfNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#17003 + # source://prism//lib/prism/node.rb#16508 def type; end end end # A module responsible for deserializing parse results. # -# source://prism//lib/prism/serialize.rb#23 +# source://prism//lib/prism/serialize.rb#14 module Prism::Serialize class << self # Deserialize the AST represented by the given string into a parse result. # - # source://prism//lib/prism/serialize.rb#37 + # source://prism//lib/prism/serialize.rb#28 def load(input, serialized); end # Deserialize the tokens represented by the given string into a parse # result. # - # source://prism//lib/prism/serialize.rb#49 + # source://prism//lib/prism/serialize.rb#40 def load_tokens(source, serialized); end end end -# source://prism//lib/prism/serialize.rb#53 +# source://prism//lib/prism/serialize.rb#44 class Prism::Serialize::Loader # @return [Loader] a new instance of Loader # - # source://prism//lib/prism/serialize.rb#58 + # source://prism//lib/prism/serialize.rb#80 def initialize(source, serialized); end # Returns the value of attribute constant_pool. # - # source://prism//lib/prism/serialize.rb#55 + # source://prism//lib/prism/serialize.rb#77 def constant_pool; end # Returns the value of attribute constant_pool_offset. # - # source://prism//lib/prism/serialize.rb#55 + # source://prism//lib/prism/serialize.rb#77 def constant_pool_offset; end # Returns the value of attribute encoding. # - # source://prism//lib/prism/serialize.rb#54 + # source://prism//lib/prism/serialize.rb#76 def encoding; end # Returns the value of attribute input. # - # source://prism//lib/prism/serialize.rb#54 + # source://prism//lib/prism/serialize.rb#76 def input; end # Returns the value of attribute io. # - # source://prism//lib/prism/serialize.rb#54 + # source://prism//lib/prism/serialize.rb#76 def io; end - # source://prism//lib/prism/serialize.rb#96 + # source://prism//lib/prism/serialize.rb#118 def load_comments; end - # source://prism//lib/prism/serialize.rb#82 + # source://prism//lib/prism/serialize.rb#104 def load_encoding; end - # source://prism//lib/prism/serialize.rb#73 + # source://prism//lib/prism/serialize.rb#95 def load_header; end - # source://prism//lib/prism/serialize.rb#92 + # source://prism//lib/prism/serialize.rb#114 def load_line_offsets; end - # source://prism//lib/prism/serialize.rb#106 + # source://prism//lib/prism/serialize.rb#413 def load_metadata; end - # source://prism//lib/prism/serialize.rb#140 + # source://prism//lib/prism/serialize.rb#447 def load_nodes; end - # source://prism//lib/prism/serialize.rb#154 + # source://prism//lib/prism/serialize.rb#461 def load_result; end - # source://prism//lib/prism/serialize.rb#88 + # source://prism//lib/prism/serialize.rb#110 def load_start_line; end - # source://prism//lib/prism/serialize.rb#115 + # source://prism//lib/prism/serialize.rb#422 def load_tokens; end - # source://prism//lib/prism/serialize.rb#128 + # source://prism//lib/prism/serialize.rb#435 def load_tokens_result; end # Returns the value of attribute serialized. # - # source://prism//lib/prism/serialize.rb#54 + # source://prism//lib/prism/serialize.rb#76 def serialized; end # Returns the value of attribute source. # - # source://prism//lib/prism/serialize.rb#55 + # source://prism//lib/prism/serialize.rb#77 def source; end # Returns the value of attribute start_line. # - # source://prism//lib/prism/serialize.rb#56 + # source://prism//lib/prism/serialize.rb#78 def start_line; end private - # source://prism//lib/prism/serialize.rb#217 + # source://prism//lib/prism/serialize.rb#547 def load_constant(index); end - # source://prism//lib/prism/serialize.rb#193 + # source://prism//lib/prism/serialize.rb#500 + def load_double; end + + # source://prism//lib/prism/serialize.rb#515 def load_embedded_string; end - # source://prism//lib/prism/serialize.rb#247 + # source://prism//lib/prism/serialize.rb#577 def load_error_level; end - # source://prism//lib/prism/serialize.rb#209 + # source://prism//lib/prism/serialize.rb#489 + def load_integer; end + + # source://prism//lib/prism/serialize.rb#531 def load_location; end - # source://prism//lib/prism/serialize.rb#274 + # source://prism//lib/prism/serialize.rb#535 + def load_location_object; end + + # source://prism//lib/prism/serialize.rb#606 def load_node; end - # source://prism//lib/prism/serialize.rb#242 + # source://prism//lib/prism/serialize.rb#572 def load_optional_constant; end - # source://prism//lib/prism/serialize.rb#213 + # source://prism//lib/prism/serialize.rb#539 def load_optional_location; end - # source://prism//lib/prism/serialize.rb#186 + # source://prism//lib/prism/serialize.rb#543 + def load_optional_location_object; end + + # source://prism//lib/prism/serialize.rb#508 def load_optional_node; end - # source://prism//lib/prism/serialize.rb#238 + # source://prism//lib/prism/serialize.rb#568 def load_required_constant; end - # source://prism//lib/prism/serialize.rb#182 - def load_serialized_length; end - - # source://prism//lib/prism/serialize.rb#197 + # source://prism//lib/prism/serialize.rb#519 def load_string; end - # source://prism//lib/prism/serialize.rb#177 + # source://prism//lib/prism/serialize.rb#504 + def load_uint32; end + + # source://prism//lib/prism/serialize.rb#484 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#163 + # source://prism//lib/prism/serialize.rb#470 def load_varuint; end - # source://prism//lib/prism/serialize.rb#260 + # source://prism//lib/prism/serialize.rb#592 def load_warning_level; end end +# source://prism//lib/prism/serialize.rb#127 +Prism::Serialize::Loader::DIAGNOSTIC_TYPES = T.let(T.unsafe(nil), Array) + +# StringIO is synchronized and that adds a high overhead on TruffleRuby. +# +# source://prism//lib/prism/serialize.rb#72 +Prism::Serialize::Loader::FastStringIO = StringIO + # The major version of prism that we are expecting to find in the serialized # strings. # -# source://prism//lib/prism/serialize.rb#26 +# source://prism//lib/prism/serialize.rb#17 Prism::Serialize::MAJOR_VERSION = T.let(T.unsafe(nil), Integer) # The minor version of prism that we are expecting to find in the serialized # strings. # -# source://prism//lib/prism/serialize.rb#30 +# source://prism//lib/prism/serialize.rb#21 Prism::Serialize::MINOR_VERSION = T.let(T.unsafe(nil), Integer) # The patch version of prism that we are expecting to find in the serialized # strings. # -# source://prism//lib/prism/serialize.rb#34 +# source://prism//lib/prism/serialize.rb#25 Prism::Serialize::PATCH_VERSION = T.let(T.unsafe(nil), Integer) # The token types that can be indexed by their enum values. # -# source://prism//lib/prism/serialize.rb#1482 +# source://prism//lib/prism/serialize.rb#1830 Prism::Serialize::TOKEN_TYPES = T.let(T.unsafe(nil), Array) -# Represents a singleton class declaration involving the `class` keyword. +# This node wraps a constant write to indicate that when the value is written, it should have its shareability state modified. # -# class << self end -# ^^^^^^^^^^^^^^^^^ +# C = { a: 1 } +# ^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#17012 -class Prism::SingletonClassNode < ::Prism::Node - # def initialize: (Array[Symbol] locals, Location class_keyword_loc, Location operator_loc, Node expression, Node? body, Location end_keyword_loc, Location location) -> void +# source://prism//lib/prism/node.rb#16518 +class Prism::ShareableConstantNode < ::Prism::Node + # def initialize: (Integer flags, ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode write, Location location) -> void # - # @return [SingletonClassNode] a new instance of SingletonClassNode + # @return [ShareableConstantNode] a new instance of ShareableConstantNode # - # source://prism//lib/prism/node.rb#17014 - def initialize(source, locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc, location); end + # source://prism//lib/prism/node.rb#16520 + sig do + params( + source: Prism::Source, + flags: Integer, + write: T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode), + location: Prism::Location + ).void + end + def initialize(source, flags, write, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17027 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#16529 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # attr_reader body: Node? - # - # source://prism//lib/prism/node.rb#17090 - sig { returns(T.nilable(Prism::Node)) } - def body; end - # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17032 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#16534 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end - # def class_keyword: () -> String - # - # source://prism//lib/prism/node.rb#17100 - sig { returns(String) } - def class_keyword; end - - # attr_reader class_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#17075 - sig { returns(Prism::Location) } - def class_keyword_loc; end - # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17045 + # 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#17037 + # source://prism//lib/prism/node.rb#16539 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> SingletonClassNode + # def copy: (?flags: Integer, ?write: ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode, ?location: Location) -> ShareableConstantNode # - # source://prism//lib/prism/node.rb#17050 - sig { params(params: T.untyped).returns(Prism::SingletonClassNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#16549 + sig do + params( + flags: Integer, + write: T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode), + location: Prism::Location + ).returns(Prism::ShareableConstantNode) + end + def copy(flags: T.unsafe(nil), write: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17032 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # 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) -> { locals: Array[Symbol], class_keyword_loc: Location, operator_loc: Location, expression: Node, body: Node?, end_keyword_loc: Location, location: Location } + # 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#17067 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # 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 - # def end_keyword: () -> String + # def experimental_copy?: () -> bool # - # source://prism//lib/prism/node.rb#17110 - sig { returns(String) } - def end_keyword; end + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16580 + sig { returns(T::Boolean) } + def experimental_copy?; end - # attr_reader end_keyword_loc: Location + # def experimental_everything?: () -> bool # - # source://prism//lib/prism/node.rb#17093 + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16575 + sig { returns(T::Boolean) } + def experimental_everything?; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#16585 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # def literal?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16570 + sig { returns(T::Boolean) } + def literal?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16608 + sig { override.returns(Symbol) } + def type; end + + # The constant write that should be modified with the shareability state. + # + # source://prism//lib/prism/node.rb#16566 + sig do + returns(T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode)) + end + def write; end + + private + + # private attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#16562 + 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#16618 + def type; end + end +end + +# Flags for shareable constant nodes. +# +# source://prism//lib/prism/node.rb#18950 +module Prism::ShareableConstantNodeFlags; end + +# constant writes that should be modified with shareable constant value experimental copy +# +# source://prism//lib/prism/node.rb#18958 +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#18955 +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#18952 +Prism::ShareableConstantNodeFlags::LITERAL = T.let(T.unsafe(nil), Integer) + +# Represents a singleton class declaration involving the `class` keyword. +# +# class << self end +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#16627 +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#16629 + sig do + params( + source: Prism::Source, + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + operator_loc: Prism::Location, + expression: Prism::Node, + body: T.nilable(Prism::Node), + end_keyword_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc, location); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#16642 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: Prism::node? + # + # source://prism//lib/prism/node.rb#16698 + sig { returns(T.nilable(Prism::Node)) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16647 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def class_keyword: () -> String + # + # source://prism//lib/prism/node.rb#16709 + sig { returns(String) } + def class_keyword; end + + # attr_reader class_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#16681 + sig { returns(Prism::Location) } + def class_keyword_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16660 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16652 + 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#16665 + sig do + params( + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + operator_loc: Prism::Location, + expression: Prism::Node, + body: T.nilable(Prism::Node), + end_keyword_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::SingletonClassNode) + end + def copy(locals: T.unsafe(nil), class_keyword_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), expression: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16647 + 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#16673 + 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#16719 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#16701 sig { returns(Prism::Location) } def end_keyword_loc; end - # attr_reader expression: Node + # attr_reader expression: Prism::node # - # source://prism//lib/prism/node.rb#17087 + # source://prism//lib/prism/node.rb#16695 sig { returns(Prism::Node) } def expression; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#17115 + # source://prism//lib/prism/node.rb#16724 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#17072 + # source://prism//lib/prism/node.rb#16678 sig { returns(T::Array[Symbol]) } def locals; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#17105 + # source://prism//lib/prism/node.rb#16714 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#17081 + # source://prism//lib/prism/node.rb#16688 sig { returns(Prism::Location) } def operator_loc; end @@ -24939,7 +28168,8 @@ class Prism::SingletonClassNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#17146 + # source://prism//lib/prism/node.rb#16755 + sig { override.returns(Symbol) } def type; end class << self @@ -24950,7 +28180,7 @@ class Prism::SingletonClassNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#17156 + # source://prism//lib/prism/node.rb#16765 def type; end end end @@ -24966,22 +28196,26 @@ class Prism::Source # @return [Source] a new instance of Source # # source://prism//lib/prism/parse_result.rb#18 + 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#53 + # source://prism//lib/prism/parse_result.rb#59 + 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#48 + # source://prism//lib/prism/parse_result.rb#54 + 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#70 + # source://prism//lib/prism/parse_result.rb#76 + 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 @@ -24991,45 +28225,52 @@ 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#63 + # source://prism//lib/prism/parse_result.rb#69 + 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#43 + # source://prism//lib/prism/parse_result.rb#49 + 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 + 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#32 + # source://prism//lib/prism/parse_result.rb#38 + sig { params(byte_offset: Integer).returns(Integer) } def line(byte_offset); end - sig { params(value: Integer).returns(Integer) } - def line_offset(value); end - # Return the byte offset of the start of the line corresponding to the given # byte offset. # - # source://prism//lib/prism/parse_result.rb#38 + # source://prism//lib/prism/parse_result.rb#44 + sig { params(byte_offset: Integer).returns(Integer) } def line_start(byte_offset); end # The list of newline byte offsets in the source code. # # source://prism//lib/prism/parse_result.rb#15 - 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#26 + # source://prism//lib/prism/parse_result.rb#32 + 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 - sig { returns(String) } def source; end # The line number where this source starts. @@ -25042,7 +28283,7 @@ 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#78 + # source://prism//lib/prism/parse_result.rb#84 def find_line(byte_offset); end end @@ -25051,63 +28292,66 @@ end # __ENCODING__ # ^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#17165 +# source://prism//lib/prism/node.rb#16774 class Prism::SourceEncodingNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [SourceEncodingNode] a new instance of SourceEncodingNode # - # source://prism//lib/prism/node.rb#17167 + # source://prism//lib/prism/node.rb#16776 + sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17174 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#16783 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17179 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#16788 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17189 + # source://prism//lib/prism/node.rb#16798 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17184 + # source://prism//lib/prism/node.rb#16793 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> SourceEncodingNode + # def copy: (?location: Location) -> SourceEncodingNode # - # source://prism//lib/prism/node.rb#17194 - sig { params(params: T.untyped).returns(Prism::SourceEncodingNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#16803 + 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#17179 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#16788 + 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#17205 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#16811 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#17211 + # source://prism//lib/prism/node.rb#16817 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of @@ -25125,7 +28369,8 @@ class Prism::SourceEncodingNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#17230 + # source://prism//lib/prism/node.rb#16836 + sig { override.returns(Symbol) } def type; end class << self @@ -25136,7 +28381,7 @@ class Prism::SourceEncodingNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#17240 + # source://prism//lib/prism/node.rb#16846 def type; end end end @@ -25146,71 +28391,106 @@ end # __FILE__ # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#17249 +# source://prism//lib/prism/node.rb#16855 class Prism::SourceFileNode < ::Prism::Node - # def initialize: (String filepath, Location location) -> void + # def initialize: (Integer flags, String filepath, Location location) -> void # # @return [SourceFileNode] a new instance of SourceFileNode # - # source://prism//lib/prism/node.rb#17251 - def initialize(source, filepath, location); end + # source://prism//lib/prism/node.rb#16857 + sig { params(source: Prism::Source, flags: Integer, filepath: String, location: Prism::Location).void } + def initialize(source, flags, filepath, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17259 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#16866 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17264 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#16871 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17274 + # source://prism//lib/prism/node.rb#16881 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17269 + # source://prism//lib/prism/node.rb#16876 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> SourceFileNode + # def copy: (?flags: Integer, ?filepath: String, ?location: Location) -> SourceFileNode # - # source://prism//lib/prism/node.rb#17279 - sig { params(params: T.untyped).returns(Prism::SourceFileNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#16886 + 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#17264 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#16871 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { filepath: String, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, filepath: String, location: Location } # - # source://prism//lib/prism/node.rb#17291 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#16894 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # attr_reader filepath: String # - # source://prism//lib/prism/node.rb#17296 + # source://prism//lib/prism/node.rb#16903 sig { returns(String) } def filepath; end + # def forced_binary_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16912 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16907 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def frozen?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16917 + sig { returns(T::Boolean) } + def frozen?; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#17300 + # source://prism//lib/prism/node.rb#16927 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end + # def mutable?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16922 + sig { returns(T::Boolean) } + def mutable?; end + # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a @@ -25226,9 +28506,18 @@ class Prism::SourceFileNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#17320 + # source://prism//lib/prism/node.rb#16949 + sig { override.returns(Symbol) } def type; end + private + + # private attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#16899 + 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. @@ -25237,7 +28526,7 @@ class Prism::SourceFileNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#17330 + # source://prism//lib/prism/node.rb#16959 def type; end end end @@ -25247,63 +28536,66 @@ end # __LINE__ # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#17339 +# source://prism//lib/prism/node.rb#16968 class Prism::SourceLineNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [SourceLineNode] a new instance of SourceLineNode # - # source://prism//lib/prism/node.rb#17341 + # source://prism//lib/prism/node.rb#16970 + sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17348 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#16977 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17353 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#16982 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17363 + # source://prism//lib/prism/node.rb#16992 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17358 + # source://prism//lib/prism/node.rb#16987 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> SourceLineNode + # def copy: (?location: Location) -> SourceLineNode # - # source://prism//lib/prism/node.rb#17368 - sig { params(params: T.untyped).returns(Prism::SourceLineNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#16997 + 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#17353 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#16982 + 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#17379 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#17005 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#17385 + # source://prism//lib/prism/node.rb#17011 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of @@ -25321,7 +28613,8 @@ class Prism::SourceLineNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#17404 + # source://prism//lib/prism/node.rb#17030 + sig { override.returns(Symbol) } def type; end class << self @@ -25332,7 +28625,7 @@ class Prism::SourceLineNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#17414 + # source://prism//lib/prism/node.rb#17040 def type; end end end @@ -25342,80 +28635,96 @@ end # [*a] # ^^ # -# source://prism//lib/prism/node.rb#17423 +# source://prism//lib/prism/node.rb#17049 class Prism::SplatNode < ::Prism::Node - # def initialize: (Location operator_loc, Node? expression, Location location) -> void + # def initialize: (Location operator_loc, Prism::node? expression, Location location) -> void # # @return [SplatNode] a new instance of SplatNode # - # source://prism//lib/prism/node.rb#17425 + # source://prism//lib/prism/node.rb#17051 + sig do + params( + source: Prism::Source, + operator_loc: Prism::Location, + expression: T.nilable(Prism::Node), + location: Prism::Location + ).void + end def initialize(source, operator_loc, expression, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17434 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#17060 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17439 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#17065 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17451 + # source://prism//lib/prism/node.rb#17077 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17444 + # source://prism//lib/prism/node.rb#17070 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> SplatNode + # def copy: (?operator_loc: Location, ?expression: Prism::node?, ?location: Location) -> SplatNode # - # source://prism//lib/prism/node.rb#17456 - sig { params(params: T.untyped).returns(Prism::SplatNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#17082 + sig do + params( + operator_loc: Prism::Location, + expression: T.nilable(Prism::Node), + location: Prism::Location + ).returns(Prism::SplatNode) + end + def copy(operator_loc: T.unsafe(nil), expression: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17439 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#17065 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { operator_loc: Location, expression: Node?, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { operator_loc: Location, expression: Prism::node?, location: Location } # - # source://prism//lib/prism/node.rb#17469 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#17090 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # attr_reader expression: Node? + # attr_reader expression: Prism::node? # - # source://prism//lib/prism/node.rb#17480 + # source://prism//lib/prism/node.rb#17102 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 # - # source://prism//lib/prism/node.rb#17489 + # source://prism//lib/prism/node.rb#17111 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # - # source://prism//lib/prism/node.rb#17484 + # source://prism//lib/prism/node.rb#17106 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#17474 + # source://prism//lib/prism/node.rb#17095 sig { returns(Prism::Location) } def operator_loc; end @@ -25434,7 +28743,8 @@ class Prism::SplatNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#17515 + # source://prism//lib/prism/node.rb#17137 + sig { override.returns(Symbol) } def type; end class << self @@ -25445,7 +28755,7 @@ class Prism::SplatNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#17525 + # source://prism//lib/prism/node.rb#17147 def type; end end end @@ -25455,69 +28765,72 @@ end # foo; bar; baz # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#17534 +# source://prism//lib/prism/node.rb#17156 class Prism::StatementsNode < ::Prism::Node - # def initialize: (Array[Node] body, Location location) -> void + # def initialize: (Array[Prism::node] body, Location location) -> void # # @return [StatementsNode] a new instance of StatementsNode # - # source://prism//lib/prism/node.rb#17536 + # source://prism//lib/prism/node.rb#17158 + sig { params(source: Prism::Source, body: T::Array[Prism::Node], location: Prism::Location).void } def initialize(source, body, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17544 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#17166 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # attr_reader body: Array[Node] + # attr_reader body: Array[Prism::node] # - # source://prism//lib/prism/node.rb#17581 + # source://prism//lib/prism/node.rb#17199 sig { returns(T::Array[Prism::Node]) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17549 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#17171 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17559 + # source://prism//lib/prism/node.rb#17181 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17554 + # source://prism//lib/prism/node.rb#17176 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> StatementsNode + # def copy: (?body: Array[Prism::node], ?location: Location) -> StatementsNode # - # source://prism//lib/prism/node.rb#17564 - sig { params(params: T.untyped).returns(Prism::StatementsNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#17186 + 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#17549 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#17171 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { body: Array[Node], location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { body: Array[Prism::node], location: Location } # - # source://prism//lib/prism/node.rb#17576 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#17194 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#17585 + # source://prism//lib/prism/node.rb#17203 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of @@ -25535,7 +28848,8 @@ class Prism::StatementsNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#17605 + # source://prism//lib/prism/node.rb#17223 + sig { override.returns(Symbol) } def type; end class << self @@ -25546,31 +28860,32 @@ class Prism::StatementsNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#17615 + # source://prism//lib/prism/node.rb#17233 def type; end end end # Flags for string nodes. # -# source://prism//lib/prism/node.rb#19352 +# source://prism//lib/prism/node.rb#18962 module Prism::StringFlags; end # internal bytes forced the encoding to binary # -# source://prism//lib/prism/node.rb#19357 +# source://prism//lib/prism/node.rb#18967 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#19354 +# source://prism//lib/prism/node.rb#18964 Prism::StringFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) -# frozen by virtue of a `frozen_string_literal` comment -# -# source://prism//lib/prism/node.rb#19360 +# source://prism//lib/prism/node.rb#18970 Prism::StringFlags::FROZEN = T.let(T.unsafe(nil), Integer) +# source://prism//lib/prism/node.rb#18973 +Prism::StringFlags::MUTABLE = T.let(T.unsafe(nil), Integer) + # Represents a string literal, a string contained within a `%w` list, or plain string content within an interpolated string. # # "foo" @@ -25582,7 +28897,7 @@ Prism::StringFlags::FROZEN = T.let(T.unsafe(nil), Integer) # "foo #{bar} baz" # ^^^^ ^^^^ # -# source://prism//lib/prism/node.rb#17630 +# source://prism//lib/prism/node.rb#17248 class Prism::StringNode < ::Prism::Node include ::Prism::HeredocQuery @@ -25590,83 +28905,104 @@ class Prism::StringNode < ::Prism::Node # # @return [StringNode] a new instance of StringNode # - # source://prism//lib/prism/node.rb#17632 + # source://prism//lib/prism/node.rb#17250 + sig do + params( + source: Prism::Source, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + content_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + unescaped: String, + location: Prism::Location + ).void + end def initialize(source, flags, opening_loc, content_loc, closing_loc, unescaped, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17644 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#17262 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17649 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#17267 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#17748 + # source://prism//lib/prism/node.rb#17366 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#17707 + # source://prism//lib/prism/node.rb#17319 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17659 + # source://prism//lib/prism/node.rb#17277 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17654 + # source://prism//lib/prism/node.rb#17272 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def content: () -> String # - # source://prism//lib/prism/node.rb#17743 + # source://prism//lib/prism/node.rb#17361 sig { returns(String) } def content; end # attr_reader content_loc: Location # - # source://prism//lib/prism/node.rb#17701 + # source://prism//lib/prism/node.rb#17312 sig { returns(Prism::Location) } def content_loc; end - # def copy: (**params) -> StringNode + # def copy: (?flags: Integer, ?opening_loc: Location?, ?content_loc: Location, ?closing_loc: Location?, ?unescaped: String, ?location: Location) -> StringNode # - # source://prism//lib/prism/node.rb#17664 - sig { params(params: T.untyped).returns(Prism::StringNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#17282 + sig do + params( + flags: Integer, + opening_loc: T.nilable(Prism::Location), + content_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + unescaped: String, + location: Prism::Location + ).returns(Prism::StringNode) + end + def copy(flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17649 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#17267 + 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#17680 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#17290 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def forced_binary_encoding?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#17728 + # source://prism//lib/prism/node.rb#17341 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -25674,7 +29010,7 @@ class Prism::StringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#17723 + # source://prism//lib/prism/node.rb#17336 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -25682,27 +29018,46 @@ class Prism::StringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#17733 + # source://prism//lib/prism/node.rb#17346 sig { returns(T::Boolean) } def frozen?; end + sig { returns(T::Boolean) } + def heredoc?; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#17753 + # source://prism//lib/prism/node.rb#17371 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end + # def mutable?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#17351 + sig { returns(T::Boolean) } + def mutable?; end + # def opening: () -> String? # - # source://prism//lib/prism/node.rb#17738 + # source://prism//lib/prism/node.rb#17356 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#17689 + # source://prism//lib/prism/node.rb#17299 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 + sig { returns(Prism::InterpolatedStringNode) } + def to_interpolated; end + # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a @@ -25718,12 +29073,13 @@ class Prism::StringNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#17778 + # source://prism//lib/prism/node.rb#17396 + sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#17719 + # source://prism//lib/prism/node.rb#17332 sig { returns(String) } def unescaped; end @@ -25731,7 +29087,7 @@ class Prism::StringNode < ::Prism::Node # private attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#17685 + # source://prism//lib/prism/node.rb#17295 sig { returns(Integer) } def flags; end @@ -25743,7 +29099,7 @@ class Prism::StringNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#17788 + # source://prism//lib/prism/node.rb#17406 def type; end end end @@ -25756,110 +29112,132 @@ end # super foo, bar # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#17800 +# source://prism//lib/prism/node.rb#17418 class Prism::SuperNode < ::Prism::Node - # def initialize: (Location keyword_loc, Location? lparen_loc, ArgumentsNode? arguments, Location? rparen_loc, Node? block, Location location) -> void + # 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#17802 + # source://prism//lib/prism/node.rb#17420 + sig do + params( + source: Prism::Source, + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location), + block: T.nilable(Prism::Node), + location: Prism::Location + ).void + end def initialize(source, keyword_loc, lparen_loc, arguments, rparen_loc, block, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17814 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#17432 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#17876 + # source://prism//lib/prism/node.rb#17488 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end - # attr_reader block: Node? + # attr_reader block: Prism::node? # - # source://prism//lib/prism/node.rb#17891 + # source://prism//lib/prism/node.rb#17504 sig { returns(T.nilable(Prism::Node)) } def block; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17819 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#17437 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17832 + # source://prism//lib/prism/node.rb#17450 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17824 + # source://prism//lib/prism/node.rb#17442 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> SuperNode + # 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#17837 - sig { params(params: T.untyped).returns(Prism::SuperNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#17455 + sig do + params( + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location), + block: T.nilable(Prism::Node), + location: Prism::Location + ).returns(Prism::SuperNode) + end + def copy(keyword_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), arguments: T.unsafe(nil), rparen_loc: T.unsafe(nil), block: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17819 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#17437 + 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: Node?, location: Location } + # 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#17853 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#17463 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#17910 + # source://prism//lib/prism/node.rb#17523 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#17895 + # source://prism//lib/prism/node.rb#17508 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#17858 + # source://prism//lib/prism/node.rb#17468 sig { returns(Prism::Location) } def keyword_loc; end # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#17900 + # source://prism//lib/prism/node.rb#17513 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#17864 + # source://prism//lib/prism/node.rb#17475 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#17905 + # source://prism//lib/prism/node.rb#17518 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#17879 + # source://prism//lib/prism/node.rb#17491 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end @@ -25878,7 +29256,8 @@ class Prism::SuperNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#17944 + # source://prism//lib/prism/node.rb#17557 + sig { override.returns(Symbol) } def type; end class << self @@ -25889,29 +29268,29 @@ class Prism::SuperNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#17954 + # source://prism//lib/prism/node.rb#17567 def type; end end end # Flags for symbol nodes. # -# source://prism//lib/prism/node.rb#19364 +# source://prism//lib/prism/node.rb#18977 module Prism::SymbolFlags; end # internal bytes forced the encoding to binary # -# source://prism//lib/prism/node.rb#19369 +# source://prism//lib/prism/node.rb#18982 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#19372 +# source://prism//lib/prism/node.rb#18985 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#19366 +# source://prism//lib/prism/node.rb#18979 Prism::SymbolFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # Represents a symbol literal or a symbol contained within a `%i` list. @@ -25922,77 +29301,98 @@ Prism::SymbolFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # %i[foo] # ^^^ # -# source://prism//lib/prism/node.rb#17966 +# source://prism//lib/prism/node.rb#17579 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#17968 + # source://prism//lib/prism/node.rb#17581 + sig do + params( + source: Prism::Source, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + value_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + unescaped: String, + location: Prism::Location + ).void + end def initialize(source, flags, opening_loc, value_loc, closing_loc, unescaped, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17980 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#17593 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17985 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#17598 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#18090 + # source://prism//lib/prism/node.rb#17698 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#18049 + # source://prism//lib/prism/node.rb#17656 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17995 + # source://prism//lib/prism/node.rb#17608 + sig { override.returns(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#17603 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> SymbolNode + # def copy: (?flags: Integer, ?opening_loc: Location?, ?value_loc: Location?, ?closing_loc: Location?, ?unescaped: String, ?location: Location) -> SymbolNode # - # source://prism//lib/prism/node.rb#18000 - sig { params(params: T.untyped).returns(Prism::SymbolNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#17613 + sig do + params( + flags: Integer, + opening_loc: T.nilable(Prism::Location), + value_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + unescaped: String, + location: Prism::Location + ).returns(Prism::SymbolNode) + end + def copy(flags: T.unsafe(nil), opening_loc: T.unsafe(nil), value_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17985 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#17598 + 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#18016 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#17621 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def forced_binary_encoding?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#18070 + # source://prism//lib/prism/node.rb#17678 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -26000,7 +29400,7 @@ class Prism::SymbolNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#18075 + # source://prism//lib/prism/node.rb#17683 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end @@ -26008,24 +29408,25 @@ class Prism::SymbolNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#18065 + # source://prism//lib/prism/node.rb#17673 sig { returns(T::Boolean) } def forced_utf8_encoding?; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#18095 + # source://prism//lib/prism/node.rb#17703 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#18080 + # source://prism//lib/prism/node.rb#17688 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#18025 + # source://prism//lib/prism/node.rb#17630 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end @@ -26044,24 +29445,25 @@ class Prism::SymbolNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#18120 + # source://prism//lib/prism/node.rb#17728 + sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#18061 + # source://prism//lib/prism/node.rb#17669 sig { returns(String) } def unescaped; end # def value: () -> String? # - # source://prism//lib/prism/node.rb#18085 + # source://prism//lib/prism/node.rb#17693 sig { returns(T.nilable(String)) } def value; end # attr_reader value_loc: Location? # - # source://prism//lib/prism/node.rb#18037 + # source://prism//lib/prism/node.rb#17643 sig { returns(T.nilable(Prism::Location)) } def value_loc; end @@ -26069,7 +29471,7 @@ class Prism::SymbolNode < ::Prism::Node # private attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#18021 + # source://prism//lib/prism/node.rb#17626 sig { returns(Integer) } def flags; end @@ -26081,63 +29483,62 @@ class Prism::SymbolNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#18130 + # source://prism//lib/prism/node.rb#17738 def type; end end end # This represents a token from the Ruby source. # -# source://prism//lib/prism/parse_result.rb#454 +# source://prism//lib/prism/parse_result.rb#504 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#466 + # source://prism//lib/prism/parse_result.rb#516 + 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#500 + # source://prism//lib/prism/parse_result.rb#551 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#474 - sig { params(keys: T.untyped).returns(T.untyped) } + # source://prism//lib/prism/parse_result.rb#524 + 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#479 + # source://prism//lib/prism/parse_result.rb#529 sig { returns(Prism::Location) } def location; end # Implement the pretty print interface for Token. # - # source://prism//lib/prism/parse_result.rb#485 - sig { params(q: T.untyped).returns(T.untyped) } + # source://prism//lib/prism/parse_result.rb#536 + 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#460 - sig { returns(T.untyped) } + # source://prism//lib/prism/parse_result.rb#510 def type; end # A byteslice of the source that this token represents. # - # source://prism//lib/prism/parse_result.rb#463 - sig { returns(String) } + # source://prism//lib/prism/parse_result.rb#513 def value; end private # The Source object that represents the source this token came from. # - # source://prism//lib/prism/parse_result.rb#456 + # source://prism//lib/prism/parse_result.rb#506 def source; end end @@ -26156,47 +29557,48 @@ module Prism::Translation; end class Prism::Translation::Parser < ::Parser::Base # The default encoding for Ruby files is UTF-8. # - # source://prism//lib/prism/translation/parser.rb#33 + # source://prism//lib/prism/translation/parser.rb#36 def default_encoding; end # Parses a source buffer and returns the AST. # - # source://prism//lib/prism/translation/parser.rb#41 + # source://prism//lib/prism/translation/parser.rb#44 def parse(source_buffer); end # Parses a source buffer and returns the AST and the source code comments. # - # source://prism//lib/prism/translation/parser.rb#54 + # source://prism//lib/prism/translation/parser.rb#57 def parse_with_comments(source_buffer); end # Parses a source buffer and returns the AST, the source code comments, # and the tokens emitted by the lexer. # - # source://prism//lib/prism/translation/parser.rb#71 + # source://prism//lib/prism/translation/parser.rb#74 def tokenize(source_buffer, recover = T.unsafe(nil)); end # Since prism resolves num params for us, we don't need to support this # kind of logic here. # - # source://prism//lib/prism/translation/parser.rb#97 + # source://prism//lib/prism/translation/parser.rb#100 def try_declare_numparam(node); end - # source://prism//lib/prism/translation/parser.rb#28 + # source://prism//lib/prism/translation/parser.rb#31 + sig { overridable.returns(Integer) } def version; end - # source://prism//lib/prism/translation/parser.rb#37 + # source://prism//lib/prism/translation/parser.rb#40 def yyerror; end private # Build the parser gem AST from the prism AST. # - # source://prism//lib/prism/translation/parser.rb#146 + # source://prism//lib/prism/translation/parser.rb#258 def build_ast(program, offset_cache); end # Build the parser gem comments from the prism comments. # - # source://prism//lib/prism/translation/parser.rb#151 + # source://prism//lib/prism/translation/parser.rb#263 def build_comments(comments, offset_cache); end # Prism deals with offsets in bytes, while the parser gem deals with @@ -26207,28 +29609,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#129 + # source://prism//lib/prism/translation/parser.rb#241 def build_offset_cache(source); end # Build a range from a prism location. # - # source://prism//lib/prism/translation/parser.rb#163 + # source://prism//lib/prism/translation/parser.rb#275 def build_range(location, offset_cache); end # Build the parser gem tokens from the prism tokens. # - # source://prism//lib/prism/translation/parser.rb#158 + # source://prism//lib/prism/translation/parser.rb#270 def build_tokens(tokens, offset_cache); end # Converts the version format handled by Parser to the format handled by Prism. # - # source://prism//lib/prism/translation/parser.rb#172 + # source://prism//lib/prism/translation/parser.rb#284 def convert_for_prism(version); end + # Build a diagnostic from the given prism parse error. + # + # source://prism//lib/prism/translation/parser.rb#119 + def error_diagnostic(error, offset_cache); end + # If there was a error generated during the parse, then raise an # appropriate syntax error. Otherwise return the result. # - # source://prism//lib/prism/translation/parser.rb#111 + # source://prism//lib/prism/translation/parser.rb#219 def unwrap(result, offset_cache); end # This is a hook to allow consumers to disable some errors if they don't @@ -26236,8 +29643,39 @@ class Prism::Translation::Parser < ::Parser::Base # # @return [Boolean] # - # source://prism//lib/prism/translation/parser.rb#105 + # source://prism//lib/prism/translation/parser.rb#108 def valid_error?(error); end + + # This is a hook to allow consumers to disable some warnings if they don't + # want them to block creating the syntax tree. + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/parser.rb#114 + def valid_warning?(warning); end + + # Build a diagnostic from the given prism parse warning. + # + # source://prism//lib/prism/translation/parser.rb#192 + def warning_diagnostic(warning, offset_cache); end +end + +# This class is the entry-point for Ruby 3.3 of `Prism::Translation::Parser`. +# +# source://prism//lib/prism/translation/parser33.rb#6 +class Prism::Translation::Parser33 < ::Prism::Translation::Parser + # source://prism//lib/prism/translation/parser33.rb#7 + sig { override.returns(Integer) } + def version; end +end + +# This class is the entry-point for Ruby 3.4 of `Prism::Translation::Parser`. +# +# source://prism//lib/prism/translation/parser34.rb#6 +class Prism::Translation::Parser34 < ::Prism::Translation::Parser + # source://prism//lib/prism/translation/parser34.rb#7 + sig { override.returns(Integer) } + def version; end end # A visitor that knows how to convert a prism syntax tree into the @@ -26245,6 +29683,8 @@ 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. # @@ -26345,49 +29785,49 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # { **foo } # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#141 + # source://prism//lib/prism/translation/parser/compiler.rb#148 def visit_assoc_splat_node(node); end # $+ # ^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#151 + # source://prism//lib/prism/translation/parser/compiler.rb#158 def visit_back_reference_read_node(node); end # begin end # ^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#157 + # source://prism//lib/prism/translation/parser/compiler.rb#164 def visit_begin_node(node); end # foo(&bar) # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#195 + # source://prism//lib/prism/translation/parser/compiler.rb#202 def visit_block_argument_node(node); end # foo { |; bar| } # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#201 + # source://prism//lib/prism/translation/parser/compiler.rb#208 def visit_block_local_variable_node(node); end # A block on a keyword or method call. # # @raise [CompilationError] # - # source://prism//lib/prism/translation/parser/compiler.rb#206 + # source://prism//lib/prism/translation/parser/compiler.rb#213 def visit_block_node(node); end # def foo(&bar); end # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#212 + # source://prism//lib/prism/translation/parser/compiler.rb#219 def visit_block_parameter_node(node); end # A block's parameters. # - # source://prism//lib/prism/translation/parser/compiler.rb#217 + # source://prism//lib/prism/translation/parser/compiler.rb#224 def visit_block_parameters_node(node); end # break @@ -26396,7 +29836,7 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # break foo # ^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#226 + # source://prism//lib/prism/translation/parser/compiler.rb#233 def visit_break_node(node); end # foo.bar += baz @@ -26404,7 +29844,7 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # foo.bar &&= baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#300 + # source://prism//lib/prism/translation/parser/compiler.rb#319 def visit_call_and_write_node(node); end # foo @@ -26416,13 +29856,13 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # foo.bar() {} # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#238 + # source://prism//lib/prism/translation/parser/compiler.rb#245 def visit_call_node(node); end # foo.bar += baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#300 + # source://prism//lib/prism/translation/parser/compiler.rb#319 def visit_call_operator_write_node(node); end # foo.bar += baz @@ -26430,37 +29870,37 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # foo.bar ||= baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#300 + # source://prism//lib/prism/translation/parser/compiler.rb#319 def visit_call_or_write_node(node); end # foo.bar, = 1 # ^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#327 + # source://prism//lib/prism/translation/parser/compiler.rb#346 def visit_call_target_node(node); end # foo => bar => baz # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#339 + # source://prism//lib/prism/translation/parser/compiler.rb#358 def visit_capture_pattern_node(node); end # case foo; in bar; end # ^^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#358 + # source://prism//lib/prism/translation/parser/compiler.rb#377 def visit_case_match_node(node); end # case foo; when bar; end # ^^^^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#345 + # source://prism//lib/prism/translation/parser/compiler.rb#364 def visit_case_node(node); end # class Foo; end # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#371 + # source://prism//lib/prism/translation/parser/compiler.rb#390 def visit_class_node(node); end # @@foo += bar @@ -26468,13 +29908,13 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # @@foo &&= bar # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#403 + # source://prism//lib/prism/translation/parser/compiler.rb#419 def visit_class_variable_and_write_node(node); end # @@foo += bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#403 + # source://prism//lib/prism/translation/parser/compiler.rb#419 def visit_class_variable_operator_write_node(node); end # @@foo += bar @@ -26482,28 +29922,25 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # @@foo ||= bar # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#403 + # source://prism//lib/prism/translation/parser/compiler.rb#419 def visit_class_variable_or_write_node(node); end # @@foo # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#384 + # source://prism//lib/prism/translation/parser/compiler.rb#403 def visit_class_variable_read_node(node); end # @@foo, = bar # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#421 + # source://prism//lib/prism/translation/parser/compiler.rb#437 def visit_class_variable_target_node(node); end # @@foo = 1 # ^^^^^^^^^ # - # @@foo, @@bar = 1 - # ^^^^^ ^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#393 + # source://prism//lib/prism/translation/parser/compiler.rb#409 def visit_class_variable_write_node(node); end # Foo += bar @@ -26511,13 +29948,13 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # Foo &&= bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#442 + # source://prism//lib/prism/translation/parser/compiler.rb#458 def visit_constant_and_write_node(node); end # Foo += bar # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#442 + # source://prism//lib/prism/translation/parser/compiler.rb#458 def visit_constant_operator_write_node(node); end # Foo += bar @@ -26525,7 +29962,7 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # Foo ||= bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#442 + # source://prism//lib/prism/translation/parser/compiler.rb#458 def visit_constant_or_write_node(node); end # Foo::Bar += baz @@ -26533,19 +29970,19 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # Foo::Bar &&= baz # ^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#496 + # source://prism//lib/prism/translation/parser/compiler.rb#512 def visit_constant_path_and_write_node(node); end # Foo::Bar # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#466 + # source://prism//lib/prism/translation/parser/compiler.rb#482 def visit_constant_path_node(node); end # Foo::Bar += baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#496 + # source://prism//lib/prism/translation/parser/compiler.rb#512 def visit_constant_path_operator_write_node(node); end # Foo::Bar += baz @@ -26553,13 +29990,13 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # Foo::Bar ||= baz # ^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#496 + # source://prism//lib/prism/translation/parser/compiler.rb#512 def visit_constant_path_or_write_node(node); end # Foo::Bar, = baz # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#514 + # source://prism//lib/prism/translation/parser/compiler.rb#530 def visit_constant_path_target_node(node); end # Foo::Bar = 1 @@ -26568,19 +30005,19 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # Foo::Foo, Bar::Bar = 1 # ^^^^^^^^ ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#486 + # source://prism//lib/prism/translation/parser/compiler.rb#502 def visit_constant_path_write_node(node); end # Foo # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#427 + # source://prism//lib/prism/translation/parser/compiler.rb#443 def visit_constant_read_node(node); end # Foo, = bar # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#460 + # source://prism//lib/prism/translation/parser/compiler.rb#476 def visit_constant_target_node(node); end # Foo = 1 @@ -26589,7 +30026,7 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # Foo, Bar = 1 # ^^^ ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#436 + # source://prism//lib/prism/translation/parser/compiler.rb#452 def visit_constant_write_node(node); end # def foo; end @@ -26598,7 +30035,7 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # def self.foo; end # ^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#523 + # source://prism//lib/prism/translation/parser/compiler.rb#539 def visit_def_node(node); end # defined? a @@ -26607,25 +30044,25 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # defined?(a) # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#570 + # source://prism//lib/prism/translation/parser/compiler.rb#586 def visit_defined_node(node); end # if foo then bar else baz end # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#582 + # source://prism//lib/prism/translation/parser/compiler.rb#598 def visit_else_node(node); end # "foo #{bar}" # ^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#588 + # source://prism//lib/prism/translation/parser/compiler.rb#604 def visit_embedded_statements_node(node); end # "foo #@bar" # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#598 + # source://prism//lib/prism/translation/parser/compiler.rb#614 def visit_embedded_variable_node(node); end # begin; foo; ensure; bar; end @@ -26633,19 +30070,19 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # # @raise [CompilationError] # - # source://prism//lib/prism/translation/parser/compiler.rb#604 + # source://prism//lib/prism/translation/parser/compiler.rb#620 def visit_ensure_node(node); end # false # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#610 + # source://prism//lib/prism/translation/parser/compiler.rb#626 def visit_false_node(node); end # foo => [*, bar, *] # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#616 + # source://prism//lib/prism/translation/parser/compiler.rb#632 def visit_find_pattern_node(node); end # 0..5 @@ -26653,31 +30090,31 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # if foo .. bar; end # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1302 + # source://prism//lib/prism/translation/parser/compiler.rb#1350 def visit_flip_flop_node(node); end # 1.0 # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#628 + # source://prism//lib/prism/translation/parser/compiler.rb#644 def visit_float_node(node); end # for foo in bar do end # ^^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#634 + # source://prism//lib/prism/translation/parser/compiler.rb#650 def visit_for_node(node); end # def foo(...); bar(...); end # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#652 + # source://prism//lib/prism/translation/parser/compiler.rb#668 def visit_forwarding_arguments_node(node); end # def foo(...); end # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#658 + # source://prism//lib/prism/translation/parser/compiler.rb#674 def visit_forwarding_parameter_node(node); end # super @@ -26686,7 +30123,7 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # super {} # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#667 + # source://prism//lib/prism/translation/parser/compiler.rb#683 def visit_forwarding_super_node(node); end # $foo += bar @@ -26694,13 +30131,13 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # $foo &&= bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#698 + # source://prism//lib/prism/translation/parser/compiler.rb#711 def visit_global_variable_and_write_node(node); end # $foo += bar # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#698 + # source://prism//lib/prism/translation/parser/compiler.rb#711 def visit_global_variable_operator_write_node(node); end # $foo += bar @@ -26708,40 +30145,37 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # $foo ||= bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#698 + # source://prism//lib/prism/translation/parser/compiler.rb#711 def visit_global_variable_or_write_node(node); end # $foo # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#679 + # source://prism//lib/prism/translation/parser/compiler.rb#695 def visit_global_variable_read_node(node); end # $foo, = bar # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#716 + # source://prism//lib/prism/translation/parser/compiler.rb#729 def visit_global_variable_target_node(node); end # $foo = 1 # ^^^^^^^^ # - # $foo, $bar = 1 - # ^^^^ ^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#688 + # source://prism//lib/prism/translation/parser/compiler.rb#701 def visit_global_variable_write_node(node); end # {} # ^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#722 + # source://prism//lib/prism/translation/parser/compiler.rb#735 def visit_hash_node(node); end # foo => {} # ^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#732 + # source://prism//lib/prism/translation/parser/compiler.rb#745 def visit_hash_pattern_node(node); end # if foo then bar end @@ -26753,12 +30187,13 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # foo ? bar : baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#750 + # source://prism//lib/prism/translation/parser/compiler.rb#763 def visit_if_node(node); end # 1i + # ^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#791 + # source://prism//lib/prism/translation/parser/compiler.rb#805 def visit_imaginary_node(node); end # { foo: } @@ -26766,7 +30201,7 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # # @raise [CompilationError] # - # source://prism//lib/prism/translation/parser/compiler.rb#797 + # source://prism//lib/prism/translation/parser/compiler.rb#811 def visit_implicit_node(node); end # foo { |bar,| } @@ -26774,13 +30209,13 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # # @raise [CompilationError] # - # source://prism//lib/prism/translation/parser/compiler.rb#803 + # source://prism//lib/prism/translation/parser/compiler.rb#817 def visit_implicit_rest_node(node); end # case foo; in bar; end # ^^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#809 + # source://prism//lib/prism/translation/parser/compiler.rb#823 def visit_in_node(node); end # foo[bar] += baz @@ -26788,13 +30223,13 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # foo[bar] &&= baz # ^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#835 + # source://prism//lib/prism/translation/parser/compiler.rb#849 def visit_index_and_write_node(node); end # foo[bar] += baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#835 + # source://prism//lib/prism/translation/parser/compiler.rb#849 def visit_index_operator_write_node(node); end # foo[bar] += baz @@ -26802,55 +30237,52 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # foo[bar] ||= baz # ^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#835 + # source://prism//lib/prism/translation/parser/compiler.rb#849 def visit_index_or_write_node(node); end # foo[bar], = 1 # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#861 + # source://prism//lib/prism/translation/parser/compiler.rb#875 def visit_index_target_node(node); end # ^^^^^^^^^^^ # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#891 + # source://prism//lib/prism/translation/parser/compiler.rb#902 def visit_instance_variable_and_write_node(node); end # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#891 + # source://prism//lib/prism/translation/parser/compiler.rb#902 def visit_instance_variable_operator_write_node(node); end # ^^^^^^^^^^^ # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#891 + # source://prism//lib/prism/translation/parser/compiler.rb#902 def visit_instance_variable_or_write_node(node); end # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#872 + # source://prism//lib/prism/translation/parser/compiler.rb#886 def visit_instance_variable_read_node(node); end # @foo, = bar # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#909 + # source://prism//lib/prism/translation/parser/compiler.rb#920 def visit_instance_variable_target_node(node); end # ^^^^^^^^ # - # @foo, @bar = 1 - # ^^^^ ^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#881 + # source://prism//lib/prism/translation/parser/compiler.rb#892 def visit_instance_variable_write_node(node); end # 1 # ^ # - # source://prism//lib/prism/translation/parser/compiler.rb#915 + # source://prism//lib/prism/translation/parser/compiler.rb#926 def visit_integer_node(node); end # /foo #{bar}/ @@ -26858,37 +30290,37 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # if /foo #{bar}/ then end # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#921 + # source://prism//lib/prism/translation/parser/compiler.rb#932 def visit_interpolated_match_last_line_node(node); end # /foo #{bar}/ # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#921 + # source://prism//lib/prism/translation/parser/compiler.rb#932 def visit_interpolated_regular_expression_node(node); end # "foo #{bar}" # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#936 + # source://prism//lib/prism/translation/parser/compiler.rb#947 def visit_interpolated_string_node(node); end # :"foo #{bar}" # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#951 + # source://prism//lib/prism/translation/parser/compiler.rb#1010 def visit_interpolated_symbol_node(node); end # `foo #{bar}` # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#961 + # source://prism//lib/prism/translation/parser/compiler.rb#1020 def visit_interpolated_x_string_node(node); end # foo(bar: baz) # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#976 + # source://prism//lib/prism/translation/parser/compiler.rb#1035 def visit_keyword_hash_node(node); end # def foo(**bar); end @@ -26897,12 +30329,13 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # def foo(**); end # ^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#985 + # source://prism//lib/prism/translation/parser/compiler.rb#1044 def visit_keyword_rest_parameter_node(node); end # -> {} + # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#993 + # source://prism//lib/prism/translation/parser/compiler.rb#1053 def visit_lambda_node(node); end # foo += bar @@ -26910,13 +30343,13 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # foo &&= bar # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1037 + # source://prism//lib/prism/translation/parser/compiler.rb#1094 def visit_local_variable_and_write_node(node); end # foo += bar # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1037 + # source://prism//lib/prism/translation/parser/compiler.rb#1094 def visit_local_variable_operator_write_node(node); end # foo += bar @@ -26924,28 +30357,25 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # foo ||= bar # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1037 + # source://prism//lib/prism/translation/parser/compiler.rb#1094 def visit_local_variable_or_write_node(node); end # foo # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1018 + # source://prism//lib/prism/translation/parser/compiler.rb#1078 def visit_local_variable_read_node(node); end # foo, = bar # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1055 + # source://prism//lib/prism/translation/parser/compiler.rb#1112 def visit_local_variable_target_node(node); end # foo = 1 # ^^^^^^^ # - # foo, bar = 1 - # ^^^ ^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1027 + # source://prism//lib/prism/translation/parser/compiler.rb#1084 def visit_local_variable_write_node(node); end # /foo/ @@ -26953,47 +30383,50 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # if /foo/ then end # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1336 + # source://prism//lib/prism/translation/parser/compiler.rb#1384 def visit_match_last_line_node(node); end - # source://prism//lib/prism/translation/parser/compiler.rb#1066 + # foo in bar + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1122 def visit_match_predicate_node(node); end # foo => bar # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1085 + # source://prism//lib/prism/translation/parser/compiler.rb#1132 def visit_match_required_node(node); end # /(?foo)/ =~ bar # ^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1095 + # source://prism//lib/prism/translation/parser/compiler.rb#1142 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#1106 + # source://prism//lib/prism/translation/parser/compiler.rb#1153 def visit_missing_node(node); end # module Foo; end # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1112 + # source://prism//lib/prism/translation/parser/compiler.rb#1159 def visit_module_node(node); end # foo, bar = baz # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1123 + # source://prism//lib/prism/translation/parser/compiler.rb#1170 def visit_multi_target_node(node); end # foo, bar = baz # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1137 + # source://prism//lib/prism/translation/parser/compiler.rb#1184 def visit_multi_write_node(node); end # next @@ -27002,55 +30435,55 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # next foo # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1158 + # source://prism//lib/prism/translation/parser/compiler.rb#1205 def visit_next_node(node); end # nil # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1170 + # source://prism//lib/prism/translation/parser/compiler.rb#1217 def visit_nil_node(node); end # def foo(**nil); end # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1176 + # source://prism//lib/prism/translation/parser/compiler.rb#1223 def visit_no_keywords_parameter_node(node); end # -> { _1 + _2 } # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1186 + # source://prism//lib/prism/translation/parser/compiler.rb#1233 def visit_numbered_parameters_node(node); end # $1 # ^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1192 + # source://prism//lib/prism/translation/parser/compiler.rb#1239 def visit_numbered_reference_read_node(node); end # def foo(bar: baz); end # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1198 + # source://prism//lib/prism/translation/parser/compiler.rb#1245 def visit_optional_keyword_parameter_node(node); end # def foo(bar = 1); end # ^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1204 + # source://prism//lib/prism/translation/parser/compiler.rb#1251 def visit_optional_parameter_node(node); end # a or b # ^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1210 + # source://prism//lib/prism/translation/parser/compiler.rb#1257 def visit_or_node(node); end # def foo(bar, *baz); end # ^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1216 + # source://prism//lib/prism/translation/parser/compiler.rb#1263 def visit_parameters_node(node); end # () @@ -27059,76 +30492,76 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # (1) # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1255 + # source://prism//lib/prism/translation/parser/compiler.rb#1302 def visit_parentheses_node(node); end # foo => ^(bar) # ^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1265 + # source://prism//lib/prism/translation/parser/compiler.rb#1312 def visit_pinned_expression_node(node); end # foo = 1 and bar => ^foo # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1271 + # source://prism//lib/prism/translation/parser/compiler.rb#1319 def visit_pinned_variable_node(node); end # END {} # - # source://prism//lib/prism/translation/parser/compiler.rb#1276 + # source://prism//lib/prism/translation/parser/compiler.rb#1324 def visit_post_execution_node(node); end # BEGIN {} # - # source://prism//lib/prism/translation/parser/compiler.rb#1286 + # source://prism//lib/prism/translation/parser/compiler.rb#1334 def visit_pre_execution_node(node); end # The top-level program node. # - # source://prism//lib/prism/translation/parser/compiler.rb#1296 + # source://prism//lib/prism/translation/parser/compiler.rb#1344 def visit_program_node(node); end # 0..5 # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1302 + # source://prism//lib/prism/translation/parser/compiler.rb#1350 def visit_range_node(node); end # 1r # ^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1324 + # source://prism//lib/prism/translation/parser/compiler.rb#1372 def visit_rational_node(node); end # redo # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1330 + # source://prism//lib/prism/translation/parser/compiler.rb#1378 def visit_redo_node(node); end # /foo/ # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1336 + # source://prism//lib/prism/translation/parser/compiler.rb#1384 def visit_regular_expression_node(node); end # def foo(bar:); end # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1351 + # source://prism//lib/prism/translation/parser/compiler.rb#1399 def visit_required_keyword_parameter_node(node); end # def foo(bar); end # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1357 + # source://prism//lib/prism/translation/parser/compiler.rb#1405 def visit_required_parameter_node(node); end # foo rescue bar # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1363 + # source://prism//lib/prism/translation/parser/compiler.rb#1411 def visit_rescue_modifier_node(node); end # begin; rescue; end @@ -27136,7 +30569,7 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # # @raise [CompilationError] # - # source://prism//lib/prism/translation/parser/compiler.rb#1381 + # source://prism//lib/prism/translation/parser/compiler.rb#1429 def visit_rescue_node(node); end # def foo(*bar); end @@ -27145,13 +30578,13 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # def foo(*); end # ^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1390 + # source://prism//lib/prism/translation/parser/compiler.rb#1438 def visit_rest_parameter_node(node); end # retry # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1396 + # source://prism//lib/prism/translation/parser/compiler.rb#1444 def visit_retry_node(node); end # return @@ -27160,37 +30593,42 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # return 1 # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1405 + # source://prism//lib/prism/translation/parser/compiler.rb#1453 def visit_return_node(node); end # self # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1417 + # source://prism//lib/prism/translation/parser/compiler.rb#1465 def visit_self_node(node); end + # A shareable constant. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1470 + def visit_shareable_constant_node(node); end + # class << self; end # ^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1423 + # source://prism//lib/prism/translation/parser/compiler.rb#1476 def visit_singleton_class_node(node); end # __ENCODING__ # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1435 + # source://prism//lib/prism/translation/parser/compiler.rb#1488 def visit_source_encoding_node(node); end # __FILE__ # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1441 + # source://prism//lib/prism/translation/parser/compiler.rb#1494 def visit_source_file_node(node); end # __LINE__ # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1447 + # source://prism//lib/prism/translation/parser/compiler.rb#1500 def visit_source_line_node(node); end # foo(*bar) @@ -27202,42 +30640,42 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # def foo(*); bar(*); end # ^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1459 + # source://prism//lib/prism/translation/parser/compiler.rb#1512 def visit_splat_node(node); end # A list of statements. # - # source://prism//lib/prism/translation/parser/compiler.rb#1472 + # source://prism//lib/prism/translation/parser/compiler.rb#1525 def visit_statements_node(node); end # "foo" # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1478 + # source://prism//lib/prism/translation/parser/compiler.rb#1531 def visit_string_node(node); end # super(foo) # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1495 + # source://prism//lib/prism/translation/parser/compiler.rb#1572 def visit_super_node(node); end # :foo # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1518 + # source://prism//lib/prism/translation/parser/compiler.rb#1595 def visit_symbol_node(node); end # true # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1536 + # source://prism//lib/prism/translation/parser/compiler.rb#1627 def visit_true_node(node); end # undef foo # ^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1542 + # source://prism//lib/prism/translation/parser/compiler.rb#1633 def visit_undef_node(node); end # unless foo; bar end @@ -27246,7 +30684,7 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # bar unless foo # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1551 + # source://prism//lib/prism/translation/parser/compiler.rb#1642 def visit_unless_node(node); end # until foo; bar end @@ -27255,13 +30693,13 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # bar until foo # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1581 + # source://prism//lib/prism/translation/parser/compiler.rb#1672 def visit_until_node(node); end # case foo; when bar; end # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1603 + # source://prism//lib/prism/translation/parser/compiler.rb#1694 def visit_when_node(node); end # while foo; bar end @@ -27270,13 +30708,13 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # bar while foo # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1617 + # source://prism//lib/prism/translation/parser/compiler.rb#1712 def visit_while_node(node); end # `foo` # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1639 + # source://prism//lib/prism/translation/parser/compiler.rb#1734 def visit_x_string_node(node); end # yield @@ -27285,7 +30723,7 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # yield 1 # ^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1657 + # source://prism//lib/prism/translation/parser/compiler.rb#1766 def visit_yield_node(node); end private @@ -27293,65 +30731,86 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # 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#1671 + # source://prism//lib/prism/translation/parser/compiler.rb#1780 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#1678 + # source://prism//lib/prism/translation/parser/compiler.rb#1787 def find_forwarding(node); end + # Because we have mutated the AST to allow for newlines in the middle of + # a rational, we need to manually handle the value here. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1801 + def imaginary_value(node); end + + # Negate the value of a numeric node. This is a special case where you + # have a negative sign on one line and then a number on the next line. + # In normal Ruby, this will always be a method call. The parser gem, + # however, marks this as a numeric literal. We have to massage the tree + # here to get it into the correct form. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1810 + def numeric_negate(message_loc, receiver); end + # Blocks can have a special set of parameters that automatically expand # when given arrays if they have a single required parameter and no # other parameters. # # @return [Boolean] # - # source://prism//lib/prism/translation/parser/compiler.rb#1693 + # source://prism//lib/prism/translation/parser/compiler.rb#1822 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#1835 + 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#1710 + # source://prism//lib/prism/translation/parser/compiler.rb#1849 def srange(location); end # Constructs a new source range by finding the given tokens between the # given start offset and end offset. If the needle is not found, it # returns nil. # - # source://prism//lib/prism/translation/parser/compiler.rb#1722 + # source://prism//lib/prism/translation/parser/compiler.rb#1861 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#1715 + # source://prism//lib/prism/translation/parser/compiler.rb#1854 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#1731 + # source://prism//lib/prism/translation/parser/compiler.rb#1870 def token(location); end # Visit a block node on a call. # - # source://prism//lib/prism/translation/parser/compiler.rb#1736 + # source://prism//lib/prism/translation/parser/compiler.rb#1875 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#1769 + # source://prism//lib/prism/translation/parser/compiler.rb#1908 def visit_heredoc(node); end # Visit a numeric node and account for the optional sign. # - # source://prism//lib/prism/translation/parser/compiler.rb#1815 + # source://prism//lib/prism/translation/parser/compiler.rb#1954 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#1827 + # source://prism//lib/prism/translation/parser/compiler.rb#1966 def within_pattern; end end @@ -27364,27 +30823,11 @@ 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#1707 +# source://prism//lib/prism/translation/parser/compiler.rb#1846 Prism::Translation::Parser::Compiler::Range = Parser::Source::Range -# The parser gem has a list of diagnostics with a hard-coded set of error -# messages. We create our own diagnostic class in order to set our own -# error messages. -# -# source://prism//lib/prism/translation/parser.rb#15 -class Prism::Translation::Parser::Diagnostic < ::Parser::Diagnostic - # Initialize a new diagnostic with the given message and location. - # - # @return [Diagnostic] a new instance of Diagnostic - # - # source://prism//lib/prism/translation/parser.rb#20 - def initialize(message, location); end - - # The message generated by prism. - # - # source://prism//lib/prism/translation/parser.rb#17 - def message; end -end +# source://prism//lib/prism/translation/parser.rb#12 +Prism::Translation::Parser::Diagnostic = Parser::Diagnostic # Accepts a list of prism tokens and converts them into the expected # format for the parser gem. @@ -27396,43 +30839,68 @@ class Prism::Translation::Parser::Lexer # # @return [Lexer] a new instance of Lexer # - # source://prism//lib/prism/translation/parser/lexer.rb#193 + # source://prism//lib/prism/translation/parser/lexer.rb#204 def initialize(source_buffer, lexed, offset_cache); end - # An array of prism tokens that we lexed. + # An array of tuples that contain prism tokens and their associated lex + # state when they were lexed. # - # source://prism//lib/prism/translation/parser/lexer.rb#186 + # source://prism//lib/prism/translation/parser/lexer.rb#197 def lexed; end # A hash that maps offsets in bytes to offsets in characters. # - # source://prism//lib/prism/translation/parser/lexer.rb#189 + # source://prism//lib/prism/translation/parser/lexer.rb#200 def offset_cache; end # The Parser::Source::Buffer that the tokens were lexed from. # - # source://prism//lib/prism/translation/parser/lexer.rb#183 + # source://prism//lib/prism/translation/parser/lexer.rb#193 def source_buffer; end # Convert the prism tokens into the expected format for the parser gem. # - # source://prism//lib/prism/translation/parser/lexer.rb#203 + # source://prism//lib/prism/translation/parser/lexer.rb#214 def to_a; end private # Parse a complex from the string representation. # - # source://prism//lib/prism/translation/parser/lexer.rb#310 + # source://prism//lib/prism/translation/parser/lexer.rb#387 def parse_complex(value); end + # Parse a float from the string representation. + # + # source://prism//lib/prism/translation/parser/lexer.rb#380 + def parse_float(value); end + + # Parse an integer from the string representation. + # + # source://prism//lib/prism/translation/parser/lexer.rb#373 + def parse_integer(value); end + # Parse a rational from the string representation. # - # source://prism//lib/prism/translation/parser/lexer.rb#323 + # source://prism//lib/prism/translation/parser/lexer.rb#402 def parse_rational(value); end end -# source://prism//lib/prism/translation/parser/lexer.rb#199 +# These constants represent flags in our lex state. We really, really +# don't want to be using them and we really, really don't want to be +# exposing them as part of our public API. Unfortunately, we don't have +# another way of matching the exact tokens that the parser gem expects +# without them. We should find another way to do this, but in the +# meantime we'll hide them from the documentation and mark them as +# private constants. +# +# source://prism//lib/prism/translation/parser/lexer.rb#187 +Prism::Translation::Parser::Lexer::EXPR_BEG = T.let(T.unsafe(nil), Integer) + +# source://prism//lib/prism/translation/parser/lexer.rb#188 +Prism::Translation::Parser::Lexer::EXPR_LABEL = T.let(T.unsafe(nil), Integer) + +# source://prism//lib/prism/translation/parser/lexer.rb#210 Prism::Translation::Parser::Lexer::Range = Parser::Source::Range # The direct translating of types between the two lexers. @@ -27440,267 +30908,1091 @@ Prism::Translation::Parser::Lexer::Range = Parser::Source::Range # source://prism//lib/prism/translation/parser/lexer.rb#10 Prism::Translation::Parser::Lexer::TYPES = T.let(T.unsafe(nil), Hash) -# source://prism//lib/prism/translation/parser.rb#26 +# The parser gem has a list of diagnostics with a hard-coded set of error +# messages. We create our own diagnostic class in order to set our own +# error messages. +# +# source://prism//lib/prism/translation/parser.rb#18 +class Prism::Translation::Parser::PrismDiagnostic < ::Parser::Diagnostic + # Initialize a new diagnostic with the given message and location. + # + # @return [PrismDiagnostic] a new instance of PrismDiagnostic + # + # source://prism//lib/prism/translation/parser.rb#23 + def initialize(message, level, reason, location); end + + # This is the cached message coming from prism. + # + # source://prism//lib/prism/translation/parser.rb#20 + def message; end +end + +# source://prism//lib/prism/translation/parser.rb#29 Prism::Translation::Parser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) -# Note: This integration is not finished, and therefore still has many -# inconsistencies with Ripper. If you'd like to help out, pull requests would -# be greatly appreciated! -# -# This class is meant to provide a compatibility layer between prism and -# Ripper. It functions by parsing the entire tree first and then walking it -# and executing each of the Ripper callbacks as it goes. -# -# This class is going to necessarily be slower than the native Ripper API. It -# is meant as a stopgap until developers migrate to using prism. It is also -# meant as a test harness for the prism parser. +# This class provides a compatibility layer between prism and Ripper. It +# functions by parsing the entire tree first and then walking it and +# executing each of the Ripper callbacks as it goes. To use this class, you +# treat `Prism::Translation::Ripper` effectively as you would treat the +# `Ripper` class. +# +# Note that this class will serve the most common use cases, but Ripper's +# API is extensive and undocumented. It relies on reporting the state of the +# parser at any given time. We do our best to replicate that here, but +# because it is a different architecture it is not possible to perfectly +# replicate the behavior of Ripper. +# +# The main known difference is that we may omit dispatching some events in +# some cases. This impacts the following events: +# +# * on_assign_error +# * on_comma +# * on_ignored_nl +# * on_ignored_sp +# * on_kw +# * on_label_end +# * on_lbrace +# * on_lbracket +# * on_lparen +# * on_nl +# * on_op +# * on_operator_ambiguous +# * on_rbrace +# * on_rbracket +# * on_rparen +# * on_semicolon +# * on_sp +# * on_symbeg +# * on_tstring_beg +# * on_tstring_end # -# To use this class, you treat `Prism::Translation::Ripper` effectively as you would -# treat the `Ripper` class. -# -# source://prism//lib/prism/translation/ripper.rb#21 +# source://prism//lib/prism/translation/ripper.rb#43 class Prism::Translation::Ripper < ::Prism::Compiler # Create a new Translation::Ripper object with the given source. # # @return [Ripper] a new instance of Ripper # - # source://prism//lib/prism/translation/ripper.rb#75 - def initialize(source); end + # source://prism//lib/prism/translation/ripper.rb#444 + def initialize(source, filename = T.unsafe(nil), lineno = T.unsafe(nil)); end # The current column number of the parser. # - # source://prism//lib/prism/translation/ripper.rb#72 + # source://prism//lib/prism/translation/ripper.rb#441 def column; end # True if the parser encountered an error during parsing. # # @return [Boolean] # - # source://prism//lib/prism/translation/ripper.rb#87 + # source://prism//lib/prism/translation/ripper.rb#457 + sig { returns(T::Boolean) } def error?; end + # The filename of the source being parsed. + # + # source://prism//lib/prism/translation/ripper.rb#435 + def filename; end + # The current line number of the parser. # - # source://prism//lib/prism/translation/ripper.rb#69 + # source://prism//lib/prism/translation/ripper.rb#438 def lineno; end # Parse the source and return the result. # - # source://prism//lib/prism/translation/ripper.rb#92 + # source://prism//lib/prism/translation/ripper.rb#462 + sig { returns(T.nilable(Result)) } def parse; end # The source that is being parsed. # - # source://prism//lib/prism/translation/ripper.rb#66 + # source://prism//lib/prism/translation/ripper.rb#432 def source; end - # Visit an AliasGlobalVariableNode. + # alias $foo $bar + # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#247 + # source://prism//lib/prism/translation/ripper.rb#561 def visit_alias_global_variable_node(node); end - # Visit an AliasMethodNode. + # alias foo bar + # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#226 + # source://prism//lib/prism/translation/ripper.rb#551 def visit_alias_method_node(node); end - # Visit an AndNode. + # foo => bar | baz + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#585 + def visit_alternation_pattern_node(node); end + + # a and b + # ^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#264 + # source://prism//lib/prism/translation/ripper.rb#605 def visit_and_node(node); end - # Visit an ArrayNode node. + # foo(bar) + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#796 + def visit_arguments_node(node); end + + # [] + # ^^ # - # source://prism//lib/prism/translation/ripper.rb#113 + # source://prism//lib/prism/translation/ripper.rb#615 def visit_array_node(node); end - # Visit a BackReferenceReadNode. + # foo => [bar] + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#775 + def visit_array_pattern_node(node); end + + # { a: 1 } + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#803 + def visit_assoc_node(node); end + + # def foo(**); bar(**); end + # ^^ + # + # { **foo } + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#816 + def visit_assoc_splat_node(node); end + + # $+ + # ^^ # - # source://prism//lib/prism/translation/ripper.rb#258 + # source://prism//lib/prism/translation/ripper.rb#825 def visit_back_reference_read_node(node); end - # Visit a BeginNode node. - # This is not at all bulletproof against different structures of begin/rescue/else/ensure/end. + # begin end + # ^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#315 + # source://prism//lib/prism/translation/ripper.rb#832 def visit_begin_node(node); end + # foo(&bar) + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#896 + def visit_block_argument_node(node); end + + # foo { |; bar| } + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#902 + def visit_block_local_variable_node(node); end + # Visit a BlockNode. # - # source://prism//lib/prism/translation/ripper.rb#191 + # source://prism//lib/prism/translation/ripper.rb#908 def visit_block_node(node); end - # Visit a BlockParametersNode. + # def foo(&bar); end + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#944 + def visit_block_parameter_node(node); end + + # A block's parameters. # - # source://prism//lib/prism/translation/ripper.rb#200 + # source://prism//lib/prism/translation/ripper.rb#958 def visit_block_parameters_node(node); end - # Visit a BreakNode. + # break + # ^^^^^ + # + # break foo + # ^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#218 + # source://prism//lib/prism/translation/ripper.rb#982 def visit_break_node(node); end - # Visit a CallNode node. - # Ripper distinguishes between many different method-call - # nodes -- unary and binary operators, "command" calls with - # no parentheses, and call/fcall/vcall. + # foo.bar &&= baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1194 + def visit_call_and_write_node(node); end + + # foo + # ^^^ + # + # foo.bar + # ^^^^^^^ + # + # foo.bar() {} + # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#123 + # source://prism//lib/prism/translation/ripper.rb#1002 def visit_call_node(node); end - # Visit an EmbeddedStatementsNode node. + # foo.bar += baz + # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#371 - def visit_embedded_statements_node(node); end + # source://prism//lib/prism/translation/ripper.rb#1172 + def visit_call_operator_write_node(node); end - # Visit a FalseNode. + # foo.bar ||= baz + # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#280 - def visit_false_node(node); end + # source://prism//lib/prism/translation/ripper.rb#1216 + def visit_call_or_write_node(node); end - # Visit a FloatNode node. + # foo.bar, = 1 + # ^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#286 - def visit_float_node(node); end + # source://prism//lib/prism/translation/ripper.rb#1238 + def visit_call_target_node(node); end - # Visit a GlobalVariableReadNode. + # foo => bar => baz + # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#252 - def visit_global_variable_read_node(node); end + # source://prism//lib/prism/translation/ripper.rb#1263 + def visit_capture_pattern_node(node); end - # Visit a ImaginaryNode node. + # case foo; in bar; end + # ^^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#291 - def visit_imaginary_node(node); end + # source://prism//lib/prism/translation/ripper.rb#1286 + def visit_case_match_node(node); end - # Visit an IntegerNode node. + # case foo; when bar; end + # ^^^^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#296 - def visit_integer_node(node); end + # source://prism//lib/prism/translation/ripper.rb#1273 + def visit_case_node(node); end - # Visit an InterpolatedStringNode node. + # class Foo; end + # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#366 - def visit_interpolated_string_node(node); end + # source://prism//lib/prism/translation/ripper.rb#1299 + def visit_class_node(node); end - # Visit an InterpolatedSymbolNode node. + # @@foo &&= bar + # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#381 - def visit_interpolated_symbol_node(node); end + # source://prism//lib/prism/translation/ripper.rb#1352 + def visit_class_variable_and_write_node(node); end - # Visit a LocalVariableAndWriteNode. + # @@foo += bar + # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#168 - def visit_local_variable_and_write_node(node); end + # source://prism//lib/prism/translation/ripper.rb#1338 + def visit_class_variable_operator_write_node(node); end - # Visit nodes for +=, *=, -=, etc., called LocalVariableOperatorWriteNodes. + # @@foo ||= bar + # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#178 - def visit_local_variable_operator_write_node(node); end + # source://prism//lib/prism/translation/ripper.rb#1366 + def visit_class_variable_or_write_node(node); end - # Visit a LocalVariableOrWriteNode. + # @@foo + # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#173 - def visit_local_variable_or_write_node(node); end + # source://prism//lib/prism/translation/ripper.rb#1317 + def visit_class_variable_read_node(node); end - # Visit a LocalVariableReadNode. + # @@foo, = bar + # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#183 - def visit_local_variable_read_node(node); end + # source://prism//lib/prism/translation/ripper.rb#1380 + def visit_class_variable_target_node(node); end - # Visit a LocalVariableWriteNode. + # @@foo = 1 + # ^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#161 - def visit_local_variable_write_node(node); end + # @@foo, @@bar = 1 + # ^^^^^ ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1327 + def visit_class_variable_write_node(node); end - # Visit an OrNode. + # Foo &&= bar + # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#269 - def visit_or_node(node); end + # source://prism//lib/prism/translation/ripper.rb#1422 + def visit_constant_and_write_node(node); end - # Visit a ParametersNode. - # This will require expanding as we support more kinds of parameters. + # Foo += bar + # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#206 - def visit_parameters_node(node); end + # source://prism//lib/prism/translation/ripper.rb#1408 + def visit_constant_operator_write_node(node); end - # Visit a ParenthesesNode node. + # Foo ||= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1436 + def visit_constant_or_write_node(node); end + + # Foo::Bar &&= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1523 + def visit_constant_path_and_write_node(node); end + + # Foo::Bar + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1457 + def visit_constant_path_node(node); end + + # Foo::Bar += baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1509 + def visit_constant_path_operator_write_node(node); end + + # Foo::Bar ||= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1537 + def visit_constant_path_or_write_node(node); end + + # Foo::Bar, = baz + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1551 + def visit_constant_path_target_node(node); end + + # Foo::Bar = 1 + # ^^^^^^^^^^^^ + # + # Foo::Foo, Bar::Bar = 1 + # ^^^^^^^^ ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1480 + def visit_constant_path_write_node(node); end + + # Foo + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1387 + def visit_constant_read_node(node); end + + # Foo, = bar + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1450 + def visit_constant_target_node(node); end + + # Foo = 1 + # ^^^^^^^ + # + # Foo, Bar = 1 + # ^^^ ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1397 + def visit_constant_write_node(node); end + + # def foo; end + # ^^^^^^^^^^^^ + # + # def self.foo; end + # ^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1560 + def visit_def_node(node); end + + # defined? a + # ^^^^^^^^^^ + # + # defined?(a) + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1607 + def visit_defined_node(node); end + + # if foo then bar else baz end + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1614 + def visit_else_node(node); end + + # "foo #{bar}" + # ^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1630 + def visit_embedded_statements_node(node); end + + # "foo #@bar" + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1651 + def visit_embedded_variable_node(node); end + + # Visit an EnsureNode node. + # + # source://prism//lib/prism/translation/ripper.rb#1662 + def visit_ensure_node(node); end + + # false + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1680 + def visit_false_node(node); end + + # foo => [*, bar, *] + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1687 + def visit_find_pattern_node(node); end + + # if foo .. bar; end + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1712 + def visit_flip_flop_node(node); end + + # 1.0 + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1726 + def visit_float_node(node); end + + # for foo in bar do end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1732 + def visit_for_node(node); end + + # def foo(...); bar(...); end + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1749 + def visit_forwarding_arguments_node(node); end + + # def foo(...); end + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1756 + def visit_forwarding_parameter_node(node); end + + # super + # ^^^^^ + # + # super {} + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1766 + def visit_forwarding_super_node(node); end + + # $foo &&= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1815 + def visit_global_variable_and_write_node(node); end + + # $foo += bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1801 + def visit_global_variable_operator_write_node(node); end + + # $foo ||= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1829 + def visit_global_variable_or_write_node(node); end + + # $foo + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1780 + def visit_global_variable_read_node(node); end + + # $foo, = bar + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1843 + def visit_global_variable_target_node(node); end + + # $foo = 1 + # ^^^^^^^^ + # + # $foo, $bar = 1 + # ^^^^ ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1790 + def visit_global_variable_write_node(node); end + + # {} + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#1850 + def visit_hash_node(node); end + + # foo => {} + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#1865 + def visit_hash_pattern_node(node); end + + # if foo then bar end + # ^^^^^^^^^^^^^^^^^^^ + # + # bar if foo + # ^^^^^^^^^^ + # + # foo ? bar : baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1907 + def visit_if_node(node); end + + # 1i + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#1943 + def visit_imaginary_node(node); end + + # { foo: } + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1949 + def visit_implicit_node(node); end + + # foo { |bar,| } + # ^ + # + # source://prism//lib/prism/translation/ripper.rb#1954 + def visit_implicit_rest_node(node); end + + # case foo; in bar; end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1961 + def visit_in_node(node); end + + # foo[bar] &&= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1996 + def visit_index_and_write_node(node); end + + # foo[bar] += baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1979 + def visit_index_operator_write_node(node); end + + # foo[bar] ||= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2013 + def visit_index_or_write_node(node); end + + # foo[bar], = 1 + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2030 + def visit_index_target_node(node); end + + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2072 + def visit_instance_variable_and_write_node(node); end + + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2058 + def visit_instance_variable_operator_write_node(node); end + + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2086 + def visit_instance_variable_or_write_node(node); end + + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2040 + def visit_instance_variable_read_node(node); end + + # @foo, = bar + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2100 + def visit_instance_variable_target_node(node); end + + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2047 + def visit_instance_variable_write_node(node); end + + # 1 + # ^ + # + # source://prism//lib/prism/translation/ripper.rb#2107 + def visit_integer_node(node); end + + # if /foo #{bar}/ then end + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2113 + def visit_interpolated_match_last_line_node(node); end + + # /foo #{bar}/ + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2132 + def visit_interpolated_regular_expression_node(node); end + + # "foo #{bar}" + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2151 + def visit_interpolated_string_node(node); end + + # :"foo #{bar}" + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2179 + def visit_interpolated_symbol_node(node); end + + # `foo #{bar}` + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2192 + def visit_interpolated_x_string_node(node); end + + # -> { it } + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2222 + def visit_it_parameters_node(node); end + + # foo(bar: baz) + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2227 + def visit_keyword_hash_node(node); end + + # def foo(**bar); end + # ^^^^^ + # + # def foo(**); end + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#2239 + def visit_keyword_rest_parameter_node(node); end + + # -> {} + # + # source://prism//lib/prism/translation/ripper.rb#2253 + def visit_lambda_node(node); end + + # foo &&= bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2350 + def visit_local_variable_and_write_node(node); end + + # foo += bar + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2336 + def visit_local_variable_operator_write_node(node); end + + # foo ||= bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2364 + def visit_local_variable_or_write_node(node); end + + # foo + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2313 + def visit_local_variable_read_node(node); end + + # foo, = bar + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2378 + def visit_local_variable_target_node(node); end + + # foo = 1 + # ^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2325 + def visit_local_variable_write_node(node); end + + # if /foo/ then end + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2385 + def visit_match_last_line_node(node); end + + # foo in bar + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2400 + def visit_match_predicate_node(node); end + + # foo => bar + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2409 + def visit_match_required_node(node); end + + # /(?foo)/ =~ bar + # ^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2418 + def visit_match_write_node(node); end + + # A node that is missing from the syntax tree. This is only used in the + # case of a syntax error. + # + # source://prism//lib/prism/translation/ripper.rb#2424 + def visit_missing_node(node); end + + # module Foo; end + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2430 + def visit_module_node(node); end + + # (foo, bar), bar = qux + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2447 + def visit_multi_target_node(node); end + + # foo, bar = baz + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2501 + def visit_multi_write_node(node); end + + # next + # ^^^^ + # + # next foo + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2521 + def visit_next_node(node); end + + # nil + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2535 + def visit_nil_node(node); end + + # def foo(**nil); end + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2542 + def visit_no_keywords_parameter_node(node); end + + # -> { _1 + _2 } + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2551 + def visit_numbered_parameters_node(node); end + + # $1 + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#2556 + def visit_numbered_reference_read_node(node); end + + # def foo(bar: baz); end + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2563 + def visit_optional_keyword_parameter_node(node); end + + # def foo(bar = 1); end + # ^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2573 + def visit_optional_parameter_node(node); end + + # a or b + # ^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2583 + def visit_or_node(node); end + + # def foo(bar, *baz); end + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2593 + def visit_parameters_node(node); end + + # () + # ^^ + # + # (1) + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2620 + def visit_parentheses_node(node); end + + # foo => ^(bar) + # ^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2634 + def visit_pinned_expression_node(node); end + + # foo = 1 and bar => ^foo + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2643 + def visit_pinned_variable_node(node); end + + # END {} + # ^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2649 + def visit_post_execution_node(node); end + + # BEGIN {} + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2664 + def visit_pre_execution_node(node); end + + # The top-level program node. + # + # source://prism//lib/prism/translation/ripper.rb#2678 + def visit_program_node(node); end + + # 0..5 + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2689 + def visit_range_node(node); end + + # 1r + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#2703 + def visit_rational_node(node); end + + # redo + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2709 + def visit_redo_node(node); end + + # /foo/ + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2716 + def visit_regular_expression_node(node); end + + # def foo(bar:); end + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2738 + def visit_required_keyword_parameter_node(node); end + + # def foo(bar); end + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2745 + def visit_required_parameter_node(node); end + + # foo rescue bar + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2752 + def visit_rescue_modifier_node(node); end + + # begin; rescue; end + # ^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2762 + def visit_rescue_node(node); end + + # def foo(*bar); end + # ^^^^ + # + # def foo(*); end + # ^ + # + # source://prism//lib/prism/translation/ripper.rb#2820 + def visit_rest_parameter_node(node); end + + # retry + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2832 + def visit_retry_node(node); end + + # return + # ^^^^^^ + # + # return 1 + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2842 + def visit_return_node(node); end + + # self + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2856 + def visit_self_node(node); end + + # A shareable constant. + # + # source://prism//lib/prism/translation/ripper.rb#2862 + def visit_shareable_constant_node(node); end + + # class << self; end + # ^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2868 + def visit_singleton_class_node(node); end + + # __ENCODING__ + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2878 + def visit_source_encoding_node(node); end + + # __FILE__ + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2885 + def visit_source_file_node(node); end + + # __LINE__ + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2892 + def visit_source_line_node(node); end + + # foo(*bar) + # ^^^^ + # + # def foo((bar, *baz)); end + # ^^^^ + # + # def foo(*); bar(*); end + # ^ + # + # source://prism//lib/prism/translation/ripper.rb#2905 + def visit_splat_node(node); end + + # A list of statements. + # + # source://prism//lib/prism/translation/ripper.rb#2910 + def visit_statements_node(node); end + + # "foo" + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2927 + def visit_string_node(node); end + + # super(foo) + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3059 + def visit_super_node(node); end + + # :foo + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3080 + def visit_symbol_node(node); end + + # true + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3104 + def visit_true_node(node); end + + # undef foo + # ^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#301 - def visit_parentheses_node(node); end + # source://prism//lib/prism/translation/ripper.rb#3111 + def visit_undef_node(node); end - # Visit a ProgramNode node. + # unless foo; bar end + # ^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#327 - def visit_program_node(node); end - - # Visit a RangeNode node. + # bar unless foo + # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#334 - def visit_range_node(node); end + # source://prism//lib/prism/translation/ripper.rb#3123 + def visit_unless_node(node); end - # Visit a RationalNode node. + # until foo; bar end + # ^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#347 - def visit_rational_node(node); end - - # Visit a RequiredParameterNode. + # bar until foo + # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#212 - def visit_required_parameter_node(node); end + # source://prism//lib/prism/translation/ripper.rb#3151 + def visit_until_node(node); end - # Visit a RescueNode node. + # case foo; when bar; end + # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#322 - def visit_rescue_node(node); end + # source://prism//lib/prism/translation/ripper.rb#3175 + def visit_when_node(node); end - # Visit a StatementsNode node. + # while foo; bar end + # ^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#386 - def visit_statements_node(node); end - - # Visit a StringNode node. + # bar while foo + # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#352 - def visit_string_node(node); end + # source://prism//lib/prism/translation/ripper.rb#3196 + def visit_while_node(node); end - # Visit a SymbolNode node. + # `foo` + # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#376 - def visit_symbol_node(node); end + # source://prism//lib/prism/translation/ripper.rb#3220 + def visit_x_string_node(node); end - # Visit a TrueNode. + # yield + # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#274 - def visit_true_node(node); end - - # Visit an XStringNode node. + # yield 1 + # ^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#359 - def visit_x_string_node(node); end + # source://prism//lib/prism/translation/ripper.rb#3243 + def visit_yield_node(node); end private - # source://prism//lib/prism/translation/ripper.rb#680 - def _dispatch0; end + # :stopdoc: + # + # source://prism//lib/prism/translation/ripper.rb#3383 + def _dispatch_0; end - # source://prism//lib/prism/translation/ripper.rb#681 - def _dispatch1(_); end + # source://prism//lib/prism/translation/ripper.rb#3384 + def _dispatch_1(_); end - # source://prism//lib/prism/translation/ripper.rb#682 - def _dispatch2(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3385 + def _dispatch_2(_, _); end - # source://prism//lib/prism/translation/ripper.rb#683 - def _dispatch3(_, _, _); end + # source://prism//lib/prism/translation/ripper.rb#3386 + def _dispatch_3(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#684 - def _dispatch4(_, _, _, _); end + # source://prism//lib/prism/translation/ripper.rb#3387 + def _dispatch_4(_, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#685 - def _dispatch5(_, _, _, _, _); end + # source://prism//lib/prism/translation/ripper.rb#3388 + def _dispatch_5(_, _, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#686 - def _dispatch7(_, _, _, _, _, _, _); end + # source://prism//lib/prism/translation/ripper.rb#3389 + def _dispatch_7(_, _, _, _, _, _, _); end # This method is responsible for updating lineno and column information # to reflect the current node. @@ -27708,1396 +32000,1624 @@ 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#663 + # source://prism//lib/prism/translation/ripper.rb#3373 def bounds(location); end - # If we need to do something unusual, we can directly update the line number - # and column to reflect the current node. + # Returns true if the given node is a command node. + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/ripper.rb#1163 + def command?(node); end + + # This method is called when the parser found syntax error. # - # source://prism//lib/prism/translation/ripper.rb#670 - def bounds_values(lineno, column); end + # source://prism//lib/prism/translation/ripper.rb#3411 + def compile_error(msg); end - # For CRuby et al, "no block" in an on_block_var is false + # This method is provided by the Ripper C extension. It is called when a + # string needs to be dedented because of a tilde heredoc. It is expected + # that it will modify the string in place and return the number of bytes + # that were removed. # - # source://prism//lib/prism/translation/ripper.rb#646 - def no_block_value; end + # source://prism//lib/prism/translation/ripper.rb#3426 + def dedent_string(string, width); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_BEGIN(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_CHAR(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_END(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on___end__(_); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_alias(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_alias_error(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_aref(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_aref_field(_, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_arg_ambiguous(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_arg_paren(_); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_args_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_args_add_block(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_args_add_star(_, _); end - # source://prism//lib/prism/translation/ripper.rb#680 + # source://prism//lib/prism/translation/ripper.rb#3383 def on_args_forward; end - # source://prism//lib/prism/translation/ripper.rb#680 + # source://prism//lib/prism/translation/ripper.rb#3383 def on_args_new; end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_array(_); end - # source://prism//lib/prism/translation/ripper.rb#684 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_aryptn(_, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_assign(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_assign_error(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_assoc_new(_, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_assoc_splat(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_assoclist_from_args(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_backref(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_backtick(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_bare_assoc_hash(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_begin(_); end - # source://prism//lib/prism/translation/ripper.rb#683 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_binary(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_block_var(_, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_blockarg(_); end - # source://prism//lib/prism/translation/ripper.rb#684 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_bodystmt(_, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_brace_block(_, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_break(_); end - # source://prism//lib/prism/translation/ripper.rb#683 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_call(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_case(_, _); end - # source://prism//lib/prism/translation/ripper.rb#683 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_class(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_class_name_error(_, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_comma(_); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_command(_, _); end - # source://prism//lib/prism/translation/ripper.rb#684 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_command_call(_, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_comment(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_const(_); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_const_path_field(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_const_path_ref(_, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_const_ref(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_cvar(_); end - # source://prism//lib/prism/translation/ripper.rb#683 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_def(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_defined(_); end - # source://prism//lib/prism/translation/ripper.rb#685 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_defs(_, _, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_do_block(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_dot2(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_dot3(_, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_dyna_symbol(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_else(_); end - # source://prism//lib/prism/translation/ripper.rb#683 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_elsif(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_embdoc(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_embdoc_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_embdoc_end(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_embexpr_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_embexpr_end(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_embvar(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_ensure(_); end - # source://prism//lib/prism/translation/ripper.rb#680 + # source://prism//lib/prism/translation/ripper.rb#3383 def on_excessed_comma; end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_fcall(_); end - # source://prism//lib/prism/translation/ripper.rb#683 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_field(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_float(_); end - # source://prism//lib/prism/translation/ripper.rb#684 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_fndptn(_, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#683 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_for(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_gvar(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_hash(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_heredoc_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_heredoc_dedent(_, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_heredoc_end(_); end - # source://prism//lib/prism/translation/ripper.rb#683 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_hshptn(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_ident(_); end - # source://prism//lib/prism/translation/ripper.rb#683 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_if(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_if_mod(_, _); end - # source://prism//lib/prism/translation/ripper.rb#683 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_ifop(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_ignored_nl(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_ignored_sp(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_imaginary(_); end - # source://prism//lib/prism/translation/ripper.rb#683 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_in(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_int(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_ivar(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_kw(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_kwrest_param(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_label(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_label_end(_); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_lambda(_, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_lbrace(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_lbracket(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_lparen(_); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_magic_comment(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_massign(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_method_add_arg(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_method_add_block(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_mlhs_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_mlhs_add_post(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_mlhs_add_star(_, _); end - # source://prism//lib/prism/translation/ripper.rb#680 + # source://prism//lib/prism/translation/ripper.rb#3383 def on_mlhs_new; end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_mlhs_paren(_); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_module(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_mrhs_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_mrhs_add_star(_, _); end - # source://prism//lib/prism/translation/ripper.rb#680 + # source://prism//lib/prism/translation/ripper.rb#3383 def on_mrhs_new; end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_mrhs_new_from_args(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_next(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_nl(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_nokw_param(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_op(_); end - # source://prism//lib/prism/translation/ripper.rb#683 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_opassign(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_operator_ambiguous(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_param_error(_, _); end - # source://prism//lib/prism/translation/ripper.rb#686 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_params(_, _, _, _, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_paren(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_parse_error(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_period(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_program(_); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_qsymbols_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_qsymbols_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#680 + # source://prism//lib/prism/translation/ripper.rb#3383 def on_qsymbols_new; end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_qwords_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_qwords_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#680 + # source://prism//lib/prism/translation/ripper.rb#3383 def on_qwords_new; end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_rational(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_rbrace(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_rbracket(_); end - # source://prism//lib/prism/translation/ripper.rb#680 + # source://prism//lib/prism/translation/ripper.rb#3383 def on_redo; end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_regexp_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_regexp_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_regexp_end(_); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_regexp_literal(_, _); end - # source://prism//lib/prism/translation/ripper.rb#680 + # source://prism//lib/prism/translation/ripper.rb#3383 def on_regexp_new; end - # source://prism//lib/prism/translation/ripper.rb#684 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_rescue(_, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_rescue_mod(_, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_rest_param(_); end - # source://prism//lib/prism/translation/ripper.rb#680 + # source://prism//lib/prism/translation/ripper.rb#3383 def on_retry; end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_return(_); end - # source://prism//lib/prism/translation/ripper.rb#680 + # source://prism//lib/prism/translation/ripper.rb#3383 def on_return0; end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_rparen(_); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_sclass(_, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_semicolon(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_sp(_); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_stmts_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#680 + # source://prism//lib/prism/translation/ripper.rb#3383 def on_stmts_new; end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_string_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_string_concat(_, _); end - # source://prism//lib/prism/translation/ripper.rb#680 + # source://prism//lib/prism/translation/ripper.rb#3383 def on_string_content; end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_string_dvar(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_string_embexpr(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_string_literal(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_super(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_symbeg(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_symbol(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_symbol_literal(_); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_symbols_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_symbols_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#680 + # source://prism//lib/prism/translation/ripper.rb#3383 def on_symbols_new; end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_tlambda(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_tlambeg(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_top_const_field(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_top_const_ref(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_tstring_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_tstring_content(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_tstring_end(_); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_unary(_, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_undef(_); end - # source://prism//lib/prism/translation/ripper.rb#683 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_unless(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_unless_mod(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_until(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_until_mod(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_var_alias(_, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_var_field(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_var_ref(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_vcall(_); end - # source://prism//lib/prism/translation/ripper.rb#680 + # source://prism//lib/prism/translation/ripper.rb#3383 def on_void_stmt; end - # source://prism//lib/prism/translation/ripper.rb#683 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_when(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_while(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_while_mod(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_word_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#680 + # source://prism//lib/prism/translation/ripper.rb#3383 def on_word_new; end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_words_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_words_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#680 + # source://prism//lib/prism/translation/ripper.rb#3383 def on_words_new; end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_words_sep(_); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_xstring_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_xstring_literal(_); end - # source://prism//lib/prism/translation/ripper.rb#680 + # source://prism//lib/prism/translation/ripper.rb#3383 def on_xstring_new; end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_yield(_); end - # source://prism//lib/prism/translation/ripper.rb#680 + # source://prism//lib/prism/translation/ripper.rb#3383 def on_yield0; end - # source://prism//lib/prism/translation/ripper.rb#680 + # source://prism//lib/prism/translation/ripper.rb#3383 def on_zsuper; end # Lazily initialize the parse result. # - # source://prism//lib/prism/translation/ripper.rb#676 + # source://prism//lib/prism/translation/ripper.rb#3269 def result; end - # In Prism this is a CallNode with :[]= as the operator. - # In Ripper it's an :aref_field. + # Returns true if there is a comma between the two locations. + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/ripper.rb#3278 + def trailing_comma?(left, right); end + + # Visit one side of an alias global variable node. # - # source://prism//lib/prism/translation/ripper.rb#521 - def visit_aref_field_node(node); end + # source://prism//lib/prism/translation/ripper.rb#570 + def visit_alias_global_variable_node_value(node); end - # In Prism this is a CallNode with :[] as the operator. - # In Ripper it's an :aref. + # Visit a list of elements, like the elements of an array or arguments. # - # source://prism//lib/prism/translation/ripper.rb#513 - def visit_aref_node(node); end + # source://prism//lib/prism/translation/ripper.rb#756 + def visit_arguments(elements); end - # Visit an operation-and-assign node, such as +=. + # Visit the clauses of a begin node to form an on_bodystmt call. # - # source://prism//lib/prism/translation/ripper.rb#501 - def visit_binary_op_assign(node, operator: T.unsafe(nil)); end + # source://prism//lib/prism/translation/ripper.rb#840 + def visit_begin_node_clauses(location, node, allow_newline); end - # Visit a binary operator node like an AndNode or OrNode + # Visit the body of a structure that can have either a set of statements + # or statements wrapped in rescue/else/ensure. # - # source://prism//lib/prism/translation/ripper.rb#652 - def visit_binary_operator(node); end + # source://prism//lib/prism/translation/ripper.rb#875 + def visit_body_node(location, node, allow_newline = T.unsafe(nil)); end - # Visit a list of elements, like the elements of an array or arguments. + # Visit the arguments and block of a call node and return the arguments + # and block as they should be used. + # + # source://prism//lib/prism/translation/ripper.rb#1136 + def visit_call_node_arguments(arguments_node, block_node, trailing_comma); end + + # Visit a constant path that is part of a write node. + # + # source://prism//lib/prism/translation/ripper.rb#1489 + def visit_constant_path_write_node_target(node); end + + # Visit a destructured positional parameter node. # - # source://prism//lib/prism/translation/ripper.rb#474 - def visit_elements(elements); end + # source://prism//lib/prism/translation/ripper.rb#2607 + def visit_destructured_parameter_node(node); end - # Visit an InterpolatedStringNode or an InterpolatedSymbolNode node. + # Visit a string that is expressed using a <<~ heredoc. # - # source://prism//lib/prism/translation/ripper.rb#482 - def visit_enumerated_node(node); end + # source://prism//lib/prism/translation/ripper.rb#2978 + def visit_heredoc_node(parts, base); end - # Generate Ripper events for a CallNode with no opening_loc + # Ripper gives back the escaped string content but strips out the common + # leading whitespace. Prism gives back the unescaped string content and + # a location for the escaped string content. Unfortunately these don't + # work well together, so here we need to re-derive the common leading + # whitespace. # - # source://prism//lib/prism/translation/ripper.rb#410 - def visit_no_paren_call(node); end + # source://prism//lib/prism/translation/ripper.rb#2953 + def visit_heredoc_node_whitespace(parts); end + + # Visit a heredoc node that is representing a string. + # + # source://prism//lib/prism/translation/ripper.rb#3024 + def visit_heredoc_string_node(node); end + + # Visit a heredoc node that is representing an xstring. + # + # source://prism//lib/prism/translation/ripper.rb#3041 + def visit_heredoc_x_string_node(node); end + + # Visit the targets of a multi-target node. + # + # source://prism//lib/prism/translation/ripper.rb#2460 + def visit_multi_target_node_targets(lefts, rest, rights, skippable); end # Visit a node that represents a number. We need to explicitly handle the # unary - operator. # - # source://prism//lib/prism/translation/ripper.rb#611 - def visit_number(node); end + # source://prism//lib/prism/translation/ripper.rb#3317 + def visit_number_node(node); end - # Ripper has several methods of emitting a symbol literal. Inside an alias - # sometimes it suppresses the [:symbol] wrapper around ident. If the symbol - # is also the name of a keyword (e.g. :if) it will emit a :@kw wrapper, not - # an :@ident wrapper, with similar treatment for constants and operators. + # Visit a pattern within a pattern match. This is used to bypass the + # parenthesis node that can be used to wrap patterns. # - # source://prism//lib/prism/translation/ripper.rb#580 - def visit_symbol_literal_node(node, no_symbol_wrapper: T.unsafe(nil)); end + # source://prism//lib/prism/translation/ripper.rb#595 + def visit_pattern_node(node); end - # For most Rubies and JRuby after 9.4.6.0 this is a no-op. + # Visit the list of statements of a statements node. We support nil + # statements in the list. This would normally not be allowed by the + # structure of the prism parse tree, but we manually add them here so that + # we can mirror Ripper's void stmt. # - # source://prism//lib/prism/translation/ripper.rb#634 - def visit_unary_operator(value); end + # source://prism//lib/prism/translation/ripper.rb#2919 + def visit_statements_node_body(body); end - class << self - # This is a convenience method that runs the SexpBuilderPP subclass parser. - # - # source://prism//lib/prism/translation/ripper.rb#403 - def sexp(source); end + # Visit an individual part of a string-like node. + # + # source://prism//lib/prism/translation/ripper.rb#2211 + def visit_string_content(part); end - # This is a convenience method that runs the SexpBuilder subclass parser. - # - # source://prism//lib/prism/translation/ripper.rb#398 - def sexp_raw(source); end - end + # Visit the string content of a particular node. This method is used to + # split into the various token types. + # + # source://prism//lib/prism/translation/ripper.rb#3290 + def visit_token(token, allow_keywords = T.unsafe(nil)); end + + # Dispatch a words_sep event that contains the space between the elements + # of list literals. + # + # source://prism//lib/prism/translation/ripper.rb#745 + def visit_words_sep(opening_loc, previous, current); end + + # Visit a node that represents a write value. This is used to handle the + # special case of an implicit array that is generated without brackets. + # + # source://prism//lib/prism/translation/ripper.rb#3335 + 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 + 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 + 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 + def warning(fmt, *args); end + + class << self + # Tokenizes the Ruby program and returns an array of an array, + # which is formatted like + # [[lineno, column], type, token, state]. + # The +filename+ argument is mostly ignored. + # By default, this method does not handle syntax errors in +src+, + # use the +raise_errors+ keyword to raise a SyntaxError for an error in +src+. + # + # require 'ripper' + # require 'pp' + # + # pp Ripper.lex("def m(a) nil end") + # #=> [[[1, 0], :on_kw, "def", FNAME ], + # [[1, 3], :on_sp, " ", FNAME ], + # [[1, 4], :on_ident, "m", ENDFN ], + # [[1, 5], :on_lparen, "(", BEG|LABEL], + # [[1, 6], :on_ident, "a", ARG ], + # [[1, 7], :on_rparen, ")", ENDFN ], + # [[1, 8], :on_sp, " ", BEG ], + # [[1, 9], :on_kw, "nil", END ], + # [[1, 12], :on_sp, " ", END ], + # [[1, 13], :on_kw, "end", END ]] + # + # source://prism//lib/prism/translation/ripper.rb#72 + def lex(src, filename = T.unsafe(nil), lineno = T.unsafe(nil), raise_errors: T.unsafe(nil)); end + + # Parses the given Ruby program read from +src+. + # +src+ must be a String or an IO or a object with a #gets method. + # + # source://prism//lib/prism/translation/ripper.rb#46 + def parse(src, filename = T.unsafe(nil), lineno = T.unsafe(nil)); end + + # Parses +src+ and create S-exp tree. + # Returns more readable tree rather than Ripper.sexp_raw. + # This method is mainly for developer use. + # The +filename+ argument is mostly ignored. + # By default, this method does not handle syntax errors in +src+, + # returning +nil+ in such cases. Use the +raise_errors+ keyword + # to raise a SyntaxError for an error in +src+. + # + # require "ripper" + # require "pp" + # + # pp Ripper.sexp("def m(a) nil end") + # #=> [:program, + # [[:def, + # [:@ident, "m", [1, 4]], + # [:paren, [:params, [[:@ident, "a", [1, 6]]], nil, nil, nil, nil, nil, nil]], + # [:bodystmt, [[:var_ref, [:@kw, "nil", [1, 9]]]], nil, nil, nil]]]] + # + # source://prism//lib/prism/translation/ripper.rb#381 + def sexp(src, filename = T.unsafe(nil), lineno = T.unsafe(nil), raise_errors: T.unsafe(nil)); end + + # Parses +src+ and create S-exp tree. + # This method is mainly for developer use. + # The +filename+ argument is mostly ignored. + # By default, this method does not handle syntax errors in +src+, + # returning +nil+ in such cases. Use the +raise_errors+ keyword + # to raise a SyntaxError for an error in +src+. + # + # require 'ripper' + # require 'pp' + # + # pp Ripper.sexp_raw("def m(a) nil end") + # #=> [:program, + # [:stmts_add, + # [:stmts_new], + # [:def, + # [:@ident, "m", [1, 4]], + # [:paren, [:params, [[:@ident, "a", [1, 6]]], nil, nil, nil]], + # [:bodystmt, + # [:stmts_add, [:stmts_new], [:var_ref, [:@kw, "nil", [1, 9]]]], + # nil, + # nil, + # nil]]]] + # + # source://prism//lib/prism/translation/ripper.rb#416 + def sexp_raw(src, filename = T.unsafe(nil), lineno = T.unsafe(nil), raise_errors: T.unsafe(nil)); end + end + + Result = type_member end -# In an alias statement Ripper will emit @kw instead of @ident if the object -# being aliased is a Ruby keyword. For instance, in the line "alias :foo :if", -# the :if is treated as a lexer keyword. So we need to know what symbols are -# also keywords. +# A list of all of the Ruby binary operators. +# +# source://prism//lib/prism/translation/ripper.rb#337 +Prism::Translation::Ripper::BINARY_OPERATORS = T.let(T.unsafe(nil), Array) + +# This array contains name of all ripper events. +# +# source://prism//lib/prism/translation/ripper.rb#289 +Prism::Translation::Ripper::EVENTS = T.let(T.unsafe(nil), Array) + +# A list of all of the Ruby keywords. +# +# source://prism//lib/prism/translation/ripper.rb#292 +Prism::Translation::Ripper::KEYWORDS = T.let(T.unsafe(nil), Array) + +# This array contains name of parser events. # -# source://prism//lib/prism/translation/ripper.rb#532 -Prism::Translation::Ripper::RUBY_KEYWORDS = T.let(T.unsafe(nil), Array) +# source://prism//lib/prism/translation/ripper.rb#283 +Prism::Translation::Ripper::PARSER_EVENTS = T.let(T.unsafe(nil), Array) + +# This contains a table of all of the parser events and their +# corresponding arity. +# +# source://prism//lib/prism/translation/ripper.rb#84 +Prism::Translation::Ripper::PARSER_EVENT_TABLE = T.let(T.unsafe(nil), Hash) + +# This array contains name of scanner events. +# +# source://prism//lib/prism/translation/ripper.rb#286 +Prism::Translation::Ripper::SCANNER_EVENTS = T.let(T.unsafe(nil), Array) + +# This contains a table of all of the scanner events and their +# corresponding arity. +# +# source://prism//lib/prism/translation/ripper.rb#227 +Prism::Translation::Ripper::SCANNER_EVENT_TABLE = T.let(T.unsafe(nil), Hash) # This class mirrors the ::Ripper::SexpBuilder subclass of ::Ripper that # returns the arrays of [type, *children]. # -# source://prism//lib/prism/translation/ripper.rb#24 +# source://prism//lib/prism/translation/ripper/sexp.rb#10 class Prism::Translation::Ripper::SexpBuilder < ::Prism::Translation::Ripper - private + Result = type_member { { fixed: T::Array[T.untyped] } } + + # :stopdoc: + # + # source://prism//lib/prism/translation/ripper/sexp.rb#13 + def error; end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_BEGIN(*args); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_CHAR(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_CHAR(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_END(*args); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on___end__(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on___end__(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_alias(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_alias_error(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_aref(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_aref_field(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_arg_ambiguous(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_arg_paren(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_args_add(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_args_add_block(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_args_add_star(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_args_forward(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_args_new(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_array(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_aryptn(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_assign(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_assign_error(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_assoc_new(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_assoc_splat(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_assoclist_from_args(*args); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_backref(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_backref(tok); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_backtick(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_backtick(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_bare_assoc_hash(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_begin(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_binary(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_block_var(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_blockarg(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_bodystmt(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_brace_block(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_break(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_call(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_case(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_class(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_class_name_error(*args); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_comma(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_comma(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_command(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_command_call(*args); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_comment(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_comment(tok); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_const(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_const(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_const_path_field(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_const_path_ref(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_const_ref(*args); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_cvar(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_cvar(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_def(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_defined(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_defs(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_do_block(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_dot2(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_dot3(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_dyna_symbol(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_else(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_elsif(*args); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_embdoc(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_embdoc(tok); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_embdoc_beg(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_embdoc_beg(tok); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_embdoc_end(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_embdoc_end(tok); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_embexpr_beg(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_embexpr_beg(tok); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_embexpr_end(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_embexpr_end(tok); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_embvar(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_embvar(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_ensure(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_excessed_comma(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_fcall(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_field(*args); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_float(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_float(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_fndptn(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_for(*args); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_gvar(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_gvar(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_hash(*args); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_heredoc_beg(value); end - - # source://prism//lib/prism/translation/ripper.rb#28 - def on_heredoc_dedent(*args); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_heredoc_beg(tok); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_heredoc_end(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_heredoc_end(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_hshptn(*args); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_ident(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_ident(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_if(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_if_mod(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_ifop(*args); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_ignored_nl(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_ignored_nl(tok); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_ignored_sp(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_ignored_sp(tok); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_imaginary(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_imaginary(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_in(*args); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_int(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_int(tok); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_ivar(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_ivar(tok); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_kw(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_kw(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_kwrest_param(*args); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_label(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_label(tok); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_label_end(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_label_end(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_lambda(*args); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_lbrace(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_lbrace(tok); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_lbracket(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_lbracket(tok); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_lparen(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_lparen(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_magic_comment(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_massign(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_method_add_arg(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_method_add_block(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_mlhs_add(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_mlhs_add_post(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_mlhs_add_star(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_mlhs_new(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_mlhs_paren(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_module(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_mrhs_add(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_mrhs_add_star(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_mrhs_new(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_mrhs_new_from_args(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_next(*args); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_nl(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_nl(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_nokw_param(*args); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_op(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_op(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_opassign(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_operator_ambiguous(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_param_error(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_params(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_paren(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 - def on_parse_error(*args); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_period(tok); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_period(value); end - - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_program(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_qsymbols_add(*args); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_qsymbols_beg(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_qsymbols_beg(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_qsymbols_new(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_qwords_add(*args); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_qwords_beg(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_qwords_beg(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_qwords_new(*args); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_rational(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_rational(tok); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_rbrace(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_rbrace(tok); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_rbracket(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_rbracket(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_redo(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_regexp_add(*args); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_regexp_beg(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_regexp_beg(tok); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_regexp_end(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_regexp_end(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_regexp_literal(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_regexp_new(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_rescue(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_rescue_mod(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_rest_param(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_retry(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_return(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_return0(*args); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_rparen(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_rparen(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_sclass(*args); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_semicolon(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_semicolon(tok); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_sp(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_sp(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_stmts_add(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_stmts_new(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_string_add(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_string_concat(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_string_content(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_string_dvar(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_string_embexpr(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_string_literal(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_super(*args); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_symbeg(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_symbeg(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_symbol(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_symbol_literal(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_symbols_add(*args); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_symbols_beg(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_symbols_beg(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_symbols_new(*args); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_tlambda(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_tlambda(tok); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_tlambeg(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_tlambeg(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_top_const_field(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_top_const_ref(*args); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_tstring_beg(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_tstring_beg(tok); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_tstring_content(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_tstring_content(tok); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_tstring_end(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_tstring_end(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_unary(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_undef(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_unless(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_unless_mod(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_until(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_until_mod(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_var_alias(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_var_field(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_var_ref(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_vcall(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_void_stmt(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_when(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_while(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_while_mod(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_word_add(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_word_new(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_words_add(*args); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_words_beg(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_words_beg(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_words_new(*args); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_words_sep(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_words_sep(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_xstring_add(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_xstring_literal(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_xstring_new(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_yield(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_yield0(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # 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.rb#43 +# 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] } } + private - # source://prism//lib/prism/translation/ripper.rb#46 + # source://prism//lib/prism/translation/ripper/sexp.rb#92 def _dispatch_event_new; end - # source://prism//lib/prism/translation/ripper.rb#50 + # source://prism//lib/prism/translation/ripper/sexp.rb#96 def _dispatch_event_push(list, item); end - # source://prism//lib/prism/translation/ripper.rb#50 + # source://prism//lib/prism/translation/ripper/sexp.rb#96 def on_args_add(list, item); end - # source://prism//lib/prism/translation/ripper.rb#46 + # source://prism//lib/prism/translation/ripper/sexp.rb#92 def on_args_new; end - # source://prism//lib/prism/translation/ripper.rb#50 + # 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.rb#46 + # 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.rb#50 + # 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.rb#46 + # source://prism//lib/prism/translation/ripper/sexp.rb#92 def on_mrhs_new; end - # source://prism//lib/prism/translation/ripper.rb#50 + # source://prism//lib/prism/translation/ripper/sexp.rb#96 def on_qsymbols_add(list, item); end - # source://prism//lib/prism/translation/ripper.rb#46 + # source://prism//lib/prism/translation/ripper/sexp.rb#92 def on_qsymbols_new; end - # source://prism//lib/prism/translation/ripper.rb#50 + # source://prism//lib/prism/translation/ripper/sexp.rb#96 def on_qwords_add(list, item); end - # source://prism//lib/prism/translation/ripper.rb#46 + # source://prism//lib/prism/translation/ripper/sexp.rb#92 def on_qwords_new; end - # source://prism//lib/prism/translation/ripper.rb#50 + # source://prism//lib/prism/translation/ripper/sexp.rb#96 def on_regexp_add(list, item); end - # source://prism//lib/prism/translation/ripper.rb#46 + # source://prism//lib/prism/translation/ripper/sexp.rb#92 def on_regexp_new; end - # source://prism//lib/prism/translation/ripper.rb#50 + # source://prism//lib/prism/translation/ripper/sexp.rb#96 def on_stmts_add(list, item); end - # source://prism//lib/prism/translation/ripper.rb#46 + # source://prism//lib/prism/translation/ripper/sexp.rb#92 def on_stmts_new; end - # source://prism//lib/prism/translation/ripper.rb#50 + # source://prism//lib/prism/translation/ripper/sexp.rb#96 def on_string_add(list, item); end - # source://prism//lib/prism/translation/ripper.rb#50 + # source://prism//lib/prism/translation/ripper/sexp.rb#96 def on_symbols_add(list, item); end - # source://prism//lib/prism/translation/ripper.rb#46 + # source://prism//lib/prism/translation/ripper/sexp.rb#92 def on_symbols_new; end - # source://prism//lib/prism/translation/ripper.rb#50 + # source://prism//lib/prism/translation/ripper/sexp.rb#96 def on_word_add(list, item); end - # source://prism//lib/prism/translation/ripper.rb#46 + # source://prism//lib/prism/translation/ripper/sexp.rb#92 def on_word_new; end - # source://prism//lib/prism/translation/ripper.rb#50 + # source://prism//lib/prism/translation/ripper/sexp.rb#96 def on_words_add(list, item); end - # source://prism//lib/prism/translation/ripper.rb#46 + # source://prism//lib/prism/translation/ripper/sexp.rb#92 def on_words_new; end - # source://prism//lib/prism/translation/ripper.rb#50 + # source://prism//lib/prism/translation/ripper/sexp.rb#96 def on_xstring_add(list, item); end - # source://prism//lib/prism/translation/ripper.rb#46 + # source://prism//lib/prism/translation/ripper/sexp.rb#92 def on_xstring_new; end end +class Prism::Translation::RipperCompiler < Prism::Compiler + Result = type_member +end + +class Prism::Translation::RubyParser::Compiler < Prism::Compiler + Result = type_member { { fixed: Sexp } } +end + # Represents the use of the literal `true` keyword. # # true # ^^^^ # -# source://prism//lib/prism/node.rb#18139 +# source://prism//lib/prism/node.rb#17747 class Prism::TrueNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [TrueNode] a new instance of TrueNode # - # source://prism//lib/prism/node.rb#18141 + # source://prism//lib/prism/node.rb#17749 + sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18148 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#17756 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18153 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#17761 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18163 + # source://prism//lib/prism/node.rb#17771 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18158 + # source://prism//lib/prism/node.rb#17766 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> TrueNode + # def copy: (?location: Location) -> TrueNode # - # source://prism//lib/prism/node.rb#18168 - sig { params(params: T.untyped).returns(Prism::TrueNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#17776 + 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#18153 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#17761 + 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#18179 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#17784 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#18185 + # source://prism//lib/prism/node.rb#17790 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of @@ -29115,7 +33635,8 @@ class Prism::TrueNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#18204 + # source://prism//lib/prism/node.rb#17809 + sig { override.returns(Symbol) } def type; end class << self @@ -29126,7 +33647,7 @@ class Prism::TrueNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#18214 + # source://prism//lib/prism/node.rb#17819 def type; end end end @@ -29136,81 +33657,97 @@ end # undef :foo, :bar, :baz # ^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#18223 +# source://prism//lib/prism/node.rb#17828 class Prism::UndefNode < ::Prism::Node - # def initialize: (Array[Node] names, Location keyword_loc, Location location) -> void + # 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#18225 + # source://prism//lib/prism/node.rb#17830 + sig do + params( + source: Prism::Source, + names: T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)], + keyword_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, names, keyword_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18234 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#17839 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18239 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#17844 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18249 + # source://prism//lib/prism/node.rb#17854 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18244 + # source://prism//lib/prism/node.rb#17849 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> UndefNode + # def copy: (?names: Array[SymbolNode | InterpolatedSymbolNode], ?keyword_loc: Location, ?location: Location) -> UndefNode # - # source://prism//lib/prism/node.rb#18254 - sig { params(params: T.untyped).returns(Prism::UndefNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#17859 + sig do + params( + names: T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)], + keyword_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::UndefNode) + end + def copy(names: T.unsafe(nil), keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18239 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#17844 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { names: Array[Node], keyword_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { names: Array[SymbolNode | InterpolatedSymbolNode], keyword_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#18267 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#17867 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#18287 + # source://prism//lib/prism/node.rb#17888 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#18282 + # source://prism//lib/prism/node.rb#17883 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#18275 + # source://prism//lib/prism/node.rb#17875 sig { returns(Prism::Location) } def keyword_loc; end - # attr_reader names: Array[Node] + # attr_reader names: Array[SymbolNode | InterpolatedSymbolNode] # - # source://prism//lib/prism/node.rb#18272 - sig { returns(T::Array[Prism::Node]) } + # source://prism//lib/prism/node.rb#17872 + sig { returns(T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)]) } def names; end # Sometimes you want to check an instance of a node against a list of @@ -29228,7 +33765,8 @@ class Prism::UndefNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#18308 + # source://prism//lib/prism/node.rb#17909 + sig { override.returns(Symbol) } def type; end class << self @@ -29239,7 +33777,7 @@ class Prism::UndefNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#18318 + # source://prism//lib/prism/node.rb#17919 def type; end end end @@ -29252,119 +33790,143 @@ end # unless foo then bar end # ^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#18330 +# source://prism//lib/prism/node.rb#17931 class Prism::UnlessNode < ::Prism::Node - # def initialize: (Location keyword_loc, Node predicate, Location? then_keyword_loc, StatementsNode? statements, ElseNode? consequent, Location? end_keyword_loc, Location location) -> void + # 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#18332 + # source://prism//lib/prism/node.rb#17933 + sig do + params( + source: Prism::Source, + keyword_loc: Prism::Location, + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + consequent: T.nilable(Prism::ElseNode), + end_keyword_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end def initialize(source, keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18345 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#17946 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18354 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#17955 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18368 + # source://prism//lib/prism/node.rb#17969 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18359 + # source://prism//lib/prism/node.rb#17960 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader consequent: ElseNode? # - # source://prism//lib/prism/node.rb#18419 + # source://prism//lib/prism/node.rb#18013 sig { returns(T.nilable(Prism::ElseNode)) } def consequent; end - # def copy: (**params) -> UnlessNode + # 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#18373 - sig { params(params: T.untyped).returns(Prism::UnlessNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#17974 + sig do + params( + keyword_loc: Prism::Location, + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + consequent: T.nilable(Prism::ElseNode), + end_keyword_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::UnlessNode) + end + def copy(keyword_loc: T.unsafe(nil), predicate: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18354 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#17955 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, predicate: Node, then_keyword_loc: Location?, statements: StatementsNode?, consequent: ElseNode?, end_keyword_loc: Location?, location: Location } + # 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#18390 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#17982 + 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#18445 + # source://prism//lib/prism/node.rb#18040 sig { returns(T.nilable(String)) } def end_keyword; end # attr_reader end_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#18422 + # source://prism//lib/prism/node.rb#18016 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 # - # source://prism//lib/prism/node.rb#18450 + # source://prism//lib/prism/node.rb#18045 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#18435 + # source://prism//lib/prism/node.rb#18030 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#18395 + # source://prism//lib/prism/node.rb#17987 sig { returns(Prism::Location) } def keyword_loc; end - # attr_reader predicate: Node + # attr_reader predicate: Prism::node # - # source://prism//lib/prism/node.rb#18401 + # source://prism//lib/prism/node.rb#17994 sig { returns(Prism::Node) } def predicate; end - # source://prism//lib/prism/node.rb#18349 + # source://prism//lib/prism/node.rb#17950 def set_newline_flag(newline_marked); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#18416 + # source://prism//lib/prism/node.rb#18010 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # def then_keyword: () -> String? # - # source://prism//lib/prism/node.rb#18440 + # source://prism//lib/prism/node.rb#18035 sig { returns(T.nilable(String)) } def then_keyword; end # attr_reader then_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#18404 + # source://prism//lib/prism/node.rb#17997 sig { returns(T.nilable(Prism::Location)) } def then_keyword_loc; end @@ -29383,7 +33945,8 @@ class Prism::UnlessNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#18486 + # source://prism//lib/prism/node.rb#18081 + sig { override.returns(Symbol) } def type; end class << self @@ -29394,7 +33957,7 @@ class Prism::UnlessNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#18496 + # source://prism//lib/prism/node.rb#18091 def type; end end end @@ -29407,109 +33970,131 @@ end # until foo do bar end # ^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#18508 +# source://prism//lib/prism/node.rb#18103 class Prism::UntilNode < ::Prism::Node - # def initialize: (Integer flags, Location keyword_loc, Location? closing_loc, Node predicate, StatementsNode? statements, Location location) -> void + # 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#18510 + # source://prism//lib/prism/node.rb#18105 + sig do + params( + source: Prism::Source, + flags: Integer, + keyword_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + location: Prism::Location + ).void + end def initialize(source, flags, keyword_loc, closing_loc, predicate, statements, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18522 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#18117 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def begin_modifier?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#18599 + # source://prism//lib/prism/node.rb#18188 sig { returns(T::Boolean) } def begin_modifier?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18531 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#18126 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#18609 + # source://prism//lib/prism/node.rb#18198 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#18580 + # source://prism//lib/prism/node.rb#18168 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18544 + # source://prism//lib/prism/node.rb#18139 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18536 + # source://prism//lib/prism/node.rb#18131 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> UntilNode + # def copy: (?flags: Integer, ?keyword_loc: Location, ?closing_loc: Location?, ?predicate: Prism::node, ?statements: StatementsNode?, ?location: Location) -> UntilNode # - # source://prism//lib/prism/node.rb#18549 - sig { params(params: T.untyped).returns(Prism::UntilNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#18144 + sig do + params( + flags: Integer, + keyword_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + location: Prism::Location + ).returns(Prism::UntilNode) + end + def copy(flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), predicate: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18531 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#18126 + 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: Node, statements: StatementsNode?, location: Location } + # 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#18565 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#18152 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#18614 + # source://prism//lib/prism/node.rb#18203 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#18604 + # source://prism//lib/prism/node.rb#18193 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#18574 + # source://prism//lib/prism/node.rb#18161 sig { returns(Prism::Location) } def keyword_loc; end - # attr_reader predicate: Node + # attr_reader predicate: Prism::node # - # source://prism//lib/prism/node.rb#18592 + # source://prism//lib/prism/node.rb#18181 sig { returns(Prism::Node) } def predicate; end - # source://prism//lib/prism/node.rb#18526 + # source://prism//lib/prism/node.rb#18121 def set_newline_flag(newline_marked); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#18595 + # source://prism//lib/prism/node.rb#18184 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -29528,14 +34113,15 @@ class Prism::UntilNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#18645 + # source://prism//lib/prism/node.rb#18234 + sig { override.returns(Symbol) } def type; end private # private attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#18570 + # source://prism//lib/prism/node.rb#18157 sig { returns(Integer) } def flags; end @@ -29547,7 +34133,7 @@ class Prism::UntilNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#18655 + # source://prism//lib/prism/node.rb#18244 def type; end end end @@ -29574,893 +34160,905 @@ Prism::VERSION = T.let(T.unsafe(nil), String) # end # end # -# source://prism//lib/prism/visitor.rb#50 +# source://prism//lib/prism/visitor.rb#54 class Prism::Visitor < ::Prism::BasicVisitor # Visit a AliasGlobalVariableNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::AliasGlobalVariableNode).void } def visit_alias_global_variable_node(node); end # Visit a AliasMethodNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::AliasMethodNode).void } def visit_alias_method_node(node); end # Visit a AlternationPatternNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::AlternationPatternNode).void } def visit_alternation_pattern_node(node); end # Visit a AndNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::AndNode).void } def visit_and_node(node); end # Visit a ArgumentsNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::ArgumentsNode).void } def visit_arguments_node(node); end # Visit a ArrayNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::ArrayNode).void } def visit_array_node(node); end # Visit a ArrayPatternNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::ArrayPatternNode).void } def visit_array_pattern_node(node); end # Visit a AssocNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::AssocNode).void } def visit_assoc_node(node); end # Visit a AssocSplatNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::AssocSplatNode).void } def visit_assoc_splat_node(node); end # Visit a BackReferenceReadNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::BackReferenceReadNode).void } def visit_back_reference_read_node(node); end # Visit a BeginNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::BeginNode).void } def visit_begin_node(node); end # Visit a BlockArgumentNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::BlockArgumentNode).void } def visit_block_argument_node(node); end # Visit a BlockLocalVariableNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::BlockLocalVariableNode).void } def visit_block_local_variable_node(node); end # Visit a BlockNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::BlockNode).void } def visit_block_node(node); end # Visit a BlockParameterNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::BlockParameterNode).void } def visit_block_parameter_node(node); end # Visit a BlockParametersNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::BlockParametersNode).void } def visit_block_parameters_node(node); end # Visit a BreakNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::BreakNode).void } def visit_break_node(node); end # Visit a CallAndWriteNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::CallAndWriteNode).void } def visit_call_and_write_node(node); end # Visit a CallNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::CallNode).void } def visit_call_node(node); end # Visit a CallOperatorWriteNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::CallOperatorWriteNode).void } def visit_call_operator_write_node(node); end # Visit a CallOrWriteNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::CallOrWriteNode).void } def visit_call_or_write_node(node); end # Visit a CallTargetNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::CallTargetNode).void } def visit_call_target_node(node); end # Visit a CapturePatternNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::CapturePatternNode).void } def visit_capture_pattern_node(node); end # Visit a CaseMatchNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::CaseMatchNode).void } def visit_case_match_node(node); end # Visit a CaseNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::CaseNode).void } def visit_case_node(node); end # Visit a ClassNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::ClassNode).void } def visit_class_node(node); end # Visit a ClassVariableAndWriteNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::ClassVariableAndWriteNode).void } def visit_class_variable_and_write_node(node); end # Visit a ClassVariableOperatorWriteNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::ClassVariableOperatorWriteNode).void } def visit_class_variable_operator_write_node(node); end # Visit a ClassVariableOrWriteNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::ClassVariableOrWriteNode).void } def visit_class_variable_or_write_node(node); end # Visit a ClassVariableReadNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::ClassVariableReadNode).void } def visit_class_variable_read_node(node); end # Visit a ClassVariableTargetNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::ClassVariableTargetNode).void } def visit_class_variable_target_node(node); end # Visit a ClassVariableWriteNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::ClassVariableWriteNode).void } def visit_class_variable_write_node(node); end # Visit a ConstantAndWriteNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::ConstantAndWriteNode).void } def visit_constant_and_write_node(node); end # Visit a ConstantOperatorWriteNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::ConstantOperatorWriteNode).void } def visit_constant_operator_write_node(node); end # Visit a ConstantOrWriteNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::ConstantOrWriteNode).void } def visit_constant_or_write_node(node); end # Visit a ConstantPathAndWriteNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::ConstantPathAndWriteNode).void } def visit_constant_path_and_write_node(node); end # Visit a ConstantPathNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::ConstantPathNode).void } def visit_constant_path_node(node); end # Visit a ConstantPathOperatorWriteNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::ConstantPathOperatorWriteNode).void } def visit_constant_path_operator_write_node(node); end # Visit a ConstantPathOrWriteNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::ConstantPathOrWriteNode).void } def visit_constant_path_or_write_node(node); end # Visit a ConstantPathTargetNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::ConstantPathTargetNode).void } def visit_constant_path_target_node(node); end # Visit a ConstantPathWriteNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::ConstantPathWriteNode).void } def visit_constant_path_write_node(node); end # Visit a ConstantReadNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::ConstantReadNode).void } def visit_constant_read_node(node); end # Visit a ConstantTargetNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::ConstantTargetNode).void } def visit_constant_target_node(node); end # Visit a ConstantWriteNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::ConstantWriteNode).void } def visit_constant_write_node(node); end # Visit a DefNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::DefNode).void } def visit_def_node(node); end # Visit a DefinedNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::DefinedNode).void } def visit_defined_node(node); end # Visit a ElseNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::ElseNode).void } def visit_else_node(node); end # Visit a EmbeddedStatementsNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::EmbeddedStatementsNode).void } def visit_embedded_statements_node(node); end # Visit a EmbeddedVariableNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::EmbeddedVariableNode).void } def visit_embedded_variable_node(node); end # Visit a EnsureNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::EnsureNode).void } def visit_ensure_node(node); end # Visit a FalseNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::FalseNode).void } def visit_false_node(node); end # Visit a FindPatternNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::FindPatternNode).void } def visit_find_pattern_node(node); end # Visit a FlipFlopNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::FlipFlopNode).void } def visit_flip_flop_node(node); end # Visit a FloatNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::FloatNode).void } def visit_float_node(node); end # Visit a ForNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::ForNode).void } def visit_for_node(node); end # Visit a ForwardingArgumentsNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::ForwardingArgumentsNode).void } def visit_forwarding_arguments_node(node); end # Visit a ForwardingParameterNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::ForwardingParameterNode).void } def visit_forwarding_parameter_node(node); end # Visit a ForwardingSuperNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::ForwardingSuperNode).void } def visit_forwarding_super_node(node); end # Visit a GlobalVariableAndWriteNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::GlobalVariableAndWriteNode).void } def visit_global_variable_and_write_node(node); end # Visit a GlobalVariableOperatorWriteNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::GlobalVariableOperatorWriteNode).void } def visit_global_variable_operator_write_node(node); end # Visit a GlobalVariableOrWriteNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::GlobalVariableOrWriteNode).void } def visit_global_variable_or_write_node(node); end # Visit a GlobalVariableReadNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::GlobalVariableReadNode).void } def visit_global_variable_read_node(node); end # Visit a GlobalVariableTargetNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::GlobalVariableTargetNode).void } def visit_global_variable_target_node(node); end # Visit a GlobalVariableWriteNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::GlobalVariableWriteNode).void } def visit_global_variable_write_node(node); end # Visit a HashNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::HashNode).void } def visit_hash_node(node); end # Visit a HashPatternNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::HashPatternNode).void } def visit_hash_pattern_node(node); end # Visit a IfNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::IfNode).void } def visit_if_node(node); end # Visit a ImaginaryNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::ImaginaryNode).void } def visit_imaginary_node(node); end # Visit a ImplicitNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::ImplicitNode).void } def visit_implicit_node(node); end # Visit a ImplicitRestNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::ImplicitRestNode).void } def visit_implicit_rest_node(node); end # Visit a InNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::InNode).void } def visit_in_node(node); end # Visit a IndexAndWriteNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::IndexAndWriteNode).void } def visit_index_and_write_node(node); end # Visit a IndexOperatorWriteNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::IndexOperatorWriteNode).void } def visit_index_operator_write_node(node); end # Visit a IndexOrWriteNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::IndexOrWriteNode).void } def visit_index_or_write_node(node); end # Visit a IndexTargetNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::IndexTargetNode).void } def visit_index_target_node(node); end # Visit a InstanceVariableAndWriteNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::InstanceVariableAndWriteNode).void } def visit_instance_variable_and_write_node(node); end # Visit a InstanceVariableOperatorWriteNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::InstanceVariableOperatorWriteNode).void } def visit_instance_variable_operator_write_node(node); end # Visit a InstanceVariableOrWriteNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::InstanceVariableOrWriteNode).void } def visit_instance_variable_or_write_node(node); end # Visit a InstanceVariableReadNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::InstanceVariableReadNode).void } def visit_instance_variable_read_node(node); end # Visit a InstanceVariableTargetNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::InstanceVariableTargetNode).void } def visit_instance_variable_target_node(node); end # Visit a InstanceVariableWriteNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::InstanceVariableWriteNode).void } def visit_instance_variable_write_node(node); end # Visit a IntegerNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::IntegerNode).void } def visit_integer_node(node); end # Visit a InterpolatedMatchLastLineNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::InterpolatedMatchLastLineNode).void } def visit_interpolated_match_last_line_node(node); end # Visit a InterpolatedRegularExpressionNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::InterpolatedRegularExpressionNode).void } def visit_interpolated_regular_expression_node(node); end # Visit a InterpolatedStringNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::InterpolatedStringNode).void } def visit_interpolated_string_node(node); end # Visit a InterpolatedSymbolNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::InterpolatedSymbolNode).void } def visit_interpolated_symbol_node(node); end # Visit a InterpolatedXStringNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::InterpolatedXStringNode).void } def visit_interpolated_x_string_node(node); end + # Visit a ItParametersNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ItParametersNode).void } + def visit_it_parameters_node(node); end + # Visit a KeywordHashNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::KeywordHashNode).void } def visit_keyword_hash_node(node); end # Visit a KeywordRestParameterNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::KeywordRestParameterNode).void } def visit_keyword_rest_parameter_node(node); end # Visit a LambdaNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::LambdaNode).void } def visit_lambda_node(node); end # Visit a LocalVariableAndWriteNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::LocalVariableAndWriteNode).void } def visit_local_variable_and_write_node(node); end # Visit a LocalVariableOperatorWriteNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::LocalVariableOperatorWriteNode).void } def visit_local_variable_operator_write_node(node); end # Visit a LocalVariableOrWriteNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::LocalVariableOrWriteNode).void } def visit_local_variable_or_write_node(node); end # Visit a LocalVariableReadNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::LocalVariableReadNode).void } def visit_local_variable_read_node(node); end # Visit a LocalVariableTargetNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::LocalVariableTargetNode).void } def visit_local_variable_target_node(node); end # Visit a LocalVariableWriteNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::LocalVariableWriteNode).void } def visit_local_variable_write_node(node); end # Visit a MatchLastLineNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::MatchLastLineNode).void } def visit_match_last_line_node(node); end # Visit a MatchPredicateNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::MatchPredicateNode).void } def visit_match_predicate_node(node); end # Visit a MatchRequiredNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::MatchRequiredNode).void } def visit_match_required_node(node); end # Visit a MatchWriteNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::MatchWriteNode).void } def visit_match_write_node(node); end # Visit a MissingNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::MissingNode).void } def visit_missing_node(node); end # Visit a ModuleNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::ModuleNode).void } def visit_module_node(node); end # Visit a MultiTargetNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::MultiTargetNode).void } def visit_multi_target_node(node); end # Visit a MultiWriteNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::MultiWriteNode).void } def visit_multi_write_node(node); end # Visit a NextNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::NextNode).void } def visit_next_node(node); end # Visit a NilNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::NilNode).void } def visit_nil_node(node); end # Visit a NoKeywordsParameterNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::NoKeywordsParameterNode).void } def visit_no_keywords_parameter_node(node); end # Visit a NumberedParametersNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::NumberedParametersNode).void } def visit_numbered_parameters_node(node); end # Visit a NumberedReferenceReadNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::NumberedReferenceReadNode).void } def visit_numbered_reference_read_node(node); end # Visit a OptionalKeywordParameterNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::OptionalKeywordParameterNode).void } def visit_optional_keyword_parameter_node(node); end # Visit a OptionalParameterNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::OptionalParameterNode).void } def visit_optional_parameter_node(node); end # Visit a OrNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::OrNode).void } def visit_or_node(node); end # Visit a ParametersNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::ParametersNode).void } def visit_parameters_node(node); end # Visit a ParenthesesNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::ParenthesesNode).void } def visit_parentheses_node(node); end # Visit a PinnedExpressionNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::PinnedExpressionNode).void } def visit_pinned_expression_node(node); end # Visit a PinnedVariableNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::PinnedVariableNode).void } def visit_pinned_variable_node(node); end # Visit a PostExecutionNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::PostExecutionNode).void } def visit_post_execution_node(node); end # Visit a PreExecutionNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::PreExecutionNode).void } def visit_pre_execution_node(node); end # Visit a ProgramNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::ProgramNode).void } def visit_program_node(node); end # Visit a RangeNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::RangeNode).void } def visit_range_node(node); end # Visit a RationalNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::RationalNode).void } def visit_rational_node(node); end # Visit a RedoNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::RedoNode).void } def visit_redo_node(node); end # Visit a RegularExpressionNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::RegularExpressionNode).void } def visit_regular_expression_node(node); end # Visit a RequiredKeywordParameterNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::RequiredKeywordParameterNode).void } def visit_required_keyword_parameter_node(node); end # Visit a RequiredParameterNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::RequiredParameterNode).void } def visit_required_parameter_node(node); end # Visit a RescueModifierNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::RescueModifierNode).void } def visit_rescue_modifier_node(node); end # Visit a RescueNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::RescueNode).void } def visit_rescue_node(node); end # Visit a RestParameterNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::RestParameterNode).void } def visit_rest_parameter_node(node); end # Visit a RetryNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::RetryNode).void } def visit_retry_node(node); end # Visit a ReturnNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::ReturnNode).void } def visit_return_node(node); end # Visit a SelfNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::SelfNode).void } def visit_self_node(node); end + # Visit a ShareableConstantNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ShareableConstantNode).void } + def visit_shareable_constant_node(node); end + # Visit a SingletonClassNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::SingletonClassNode).void } def visit_singleton_class_node(node); end # Visit a SourceEncodingNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::SourceEncodingNode).void } def visit_source_encoding_node(node); end # Visit a SourceFileNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::SourceFileNode).void } def visit_source_file_node(node); end # Visit a SourceLineNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::SourceLineNode).void } def visit_source_line_node(node); end # Visit a SplatNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::SplatNode).void } def visit_splat_node(node); end # Visit a StatementsNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::StatementsNode).void } def visit_statements_node(node); end # Visit a StringNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::StringNode).void } def visit_string_node(node); end # Visit a SuperNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::SuperNode).void } def visit_super_node(node); end # Visit a SymbolNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::SymbolNode).void } def visit_symbol_node(node); end # Visit a TrueNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::TrueNode).void } def visit_true_node(node); end # Visit a UndefNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::UndefNode).void } def visit_undef_node(node); end # Visit a UnlessNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::UnlessNode).void } def visit_unless_node(node); end # Visit a UntilNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::UntilNode).void } def visit_until_node(node); end # Visit a WhenNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::WhenNode).void } def visit_when_node(node); end # Visit a WhileNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::WhileNode).void } def visit_while_node(node); end # Visit a XStringNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::XStringNode).void } def visit_x_string_node(node); end # Visit a YieldNode node # - # source://prism//lib/prism/visitor.rb#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::YieldNode).void } def visit_yield_node(node); end end @@ -30472,89 +35070,121 @@ end # ^^^^^^^^^ # end # -# source://prism//lib/prism/node.rb#18666 +# source://prism//lib/prism/node.rb#18255 class Prism::WhenNode < ::Prism::Node - # def initialize: (Location keyword_loc, Array[Node] conditions, StatementsNode? statements, Location location) -> void + # 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#18668 - def initialize(source, keyword_loc, conditions, statements, location); end + # source://prism//lib/prism/node.rb#18257 + sig do + params( + source: Prism::Source, + keyword_loc: Prism::Location, + conditions: T::Array[Prism::Node], + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + location: Prism::Location + ).void + end + def initialize(source, keyword_loc, conditions, then_keyword_loc, statements, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18678 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#18268 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18683 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#18273 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18696 + # source://prism//lib/prism/node.rb#18286 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18688 + # source://prism//lib/prism/node.rb#18278 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # attr_reader conditions: Array[Node] + # attr_reader conditions: Array[Prism::node] # - # source://prism//lib/prism/node.rb#18726 + # source://prism//lib/prism/node.rb#18311 sig { returns(T::Array[Prism::Node]) } def conditions; end - # def copy: (**params) -> WhenNode + # def copy: (?keyword_loc: Location, ?conditions: Array[Prism::node], ?then_keyword_loc: Location?, ?statements: StatementsNode?, ?location: Location) -> WhenNode # - # source://prism//lib/prism/node.rb#18701 - sig { params(params: T.untyped).returns(Prism::WhenNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#18291 + sig do + params( + keyword_loc: Prism::Location, + conditions: T::Array[Prism::Node], + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + location: Prism::Location + ).returns(Prism::WhenNode) + end + def copy(keyword_loc: T.unsafe(nil), conditions: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18683 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#18273 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, conditions: Array[Node], statements: StatementsNode?, location: Location } + # 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#18715 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#18299 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#18738 + # source://prism//lib/prism/node.rb#18341 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#18733 + # source://prism//lib/prism/node.rb#18331 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#18720 + # source://prism//lib/prism/node.rb#18304 sig { returns(Prism::Location) } def keyword_loc; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#18729 + # source://prism//lib/prism/node.rb#18327 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end + # def then_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#18336 + sig { returns(T.nilable(String)) } + def then_keyword; end + + # attr_reader then_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#18314 + sig { returns(T.nilable(Prism::Location)) } + def then_keyword_loc; end + # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a @@ -30570,7 +35200,8 @@ class Prism::WhenNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#18765 + # source://prism//lib/prism/node.rb#18369 + sig { override.returns(Symbol) } def type; end class << self @@ -30581,7 +35212,7 @@ class Prism::WhenNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#18775 + # source://prism//lib/prism/node.rb#18379 def type; end end end @@ -30594,109 +35225,131 @@ end # while foo do bar end # ^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#18787 +# source://prism//lib/prism/node.rb#18391 class Prism::WhileNode < ::Prism::Node - # def initialize: (Integer flags, Location keyword_loc, Location? closing_loc, Node predicate, StatementsNode? statements, Location location) -> void + # 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#18789 + # source://prism//lib/prism/node.rb#18393 + sig do + params( + source: Prism::Source, + flags: Integer, + keyword_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + location: Prism::Location + ).void + end def initialize(source, flags, keyword_loc, closing_loc, predicate, statements, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18801 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#18405 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def begin_modifier?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#18878 + # source://prism//lib/prism/node.rb#18476 sig { returns(T::Boolean) } def begin_modifier?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18810 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#18414 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#18888 + # source://prism//lib/prism/node.rb#18486 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#18859 + # source://prism//lib/prism/node.rb#18456 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18823 + # source://prism//lib/prism/node.rb#18427 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18815 + # source://prism//lib/prism/node.rb#18419 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> WhileNode + # def copy: (?flags: Integer, ?keyword_loc: Location, ?closing_loc: Location?, ?predicate: Prism::node, ?statements: StatementsNode?, ?location: Location) -> WhileNode # - # source://prism//lib/prism/node.rb#18828 - sig { params(params: T.untyped).returns(Prism::WhileNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#18432 + sig do + params( + flags: Integer, + keyword_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + location: Prism::Location + ).returns(Prism::WhileNode) + end + def copy(flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), predicate: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18810 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#18414 + 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: Node, statements: StatementsNode?, location: Location } + # 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#18844 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#18440 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#18893 + # source://prism//lib/prism/node.rb#18491 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#18883 + # source://prism//lib/prism/node.rb#18481 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#18853 + # source://prism//lib/prism/node.rb#18449 sig { returns(Prism::Location) } def keyword_loc; end - # attr_reader predicate: Node + # attr_reader predicate: Prism::node # - # source://prism//lib/prism/node.rb#18871 + # source://prism//lib/prism/node.rb#18469 sig { returns(Prism::Node) } def predicate; end - # source://prism//lib/prism/node.rb#18805 + # source://prism//lib/prism/node.rb#18409 def set_newline_flag(newline_marked); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#18874 + # source://prism//lib/prism/node.rb#18472 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -30715,14 +35368,15 @@ class Prism::WhileNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#18924 + # source://prism//lib/prism/node.rb#18522 + sig { override.returns(Symbol) } def type; end private # private attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#18849 + # source://prism//lib/prism/node.rb#18445 sig { returns(Integer) } def flags; end @@ -30734,7 +35388,7 @@ class Prism::WhileNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#18934 + # source://prism//lib/prism/node.rb#18532 def type; end end end @@ -30744,7 +35398,7 @@ end # `foo` # ^^^^^ # -# source://prism//lib/prism/node.rb#18943 +# source://prism//lib/prism/node.rb#18541 class Prism::XStringNode < ::Prism::Node include ::Prism::HeredocQuery @@ -30752,83 +35406,104 @@ class Prism::XStringNode < ::Prism::Node # # @return [XStringNode] a new instance of XStringNode # - # source://prism//lib/prism/node.rb#18945 + # source://prism//lib/prism/node.rb#18543 + sig do + params( + source: Prism::Source, + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String, + location: Prism::Location + ).void + end def initialize(source, flags, opening_loc, content_loc, closing_loc, unescaped, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18957 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#18555 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18962 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#18560 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#19044 + # source://prism//lib/prism/node.rb#18637 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#19014 + # source://prism//lib/prism/node.rb#18606 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18972 + # source://prism//lib/prism/node.rb#18570 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18967 + # source://prism//lib/prism/node.rb#18565 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def content: () -> String # - # source://prism//lib/prism/node.rb#19039 + # source://prism//lib/prism/node.rb#18632 sig { returns(String) } def content; end # attr_reader content_loc: Location # - # source://prism//lib/prism/node.rb#19008 + # source://prism//lib/prism/node.rb#18599 sig { returns(Prism::Location) } def content_loc; end - # def copy: (**params) -> XStringNode + # def copy: (?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String, ?location: Location) -> XStringNode # - # source://prism//lib/prism/node.rb#18977 - sig { params(params: T.untyped).returns(Prism::XStringNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#18575 + sig do + params( + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String, + location: Prism::Location + ).returns(Prism::XStringNode) + end + def copy(flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18962 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#18560 + 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#18993 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#18583 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def forced_binary_encoding?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#19029 + # source://prism//lib/prism/node.rb#18622 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -30836,27 +35511,38 @@ class Prism::XStringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#19024 + # source://prism//lib/prism/node.rb#18617 sig { returns(T::Boolean) } def forced_utf8_encoding?; end + sig { returns(T::Boolean) } + def heredoc?; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#19049 + # source://prism//lib/prism/node.rb#18642 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String # - # source://prism//lib/prism/node.rb#19034 + # source://prism//lib/prism/node.rb#18627 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#19002 + # source://prism//lib/prism/node.rb#18592 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 + sig { returns(Prism::InterpolatedXStringNode) } + def to_interpolated; end + # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a @@ -30872,12 +35558,13 @@ class Prism::XStringNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#19074 + # source://prism//lib/prism/node.rb#18667 + sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#19020 + # source://prism//lib/prism/node.rb#18613 sig { returns(String) } def unescaped; end @@ -30885,7 +35572,7 @@ class Prism::XStringNode < ::Prism::Node # private attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#18998 + # source://prism//lib/prism/node.rb#18588 sig { returns(Integer) } def flags; end @@ -30897,7 +35584,7 @@ class Prism::XStringNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#19084 + # source://prism//lib/prism/node.rb#18677 def type; end end end @@ -30907,104 +35594,124 @@ end # yield 1 # ^^^^^^^ # -# source://prism//lib/prism/node.rb#19093 +# source://prism//lib/prism/node.rb#18686 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#19095 + # source://prism//lib/prism/node.rb#18688 + sig do + params( + source: Prism::Source, + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end def initialize(source, keyword_loc, lparen_loc, arguments, rparen_loc, location); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#19106 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#18699 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#19166 + # source://prism//lib/prism/node.rb#18754 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#19111 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#18704 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#19123 + # source://prism//lib/prism/node.rb#18716 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#19116 + # source://prism//lib/prism/node.rb#18709 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> YieldNode + # def copy: (?keyword_loc: Location, ?lparen_loc: Location?, ?arguments: ArgumentsNode?, ?rparen_loc: Location?, ?location: Location) -> YieldNode # - # source://prism//lib/prism/node.rb#19128 - sig { params(params: T.untyped).returns(Prism::YieldNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#18721 + sig do + params( + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::YieldNode) + end + def copy(keyword_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), arguments: T.unsafe(nil), rparen_loc: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#19111 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#18704 + 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#19143 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end + # source://prism//lib/prism/node.rb#18729 + sig { params(keys: T.nilable(T::Array[Symbol])).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 # - # source://prism//lib/prism/node.rb#19197 + # source://prism//lib/prism/node.rb#18786 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#19182 + # source://prism//lib/prism/node.rb#18771 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#19148 + # source://prism//lib/prism/node.rb#18734 sig { returns(Prism::Location) } def keyword_loc; end # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#19187 + # source://prism//lib/prism/node.rb#18776 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#19154 + # source://prism//lib/prism/node.rb#18741 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#19192 + # source://prism//lib/prism/node.rb#18781 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#19169 + # source://prism//lib/prism/node.rb#18757 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end @@ -31023,7 +35730,8 @@ class Prism::YieldNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#19225 + # source://prism//lib/prism/node.rb#18814 + sig { override.returns(Symbol) } def type; end class << self @@ -31034,7 +35742,13 @@ class Prism::YieldNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#19235 + # source://prism//lib/prism/node.rb#18824 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/test/requests/code_actions_formatting_test.rb b/test/requests/code_actions_formatting_test.rb index 8bcb493b01..6e654185e7 100644 --- a/test/requests/code_actions_formatting_test.rb +++ b/test/requests/code_actions_formatting_test.rb @@ -83,7 +83,9 @@ def assert_corrects_to_expected(diagnostic_code, code_action_title, source, expe ) diagnostics = RubyLsp::Requests::Diagnostics.new(global_state, document).perform - diagnostic = T.must(T.must(diagnostics).find { |d| d.code == diagnostic_code }) + # The source of the returned attributes may be RuboCop or Prism. Prism diagnostics don't have a code. + rubocop_diagnostics = T.must(diagnostics).select { _1.attributes[:source] == "RuboCop" } + diagnostic = T.must(T.must(rubocop_diagnostics).find { |d| d.attributes[:code] && (d.code == diagnostic_code) }) range = diagnostic.range.to_hash.transform_values(&:to_hash) result = RubyLsp::Requests::CodeActions.new(document, range, { diagnostics: [JSON.parse(T.must(diagnostic).to_json, symbolize_names: true)], diff --git a/test/requests/show_syntax_tree_test.rb b/test/requests/show_syntax_tree_test.rb index d11f6f05ed..cbf0d902c0 100644 --- a/test/requests/show_syntax_tree_test.rb +++ b/test/requests/show_syntax_tree_test.rb @@ -61,7 +61,8 @@ def test_returns_ast_if_document_is_parsed ├── name_loc: (1,0)-(1,3) = "foo" ├── value: │ @ IntegerNode (location: (1,6)-(1,9)) - │ └── flags: decimal + │ ├── flags: decimal + │ └── value: 123 └── operator_loc: (1,4)-(1,5) = "=" AST end @@ -91,7 +92,8 @@ def test_returns_ast_for_a_selection ├── name_loc: (1,0)-(1,3) = "foo" ├── value: │ @ IntegerNode (location: (1,6)-(1,9)) - │ └── flags: decimal + │ ├── flags: decimal + │ └── value: 123 └── operator_loc: (1,4)-(1,5) = "=" @ LocalVariableWriteNode (location: (2,0)-(2,9)) @@ -100,7 +102,8 @@ def test_returns_ast_for_a_selection ├── name_loc: (2,0)-(2,3) = "bar" ├── value: │ @ IntegerNode (location: (2,6)-(2,9)) - │ └── flags: decimal + │ ├── flags: decimal + │ └── value: 456 └── operator_loc: (2,4)-(2,5) = "=" AST From 800cd7e75054e30ea2fe2ab1763310e8f501a22c Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Mon, 22 Apr 2024 15:48:48 -0400 Subject: [PATCH 034/189] Increase timeout for tests (#1960) --- vscode/src/test/suite/client.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vscode/src/test/suite/client.test.ts b/vscode/src/test/suite/client.test.ts index 4426f6a89b..c0883c8522 100644 --- a/vscode/src/test/suite/client.test.ts +++ b/vscode/src/test/suite/client.test.ts @@ -109,8 +109,10 @@ suite("Client", () => { let client: Client; before(async function () { + // 60000 should be plenty but we're seeing timeouts on Windows in CI + // eslint-disable-next-line no-invalid-this - this.timeout(60000); + this.timeout(90000); // eslint-disable-next-line no-process-env if (process.env.CI) { From 70cb714d08afba5ca46327bfd68509ba254f832a Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Mon, 22 Apr 2024 16:38:31 -0400 Subject: [PATCH 035/189] Allow configuring linters separate from formatter (#1925) * Remember active linters in global state * Use active linters to run diagnostics * Add linters setting and pass it to the server * Apply PR suggestion --- lib/ruby_lsp/global_state.rb | 18 +++++++++++++ lib/ruby_lsp/requests/diagnostics.rb | 11 +++++--- test/global_state_test.rb | 27 +++++++++++++++++++ test/requests/code_actions_formatting_test.rb | 4 ++- .../requests/diagnostics_expectations_test.rb | 4 ++- test/requests/diagnostics_test.rb | 8 ++++-- vscode/package.json | 10 +++++++ vscode/src/client.ts | 1 + 8 files changed, 75 insertions(+), 8 deletions(-) diff --git a/lib/ruby_lsp/global_state.rb b/lib/ruby_lsp/global_state.rb index 6edba5fb93..69a69d1324 100644 --- a/lib/ruby_lsp/global_state.rb +++ b/lib/ruby_lsp/global_state.rb @@ -29,6 +29,7 @@ def initialize @encoding = T.let(Encoding::UTF_8, Encoding) @formatter = T.let("auto", String) + @linters = T.let([], T::Array[String]) @test_library = T.let(detect_test_library, String) @typechecker = T.let(detect_typechecker, T::Boolean) @index = T.let(RubyIndexer::Index.new, RubyIndexer::Index) @@ -46,6 +47,11 @@ def active_formatter @supported_formatters[@formatter] end + sig { returns(T::Array[Requests::Support::Formatter]) } + def active_linters + @linters.filter_map { |name| @supported_formatters[name] } + end + sig { params(options: T::Hash[Symbol, T.untyped]).void } def apply_options(options) workspace_uri = options.dig(:workspaceFolders, 0, :uri) @@ -55,6 +61,9 @@ def apply_options(options) @formatter = specified_formatter if specified_formatter @formatter = detect_formatter if @formatter == "auto" + specified_linters = options.dig(:initializationOptions, :linters) + @linters = specified_linters || detect_linters + encodings = options.dig(:capabilities, :general, :positionEncodings) @encoding = if !encodings || encodings.empty? Encoding::UTF_16LE @@ -108,6 +117,15 @@ def detect_formatter end end + # Try to detect if there are linters in the project's dependencies. For auto-detection, we always only consider a + # single linter. To have multiple linters running, the user must configure them manually + sig { returns(T::Array[String]) } + def detect_linters + linters = [] + linters << "rubocop" if direct_dependency?(/^rubocop/) + linters + end + sig { returns(String) } def detect_test_library if direct_dependency?(/^rspec/) diff --git a/lib/ruby_lsp/requests/diagnostics.rb b/lib/ruby_lsp/requests/diagnostics.rb index 3a228d6ba6..8355deb7f3 100644 --- a/lib/ruby_lsp/requests/diagnostics.rb +++ b/lib/ruby_lsp/requests/diagnostics.rb @@ -34,7 +34,7 @@ def provider sig { params(global_state: GlobalState, document: Document).void } def initialize(global_state, document) super() - @active_formatter = T.let(global_state.active_formatter, T.nilable(Support::Formatter)) + @active_linters = T.let(global_state.active_linters, T::Array[Support::Formatter]) @document = document @uri = T.let(document.uri, URI::Generic) end @@ -45,10 +45,13 @@ def perform diagnostics.concat(syntax_error_diagnostics, syntax_warning_diagnostics) # Running RuboCop is slow, so to avoid excessive runs we only do so if the file is syntactically valid - return diagnostics if @document.syntax_error? || !@active_formatter + return diagnostics if @document.syntax_error? || @active_linters.empty? + + @active_linters.each do |linter| + linter_diagnostics = linter.run_diagnostic(@uri, @document) + diagnostics.concat(linter_diagnostics) if linter_diagnostics + end - formatter_diagnostics = @active_formatter.run_diagnostic(@uri, @document) - diagnostics.concat(formatter_diagnostics) if formatter_diagnostics diagnostics end diff --git a/test/global_state_test.rb b/test/global_state_test.rb index a9bdb3d018..77898a76ca 100644 --- a/test/global_state_test.rb +++ b/test/global_state_test.rb @@ -105,6 +105,33 @@ def test_watching_files_if_not_reported refute(state.supports_watching_files) end + def test_linter_specification + state = GlobalState.new + state.apply_options({ + initializationOptions: { linters: ["rubocop", "brakeman"] }, + }) + + assert_equal(["rubocop", "brakeman"], state.instance_variable_get(:@linters)) + end + + def test_linter_auto_detection + stub_dependencies("rubocop" => "1.2.3") + state = GlobalState.new + state.apply_options({}) + + assert_equal(["rubocop"], state.instance_variable_get(:@linters)) + end + + def test_specifying_empty_linters + stub_dependencies("rubocop" => "1.2.3") + state = GlobalState.new + state.apply_options({ + initializationOptions: { linters: [] }, + }) + + assert_empty(state.instance_variable_get(:@linters)) + end + private def stub_dependencies(dependencies) diff --git a/test/requests/code_actions_formatting_test.rb b/test/requests/code_actions_formatting_test.rb index 6e654185e7..ca562df6a8 100644 --- a/test/requests/code_actions_formatting_test.rb +++ b/test/requests/code_actions_formatting_test.rb @@ -76,7 +76,9 @@ def assert_corrects_to_expected(diagnostic_code, code_action_title, source, expe ) global_state = RubyLsp::GlobalState.new - global_state.formatter = "rubocop" + global_state.apply_options({ + initializationOptions: { linters: ["rubocop"] }, + }) global_state.register_formatter( "rubocop", RubyLsp::Requests::Support::RuboCopFormatter.new, diff --git a/test/requests/diagnostics_expectations_test.rb b/test/requests/diagnostics_expectations_test.rb index 044592ba89..1b4c64cbbd 100644 --- a/test/requests/diagnostics_expectations_test.rb +++ b/test/requests/diagnostics_expectations_test.rb @@ -11,7 +11,9 @@ def run_expectations(source) document = RubyLsp::RubyDocument.new(source: source, version: 1, uri: URI::Generic.from_path(path: __FILE__)) result = T.let(nil, T.nilable(T::Array[RubyLsp::Interface::Diagnostic])) global_state = RubyLsp::GlobalState.new - global_state.formatter = "rubocop" + global_state.apply_options({ + initializationOptions: { linters: ["rubocop"] }, + }) global_state.register_formatter( "rubocop", RubyLsp::Requests::Support::RuboCopFormatter.new, diff --git a/test/requests/diagnostics_test.rb b/test/requests/diagnostics_test.rb index 34d21e2b4b..26e5fe6dc1 100644 --- a/test/requests/diagnostics_test.rb +++ b/test/requests/diagnostics_test.rb @@ -6,7 +6,9 @@ class DiagnosticsTest < Minitest::Test def setup @global_state = RubyLsp::GlobalState.new - @global_state.formatter = "rubocop" + @global_state.apply_options({ + initializationOptions: { linters: ["rubocop"] }, + }) @global_state.register_formatter( "rubocop", RubyLsp::Requests::Support::RuboCopFormatter.new, @@ -96,7 +98,9 @@ def run_diagnostic(uri, document) end @global_state.register_formatter("my-custom-formatter", T.unsafe(formatter_class).new) - @global_state.formatter = "my-custom-formatter" + @global_state.apply_options({ + initializationOptions: { linters: ["my-custom-formatter"] }, + }) diagnostics = T.must(RubyLsp::Requests::Diagnostics.new(@global_state, document).perform) assert(diagnostics.find { |d| d.message == "Hello from custom formatter" }) diff --git a/vscode/package.json b/vscode/package.json index 32d359774e..2014729f0b 100644 --- a/vscode/package.json +++ b/vscode/package.json @@ -274,6 +274,16 @@ ], "default": "auto" }, + "rubyLsp.linters": { + "description": "List of linter tools that the Ruby LSP should use for diagnostics", + "type": "array", + "examples": [ + [ + "rubocop" + ] + ], + "default": null + }, "rubyLsp.bundleGemfile": { "description": "Relative or absolute path to the Gemfile to use for bundling the Ruby LSP server. Only necessary when using a separate Gemfile for the Ruby LSP", "type": "string", diff --git a/vscode/src/client.ts b/vscode/src/client.ts index f9b5895814..d00668d32b 100644 --- a/vscode/src/client.ts +++ b/vscode/src/client.ts @@ -117,6 +117,7 @@ function collectClientOptions( ), featuresConfiguration: configuration.get("featuresConfiguration"), formatter: configuration.get("formatter"), + linters: configuration.get("linters"), }, }; } From 28b6d11bb70e61ce15542f044e85f9f3ff61f4e5 Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Mon, 22 Apr 2024 16:53:24 -0400 Subject: [PATCH 036/189] Avoid memoizing dependencies (#1926) --- lib/ruby_lsp/global_state.rb | 61 ++++++++++++++++-------------------- test/global_state_test.rb | 34 ++++++++++---------- 2 files changed, 45 insertions(+), 50 deletions(-) diff --git a/lib/ruby_lsp/global_state.rb b/lib/ruby_lsp/global_state.rb index 69a69d1324..9fabc2142d 100644 --- a/lib/ruby_lsp/global_state.rb +++ b/lib/ruby_lsp/global_state.rb @@ -30,8 +30,8 @@ def initialize @formatter = T.let("auto", String) @linters = T.let([], T::Array[String]) - @test_library = T.let(detect_test_library, String) - @typechecker = T.let(detect_typechecker, T::Boolean) + @test_library = T.let("minitest", String) + @typechecker = T.let(true, T::Boolean) @index = T.let(RubyIndexer::Index.new, RubyIndexer::Index) @supported_formatters = T.let({}, T::Hash[String, Requests::Support::Formatter]) @supports_watching_files = T.let(false, T::Boolean) @@ -54,15 +54,18 @@ def active_linters sig { params(options: T::Hash[Symbol, T.untyped]).void } def apply_options(options) + dependencies = gather_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 if @formatter == "auto" + @formatter = detect_formatter(dependencies) if @formatter == "auto" specified_linters = options.dig(:initializationOptions, :linters) - @linters = specified_linters || detect_linters + @linters = specified_linters || detect_linters(dependencies) + @test_library = detect_test_library(dependencies) + @typechecker = detect_typechecker(dependencies) encodings = options.dig(:capabilities, :general, :positionEncodings) @encoding = if !encodings || encodings.empty? @@ -98,19 +101,14 @@ def encoding_name end end - sig { params(gem_pattern: Regexp).returns(T::Boolean) } - def direct_dependency?(gem_pattern) - dependencies.any?(gem_pattern) - end - private - sig { returns(String) } - def detect_formatter + sig { params(dependencies: T::Array[String]).returns(String) } + def detect_formatter(dependencies) # NOTE: Intentionally no $ at end, since we want to match rubocop-shopify, etc. - if direct_dependency?(/^rubocop/) + if dependencies.any?(/^rubocop/) "rubocop" - elsif direct_dependency?(/^syntax_tree$/) + elsif dependencies.any?(/^syntax_tree$/) "syntax_tree" else "none" @@ -119,16 +117,16 @@ def detect_formatter # Try to detect if there are linters in the project's dependencies. For auto-detection, we always only consider a # single linter. To have multiple linters running, the user must configure them manually - sig { returns(T::Array[String]) } - def detect_linters + sig { params(dependencies: T::Array[String]).returns(T::Array[String]) } + def detect_linters(dependencies) linters = [] - linters << "rubocop" if direct_dependency?(/^rubocop/) + linters << "rubocop" if dependencies.any?(/^rubocop/) linters end - sig { returns(String) } - def detect_test_library - if direct_dependency?(/^rspec/) + sig { params(dependencies: T::Array[String]).returns(String) } + def detect_test_library(dependencies) + if dependencies.any?(/^rspec/) "rspec" # A Rails app may have a dependency on minitest, but we would instead want to use the Rails test runner provided # by ruby-lsp-rails. A Rails app doesn't need to depend on the rails gem itself, individual components like @@ -137,23 +135,23 @@ def detect_test_library elsif File.exist?(File.join(workspace_path, "bin/rails")) "rails" # NOTE: Intentionally ends with $ to avoid mis-matching minitest-reporters, etc. in a Rails app. - elsif direct_dependency?(/^minitest$/) + elsif dependencies.any?(/^minitest$/) "minitest" - elsif direct_dependency?(/^test-unit/) + elsif dependencies.any?(/^test-unit/) "test-unit" else "unknown" end end - sig { returns(T::Boolean) } - def detect_typechecker + sig { params(dependencies: T::Array[String]).returns(T::Boolean) } + def detect_typechecker(dependencies) return false if ENV["RUBY_LSP_BYPASS_TYPECHECKER"] # We can't read the env from within `Bundle.with_original_env` so we need to set it here. ruby_lsp_env_is_test = (ENV["RUBY_LSP_ENV"] == "test") Bundler.with_original_env do - sorbet_static_detected = Bundler.locked_gems.specs.any? { |spec| spec.name == "sorbet-static" } + sorbet_static_detected = dependencies.any?(/^sorbet-static/) # Don't show message while running tests, since it's noisy if sorbet_static_detected && !ruby_lsp_env_is_test $stderr.puts("Ruby LSP detected this is a Sorbet project so will defer to Sorbet LSP for some functionality") @@ -165,16 +163,11 @@ def detect_typechecker end sig { returns(T::Array[String]) } - def dependencies - @dependencies ||= T.let( - begin - Bundler.with_original_env { Bundler.default_gemfile } - Bundler.locked_gems.dependencies.keys + gemspec_dependencies - rescue Bundler::GemfileNotFound - [] - end, - T.nilable(T::Array[String]), - ) + def gather_dependencies + Bundler.with_original_env { Bundler.default_gemfile } + Bundler.locked_gems.dependencies.keys + gemspec_dependencies + rescue Bundler::GemfileNotFound + [] end sig { returns(T::Array[String]) } diff --git a/test/global_state_test.rb b/test/global_state_test.rb index 77898a76ca..75f5829575 100644 --- a/test/global_state_test.rb +++ b/test/global_state_test.rb @@ -8,49 +8,51 @@ class GlobalStateTest < Minitest::Test def test_detects_no_test_library_when_there_are_no_dependencies stub_dependencies({}) - assert_equal("unknown", GlobalState.new.test_library) + state = GlobalState.new + state.apply_options({}) + assert_equal("unknown", state.test_library) end def test_detects_minitest stub_dependencies("minitest" => "1.2.3") - assert_equal("minitest", GlobalState.new.test_library) + state = GlobalState.new + state.apply_options({}) + assert_equal("minitest", state.test_library) end def test_does_not_detect_minitest_related_gems_as_minitest stub_dependencies("minitest-reporters" => "1.2.3") - assert_equal("unknown", GlobalState.new.test_library) + state = GlobalState.new + state.apply_options({}) + assert_equal("unknown", state.test_library) end def test_detects_test_unit stub_dependencies("test-unit" => "1.2.3") - assert_equal("test-unit", GlobalState.new.test_library) - end - - def test_detects_dependencies_in_gemspecs - assert(GlobalState.new.direct_dependency?(/^prism$/)) + state = GlobalState.new + state.apply_options({}) + assert_equal("test-unit", state.test_library) 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) - assert_equal("rails", GlobalState.new.test_library) + state = GlobalState.new + 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 - assert_equal("rspec", GlobalState.new.test_library) - end - - def test_direct_dependency_returns_false_outside_of_bundle - File.expects(:file?).at_least_once.returns(false) - stub_dependencies({}) - refute(GlobalState.new.direct_dependency?(/^ruby-lsp/)) + state = GlobalState.new + state.apply_options({}) + assert_equal("rspec", state.test_library) end def test_apply_option_selects_formatter From 710ce2f50a663633e91bb9e976591d650f4f9e23 Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Tue, 23 Apr 2024 15:59:04 -0400 Subject: [PATCH 037/189] Upgrade to Ruby 3.3.1 (#1962) --- .ruby-version | 2 +- vscode/src/test/rubyVersion.ts | 12 ++++++++++ vscode/src/test/suite/debugger.test.ts | 3 ++- vscode/src/test/suite/ruby/chruby.test.ts | 22 ++++++++++--------- .../src/test/suite/ruby/rubyInstaller.test.ts | 3 +-- vscode/src/test/suite/ruby/shadowenv.test.ts | 5 ++--- 6 files changed, 30 insertions(+), 17 deletions(-) create mode 100644 vscode/src/test/rubyVersion.ts diff --git a/.ruby-version b/.ruby-version index 15a2799817..bea438e9ad 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.3.0 +3.3.1 diff --git a/vscode/src/test/rubyVersion.ts b/vscode/src/test/rubyVersion.ts new file mode 100644 index 0000000000..5c19d315b0 --- /dev/null +++ b/vscode/src/test/rubyVersion.ts @@ -0,0 +1,12 @@ +import fs from "fs"; +import path from "path"; + +export const RUBY_VERSION = fs + .readFileSync( + path.join( + path.dirname(path.dirname(path.dirname(__dirname))), + ".ruby-version", + ), + "utf-8", + ) + .trim(); diff --git a/vscode/src/test/suite/debugger.test.ts b/vscode/src/test/suite/debugger.test.ts index d3be4367d1..3fbd4ea51b 100644 --- a/vscode/src/test/suite/debugger.test.ts +++ b/vscode/src/test/suite/debugger.test.ts @@ -11,6 +11,7 @@ import { Ruby, ManagerIdentifier } from "../../ruby"; import { Workspace } from "../../workspace"; import { WorkspaceChannel } from "../../workspaceChannel"; import { LOG_CHANNEL, asyncExec } from "../../common"; +import { RUBY_VERSION } from "../rubyVersion"; suite("Debugger", () => { test("Provide debug configurations returns the default configs", () => { @@ -183,7 +184,7 @@ suite("Debugger", () => { path.join(os.tmpdir(), "ruby-lsp-test-debugger"), ); fs.writeFileSync(path.join(tmpPath, "test.rb"), "1 + 1"); - fs.writeFileSync(path.join(tmpPath, ".ruby-version"), "3.3.0"); + fs.writeFileSync(path.join(tmpPath, ".ruby-version"), RUBY_VERSION); fs.writeFileSync( path.join(tmpPath, "Gemfile"), 'source "https://rubygems.org"\ngem "debug"', diff --git a/vscode/src/test/suite/ruby/chruby.test.ts b/vscode/src/test/suite/ruby/chruby.test.ts index 2c9ee2f939..cd4cd8add5 100644 --- a/vscode/src/test/suite/ruby/chruby.test.ts +++ b/vscode/src/test/suite/ruby/chruby.test.ts @@ -10,8 +10,10 @@ import * as vscode from "vscode"; import { Chruby } from "../../../ruby/chruby"; import { WorkspaceChannel } from "../../../workspaceChannel"; import { LOG_CHANNEL } from "../../../common"; +import { RUBY_VERSION } from "../../rubyVersion"; -const RUBY_VERSION = "3.3.0"; +const [major, minor, _patch] = RUBY_VERSION.split("."); +const VERSION_REGEX = `${major}\\.${minor}\\.\\d+`; // Create links to the real Ruby installations on CI and on our local machines function createRubySymlinks(destination: string) { @@ -22,11 +24,11 @@ function createRubySymlinks(destination: string) { ); } else if (process.env.CI) { fs.symlinkSync( - `/Users/runner/hostedtoolcache/Ruby/${RUBY_VERSION}/x64/bin/ruby`, + `/Users/runner/hostedtoolcache/Ruby/${RUBY_VERSION}/arm64/bin/ruby`, destination, ); } else { - fs.symlinkSync("/opt/rubies/3.3.0/bin/ruby", destination); + fs.symlinkSync(`/opt/rubies/${RUBY_VERSION}/bin/ruby`, destination); } } @@ -78,8 +80,8 @@ suite("Chruby", () => { const { env, version, yjit } = await chruby.activate(); - assert.match(env.GEM_PATH!, /ruby\/3\.3\.0/); - assert.match(env.GEM_PATH!, /lib\/ruby\/gems\/3\.3\.0/); + 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); }); @@ -94,8 +96,8 @@ suite("Chruby", () => { const { env, version, yjit } = await chruby.activate(); - assert.match(env.GEM_PATH!, /ruby\/3\.3\.0/); - assert.match(env.GEM_PATH!, /lib\/ruby\/gems\/3\.3\.0/); + 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); }); @@ -128,8 +130,8 @@ suite("Chruby", () => { const { env, version, yjit } = await chruby.activate(); - assert.match(env.GEM_PATH!, /ruby\/3\.3\.0/); - assert.match(env.GEM_PATH!, /lib\/ruby\/gems\/3\.3\.0/); + 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); }); @@ -151,7 +153,7 @@ suite("Chruby", () => { const { env, version, yjit } = await chruby.activate(); - assert.match(env.PATH!, /ruby-3\.3\.0\/bin/); + assert.match(env.PATH!, new RegExp(`/ruby-${RUBY_VERSION}/bin`)); assert.strictEqual(version, RUBY_VERSION); assert.notStrictEqual(yjit, undefined); }); diff --git a/vscode/src/test/suite/ruby/rubyInstaller.test.ts b/vscode/src/test/suite/ruby/rubyInstaller.test.ts index 828784b4e4..6775316975 100644 --- a/vscode/src/test/suite/ruby/rubyInstaller.test.ts +++ b/vscode/src/test/suite/ruby/rubyInstaller.test.ts @@ -9,8 +9,7 @@ import * as vscode from "vscode"; import { RubyInstaller } from "../../../ruby/rubyInstaller"; import { WorkspaceChannel } from "../../../workspaceChannel"; import { LOG_CHANNEL } from "../../../common"; - -const RUBY_VERSION = "3.3.0"; +import { RUBY_VERSION } from "../../rubyVersion"; suite("RubyInstaller", () => { if (os.platform() !== "win32") { diff --git a/vscode/src/test/suite/ruby/shadowenv.test.ts b/vscode/src/test/suite/ruby/shadowenv.test.ts index b509014563..604c08ab3a 100644 --- a/vscode/src/test/suite/ruby/shadowenv.test.ts +++ b/vscode/src/test/suite/ruby/shadowenv.test.ts @@ -11,8 +11,7 @@ import sinon from "sinon"; import { Shadowenv } from "../../../ruby/shadowenv"; import { WorkspaceChannel } from "../../../workspaceChannel"; import { LOG_CHANNEL, asyncExec } from "../../../common"; - -const RUBY_VERSION = "3.3.0"; +import { RUBY_VERSION } from "../../rubyVersion"; suite("Shadowenv", () => { if (os.platform() === "win32") { @@ -46,7 +45,7 @@ suite("Shadowenv", () => { "hostedtoolcache", "Ruby", RUBY_VERSION, - "x64", + "arm64", "bin", ); } else { From 0a3507fca30193bd6ecc26b17d173ffd2acfcea7 Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Wed, 24 Apr 2024 10:15:19 -0400 Subject: [PATCH 038/189] Avoid redirecting gem list output to stderr (#1964) --- vscode/src/workspace.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vscode/src/workspace.ts b/vscode/src/workspace.ts index 64765c0d9b..795d025353 100644 --- a/vscode/src/workspace.ts +++ b/vscode/src/workspace.ts @@ -187,13 +187,13 @@ export class Workspace implements WorkspaceInterface { "rubyLsp.lastGemUpdate", ); - const { stderr } = await asyncExec("gem list ruby-lsp 1>&2", { + const { stdout } = await asyncExec("gem list ruby-lsp", { cwd: this.workspaceFolder.uri.fsPath, env: this.ruby.env, }); // If the gem is not yet installed, install it - if (!stderr.includes("ruby-lsp")) { + if (!stdout.includes("ruby-lsp")) { await asyncExec("gem install ruby-lsp", { cwd: this.workspaceFolder.uri.fsPath, env: this.ruby.env, From 5338a9ae0a4b104d120f0d2334fade771d0345fd Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Wed, 24 Apr 2024 22:27:45 +0800 Subject: [PATCH 039/189] Support go to definition for unknown receiver calls (#1961) Instead of providing no candidates for possible definitions on unknown receiver calls, we now provide 10 candidates (the exact number is subject to change in the future). This will allow the user to navigate to the definition of more methods without overwhelming them with too many candidates in some cases. --- lib/ruby_lsp/listeners/definition.rb | 13 +++- test/requests/definition_expectations_test.rb | 59 +++++++++++++++++++ 2 files changed, 69 insertions(+), 3 deletions(-) diff --git a/lib/ruby_lsp/listeners/definition.rb b/lib/ruby_lsp/listeners/definition.rb index 2ccdbf71ac..fefc3f0204 100644 --- a/lib/ruby_lsp/listeners/definition.rb +++ b/lib/ruby_lsp/listeners/definition.rb @@ -7,6 +7,8 @@ class Definition extend T::Sig include Requests::Support::Common + MAX_NUMBER_OF_DEFINITION_CANDIDATES_WITHOUT_RECEIVER = 10 + sig do params( response_builder: ResponseBuilders::CollectionResponseBuilder[Interface::Location], @@ -64,12 +66,17 @@ def on_constant_read_node_enter(node) sig { params(node: Prism::CallNode).void } def handle_method_definition(node) - return unless self_receiver?(node) - message = node.message return unless message - methods = @index.resolve_method(message, @nesting.join("::")) + methods = if self_receiver?(node) + @index.resolve_method(message, @nesting.join("::")) + 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 + @index[message]&.take(MAX_NUMBER_OF_DEFINITION_CANDIDATES_WITHOUT_RECEIVER) + end + return unless methods methods.each do |target_method| diff --git a/test/requests/definition_expectations_test.rb b/test/requests/definition_expectations_test.rb index b96d2ad90b..3296588809 100644 --- a/test/requests/definition_expectations_test.rb +++ b/test/requests/definition_expectations_test.rb @@ -344,6 +344,65 @@ def bar end end + def test_definitions_are_listed_for_method_with_unknown_receiver + source = <<~RUBY + # typed: false + + class A + def foo; end + end + + class B + def foo; end + end + + obj.foo + RUBY + + with_server(source) do |server, uri| + server.process_message( + id: 1, + method: "textDocument/definition", + params: { textDocument: { uri: uri }, position: { character: 4, line: 10 } }, + ) + response = server.pop_response.response + + assert_equal(2, response.size) + + range = response[0].attributes[:range].attributes + range_hash = { start: range[:start].to_hash, end: range[:end].to_hash } + assert_equal({ start: { line: 3, character: 2 }, end: { line: 3, character: 14 } }, range_hash) + + range = response[1].attributes[:range].attributes + range_hash = { start: range[:start].to_hash, end: range[:end].to_hash } + assert_equal({ start: { line: 7, character: 2 }, end: { line: 7, character: 14 } }, range_hash) + end + end + + def test_definitions_for_unknown_receiver_is_capped + source = +"# typed: false\n" + + 13.times do |i| + source << <<~RUBY + class Class#{i + 1} + def foo; end + end + RUBY + end + source << "\nobj.foo" + + with_server(source) do |server, uri| + server.process_message( + id: 1, + method: "textDocument/definition", + params: { textDocument: { uri: uri }, position: { character: 4, line: 41 } }, + ) + response = server.pop_response.response + + assert_equal(10, response.size) + end + end + private def create_definition_addon From 4567e90ed04bc39aafcfec17f696ecb194ffcc4a Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Wed, 24 Apr 2024 13:05:00 -0400 Subject: [PATCH 040/189] Use Prism v0.27.0 (#1963) * Use Prism v0.27.0 * Restore platforms --------- Co-authored-by: Andy Waite --- Gemfile.lock | 8 +- .../lib/ruby_indexer/collector.rb | 2 +- lib/ruby_lsp/document.rb | 6 +- lib/ruby_lsp/internal.rb | 8 - lib/ruby_lsp/listeners/document_link.rb | 2 +- lib/ruby_lsp/ruby_document.rb | 2 +- ruby-lsp.gemspec | 2 +- .../{prism@0.26.0.rbi => prism@0.27.0.rbi} | 7485 ++++++++++------- 8 files changed, 4368 insertions(+), 3147 deletions(-) rename sorbet/rbi/gems/{prism@0.26.0.rbi => prism@0.27.0.rbi} (86%) diff --git a/Gemfile.lock b/Gemfile.lock index 375f69c5ae..a6f47ae0bb 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ PATH specs: ruby-lsp (0.16.5) language_server-protocol (~> 3.17.0) - prism (>= 0.23.0, < 0.27) + prism (>= 0.23.0, < 0.28) sorbet-runtime (>= 0.5.10782) GEM @@ -45,14 +45,14 @@ GEM ast (~> 2.4.1) racc prettier_print (1.2.1) - prism (0.26.0) + prism (0.27.0) psych (5.1.2) stringio racc (1.7.3) rainbow (3.1.1) rake (13.2.1) - rbi (0.1.11) - prism (>= 0.18.0, < 0.27) + rbi (0.1.12) + prism (>= 0.18.0, < 0.28) sorbet-runtime (>= 0.5.9204) regexp_parser (2.9.0) reline (0.5.0) diff --git a/lib/ruby_indexer/lib/ruby_indexer/collector.rb b/lib/ruby_indexer/lib/ruby_indexer/collector.rb index a3cc1b64de..dab6b359d4 100644 --- a/lib/ruby_indexer/lib/ruby_indexer/collector.rb +++ b/lib/ruby_indexer/lib/ruby_indexer/collector.rb @@ -7,7 +7,7 @@ class Collector LEAVE_EVENT = T.let(Object.new.freeze, Object) - sig { params(index: Index, parse_result: Prism::ParseResult[Prism::ProgramNode], file_path: String).void } + sig { params(index: Index, parse_result: Prism::ParseResult, file_path: String).void } def initialize(index, parse_result, file_path) @index = index @file_path = file_path diff --git a/lib/ruby_lsp/document.rb b/lib/ruby_lsp/document.rb index 4d334c9d9a..b8b18de6a7 100644 --- a/lib/ruby_lsp/document.rb +++ b/lib/ruby_lsp/document.rb @@ -8,7 +8,7 @@ class Document abstract! - sig { returns(Prism::ParseResult[Prism::ProgramNode]) } + sig { returns(Prism::ParseResult) } attr_reader :parse_result sig { returns(String) } @@ -31,7 +31,7 @@ def initialize(source:, version:, uri:, encoding: Encoding::UTF_8) @version = T.let(version, Integer) @uri = T.let(uri, URI::Generic) @needs_parsing = T.let(true, T::Boolean) - @parse_result = T.let(parse, Prism::ParseResult[Prism::ProgramNode]) + @parse_result = T.let(parse, Prism::ParseResult) end sig { returns(Prism::ProgramNode) } @@ -93,7 +93,7 @@ def push_edits(edits, version:) @cache.clear end - sig { abstract.returns(Prism::ParseResult[Prism::ProgramNode]) } + sig { abstract.returns(Prism::ParseResult) } def parse; end sig { returns(T::Boolean) } diff --git a/lib/ruby_lsp/internal.rb b/lib/ruby_lsp/internal.rb index c0d9fcb113..7aa48b34fa 100644 --- a/lib/ruby_lsp/internal.rb +++ b/lib/ruby_lsp/internal.rb @@ -19,14 +19,6 @@ require "prism/visitor" require "language_server-protocol" -# Prism v0.26.0 introduced generics for ParseResult, but it causes some problems so the intention is to remove it. -# Once that is done, we can remove this patch. -module Prism - class ParseResult - extend T::Generic - end -end - require "ruby-lsp" require "ruby_lsp/base_server" require "ruby_indexer/ruby_indexer" diff --git a/lib/ruby_lsp/listeners/document_link.rb b/lib/ruby_lsp/listeners/document_link.rb index 422f8d70a6..f531407436 100644 --- a/lib/ruby_lsp/listeners/document_link.rb +++ b/lib/ruby_lsp/listeners/document_link.rb @@ -124,7 +124,7 @@ def extract_document_link(node) match = comment.location.slice.match(%r{source://.*#\d+$}) return unless match - uri = T.cast(URI(match[0]), URI::Source) + uri = T.cast(URI(T.must(match[0])), URI::Source) gem_version = resolve_version(uri) return if gem_version.nil? diff --git a/lib/ruby_lsp/ruby_document.rb b/lib/ruby_lsp/ruby_document.rb index 79ec56c5bd..7a4fd040b9 100644 --- a/lib/ruby_lsp/ruby_document.rb +++ b/lib/ruby_lsp/ruby_document.rb @@ -3,7 +3,7 @@ module RubyLsp class RubyDocument < Document - sig { override.returns(Prism::ParseResult[Prism::ProgramNode]) } + sig { override.returns(Prism::ParseResult) } def parse return @parse_result unless @needs_parsing diff --git a/ruby-lsp.gemspec b/ruby-lsp.gemspec index ffc9b072ec..7632cfdeb0 100644 --- a/ruby-lsp.gemspec +++ b/ruby-lsp.gemspec @@ -19,7 +19,7 @@ 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.27") + s.add_dependency("prism", ">= 0.23.0", "< 0.28") s.add_dependency("sorbet-runtime", ">= 0.5.10782") s.required_ruby_version = ">= 3.0" diff --git a/sorbet/rbi/gems/prism@0.26.0.rbi b/sorbet/rbi/gems/prism@0.27.0.rbi similarity index 86% rename from sorbet/rbi/gems/prism@0.26.0.rbi rename to sorbet/rbi/gems/prism@0.27.0.rbi index 05521696fc..36267480bf 100644 --- a/sorbet/rbi/gems/prism@0.26.0.rbi +++ b/sorbet/rbi/gems/prism@0.27.0.rbi @@ -49,7 +49,7 @@ module Prism def lex(*_arg0); end # :call-seq: - # Prism::lex_compat(source, **options) -> ParseResult + # Prism::lex_compat(source, **options) -> LexCompat::Result # # Returns a parse result whose value is an array of tokens that closely # resembles the return value of Ripper::lex. The main difference is that the @@ -58,12 +58,7 @@ module Prism # For supported options, see Prism::parse. # # source://prism//lib/prism.rb#47 - sig do - params( - source: String, - options: T::Hash[Symbol, T.untyped] - ).returns(Prism::ParseResult[T::Array[T.untyped]]) - end + sig { params(source: String, options: T::Hash[Symbol, T.untyped]).returns(Prism::LexCompat::Result) } def lex_compat(source, **options); end # Mirror the Prism.lex_file API by using the serialization API. @@ -86,7 +81,7 @@ module Prism # Load the serialized AST using the source as a reference into a tree. # # source://prism//lib/prism.rb#65 - sig { params(source: String, serialized: String).returns(Prism::ParseResult[Prism::ProgramNode]) } + sig { params(source: String, serialized: String).returns(Prism::ParseResult) } def load(source, serialized); end # Mirror the Prism.parse API by using the serialization API. @@ -159,6 +154,12 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node end def initialize(source, new_name, old_name, keyword_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#247 + def ===(other); end + # def accept: (Visitor visitor) -> void # # source://prism//lib/prism/node.rb#147 @@ -214,31 +215,40 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#199 + # source://prism//lib/prism/node.rb#207 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#194 + # source://prism//lib/prism/node.rb#202 sig { returns(String) } def keyword; end - # attr_reader keyword_loc: Location + # The location of the `alias` keyword. + # + # alias $foo $bar + # ^^^^^ # - # source://prism//lib/prism/node.rb#186 + # source://prism//lib/prism/node.rb#195 sig { returns(Prism::Location) } def keyword_loc; end - # attr_reader new_name: Prism::node + # Represents the new name of the global variable that can be used after aliasing. This can be either a global variable, a back reference, or a numbered reference. + # + # alias $foo $bar + # ^^^^ # - # source://prism//lib/prism/node.rb#180 + # source://prism//lib/prism/node.rb#183 sig { returns(Prism::Node) } def new_name; end - # attr_reader old_name: Prism::node + # Represents the old name of the global variable that could be used before aliasing. This can be either a global variable, a back reference, or a numbered reference. # - # source://prism//lib/prism/node.rb#183 + # alias $foo $bar + # ^^^^ + # + # source://prism//lib/prism/node.rb#189 sig { returns(Prism::Node) } def old_name; end @@ -257,7 +267,7 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#223 + # source://prism//lib/prism/node.rb#231 sig { override.returns(Symbol) } def type; end @@ -269,7 +279,7 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#233 + # source://prism//lib/prism/node.rb#241 def type; end end end @@ -279,13 +289,13 @@ end # alias foo bar # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#242 +# source://prism//lib/prism/node.rb#259 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#244 + # source://prism//lib/prism/node.rb#261 sig do params( source: Prism::Source, @@ -297,33 +307,39 @@ class Prism::AliasMethodNode < ::Prism::Node end def initialize(source, new_name, old_name, keyword_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#362 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#254 + # source://prism//lib/prism/node.rb#271 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#259 + # source://prism//lib/prism/node.rb#276 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#269 + # source://prism//lib/prism/node.rb#286 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#264 + # source://prism//lib/prism/node.rb#281 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#274 + # source://prism//lib/prism/node.rb#291 sig do params( new_name: Prism::Node, @@ -337,13 +353,13 @@ class Prism::AliasMethodNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#259 + # source://prism//lib/prism/node.rb#276 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#282 + # source://prism//lib/prism/node.rb#299 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -352,31 +368,31 @@ class Prism::AliasMethodNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#306 + # source://prism//lib/prism/node.rb#322 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#301 + # source://prism//lib/prism/node.rb#317 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#293 + # source://prism//lib/prism/node.rb#310 sig { returns(Prism::Location) } def keyword_loc; end # attr_reader new_name: Prism::node # - # source://prism//lib/prism/node.rb#287 + # source://prism//lib/prism/node.rb#304 sig { returns(Prism::Node) } def new_name; end # attr_reader old_name: Prism::node # - # source://prism//lib/prism/node.rb#290 + # source://prism//lib/prism/node.rb#307 sig { returns(Prism::Node) } def old_name; end @@ -395,7 +411,7 @@ class Prism::AliasMethodNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#330 + # source://prism//lib/prism/node.rb#346 sig { override.returns(Symbol) } def type; end @@ -407,7 +423,7 @@ class Prism::AliasMethodNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#340 + # source://prism//lib/prism/node.rb#356 def type; end end end @@ -417,13 +433,13 @@ end # foo => bar | baz # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#349 +# source://prism//lib/prism/node.rb#374 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#351 + # source://prism//lib/prism/node.rb#376 sig do params( source: Prism::Source, @@ -435,33 +451,39 @@ class Prism::AlternationPatternNode < ::Prism::Node end def initialize(source, left, right, operator_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#477 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#361 + # source://prism//lib/prism/node.rb#386 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#366 + # source://prism//lib/prism/node.rb#391 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#376 + # source://prism//lib/prism/node.rb#401 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#371 + # source://prism//lib/prism/node.rb#396 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#381 + # source://prism//lib/prism/node.rb#406 sig do params( left: Prism::Node, @@ -475,13 +497,13 @@ class Prism::AlternationPatternNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#366 + # source://prism//lib/prism/node.rb#391 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#389 + # source://prism//lib/prism/node.rb#414 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -490,31 +512,31 @@ class Prism::AlternationPatternNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#413 + # source://prism//lib/prism/node.rb#437 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader left: Prism::node # - # source://prism//lib/prism/node.rb#394 + # source://prism//lib/prism/node.rb#419 sig { returns(Prism::Node) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#408 + # source://prism//lib/prism/node.rb#432 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#400 + # source://prism//lib/prism/node.rb#425 sig { returns(Prism::Location) } def operator_loc; end # attr_reader right: Prism::node # - # source://prism//lib/prism/node.rb#397 + # source://prism//lib/prism/node.rb#422 sig { returns(Prism::Node) } def right; end @@ -533,7 +555,7 @@ class Prism::AlternationPatternNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#437 + # source://prism//lib/prism/node.rb#461 sig { override.returns(Symbol) } def type; end @@ -545,7 +567,7 @@ class Prism::AlternationPatternNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#447 + # source://prism//lib/prism/node.rb#471 def type; end end end @@ -555,13 +577,13 @@ end # left and right # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#456 +# source://prism//lib/prism/node.rb#489 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#458 + # source://prism//lib/prism/node.rb#491 sig do params( source: Prism::Source, @@ -573,33 +595,39 @@ class Prism::AndNode < ::Prism::Node end def initialize(source, left, right, operator_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#607 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#468 + # source://prism//lib/prism/node.rb#501 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#473 + # source://prism//lib/prism/node.rb#506 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#483 + # source://prism//lib/prism/node.rb#516 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#478 + # source://prism//lib/prism/node.rb#511 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#488 + # source://prism//lib/prism/node.rb#521 sig do params( left: Prism::Node, @@ -613,13 +641,13 @@ class Prism::AndNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#473 + # source://prism//lib/prism/node.rb#506 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#496 + # source://prism//lib/prism/node.rb#529 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -628,7 +656,7 @@ class Prism::AndNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#535 + # source://prism//lib/prism/node.rb#567 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end @@ -640,13 +668,13 @@ class Prism::AndNode < ::Prism::Node # 1 && 2 # ^ # - # source://prism//lib/prism/node.rb#507 + # source://prism//lib/prism/node.rb#540 sig { returns(Prism::Node) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#530 + # source://prism//lib/prism/node.rb#562 sig { returns(String) } def operator; end @@ -655,7 +683,7 @@ class Prism::AndNode < ::Prism::Node # left and right # ^^^ # - # source://prism//lib/prism/node.rb#522 + # source://prism//lib/prism/node.rb#555 sig { returns(Prism::Location) } def operator_loc; end @@ -667,7 +695,7 @@ class Prism::AndNode < ::Prism::Node # 1 and 2 # ^ # - # source://prism//lib/prism/node.rb#516 + # source://prism//lib/prism/node.rb#549 sig { returns(Prism::Node) } def right; end @@ -686,7 +714,7 @@ class Prism::AndNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#559 + # source://prism//lib/prism/node.rb#591 sig { override.returns(Symbol) } def type; end @@ -698,7 +726,7 @@ class Prism::AndNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#569 + # source://prism//lib/prism/node.rb#601 def type; end end end @@ -708,13 +736,13 @@ end # return foo, bar, baz # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#578 +# source://prism//lib/prism/node.rb#619 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#580 + # source://prism//lib/prism/node.rb#621 sig do params( source: Prism::Source, @@ -725,33 +753,39 @@ class Prism::ArgumentsNode < ::Prism::Node end def initialize(source, flags, arguments, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#713 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#589 + # source://prism//lib/prism/node.rb#630 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: Array[Prism::node] # - # source://prism//lib/prism/node.rb#626 + # source://prism//lib/prism/node.rb#667 sig { returns(T::Array[Prism::Node]) } def arguments; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#594 + # source://prism//lib/prism/node.rb#635 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#604 + # source://prism//lib/prism/node.rb#645 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#599 + # source://prism//lib/prism/node.rb#640 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end @@ -759,13 +793,13 @@ class Prism::ArgumentsNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#630 + # source://prism//lib/prism/node.rb#670 sig { returns(T::Boolean) } def contains_keyword_splat?; end # def copy: (?flags: Integer, ?arguments: Array[Prism::node], ?location: Location) -> ArgumentsNode # - # source://prism//lib/prism/node.rb#609 + # source://prism//lib/prism/node.rb#650 sig do params( flags: Integer, @@ -778,13 +812,13 @@ class Prism::ArgumentsNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#594 + # source://prism//lib/prism/node.rb#635 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, arguments: Array[Prism::node], location: Location } # - # source://prism//lib/prism/node.rb#617 + # source://prism//lib/prism/node.rb#658 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -793,7 +827,7 @@ class Prism::ArgumentsNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#635 + # source://prism//lib/prism/node.rb#675 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end @@ -812,15 +846,15 @@ class Prism::ArgumentsNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#657 + # source://prism//lib/prism/node.rb#697 sig { override.returns(Symbol) } def type; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#622 + # source://prism//lib/prism/node.rb#663 sig { returns(Integer) } def flags; end @@ -832,19 +866,19 @@ class Prism::ArgumentsNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#667 + # source://prism//lib/prism/node.rb#707 def type; end end end # Flags for arguments nodes. # -# source://prism//lib/prism/node.rb#18830 +# source://prism//lib/prism/node.rb#20337 module Prism::ArgumentsNodeFlags; end # if arguments contain keyword splat # -# source://prism//lib/prism/node.rb#18832 +# source://prism//lib/prism/node.rb#20339 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. @@ -852,13 +886,13 @@ Prism::ArgumentsNodeFlags::CONTAINS_KEYWORD_SPLAT = T.let(T.unsafe(nil), Integer # [1, 2, 3] # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#676 +# source://prism//lib/prism/node.rb#725 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#678 + # source://prism//lib/prism/node.rb#727 sig do params( source: Prism::Source, @@ -871,39 +905,50 @@ class Prism::ArrayNode < ::Prism::Node end def initialize(source, flags, elements, opening_loc, closing_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#869 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#689 + # source://prism//lib/prism/node.rb#738 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#694 + # source://prism//lib/prism/node.rb#743 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#766 + # source://prism//lib/prism/node.rb#824 sig { returns(T.nilable(String)) } def closing; end - # attr_reader closing_loc: Location? + # Represents the optional source location for the closing token. + # + # [1,2,3] # "]" + # %w[foo bar baz] # "]" + # %I(apple orange banana) # ")" + # foo = 1, 2, 3 # nil # - # source://prism//lib/prism/node.rb#742 + # source://prism//lib/prism/node.rb#801 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#704 + # source://prism//lib/prism/node.rb#753 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#699 + # source://prism//lib/prism/node.rb#748 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end @@ -911,13 +956,13 @@ class Prism::ArrayNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#756 + # source://prism//lib/prism/node.rb#814 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#709 + # source://prism//lib/prism/node.rb#758 sig do params( flags: Integer, @@ -932,19 +977,19 @@ class Prism::ArrayNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#694 + # source://prism//lib/prism/node.rb#743 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#717 + # source://prism//lib/prism/node.rb#766 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # attr_reader elements: Array[Prism::node] + # 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#726 + # source://prism//lib/prism/node.rb#775 sig { returns(T::Array[Prism::Node]) } def elements; end @@ -953,19 +998,24 @@ class Prism::ArrayNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#771 + # source://prism//lib/prism/node.rb#829 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#761 + # source://prism//lib/prism/node.rb#819 sig { returns(T.nilable(String)) } def opening; end - # attr_reader opening_loc: Location? + # Represents the optional source location for the opening token. + # + # [1,2,3] # "[" + # %w[foo bar baz] # "%w[" + # %I(apple orange banana) # "%I(" + # foo = 1, 2, 3 # nil # - # source://prism//lib/prism/node.rb#729 + # source://prism//lib/prism/node.rb#783 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end @@ -984,15 +1034,15 @@ class Prism::ArrayNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#795 + # source://prism//lib/prism/node.rb#853 sig { override.returns(Symbol) } def type; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#722 + # source://prism//lib/prism/node.rb#771 sig { returns(Integer) } def flags; end @@ -1004,19 +1054,19 @@ class Prism::ArrayNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#805 + # source://prism//lib/prism/node.rb#863 def type; end end end # Flags for array nodes. # -# source://prism//lib/prism/node.rb#18836 +# source://prism//lib/prism/node.rb#20343 module Prism::ArrayNodeFlags; end # if array contains splat nodes # -# source://prism//lib/prism/node.rb#18838 +# source://prism//lib/prism/node.rb#20345 Prism::ArrayNodeFlags::CONTAINS_SPLAT = T.let(T.unsafe(nil), Integer) # Represents an array pattern in pattern matching. @@ -1036,13 +1086,13 @@ Prism::ArrayNodeFlags::CONTAINS_SPLAT = T.let(T.unsafe(nil), Integer) # foo in Bar[1, 2, 3] # ^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#826 +# source://prism//lib/prism/node.rb#895 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#828 + # source://prism//lib/prism/node.rb#897 sig do params( source: Prism::Source, @@ -1057,51 +1107,57 @@ class Prism::ArrayPatternNode < ::Prism::Node end def initialize(source, constant, requireds, rest, posts, opening_loc, closing_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#1047 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#841 + # source://prism//lib/prism/node.rb#910 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#846 + # source://prism//lib/prism/node.rb#915 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#923 + # source://prism//lib/prism/node.rb#991 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#904 + # source://prism//lib/prism/node.rb#973 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#861 + # source://prism//lib/prism/node.rb#930 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#851 + # source://prism//lib/prism/node.rb#920 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader constant: Prism::node? # - # source://prism//lib/prism/node.rb#879 + # source://prism//lib/prism/node.rb#948 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#866 + # source://prism//lib/prism/node.rb#935 sig do params( constant: T.nilable(Prism::Node), @@ -1118,13 +1174,13 @@ class Prism::ArrayPatternNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#846 + # source://prism//lib/prism/node.rb#915 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#874 + # source://prism//lib/prism/node.rb#943 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -1133,37 +1189,37 @@ class Prism::ArrayPatternNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#928 + # source://prism//lib/prism/node.rb#996 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#918 + # source://prism//lib/prism/node.rb#986 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#891 + # source://prism//lib/prism/node.rb#960 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader posts: Array[Prism::node] # - # source://prism//lib/prism/node.rb#888 + # source://prism//lib/prism/node.rb#957 sig { returns(T::Array[Prism::Node]) } def posts; end # attr_reader requireds: Array[Prism::node] # - # source://prism//lib/prism/node.rb#882 + # source://prism//lib/prism/node.rb#951 sig { returns(T::Array[Prism::Node]) } def requireds; end # attr_reader rest: Prism::node? # - # source://prism//lib/prism/node.rb#885 + # source://prism//lib/prism/node.rb#954 sig { returns(T.nilable(Prism::Node)) } def rest; end @@ -1182,7 +1238,7 @@ class Prism::ArrayPatternNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#963 + # source://prism//lib/prism/node.rb#1031 sig { override.returns(Symbol) } def type; end @@ -1194,7 +1250,7 @@ class Prism::ArrayPatternNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#973 + # source://prism//lib/prism/node.rb#1041 def type; end end end @@ -1204,13 +1260,13 @@ end # { a => b } # ^^^^^^ # -# source://prism//lib/prism/node.rb#982 +# source://prism//lib/prism/node.rb#1064 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#984 + # source://prism//lib/prism/node.rb#1066 sig do params( source: Prism::Source, @@ -1222,33 +1278,39 @@ class Prism::AssocNode < ::Prism::Node end def initialize(source, key, value, operator_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#1191 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#994 + # source://prism//lib/prism/node.rb#1076 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#999 + # source://prism//lib/prism/node.rb#1081 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1009 + # source://prism//lib/prism/node.rb#1091 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1004 + # source://prism//lib/prism/node.rb#1086 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#1014 + # source://prism//lib/prism/node.rb#1096 sig do params( key: Prism::Node, @@ -1262,13 +1324,13 @@ class Prism::AssocNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#999 + # source://prism//lib/prism/node.rb#1081 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#1022 + # source://prism//lib/prism/node.rb#1104 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -1277,7 +1339,7 @@ class Prism::AssocNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#1070 + # source://prism//lib/prism/node.rb#1151 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end @@ -1292,13 +1354,13 @@ class Prism::AssocNode < ::Prism::Node # { def a; end => 1 } # ^^^^^^^^^^ # - # source://prism//lib/prism/node.rb#1036 + # source://prism//lib/prism/node.rb#1118 sig { returns(Prism::Node) } def key; end # def operator: () -> String? # - # source://prism//lib/prism/node.rb#1065 + # source://prism//lib/prism/node.rb#1146 sig { returns(T.nilable(String)) } def operator; end @@ -1307,7 +1369,7 @@ class Prism::AssocNode < ::Prism::Node # { foo => bar } # ^^ # - # source://prism//lib/prism/node.rb#1051 + # source://prism//lib/prism/node.rb#1133 sig { returns(T.nilable(Prism::Location)) } def operator_loc; end @@ -1326,7 +1388,7 @@ class Prism::AssocNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#1094 + # source://prism//lib/prism/node.rb#1175 sig { override.returns(Symbol) } def type; end @@ -1338,7 +1400,7 @@ class Prism::AssocNode < ::Prism::Node # { x: 1 } # ^ # - # source://prism//lib/prism/node.rb#1045 + # source://prism//lib/prism/node.rb#1127 sig { returns(Prism::Node) } def value; end @@ -1350,7 +1412,7 @@ class Prism::AssocNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#1104 + # source://prism//lib/prism/node.rb#1185 def type; end end end @@ -1360,13 +1422,13 @@ end # { **foo } # ^^^^^ # -# source://prism//lib/prism/node.rb#1113 +# source://prism//lib/prism/node.rb#1203 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#1115 + # source://prism//lib/prism/node.rb#1205 sig do params( source: Prism::Source, @@ -1377,33 +1439,39 @@ class Prism::AssocSplatNode < ::Prism::Node end def initialize(source, value, operator_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#1312 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1124 + # source://prism//lib/prism/node.rb#1214 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1129 + # source://prism//lib/prism/node.rb#1219 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1141 + # source://prism//lib/prism/node.rb#1231 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1134 + # source://prism//lib/prism/node.rb#1224 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#1146 + # source://prism//lib/prism/node.rb#1236 sig do params( value: T.nilable(Prism::Node), @@ -1416,13 +1484,13 @@ class Prism::AssocSplatNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1129 + # source://prism//lib/prism/node.rb#1219 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#1154 + # source://prism//lib/prism/node.rb#1244 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -1431,13 +1499,13 @@ class Prism::AssocSplatNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#1181 + # source://prism//lib/prism/node.rb#1270 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # - # source://prism//lib/prism/node.rb#1176 + # source://prism//lib/prism/node.rb#1265 sig { returns(String) } def operator; end @@ -1446,7 +1514,7 @@ class Prism::AssocSplatNode < ::Prism::Node # { **x } # ^^ # - # source://prism//lib/prism/node.rb#1168 + # source://prism//lib/prism/node.rb#1258 sig { returns(Prism::Location) } def operator_loc; end @@ -1465,7 +1533,7 @@ class Prism::AssocSplatNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#1207 + # source://prism//lib/prism/node.rb#1296 sig { override.returns(Symbol) } def type; end @@ -1474,7 +1542,7 @@ class Prism::AssocSplatNode < ::Prism::Node # { **foo } # ^^^ # - # source://prism//lib/prism/node.rb#1162 + # source://prism//lib/prism/node.rb#1252 sig { returns(T.nilable(Prism::Node)) } def value; end @@ -1486,7 +1554,7 @@ class Prism::AssocSplatNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#1217 + # source://prism//lib/prism/node.rb#1306 def type; end end end @@ -1501,56 +1569,62 @@ Prism::BACKEND = T.let(T.unsafe(nil), Symbol) # $' # ^^ # -# source://prism//lib/prism/node.rb#1226 +# source://prism//lib/prism/node.rb#1323 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#1228 + # source://prism//lib/prism/node.rb#1325 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 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1236 + # source://prism//lib/prism/node.rb#1333 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1241 + # source://prism//lib/prism/node.rb#1338 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1251 + # source://prism//lib/prism/node.rb#1348 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1246 + # source://prism//lib/prism/node.rb#1343 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#1256 + # source://prism//lib/prism/node.rb#1353 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#1241 + # source://prism//lib/prism/node.rb#1338 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#1264 + # source://prism//lib/prism/node.rb#1361 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -1559,7 +1633,7 @@ class Prism::BackReferenceReadNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#1277 + # source://prism//lib/prism/node.rb#1373 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end @@ -1569,7 +1643,7 @@ class Prism::BackReferenceReadNode < ::Prism::Node # # $+ # name `:$+` # - # source://prism//lib/prism/node.rb#1273 + # source://prism//lib/prism/node.rb#1370 sig { returns(Symbol) } def name; end @@ -1588,7 +1662,7 @@ class Prism::BackReferenceReadNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#1297 + # source://prism//lib/prism/node.rb#1393 sig { override.returns(Symbol) } def type; end @@ -1600,7 +1674,7 @@ class Prism::BackReferenceReadNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#1307 + # source://prism//lib/prism/node.rb#1403 def type; end end end @@ -1639,13 +1713,13 @@ end # end # ^^^^^ # -# source://prism//lib/prism/node.rb#1318 +# source://prism//lib/prism/node.rb#1421 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#1320 + # source://prism//lib/prism/node.rb#1423 sig do params( source: Prism::Source, @@ -1660,45 +1734,51 @@ class Prism::BeginNode < ::Prism::Node end def initialize(source, begin_keyword_loc, statements, rescue_clause, else_clause, ensure_clause, end_keyword_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#1587 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1333 + # source://prism//lib/prism/node.rb#1436 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def begin_keyword: () -> String? # - # source://prism//lib/prism/node.rb#1414 + # source://prism//lib/prism/node.rb#1516 sig { returns(T.nilable(String)) } def begin_keyword; end # attr_reader begin_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#1375 + # source://prism//lib/prism/node.rb#1478 sig { returns(T.nilable(Prism::Location)) } def begin_keyword_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1342 + # source://prism//lib/prism/node.rb#1445 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1357 + # source://prism//lib/prism/node.rb#1460 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1347 + # source://prism//lib/prism/node.rb#1450 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#1362 + # source://prism//lib/prism/node.rb#1465 sig do params( begin_keyword_loc: T.nilable(Prism::Location), @@ -1715,37 +1795,37 @@ class Prism::BeginNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1342 + # source://prism//lib/prism/node.rb#1445 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#1370 + # source://prism//lib/prism/node.rb#1473 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#1394 + # source://prism//lib/prism/node.rb#1497 sig { returns(T.nilable(Prism::ElseNode)) } def else_clause; end # def end_keyword: () -> String? # - # source://prism//lib/prism/node.rb#1419 + # source://prism//lib/prism/node.rb#1521 sig { returns(T.nilable(String)) } def end_keyword; end # attr_reader end_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#1400 + # source://prism//lib/prism/node.rb#1503 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end # attr_reader ensure_clause: EnsureNode? # - # source://prism//lib/prism/node.rb#1397 + # source://prism//lib/prism/node.rb#1500 sig { returns(T.nilable(Prism::EnsureNode)) } def ensure_clause; end @@ -1754,22 +1834,22 @@ class Prism::BeginNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#1424 + # source://prism//lib/prism/node.rb#1526 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader rescue_clause: RescueNode? # - # source://prism//lib/prism/node.rb#1391 + # source://prism//lib/prism/node.rb#1494 sig { returns(T.nilable(Prism::RescueNode)) } def rescue_clause; end - # source://prism//lib/prism/node.rb#1337 + # source://prism//lib/prism/node.rb#1440 def set_newline_flag(newline_marked); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#1388 + # source://prism//lib/prism/node.rb#1491 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -1788,7 +1868,7 @@ class Prism::BeginNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#1469 + # source://prism//lib/prism/node.rb#1571 sig { override.returns(Symbol) } def type; end @@ -1800,7 +1880,7 @@ class Prism::BeginNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#1479 + # source://prism//lib/prism/node.rb#1581 def type; end end end @@ -1810,13 +1890,13 @@ end # bar(&args) # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#1488 +# source://prism//lib/prism/node.rb#1602 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#1490 + # source://prism//lib/prism/node.rb#1604 sig do params( source: Prism::Source, @@ -1827,33 +1907,39 @@ class Prism::BlockArgumentNode < ::Prism::Node end def initialize(source, expression, operator_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#1705 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1499 + # source://prism//lib/prism/node.rb#1613 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1504 + # source://prism//lib/prism/node.rb#1618 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1516 + # source://prism//lib/prism/node.rb#1630 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1509 + # source://prism//lib/prism/node.rb#1623 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#1521 + # source://prism//lib/prism/node.rb#1635 sig do params( expression: T.nilable(Prism::Node), @@ -1866,19 +1952,19 @@ class Prism::BlockArgumentNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1504 + # source://prism//lib/prism/node.rb#1618 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#1529 + # source://prism//lib/prism/node.rb#1643 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#1534 + # source://prism//lib/prism/node.rb#1648 sig { returns(T.nilable(Prism::Node)) } def expression; end @@ -1887,19 +1973,19 @@ class Prism::BlockArgumentNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#1550 + # source://prism//lib/prism/node.rb#1663 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # - # source://prism//lib/prism/node.rb#1545 + # source://prism//lib/prism/node.rb#1658 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#1537 + # source://prism//lib/prism/node.rb#1651 sig { returns(Prism::Location) } def operator_loc; end @@ -1918,7 +2004,7 @@ class Prism::BlockArgumentNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#1576 + # source://prism//lib/prism/node.rb#1689 sig { override.returns(Symbol) } def type; end @@ -1930,7 +2016,7 @@ class Prism::BlockArgumentNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#1586 + # source://prism//lib/prism/node.rb#1699 def type; end end end @@ -1940,56 +2026,62 @@ end # a { |; b| } # ^ # -# source://prism//lib/prism/node.rb#1595 +# source://prism//lib/prism/node.rb#1716 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#1597 + # source://prism//lib/prism/node.rb#1718 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 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1606 + # source://prism//lib/prism/node.rb#1727 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1611 + # source://prism//lib/prism/node.rb#1732 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1621 + # source://prism//lib/prism/node.rb#1742 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1616 + # source://prism//lib/prism/node.rb#1737 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#1626 + # source://prism//lib/prism/node.rb#1747 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#1611 + # source://prism//lib/prism/node.rb#1732 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#1634 + # source://prism//lib/prism/node.rb#1755 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -1998,13 +2090,13 @@ class Prism::BlockLocalVariableNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#1652 + # source://prism//lib/prism/node.rb#1772 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#1643 + # source://prism//lib/prism/node.rb#1764 sig { returns(Symbol) } def name; end @@ -2012,7 +2104,7 @@ class Prism::BlockLocalVariableNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#1647 + # source://prism//lib/prism/node.rb#1767 sig { returns(T::Boolean) } def repeated_parameter?; end @@ -2031,15 +2123,15 @@ class Prism::BlockLocalVariableNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#1674 + # source://prism//lib/prism/node.rb#1794 sig { override.returns(Symbol) } def type; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#1639 + # source://prism//lib/prism/node.rb#1760 sig { returns(Integer) } def flags; end @@ -2051,7 +2143,7 @@ class Prism::BlockLocalVariableNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#1684 + # source://prism//lib/prism/node.rb#1804 def type; end end end @@ -2061,13 +2153,13 @@ end # [1, 2, 3].each { |i| puts x } # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#1693 +# source://prism//lib/prism/node.rb#1821 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#1695 + # source://prism//lib/prism/node.rb#1823 sig do params( source: Prism::Source, @@ -2081,51 +2173,57 @@ class Prism::BlockNode < ::Prism::Node end def initialize(source, locals, parameters, body, opening_loc, closing_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#1954 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1707 + # source://prism//lib/prism/node.rb#1835 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: Prism::node? # - # source://prism//lib/prism/node.rb#1749 + # source://prism//lib/prism/node.rb#1877 sig { returns(T.nilable(Prism::Node)) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1712 + # source://prism//lib/prism/node.rb#1840 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#1772 + # source://prism//lib/prism/node.rb#1899 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#1759 + # source://prism//lib/prism/node.rb#1887 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1725 + # source://prism//lib/prism/node.rb#1853 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1717 + # source://prism//lib/prism/node.rb#1845 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#1730 + # source://prism//lib/prism/node.rb#1858 sig do params( locals: T::Array[Symbol], @@ -2141,13 +2239,13 @@ class Prism::BlockNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1712 + # source://prism//lib/prism/node.rb#1840 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#1738 + # source://prism//lib/prism/node.rb#1866 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -2156,31 +2254,31 @@ class Prism::BlockNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#1777 + # source://prism//lib/prism/node.rb#1904 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#1743 + # source://prism//lib/prism/node.rb#1871 sig { returns(T::Array[Symbol]) } def locals; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#1767 + # source://prism//lib/prism/node.rb#1894 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#1752 + # source://prism//lib/prism/node.rb#1880 sig { returns(Prism::Location) } def opening_loc; end # attr_reader parameters: Prism::node? # - # source://prism//lib/prism/node.rb#1746 + # source://prism//lib/prism/node.rb#1874 sig { returns(T.nilable(Prism::Node)) } def parameters; end @@ -2199,7 +2297,7 @@ class Prism::BlockNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#1811 + # source://prism//lib/prism/node.rb#1938 sig { override.returns(Symbol) } def type; end @@ -2211,7 +2309,7 @@ class Prism::BlockNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#1821 + # source://prism//lib/prism/node.rb#1948 def type; end end end @@ -2222,13 +2320,13 @@ end # ^^ # end # -# source://prism//lib/prism/node.rb#1831 +# source://prism//lib/prism/node.rb#1970 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#1833 + # source://prism//lib/prism/node.rb#1972 sig do params( source: Prism::Source, @@ -2241,33 +2339,39 @@ class Prism::BlockParameterNode < ::Prism::Node end def initialize(source, flags, name, name_loc, operator_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#2097 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1844 + # source://prism//lib/prism/node.rb#1983 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1849 + # source://prism//lib/prism/node.rb#1988 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1859 + # source://prism//lib/prism/node.rb#1998 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1854 + # source://prism//lib/prism/node.rb#1993 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#1864 + # source://prism//lib/prism/node.rb#2003 sig do params( flags: Integer, @@ -2282,13 +2386,13 @@ class Prism::BlockParameterNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1849 + # source://prism//lib/prism/node.rb#1988 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#1872 + # source://prism//lib/prism/node.rb#2011 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -2297,31 +2401,31 @@ class Prism::BlockParameterNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#1915 + # source://prism//lib/prism/node.rb#2053 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol? # - # source://prism//lib/prism/node.rb#1881 + # source://prism//lib/prism/node.rb#2020 sig { returns(T.nilable(Symbol)) } def name; end # attr_reader name_loc: Location? # - # source://prism//lib/prism/node.rb#1884 + # source://prism//lib/prism/node.rb#2023 sig { returns(T.nilable(Prism::Location)) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#1910 + # source://prism//lib/prism/node.rb#2048 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#1897 + # source://prism//lib/prism/node.rb#2036 sig { returns(Prism::Location) } def operator_loc; end @@ -2329,7 +2433,7 @@ class Prism::BlockParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#1905 + # source://prism//lib/prism/node.rb#2043 sig { returns(T::Boolean) } def repeated_parameter?; end @@ -2348,15 +2452,15 @@ class Prism::BlockParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#1943 + # source://prism//lib/prism/node.rb#2081 sig { override.returns(Symbol) } def type; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#1877 + # source://prism//lib/prism/node.rb#2016 sig { returns(Integer) } def flags; end @@ -2368,7 +2472,7 @@ class Prism::BlockParameterNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#1953 + # source://prism//lib/prism/node.rb#2091 def type; end end end @@ -2382,13 +2486,13 @@ end # ^^^^^^^^^^^^^^^^^ # end # -# source://prism//lib/prism/node.rb#1966 +# source://prism//lib/prism/node.rb#2114 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#1968 + # source://prism//lib/prism/node.rb#2116 sig do params( source: Prism::Source, @@ -2401,45 +2505,51 @@ class Prism::BlockParametersNode < ::Prism::Node end def initialize(source, parameters, locals, opening_loc, closing_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#2249 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1979 + # source://prism//lib/prism/node.rb#2127 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1984 + # source://prism//lib/prism/node.rb#2132 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#2053 + # source://prism//lib/prism/node.rb#2200 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#2034 + # source://prism//lib/prism/node.rb#2182 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1997 + # source://prism//lib/prism/node.rb#2145 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1989 + # source://prism//lib/prism/node.rb#2137 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#2002 + # source://prism//lib/prism/node.rb#2150 sig do params( parameters: T.nilable(Prism::ParametersNode), @@ -2454,13 +2564,13 @@ class Prism::BlockParametersNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1984 + # source://prism//lib/prism/node.rb#2132 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#2010 + # source://prism//lib/prism/node.rb#2158 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -2469,31 +2579,31 @@ class Prism::BlockParametersNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#2058 + # source://prism//lib/prism/node.rb#2205 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader locals: Array[BlockLocalVariableNode] # - # source://prism//lib/prism/node.rb#2018 + # source://prism//lib/prism/node.rb#2166 sig { returns(T::Array[Prism::BlockLocalVariableNode]) } def locals; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#2048 + # source://prism//lib/prism/node.rb#2195 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#2021 + # source://prism//lib/prism/node.rb#2169 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader parameters: ParametersNode? # - # source://prism//lib/prism/node.rb#2015 + # source://prism//lib/prism/node.rb#2163 sig { returns(T.nilable(Prism::ParametersNode)) } def parameters; end @@ -2512,7 +2622,7 @@ class Prism::BlockParametersNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#2086 + # source://prism//lib/prism/node.rb#2233 sig { override.returns(Symbol) } def type; end @@ -2524,7 +2634,7 @@ class Prism::BlockParametersNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#2096 + # source://prism//lib/prism/node.rb#2243 def type; end end end @@ -2534,13 +2644,13 @@ end # break foo # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#2105 +# source://prism//lib/prism/node.rb#2263 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#2107 + # source://prism//lib/prism/node.rb#2265 sig do params( source: Prism::Source, @@ -2551,39 +2661,48 @@ class Prism::BreakNode < ::Prism::Node end def initialize(source, arguments, keyword_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#2372 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2116 + # source://prism//lib/prism/node.rb#2274 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # attr_reader arguments: ArgumentsNode? + # The arguments to the break statement, if present. These can be any [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). # - # source://prism//lib/prism/node.rb#2151 + # break foo + # ^^^ + # + # source://prism//lib/prism/node.rb#2312 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2121 + # 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#2133 + # source://prism//lib/prism/node.rb#2291 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#2126 + # source://prism//lib/prism/node.rb#2284 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#2138 + # source://prism//lib/prism/node.rb#2296 sig do params( arguments: T.nilable(Prism::ArgumentsNode), @@ -2596,13 +2715,13 @@ class Prism::BreakNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2121 + # 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) -> { arguments: ArgumentsNode?, keyword_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#2146 + # source://prism//lib/prism/node.rb#2304 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -2611,19 +2730,22 @@ class Prism::BreakNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#2167 + # source://prism//lib/prism/node.rb#2330 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#2162 + # source://prism//lib/prism/node.rb#2325 sig { returns(String) } def keyword; end - # attr_reader keyword_loc: Location + # The location of the `break` keyword. + # + # break foo + # ^^^^^ # - # source://prism//lib/prism/node.rb#2154 + # source://prism//lib/prism/node.rb#2318 sig { returns(Prism::Location) } def keyword_loc; end @@ -2642,7 +2764,7 @@ class Prism::BreakNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#2193 + # source://prism//lib/prism/node.rb#2356 sig { override.returns(Symbol) } def type; end @@ -2654,7 +2776,7 @@ class Prism::BreakNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#2203 + # source://prism//lib/prism/node.rb#2366 def type; end end end @@ -2664,13 +2786,13 @@ end # foo.bar &&= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#2212 +# source://prism//lib/prism/node.rb#2383 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#2214 + # source://prism//lib/prism/node.rb#2385 sig do params( source: Prism::Source, @@ -2687,9 +2809,15 @@ class Prism::CallAndWriteNode < ::Prism::Node end def initialize(source, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#2570 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2229 + # source://prism//lib/prism/node.rb#2400 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -2697,43 +2825,43 @@ class Prism::CallAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2325 + # source://prism//lib/prism/node.rb#2495 sig { returns(T::Boolean) } def attribute_write?; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#2335 + # source://prism//lib/prism/node.rb#2505 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#2272 + # source://prism//lib/prism/node.rb#2443 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2234 + # source://prism//lib/prism/node.rb#2405 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#2247 + # source://prism//lib/prism/node.rb#2418 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#2239 + # source://prism//lib/prism/node.rb#2410 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#2252 + # source://prism//lib/prism/node.rb#2423 sig do params( flags: Integer, @@ -2752,13 +2880,13 @@ class Prism::CallAndWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2234 + # source://prism//lib/prism/node.rb#2405 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#2260 + # source://prism//lib/prism/node.rb#2431 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -2769,49 +2897,49 @@ class Prism::CallAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2330 + # source://prism//lib/prism/node.rb#2500 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#2350 + # source://prism//lib/prism/node.rb#2520 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def message: () -> String? # - # source://prism//lib/prism/node.rb#2340 + # source://prism//lib/prism/node.rb#2510 sig { returns(T.nilable(String)) } def message; end # attr_reader message_loc: Location? # - # source://prism//lib/prism/node.rb#2285 + # source://prism//lib/prism/node.rb#2456 sig { returns(T.nilable(Prism::Location)) } def message_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#2345 + # source://prism//lib/prism/node.rb#2515 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#2304 + # source://prism//lib/prism/node.rb#2475 sig { returns(Prism::Location) } def operator_loc; end # attr_reader read_name: Symbol # - # source://prism//lib/prism/node.rb#2298 + # source://prism//lib/prism/node.rb#2469 sig { returns(Symbol) } def read_name; end # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#2269 + # source://prism//lib/prism/node.rb#2440 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -2819,7 +2947,7 @@ class Prism::CallAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2315 + # source://prism//lib/prism/node.rb#2485 sig { returns(T::Boolean) } def safe_navigation?; end @@ -2838,13 +2966,13 @@ class Prism::CallAndWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#2384 + # source://prism//lib/prism/node.rb#2554 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#2311 + # source://prism//lib/prism/node.rb#2482 sig { returns(Prism::Node) } def value; end @@ -2852,21 +2980,21 @@ class Prism::CallAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2320 + # source://prism//lib/prism/node.rb#2490 sig { returns(T::Boolean) } def variable_call?; end # attr_reader write_name: Symbol # - # source://prism//lib/prism/node.rb#2301 + # source://prism//lib/prism/node.rb#2472 sig { returns(Symbol) } def write_name; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#2265 + # source://prism//lib/prism/node.rb#2436 sig { returns(Integer) } def flags; end @@ -2878,7 +3006,7 @@ class Prism::CallAndWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#2394 + # source://prism//lib/prism/node.rb#2564 def type; end end end @@ -2903,13 +3031,13 @@ end # foo&.bar # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#2418 +# source://prism//lib/prism/node.rb#2602 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#2420 + # source://prism//lib/prism/node.rb#2604 sig do params( source: Prism::Source, @@ -2927,15 +3055,21 @@ class Prism::CallNode < ::Prism::Node end def initialize(source, flags, receiver, call_operator_loc, name, message_loc, opening_loc, arguments, closing_loc, block, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#2834 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2436 + # source://prism//lib/prism/node.rb#2620 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#2531 + # source://prism//lib/prism/node.rb#2715 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end @@ -2943,61 +3077,61 @@ class Prism::CallNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2561 + # source://prism//lib/prism/node.rb#2744 sig { returns(T::Boolean) } def attribute_write?; end # attr_reader block: Prism::node? # - # source://prism//lib/prism/node.rb#2547 + # source://prism//lib/prism/node.rb#2731 sig { returns(T.nilable(Prism::Node)) } def block; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#2571 + # source://prism//lib/prism/node.rb#2754 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#2489 + # source://prism//lib/prism/node.rb#2673 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2441 + # source://prism//lib/prism/node.rb#2625 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#2586 + # source://prism//lib/prism/node.rb#2769 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#2534 + # source://prism//lib/prism/node.rb#2718 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#2455 + # source://prism//lib/prism/node.rb#2639 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#2446 + # source://prism//lib/prism/node.rb#2630 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#2460 + # source://prism//lib/prism/node.rb#2644 sig do params( flags: Integer, @@ -3017,13 +3151,13 @@ class Prism::CallNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2441 + # source://prism//lib/prism/node.rb#2625 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#2468 + # source://prism//lib/prism/node.rb#2652 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -3034,43 +3168,43 @@ class Prism::CallNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2566 + # source://prism//lib/prism/node.rb#2749 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#2591 + # source://prism//lib/prism/node.rb#2774 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def message: () -> String? # - # source://prism//lib/prism/node.rb#2576 + # source://prism//lib/prism/node.rb#2759 sig { returns(T.nilable(String)) } def message; end # attr_reader message_loc: Location? # - # source://prism//lib/prism/node.rb#2505 + # source://prism//lib/prism/node.rb#2689 sig { returns(T.nilable(Prism::Location)) } def message_loc; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#2502 + # source://prism//lib/prism/node.rb#2686 sig { returns(Symbol) } def name; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#2581 + # source://prism//lib/prism/node.rb#2764 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#2518 + # source://prism//lib/prism/node.rb#2702 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end @@ -3085,7 +3219,7 @@ class Prism::CallNode < ::Prism::Node # foo + bar # ^^^ # - # source://prism//lib/prism/node.rb#2486 + # source://prism//lib/prism/node.rb#2670 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -3093,7 +3227,7 @@ class Prism::CallNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2551 + # source://prism//lib/prism/node.rb#2734 sig { returns(T::Boolean) } def safe_navigation?; end @@ -3112,7 +3246,7 @@ class Prism::CallNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#2635 + # source://prism//lib/prism/node.rb#2818 sig { override.returns(Symbol) } def type; end @@ -3120,15 +3254,15 @@ class Prism::CallNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2556 + # source://prism//lib/prism/node.rb#2739 sig { returns(T::Boolean) } def variable_call?; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#2473 + # source://prism//lib/prism/node.rb#2657 sig { returns(Integer) } def flags; end @@ -3140,34 +3274,34 @@ class Prism::CallNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#2645 + # source://prism//lib/prism/node.rb#2828 def type; end end end # Flags for call nodes. # -# source://prism//lib/prism/node.rb#18842 +# source://prism//lib/prism/node.rb#20349 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#18850 +# source://prism//lib/prism/node.rb#20357 Prism::CallNodeFlags::ATTRIBUTE_WRITE = T.let(T.unsafe(nil), Integer) # a call that ignores method visibility # -# source://prism//lib/prism/node.rb#18853 +# source://prism//lib/prism/node.rb#20360 Prism::CallNodeFlags::IGNORE_VISIBILITY = T.let(T.unsafe(nil), Integer) # &. operator # -# source://prism//lib/prism/node.rb#18844 +# source://prism//lib/prism/node.rb#20351 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#18847 +# source://prism//lib/prism/node.rb#20354 Prism::CallNodeFlags::VARIABLE_CALL = T.let(T.unsafe(nil), Integer) # Represents the use of an assignment operator on a call. @@ -3175,13 +3309,13 @@ Prism::CallNodeFlags::VARIABLE_CALL = T.let(T.unsafe(nil), Integer) # foo.bar += baz # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#2654 +# source://prism//lib/prism/node.rb#2852 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 # # @return [CallOperatorWriteNode] a new instance of CallOperatorWriteNode # - # source://prism//lib/prism/node.rb#2656 + # source://prism//lib/prism/node.rb#2854 sig do params( source: Prism::Source, @@ -3199,9 +3333,15 @@ class Prism::CallOperatorWriteNode < ::Prism::Node end def initialize(source, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator, 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 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2672 + # source://prism//lib/prism/node.rb#2870 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -3209,43 +3349,43 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2771 + # source://prism//lib/prism/node.rb#2968 sig { returns(T::Boolean) } def attribute_write?; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#2781 + # source://prism//lib/prism/node.rb#2978 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#2715 + # source://prism//lib/prism/node.rb#2913 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2677 + # source://prism//lib/prism/node.rb#2875 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#2690 + # source://prism//lib/prism/node.rb#2888 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#2682 + # source://prism//lib/prism/node.rb#2880 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 # - # source://prism//lib/prism/node.rb#2695 + # source://prism//lib/prism/node.rb#2893 sig do params( flags: Integer, @@ -3265,13 +3405,13 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2677 + # source://prism//lib/prism/node.rb#2875 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 } # - # source://prism//lib/prism/node.rb#2703 + # source://prism//lib/prism/node.rb#2901 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -3282,49 +3422,49 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2776 + # source://prism//lib/prism/node.rb#2973 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#2791 + # source://prism//lib/prism/node.rb#2988 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def message: () -> String? # - # source://prism//lib/prism/node.rb#2786 + # source://prism//lib/prism/node.rb#2983 sig { returns(T.nilable(String)) } def message; end # attr_reader message_loc: Location? # - # source://prism//lib/prism/node.rb#2728 + # source://prism//lib/prism/node.rb#2926 sig { returns(T.nilable(Prism::Location)) } def message_loc; end # attr_reader operator: Symbol # - # source://prism//lib/prism/node.rb#2747 + # source://prism//lib/prism/node.rb#2945 sig { returns(Symbol) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#2750 + # source://prism//lib/prism/node.rb#2948 sig { returns(Prism::Location) } def operator_loc; end # attr_reader read_name: Symbol # - # source://prism//lib/prism/node.rb#2741 + # source://prism//lib/prism/node.rb#2939 sig { returns(Symbol) } def read_name; end # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#2712 + # source://prism//lib/prism/node.rb#2910 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -3332,7 +3472,7 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2761 + # source://prism//lib/prism/node.rb#2958 sig { returns(T::Boolean) } def safe_navigation?; end @@ -3351,13 +3491,13 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#2826 + # source://prism//lib/prism/node.rb#3023 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#2757 + # source://prism//lib/prism/node.rb#2955 sig { returns(Prism::Node) } def value; end @@ -3365,21 +3505,21 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2766 + # source://prism//lib/prism/node.rb#2963 sig { returns(T::Boolean) } def variable_call?; end # attr_reader write_name: Symbol # - # source://prism//lib/prism/node.rb#2744 + # source://prism//lib/prism/node.rb#2942 sig { returns(Symbol) } def write_name; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#2708 + # source://prism//lib/prism/node.rb#2906 sig { returns(Integer) } def flags; end @@ -3391,7 +3531,7 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#2836 + # source://prism//lib/prism/node.rb#3033 def type; end end end @@ -3401,13 +3541,13 @@ end # foo.bar ||= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#2845 +# source://prism//lib/prism/node.rb#3057 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#2847 + # source://prism//lib/prism/node.rb#3059 sig do params( source: Prism::Source, @@ -3424,9 +3564,15 @@ class Prism::CallOrWriteNode < ::Prism::Node end def initialize(source, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#3244 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2862 + # source://prism//lib/prism/node.rb#3074 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -3434,43 +3580,43 @@ class Prism::CallOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2958 + # source://prism//lib/prism/node.rb#3169 sig { returns(T::Boolean) } def attribute_write?; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#2968 + # source://prism//lib/prism/node.rb#3179 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#2905 + # source://prism//lib/prism/node.rb#3117 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2867 + # source://prism//lib/prism/node.rb#3079 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#2880 + # source://prism//lib/prism/node.rb#3092 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#2872 + # source://prism//lib/prism/node.rb#3084 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#2885 + # source://prism//lib/prism/node.rb#3097 sig do params( flags: Integer, @@ -3489,13 +3635,13 @@ class Prism::CallOrWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2867 + # source://prism//lib/prism/node.rb#3079 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#2893 + # source://prism//lib/prism/node.rb#3105 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -3506,49 +3652,49 @@ class Prism::CallOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2963 + # source://prism//lib/prism/node.rb#3174 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#2983 + # source://prism//lib/prism/node.rb#3194 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def message: () -> String? # - # source://prism//lib/prism/node.rb#2973 + # source://prism//lib/prism/node.rb#3184 sig { returns(T.nilable(String)) } def message; end # attr_reader message_loc: Location? # - # source://prism//lib/prism/node.rb#2918 + # source://prism//lib/prism/node.rb#3130 sig { returns(T.nilable(Prism::Location)) } def message_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#2978 + # source://prism//lib/prism/node.rb#3189 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#2937 + # source://prism//lib/prism/node.rb#3149 sig { returns(Prism::Location) } def operator_loc; end # attr_reader read_name: Symbol # - # source://prism//lib/prism/node.rb#2931 + # source://prism//lib/prism/node.rb#3143 sig { returns(Symbol) } def read_name; end # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#2902 + # source://prism//lib/prism/node.rb#3114 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -3556,7 +3702,7 @@ class Prism::CallOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2948 + # source://prism//lib/prism/node.rb#3159 sig { returns(T::Boolean) } def safe_navigation?; end @@ -3575,13 +3721,13 @@ class Prism::CallOrWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#3017 + # source://prism//lib/prism/node.rb#3228 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#2944 + # source://prism//lib/prism/node.rb#3156 sig { returns(Prism::Node) } def value; end @@ -3589,21 +3735,21 @@ class Prism::CallOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2953 + # source://prism//lib/prism/node.rb#3164 sig { returns(T::Boolean) } def variable_call?; end # attr_reader write_name: Symbol # - # source://prism//lib/prism/node.rb#2934 + # source://prism//lib/prism/node.rb#3146 sig { returns(Symbol) } def write_name; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#2898 + # source://prism//lib/prism/node.rb#3110 sig { returns(Integer) } def flags; end @@ -3615,7 +3761,7 @@ class Prism::CallOrWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#3027 + # source://prism//lib/prism/node.rb#3238 def type; end end end @@ -3633,13 +3779,13 @@ end # for foo.bar in baz do end # ^^^^^^^ # -# source://prism//lib/prism/node.rb#3044 +# source://prism//lib/prism/node.rb#3269 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#3046 + # source://prism//lib/prism/node.rb#3271 sig do params( source: Prism::Source, @@ -3653,9 +3799,15 @@ class Prism::CallTargetNode < ::Prism::Node end def initialize(source, flags, receiver, call_operator_loc, name, message_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#3412 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3058 + # source://prism//lib/prism/node.rb#3283 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -3663,43 +3815,43 @@ class Prism::CallTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3126 + # source://prism//lib/prism/node.rb#3350 sig { returns(T::Boolean) } def attribute_write?; end # def call_operator: () -> String # - # source://prism//lib/prism/node.rb#3136 + # source://prism//lib/prism/node.rb#3360 sig { returns(String) } def call_operator; end # attr_reader call_operator_loc: Location # - # source://prism//lib/prism/node.rb#3098 + # source://prism//lib/prism/node.rb#3323 sig { returns(Prism::Location) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3063 + # source://prism//lib/prism/node.rb#3288 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3073 + # source://prism//lib/prism/node.rb#3298 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3068 + # source://prism//lib/prism/node.rb#3293 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#3078 + # source://prism//lib/prism/node.rb#3303 sig do params( flags: Integer, @@ -3715,13 +3867,13 @@ class Prism::CallTargetNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3063 + # source://prism//lib/prism/node.rb#3288 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#3086 + # source://prism//lib/prism/node.rb#3311 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -3732,37 +3884,37 @@ class Prism::CallTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3131 + # source://prism//lib/prism/node.rb#3355 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#3146 + # source://prism//lib/prism/node.rb#3370 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def message: () -> String # - # source://prism//lib/prism/node.rb#3141 + # source://prism//lib/prism/node.rb#3365 sig { returns(String) } def message; end # attr_reader message_loc: Location # - # source://prism//lib/prism/node.rb#3108 + # source://prism//lib/prism/node.rb#3333 sig { returns(Prism::Location) } def message_loc; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#3105 + # source://prism//lib/prism/node.rb#3330 sig { returns(Symbol) } def name; end # attr_reader receiver: Prism::node # - # source://prism//lib/prism/node.rb#3095 + # source://prism//lib/prism/node.rb#3320 sig { returns(Prism::Node) } def receiver; end @@ -3770,7 +3922,7 @@ class Prism::CallTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3116 + # source://prism//lib/prism/node.rb#3340 sig { returns(T::Boolean) } def safe_navigation?; end @@ -3789,7 +3941,7 @@ class Prism::CallTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#3172 + # source://prism//lib/prism/node.rb#3396 sig { override.returns(Symbol) } def type; end @@ -3797,15 +3949,15 @@ class Prism::CallTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3121 + # source://prism//lib/prism/node.rb#3345 sig { returns(T::Boolean) } def variable_call?; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#3091 + # source://prism//lib/prism/node.rb#3316 sig { returns(Integer) } def flags; end @@ -3817,7 +3969,7 @@ class Prism::CallTargetNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#3182 + # source://prism//lib/prism/node.rb#3406 def type; end end end @@ -3827,13 +3979,13 @@ end # foo => [bar => baz] # ^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3191 +# source://prism//lib/prism/node.rb#3426 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#3193 + # source://prism//lib/prism/node.rb#3428 sig do params( source: Prism::Source, @@ -3845,33 +3997,39 @@ class Prism::CapturePatternNode < ::Prism::Node end def initialize(source, value, target, operator_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#3529 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3203 + # source://prism//lib/prism/node.rb#3438 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3208 + # source://prism//lib/prism/node.rb#3443 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3218 + # source://prism//lib/prism/node.rb#3453 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3213 + # source://prism//lib/prism/node.rb#3448 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#3223 + # source://prism//lib/prism/node.rb#3458 sig do params( value: Prism::Node, @@ -3885,13 +4043,13 @@ class Prism::CapturePatternNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3208 + # source://prism//lib/prism/node.rb#3443 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#3231 + # source://prism//lib/prism/node.rb#3466 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -3900,25 +4058,25 @@ class Prism::CapturePatternNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#3255 + # source://prism//lib/prism/node.rb#3489 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # - # source://prism//lib/prism/node.rb#3250 + # source://prism//lib/prism/node.rb#3484 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#3242 + # source://prism//lib/prism/node.rb#3477 sig { returns(Prism::Location) } def operator_loc; end # attr_reader target: Prism::node # - # source://prism//lib/prism/node.rb#3239 + # source://prism//lib/prism/node.rb#3474 sig { returns(Prism::Node) } def target; end @@ -3937,13 +4095,13 @@ class Prism::CapturePatternNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#3279 + # source://prism//lib/prism/node.rb#3513 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#3236 + # source://prism//lib/prism/node.rb#3471 sig { returns(Prism::Node) } def value; end @@ -3955,7 +4113,7 @@ class Prism::CapturePatternNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#3289 + # source://prism//lib/prism/node.rb#3523 def type; end end end @@ -3967,13 +4125,13 @@ end # end # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3300 +# source://prism//lib/prism/node.rb#3543 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#3302 + # source://prism//lib/prism/node.rb#3545 sig do params( source: Prism::Source, @@ -3987,57 +4145,63 @@ class Prism::CaseMatchNode < ::Prism::Node end def initialize(source, predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#3677 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3314 + # source://prism//lib/prism/node.rb#3557 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def case_keyword: () -> String # - # source://prism//lib/prism/node.rb#3375 + # source://prism//lib/prism/node.rb#3617 sig { returns(String) } def case_keyword; end # attr_reader case_keyword_loc: Location # - # source://prism//lib/prism/node.rb#3360 + # source://prism//lib/prism/node.rb#3603 sig { returns(Prism::Location) } def case_keyword_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3319 + # source://prism//lib/prism/node.rb#3562 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3333 + # source://prism//lib/prism/node.rb#3576 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3324 + # source://prism//lib/prism/node.rb#3567 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader conditions: Array[Prism::node] # - # source://prism//lib/prism/node.rb#3354 + # source://prism//lib/prism/node.rb#3597 sig { returns(T::Array[Prism::Node]) } def conditions; end # attr_reader consequent: ElseNode? # - # source://prism//lib/prism/node.rb#3357 + # source://prism//lib/prism/node.rb#3600 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#3338 + # source://prism//lib/prism/node.rb#3581 sig do params( predicate: T.nilable(Prism::Node), @@ -4053,25 +4217,25 @@ class Prism::CaseMatchNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3319 + # source://prism//lib/prism/node.rb#3562 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#3346 + # source://prism//lib/prism/node.rb#3589 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#3380 + # source://prism//lib/prism/node.rb#3622 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#3367 + # source://prism//lib/prism/node.rb#3610 sig { returns(Prism::Location) } def end_keyword_loc; end @@ -4080,13 +4244,13 @@ class Prism::CaseMatchNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#3385 + # source://prism//lib/prism/node.rb#3627 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader predicate: Prism::node? # - # source://prism//lib/prism/node.rb#3351 + # source://prism//lib/prism/node.rb#3594 sig { returns(T.nilable(Prism::Node)) } def predicate; end @@ -4105,7 +4269,7 @@ class Prism::CaseMatchNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#3419 + # source://prism//lib/prism/node.rb#3661 sig { override.returns(Symbol) } def type; end @@ -4117,7 +4281,7 @@ class Prism::CaseMatchNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#3429 + # source://prism//lib/prism/node.rb#3671 def type; end end end @@ -4129,13 +4293,13 @@ end # end # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3440 +# source://prism//lib/prism/node.rb#3694 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#3442 + # source://prism//lib/prism/node.rb#3696 sig do params( source: Prism::Source, @@ -4149,57 +4313,63 @@ class Prism::CaseNode < ::Prism::Node end def initialize(source, predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#3828 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3454 + # source://prism//lib/prism/node.rb#3708 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def case_keyword: () -> String # - # source://prism//lib/prism/node.rb#3515 + # source://prism//lib/prism/node.rb#3768 sig { returns(String) } def case_keyword; end # attr_reader case_keyword_loc: Location # - # source://prism//lib/prism/node.rb#3500 + # source://prism//lib/prism/node.rb#3754 sig { returns(Prism::Location) } def case_keyword_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3459 + # source://prism//lib/prism/node.rb#3713 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3473 + # source://prism//lib/prism/node.rb#3727 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3464 + # source://prism//lib/prism/node.rb#3718 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader conditions: Array[Prism::node] # - # source://prism//lib/prism/node.rb#3494 + # source://prism//lib/prism/node.rb#3748 sig { returns(T::Array[Prism::Node]) } def conditions; end # attr_reader consequent: ElseNode? # - # source://prism//lib/prism/node.rb#3497 + # source://prism//lib/prism/node.rb#3751 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#3478 + # source://prism//lib/prism/node.rb#3732 sig do params( predicate: T.nilable(Prism::Node), @@ -4215,25 +4385,25 @@ class Prism::CaseNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3459 + # source://prism//lib/prism/node.rb#3713 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#3486 + # source://prism//lib/prism/node.rb#3740 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#3520 + # source://prism//lib/prism/node.rb#3773 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#3507 + # source://prism//lib/prism/node.rb#3761 sig { returns(Prism::Location) } def end_keyword_loc; end @@ -4242,13 +4412,13 @@ class Prism::CaseNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#3525 + # source://prism//lib/prism/node.rb#3778 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader predicate: Prism::node? # - # source://prism//lib/prism/node.rb#3491 + # source://prism//lib/prism/node.rb#3745 sig { returns(T.nilable(Prism::Node)) } def predicate; end @@ -4267,7 +4437,7 @@ class Prism::CaseNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#3559 + # source://prism//lib/prism/node.rb#3812 sig { override.returns(Symbol) } def type; end @@ -4279,7 +4449,7 @@ class Prism::CaseNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#3569 + # source://prism//lib/prism/node.rb#3822 def type; end end end @@ -4289,13 +4459,13 @@ end # class Foo end # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3578 +# source://prism//lib/prism/node.rb#3843 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#3580 + # source://prism//lib/prism/node.rb#3845 sig do params( source: Prism::Source, @@ -4312,57 +4482,63 @@ class Prism::ClassNode < ::Prism::Node end def initialize(source, locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, body, end_keyword_loc, name, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#4008 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3595 + # source://prism//lib/prism/node.rb#3860 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: Prism::node? # - # source://prism//lib/prism/node.rb#3661 + # source://prism//lib/prism/node.rb#3926 sig { returns(T.nilable(Prism::Node)) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3600 + # source://prism//lib/prism/node.rb#3865 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def class_keyword: () -> String # - # source://prism//lib/prism/node.rb#3675 + # source://prism//lib/prism/node.rb#3939 sig { returns(String) } def class_keyword; end # attr_reader class_keyword_loc: Location # - # source://prism//lib/prism/node.rb#3635 + # source://prism//lib/prism/node.rb#3900 sig { returns(Prism::Location) } def class_keyword_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3614 + # source://prism//lib/prism/node.rb#3879 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3605 + # source://prism//lib/prism/node.rb#3870 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader constant_path: Prism::node # - # source://prism//lib/prism/node.rb#3642 + # source://prism//lib/prism/node.rb#3907 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#3619 + # source://prism//lib/prism/node.rb#3884 sig do params( locals: T::Array[Symbol], @@ -4381,25 +4557,25 @@ class Prism::ClassNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3600 + # source://prism//lib/prism/node.rb#3865 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#3627 + # source://prism//lib/prism/node.rb#3892 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#3685 + # source://prism//lib/prism/node.rb#3949 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#3664 + # source://prism//lib/prism/node.rb#3929 sig { returns(Prism::Location) } def end_keyword_loc; end @@ -4408,37 +4584,37 @@ class Prism::ClassNode < ::Prism::Node # def inheritance_operator: () -> String? # - # source://prism//lib/prism/node.rb#3680 + # source://prism//lib/prism/node.rb#3944 sig { returns(T.nilable(String)) } def inheritance_operator; end # attr_reader inheritance_operator_loc: Location? # - # source://prism//lib/prism/node.rb#3645 + # source://prism//lib/prism/node.rb#3910 sig { returns(T.nilable(Prism::Location)) } def inheritance_operator_loc; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#3690 + # source://prism//lib/prism/node.rb#3954 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#3632 + # source://prism//lib/prism/node.rb#3897 sig { returns(T::Array[Symbol]) } def locals; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#3671 + # source://prism//lib/prism/node.rb#3936 sig { returns(Symbol) } def name; end # attr_reader superclass: Prism::node? # - # source://prism//lib/prism/node.rb#3658 + # source://prism//lib/prism/node.rb#3923 sig { returns(T.nilable(Prism::Node)) } def superclass; end @@ -4457,7 +4633,7 @@ class Prism::ClassNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#3728 + # source://prism//lib/prism/node.rb#3992 sig { override.returns(Symbol) } def type; end @@ -4469,7 +4645,7 @@ class Prism::ClassNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#3738 + # source://prism//lib/prism/node.rb#4002 def type; end end end @@ -4479,13 +4655,13 @@ end # @@target &&= value # ^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3747 +# source://prism//lib/prism/node.rb#4026 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#3749 + # source://prism//lib/prism/node.rb#4028 sig do params( source: Prism::Source, @@ -4498,33 +4674,39 @@ class Prism::ClassVariableAndWriteNode < ::Prism::Node 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#4137 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3760 + # source://prism//lib/prism/node.rb#4039 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3765 + # source://prism//lib/prism/node.rb#4044 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3775 + # source://prism//lib/prism/node.rb#4054 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3770 + # source://prism//lib/prism/node.rb#4049 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#3780 + # source://prism//lib/prism/node.rb#4059 sig do params( name: Symbol, @@ -4539,13 +4721,13 @@ class Prism::ClassVariableAndWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3765 + # source://prism//lib/prism/node.rb#4044 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#3788 + # source://prism//lib/prism/node.rb#4067 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -4557,31 +4739,31 @@ class Prism::ClassVariableAndWriteNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#3819 + # source://prism//lib/prism/node.rb#4097 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#3793 + # source://prism//lib/prism/node.rb#4072 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#3796 + # source://prism//lib/prism/node.rb#4075 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#3814 + # source://prism//lib/prism/node.rb#4092 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#3803 + # source://prism//lib/prism/node.rb#4082 sig { returns(Prism::Location) } def operator_loc; end @@ -4600,13 +4782,13 @@ class Prism::ClassVariableAndWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#3843 + # source://prism//lib/prism/node.rb#4121 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#3810 + # source://prism//lib/prism/node.rb#4089 sig { returns(Prism::Node) } def value; end @@ -4618,7 +4800,7 @@ class Prism::ClassVariableAndWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#3853 + # source://prism//lib/prism/node.rb#4131 def type; end end end @@ -4628,13 +4810,13 @@ end # @@target += value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3862 +# source://prism//lib/prism/node.rb#4150 class Prism::ClassVariableOperatorWriteNode < ::Prism::Node # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Symbol operator, Location location) -> void # # @return [ClassVariableOperatorWriteNode] a new instance of ClassVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#3864 + # source://prism//lib/prism/node.rb#4152 sig do params( source: Prism::Source, @@ -4648,33 +4830,39 @@ class Prism::ClassVariableOperatorWriteNode < ::Prism::Node end def initialize(source, name, name_loc, operator_loc, value, 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 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3876 + # source://prism//lib/prism/node.rb#4164 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3881 + # source://prism//lib/prism/node.rb#4169 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3891 + # source://prism//lib/prism/node.rb#4179 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3886 + # source://prism//lib/prism/node.rb#4174 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 # - # source://prism//lib/prism/node.rb#3896 + # source://prism//lib/prism/node.rb#4184 sig do params( name: Symbol, @@ -4690,13 +4878,13 @@ class Prism::ClassVariableOperatorWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3881 + # source://prism//lib/prism/node.rb#4169 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 } # - # source://prism//lib/prism/node.rb#3904 + # source://prism//lib/prism/node.rb#4192 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -4708,31 +4896,31 @@ class Prism::ClassVariableOperatorWriteNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#3933 + # source://prism//lib/prism/node.rb#4220 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#3909 + # source://prism//lib/prism/node.rb#4197 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#3912 + # source://prism//lib/prism/node.rb#4200 sig { returns(Prism::Location) } def name_loc; end # attr_reader operator: Symbol # - # source://prism//lib/prism/node.rb#3929 + # source://prism//lib/prism/node.rb#4217 sig { returns(Symbol) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#3919 + # source://prism//lib/prism/node.rb#4207 sig { returns(Prism::Location) } def operator_loc; end @@ -4751,13 +4939,13 @@ class Prism::ClassVariableOperatorWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#3958 + # source://prism//lib/prism/node.rb#4245 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#3926 + # source://prism//lib/prism/node.rb#4214 sig { returns(Prism::Node) } def value; end @@ -4769,7 +4957,7 @@ class Prism::ClassVariableOperatorWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#3968 + # source://prism//lib/prism/node.rb#4255 def type; end end end @@ -4779,13 +4967,13 @@ end # @@target ||= value # ^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3977 +# source://prism//lib/prism/node.rb#4275 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#3979 + # source://prism//lib/prism/node.rb#4277 sig do params( source: Prism::Source, @@ -4798,33 +4986,39 @@ class Prism::ClassVariableOrWriteNode < ::Prism::Node 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#4386 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3990 + # source://prism//lib/prism/node.rb#4288 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3995 + # source://prism//lib/prism/node.rb#4293 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4005 + # source://prism//lib/prism/node.rb#4303 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4000 + # source://prism//lib/prism/node.rb#4298 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#4010 + # source://prism//lib/prism/node.rb#4308 sig do params( name: Symbol, @@ -4839,13 +5033,13 @@ class Prism::ClassVariableOrWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3995 + # source://prism//lib/prism/node.rb#4293 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#4018 + # source://prism//lib/prism/node.rb#4316 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -4857,31 +5051,31 @@ class Prism::ClassVariableOrWriteNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#4049 + # source://prism//lib/prism/node.rb#4346 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4023 + # source://prism//lib/prism/node.rb#4321 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#4026 + # source://prism//lib/prism/node.rb#4324 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#4044 + # source://prism//lib/prism/node.rb#4341 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#4033 + # source://prism//lib/prism/node.rb#4331 sig { returns(Prism::Location) } def operator_loc; end @@ -4900,13 +5094,13 @@ class Prism::ClassVariableOrWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#4073 + # source://prism//lib/prism/node.rb#4370 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#4040 + # source://prism//lib/prism/node.rb#4338 sig { returns(Prism::Node) } def value; end @@ -4918,7 +5112,7 @@ class Prism::ClassVariableOrWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#4083 + # source://prism//lib/prism/node.rb#4380 def type; end end end @@ -4928,56 +5122,62 @@ end # @@foo # ^^^^^ # -# source://prism//lib/prism/node.rb#4092 +# source://prism//lib/prism/node.rb#4399 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#4094 + # source://prism//lib/prism/node.rb#4401 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 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4102 + # source://prism//lib/prism/node.rb#4409 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4107 + # source://prism//lib/prism/node.rb#4414 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4117 + # source://prism//lib/prism/node.rb#4424 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4112 + # source://prism//lib/prism/node.rb#4419 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#4122 + # source://prism//lib/prism/node.rb#4429 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#4107 + # source://prism//lib/prism/node.rb#4414 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#4130 + # source://prism//lib/prism/node.rb#4437 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -4986,7 +5186,7 @@ class Prism::ClassVariableReadNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#4143 + # source://prism//lib/prism/node.rb#4449 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end @@ -4996,7 +5196,7 @@ class Prism::ClassVariableReadNode < ::Prism::Node # # @@_test # name `:@@_test` # - # source://prism//lib/prism/node.rb#4139 + # source://prism//lib/prism/node.rb#4446 sig { returns(Symbol) } def name; end @@ -5015,7 +5215,7 @@ class Prism::ClassVariableReadNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#4163 + # source://prism//lib/prism/node.rb#4469 sig { override.returns(Symbol) } def type; end @@ -5027,7 +5227,7 @@ class Prism::ClassVariableReadNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#4173 + # source://prism//lib/prism/node.rb#4479 def type; end end end @@ -5037,56 +5237,62 @@ end # @@foo, @@bar = baz # ^^^^^ ^^^^^ # -# source://prism//lib/prism/node.rb#4182 +# source://prism//lib/prism/node.rb#4495 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#4184 + # source://prism//lib/prism/node.rb#4497 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 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4192 + # source://prism//lib/prism/node.rb#4505 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4197 + # source://prism//lib/prism/node.rb#4510 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4207 + # source://prism//lib/prism/node.rb#4520 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4202 + # source://prism//lib/prism/node.rb#4515 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#4212 + # source://prism//lib/prism/node.rb#4525 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#4197 + # source://prism//lib/prism/node.rb#4510 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#4220 + # source://prism//lib/prism/node.rb#4533 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -5095,13 +5301,13 @@ class Prism::ClassVariableTargetNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#4229 + # source://prism//lib/prism/node.rb#4541 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4225 + # source://prism//lib/prism/node.rb#4538 sig { returns(Symbol) } def name; end @@ -5120,7 +5326,7 @@ class Prism::ClassVariableTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#4249 + # source://prism//lib/prism/node.rb#4561 sig { override.returns(Symbol) } def type; end @@ -5132,7 +5338,7 @@ class Prism::ClassVariableTargetNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#4259 + # source://prism//lib/prism/node.rb#4571 def type; end end end @@ -5142,13 +5348,13 @@ end # @@foo = 1 # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4268 +# source://prism//lib/prism/node.rb#4587 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#4270 + # source://prism//lib/prism/node.rb#4589 sig do params( source: Prism::Source, @@ -5161,33 +5367,39 @@ class Prism::ClassVariableWriteNode < ::Prism::Node end def initialize(source, name, name_loc, value, operator_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#4714 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4281 + # source://prism//lib/prism/node.rb#4600 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4286 + # source://prism//lib/prism/node.rb#4605 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4296 + # source://prism//lib/prism/node.rb#4615 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4291 + # source://prism//lib/prism/node.rb#4610 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#4301 + # source://prism//lib/prism/node.rb#4620 sig do params( name: Symbol, @@ -5202,13 +5414,13 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4286 + # source://prism//lib/prism/node.rb#4605 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#4309 + # source://prism//lib/prism/node.rb#4628 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -5217,7 +5429,7 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#4357 + # source://prism//lib/prism/node.rb#4674 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end @@ -5227,7 +5439,7 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # # @@_test = :test # name `@@_test` # - # source://prism//lib/prism/node.rb#4318 + # source://prism//lib/prism/node.rb#4637 sig { returns(Symbol) } def name; end @@ -5236,13 +5448,13 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # @@foo = :bar # ^^^^^ # - # source://prism//lib/prism/node.rb#4324 + # source://prism//lib/prism/node.rb#4643 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#4352 + # source://prism//lib/prism/node.rb#4669 sig { returns(String) } def operator; end @@ -5251,7 +5463,7 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # @@foo = :bar # ^ # - # source://prism//lib/prism/node.rb#4344 + # source://prism//lib/prism/node.rb#4662 sig { returns(Prism::Location) } def operator_loc; end @@ -5270,12 +5482,11 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#4381 + # source://prism//lib/prism/node.rb#4698 sig { override.returns(Symbol) } def type; end - # The value to assign to the class variable. Can be any node that - # represents a non-void expression. + # The value to write to the class variable. This can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). # # @@foo = :bar # ^^^^ @@ -5283,7 +5494,7 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # @@_xyz = 123 # ^^^ # - # source://prism//lib/prism/node.rb#4338 + # source://prism//lib/prism/node.rb#4656 sig { returns(Prism::Node) } def value; end @@ -5295,7 +5506,7 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#4391 + # source://prism//lib/prism/node.rb#4708 def type; end end end @@ -5324,6 +5535,7 @@ class Prism::Comment # The location of this comment in the source. # # source://prism//lib/prism/parse_result.rb#290 + sig { returns(Prism::Location) } def location; end # Returns the content of the comment by slicing it from the source code. @@ -6281,13 +6493,13 @@ end # Target &&= value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4400 +# source://prism//lib/prism/node.rb#4727 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#4402 + # source://prism//lib/prism/node.rb#4729 sig do params( source: Prism::Source, @@ -6300,33 +6512,39 @@ class Prism::ConstantAndWriteNode < ::Prism::Node 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#4838 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4413 + # source://prism//lib/prism/node.rb#4740 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4418 + # source://prism//lib/prism/node.rb#4745 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4428 + # source://prism//lib/prism/node.rb#4755 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4423 + # source://prism//lib/prism/node.rb#4750 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#4433 + # source://prism//lib/prism/node.rb#4760 sig do params( name: Symbol, @@ -6341,13 +6559,13 @@ class Prism::ConstantAndWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4418 + # source://prism//lib/prism/node.rb#4745 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#4441 + # source://prism//lib/prism/node.rb#4768 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -6359,31 +6577,31 @@ class Prism::ConstantAndWriteNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#4472 + # source://prism//lib/prism/node.rb#4798 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4446 + # source://prism//lib/prism/node.rb#4773 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#4449 + # source://prism//lib/prism/node.rb#4776 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#4467 + # source://prism//lib/prism/node.rb#4793 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#4456 + # source://prism//lib/prism/node.rb#4783 sig { returns(Prism::Location) } def operator_loc; end @@ -6402,13 +6620,13 @@ class Prism::ConstantAndWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#4496 + # source://prism//lib/prism/node.rb#4822 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#4463 + # source://prism//lib/prism/node.rb#4790 sig { returns(Prism::Node) } def value; end @@ -6420,7 +6638,7 @@ class Prism::ConstantAndWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#4506 + # source://prism//lib/prism/node.rb#4832 def type; end end end @@ -6430,13 +6648,13 @@ end # Target += value # ^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4515 +# source://prism//lib/prism/node.rb#4851 class Prism::ConstantOperatorWriteNode < ::Prism::Node # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Symbol operator, Location location) -> void # # @return [ConstantOperatorWriteNode] a new instance of ConstantOperatorWriteNode # - # source://prism//lib/prism/node.rb#4517 + # source://prism//lib/prism/node.rb#4853 sig do params( source: Prism::Source, @@ -6450,33 +6668,39 @@ class Prism::ConstantOperatorWriteNode < ::Prism::Node end def initialize(source, name, name_loc, operator_loc, value, 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 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4529 + # source://prism//lib/prism/node.rb#4865 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4534 + # source://prism//lib/prism/node.rb#4870 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4544 + # source://prism//lib/prism/node.rb#4880 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4539 + # source://prism//lib/prism/node.rb#4875 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 # - # source://prism//lib/prism/node.rb#4549 + # source://prism//lib/prism/node.rb#4885 sig do params( name: Symbol, @@ -6492,13 +6716,13 @@ class Prism::ConstantOperatorWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4534 + # source://prism//lib/prism/node.rb#4870 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 } # - # source://prism//lib/prism/node.rb#4557 + # source://prism//lib/prism/node.rb#4893 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -6510,31 +6734,31 @@ class Prism::ConstantOperatorWriteNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#4586 + # source://prism//lib/prism/node.rb#4921 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4562 + # source://prism//lib/prism/node.rb#4898 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#4565 + # source://prism//lib/prism/node.rb#4901 sig { returns(Prism::Location) } def name_loc; end # attr_reader operator: Symbol # - # source://prism//lib/prism/node.rb#4582 + # source://prism//lib/prism/node.rb#4918 sig { returns(Symbol) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#4572 + # source://prism//lib/prism/node.rb#4908 sig { returns(Prism::Location) } def operator_loc; end @@ -6553,13 +6777,13 @@ class Prism::ConstantOperatorWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#4611 + # source://prism//lib/prism/node.rb#4946 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#4579 + # source://prism//lib/prism/node.rb#4915 sig { returns(Prism::Node) } def value; end @@ -6571,7 +6795,7 @@ class Prism::ConstantOperatorWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#4621 + # source://prism//lib/prism/node.rb#4956 def type; end end end @@ -6581,13 +6805,13 @@ end # Target ||= value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4630 +# source://prism//lib/prism/node.rb#4976 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#4632 + # source://prism//lib/prism/node.rb#4978 sig do params( source: Prism::Source, @@ -6600,33 +6824,39 @@ class Prism::ConstantOrWriteNode < ::Prism::Node 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#5087 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4643 + # source://prism//lib/prism/node.rb#4989 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4648 + # source://prism//lib/prism/node.rb#4994 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4658 + # source://prism//lib/prism/node.rb#5004 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4653 + # source://prism//lib/prism/node.rb#4999 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#4663 + # source://prism//lib/prism/node.rb#5009 sig do params( name: Symbol, @@ -6641,13 +6871,13 @@ class Prism::ConstantOrWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4648 + # source://prism//lib/prism/node.rb#4994 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#4671 + # source://prism//lib/prism/node.rb#5017 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -6659,31 +6889,31 @@ class Prism::ConstantOrWriteNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#4702 + # source://prism//lib/prism/node.rb#5047 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4676 + # source://prism//lib/prism/node.rb#5022 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#4679 + # source://prism//lib/prism/node.rb#5025 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#4697 + # source://prism//lib/prism/node.rb#5042 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#4686 + # source://prism//lib/prism/node.rb#5032 sig { returns(Prism::Location) } def operator_loc; end @@ -6702,13 +6932,13 @@ class Prism::ConstantOrWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#4726 + # source://prism//lib/prism/node.rb#5071 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#4693 + # source://prism//lib/prism/node.rb#5039 sig { returns(Prism::Node) } def value; end @@ -6720,7 +6950,7 @@ class Prism::ConstantOrWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#4736 + # source://prism//lib/prism/node.rb#5081 def type; end end end @@ -6730,13 +6960,13 @@ end # Parent::Child &&= value # ^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4745 +# source://prism//lib/prism/node.rb#5100 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#4747 + # source://prism//lib/prism/node.rb#5102 sig do params( source: Prism::Source, @@ -6748,33 +6978,39 @@ class Prism::ConstantPathAndWriteNode < ::Prism::Node end def initialize(source, target, operator_loc, value, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#5203 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4757 + # source://prism//lib/prism/node.rb#5112 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4762 + # source://prism//lib/prism/node.rb#5117 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4772 + # source://prism//lib/prism/node.rb#5127 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4767 + # source://prism//lib/prism/node.rb#5122 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#4777 + # source://prism//lib/prism/node.rb#5132 sig do params( target: Prism::ConstantPathNode, @@ -6788,13 +7024,13 @@ class Prism::ConstantPathAndWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4762 + # source://prism//lib/prism/node.rb#5117 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#4785 + # source://prism//lib/prism/node.rb#5140 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -6803,25 +7039,25 @@ class Prism::ConstantPathAndWriteNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#4809 + # source://prism//lib/prism/node.rb#5163 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # - # source://prism//lib/prism/node.rb#4804 + # source://prism//lib/prism/node.rb#5158 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#4793 + # source://prism//lib/prism/node.rb#5148 sig { returns(Prism::Location) } def operator_loc; end # attr_reader target: ConstantPathNode # - # source://prism//lib/prism/node.rb#4790 + # source://prism//lib/prism/node.rb#5145 sig { returns(Prism::ConstantPathNode) } def target; end @@ -6840,13 +7076,13 @@ class Prism::ConstantPathAndWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#4833 + # source://prism//lib/prism/node.rb#5187 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#4800 + # source://prism//lib/prism/node.rb#5155 sig { returns(Prism::Node) } def value; end @@ -6858,7 +7094,7 @@ class Prism::ConstantPathAndWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#4843 + # source://prism//lib/prism/node.rb#5197 def type; end end end @@ -6868,13 +7104,13 @@ end # Foo::Bar # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#4852 +# source://prism//lib/prism/node.rb#5215 class Prism::ConstantPathNode < ::Prism::Node # def initialize: (Prism::node? parent, ConstantReadNode | MissingNode child, Location delimiter_loc, Location location) -> void # # @return [ConstantPathNode] a new instance of ConstantPathNode # - # source://prism//lib/prism/node.rb#4854 + # source://prism//lib/prism/node.rb#5217 sig do params( source: Prism::Source, @@ -6886,39 +7122,55 @@ class Prism::ConstantPathNode < ::Prism::Node end def initialize(source, parent, child, delimiter_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 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4864 + # source://prism//lib/prism/node.rb#5227 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # attr_reader child: ConstantReadNode | MissingNode + # The right-hand node of the path. Always a `ConstantReadNode` in a + # valid Ruby syntax tree. + # + # ::Foo + # ^^^ + # + # self::Test + # ^^^^ + # + # a.b::C + # ^ # - # source://prism//lib/prism/node.rb#4903 + # source://prism//lib/prism/node.rb#5285 sig { returns(T.any(Prism::ConstantReadNode, Prism::MissingNode)) } def child; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4869 + # source://prism//lib/prism/node.rb#5232 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4882 + # source://prism//lib/prism/node.rb#5245 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4874 + # source://prism//lib/prism/node.rb#5237 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 # - # source://prism//lib/prism/node.rb#4887 + # source://prism//lib/prism/node.rb#5250 sig do params( parent: T.nilable(Prism::Node), @@ -6932,25 +7184,31 @@ class Prism::ConstantPathNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4869 + # source://prism//lib/prism/node.rb#5232 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 } # - # source://prism//lib/prism/node.rb#4895 + # source://prism//lib/prism/node.rb#5258 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#4914 + # source://prism//lib/prism/node.rb#5301 sig { returns(String) } def delimiter; end - # attr_reader delimiter_loc: Location + # The location of the `::` delimiter. + # + # ::Foo + # ^^ + # + # One::Two + # ^^ # - # source://prism//lib/prism/node.rb#4906 + # source://prism//lib/prism/node.rb#5294 sig { returns(Prism::Location) } def delimiter_loc; end @@ -6972,13 +7230,22 @@ class Prism::ConstantPathNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#4919 + # source://prism//lib/prism/node.rb#5306 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end - # attr_reader parent: Prism::node? + # The left-hand node of the path, if present. It can be `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). It will be `nil` when the constant lookup is at the root of the module tree. + # + # Foo::Bar + # ^^^ + # + # self::Test + # ^^^^ + # + # a.b::C + # ^^^ # - # source://prism//lib/prism/node.rb#4900 + # source://prism//lib/prism/node.rb#5272 sig { returns(T.nilable(Prism::Node)) } def parent; end @@ -6997,7 +7264,7 @@ class Prism::ConstantPathNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#4947 + # source://prism//lib/prism/node.rb#5334 sig { override.returns(Symbol) } def type; end @@ -7009,7 +7276,7 @@ class Prism::ConstantPathNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#4957 + # source://prism//lib/prism/node.rb#5344 def type; end end end @@ -7036,13 +7303,13 @@ class Prism::ConstantPathNode::MissingNodesInConstantPathError < ::StandardError # Parent::Child += value # ^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4966 +# source://prism//lib/prism/node.rb#5362 class Prism::ConstantPathOperatorWriteNode < ::Prism::Node # def initialize: (ConstantPathNode target, Location operator_loc, Prism::node value, Symbol operator, Location location) -> void # # @return [ConstantPathOperatorWriteNode] a new instance of ConstantPathOperatorWriteNode # - # source://prism//lib/prism/node.rb#4968 + # source://prism//lib/prism/node.rb#5364 sig do params( source: Prism::Source, @@ -7055,33 +7322,39 @@ class Prism::ConstantPathOperatorWriteNode < ::Prism::Node end def initialize(source, target, operator_loc, value, 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 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4979 + # source://prism//lib/prism/node.rb#5375 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4984 + # source://prism//lib/prism/node.rb#5380 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4994 + # source://prism//lib/prism/node.rb#5390 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4989 + # source://prism//lib/prism/node.rb#5385 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 # - # source://prism//lib/prism/node.rb#4999 + # source://prism//lib/prism/node.rb#5395 sig do params( target: Prism::ConstantPathNode, @@ -7096,13 +7369,13 @@ class Prism::ConstantPathOperatorWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4984 + # source://prism//lib/prism/node.rb#5380 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 } # - # source://prism//lib/prism/node.rb#5007 + # source://prism//lib/prism/node.rb#5403 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -7111,25 +7384,25 @@ class Prism::ConstantPathOperatorWriteNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#5029 + # source://prism//lib/prism/node.rb#5424 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader operator: Symbol # - # source://prism//lib/prism/node.rb#5025 + # source://prism//lib/prism/node.rb#5421 sig { returns(Symbol) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#5015 + # source://prism//lib/prism/node.rb#5411 sig { returns(Prism::Location) } def operator_loc; end # attr_reader target: ConstantPathNode # - # source://prism//lib/prism/node.rb#5012 + # source://prism//lib/prism/node.rb#5408 sig { returns(Prism::ConstantPathNode) } def target; end @@ -7148,13 +7421,13 @@ class Prism::ConstantPathOperatorWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#5054 + # source://prism//lib/prism/node.rb#5449 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#5022 + # source://prism//lib/prism/node.rb#5418 sig { returns(Prism::Node) } def value; end @@ -7166,7 +7439,7 @@ class Prism::ConstantPathOperatorWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#5064 + # source://prism//lib/prism/node.rb#5459 def type; end end end @@ -7176,13 +7449,13 @@ end # Parent::Child ||= value # ^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#5073 +# source://prism//lib/prism/node.rb#5478 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#5075 + # source://prism//lib/prism/node.rb#5480 sig do params( source: Prism::Source, @@ -7194,33 +7467,39 @@ class Prism::ConstantPathOrWriteNode < ::Prism::Node end def initialize(source, target, operator_loc, value, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#5581 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5085 + # source://prism//lib/prism/node.rb#5490 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5090 + # source://prism//lib/prism/node.rb#5495 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5100 + # source://prism//lib/prism/node.rb#5505 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5095 + # source://prism//lib/prism/node.rb#5500 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#5105 + # source://prism//lib/prism/node.rb#5510 sig do params( target: Prism::ConstantPathNode, @@ -7234,13 +7513,13 @@ class Prism::ConstantPathOrWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5090 + # source://prism//lib/prism/node.rb#5495 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#5113 + # source://prism//lib/prism/node.rb#5518 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -7249,25 +7528,25 @@ class Prism::ConstantPathOrWriteNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#5137 + # source://prism//lib/prism/node.rb#5541 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # - # source://prism//lib/prism/node.rb#5132 + # source://prism//lib/prism/node.rb#5536 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#5121 + # source://prism//lib/prism/node.rb#5526 sig { returns(Prism::Location) } def operator_loc; end # attr_reader target: ConstantPathNode # - # source://prism//lib/prism/node.rb#5118 + # source://prism//lib/prism/node.rb#5523 sig { returns(Prism::ConstantPathNode) } def target; end @@ -7286,13 +7565,13 @@ class Prism::ConstantPathOrWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#5161 + # source://prism//lib/prism/node.rb#5565 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#5128 + # source://prism//lib/prism/node.rb#5533 sig { returns(Prism::Node) } def value; end @@ -7304,7 +7583,7 @@ class Prism::ConstantPathOrWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#5171 + # source://prism//lib/prism/node.rb#5575 def type; end end end @@ -7314,13 +7593,13 @@ end # Foo::Foo, Bar::Bar = baz # ^^^^^^^^ ^^^^^^^^ # -# source://prism//lib/prism/node.rb#5180 +# source://prism//lib/prism/node.rb#5593 class Prism::ConstantPathTargetNode < ::Prism::Node # def initialize: (Prism::node? parent, ConstantReadNode | MissingNode child, Location delimiter_loc, Location location) -> void # # @return [ConstantPathTargetNode] a new instance of ConstantPathTargetNode # - # source://prism//lib/prism/node.rb#5182 + # source://prism//lib/prism/node.rb#5595 sig do params( source: Prism::Source, @@ -7332,39 +7611,45 @@ class Prism::ConstantPathTargetNode < ::Prism::Node end def initialize(source, parent, child, delimiter_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 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5192 + # source://prism//lib/prism/node.rb#5605 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader child: ConstantReadNode | MissingNode # - # source://prism//lib/prism/node.rb#5231 + # source://prism//lib/prism/node.rb#5644 sig { returns(T.any(Prism::ConstantReadNode, Prism::MissingNode)) } def child; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5197 + # source://prism//lib/prism/node.rb#5610 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5210 + # source://prism//lib/prism/node.rb#5623 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5202 + # source://prism//lib/prism/node.rb#5615 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 # - # source://prism//lib/prism/node.rb#5215 + # source://prism//lib/prism/node.rb#5628 sig do params( parent: T.nilable(Prism::Node), @@ -7378,25 +7663,25 @@ class Prism::ConstantPathTargetNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5197 + # source://prism//lib/prism/node.rb#5610 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 } # - # source://prism//lib/prism/node.rb#5223 + # source://prism//lib/prism/node.rb#5636 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#5242 + # source://prism//lib/prism/node.rb#5654 sig { returns(String) } def delimiter; end # attr_reader delimiter_loc: Location # - # source://prism//lib/prism/node.rb#5234 + # source://prism//lib/prism/node.rb#5647 sig { returns(Prism::Location) } def delimiter_loc; end @@ -7418,13 +7703,13 @@ class Prism::ConstantPathTargetNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#5247 + # source://prism//lib/prism/node.rb#5659 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader parent: Prism::node? # - # source://prism//lib/prism/node.rb#5228 + # source://prism//lib/prism/node.rb#5641 sig { returns(T.nilable(Prism::Node)) } def parent; end @@ -7443,7 +7728,7 @@ class Prism::ConstantPathTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#5275 + # source://prism//lib/prism/node.rb#5687 sig { override.returns(Symbol) } def type; end @@ -7455,7 +7740,7 @@ class Prism::ConstantPathTargetNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#5285 + # source://prism//lib/prism/node.rb#5697 def type; end end end @@ -7471,13 +7756,13 @@ end # ::Foo::Bar = 1 # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#5300 +# source://prism//lib/prism/node.rb#5721 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#5302 + # source://prism//lib/prism/node.rb#5723 sig do params( source: Prism::Source, @@ -7489,33 +7774,39 @@ class Prism::ConstantPathWriteNode < ::Prism::Node end def initialize(source, target, operator_loc, value, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#5836 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5312 + # source://prism//lib/prism/node.rb#5733 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5317 + # source://prism//lib/prism/node.rb#5738 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5327 + # source://prism//lib/prism/node.rb#5748 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5322 + # source://prism//lib/prism/node.rb#5743 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#5332 + # source://prism//lib/prism/node.rb#5753 sig do params( target: Prism::ConstantPathNode, @@ -7529,13 +7820,13 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5317 + # source://prism//lib/prism/node.rb#5738 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#5340 + # source://prism//lib/prism/node.rb#5761 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -7544,25 +7835,34 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#5364 + # source://prism//lib/prism/node.rb#5796 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # - # source://prism//lib/prism/node.rb#5359 + # source://prism//lib/prism/node.rb#5791 sig { returns(String) } def operator; end - # attr_reader operator_loc: Location + # The location of the `=` operator. + # + # ::ABC = 123 + # ^ # - # source://prism//lib/prism/node.rb#5348 + # source://prism//lib/prism/node.rb#5778 sig { returns(Prism::Location) } def operator_loc; end - # attr_reader target: ConstantPathNode + # A node representing the constant path being written to. + # + # Foo::Bar = 1 + # ^^^^^^^^ + # + # ::Foo = :abc + # ^^^^^ # - # source://prism//lib/prism/node.rb#5345 + # source://prism//lib/prism/node.rb#5772 sig { returns(Prism::ConstantPathNode) } def target; end @@ -7581,13 +7881,16 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#5388 + # source://prism//lib/prism/node.rb#5820 sig { override.returns(Symbol) } def type; end - # attr_reader value: Prism::node + # The value to write to the constant path. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). # - # source://prism//lib/prism/node.rb#5355 + # FOO::BAR = :abc + # ^^^^ + # + # source://prism//lib/prism/node.rb#5788 sig { returns(Prism::Node) } def value; end @@ -7599,7 +7902,7 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#5398 + # source://prism//lib/prism/node.rb#5830 def type; end end end @@ -7609,56 +7912,62 @@ end # Foo # ^^^ # -# source://prism//lib/prism/node.rb#5407 +# source://prism//lib/prism/node.rb#5848 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#5409 + # source://prism//lib/prism/node.rb#5850 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 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5417 + # source://prism//lib/prism/node.rb#5858 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5422 + # source://prism//lib/prism/node.rb#5863 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5432 + # source://prism//lib/prism/node.rb#5873 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5427 + # source://prism//lib/prism/node.rb#5868 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#5437 + # source://prism//lib/prism/node.rb#5878 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#5422 + # source://prism//lib/prism/node.rb#5863 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#5445 + # source://prism//lib/prism/node.rb#5886 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -7680,7 +7989,7 @@ class Prism::ConstantReadNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#5458 + # source://prism//lib/prism/node.rb#5898 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end @@ -7690,7 +7999,7 @@ class Prism::ConstantReadNode < ::Prism::Node # # SOME_CONSTANT # name `:SOME_CONSTANT` # - # source://prism//lib/prism/node.rb#5454 + # source://prism//lib/prism/node.rb#5895 sig { returns(Symbol) } def name; end @@ -7709,7 +8018,7 @@ class Prism::ConstantReadNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#5478 + # source://prism//lib/prism/node.rb#5918 sig { override.returns(Symbol) } def type; end @@ -7721,7 +8030,7 @@ class Prism::ConstantReadNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#5488 + # source://prism//lib/prism/node.rb#5928 def type; end end end @@ -7731,56 +8040,62 @@ end # Foo, Bar = baz # ^^^ ^^^ # -# source://prism//lib/prism/node.rb#5497 +# source://prism//lib/prism/node.rb#5944 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#5499 + # source://prism//lib/prism/node.rb#5946 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 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5507 + # source://prism//lib/prism/node.rb#5954 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5512 + # source://prism//lib/prism/node.rb#5959 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5522 + # source://prism//lib/prism/node.rb#5969 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5517 + # source://prism//lib/prism/node.rb#5964 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#5527 + # source://prism//lib/prism/node.rb#5974 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#5512 + # source://prism//lib/prism/node.rb#5959 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#5535 + # source://prism//lib/prism/node.rb#5982 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -7802,13 +8117,13 @@ class Prism::ConstantTargetNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#5544 + # source://prism//lib/prism/node.rb#5990 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#5540 + # source://prism//lib/prism/node.rb#5987 sig { returns(Symbol) } def name; end @@ -7827,7 +8142,7 @@ class Prism::ConstantTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#5564 + # source://prism//lib/prism/node.rb#6010 sig { override.returns(Symbol) } def type; end @@ -7839,7 +8154,7 @@ class Prism::ConstantTargetNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#5574 + # source://prism//lib/prism/node.rb#6020 def type; end end end @@ -7849,13 +8164,13 @@ end # Foo = 1 # ^^^^^^^ # -# source://prism//lib/prism/node.rb#5583 +# source://prism//lib/prism/node.rb#6036 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#5585 + # source://prism//lib/prism/node.rb#6038 sig do params( source: Prism::Source, @@ -7868,33 +8183,39 @@ class Prism::ConstantWriteNode < ::Prism::Node end def initialize(source, name, name_loc, value, operator_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#6163 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5596 + # source://prism//lib/prism/node.rb#6049 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5601 + # source://prism//lib/prism/node.rb#6054 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5611 + # source://prism//lib/prism/node.rb#6064 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5606 + # source://prism//lib/prism/node.rb#6059 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#5616 + # source://prism//lib/prism/node.rb#6069 sig do params( name: Symbol, @@ -7909,13 +8230,13 @@ class Prism::ConstantWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5601 + # source://prism//lib/prism/node.rb#6054 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#5624 + # source://prism//lib/prism/node.rb#6077 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -7937,31 +8258,41 @@ class Prism::ConstantWriteNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#5655 + # source://prism//lib/prism/node.rb#6123 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end - # attr_reader name: Symbol + # The name of the [constant](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#constants). # - # source://prism//lib/prism/node.rb#5629 + # Foo = :bar # name `:Foo` + # + # XYZ = 1 # name `:XYZ` + # + # source://prism//lib/prism/node.rb#6086 sig { returns(Symbol) } def name; end - # attr_reader name_loc: Location + # The location of the constant name. + # + # FOO = 1 + # ^^^ # - # source://prism//lib/prism/node.rb#5632 + # source://prism//lib/prism/node.rb#6092 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#5650 + # source://prism//lib/prism/node.rb#6118 sig { returns(String) } def operator; end - # attr_reader operator_loc: Location + # The location of the `=` operator. + # + # FOO = :bar + # ^ # - # source://prism//lib/prism/node.rb#5642 + # source://prism//lib/prism/node.rb#6111 sig { returns(Prism::Location) } def operator_loc; end @@ -7980,13 +8311,19 @@ class Prism::ConstantWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#5679 + # source://prism//lib/prism/node.rb#6147 sig { override.returns(Symbol) } def type; end - # attr_reader value: Prism::node + # The value to write to the constant. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # FOO = :bar + # ^^^^ # - # source://prism//lib/prism/node.rb#5639 + # MyClass = Class.new + # ^^^^^^^^^ + # + # source://prism//lib/prism/node.rb#6105 sig { returns(Prism::Node) } def value; end @@ -7998,7 +8335,7 @@ class Prism::ConstantWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#5689 + # source://prism//lib/prism/node.rb#6157 def type; end end end @@ -8944,13 +9281,13 @@ end # end # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#5699 +# source://prism//lib/prism/node.rb#6177 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#5701 + # source://prism//lib/prism/node.rb#6179 sig do params( source: Prism::Source, @@ -8971,39 +9308,45 @@ class Prism::DefNode < ::Prism::Node end def initialize(source, name, name_loc, receiver, parameters, body, locals, def_keyword_loc, operator_loc, lparen_loc, rparen_loc, equal_loc, end_keyword_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#6421 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5720 + # source://prism//lib/prism/node.rb#6198 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: Prism::node? # - # source://prism//lib/prism/node.rb#5773 + # source://prism//lib/prism/node.rb#6251 sig { returns(T.nilable(Prism::Node)) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5725 + # source://prism//lib/prism/node.rb#6203 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5739 + # source://prism//lib/prism/node.rb#6217 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5730 + # source://prism//lib/prism/node.rb#6208 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#5744 + # source://prism//lib/prism/node.rb#6222 sig do params( name: Symbol, @@ -9026,49 +9369,49 @@ class Prism::DefNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5725 + # source://prism//lib/prism/node.rb#6203 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#5752 + # source://prism//lib/prism/node.rb#6230 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#5852 + # source://prism//lib/prism/node.rb#6329 sig { returns(String) } def def_keyword; end # attr_reader def_keyword_loc: Location # - # source://prism//lib/prism/node.rb#5779 + # source://prism//lib/prism/node.rb#6257 sig { returns(Prism::Location) } def def_keyword_loc; end # def end_keyword: () -> String? # - # source://prism//lib/prism/node.rb#5877 + # source://prism//lib/prism/node.rb#6354 sig { returns(T.nilable(String)) } def end_keyword; end # attr_reader end_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#5838 + # source://prism//lib/prism/node.rb#6316 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end # def equal: () -> String? # - # source://prism//lib/prism/node.rb#5872 + # source://prism//lib/prism/node.rb#6349 sig { returns(T.nilable(String)) } def equal; end # attr_reader equal_loc: Location? # - # source://prism//lib/prism/node.rb#5825 + # source://prism//lib/prism/node.rb#6303 sig { returns(T.nilable(Prism::Location)) } def equal_loc; end @@ -9077,73 +9420,73 @@ class Prism::DefNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#5882 + # source://prism//lib/prism/node.rb#6359 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#5776 + # source://prism//lib/prism/node.rb#6254 sig { returns(T::Array[Symbol]) } def locals; end # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#5862 + # source://prism//lib/prism/node.rb#6339 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#5799 + # source://prism//lib/prism/node.rb#6277 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#5757 + # source://prism//lib/prism/node.rb#6235 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#5760 + # source://prism//lib/prism/node.rb#6238 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String? # - # source://prism//lib/prism/node.rb#5857 + # source://prism//lib/prism/node.rb#6334 sig { returns(T.nilable(String)) } def operator; end # attr_reader operator_loc: Location? # - # source://prism//lib/prism/node.rb#5786 + # source://prism//lib/prism/node.rb#6264 sig { returns(T.nilable(Prism::Location)) } def operator_loc; end # attr_reader parameters: ParametersNode? # - # source://prism//lib/prism/node.rb#5770 + # source://prism//lib/prism/node.rb#6248 sig { returns(T.nilable(Prism::ParametersNode)) } def parameters; end # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#5767 + # source://prism//lib/prism/node.rb#6245 sig { returns(T.nilable(Prism::Node)) } def receiver; end # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#5867 + # source://prism//lib/prism/node.rb#6344 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#5812 + # source://prism//lib/prism/node.rb#6290 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end @@ -9162,7 +9505,7 @@ class Prism::DefNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#5928 + # source://prism//lib/prism/node.rb#6405 sig { override.returns(Symbol) } def type; end @@ -9174,7 +9517,7 @@ class Prism::DefNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#5938 + # source://prism//lib/prism/node.rb#6415 def type; end end end @@ -9184,13 +9527,13 @@ end # defined?(a) # ^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#5947 +# source://prism//lib/prism/node.rb#6443 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#5949 + # source://prism//lib/prism/node.rb#6445 sig do params( source: Prism::Source, @@ -9203,33 +9546,39 @@ class Prism::DefinedNode < ::Prism::Node end def initialize(source, lparen_loc, value, rparen_loc, keyword_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#6580 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5960 + # source://prism//lib/prism/node.rb#6456 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5965 + # source://prism//lib/prism/node.rb#6461 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5975 + # source://prism//lib/prism/node.rb#6471 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5970 + # source://prism//lib/prism/node.rb#6466 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#5980 + # source://prism//lib/prism/node.rb#6476 sig do params( lparen_loc: T.nilable(Prism::Location), @@ -9244,13 +9593,13 @@ class Prism::DefinedNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5965 + # source://prism//lib/prism/node.rb#6461 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#5988 + # source://prism//lib/prism/node.rb#6484 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -9259,43 +9608,43 @@ class Prism::DefinedNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#6045 + # source://prism//lib/prism/node.rb#6540 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#6040 + # source://prism//lib/prism/node.rb#6535 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#6022 + # source://prism//lib/prism/node.rb#6518 sig { returns(Prism::Location) } def keyword_loc; end # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#6030 + # source://prism//lib/prism/node.rb#6525 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#5993 + # source://prism//lib/prism/node.rb#6489 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#6035 + # source://prism//lib/prism/node.rb#6530 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#6009 + # source://prism//lib/prism/node.rb#6505 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end @@ -9314,13 +9663,13 @@ class Prism::DefinedNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#6069 + # source://prism//lib/prism/node.rb#6564 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#6006 + # source://prism//lib/prism/node.rb#6502 sig { returns(Prism::Node) } def value; end @@ -9332,7 +9681,7 @@ class Prism::DefinedNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#6079 + # source://prism//lib/prism/node.rb#6574 def type; end end end @@ -12309,13 +12658,13 @@ end # if a then b else c end # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#6088 +# source://prism//lib/prism/node.rb#6593 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#6090 + # source://prism//lib/prism/node.rb#6595 sig do params( source: Prism::Source, @@ -12327,33 +12676,39 @@ class Prism::ElseNode < ::Prism::Node end def initialize(source, else_keyword_loc, statements, end_keyword_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#6716 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6100 + # source://prism//lib/prism/node.rb#6605 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6105 + # source://prism//lib/prism/node.rb#6610 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6117 + # source://prism//lib/prism/node.rb#6622 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6110 + # source://prism//lib/prism/node.rb#6615 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#6122 + # source://prism//lib/prism/node.rb#6627 sig do params( else_keyword_loc: Prism::Location, @@ -12367,37 +12722,37 @@ class Prism::ElseNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6105 + # source://prism//lib/prism/node.rb#6610 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#6130 + # source://prism//lib/prism/node.rb#6635 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#6159 + # source://prism//lib/prism/node.rb#6663 sig { returns(String) } def else_keyword; end # attr_reader else_keyword_loc: Location # - # source://prism//lib/prism/node.rb#6135 + # source://prism//lib/prism/node.rb#6640 sig { returns(Prism::Location) } def else_keyword_loc; end # def end_keyword: () -> String? # - # source://prism//lib/prism/node.rb#6164 + # source://prism//lib/prism/node.rb#6668 sig { returns(T.nilable(String)) } def end_keyword; end # attr_reader end_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#6145 + # source://prism//lib/prism/node.rb#6650 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end @@ -12406,13 +12761,13 @@ class Prism::ElseNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#6169 + # source://prism//lib/prism/node.rb#6673 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#6142 + # source://prism//lib/prism/node.rb#6647 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -12431,7 +12786,7 @@ class Prism::ElseNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#6196 + # source://prism//lib/prism/node.rb#6700 sig { override.returns(Symbol) } def type; end @@ -12443,7 +12798,7 @@ class Prism::ElseNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#6206 + # source://prism//lib/prism/node.rb#6710 def type; end end end @@ -12473,13 +12828,13 @@ end # "foo #{bar}" # ^^^^^^ # -# source://prism//lib/prism/node.rb#6215 +# source://prism//lib/prism/node.rb#6728 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#6217 + # source://prism//lib/prism/node.rb#6730 sig do params( source: Prism::Source, @@ -12491,45 +12846,51 @@ class Prism::EmbeddedStatementsNode < ::Prism::Node end def initialize(source, opening_loc, statements, closing_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#6845 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6227 + # source://prism//lib/prism/node.rb#6740 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6232 + # source://prism//lib/prism/node.rb#6745 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#6285 + # source://prism//lib/prism/node.rb#6797 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#6272 + # source://prism//lib/prism/node.rb#6785 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6244 + # source://prism//lib/prism/node.rb#6757 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6237 + # source://prism//lib/prism/node.rb#6750 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#6249 + # source://prism//lib/prism/node.rb#6762 sig do params( opening_loc: Prism::Location, @@ -12543,13 +12904,13 @@ class Prism::EmbeddedStatementsNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6232 + # source://prism//lib/prism/node.rb#6745 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#6257 + # source://prism//lib/prism/node.rb#6770 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -12558,25 +12919,25 @@ class Prism::EmbeddedStatementsNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#6290 + # source://prism//lib/prism/node.rb#6802 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String # - # source://prism//lib/prism/node.rb#6280 + # source://prism//lib/prism/node.rb#6792 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#6262 + # source://prism//lib/prism/node.rb#6775 sig { returns(Prism::Location) } def opening_loc; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#6269 + # source://prism//lib/prism/node.rb#6782 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -12595,7 +12956,7 @@ class Prism::EmbeddedStatementsNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#6317 + # source://prism//lib/prism/node.rb#6829 sig { override.returns(Symbol) } def type; end @@ -12607,7 +12968,7 @@ class Prism::EmbeddedStatementsNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#6327 + # source://prism//lib/prism/node.rb#6839 def type; end end end @@ -12617,13 +12978,13 @@ end # "foo #@bar" # ^^^^^ # -# source://prism//lib/prism/node.rb#6336 +# source://prism//lib/prism/node.rb#6857 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#6338 + # source://prism//lib/prism/node.rb#6859 sig do params( source: Prism::Source, @@ -12634,33 +12995,39 @@ class Prism::EmbeddedVariableNode < ::Prism::Node end def initialize(source, operator_loc, variable, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#6954 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6347 + # source://prism//lib/prism/node.rb#6868 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6352 + # source://prism//lib/prism/node.rb#6873 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6362 + # source://prism//lib/prism/node.rb#6883 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6357 + # source://prism//lib/prism/node.rb#6878 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#6367 + # source://prism//lib/prism/node.rb#6888 sig do params( operator_loc: Prism::Location, @@ -12673,13 +13040,13 @@ class Prism::EmbeddedVariableNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6352 + # source://prism//lib/prism/node.rb#6873 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#6375 + # source://prism//lib/prism/node.rb#6896 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -12688,19 +13055,19 @@ class Prism::EmbeddedVariableNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#6396 + # source://prism//lib/prism/node.rb#6916 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # - # source://prism//lib/prism/node.rb#6391 + # source://prism//lib/prism/node.rb#6911 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#6380 + # source://prism//lib/prism/node.rb#6901 sig { returns(Prism::Location) } def operator_loc; end @@ -12719,13 +13086,13 @@ class Prism::EmbeddedVariableNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#6418 + # source://prism//lib/prism/node.rb#6938 sig { override.returns(Symbol) } def type; end # attr_reader variable: Prism::node # - # source://prism//lib/prism/node.rb#6387 + # source://prism//lib/prism/node.rb#6908 sig { returns(Prism::Node) } def variable; end @@ -12737,24 +13104,24 @@ class Prism::EmbeddedVariableNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#6428 + # source://prism//lib/prism/node.rb#6948 def type; end end end # Flags for nodes that have unescaped content. # -# source://prism//lib/prism/node.rb#18857 +# source://prism//lib/prism/node.rb#20364 module Prism::EncodingFlags; end # internal bytes forced the encoding to binary # -# source://prism//lib/prism/node.rb#18862 +# source://prism//lib/prism/node.rb#20369 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#18859 +# source://prism//lib/prism/node.rb#20366 Prism::EncodingFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # Represents an `ensure` clause in a `begin` statement. @@ -12766,13 +13133,13 @@ Prism::EncodingFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # bar # end # -# source://prism//lib/prism/node.rb#6441 +# source://prism//lib/prism/node.rb#6969 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#6443 + # source://prism//lib/prism/node.rb#6971 sig do params( source: Prism::Source, @@ -12784,33 +13151,39 @@ class Prism::EnsureNode < ::Prism::Node end def initialize(source, ensure_keyword_loc, statements, end_keyword_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#7086 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6453 + # source://prism//lib/prism/node.rb#6981 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6458 + # source://prism//lib/prism/node.rb#6986 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6470 + # source://prism//lib/prism/node.rb#6998 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6463 + # source://prism//lib/prism/node.rb#6991 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#6475 + # source://prism//lib/prism/node.rb#7003 sig do params( ensure_keyword_loc: Prism::Location, @@ -12824,37 +13197,37 @@ class Prism::EnsureNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6458 + # source://prism//lib/prism/node.rb#6986 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#6483 + # source://prism//lib/prism/node.rb#7011 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#6511 + # source://prism//lib/prism/node.rb#7038 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#6498 + # source://prism//lib/prism/node.rb#7026 sig { returns(Prism::Location) } def end_keyword_loc; end # def ensure_keyword: () -> String # - # source://prism//lib/prism/node.rb#6506 + # source://prism//lib/prism/node.rb#7033 sig { returns(String) } def ensure_keyword; end # attr_reader ensure_keyword_loc: Location # - # source://prism//lib/prism/node.rb#6488 + # source://prism//lib/prism/node.rb#7016 sig { returns(Prism::Location) } def ensure_keyword_loc; end @@ -12863,13 +13236,13 @@ class Prism::EnsureNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#6516 + # source://prism//lib/prism/node.rb#7043 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#6495 + # source://prism//lib/prism/node.rb#7023 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -12888,7 +13261,7 @@ class Prism::EnsureNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#6543 + # source://prism//lib/prism/node.rb#7070 sig { override.returns(Symbol) } def type; end @@ -12900,7 +13273,7 @@ class Prism::EnsureNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#6553 + # source://prism//lib/prism/node.rb#7080 def type; end end end @@ -12910,56 +13283,62 @@ end # false # ^^^^^ # -# source://prism//lib/prism/node.rb#6562 +# source://prism//lib/prism/node.rb#7098 class Prism::FalseNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [FalseNode] a new instance of FalseNode # - # source://prism//lib/prism/node.rb#6564 + # source://prism//lib/prism/node.rb#7100 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 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6571 + # source://prism//lib/prism/node.rb#7107 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6576 + # source://prism//lib/prism/node.rb#7112 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6586 + # source://prism//lib/prism/node.rb#7122 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6581 + # source://prism//lib/prism/node.rb#7117 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?location: Location) -> FalseNode # - # source://prism//lib/prism/node.rb#6591 + # source://prism//lib/prism/node.rb#7127 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#6576 + # source://prism//lib/prism/node.rb#7112 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#6599 + # source://prism//lib/prism/node.rb#7135 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -12968,7 +13347,7 @@ class Prism::FalseNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#6605 + # source://prism//lib/prism/node.rb#7140 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end @@ -12987,7 +13366,7 @@ class Prism::FalseNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#6624 + # source://prism//lib/prism/node.rb#7159 sig { override.returns(Symbol) } def type; end @@ -12999,7 +13378,7 @@ class Prism::FalseNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#6634 + # source://prism//lib/prism/node.rb#7169 def type; end end end @@ -13015,13 +13394,13 @@ end # foo in Foo(*bar, baz, *qux) # ^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#6649 +# source://prism//lib/prism/node.rb#7190 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#6651 + # source://prism//lib/prism/node.rb#7192 sig do params( source: Prism::Source, @@ -13036,51 +13415,57 @@ class Prism::FindPatternNode < ::Prism::Node end def initialize(source, constant, left, requireds, right, opening_loc, closing_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#7339 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6664 + # source://prism//lib/prism/node.rb#7205 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6669 + # source://prism//lib/prism/node.rb#7210 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#6746 + # source://prism//lib/prism/node.rb#7286 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#6727 + # source://prism//lib/prism/node.rb#7268 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6684 + # source://prism//lib/prism/node.rb#7225 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6674 + # source://prism//lib/prism/node.rb#7215 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader constant: Prism::node? # - # source://prism//lib/prism/node.rb#6702 + # source://prism//lib/prism/node.rb#7243 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#6689 + # source://prism//lib/prism/node.rb#7230 sig do params( constant: T.nilable(Prism::Node), @@ -13097,13 +13482,13 @@ class Prism::FindPatternNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6669 + # source://prism//lib/prism/node.rb#7210 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#6697 + # source://prism//lib/prism/node.rb#7238 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -13112,37 +13497,37 @@ class Prism::FindPatternNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#6751 + # source://prism//lib/prism/node.rb#7291 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader left: Prism::node # - # source://prism//lib/prism/node.rb#6705 + # source://prism//lib/prism/node.rb#7246 sig { returns(Prism::Node) } def left; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#6741 + # source://prism//lib/prism/node.rb#7281 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#6714 + # source://prism//lib/prism/node.rb#7255 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader requireds: Array[Prism::node] # - # source://prism//lib/prism/node.rb#6708 + # source://prism//lib/prism/node.rb#7249 sig { returns(T::Array[Prism::Node]) } def requireds; end # attr_reader right: Prism::node # - # source://prism//lib/prism/node.rb#6711 + # source://prism//lib/prism/node.rb#7252 sig { returns(Prism::Node) } def right; end @@ -13161,7 +13546,7 @@ class Prism::FindPatternNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#6783 + # source://prism//lib/prism/node.rb#7323 sig { override.returns(Symbol) } def type; end @@ -13173,7 +13558,7 @@ class Prism::FindPatternNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#6793 + # source://prism//lib/prism/node.rb#7333 def type; end end end @@ -13183,13 +13568,13 @@ end # baz if foo .. bar # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#6802 +# source://prism//lib/prism/node.rb#7355 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#6804 + # source://prism//lib/prism/node.rb#7357 sig do params( source: Prism::Source, @@ -13202,33 +13587,39 @@ class Prism::FlipFlopNode < ::Prism::Node end def initialize(source, flags, left, right, operator_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#7481 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6815 + # source://prism//lib/prism/node.rb#7368 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6820 + # source://prism//lib/prism/node.rb#7373 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6833 + # source://prism//lib/prism/node.rb#7386 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6825 + # source://prism//lib/prism/node.rb#7378 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#6838 + # source://prism//lib/prism/node.rb#7391 sig do params( flags: Integer, @@ -13243,13 +13634,13 @@ class Prism::FlipFlopNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6820 + # source://prism//lib/prism/node.rb#7373 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#6846 + # source://prism//lib/prism/node.rb#7399 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -13257,7 +13648,7 @@ class Prism::FlipFlopNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#6869 + # source://prism//lib/prism/node.rb#7421 sig { returns(T::Boolean) } def exclude_end?; end @@ -13266,31 +13657,31 @@ class Prism::FlipFlopNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#6879 + # source://prism//lib/prism/node.rb#7431 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader left: Prism::node? # - # source://prism//lib/prism/node.rb#6855 + # source://prism//lib/prism/node.rb#7408 sig { returns(T.nilable(Prism::Node)) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#6874 + # source://prism//lib/prism/node.rb#7426 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#6861 + # source://prism//lib/prism/node.rb#7414 sig { returns(Prism::Location) } def operator_loc; end # attr_reader right: Prism::node? # - # source://prism//lib/prism/node.rb#6858 + # source://prism//lib/prism/node.rb#7411 sig { returns(T.nilable(Prism::Node)) } def right; end @@ -13309,15 +13700,15 @@ class Prism::FlipFlopNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#6913 + # source://prism//lib/prism/node.rb#7465 sig { override.returns(Symbol) } def type; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#6851 + # source://prism//lib/prism/node.rb#7404 sig { returns(Integer) } def flags; end @@ -13329,7 +13720,7 @@ class Prism::FlipFlopNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#6923 + # source://prism//lib/prism/node.rb#7475 def type; end end end @@ -13339,56 +13730,62 @@ end # 1.0 # ^^^ # -# source://prism//lib/prism/node.rb#6932 +# source://prism//lib/prism/node.rb#7494 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#6934 + # source://prism//lib/prism/node.rb#7496 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 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6942 + # source://prism//lib/prism/node.rb#7504 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6947 + # source://prism//lib/prism/node.rb#7509 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6957 + # source://prism//lib/prism/node.rb#7519 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6952 + # source://prism//lib/prism/node.rb#7514 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#6962 + # source://prism//lib/prism/node.rb#7524 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#6947 + # source://prism//lib/prism/node.rb#7509 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#6970 + # source://prism//lib/prism/node.rb#7532 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -13397,7 +13794,7 @@ class Prism::FloatNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#6979 + # source://prism//lib/prism/node.rb#7540 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end @@ -13416,13 +13813,13 @@ class Prism::FloatNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#6999 + # source://prism//lib/prism/node.rb#7560 sig { override.returns(Symbol) } def type; end # The value of the floating point number as a Float. # - # source://prism//lib/prism/node.rb#6975 + # source://prism//lib/prism/node.rb#7537 sig { returns(Float) } def value; end @@ -13434,7 +13831,7 @@ class Prism::FloatNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#7009 + # source://prism//lib/prism/node.rb#7570 def type; end end end @@ -13444,13 +13841,13 @@ end # for i in a end # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#7018 +# source://prism//lib/prism/node.rb#7586 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#7020 + # source://prism//lib/prism/node.rb#7588 sig do params( source: Prism::Source, @@ -13466,39 +13863,45 @@ class Prism::ForNode < ::Prism::Node end def initialize(source, index, collection, statements, for_keyword_loc, in_keyword_loc, do_keyword_loc, end_keyword_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#7751 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7034 + # source://prism//lib/prism/node.rb#7602 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7039 + # source://prism//lib/prism/node.rb#7607 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # attr_reader collection: Prism::node # - # source://prism//lib/prism/node.rb#7074 + # source://prism//lib/prism/node.rb#7642 sig { returns(Prism::Node) } def collection; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7053 + # source://prism//lib/prism/node.rb#7621 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7044 + # source://prism//lib/prism/node.rb#7612 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#7058 + # source://prism//lib/prism/node.rb#7626 sig do params( index: Prism::Node, @@ -13516,37 +13919,37 @@ class Prism::ForNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7039 + # source://prism//lib/prism/node.rb#7607 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#7066 + # source://prism//lib/prism/node.rb#7634 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#7125 + # source://prism//lib/prism/node.rb#7692 sig { returns(T.nilable(String)) } def do_keyword; end # attr_reader do_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#7094 + # source://prism//lib/prism/node.rb#7662 sig { returns(T.nilable(Prism::Location)) } def do_keyword_loc; end # def end_keyword: () -> String # - # source://prism//lib/prism/node.rb#7130 + # source://prism//lib/prism/node.rb#7697 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#7107 + # source://prism//lib/prism/node.rb#7675 sig { returns(Prism::Location) } def end_keyword_loc; end @@ -13555,43 +13958,43 @@ class Prism::ForNode < ::Prism::Node # def for_keyword: () -> String # - # source://prism//lib/prism/node.rb#7115 + # source://prism//lib/prism/node.rb#7682 sig { returns(String) } def for_keyword; end # attr_reader for_keyword_loc: Location # - # source://prism//lib/prism/node.rb#7080 + # source://prism//lib/prism/node.rb#7648 sig { returns(Prism::Location) } def for_keyword_loc; end # def in_keyword: () -> String # - # source://prism//lib/prism/node.rb#7120 + # source://prism//lib/prism/node.rb#7687 sig { returns(String) } def in_keyword; end # attr_reader in_keyword_loc: Location # - # source://prism//lib/prism/node.rb#7087 + # source://prism//lib/prism/node.rb#7655 sig { returns(Prism::Location) } def in_keyword_loc; end # attr_reader index: Prism::node # - # source://prism//lib/prism/node.rb#7071 + # source://prism//lib/prism/node.rb#7639 sig { returns(Prism::Node) } def index; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#7135 + # source://prism//lib/prism/node.rb#7702 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#7077 + # source://prism//lib/prism/node.rb#7645 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -13610,7 +14013,7 @@ class Prism::ForNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#7168 + # source://prism//lib/prism/node.rb#7735 sig { override.returns(Symbol) } def type; end @@ -13622,7 +14025,7 @@ class Prism::ForNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#7178 + # source://prism//lib/prism/node.rb#7745 def type; end end end @@ -13634,56 +14037,62 @@ end # ^^^ # end # -# source://prism//lib/prism/node.rb#7189 +# source://prism//lib/prism/node.rb#7769 class Prism::ForwardingArgumentsNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [ForwardingArgumentsNode] a new instance of ForwardingArgumentsNode # - # source://prism//lib/prism/node.rb#7191 + # source://prism//lib/prism/node.rb#7771 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 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7198 + # source://prism//lib/prism/node.rb#7778 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7203 + # source://prism//lib/prism/node.rb#7783 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7213 + # source://prism//lib/prism/node.rb#7793 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7208 + # source://prism//lib/prism/node.rb#7788 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?location: Location) -> ForwardingArgumentsNode # - # source://prism//lib/prism/node.rb#7218 + # source://prism//lib/prism/node.rb#7798 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#7203 + # source://prism//lib/prism/node.rb#7783 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#7226 + # source://prism//lib/prism/node.rb#7806 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -13692,7 +14101,7 @@ class Prism::ForwardingArgumentsNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#7232 + # source://prism//lib/prism/node.rb#7811 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end @@ -13711,7 +14120,7 @@ class Prism::ForwardingArgumentsNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#7251 + # source://prism//lib/prism/node.rb#7830 sig { override.returns(Symbol) } def type; end @@ -13723,7 +14132,7 @@ class Prism::ForwardingArgumentsNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#7261 + # source://prism//lib/prism/node.rb#7840 def type; end end end @@ -13734,56 +14143,62 @@ end # ^^^ # end # -# source://prism//lib/prism/node.rb#7271 +# source://prism//lib/prism/node.rb#7856 class Prism::ForwardingParameterNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [ForwardingParameterNode] a new instance of ForwardingParameterNode # - # source://prism//lib/prism/node.rb#7273 + # source://prism//lib/prism/node.rb#7858 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 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7280 + # source://prism//lib/prism/node.rb#7865 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7285 + # source://prism//lib/prism/node.rb#7870 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7295 + # source://prism//lib/prism/node.rb#7880 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7290 + # source://prism//lib/prism/node.rb#7875 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?location: Location) -> ForwardingParameterNode # - # source://prism//lib/prism/node.rb#7300 + # source://prism//lib/prism/node.rb#7885 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#7285 + # source://prism//lib/prism/node.rb#7870 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#7308 + # source://prism//lib/prism/node.rb#7893 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -13792,7 +14207,7 @@ class Prism::ForwardingParameterNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#7314 + # source://prism//lib/prism/node.rb#7898 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end @@ -13811,7 +14226,7 @@ class Prism::ForwardingParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#7333 + # source://prism//lib/prism/node.rb#7917 sig { override.returns(Symbol) } def type; end @@ -13823,7 +14238,7 @@ class Prism::ForwardingParameterNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#7343 + # source://prism//lib/prism/node.rb#7927 def type; end end end @@ -13833,62 +14248,68 @@ end # super # ^^^^^ # -# source://prism//lib/prism/node.rb#7352 +# source://prism//lib/prism/node.rb#7942 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#7354 + # source://prism//lib/prism/node.rb#7944 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 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7362 + # source://prism//lib/prism/node.rb#7952 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader block: BlockNode? # - # source://prism//lib/prism/node.rb#7397 + # source://prism//lib/prism/node.rb#7987 sig { returns(T.nilable(Prism::BlockNode)) } def block; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7367 + # source://prism//lib/prism/node.rb#7957 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7379 + # source://prism//lib/prism/node.rb#7969 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7372 + # source://prism//lib/prism/node.rb#7962 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#7384 + # source://prism//lib/prism/node.rb#7974 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#7367 + # source://prism//lib/prism/node.rb#7957 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#7392 + # source://prism//lib/prism/node.rb#7982 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -13897,7 +14318,7 @@ class Prism::ForwardingSuperNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#7401 + # source://prism//lib/prism/node.rb#7990 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end @@ -13916,7 +14337,7 @@ class Prism::ForwardingSuperNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#7426 + # source://prism//lib/prism/node.rb#8015 sig { override.returns(Symbol) } def type; end @@ -13928,7 +14349,7 @@ class Prism::ForwardingSuperNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#7436 + # source://prism//lib/prism/node.rb#8025 def type; end end end @@ -13938,13 +14359,13 @@ end # $target &&= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#7445 +# source://prism//lib/prism/node.rb#8041 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#7447 + # source://prism//lib/prism/node.rb#8043 sig do params( source: Prism::Source, @@ -13957,33 +14378,39 @@ class Prism::GlobalVariableAndWriteNode < ::Prism::Node 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#8152 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7458 + # source://prism//lib/prism/node.rb#8054 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7463 + # source://prism//lib/prism/node.rb#8059 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7473 + # source://prism//lib/prism/node.rb#8069 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7468 + # source://prism//lib/prism/node.rb#8064 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#7478 + # source://prism//lib/prism/node.rb#8074 sig do params( name: Symbol, @@ -13998,13 +14425,13 @@ class Prism::GlobalVariableAndWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7463 + # source://prism//lib/prism/node.rb#8059 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#7486 + # source://prism//lib/prism/node.rb#8082 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -14016,31 +14443,31 @@ class Prism::GlobalVariableAndWriteNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#7517 + # source://prism//lib/prism/node.rb#8112 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#7491 + # source://prism//lib/prism/node.rb#8087 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#7494 + # source://prism//lib/prism/node.rb#8090 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#7512 + # source://prism//lib/prism/node.rb#8107 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#7501 + # source://prism//lib/prism/node.rb#8097 sig { returns(Prism::Location) } def operator_loc; end @@ -14059,13 +14486,13 @@ class Prism::GlobalVariableAndWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#7541 + # source://prism//lib/prism/node.rb#8136 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#7508 + # source://prism//lib/prism/node.rb#8104 sig { returns(Prism::Node) } def value; end @@ -14077,7 +14504,7 @@ class Prism::GlobalVariableAndWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#7551 + # source://prism//lib/prism/node.rb#8146 def type; end end end @@ -14087,13 +14514,13 @@ end # $target += value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#7560 +# source://prism//lib/prism/node.rb#8165 class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Symbol operator, Location location) -> void # # @return [GlobalVariableOperatorWriteNode] a new instance of GlobalVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#7562 + # source://prism//lib/prism/node.rb#8167 sig do params( source: Prism::Source, @@ -14107,33 +14534,39 @@ class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node end def initialize(source, name, name_loc, operator_loc, value, 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 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7574 + # source://prism//lib/prism/node.rb#8179 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7579 + # source://prism//lib/prism/node.rb#8184 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7589 + # source://prism//lib/prism/node.rb#8194 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7584 + # source://prism//lib/prism/node.rb#8189 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 # - # source://prism//lib/prism/node.rb#7594 + # source://prism//lib/prism/node.rb#8199 sig do params( name: Symbol, @@ -14149,13 +14582,13 @@ class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7579 + # source://prism//lib/prism/node.rb#8184 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 } # - # source://prism//lib/prism/node.rb#7602 + # source://prism//lib/prism/node.rb#8207 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -14167,31 +14600,31 @@ class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#7631 + # source://prism//lib/prism/node.rb#8235 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#7607 + # source://prism//lib/prism/node.rb#8212 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#7610 + # source://prism//lib/prism/node.rb#8215 sig { returns(Prism::Location) } def name_loc; end # attr_reader operator: Symbol # - # source://prism//lib/prism/node.rb#7627 + # source://prism//lib/prism/node.rb#8232 sig { returns(Symbol) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#7617 + # source://prism//lib/prism/node.rb#8222 sig { returns(Prism::Location) } def operator_loc; end @@ -14210,13 +14643,13 @@ class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#7656 + # source://prism//lib/prism/node.rb#8260 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#7624 + # source://prism//lib/prism/node.rb#8229 sig { returns(Prism::Node) } def value; end @@ -14228,7 +14661,7 @@ class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#7666 + # source://prism//lib/prism/node.rb#8270 def type; end end end @@ -14238,13 +14671,13 @@ end # $target ||= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#7675 +# source://prism//lib/prism/node.rb#8290 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#7677 + # source://prism//lib/prism/node.rb#8292 sig do params( source: Prism::Source, @@ -14257,33 +14690,39 @@ class Prism::GlobalVariableOrWriteNode < ::Prism::Node 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#8401 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7688 + # source://prism//lib/prism/node.rb#8303 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7693 + # source://prism//lib/prism/node.rb#8308 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7703 + # source://prism//lib/prism/node.rb#8318 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7698 + # source://prism//lib/prism/node.rb#8313 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#7708 + # source://prism//lib/prism/node.rb#8323 sig do params( name: Symbol, @@ -14298,13 +14737,13 @@ class Prism::GlobalVariableOrWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7693 + # source://prism//lib/prism/node.rb#8308 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#7716 + # source://prism//lib/prism/node.rb#8331 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -14316,31 +14755,31 @@ class Prism::GlobalVariableOrWriteNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#7747 + # source://prism//lib/prism/node.rb#8361 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#7721 + # source://prism//lib/prism/node.rb#8336 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#7724 + # source://prism//lib/prism/node.rb#8339 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#7742 + # source://prism//lib/prism/node.rb#8356 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#7731 + # source://prism//lib/prism/node.rb#8346 sig { returns(Prism::Location) } def operator_loc; end @@ -14359,13 +14798,13 @@ class Prism::GlobalVariableOrWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#7771 + # source://prism//lib/prism/node.rb#8385 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#7738 + # source://prism//lib/prism/node.rb#8353 sig { returns(Prism::Node) } def value; end @@ -14377,7 +14816,7 @@ class Prism::GlobalVariableOrWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#7781 + # source://prism//lib/prism/node.rb#8395 def type; end end end @@ -14387,56 +14826,62 @@ end # $foo # ^^^^ # -# source://prism//lib/prism/node.rb#7790 +# source://prism//lib/prism/node.rb#8414 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#7792 + # source://prism//lib/prism/node.rb#8416 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 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7800 + # source://prism//lib/prism/node.rb#8424 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7805 + # source://prism//lib/prism/node.rb#8429 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7815 + # source://prism//lib/prism/node.rb#8439 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7810 + # source://prism//lib/prism/node.rb#8434 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#7820 + # source://prism//lib/prism/node.rb#8444 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#7805 + # source://prism//lib/prism/node.rb#8429 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#7828 + # source://prism//lib/prism/node.rb#8452 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -14445,7 +14890,7 @@ class Prism::GlobalVariableReadNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#7841 + # source://prism//lib/prism/node.rb#8464 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end @@ -14455,7 +14900,7 @@ class Prism::GlobalVariableReadNode < ::Prism::Node # # $_Test # name `:$_Test` # - # source://prism//lib/prism/node.rb#7837 + # source://prism//lib/prism/node.rb#8461 sig { returns(Symbol) } def name; end @@ -14474,7 +14919,7 @@ class Prism::GlobalVariableReadNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#7861 + # source://prism//lib/prism/node.rb#8484 sig { override.returns(Symbol) } def type; end @@ -14486,7 +14931,7 @@ class Prism::GlobalVariableReadNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#7871 + # source://prism//lib/prism/node.rb#8494 def type; end end end @@ -14496,56 +14941,62 @@ end # $foo, $bar = baz # ^^^^ ^^^^ # -# source://prism//lib/prism/node.rb#7880 +# source://prism//lib/prism/node.rb#8510 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#7882 + # source://prism//lib/prism/node.rb#8512 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 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7890 + # source://prism//lib/prism/node.rb#8520 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7895 + # source://prism//lib/prism/node.rb#8525 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7905 + # source://prism//lib/prism/node.rb#8535 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7900 + # source://prism//lib/prism/node.rb#8530 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#7910 + # source://prism//lib/prism/node.rb#8540 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#7895 + # source://prism//lib/prism/node.rb#8525 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#7918 + # source://prism//lib/prism/node.rb#8548 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -14554,13 +15005,13 @@ class Prism::GlobalVariableTargetNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#7927 + # source://prism//lib/prism/node.rb#8556 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#7923 + # source://prism//lib/prism/node.rb#8553 sig { returns(Symbol) } def name; end @@ -14579,7 +15030,7 @@ class Prism::GlobalVariableTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#7947 + # source://prism//lib/prism/node.rb#8576 sig { override.returns(Symbol) } def type; end @@ -14591,7 +15042,7 @@ class Prism::GlobalVariableTargetNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#7957 + # source://prism//lib/prism/node.rb#8586 def type; end end end @@ -14601,13 +15052,13 @@ end # $foo = 1 # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#7966 +# source://prism//lib/prism/node.rb#8602 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#7968 + # source://prism//lib/prism/node.rb#8604 sig do params( source: Prism::Source, @@ -14620,33 +15071,39 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node end def initialize(source, name, name_loc, value, operator_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#8729 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7979 + # source://prism//lib/prism/node.rb#8615 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7984 + # source://prism//lib/prism/node.rb#8620 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7994 + # source://prism//lib/prism/node.rb#8630 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7989 + # source://prism//lib/prism/node.rb#8625 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#7999 + # source://prism//lib/prism/node.rb#8635 sig do params( name: Symbol, @@ -14661,13 +15118,13 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7984 + # source://prism//lib/prism/node.rb#8620 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#8007 + # source://prism//lib/prism/node.rb#8643 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -14676,31 +15133,41 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#8038 + # source://prism//lib/prism/node.rb#8689 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end - # attr_reader name: Symbol + # 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. # - # source://prism//lib/prism/node.rb#8012 + # $foo = :bar # name `:$foo` + # + # $_Test = 123 # name `:$_Test` + # + # source://prism//lib/prism/node.rb#8652 sig { returns(Symbol) } def name; end - # attr_reader name_loc: Location + # The location of the global variable's name. # - # source://prism//lib/prism/node.rb#8015 + # $foo = :bar + # ^^^^ + # + # source://prism//lib/prism/node.rb#8658 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#8033 + # source://prism//lib/prism/node.rb#8684 sig { returns(String) } def operator; end - # attr_reader operator_loc: Location + # The location of the `=` operator. # - # source://prism//lib/prism/node.rb#8025 + # $foo = :bar + # ^ + # + # source://prism//lib/prism/node.rb#8677 sig { returns(Prism::Location) } def operator_loc; end @@ -14719,13 +15186,19 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#8062 + # source://prism//lib/prism/node.rb#8713 sig { override.returns(Symbol) } def type; end - # attr_reader value: Prism::node + # The value to write to the global variable. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). # - # source://prism//lib/prism/node.rb#8022 + # $foo = :bar + # ^^^^ + # + # $-xyz = 123 + # ^^^ + # + # source://prism//lib/prism/node.rb#8671 sig { returns(Prism::Node) } def value; end @@ -14737,7 +15210,7 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#8072 + # source://prism//lib/prism/node.rb#8723 def type; end end end @@ -14747,13 +15220,13 @@ end # { a => b } # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#8081 +# source://prism//lib/prism/node.rb#8742 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#8083 + # source://prism//lib/prism/node.rb#8744 sig do params( source: Prism::Source, @@ -14765,21 +15238,27 @@ class Prism::HashNode < ::Prism::Node end def initialize(source, opening_loc, elements, closing_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#8864 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8093 + # source://prism//lib/prism/node.rb#8754 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8098 + # source://prism//lib/prism/node.rb#8759 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#8161 + # source://prism//lib/prism/node.rb#8821 sig { returns(String) } def closing; end @@ -14788,25 +15267,25 @@ class Prism::HashNode < ::Prism::Node # { a => b } # ^ # - # source://prism//lib/prism/node.rb#8148 + # source://prism//lib/prism/node.rb#8809 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8108 + # source://prism//lib/prism/node.rb#8769 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8103 + # source://prism//lib/prism/node.rb#8764 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#8113 + # source://prism//lib/prism/node.rb#8774 sig do params( opening_loc: Prism::Location, @@ -14820,13 +15299,13 @@ class Prism::HashNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8098 + # source://prism//lib/prism/node.rb#8759 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#8121 + # source://prism//lib/prism/node.rb#8782 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -14838,7 +15317,7 @@ class Prism::HashNode < ::Prism::Node # { **foo } # ^^^^^ # - # source://prism//lib/prism/node.rb#8142 + # source://prism//lib/prism/node.rb#8803 sig { returns(T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)]) } def elements; end @@ -14847,13 +15326,13 @@ class Prism::HashNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#8166 + # source://prism//lib/prism/node.rb#8826 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String # - # source://prism//lib/prism/node.rb#8156 + # source://prism//lib/prism/node.rb#8816 sig { returns(String) } def opening; end @@ -14862,7 +15341,7 @@ class Prism::HashNode < ::Prism::Node # { a => b } # ^ # - # source://prism//lib/prism/node.rb#8129 + # source://prism//lib/prism/node.rb#8790 sig { returns(Prism::Location) } def opening_loc; end @@ -14881,7 +15360,7 @@ class Prism::HashNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#8188 + # source://prism//lib/prism/node.rb#8848 sig { override.returns(Symbol) } def type; end @@ -14893,7 +15372,7 @@ class Prism::HashNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#8198 + # source://prism//lib/prism/node.rb#8858 def type; end end end @@ -14906,13 +15385,13 @@ end # foo => { a: 1, b: 2, **c } # ^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#8210 +# source://prism//lib/prism/node.rb#8880 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#8212 + # source://prism//lib/prism/node.rb#8882 sig do params( source: Prism::Source, @@ -14926,51 +15405,57 @@ class Prism::HashPatternNode < ::Prism::Node end def initialize(source, constant, elements, rest, opening_loc, closing_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#9026 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8224 + # source://prism//lib/prism/node.rb#8894 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8229 + # source://prism//lib/prism/node.rb#8899 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#8302 + # source://prism//lib/prism/node.rb#8971 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#8283 + # source://prism//lib/prism/node.rb#8953 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8243 + # source://prism//lib/prism/node.rb#8913 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8234 + # source://prism//lib/prism/node.rb#8904 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader constant: Prism::node? # - # source://prism//lib/prism/node.rb#8261 + # source://prism//lib/prism/node.rb#8931 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#8248 + # source://prism//lib/prism/node.rb#8918 sig do params( constant: T.nilable(Prism::Node), @@ -14986,19 +15471,19 @@ class Prism::HashPatternNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8229 + # source://prism//lib/prism/node.rb#8899 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#8256 + # source://prism//lib/prism/node.rb#8926 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#8264 + # source://prism//lib/prism/node.rb#8934 sig { returns(T::Array[Prism::AssocNode]) } def elements; end @@ -15007,25 +15492,25 @@ class Prism::HashPatternNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#8307 + # source://prism//lib/prism/node.rb#8976 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#8297 + # source://prism//lib/prism/node.rb#8966 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#8270 + # source://prism//lib/prism/node.rb#8940 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader rest: AssocSplatNode | NoKeywordsParameterNode | nil # - # source://prism//lib/prism/node.rb#8267 + # source://prism//lib/prism/node.rb#8937 sig { returns(T.nilable(T.any(Prism::AssocSplatNode, Prism::NoKeywordsParameterNode))) } def rest; end @@ -15044,7 +15529,7 @@ class Prism::HashPatternNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#8341 + # source://prism//lib/prism/node.rb#9010 sig { override.returns(Symbol) } def type; end @@ -15056,7 +15541,7 @@ class Prism::HashPatternNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#8351 + # source://prism//lib/prism/node.rb#9020 def type; end end end @@ -15071,7 +15556,7 @@ module Prism::HeredocQuery def heredoc?; end end -# Represents the use of the `if` keyword, either in the block form or the modifier form. +# Represents the use of the `if` keyword, either in the block form or the modifier form, or a ternary expression. # # bar if foo # ^^^^^^^^^^ @@ -15079,13 +15564,16 @@ end # if foo then bar end # ^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#8363 +# foo ? bar : baz +# ^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#9047 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#8365 + # source://prism//lib/prism/node.rb#9049 sig do params( source: Prism::Source, @@ -15100,39 +15588,57 @@ class Prism::IfNode < ::Prism::Node end def initialize(source, if_keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#9264 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8378 + # source://prism//lib/prism/node.rb#9062 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8387 + # source://prism//lib/prism/node.rb#9071 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8401 + # source://prism//lib/prism/node.rb#9085 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8392 + # source://prism//lib/prism/node.rb#9076 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # attr_reader consequent: Prism::node? + # Represents an `ElseNode` or an `IfNode` when there is an `else` or an `elsif` in the `if` statement. + # + # if foo + # bar + # elsif baz + # ^^^^^^^^^ + # qux + # ^^^ + # end + # ^^^ # - # source://prism//lib/prism/node.rb#8451 + # if foo then bar else baz end + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/node.rb#9176 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#8406 + # source://prism//lib/prism/node.rb#9090 sig do params( if_keyword_loc: T.nilable(Prism::Location), @@ -15149,25 +15655,30 @@ class Prism::IfNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8387 + # source://prism//lib/prism/node.rb#9071 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#8414 + # source://prism//lib/prism/node.rb#9098 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#8478 + # source://prism//lib/prism/node.rb#9207 sig { returns(T.nilable(String)) } def end_keyword; end - # attr_reader end_keyword_loc: Location? + # The location of the `end` keyword if present, `nil` otherwise. + # + # if foo + # bar + # end + # ^^^ # - # source://prism//lib/prism/node.rb#8454 + # source://prism//lib/prism/node.rb#9184 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end @@ -15176,46 +15687,75 @@ class Prism::IfNode < ::Prism::Node # def if_keyword: () -> String? # - # source://prism//lib/prism/node.rb#8468 + # source://prism//lib/prism/node.rb#9197 sig { returns(T.nilable(String)) } def if_keyword; end - # attr_reader if_keyword_loc: Location? + # The location of the `if` keyword if present. + # + # bar if foo + # ^^ + # + # The `if_keyword_loc` field will be `nil` when the `IfNode` represents a ternary expression. # - # source://prism//lib/prism/node.rb#8419 + # source://prism//lib/prism/node.rb#9108 sig { returns(T.nilable(Prism::Location)) } def if_keyword_loc; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#8483 + # source://prism//lib/prism/node.rb#9212 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end - # attr_reader predicate: Prism::node + # The node for the condition the `IfNode` is testing. + # + # if foo + # ^^^ + # bar + # end + # + # bar if foo + # ^^^ + # + # foo ? bar : baz + # ^^^ # - # source://prism//lib/prism/node.rb#8432 + # source://prism//lib/prism/node.rb#9132 sig { returns(Prism::Node) } def predicate; end - # source://prism//lib/prism/node.rb#8382 + # source://prism//lib/prism/node.rb#9066 def set_newline_flag(newline_marked); end - # attr_reader statements: StatementsNode? + # Represents the body of statements that will be executed when the predicate is evaluated as truthy. Will be `nil` when no body is provided. # - # source://prism//lib/prism/node.rb#8448 + # if foo + # bar + # ^^^ + # baz + # ^^^ + # end + # + # source://prism//lib/prism/node.rb#9161 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # def then_keyword: () -> String? # - # source://prism//lib/prism/node.rb#8473 + # source://prism//lib/prism/node.rb#9202 sig { returns(T.nilable(String)) } def then_keyword; end - # attr_reader then_keyword_loc: Location? + # The location of the `then` keyword (if present) or the `?` in a ternary expression, `nil` otherwise. + # + # if foo then bar end + # ^^^^ # - # source://prism//lib/prism/node.rb#8435 + # a ? b : c + # ^ + # + # source://prism//lib/prism/node.rb#9141 sig { returns(T.nilable(Prism::Location)) } def then_keyword_loc; end @@ -15234,7 +15774,7 @@ class Prism::IfNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#8519 + # source://prism//lib/prism/node.rb#9248 sig { override.returns(Symbol) } def type; end @@ -15246,7 +15786,7 @@ class Prism::IfNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#8529 + # source://prism//lib/prism/node.rb#9258 def type; end end end @@ -15256,13 +15796,13 @@ end # 1.0i # ^^^^ # -# source://prism//lib/prism/node.rb#8538 +# source://prism//lib/prism/node.rb#9279 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#8540 + # source://prism//lib/prism/node.rb#9281 sig do params( source: Prism::Source, @@ -15272,33 +15812,39 @@ class Prism::ImaginaryNode < ::Prism::Node end def initialize(source, numeric, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#9362 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8548 + # source://prism//lib/prism/node.rb#9289 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8553 + # source://prism//lib/prism/node.rb#9294 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8563 + # source://prism//lib/prism/node.rb#9304 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8558 + # source://prism//lib/prism/node.rb#9299 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#8568 + # source://prism//lib/prism/node.rb#9309 sig do params( numeric: T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode), @@ -15310,13 +15856,13 @@ class Prism::ImaginaryNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8553 + # source://prism//lib/prism/node.rb#9294 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#8576 + # source://prism//lib/prism/node.rb#9317 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -15325,13 +15871,13 @@ class Prism::ImaginaryNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#8585 + # source://prism//lib/prism/node.rb#9325 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader numeric: FloatNode | IntegerNode | RationalNode # - # source://prism//lib/prism/node.rb#8581 + # source://prism//lib/prism/node.rb#9322 sig { returns(T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode)) } def numeric; end @@ -15350,7 +15896,7 @@ class Prism::ImaginaryNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#8606 + # source://prism//lib/prism/node.rb#9346 sig { override.returns(Symbol) } def type; end @@ -15368,7 +15914,7 @@ class Prism::ImaginaryNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#8616 + # source://prism//lib/prism/node.rb#9356 def type; end end end @@ -15384,56 +15930,62 @@ end # foo in { bar: } # ^^^^ # -# source://prism//lib/prism/node.rb#8631 +# source://prism//lib/prism/node.rb#9378 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#8633 + # source://prism//lib/prism/node.rb#9380 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 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8641 + # source://prism//lib/prism/node.rb#9388 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8646 + # source://prism//lib/prism/node.rb#9393 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8656 + # source://prism//lib/prism/node.rb#9403 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8651 + # source://prism//lib/prism/node.rb#9398 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#8661 + # source://prism//lib/prism/node.rb#9408 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#8646 + # source://prism//lib/prism/node.rb#9393 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#8669 + # source://prism//lib/prism/node.rb#9416 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -15442,7 +15994,7 @@ class Prism::ImplicitNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#8678 + # source://prism//lib/prism/node.rb#9424 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end @@ -15461,13 +16013,13 @@ class Prism::ImplicitNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#8699 + # source://prism//lib/prism/node.rb#9445 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#8674 + # source://prism//lib/prism/node.rb#9421 sig { returns(Prism::Node) } def value; end @@ -15479,7 +16031,7 @@ class Prism::ImplicitNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#8709 + # source://prism//lib/prism/node.rb#9455 def type; end end end @@ -15498,56 +16050,62 @@ end # foo, = bar # ^ # -# source://prism//lib/prism/node.rb#8727 +# source://prism//lib/prism/node.rb#9480 class Prism::ImplicitRestNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [ImplicitRestNode] a new instance of ImplicitRestNode # - # source://prism//lib/prism/node.rb#8729 + # source://prism//lib/prism/node.rb#9482 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 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8736 + # source://prism//lib/prism/node.rb#9489 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8741 + # source://prism//lib/prism/node.rb#9494 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8751 + # source://prism//lib/prism/node.rb#9504 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8746 + # source://prism//lib/prism/node.rb#9499 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?location: Location) -> ImplicitRestNode # - # source://prism//lib/prism/node.rb#8756 + # source://prism//lib/prism/node.rb#9509 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#8741 + # source://prism//lib/prism/node.rb#9494 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#8764 + # source://prism//lib/prism/node.rb#9517 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -15556,7 +16114,7 @@ class Prism::ImplicitRestNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#8770 + # source://prism//lib/prism/node.rb#9522 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end @@ -15575,7 +16133,7 @@ class Prism::ImplicitRestNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#8789 + # source://prism//lib/prism/node.rb#9541 sig { override.returns(Symbol) } def type; end @@ -15587,7 +16145,7 @@ class Prism::ImplicitRestNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#8799 + # source://prism//lib/prism/node.rb#9551 def type; end end end @@ -15597,13 +16155,13 @@ end # case a; in b then c end # ^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#8808 +# source://prism//lib/prism/node.rb#9566 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#8810 + # source://prism//lib/prism/node.rb#9568 sig do params( source: Prism::Source, @@ -15616,33 +16174,39 @@ class Prism::InNode < ::Prism::Node end def initialize(source, pattern, statements, in_loc, then_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#9696 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8821 + # source://prism//lib/prism/node.rb#9579 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8826 + # source://prism//lib/prism/node.rb#9584 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8839 + # source://prism//lib/prism/node.rb#9597 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8831 + # source://prism//lib/prism/node.rb#9589 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#8844 + # source://prism//lib/prism/node.rb#9602 sig do params( pattern: Prism::Node, @@ -15657,13 +16221,13 @@ class Prism::InNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8826 + # source://prism//lib/prism/node.rb#9584 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#8852 + # source://prism//lib/prism/node.rb#9610 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -15672,43 +16236,43 @@ class Prism::InNode < ::Prism::Node # def in: () -> String # - # source://prism//lib/prism/node.rb#8884 + # source://prism//lib/prism/node.rb#9641 sig { returns(String) } def in; end # attr_reader in_loc: Location # - # source://prism//lib/prism/node.rb#8863 + # source://prism//lib/prism/node.rb#9621 sig { returns(Prism::Location) } def in_loc; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#8894 + # source://prism//lib/prism/node.rb#9651 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader pattern: Prism::node # - # source://prism//lib/prism/node.rb#8857 + # source://prism//lib/prism/node.rb#9615 sig { returns(Prism::Node) } def pattern; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#8860 + # source://prism//lib/prism/node.rb#9618 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # def then: () -> String? # - # source://prism//lib/prism/node.rb#8889 + # source://prism//lib/prism/node.rb#9646 sig { returns(T.nilable(String)) } def then; end # attr_reader then_loc: Location? # - # source://prism//lib/prism/node.rb#8870 + # source://prism//lib/prism/node.rb#9628 sig { returns(T.nilable(Prism::Location)) } def then_loc; end @@ -15727,7 +16291,7 @@ class Prism::InNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#8923 + # source://prism//lib/prism/node.rb#9680 sig { override.returns(Symbol) } def type; end @@ -15739,7 +16303,7 @@ class Prism::InNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#8933 + # source://prism//lib/prism/node.rb#9690 def type; end end end @@ -15749,13 +16313,13 @@ end # foo.bar[baz] &&= value # ^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#8942 +# source://prism//lib/prism/node.rb#9709 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#8944 + # source://prism//lib/prism/node.rb#9711 sig do params( source: Prism::Source, @@ -15773,15 +16337,21 @@ class Prism::IndexAndWriteNode < ::Prism::Node 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#9916 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8960 + # source://prism//lib/prism/node.rb#9727 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#9025 + # source://prism//lib/prism/node.rb#9792 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end @@ -15789,61 +16359,61 @@ class Prism::IndexAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9059 + # source://prism//lib/prism/node.rb#9825 sig { returns(T::Boolean) } def attribute_write?; end # attr_reader block: Prism::node? # - # source://prism//lib/prism/node.rb#9035 + # source://prism//lib/prism/node.rb#9802 sig { returns(T.nilable(Prism::Node)) } def block; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#9069 + # source://prism//lib/prism/node.rb#9835 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#9005 + # source://prism//lib/prism/node.rb#9772 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8965 + # source://prism//lib/prism/node.rb#9732 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#9079 + # source://prism//lib/prism/node.rb#9845 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#9028 + # source://prism//lib/prism/node.rb#9795 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8980 + # source://prism//lib/prism/node.rb#9747 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8970 + # source://prism//lib/prism/node.rb#9737 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#8985 + # source://prism//lib/prism/node.rb#9752 sig do params( flags: Integer, @@ -15863,13 +16433,13 @@ class Prism::IndexAndWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8965 + # source://prism//lib/prism/node.rb#9732 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#8993 + # source://prism//lib/prism/node.rb#9760 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -15880,43 +16450,43 @@ class Prism::IndexAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9064 + # source://prism//lib/prism/node.rb#9830 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#9089 + # source://prism//lib/prism/node.rb#9855 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String # - # source://prism//lib/prism/node.rb#9074 + # source://prism//lib/prism/node.rb#9840 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#9018 + # source://prism//lib/prism/node.rb#9785 sig { returns(Prism::Location) } def opening_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#9084 + # source://prism//lib/prism/node.rb#9850 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#9038 + # source://prism//lib/prism/node.rb#9805 sig { returns(Prism::Location) } def operator_loc; end # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#9002 + # source://prism//lib/prism/node.rb#9769 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -15924,7 +16494,7 @@ class Prism::IndexAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9049 + # source://prism//lib/prism/node.rb#9815 sig { returns(T::Boolean) } def safe_navigation?; end @@ -15943,13 +16513,13 @@ class Prism::IndexAndWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#9134 + # source://prism//lib/prism/node.rb#9900 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#9045 + # source://prism//lib/prism/node.rb#9812 sig { returns(Prism::Node) } def value; end @@ -15957,15 +16527,15 @@ class Prism::IndexAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9054 + # source://prism//lib/prism/node.rb#9820 sig { returns(T::Boolean) } def variable_call?; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#8998 + # source://prism//lib/prism/node.rb#9765 sig { returns(Integer) } def flags; end @@ -15977,7 +16547,7 @@ class Prism::IndexAndWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#9144 + # source://prism//lib/prism/node.rb#9910 def type; end end end @@ -15987,13 +16557,13 @@ end # foo.bar[baz] += value # ^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#9153 +# source://prism//lib/prism/node.rb#9934 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 # # @return [IndexOperatorWriteNode] a new instance of IndexOperatorWriteNode # - # source://prism//lib/prism/node.rb#9155 + # source://prism//lib/prism/node.rb#9936 sig do params( source: Prism::Source, @@ -16012,15 +16582,21 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node end def initialize(source, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator, 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 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9172 + # source://prism//lib/prism/node.rb#9953 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#9237 + # source://prism//lib/prism/node.rb#10018 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end @@ -16028,61 +16604,61 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9274 + # source://prism//lib/prism/node.rb#10054 sig { returns(T::Boolean) } def attribute_write?; end # attr_reader block: Prism::node? # - # source://prism//lib/prism/node.rb#9247 + # source://prism//lib/prism/node.rb#10028 sig { returns(T.nilable(Prism::Node)) } def block; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#9284 + # source://prism//lib/prism/node.rb#10064 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#9217 + # source://prism//lib/prism/node.rb#9998 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9177 + # source://prism//lib/prism/node.rb#9958 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#9294 + # source://prism//lib/prism/node.rb#10074 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#9240 + # 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#9192 + # 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#9182 + # 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#9197 + # source://prism//lib/prism/node.rb#9978 sig do params( flags: Integer, @@ -16103,13 +16679,13 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9177 + # 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#9205 + # 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 @@ -16120,43 +16696,43 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9279 + # 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#9299 + # 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#9289 + # source://prism//lib/prism/node.rb#10069 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#9230 + # 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#9250 + # source://prism//lib/prism/node.rb#10031 sig { returns(Symbol) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#9253 + # 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#9214 + # source://prism//lib/prism/node.rb#9995 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -16164,7 +16740,7 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9264 + # source://prism//lib/prism/node.rb#10044 sig { returns(T::Boolean) } def safe_navigation?; end @@ -16183,13 +16759,13 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#9345 + # 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#9260 + # source://prism//lib/prism/node.rb#10041 sig { returns(Prism::Node) } def value; end @@ -16197,15 +16773,15 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9269 + # source://prism//lib/prism/node.rb#10049 sig { returns(T::Boolean) } def variable_call?; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#9210 + # source://prism//lib/prism/node.rb#9991 sig { returns(Integer) } def flags; end @@ -16217,7 +16793,7 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#9355 + # source://prism//lib/prism/node.rb#10135 def type; end end end @@ -16227,13 +16803,13 @@ end # foo.bar[baz] ||= value # ^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#9364 +# 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#9366 + # source://prism//lib/prism/node.rb#10162 sig do params( source: Prism::Source, @@ -16251,15 +16827,21 @@ class Prism::IndexOrWriteNode < ::Prism::Node 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#9382 + # 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#9447 + # source://prism//lib/prism/node.rb#10243 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end @@ -16267,61 +16849,61 @@ class Prism::IndexOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9481 + # 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#9457 + # 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#9491 + # 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#9427 + # 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#9387 + # 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#9501 + # source://prism//lib/prism/node.rb#10296 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#9450 + # source://prism//lib/prism/node.rb#10246 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9402 + # source://prism//lib/prism/node.rb#10198 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#9392 + # source://prism//lib/prism/node.rb#10188 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#9407 + # source://prism//lib/prism/node.rb#10203 sig do params( flags: Integer, @@ -16341,13 +16923,13 @@ class Prism::IndexOrWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9387 + # source://prism//lib/prism/node.rb#10183 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#9415 + # source://prism//lib/prism/node.rb#10211 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -16358,43 +16940,43 @@ class Prism::IndexOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9486 + # source://prism//lib/prism/node.rb#10281 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#9511 + # source://prism//lib/prism/node.rb#10306 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String # - # source://prism//lib/prism/node.rb#9496 + # source://prism//lib/prism/node.rb#10291 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#9440 + # source://prism//lib/prism/node.rb#10236 sig { returns(Prism::Location) } def opening_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#9506 + # source://prism//lib/prism/node.rb#10301 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#9460 + # source://prism//lib/prism/node.rb#10256 sig { returns(Prism::Location) } def operator_loc; end # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#9424 + # source://prism//lib/prism/node.rb#10220 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -16402,7 +16984,7 @@ class Prism::IndexOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9471 + # source://prism//lib/prism/node.rb#10266 sig { returns(T::Boolean) } def safe_navigation?; end @@ -16421,13 +17003,13 @@ class Prism::IndexOrWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#9556 + # source://prism//lib/prism/node.rb#10351 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#9467 + # source://prism//lib/prism/node.rb#10263 sig { returns(Prism::Node) } def value; end @@ -16435,15 +17017,15 @@ class Prism::IndexOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9476 + # source://prism//lib/prism/node.rb#10271 sig { returns(T::Boolean) } def variable_call?; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#9420 + # source://prism//lib/prism/node.rb#10216 sig { returns(Integer) } def flags; end @@ -16455,7 +17037,7 @@ class Prism::IndexOrWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#9566 + # source://prism//lib/prism/node.rb#10361 def type; end end end @@ -16473,13 +17055,13 @@ end # for foo[bar] in baz do end # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#9583 +# source://prism//lib/prism/node.rb#10393 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#9585 + # source://prism//lib/prism/node.rb#10395 sig do params( source: Prism::Source, @@ -16494,15 +17076,21 @@ class Prism::IndexTargetNode < ::Prism::Node end def initialize(source, flags, receiver, opening_loc, arguments, closing_loc, block, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#10555 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9598 + # source://prism//lib/prism/node.rb#10408 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#9649 + # source://prism//lib/prism/node.rb#10459 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end @@ -16510,49 +17098,49 @@ class Prism::IndexTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9673 + # source://prism//lib/prism/node.rb#10482 sig { returns(T::Boolean) } def attribute_write?; end # attr_reader block: Prism::node? # - # source://prism//lib/prism/node.rb#9659 + # source://prism//lib/prism/node.rb#10469 sig { returns(T.nilable(Prism::Node)) } def block; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9603 + # source://prism//lib/prism/node.rb#10413 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#9688 + # source://prism//lib/prism/node.rb#10497 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#9652 + # source://prism//lib/prism/node.rb#10462 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9617 + # source://prism//lib/prism/node.rb#10427 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#9608 + # source://prism//lib/prism/node.rb#10418 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#9622 + # source://prism//lib/prism/node.rb#10432 sig do params( flags: Integer, @@ -16569,13 +17157,13 @@ class Prism::IndexTargetNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9603 + # source://prism//lib/prism/node.rb#10413 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#9630 + # source://prism//lib/prism/node.rb#10440 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -16586,31 +17174,31 @@ class Prism::IndexTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9678 + # source://prism//lib/prism/node.rb#10487 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#9693 + # source://prism//lib/prism/node.rb#10502 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String # - # source://prism//lib/prism/node.rb#9683 + # source://prism//lib/prism/node.rb#10492 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#9642 + # source://prism//lib/prism/node.rb#10452 sig { returns(Prism::Location) } def opening_loc; end # attr_reader receiver: Prism::node # - # source://prism//lib/prism/node.rb#9639 + # source://prism//lib/prism/node.rb#10449 sig { returns(Prism::Node) } def receiver; end @@ -16618,7 +17206,7 @@ class Prism::IndexTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9663 + # source://prism//lib/prism/node.rb#10472 sig { returns(T::Boolean) } def safe_navigation?; end @@ -16637,7 +17225,7 @@ class Prism::IndexTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#9730 + # source://prism//lib/prism/node.rb#10539 sig { override.returns(Symbol) } def type; end @@ -16645,15 +17233,15 @@ class Prism::IndexTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9668 + # source://prism//lib/prism/node.rb#10477 sig { returns(T::Boolean) } def variable_call?; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#9635 + # source://prism//lib/prism/node.rb#10445 sig { returns(Integer) } def flags; end @@ -16665,7 +17253,7 @@ class Prism::IndexTargetNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#9740 + # source://prism//lib/prism/node.rb#10549 def type; end end end @@ -16696,13 +17284,13 @@ end # @target &&= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#9749 +# 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 # # @return [InstanceVariableAndWriteNode] a new instance of InstanceVariableAndWriteNode # - # source://prism//lib/prism/node.rb#9751 + # source://prism//lib/prism/node.rb#10572 sig do params( source: Prism::Source, @@ -16715,33 +17303,39 @@ class Prism::InstanceVariableAndWriteNode < ::Prism::Node 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#10681 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9762 + # source://prism//lib/prism/node.rb#10583 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9767 + # source://prism//lib/prism/node.rb#10588 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9777 + # source://prism//lib/prism/node.rb#10598 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#9772 + # source://prism//lib/prism/node.rb#10593 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> InstanceVariableAndWriteNode # - # source://prism//lib/prism/node.rb#9782 + # source://prism//lib/prism/node.rb#10603 sig do params( name: Symbol, @@ -16756,13 +17350,13 @@ class Prism::InstanceVariableAndWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9767 + # source://prism//lib/prism/node.rb#10588 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#9790 + # 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 @@ -16774,31 +17368,31 @@ class Prism::InstanceVariableAndWriteNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#9821 + # source://prism//lib/prism/node.rb#10641 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#9795 + # source://prism//lib/prism/node.rb#10616 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#9798 + # source://prism//lib/prism/node.rb#10619 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#9816 + # source://prism//lib/prism/node.rb#10636 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#9805 + # source://prism//lib/prism/node.rb#10626 sig { returns(Prism::Location) } def operator_loc; end @@ -16817,13 +17411,13 @@ class Prism::InstanceVariableAndWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#9845 + # source://prism//lib/prism/node.rb#10665 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#10633 sig { returns(Prism::Node) } def value; end @@ -16835,7 +17429,7 @@ class Prism::InstanceVariableAndWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#9855 + # source://prism//lib/prism/node.rb#10675 def type; end end end @@ -16845,13 +17439,13 @@ end # @target += value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#9864 +# 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 # # @return [InstanceVariableOperatorWriteNode] a new instance of InstanceVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#9866 + # source://prism//lib/prism/node.rb#10696 sig do params( source: Prism::Source, @@ -16865,33 +17459,39 @@ class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node end def initialize(source, name, name_loc, operator_loc, value, 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#10805 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9878 + # source://prism//lib/prism/node.rb#10708 sig { 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 + # source://prism//lib/prism/node.rb#10713 sig { 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 + # source://prism//lib/prism/node.rb#10723 sig { override.returns(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 + # source://prism//lib/prism/node.rb#10718 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) -> InstanceVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#9898 + # source://prism//lib/prism/node.rb#10728 sig do params( name: Symbol, @@ -16907,13 +17507,13 @@ class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9883 + # source://prism//lib/prism/node.rb#10713 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 } # - # source://prism//lib/prism/node.rb#9906 + # 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 @@ -16925,31 +17525,31 @@ class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#9935 + # source://prism//lib/prism/node.rb#10764 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#9911 + # source://prism//lib/prism/node.rb#10741 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#9914 + # source://prism//lib/prism/node.rb#10744 sig { returns(Prism::Location) } def name_loc; end # attr_reader operator: Symbol # - # source://prism//lib/prism/node.rb#9931 + # source://prism//lib/prism/node.rb#10761 sig { returns(Symbol) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#9921 + # source://prism//lib/prism/node.rb#10751 sig { returns(Prism::Location) } def operator_loc; end @@ -16968,13 +17568,13 @@ class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#9960 + # source://prism//lib/prism/node.rb#10789 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#9928 + # source://prism//lib/prism/node.rb#10758 sig { returns(Prism::Node) } def value; end @@ -16986,7 +17586,7 @@ class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#9970 + # source://prism//lib/prism/node.rb#10799 def type; end end end @@ -16996,13 +17596,13 @@ end # @target ||= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#9979 +# 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 # # @return [InstanceVariableOrWriteNode] a new instance of InstanceVariableOrWriteNode # - # source://prism//lib/prism/node.rb#9981 + # source://prism//lib/prism/node.rb#10821 sig do params( source: Prism::Source, @@ -17015,33 +17615,39 @@ class Prism::InstanceVariableOrWriteNode < ::Prism::Node 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#10930 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9992 + # source://prism//lib/prism/node.rb#10832 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9997 + # source://prism//lib/prism/node.rb#10837 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10007 + # source://prism//lib/prism/node.rb#10847 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10002 + # source://prism//lib/prism/node.rb#10842 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> InstanceVariableOrWriteNode # - # source://prism//lib/prism/node.rb#10012 + # source://prism//lib/prism/node.rb#10852 sig do params( name: Symbol, @@ -17056,13 +17662,13 @@ class Prism::InstanceVariableOrWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9997 + # source://prism//lib/prism/node.rb#10837 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#10020 + # source://prism//lib/prism/node.rb#10860 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -17074,31 +17680,31 @@ class Prism::InstanceVariableOrWriteNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#10051 + # source://prism//lib/prism/node.rb#10890 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#10025 + # source://prism//lib/prism/node.rb#10865 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#10028 + # source://prism//lib/prism/node.rb#10868 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#10046 + # source://prism//lib/prism/node.rb#10885 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#10035 + # source://prism//lib/prism/node.rb#10875 sig { returns(Prism::Location) } def operator_loc; end @@ -17117,13 +17723,13 @@ class Prism::InstanceVariableOrWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#10075 + # source://prism//lib/prism/node.rb#10914 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#10042 + # source://prism//lib/prism/node.rb#10882 sig { returns(Prism::Node) } def value; end @@ -17135,7 +17741,7 @@ class Prism::InstanceVariableOrWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#10085 + # source://prism//lib/prism/node.rb#10924 def type; end end end @@ -17145,56 +17751,62 @@ end # @foo # ^^^^ # -# source://prism//lib/prism/node.rb#10094 +# source://prism//lib/prism/node.rb#10943 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#10096 + # source://prism//lib/prism/node.rb#10945 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#11029 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10104 + # source://prism//lib/prism/node.rb#10953 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10109 + # source://prism//lib/prism/node.rb#10958 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10119 + # source://prism//lib/prism/node.rb#10968 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10114 + # source://prism//lib/prism/node.rb#10963 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#10124 + # 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 # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10109 + # source://prism//lib/prism/node.rb#10958 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#10132 + # source://prism//lib/prism/node.rb#10981 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -17203,7 +17815,7 @@ class Prism::InstanceVariableReadNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#10145 + # source://prism//lib/prism/node.rb#10993 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end @@ -17213,7 +17825,7 @@ class Prism::InstanceVariableReadNode < ::Prism::Node # # @_test # name `:@_test` # - # source://prism//lib/prism/node.rb#10141 + # source://prism//lib/prism/node.rb#10990 sig { returns(Symbol) } def name; end @@ -17232,7 +17844,7 @@ class Prism::InstanceVariableReadNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#10165 + # source://prism//lib/prism/node.rb#11013 sig { override.returns(Symbol) } def type; end @@ -17244,7 +17856,7 @@ class Prism::InstanceVariableReadNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#10175 + # source://prism//lib/prism/node.rb#11023 def type; end end end @@ -17254,56 +17866,62 @@ end # @foo, @bar = baz # ^^^^ ^^^^ # -# source://prism//lib/prism/node.rb#10184 +# source://prism//lib/prism/node.rb#11039 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#10186 + # source://prism//lib/prism/node.rb#11041 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#11121 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10194 + # source://prism//lib/prism/node.rb#11049 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10199 + # source://prism//lib/prism/node.rb#11054 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10209 + # source://prism//lib/prism/node.rb#11064 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10204 + # source://prism//lib/prism/node.rb#11059 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#10214 + # 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 # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10199 + # source://prism//lib/prism/node.rb#11054 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#10222 + # source://prism//lib/prism/node.rb#11077 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -17312,13 +17930,13 @@ class Prism::InstanceVariableTargetNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#10231 + # source://prism//lib/prism/node.rb#11085 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#10227 + # source://prism//lib/prism/node.rb#11082 sig { returns(Symbol) } def name; end @@ -17337,7 +17955,7 @@ class Prism::InstanceVariableTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#10251 + # source://prism//lib/prism/node.rb#11105 sig { override.returns(Symbol) } def type; end @@ -17349,7 +17967,7 @@ class Prism::InstanceVariableTargetNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#10261 + # source://prism//lib/prism/node.rb#11115 def type; end end end @@ -17359,13 +17977,13 @@ end # @foo = 1 # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#10270 +# source://prism//lib/prism/node.rb#11131 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#10272 + # source://prism//lib/prism/node.rb#11133 sig do params( source: Prism::Source, @@ -17378,33 +17996,39 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node end def initialize(source, name, name_loc, value, operator_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#11258 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10283 + # source://prism//lib/prism/node.rb#11144 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10288 + # source://prism//lib/prism/node.rb#11149 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10298 + # source://prism//lib/prism/node.rb#11159 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10293 + # source://prism//lib/prism/node.rb#11154 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#10303 + # source://prism//lib/prism/node.rb#11164 sig do params( name: Symbol, @@ -17419,13 +18043,13 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10288 + # source://prism//lib/prism/node.rb#11149 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#10311 + # source://prism//lib/prism/node.rb#11172 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -17434,7 +18058,7 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#10359 + # source://prism//lib/prism/node.rb#11218 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end @@ -17444,7 +18068,7 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # # @_foo = "bar" # name `@_foo` # - # source://prism//lib/prism/node.rb#10320 + # source://prism//lib/prism/node.rb#11181 sig { returns(Symbol) } def name; end @@ -17453,13 +18077,13 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # @_x = 1 # ^^^ # - # source://prism//lib/prism/node.rb#10326 + # source://prism//lib/prism/node.rb#11187 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#10354 + # source://prism//lib/prism/node.rb#11213 sig { returns(String) } def operator; end @@ -17468,7 +18092,7 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # @x = y # ^ # - # source://prism//lib/prism/node.rb#10346 + # source://prism//lib/prism/node.rb#11206 sig { returns(Prism::Location) } def operator_loc; end @@ -17487,12 +18111,11 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#10383 + # source://prism//lib/prism/node.rb#11242 sig { override.returns(Symbol) } def type; end - # The value to assign to the instance variable. Can be any node that - # represents a non-void expression. + # The value to write to the instance variable. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). # # @foo = :bar # ^^^^ @@ -17500,7 +18123,7 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # @_x = 1234 # ^^^^ # - # source://prism//lib/prism/node.rb#10340 + # source://prism//lib/prism/node.rb#11200 sig { returns(Prism::Node) } def value; end @@ -17512,34 +18135,34 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#10393 + # source://prism//lib/prism/node.rb#11252 def type; end end end # Flags for integer nodes that correspond to the base of the integer. # -# source://prism//lib/prism/node.rb#18866 +# source://prism//lib/prism/node.rb#20373 module Prism::IntegerBaseFlags; end # 0b prefix # -# source://prism//lib/prism/node.rb#18868 +# source://prism//lib/prism/node.rb#20375 Prism::IntegerBaseFlags::BINARY = T.let(T.unsafe(nil), Integer) # 0d or no prefix # -# source://prism//lib/prism/node.rb#18871 +# source://prism//lib/prism/node.rb#20378 Prism::IntegerBaseFlags::DECIMAL = T.let(T.unsafe(nil), Integer) # 0x prefix # -# source://prism//lib/prism/node.rb#18877 +# source://prism//lib/prism/node.rb#20384 Prism::IntegerBaseFlags::HEXADECIMAL = T.let(T.unsafe(nil), Integer) # 0o or 0 prefix # -# source://prism//lib/prism/node.rb#18874 +# source://prism//lib/prism/node.rb#20381 Prism::IntegerBaseFlags::OCTAL = T.let(T.unsafe(nil), Integer) # Represents an integer number literal. @@ -17547,19 +18170,25 @@ Prism::IntegerBaseFlags::OCTAL = T.let(T.unsafe(nil), Integer) # 1 # ^ # -# source://prism//lib/prism/node.rb#10402 +# source://prism//lib/prism/node.rb#11271 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#10404 + # source://prism//lib/prism/node.rb#11273 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 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10413 + # source://prism//lib/prism/node.rb#11282 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -17567,31 +18196,31 @@ class Prism::IntegerNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10454 + # source://prism//lib/prism/node.rb#11322 sig { returns(T::Boolean) } def binary?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10418 + # source://prism//lib/prism/node.rb#11287 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10428 + # source://prism//lib/prism/node.rb#11297 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10423 + # source://prism//lib/prism/node.rb#11292 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#10433 + # source://prism//lib/prism/node.rb#11302 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 @@ -17599,20 +18228,20 @@ class Prism::IntegerNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10459 + # source://prism//lib/prism/node.rb#11327 sig { returns(T::Boolean) } def decimal?; end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10418 + # source://prism//lib/prism/node.rb#11287 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#10441 + # source://prism//lib/prism/node.rb#11310 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -17623,13 +18252,13 @@ class Prism::IntegerNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10469 + # source://prism//lib/prism/node.rb#11337 sig { returns(T::Boolean) } def hexadecimal?; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#10474 + # source://prism//lib/prism/node.rb#11342 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end @@ -17637,7 +18266,7 @@ class Prism::IntegerNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10464 + # source://prism//lib/prism/node.rb#11332 sig { returns(T::Boolean) } def octal?; end @@ -17656,21 +18285,21 @@ class Prism::IntegerNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#10496 + # source://prism//lib/prism/node.rb#11364 sig { override.returns(Symbol) } def type; end # The value of the integer literal as a number. # - # source://prism//lib/prism/node.rb#10450 + # source://prism//lib/prism/node.rb#11319 sig { returns(Integer) } def value; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#10446 + # source://prism//lib/prism/node.rb#11315 sig { returns(Integer) } def flags; end @@ -17682,7 +18311,7 @@ class Prism::IntegerNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#10506 + # source://prism//lib/prism/node.rb#11374 def type; end end end @@ -17692,7 +18321,7 @@ end # if /foo #{bar} baz/ then end # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#10515 +# source://prism//lib/prism/node.rb#11391 class Prism::InterpolatedMatchLastLineNode < ::Prism::Node include ::Prism::RegularExpressionOptions @@ -17700,7 +18329,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [InterpolatedMatchLastLineNode] a new instance of InterpolatedMatchLastLineNode # - # source://prism//lib/prism/node.rb#10517 + # source://prism//lib/prism/node.rb#11393 sig do params( source: Prism::Source, @@ -17713,9 +18342,15 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node end def initialize(source, flags, opening_loc, parts, closing_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#11568 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10528 + # source://prism//lib/prism/node.rb#11404 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -17723,43 +18358,43 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10613 + # source://prism//lib/prism/node.rb#11488 sig { returns(T::Boolean) } def ascii_8bit?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10538 + # source://prism//lib/prism/node.rb#11414 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#10648 + # source://prism//lib/prism/node.rb#11523 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#10580 + # source://prism//lib/prism/node.rb#11456 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10548 + # source://prism//lib/prism/node.rb#11424 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10543 + # source://prism//lib/prism/node.rb#11419 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#10553 + # source://prism//lib/prism/node.rb#11429 sig do params( flags: Integer, @@ -17774,13 +18409,13 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10538 + # source://prism//lib/prism/node.rb#11414 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#10561 + # source://prism//lib/prism/node.rb#11437 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -17788,7 +18423,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10608 + # source://prism//lib/prism/node.rb#11483 sig { returns(T::Boolean) } def euc_jp?; end @@ -17796,7 +18431,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10593 + # source://prism//lib/prism/node.rb#11468 sig { returns(T::Boolean) } def extended?; end @@ -17807,7 +18442,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10633 + # source://prism//lib/prism/node.rb#11508 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -17815,7 +18450,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10638 + # source://prism//lib/prism/node.rb#11513 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end @@ -17823,7 +18458,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10628 + # source://prism//lib/prism/node.rb#11503 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -17831,13 +18466,13 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10588 + # source://prism//lib/prism/node.rb#11463 sig { returns(T::Boolean) } def ignore_case?; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#10653 + # source://prism//lib/prism/node.rb#11528 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end @@ -17845,7 +18480,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10598 + # source://prism//lib/prism/node.rb#11473 sig { returns(T::Boolean) } def multi_line?; end @@ -17853,19 +18488,19 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10603 + # source://prism//lib/prism/node.rb#11478 sig { returns(T::Boolean) } def once?; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#10643 + # source://prism//lib/prism/node.rb#11518 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#10570 + # source://prism//lib/prism/node.rb#11446 sig { returns(Prism::Location) } def opening_loc; end @@ -17874,11 +18509,11 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] # - # source://prism//lib/prism/node.rb#10577 + # source://prism//lib/prism/node.rb#11453 sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } def parts; end - # source://prism//lib/prism/node.rb#10532 + # 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 @@ -17896,7 +18531,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#10677 + # source://prism//lib/prism/node.rb#11552 sig { override.returns(Symbol) } def type; end @@ -17904,7 +18539,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10623 + # source://prism//lib/prism/node.rb#11498 sig { returns(T::Boolean) } def utf_8?; end @@ -17912,15 +18547,15 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10618 + # source://prism//lib/prism/node.rb#11493 sig { returns(T::Boolean) } def windows_31j?; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#10566 + # source://prism//lib/prism/node.rb#11442 sig { returns(Integer) } def flags; end @@ -17932,7 +18567,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#10687 + # source://prism//lib/prism/node.rb#11562 def type; end end end @@ -17942,7 +18577,7 @@ end # /foo #{bar} baz/ # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#10696 +# source://prism//lib/prism/node.rb#11582 class Prism::InterpolatedRegularExpressionNode < ::Prism::Node include ::Prism::RegularExpressionOptions @@ -17950,7 +18585,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [InterpolatedRegularExpressionNode] a new instance of InterpolatedRegularExpressionNode # - # source://prism//lib/prism/node.rb#10698 + # source://prism//lib/prism/node.rb#11584 sig do params( source: Prism::Source, @@ -17963,9 +18598,15 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node end def initialize(source, flags, opening_loc, parts, closing_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#11759 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10709 + # source://prism//lib/prism/node.rb#11595 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -17973,43 +18614,43 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10794 + # source://prism//lib/prism/node.rb#11679 sig { returns(T::Boolean) } def ascii_8bit?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10719 + # source://prism//lib/prism/node.rb#11605 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#10829 + # source://prism//lib/prism/node.rb#11714 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#10761 + # source://prism//lib/prism/node.rb#11647 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10729 + # source://prism//lib/prism/node.rb#11615 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10724 + # source://prism//lib/prism/node.rb#11610 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#10734 + # source://prism//lib/prism/node.rb#11620 sig do params( flags: Integer, @@ -18024,13 +18665,13 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10719 + # source://prism//lib/prism/node.rb#11605 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#10742 + # source://prism//lib/prism/node.rb#11628 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -18038,7 +18679,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10789 + # source://prism//lib/prism/node.rb#11674 sig { returns(T::Boolean) } def euc_jp?; end @@ -18046,7 +18687,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10774 + # source://prism//lib/prism/node.rb#11659 sig { returns(T::Boolean) } def extended?; end @@ -18057,7 +18698,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10814 + # source://prism//lib/prism/node.rb#11699 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -18065,7 +18706,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10819 + # source://prism//lib/prism/node.rb#11704 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end @@ -18073,7 +18714,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10809 + # source://prism//lib/prism/node.rb#11694 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -18081,13 +18722,13 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10769 + # source://prism//lib/prism/node.rb#11654 sig { returns(T::Boolean) } def ignore_case?; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#10834 + # source://prism//lib/prism/node.rb#11719 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end @@ -18095,7 +18736,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10779 + # source://prism//lib/prism/node.rb#11664 sig { returns(T::Boolean) } def multi_line?; end @@ -18103,19 +18744,19 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10784 + # source://prism//lib/prism/node.rb#11669 sig { returns(T::Boolean) } def once?; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#10824 + # source://prism//lib/prism/node.rb#11709 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#10751 + # source://prism//lib/prism/node.rb#11637 sig { returns(Prism::Location) } def opening_loc; end @@ -18124,11 +18765,11 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] # - # source://prism//lib/prism/node.rb#10758 + # source://prism//lib/prism/node.rb#11644 sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } def parts; end - # source://prism//lib/prism/node.rb#10713 + # 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 @@ -18146,7 +18787,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#10858 + # source://prism//lib/prism/node.rb#11743 sig { override.returns(Symbol) } def type; end @@ -18154,7 +18795,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10804 + # source://prism//lib/prism/node.rb#11689 sig { returns(T::Boolean) } def utf_8?; end @@ -18162,15 +18803,15 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10799 + # source://prism//lib/prism/node.rb#11684 sig { returns(T::Boolean) } def windows_31j?; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#10747 + # source://prism//lib/prism/node.rb#11633 sig { returns(Integer) } def flags; end @@ -18182,7 +18823,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#10868 + # source://prism//lib/prism/node.rb#11753 def type; end end end @@ -18192,7 +18833,7 @@ end # "foo #{bar} baz" # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#10877 +# source://prism//lib/prism/node.rb#11773 class Prism::InterpolatedStringNode < ::Prism::Node include ::Prism::HeredocQuery @@ -18200,7 +18841,7 @@ class Prism::InterpolatedStringNode < ::Prism::Node # # @return [InterpolatedStringNode] a new instance of InterpolatedStringNode # - # source://prism//lib/prism/node.rb#10879 + # source://prism//lib/prism/node.rb#11775 sig do params( source: Prism::Source, @@ -18213,45 +18854,51 @@ class Prism::InterpolatedStringNode < ::Prism::Node end def initialize(source, flags, opening_loc, parts, closing_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#11917 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10890 + # source://prism//lib/prism/node.rb#11786 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10900 + # source://prism//lib/prism/node.rb#11796 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#10977 + # source://prism//lib/prism/node.rb#11872 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#10948 + # source://prism//lib/prism/node.rb#11844 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10910 + # source://prism//lib/prism/node.rb#11806 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10905 + # source://prism//lib/prism/node.rb#11801 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#10915 + # source://prism//lib/prism/node.rb#11811 sig do params( flags: Integer, @@ -18266,13 +18913,13 @@ class Prism::InterpolatedStringNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10900 + # source://prism//lib/prism/node.rb#11796 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#10923 + # source://prism//lib/prism/node.rb#11819 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -18283,7 +18930,7 @@ class Prism::InterpolatedStringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10962 + # source://prism//lib/prism/node.rb#11857 sig { returns(T::Boolean) } def frozen?; end @@ -18292,7 +18939,7 @@ class Prism::InterpolatedStringNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#10982 + # source://prism//lib/prism/node.rb#11877 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end @@ -18300,31 +18947,31 @@ class Prism::InterpolatedStringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10967 + # source://prism//lib/prism/node.rb#11862 sig { returns(T::Boolean) } def mutable?; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#10972 + # source://prism//lib/prism/node.rb#11867 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#10932 + # source://prism//lib/prism/node.rb#11828 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode] # - # source://prism//lib/prism/node.rb#10945 + # source://prism//lib/prism/node.rb#11841 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#10894 + # 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 @@ -18342,15 +18989,15 @@ class Prism::InterpolatedStringNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#11006 + # source://prism//lib/prism/node.rb#11901 sig { override.returns(Symbol) } def type; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#10928 + # source://prism//lib/prism/node.rb#11824 sig { returns(Integer) } def flags; end @@ -18362,20 +19009,20 @@ class Prism::InterpolatedStringNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#11016 + # source://prism//lib/prism/node.rb#11911 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#18881 +# source://prism//lib/prism/node.rb#20388 module Prism::InterpolatedStringNodeFlags; end -# source://prism//lib/prism/node.rb#18883 +# source://prism//lib/prism/node.rb#20390 Prism::InterpolatedStringNodeFlags::FROZEN = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/node.rb#18886 +# source://prism//lib/prism/node.rb#20393 Prism::InterpolatedStringNodeFlags::MUTABLE = T.let(T.unsafe(nil), Integer) # Represents a symbol literal that contains interpolation. @@ -18383,13 +19030,13 @@ Prism::InterpolatedStringNodeFlags::MUTABLE = T.let(T.unsafe(nil), Integer) # :"foo #{bar} baz" # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11025 +# source://prism//lib/prism/node.rb#11931 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#11027 + # source://prism//lib/prism/node.rb#11933 sig do params( source: Prism::Source, @@ -18401,45 +19048,51 @@ class Prism::InterpolatedSymbolNode < ::Prism::Node end def initialize(source, opening_loc, parts, closing_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#12058 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11037 + # source://prism//lib/prism/node.rb#11943 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11047 + # source://prism//lib/prism/node.rb#11953 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#11110 + # source://prism//lib/prism/node.rb#12015 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#11091 + # source://prism//lib/prism/node.rb#11997 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11057 + # source://prism//lib/prism/node.rb#11963 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11052 + # source://prism//lib/prism/node.rb#11958 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#11062 + # source://prism//lib/prism/node.rb#11968 sig do params( opening_loc: T.nilable(Prism::Location), @@ -18453,13 +19106,13 @@ class Prism::InterpolatedSymbolNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11047 + # source://prism//lib/prism/node.rb#11953 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#11070 + # source://prism//lib/prism/node.rb#11976 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -18468,29 +19121,29 @@ class Prism::InterpolatedSymbolNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#11115 + # source://prism//lib/prism/node.rb#12020 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#11105 + # source://prism//lib/prism/node.rb#12010 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#11075 + # source://prism//lib/prism/node.rb#11981 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] # - # source://prism//lib/prism/node.rb#11088 + # source://prism//lib/prism/node.rb#11994 sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } def parts; end - # source://prism//lib/prism/node.rb#11041 + # 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 @@ -18508,7 +19161,7 @@ class Prism::InterpolatedSymbolNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#11137 + # source://prism//lib/prism/node.rb#12042 sig { override.returns(Symbol) } def type; end @@ -18520,7 +19173,7 @@ class Prism::InterpolatedSymbolNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#11147 + # source://prism//lib/prism/node.rb#12052 def type; end end end @@ -18530,7 +19183,7 @@ end # `foo #{bar} baz` # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11156 +# source://prism//lib/prism/node.rb#12071 class Prism::InterpolatedXStringNode < ::Prism::Node include ::Prism::HeredocQuery @@ -18538,7 +19191,7 @@ class Prism::InterpolatedXStringNode < ::Prism::Node # # @return [InterpolatedXStringNode] a new instance of InterpolatedXStringNode # - # source://prism//lib/prism/node.rb#11158 + # source://prism//lib/prism/node.rb#12073 sig do params( source: Prism::Source, @@ -18550,45 +19203,51 @@ class Prism::InterpolatedXStringNode < ::Prism::Node end def initialize(source, opening_loc, parts, closing_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#12186 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11168 + # source://prism//lib/prism/node.rb#12083 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11178 + # source://prism//lib/prism/node.rb#12093 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#11229 + # source://prism//lib/prism/node.rb#12143 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#11216 + # source://prism//lib/prism/node.rb#12131 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11188 + # source://prism//lib/prism/node.rb#12103 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11183 + # source://prism//lib/prism/node.rb#12098 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#11193 + # source://prism//lib/prism/node.rb#12108 sig do params( opening_loc: Prism::Location, @@ -18602,13 +19261,13 @@ class Prism::InterpolatedXStringNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11178 + # source://prism//lib/prism/node.rb#12093 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#11201 + # source://prism//lib/prism/node.rb#12116 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -18620,29 +19279,29 @@ class Prism::InterpolatedXStringNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#11234 + # source://prism//lib/prism/node.rb#12148 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String # - # source://prism//lib/prism/node.rb#11224 + # source://prism//lib/prism/node.rb#12138 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#11206 + # source://prism//lib/prism/node.rb#12121 sig { returns(Prism::Location) } def opening_loc; end # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] # - # source://prism//lib/prism/node.rb#11213 + # source://prism//lib/prism/node.rb#12128 sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } def parts; end - # source://prism//lib/prism/node.rb#11172 + # 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 @@ -18660,7 +19319,7 @@ class Prism::InterpolatedXStringNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#11256 + # source://prism//lib/prism/node.rb#12170 sig { override.returns(Symbol) } def type; end @@ -18672,7 +19331,7 @@ class Prism::InterpolatedXStringNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#11266 + # source://prism//lib/prism/node.rb#12180 def type; end end end @@ -18682,56 +19341,62 @@ end # -> { it + it } # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11275 +# source://prism//lib/prism/node.rb#12199 class Prism::ItParametersNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [ItParametersNode] a new instance of ItParametersNode # - # source://prism//lib/prism/node.rb#11277 + # source://prism//lib/prism/node.rb#12201 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 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11284 + # source://prism//lib/prism/node.rb#12208 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11289 + # source://prism//lib/prism/node.rb#12213 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11299 + # source://prism//lib/prism/node.rb#12223 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11294 + # source://prism//lib/prism/node.rb#12218 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?location: Location) -> ItParametersNode # - # source://prism//lib/prism/node.rb#11304 + # source://prism//lib/prism/node.rb#12228 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#11289 + # source://prism//lib/prism/node.rb#12213 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#11312 + # source://prism//lib/prism/node.rb#12236 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -18740,7 +19405,7 @@ class Prism::ItParametersNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#11318 + # source://prism//lib/prism/node.rb#12241 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end @@ -18759,7 +19424,7 @@ class Prism::ItParametersNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#11337 + # source://prism//lib/prism/node.rb#12260 sig { override.returns(Symbol) } def type; end @@ -18771,7 +19436,7 @@ class Prism::ItParametersNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#11347 + # source://prism//lib/prism/node.rb#12270 def type; end end end @@ -18781,13 +19446,13 @@ end # foo(a: b) # ^^^^ # -# source://prism//lib/prism/node.rb#11356 +# source://prism//lib/prism/node.rb#12285 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#11358 + # source://prism//lib/prism/node.rb#12287 sig do params( source: Prism::Source, @@ -18798,33 +19463,39 @@ class Prism::KeywordHashNode < ::Prism::Node end def initialize(source, flags, elements, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#12379 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11367 + # source://prism//lib/prism/node.rb#12296 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11372 + # source://prism//lib/prism/node.rb#12301 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11382 + # source://prism//lib/prism/node.rb#12311 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11377 + # source://prism//lib/prism/node.rb#12306 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#11387 + # source://prism//lib/prism/node.rb#12316 sig do params( flags: Integer, @@ -18837,19 +19508,19 @@ class Prism::KeywordHashNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11372 + # source://prism//lib/prism/node.rb#12301 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#11395 + # source://prism//lib/prism/node.rb#12324 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#11404 + # source://prism//lib/prism/node.rb#12333 sig { returns(T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)]) } def elements; end @@ -18858,7 +19529,7 @@ class Prism::KeywordHashNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#11413 + # source://prism//lib/prism/node.rb#12341 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end @@ -18866,7 +19537,7 @@ class Prism::KeywordHashNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11408 + # source://prism//lib/prism/node.rb#12336 sig { returns(T::Boolean) } def symbol_keys?; end @@ -18885,15 +19556,15 @@ class Prism::KeywordHashNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#11435 + # source://prism//lib/prism/node.rb#12363 sig { override.returns(Symbol) } def type; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#11400 + # source://prism//lib/prism/node.rb#12329 sig { returns(Integer) } def flags; end @@ -18905,19 +19576,19 @@ class Prism::KeywordHashNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#11445 + # source://prism//lib/prism/node.rb#12373 def type; end end end # Flags for keyword hash nodes. # -# source://prism//lib/prism/node.rb#18890 +# source://prism//lib/prism/node.rb#20397 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#18892 +# source://prism//lib/prism/node.rb#20399 Prism::KeywordHashNodeFlags::SYMBOL_KEYS = T.let(T.unsafe(nil), Integer) # Represents a keyword rest parameter to a method, block, or lambda definition. @@ -18926,13 +19597,13 @@ Prism::KeywordHashNodeFlags::SYMBOL_KEYS = T.let(T.unsafe(nil), Integer) # ^^^ # end # -# source://prism//lib/prism/node.rb#11455 +# source://prism//lib/prism/node.rb#12392 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#11457 + # source://prism//lib/prism/node.rb#12394 sig do params( source: Prism::Source, @@ -18945,33 +19616,39 @@ class Prism::KeywordRestParameterNode < ::Prism::Node end def initialize(source, flags, name, name_loc, operator_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#12519 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11468 + # source://prism//lib/prism/node.rb#12405 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11473 + # source://prism//lib/prism/node.rb#12410 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11483 + # source://prism//lib/prism/node.rb#12420 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11478 + # source://prism//lib/prism/node.rb#12415 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#11488 + # source://prism//lib/prism/node.rb#12425 sig do params( flags: Integer, @@ -18986,13 +19663,13 @@ class Prism::KeywordRestParameterNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11473 + # source://prism//lib/prism/node.rb#12410 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#11496 + # source://prism//lib/prism/node.rb#12433 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -19001,31 +19678,31 @@ class Prism::KeywordRestParameterNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#11539 + # source://prism//lib/prism/node.rb#12475 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol? # - # source://prism//lib/prism/node.rb#11505 + # source://prism//lib/prism/node.rb#12442 sig { returns(T.nilable(Symbol)) } def name; end # attr_reader name_loc: Location? # - # source://prism//lib/prism/node.rb#11508 + # source://prism//lib/prism/node.rb#12445 sig { returns(T.nilable(Prism::Location)) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#11534 + # source://prism//lib/prism/node.rb#12470 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#11521 + # source://prism//lib/prism/node.rb#12458 sig { returns(Prism::Location) } def operator_loc; end @@ -19033,7 +19710,7 @@ class Prism::KeywordRestParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11529 + # source://prism//lib/prism/node.rb#12465 sig { returns(T::Boolean) } def repeated_parameter?; end @@ -19052,15 +19729,15 @@ class Prism::KeywordRestParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#11567 + # source://prism//lib/prism/node.rb#12503 sig { override.returns(Symbol) } def type; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#11501 + # source://prism//lib/prism/node.rb#12438 sig { returns(Integer) } def flags; end @@ -19072,7 +19749,7 @@ class Prism::KeywordRestParameterNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#11577 + # source://prism//lib/prism/node.rb#12513 def type; end end end @@ -19082,13 +19759,13 @@ end # ->(value) { value * 2 } # ^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11586 +# source://prism//lib/prism/node.rb#12532 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#11588 + # source://prism//lib/prism/node.rb#12534 sig do params( source: Prism::Source, @@ -19103,51 +19780,57 @@ class Prism::LambdaNode < ::Prism::Node end def initialize(source, locals, operator_loc, opening_loc, closing_loc, parameters, body, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#12679 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11601 + # source://prism//lib/prism/node.rb#12547 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: Prism::node? # - # source://prism//lib/prism/node.rb#11664 + # source://prism//lib/prism/node.rb#12610 sig { returns(T.nilable(Prism::Node)) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11606 + # source://prism//lib/prism/node.rb#12552 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#11678 + # source://prism//lib/prism/node.rb#12623 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#11654 + # source://prism//lib/prism/node.rb#12600 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11619 + # source://prism//lib/prism/node.rb#12565 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11611 + # source://prism//lib/prism/node.rb#12557 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#11624 + # source://prism//lib/prism/node.rb#12570 sig do params( locals: T::Array[Symbol], @@ -19164,13 +19847,13 @@ class Prism::LambdaNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11606 + # source://prism//lib/prism/node.rb#12552 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#11632 + # source://prism//lib/prism/node.rb#12578 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -19179,43 +19862,43 @@ class Prism::LambdaNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#11683 + # source://prism//lib/prism/node.rb#12628 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#11637 + # source://prism//lib/prism/node.rb#12583 sig { returns(T::Array[Symbol]) } def locals; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#11673 + # source://prism//lib/prism/node.rb#12618 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#11647 + # source://prism//lib/prism/node.rb#12593 sig { returns(Prism::Location) } def opening_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#11668 + # source://prism//lib/prism/node.rb#12613 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#11640 + # source://prism//lib/prism/node.rb#12586 sig { returns(Prism::Location) } def operator_loc; end # attr_reader parameters: Prism::node? # - # source://prism//lib/prism/node.rb#11661 + # source://prism//lib/prism/node.rb#12607 sig { returns(T.nilable(Prism::Node)) } def parameters; end @@ -19234,7 +19917,7 @@ class Prism::LambdaNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#11718 + # source://prism//lib/prism/node.rb#12663 sig { override.returns(Symbol) } def type; end @@ -19246,7 +19929,7 @@ class Prism::LambdaNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#11728 + # source://prism//lib/prism/node.rb#12673 def type; end end end @@ -19261,29 +19944,29 @@ end class Prism::LexCompat # @return [LexCompat] a new instance of LexCompat # - # source://prism//lib/prism/lex_compat.rb#602 + # source://prism//lib/prism/lex_compat.rb#619 def initialize(source, **options); end # Returns the value of attribute options. # - # source://prism//lib/prism/lex_compat.rb#600 + # source://prism//lib/prism/lex_compat.rb#617 def options; end - # source://prism//lib/prism/lex_compat.rb#607 + # source://prism//lib/prism/lex_compat.rb#624 def result; end # Returns the value of attribute source. # - # source://prism//lib/prism/lex_compat.rb#600 + # source://prism//lib/prism/lex_compat.rb#617 def source; end end # Ripper doesn't include the rest of the token in the event, so we need to # trim it down to just the content on the first line when comparing. # -# source://prism//lib/prism/lex_compat.rb#213 +# source://prism//lib/prism/lex_compat.rb#230 class Prism::LexCompat::EndContentToken < ::Prism::LexCompat::Token - # source://prism//lib/prism/lex_compat.rb#214 + # source://prism//lib/prism/lex_compat.rb#231 def ==(other); end end @@ -19291,13 +19974,13 @@ end # heredoc that should be appended onto the list of tokens when the heredoc # closes. # -# source://prism//lib/prism/lex_compat.rb#274 +# source://prism//lib/prism/lex_compat.rb#291 module Prism::LexCompat::Heredoc class << self # Here we will split between the two types of heredocs and return the # object that will store their tokens. # - # source://prism//lib/prism/lex_compat.rb#586 + # source://prism//lib/prism/lex_compat.rb#603 def build(opening); end end end @@ -19306,23 +19989,23 @@ end # that need to be split on "\\\n" to mimic Ripper's behavior. We also need # to keep track of the state that the heredoc was opened in. # -# source://prism//lib/prism/lex_compat.rb#298 +# source://prism//lib/prism/lex_compat.rb#315 class Prism::LexCompat::Heredoc::DashHeredoc # @return [DashHeredoc] a new instance of DashHeredoc # - # source://prism//lib/prism/lex_compat.rb#301 + # source://prism//lib/prism/lex_compat.rb#318 def initialize(split); end - # source://prism//lib/prism/lex_compat.rb#306 + # source://prism//lib/prism/lex_compat.rb#323 def <<(token); end - # source://prism//lib/prism/lex_compat.rb#299 + # source://prism//lib/prism/lex_compat.rb#316 def split; end - # source://prism//lib/prism/lex_compat.rb#310 + # source://prism//lib/prism/lex_compat.rb#327 def to_a; end - # source://prism//lib/prism/lex_compat.rb#299 + # source://prism//lib/prism/lex_compat.rb#316 def tokens; end end @@ -19337,45 +20020,45 @@ end # some extra manipulation on the tokens to make them match Ripper's # output by mirroring the dedent logic that Ripper uses. # -# source://prism//lib/prism/lex_compat.rb#357 +# source://prism//lib/prism/lex_compat.rb#374 class Prism::LexCompat::Heredoc::DedentingHeredoc # @return [DedentingHeredoc] a new instance of DedentingHeredoc # - # source://prism//lib/prism/lex_compat.rb#362 + # source://prism//lib/prism/lex_compat.rb#379 def initialize; end # As tokens are coming in, we track the minimum amount of common leading # whitespace on plain string content tokens. This allows us to later # remove that amount of whitespace from the beginning of each line. # - # source://prism//lib/prism/lex_compat.rb#373 + # source://prism//lib/prism/lex_compat.rb#390 def <<(token); end # Returns the value of attribute dedent. # - # source://prism//lib/prism/lex_compat.rb#360 + # source://prism//lib/prism/lex_compat.rb#377 def dedent; end # Returns the value of attribute dedent_next. # - # source://prism//lib/prism/lex_compat.rb#360 + # source://prism//lib/prism/lex_compat.rb#377 def dedent_next; end # Returns the value of attribute embexpr_balance. # - # source://prism//lib/prism/lex_compat.rb#360 + # source://prism//lib/prism/lex_compat.rb#377 def embexpr_balance; end - # source://prism//lib/prism/lex_compat.rb#410 + # source://prism//lib/prism/lex_compat.rb#427 def to_a; end # Returns the value of attribute tokens. # - # source://prism//lib/prism/lex_compat.rb#360 + # source://prism//lib/prism/lex_compat.rb#377 def tokens; end end -# source://prism//lib/prism/lex_compat.rb#358 +# source://prism//lib/prism/lex_compat.rb#375 Prism::LexCompat::Heredoc::DedentingHeredoc::TAB_WIDTH = T.let(T.unsafe(nil), Integer) # Heredocs that are no dash or tilde heredocs are just a list of tokens. @@ -19383,20 +20066,20 @@ Prism::LexCompat::Heredoc::DedentingHeredoc::TAB_WIDTH = T.let(T.unsafe(nil), In # order back into the token stream and set the state of the last token to # the state that the heredoc was opened in. # -# source://prism//lib/prism/lex_compat.rb#279 +# source://prism//lib/prism/lex_compat.rb#296 class Prism::LexCompat::Heredoc::PlainHeredoc # @return [PlainHeredoc] a new instance of PlainHeredoc # - # source://prism//lib/prism/lex_compat.rb#282 + # source://prism//lib/prism/lex_compat.rb#299 def initialize; end - # source://prism//lib/prism/lex_compat.rb#286 + # source://prism//lib/prism/lex_compat.rb#303 def <<(token); end - # source://prism//lib/prism/lex_compat.rb#290 + # source://prism//lib/prism/lex_compat.rb#307 def to_a; end - # source://prism//lib/prism/lex_compat.rb#280 + # source://prism//lib/prism/lex_compat.rb#297 def tokens; end end @@ -19405,27 +20088,27 @@ end # through named captures in regular expressions). In that case we don't # compare the state. # -# source://prism//lib/prism/lex_compat.rb#231 +# source://prism//lib/prism/lex_compat.rb#248 class Prism::LexCompat::IdentToken < ::Prism::LexCompat::Token - # source://prism//lib/prism/lex_compat.rb#232 + # source://prism//lib/prism/lex_compat.rb#249 def ==(other); end end # Tokens where state should be ignored # used for :on_comment, :on_heredoc_end, :on_embexpr_end # -# source://prism//lib/prism/lex_compat.rb#221 +# source://prism//lib/prism/lex_compat.rb#238 class Prism::LexCompat::IgnoreStateToken < ::Prism::LexCompat::Token - # source://prism//lib/prism/lex_compat.rb#222 + # source://prism//lib/prism/lex_compat.rb#239 def ==(other); end end # Ignored newlines can occasionally have a LABEL state attached to them, so # we compare the state differently here. # -# source://prism//lib/prism/lex_compat.rb#242 +# source://prism//lib/prism/lex_compat.rb#259 class Prism::LexCompat::IgnoredNewlineToken < ::Prism::LexCompat::Token - # source://prism//lib/prism/lex_compat.rb#243 + # source://prism//lib/prism/lex_compat.rb#260 def ==(other); end end @@ -19438,9 +20121,9 @@ end # more accurately, so we need to allow comparing against both END and # END|LABEL. # -# source://prism//lib/prism/lex_compat.rb#262 +# source://prism//lib/prism/lex_compat.rb#279 class Prism::LexCompat::ParamToken < ::Prism::LexCompat::Token - # source://prism//lib/prism/lex_compat.rb#263 + # source://prism//lib/prism/lex_compat.rb#280 def ==(other); end end @@ -19448,55 +20131,112 @@ end # many-to-one mapping because we split up our token types, whereas Ripper # tends to group them. # -# source://prism//lib/prism/lex_compat.rb#16 +# source://prism//lib/prism/lex_compat.rb#33 Prism::LexCompat::RIPPER = T.let(T.unsafe(nil), Hash) +# A result class specialized for holding tokens produced by the lexer. +# +# source://prism//lib/prism/lex_compat.rb#14 +class Prism::LexCompat::Result < ::Prism::Result + # Create a new lex compat result object with the given values. + # + # @return [Result] a new instance of Result + # + # source://prism//lib/prism/lex_compat.rb#19 + def initialize(value, comments, magic_comments, data_loc, errors, warnings, source); end + + # Implement the hash pattern matching interface for Result. + # + # source://prism//lib/prism/lex_compat.rb#25 + def deconstruct_keys(keys); end + + # The list of tokens that were produced by the lexer. + # + # source://prism//lib/prism/lex_compat.rb#16 + def value; end +end + # When we produce tokens, we produce the same arrays that Ripper does. # However, we add a couple of convenience methods onto them to make them a # little easier to work with. We delegate all other methods to the array. # -# source://prism//lib/prism/lex_compat.rb#187 +# source://prism//lib/prism/lex_compat.rb#204 class Prism::LexCompat::Token < ::SimpleDelegator # The type of the token. # - # source://prism//lib/prism/lex_compat.rb#196 + # source://prism//lib/prism/lex_compat.rb#213 def event; end # The location of the token in the source. # - # source://prism//lib/prism/lex_compat.rb#191 + # source://prism//lib/prism/lex_compat.rb#208 def location; end # The state of the lexer when this token was produced. # - # source://prism//lib/prism/lex_compat.rb#206 + # source://prism//lib/prism/lex_compat.rb#223 def state; end # The slice of the source that this token represents. # - # source://prism//lib/prism/lex_compat.rb#201 + # source://prism//lib/prism/lex_compat.rb#218 + def value; end +end + +# This is a result specific to the `lex` and `lex_file` methods. +# +# source://prism//lib/prism/parse_result.rb#515 +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 + sig do + params( + value: T::Array[T.untyped], + comments: T::Array[Prism::Comment], + magic_comments: T::Array[Prism::MagicComment], + data_loc: T.nilable(Prism::Location), + errors: T::Array[Prism::ParseError], + warnings: T::Array[Prism::ParseWarning], + source: Prism::Source + ).void + end + def initialize(value, comments, magic_comments, data_loc, errors, warnings, source); end + + # Implement the hash pattern matching interface for LexResult. + # + # source://prism//lib/prism/parse_result.rb#526 + 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 + sig { returns(T::Array[T.untyped]) } def value; end end # This is a class that wraps the Ripper lexer to produce almost exactly the # same tokens. # -# source://prism//lib/prism/lex_compat.rb#855 +# source://prism//lib/prism/lex_compat.rb#872 class Prism::LexRipper # @return [LexRipper] a new instance of LexRipper # - # source://prism//lib/prism/lex_compat.rb#858 + # source://prism//lib/prism/lex_compat.rb#875 def initialize(source); end - # source://prism//lib/prism/lex_compat.rb#862 + # source://prism//lib/prism/lex_compat.rb#879 def result; end - # source://prism//lib/prism/lex_compat.rb#856 + # source://prism//lib/prism/lex_compat.rb#873 def source; end private - # source://prism//lib/prism/lex_compat.rb#896 + # source://prism//lib/prism/lex_compat.rb#913 def lex(source); end end @@ -19505,13 +20245,13 @@ end # target &&= value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11737 +# source://prism//lib/prism/node.rb#12695 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#11739 + # source://prism//lib/prism/node.rb#12697 sig do params( source: Prism::Source, @@ -19525,33 +20265,39 @@ class Prism::LocalVariableAndWriteNode < ::Prism::Node 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#12811 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11751 + # source://prism//lib/prism/node.rb#12709 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11756 + # source://prism//lib/prism/node.rb#12714 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11766 + # source://prism//lib/prism/node.rb#12724 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11761 + # source://prism//lib/prism/node.rb#12719 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#11771 + # source://prism//lib/prism/node.rb#12729 sig do params( name_loc: Prism::Location, @@ -19567,19 +20313,19 @@ class Prism::LocalVariableAndWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11756 + # source://prism//lib/prism/node.rb#12714 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#11779 + # source://prism//lib/prism/node.rb#12737 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#11804 + # source://prism//lib/prism/node.rb#12762 sig { returns(Integer) } def depth; end @@ -19591,31 +20337,31 @@ class Prism::LocalVariableAndWriteNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#11813 + # source://prism//lib/prism/node.rb#12770 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#11801 + # source://prism//lib/prism/node.rb#12759 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#11784 + # source://prism//lib/prism/node.rb#12742 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#11808 + # source://prism//lib/prism/node.rb#12765 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#11791 + # source://prism//lib/prism/node.rb#12749 sig { returns(Prism::Location) } def operator_loc; end @@ -19634,13 +20380,13 @@ class Prism::LocalVariableAndWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#11838 + # source://prism//lib/prism/node.rb#12795 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#11798 + # source://prism//lib/prism/node.rb#12756 sig { returns(Prism::Node) } def value; end @@ -19652,7 +20398,7 @@ class Prism::LocalVariableAndWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#11848 + # source://prism//lib/prism/node.rb#12805 def type; end end end @@ -19662,13 +20408,13 @@ end # target += value # ^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11857 +# source://prism//lib/prism/node.rb#12825 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 # # @return [LocalVariableOperatorWriteNode] a new instance of LocalVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#11859 + # source://prism//lib/prism/node.rb#12827 sig do params( source: Prism::Source, @@ -19683,33 +20429,39 @@ class Prism::LocalVariableOperatorWriteNode < ::Prism::Node end def initialize(source, name_loc, operator_loc, value, name, 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#12941 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11872 + # source://prism//lib/prism/node.rb#12840 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11877 + # source://prism//lib/prism/node.rb#12845 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11887 + # source://prism//lib/prism/node.rb#12855 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11882 + # 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#11892 + # source://prism//lib/prism/node.rb#12860 sig do params( name_loc: Prism::Location, @@ -19726,19 +20478,19 @@ class Prism::LocalVariableOperatorWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11877 + # 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#11900 + # 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#11928 + # source://prism//lib/prism/node.rb#12896 sig { returns(Integer) } def depth; end @@ -19750,31 +20502,31 @@ class Prism::LocalVariableOperatorWriteNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#11932 + # 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#11922 + # source://prism//lib/prism/node.rb#12890 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#11905 + # 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#11925 + # source://prism//lib/prism/node.rb#12893 sig { returns(Symbol) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#11912 + # source://prism//lib/prism/node.rb#12880 sig { returns(Prism::Location) } def operator_loc; end @@ -19793,13 +20545,13 @@ class Prism::LocalVariableOperatorWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#11958 + # 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#11919 + # source://prism//lib/prism/node.rb#12887 sig { returns(Prism::Node) } def value; end @@ -19811,7 +20563,7 @@ class Prism::LocalVariableOperatorWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#11968 + # source://prism//lib/prism/node.rb#12935 def type; end end end @@ -19821,13 +20573,13 @@ end # target ||= value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11977 +# 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#11979 + # source://prism//lib/prism/node.rb#12958 sig do params( source: Prism::Source, @@ -19841,33 +20593,39 @@ class Prism::LocalVariableOrWriteNode < ::Prism::Node 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#11991 + # 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#11996 + # 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#12006 + # 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#12001 + # source://prism//lib/prism/node.rb#12980 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#12011 + # source://prism//lib/prism/node.rb#12990 sig do params( name_loc: Prism::Location, @@ -19883,19 +20641,19 @@ class Prism::LocalVariableOrWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11996 + # 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) -> { name_loc: Location, operator_loc: Location, value: Prism::node, name: Symbol, depth: Integer, location: Location } # - # source://prism//lib/prism/node.rb#12019 + # 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 # attr_reader depth: Integer # - # source://prism//lib/prism/node.rb#12044 + # source://prism//lib/prism/node.rb#13023 sig { returns(Integer) } def depth; end @@ -19907,31 +20665,31 @@ class Prism::LocalVariableOrWriteNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#12053 + # source://prism//lib/prism/node.rb#13031 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#12041 + # source://prism//lib/prism/node.rb#13020 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#12024 + # source://prism//lib/prism/node.rb#13003 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#12048 + # source://prism//lib/prism/node.rb#13026 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#12031 + # source://prism//lib/prism/node.rb#13010 sig { returns(Prism::Location) } def operator_loc; end @@ -19950,13 +20708,13 @@ class Prism::LocalVariableOrWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#12078 + # source://prism//lib/prism/node.rb#13056 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#12038 + # source://prism//lib/prism/node.rb#13017 sig { returns(Prism::Node) } def value; end @@ -19968,7 +20726,7 @@ class Prism::LocalVariableOrWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#12088 + # source://prism//lib/prism/node.rb#13066 def type; end end end @@ -19978,56 +20736,62 @@ end # foo # ^^^ # -# source://prism//lib/prism/node.rb#12097 +# source://prism//lib/prism/node.rb#13086 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#12099 + # source://prism//lib/prism/node.rb#13088 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 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12108 + # source://prism//lib/prism/node.rb#13097 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12113 + # source://prism//lib/prism/node.rb#13102 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12123 + # source://prism//lib/prism/node.rb#13112 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12118 + # source://prism//lib/prism/node.rb#13107 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#12128 + # source://prism//lib/prism/node.rb#13117 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#12113 + # source://prism//lib/prism/node.rb#13102 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#12136 + # source://prism//lib/prism/node.rb#13125 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -20039,7 +20803,7 @@ 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#12162 + # source://prism//lib/prism/node.rb#13151 sig { returns(Integer) } def depth; end @@ -20048,7 +20812,7 @@ class Prism::LocalVariableReadNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#12166 + # source://prism//lib/prism/node.rb#13154 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end @@ -20066,7 +20830,7 @@ class Prism::LocalVariableReadNode < ::Prism::Node # # it # name `:0it` # - # source://prism//lib/prism/node.rb#12153 + # source://prism//lib/prism/node.rb#13142 sig { returns(Symbol) } def name; end @@ -20085,7 +20849,7 @@ class Prism::LocalVariableReadNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#12187 + # source://prism//lib/prism/node.rb#13175 sig { override.returns(Symbol) } def type; end @@ -20097,7 +20861,7 @@ class Prism::LocalVariableReadNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#12197 + # source://prism//lib/prism/node.rb#13185 def type; end end end @@ -20107,62 +20871,68 @@ end # foo, bar = baz # ^^^ ^^^ # -# source://prism//lib/prism/node.rb#12206 +# source://prism//lib/prism/node.rb#13202 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#12208 + # source://prism//lib/prism/node.rb#13204 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 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12217 + # source://prism//lib/prism/node.rb#13213 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12222 + # source://prism//lib/prism/node.rb#13218 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12232 + # source://prism//lib/prism/node.rb#13228 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12227 + # source://prism//lib/prism/node.rb#13223 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#12237 + # source://prism//lib/prism/node.rb#13233 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#12222 + # source://prism//lib/prism/node.rb#13218 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#12245 + # source://prism//lib/prism/node.rb#13241 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#12253 + # source://prism//lib/prism/node.rb#13249 sig { returns(Integer) } def depth; end @@ -20171,13 +20941,13 @@ class Prism::LocalVariableTargetNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#12257 + # source://prism//lib/prism/node.rb#13252 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#12250 + # source://prism//lib/prism/node.rb#13246 sig { returns(Symbol) } def name; end @@ -20196,7 +20966,7 @@ class Prism::LocalVariableTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#12278 + # source://prism//lib/prism/node.rb#13273 sig { override.returns(Symbol) } def type; end @@ -20208,7 +20978,7 @@ class Prism::LocalVariableTargetNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#12288 + # source://prism//lib/prism/node.rb#13283 def type; end end end @@ -20218,13 +20988,13 @@ end # foo = 1 # ^^^^^^^ # -# source://prism//lib/prism/node.rb#12297 +# source://prism//lib/prism/node.rb#13300 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#12299 + # source://prism//lib/prism/node.rb#13302 sig do params( source: Prism::Source, @@ -20238,33 +21008,39 @@ class Prism::LocalVariableWriteNode < ::Prism::Node end def initialize(source, name, depth, name_loc, value, operator_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#13442 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12311 + # source://prism//lib/prism/node.rb#13314 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12316 + # source://prism//lib/prism/node.rb#13319 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12326 + # source://prism//lib/prism/node.rb#13329 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12321 + # source://prism//lib/prism/node.rb#13324 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#12331 + # source://prism//lib/prism/node.rb#13334 sig do params( name: Symbol, @@ -20280,19 +21056,25 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12316 + # source://prism//lib/prism/node.rb#13319 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#12339 + # source://prism//lib/prism/node.rb#13342 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # attr_reader depth: Integer + # The number of semantic scopes we have to traverse to find the declaration of this variable. + # + # foo = 1 # depth 0 # - # source://prism//lib/prism/node.rb#12347 + # tap { foo = 1 } # depth 1 + # + # The specific rules for calculating the depth may differ from individual Ruby implementations, as they are not specified by the language. For more information, see [the Prism documentation](https://github.com/ruby/prism/blob/main/docs/local_variable_depth.md). + # + # source://prism//lib/prism/node.rb#13360 sig { returns(Integer) } def depth; end @@ -20301,31 +21083,41 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#12373 + # source://prism//lib/prism/node.rb#13401 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end - # attr_reader name: Symbol + # The name of the local variable, which is an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). + # + # foo = :bar # name `:foo` # - # source://prism//lib/prism/node.rb#12344 + # abc = 123 # name `:abc` + # + # source://prism//lib/prism/node.rb#13351 sig { returns(Symbol) } def name; end - # attr_reader name_loc: Location + # The location of the variable name. # - # source://prism//lib/prism/node.rb#12350 + # foo = :bar + # ^^^ + # + # source://prism//lib/prism/node.rb#13366 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#12368 + # source://prism//lib/prism/node.rb#13396 sig { returns(String) } def operator; end - # attr_reader operator_loc: Location + # The location of the `=` operator. # - # source://prism//lib/prism/node.rb#12360 + # x = :y + # ^ + # + # source://prism//lib/prism/node.rb#13389 sig { returns(Prism::Location) } def operator_loc; end @@ -20344,13 +21136,23 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#12398 + # source://prism//lib/prism/node.rb#13426 sig { override.returns(Symbol) } def type; end - # attr_reader value: Prism::node + # The value to write to the local variable. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). # - # source://prism//lib/prism/node.rb#12357 + # foo = :bar + # ^^^^ + # + # abc = 1234 + # ^^^^ + # + # Note that since the name of a local variable is known before the value is parsed, it is valid for a local variable to appear within the value of its own write. + # + # foo = foo + # + # source://prism//lib/prism/node.rb#13383 sig { returns(Prism::Node) } def value; end @@ -20362,7 +21164,7 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#12408 + # source://prism//lib/prism/node.rb#13436 def type; end end end @@ -20487,6 +21289,7 @@ class Prism::Location # The length of this location in bytes. # # source://prism//lib/prism/parse_result.rb#115 + sig { returns(Integer) } def length; end # Implement the pretty print interface for Location. @@ -20551,6 +21354,7 @@ class Prism::Location # starts. # # source://prism//lib/prism/parse_result.rb#112 + sig { returns(Integer) } def start_offset; end # Attach a comment to the trailing comments of this location. @@ -20572,17 +21376,18 @@ class Prism::Location # offset and length. # # source://prism//lib/prism/parse_result.rb#107 + sig { returns(Prism::Source) } def source; end end # Flags for while and until loop nodes. # -# source://prism//lib/prism/node.rb#18896 +# source://prism//lib/prism/node.rb#20403 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#18898 +# source://prism//lib/prism/node.rb#20405 Prism::LoopFlags::BEGIN_MODIFIER = T.let(T.unsafe(nil), Integer) # This represents a magic comment that was encountered during parsing. @@ -20618,6 +21423,7 @@ class Prism::MagicComment # A Location object representing the location of the key in the source. # # source://prism//lib/prism/parse_result.rb#340 + sig { returns(Prism::Location) } def key_loc; end # Returns the value of the magic comment by slicing it from the source code. @@ -20629,6 +21435,7 @@ class Prism::MagicComment # A Location object representing the location of the value in the source. # # source://prism//lib/prism/parse_result.rb#343 + sig { returns(Prism::Location) } def value_loc; end end @@ -20637,7 +21444,7 @@ end # if /foo/i then end # ^^^^^^ # -# source://prism//lib/prism/node.rb#12417 +# source://prism//lib/prism/node.rb#13456 class Prism::MatchLastLineNode < ::Prism::Node include ::Prism::RegularExpressionOptions @@ -20645,7 +21452,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [MatchLastLineNode] a new instance of MatchLastLineNode # - # source://prism//lib/prism/node.rb#12419 + # source://prism//lib/prism/node.rb#13458 sig do params( source: Prism::Source, @@ -20659,9 +21466,15 @@ class Prism::MatchLastLineNode < ::Prism::Node end def initialize(source, flags, opening_loc, content_loc, closing_loc, unescaped, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#13642 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12431 + # source://prism//lib/prism/node.rb#13470 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -20669,55 +21482,55 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12518 + # source://prism//lib/prism/node.rb#13556 sig { returns(T::Boolean) } def ascii_8bit?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12436 + # source://prism//lib/prism/node.rb#13475 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#12558 + # source://prism//lib/prism/node.rb#13596 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#12482 + # source://prism//lib/prism/node.rb#13521 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12446 + # source://prism//lib/prism/node.rb#13485 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12441 + # source://prism//lib/prism/node.rb#13480 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def content: () -> String # - # source://prism//lib/prism/node.rb#12553 + # source://prism//lib/prism/node.rb#13591 sig { returns(String) } def content; end # attr_reader content_loc: Location # - # source://prism//lib/prism/node.rb#12475 + # source://prism//lib/prism/node.rb#13514 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#12451 + # source://prism//lib/prism/node.rb#13490 sig do params( flags: Integer, @@ -20733,13 +21546,13 @@ class Prism::MatchLastLineNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12436 + # source://prism//lib/prism/node.rb#13475 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#12459 + # source://prism//lib/prism/node.rb#13498 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -20747,7 +21560,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12513 + # source://prism//lib/prism/node.rb#13551 sig { returns(T::Boolean) } def euc_jp?; end @@ -20755,7 +21568,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12498 + # source://prism//lib/prism/node.rb#13536 sig { returns(T::Boolean) } def extended?; end @@ -20766,7 +21579,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12538 + # source://prism//lib/prism/node.rb#13576 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -20774,7 +21587,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12543 + # source://prism//lib/prism/node.rb#13581 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end @@ -20782,7 +21595,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12533 + # source://prism//lib/prism/node.rb#13571 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -20790,13 +21603,13 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12493 + # source://prism//lib/prism/node.rb#13531 sig { returns(T::Boolean) } def ignore_case?; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#12563 + # source://prism//lib/prism/node.rb#13601 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end @@ -20804,7 +21617,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12503 + # source://prism//lib/prism/node.rb#13541 sig { returns(T::Boolean) } def multi_line?; end @@ -20812,19 +21625,19 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12508 + # source://prism//lib/prism/node.rb#13546 sig { returns(T::Boolean) } def once?; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#12548 + # source://prism//lib/prism/node.rb#13586 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#12468 + # source://prism//lib/prism/node.rb#13507 sig { returns(Prism::Location) } def opening_loc; end @@ -20846,13 +21659,13 @@ class Prism::MatchLastLineNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#12588 + # source://prism//lib/prism/node.rb#13626 sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#12489 + # source://prism//lib/prism/node.rb#13528 sig { returns(String) } def unescaped; end @@ -20860,7 +21673,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12528 + # source://prism//lib/prism/node.rb#13566 sig { returns(T::Boolean) } def utf_8?; end @@ -20868,15 +21681,15 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12523 + # source://prism//lib/prism/node.rb#13561 sig { returns(T::Boolean) } def windows_31j?; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#12464 + # source://prism//lib/prism/node.rb#13503 sig { returns(Integer) } def flags; end @@ -20888,7 +21701,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#12598 + # source://prism//lib/prism/node.rb#13636 def type; end end end @@ -20898,13 +21711,13 @@ end # foo in bar # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#12607 +# source://prism//lib/prism/node.rb#13656 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#12609 + # source://prism//lib/prism/node.rb#13658 sig do params( source: Prism::Source, @@ -20916,33 +21729,39 @@ class Prism::MatchPredicateNode < ::Prism::Node end def initialize(source, value, pattern, operator_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#13759 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12619 + # source://prism//lib/prism/node.rb#13668 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12624 + # source://prism//lib/prism/node.rb#13673 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12634 + # source://prism//lib/prism/node.rb#13683 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12629 + # source://prism//lib/prism/node.rb#13678 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#12639 + # source://prism//lib/prism/node.rb#13688 sig do params( value: Prism::Node, @@ -20956,13 +21775,13 @@ class Prism::MatchPredicateNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12624 + # source://prism//lib/prism/node.rb#13673 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#12647 + # source://prism//lib/prism/node.rb#13696 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -20971,25 +21790,25 @@ class Prism::MatchPredicateNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#12671 + # source://prism//lib/prism/node.rb#13719 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # - # source://prism//lib/prism/node.rb#12666 + # source://prism//lib/prism/node.rb#13714 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#12658 + # source://prism//lib/prism/node.rb#13707 sig { returns(Prism::Location) } def operator_loc; end # attr_reader pattern: Prism::node # - # source://prism//lib/prism/node.rb#12655 + # source://prism//lib/prism/node.rb#13704 sig { returns(Prism::Node) } def pattern; end @@ -21008,13 +21827,13 @@ class Prism::MatchPredicateNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#12695 + # source://prism//lib/prism/node.rb#13743 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#12652 + # source://prism//lib/prism/node.rb#13701 sig { returns(Prism::Node) } def value; end @@ -21026,7 +21845,7 @@ class Prism::MatchPredicateNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#12705 + # source://prism//lib/prism/node.rb#13753 def type; end end end @@ -21036,13 +21855,13 @@ end # foo => bar # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#12714 +# source://prism//lib/prism/node.rb#13771 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#12716 + # source://prism//lib/prism/node.rb#13773 sig do params( source: Prism::Source, @@ -21054,33 +21873,39 @@ class Prism::MatchRequiredNode < ::Prism::Node end def initialize(source, value, pattern, operator_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#13874 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12726 + # source://prism//lib/prism/node.rb#13783 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12731 + # source://prism//lib/prism/node.rb#13788 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12741 + # source://prism//lib/prism/node.rb#13798 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12736 + # source://prism//lib/prism/node.rb#13793 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#12746 + # source://prism//lib/prism/node.rb#13803 sig do params( value: Prism::Node, @@ -21094,13 +21919,13 @@ class Prism::MatchRequiredNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12731 + # source://prism//lib/prism/node.rb#13788 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#12754 + # source://prism//lib/prism/node.rb#13811 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -21109,25 +21934,25 @@ class Prism::MatchRequiredNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#12778 + # source://prism//lib/prism/node.rb#13834 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # - # source://prism//lib/prism/node.rb#12773 + # source://prism//lib/prism/node.rb#13829 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#12765 + # source://prism//lib/prism/node.rb#13822 sig { returns(Prism::Location) } def operator_loc; end # attr_reader pattern: Prism::node # - # source://prism//lib/prism/node.rb#12762 + # source://prism//lib/prism/node.rb#13819 sig { returns(Prism::Node) } def pattern; end @@ -21146,13 +21971,13 @@ class Prism::MatchRequiredNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#12802 + # source://prism//lib/prism/node.rb#13858 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#12759 + # source://prism//lib/prism/node.rb#13816 sig { returns(Prism::Node) } def value; end @@ -21164,7 +21989,7 @@ class Prism::MatchRequiredNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#12812 + # source://prism//lib/prism/node.rb#13868 def type; end end end @@ -21174,13 +21999,13 @@ end # /(?bar)/ =~ baz # ^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#12821 +# source://prism//lib/prism/node.rb#13886 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#12823 + # source://prism//lib/prism/node.rb#13888 sig do params( source: Prism::Source, @@ -21191,39 +22016,45 @@ class Prism::MatchWriteNode < ::Prism::Node end def initialize(source, call, targets, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#13974 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12832 + # source://prism//lib/prism/node.rb#13897 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader call: CallNode # - # source://prism//lib/prism/node.rb#12865 + # source://prism//lib/prism/node.rb#13930 sig { returns(Prism::CallNode) } def call; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12837 + # source://prism//lib/prism/node.rb#13902 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12847 + # source://prism//lib/prism/node.rb#13912 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12842 + # source://prism//lib/prism/node.rb#13907 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#12852 + # source://prism//lib/prism/node.rb#13917 sig do params( call: Prism::CallNode, @@ -21236,13 +22067,13 @@ class Prism::MatchWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12837 + # source://prism//lib/prism/node.rb#13902 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#12860 + # source://prism//lib/prism/node.rb#13925 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -21251,13 +22082,13 @@ class Prism::MatchWriteNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#12872 + # source://prism//lib/prism/node.rb#13936 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader targets: Array[LocalVariableTargetNode] # - # source://prism//lib/prism/node.rb#12868 + # source://prism//lib/prism/node.rb#13933 sig { returns(T::Array[Prism::LocalVariableTargetNode]) } def targets; end @@ -21276,7 +22107,7 @@ class Prism::MatchWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#12894 + # source://prism//lib/prism/node.rb#13958 sig { override.returns(Symbol) } def type; end @@ -21288,63 +22119,69 @@ class Prism::MatchWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#12904 + # source://prism//lib/prism/node.rb#13968 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#12910 +# source://prism//lib/prism/node.rb#13983 class Prism::MissingNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [MissingNode] a new instance of MissingNode # - # source://prism//lib/prism/node.rb#12912 + # source://prism//lib/prism/node.rb#13985 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 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12919 + # source://prism//lib/prism/node.rb#13992 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12924 + # source://prism//lib/prism/node.rb#13997 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12934 + # source://prism//lib/prism/node.rb#14007 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12929 + # source://prism//lib/prism/node.rb#14002 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?location: Location) -> MissingNode # - # source://prism//lib/prism/node.rb#12939 + # source://prism//lib/prism/node.rb#14012 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#12924 + # source://prism//lib/prism/node.rb#13997 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#12947 + # source://prism//lib/prism/node.rb#14020 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -21353,7 +22190,7 @@ class Prism::MissingNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#12953 + # source://prism//lib/prism/node.rb#14025 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end @@ -21372,7 +22209,7 @@ class Prism::MissingNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#12972 + # source://prism//lib/prism/node.rb#14044 sig { override.returns(Symbol) } def type; end @@ -21384,7 +22221,7 @@ class Prism::MissingNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#12982 + # source://prism//lib/prism/node.rb#14054 def type; end end end @@ -21394,13 +22231,13 @@ end # module Foo end # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#12991 +# source://prism//lib/prism/node.rb#14069 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#12993 + # source://prism//lib/prism/node.rb#14071 sig do params( source: Prism::Source, @@ -21415,45 +22252,51 @@ class Prism::ModuleNode < ::Prism::Node end def initialize(source, locals, module_keyword_loc, constant_path, body, end_keyword_loc, name, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#14203 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13006 + # source://prism//lib/prism/node.rb#14084 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: Prism::node? # - # source://prism//lib/prism/node.rb#13055 + # source://prism//lib/prism/node.rb#14133 sig { returns(T.nilable(Prism::Node)) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13011 + # source://prism//lib/prism/node.rb#14089 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13024 + # source://prism//lib/prism/node.rb#14102 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13016 + # source://prism//lib/prism/node.rb#14094 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader constant_path: Prism::node # - # source://prism//lib/prism/node.rb#13052 + # source://prism//lib/prism/node.rb#14130 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#13029 + # source://prism//lib/prism/node.rb#14107 sig do params( locals: T::Array[Symbol], @@ -21470,25 +22313,25 @@ class Prism::ModuleNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13011 + # source://prism//lib/prism/node.rb#14089 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#13037 + # source://prism//lib/prism/node.rb#14115 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#13074 + # source://prism//lib/prism/node.rb#14151 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#13058 + # source://prism//lib/prism/node.rb#14136 sig { returns(Prism::Location) } def end_keyword_loc; end @@ -21497,31 +22340,31 @@ class Prism::ModuleNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#13079 + # source://prism//lib/prism/node.rb#14156 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#13042 + # source://prism//lib/prism/node.rb#14120 sig { returns(T::Array[Symbol]) } def locals; end # def module_keyword: () -> String # - # source://prism//lib/prism/node.rb#13069 + # source://prism//lib/prism/node.rb#14146 sig { returns(String) } def module_keyword; end # attr_reader module_keyword_loc: Location # - # source://prism//lib/prism/node.rb#13045 + # source://prism//lib/prism/node.rb#14123 sig { returns(Prism::Location) } def module_keyword_loc; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#13065 + # source://prism//lib/prism/node.rb#14143 sig { returns(Symbol) } def name; end @@ -21540,7 +22383,7 @@ class Prism::ModuleNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#13110 + # source://prism//lib/prism/node.rb#14187 sig { override.returns(Symbol) } def type; end @@ -21552,7 +22395,7 @@ class Prism::ModuleNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#13120 + # source://prism//lib/prism/node.rb#14197 def type; end end end @@ -21562,13 +22405,13 @@ end # a, (b, c) = 1, 2, 3 # ^^^^^^ # -# source://prism//lib/prism/node.rb#13129 +# source://prism//lib/prism/node.rb#14219 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#13131 + # source://prism//lib/prism/node.rb#14221 sig do params( source: Prism::Source, @@ -21582,33 +22425,39 @@ class Prism::MultiTargetNode < ::Prism::Node end def initialize(source, lefts, rest, rights, lparen_loc, rparen_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#14360 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13143 + # source://prism//lib/prism/node.rb#14233 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13148 + # source://prism//lib/prism/node.rb#14238 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13162 + # source://prism//lib/prism/node.rb#14252 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13153 + # source://prism//lib/prism/node.rb#14243 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#13167 + # source://prism//lib/prism/node.rb#14257 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)], @@ -21624,13 +22473,13 @@ class Prism::MultiTargetNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13148 + # source://prism//lib/prism/node.rb#14238 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#13175 + # source://prism//lib/prism/node.rb#14265 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -21639,13 +22488,13 @@ class Prism::MultiTargetNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#13226 + # source://prism//lib/prism/node.rb#14315 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode] # - # source://prism//lib/prism/node.rb#13180 + # source://prism//lib/prism/node.rb#14270 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 @@ -21653,25 +22502,25 @@ class Prism::MultiTargetNode < ::Prism::Node # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#13216 + # source://prism//lib/prism/node.rb#14305 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#13189 + # source://prism//lib/prism/node.rb#14279 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # attr_reader rest: Prism::node? # - # source://prism//lib/prism/node.rb#13183 + # source://prism//lib/prism/node.rb#14273 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#13186 + # source://prism//lib/prism/node.rb#14276 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 @@ -21679,13 +22528,13 @@ class Prism::MultiTargetNode < ::Prism::Node # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#13221 + # source://prism//lib/prism/node.rb#14310 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#13202 + # source://prism//lib/prism/node.rb#14292 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end @@ -21704,7 +22553,7 @@ class Prism::MultiTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#13255 + # source://prism//lib/prism/node.rb#14344 sig { override.returns(Symbol) } def type; end @@ -21716,7 +22565,7 @@ class Prism::MultiTargetNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#13265 + # source://prism//lib/prism/node.rb#14354 def type; end end end @@ -21726,13 +22575,13 @@ end # a, b, c = 1, 2, 3 # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#13274 +# source://prism//lib/prism/node.rb#14376 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#13276 + # source://prism//lib/prism/node.rb#14378 sig do params( source: Prism::Source, @@ -21748,33 +22597,39 @@ class Prism::MultiWriteNode < ::Prism::Node end def initialize(source, lefts, rest, rights, lparen_loc, rparen_loc, operator_loc, value, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#14538 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13290 + # source://prism//lib/prism/node.rb#14392 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13295 + # source://prism//lib/prism/node.rb#14397 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13310 + # source://prism//lib/prism/node.rb#14412 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13300 + # source://prism//lib/prism/node.rb#14402 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#13315 + # source://prism//lib/prism/node.rb#14417 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)], @@ -21792,13 +22647,13 @@ class Prism::MultiWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13295 + # source://prism//lib/prism/node.rb#14397 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#13323 + # source://prism//lib/prism/node.rb#14425 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -21807,13 +22662,13 @@ class Prism::MultiWriteNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#13389 + # source://prism//lib/prism/node.rb#14490 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode] # - # source://prism//lib/prism/node.rb#13328 + # source://prism//lib/prism/node.rb#14430 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 @@ -21821,37 +22676,37 @@ class Prism::MultiWriteNode < ::Prism::Node # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#13374 + # source://prism//lib/prism/node.rb#14475 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#13337 + # source://prism//lib/prism/node.rb#14439 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#13384 + # source://prism//lib/prism/node.rb#14485 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#13363 + # source://prism//lib/prism/node.rb#14465 sig { returns(Prism::Location) } def operator_loc; end # attr_reader rest: Prism::node? # - # source://prism//lib/prism/node.rb#13331 + # source://prism//lib/prism/node.rb#14433 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#13334 + # source://prism//lib/prism/node.rb#14436 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 @@ -21859,13 +22714,13 @@ class Prism::MultiWriteNode < ::Prism::Node # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#13379 + # source://prism//lib/prism/node.rb#14480 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#13350 + # source://prism//lib/prism/node.rb#14452 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end @@ -21884,13 +22739,13 @@ class Prism::MultiWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#13421 + # source://prism//lib/prism/node.rb#14522 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#13370 + # source://prism//lib/prism/node.rb#14472 sig { returns(Prism::Node) } def value; end @@ -21902,7 +22757,7 @@ class Prism::MultiWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#13431 + # source://prism//lib/prism/node.rb#14532 def type; end end end @@ -22671,13 +23526,13 @@ end # next 1 # ^^^^^^ # -# source://prism//lib/prism/node.rb#13440 +# source://prism//lib/prism/node.rb#14556 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#13442 + # source://prism//lib/prism/node.rb#14558 sig do params( source: Prism::Source, @@ -22688,39 +23543,45 @@ class Prism::NextNode < ::Prism::Node end def initialize(source, arguments, keyword_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#14659 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13451 + # source://prism//lib/prism/node.rb#14567 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#13486 + # source://prism//lib/prism/node.rb#14602 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13456 + # source://prism//lib/prism/node.rb#14572 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13468 + # source://prism//lib/prism/node.rb#14584 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13461 + # source://prism//lib/prism/node.rb#14577 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#13473 + # source://prism//lib/prism/node.rb#14589 sig do params( arguments: T.nilable(Prism::ArgumentsNode), @@ -22733,13 +23594,13 @@ class Prism::NextNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13456 + # source://prism//lib/prism/node.rb#14572 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#13481 + # source://prism//lib/prism/node.rb#14597 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -22748,19 +23609,19 @@ class Prism::NextNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#13502 + # source://prism//lib/prism/node.rb#14617 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#13497 + # source://prism//lib/prism/node.rb#14612 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#13489 + # source://prism//lib/prism/node.rb#14605 sig { returns(Prism::Location) } def keyword_loc; end @@ -22779,7 +23640,7 @@ class Prism::NextNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#13528 + # source://prism//lib/prism/node.rb#14643 sig { override.returns(Symbol) } def type; end @@ -22791,7 +23652,7 @@ class Prism::NextNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#13538 + # source://prism//lib/prism/node.rb#14653 def type; end end end @@ -22801,56 +23662,62 @@ end # nil # ^^^ # -# source://prism//lib/prism/node.rb#13547 +# source://prism//lib/prism/node.rb#14670 class Prism::NilNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [NilNode] a new instance of NilNode # - # source://prism//lib/prism/node.rb#13549 + # source://prism//lib/prism/node.rb#14672 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 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13556 + # source://prism//lib/prism/node.rb#14679 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13561 + # source://prism//lib/prism/node.rb#14684 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13571 + # source://prism//lib/prism/node.rb#14694 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13566 + # source://prism//lib/prism/node.rb#14689 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?location: Location) -> NilNode # - # source://prism//lib/prism/node.rb#13576 + # source://prism//lib/prism/node.rb#14699 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#13561 + # source://prism//lib/prism/node.rb#14684 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#13584 + # source://prism//lib/prism/node.rb#14707 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -22859,7 +23726,7 @@ class Prism::NilNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#13590 + # source://prism//lib/prism/node.rb#14712 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end @@ -22878,7 +23745,7 @@ class Prism::NilNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#13609 + # source://prism//lib/prism/node.rb#14731 sig { override.returns(Symbol) } def type; end @@ -22890,7 +23757,7 @@ class Prism::NilNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#13619 + # source://prism//lib/prism/node.rb#14741 def type; end end end @@ -22901,13 +23768,13 @@ end # ^^^^^ # end # -# source://prism//lib/prism/node.rb#13629 +# source://prism//lib/prism/node.rb#14757 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#13631 + # source://prism//lib/prism/node.rb#14759 sig do params( source: Prism::Source, @@ -22918,33 +23785,39 @@ class Prism::NoKeywordsParameterNode < ::Prism::Node end def initialize(source, operator_loc, keyword_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#14862 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13640 + # source://prism//lib/prism/node.rb#14768 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13645 + # source://prism//lib/prism/node.rb#14773 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13655 + # source://prism//lib/prism/node.rb#14783 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13650 + # source://prism//lib/prism/node.rb#14778 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#13660 + # source://prism//lib/prism/node.rb#14788 sig do params( operator_loc: Prism::Location, @@ -22957,13 +23830,13 @@ class Prism::NoKeywordsParameterNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13645 + # source://prism//lib/prism/node.rb#14773 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#13668 + # source://prism//lib/prism/node.rb#14796 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -22972,31 +23845,31 @@ class Prism::NoKeywordsParameterNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#13698 + # source://prism//lib/prism/node.rb#14825 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#13693 + # source://prism//lib/prism/node.rb#14820 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#13680 + # source://prism//lib/prism/node.rb#14808 sig { returns(Prism::Location) } def keyword_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#13688 + # source://prism//lib/prism/node.rb#14815 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#13673 + # source://prism//lib/prism/node.rb#14801 sig { returns(Prism::Location) } def operator_loc; end @@ -23015,7 +23888,7 @@ class Prism::NoKeywordsParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#13719 + # source://prism//lib/prism/node.rb#14846 sig { override.returns(Symbol) } def type; end @@ -23027,7 +23900,7 @@ class Prism::NoKeywordsParameterNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#13729 + # source://prism//lib/prism/node.rb#14856 def type; end end end @@ -23156,6 +24029,7 @@ class Prism::Node # A pointer to the source that this node was created from. # # source://prism//lib/prism/node.rb#14 + sig { returns(Prism::Source) } def source; end class << self @@ -23236,56 +24110,62 @@ end # -> { _1 + _2 } # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#13738 +# source://prism//lib/prism/node.rb#14873 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#13740 + # source://prism//lib/prism/node.rb#14875 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 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13748 + # source://prism//lib/prism/node.rb#14883 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13753 + # source://prism//lib/prism/node.rb#14888 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13763 + # source://prism//lib/prism/node.rb#14898 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13758 + # source://prism//lib/prism/node.rb#14893 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#13768 + # source://prism//lib/prism/node.rb#14903 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#13753 + # source://prism//lib/prism/node.rb#14888 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#13776 + # source://prism//lib/prism/node.rb#14911 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -23294,13 +24174,13 @@ class Prism::NumberedParametersNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#13785 + # source://prism//lib/prism/node.rb#14919 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader maximum: Integer # - # source://prism//lib/prism/node.rb#13781 + # source://prism//lib/prism/node.rb#14916 sig { returns(Integer) } def maximum; end @@ -23319,7 +24199,7 @@ class Prism::NumberedParametersNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#13805 + # source://prism//lib/prism/node.rb#14939 sig { override.returns(Symbol) } def type; end @@ -23331,7 +24211,7 @@ class Prism::NumberedParametersNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#13815 + # source://prism//lib/prism/node.rb#14949 def type; end end end @@ -23341,56 +24221,62 @@ end # $1 # ^^ # -# source://prism//lib/prism/node.rb#13824 +# source://prism//lib/prism/node.rb#14965 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#13826 + # source://prism//lib/prism/node.rb#14967 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 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13834 + # source://prism//lib/prism/node.rb#14975 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13839 + # source://prism//lib/prism/node.rb#14980 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13849 + # source://prism//lib/prism/node.rb#14990 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13844 + # source://prism//lib/prism/node.rb#14985 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#13854 + # source://prism//lib/prism/node.rb#14995 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#13839 + # source://prism//lib/prism/node.rb#14980 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#13862 + # source://prism//lib/prism/node.rb#15003 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -23399,7 +24285,7 @@ class Prism::NumberedReferenceReadNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#13877 + # source://prism//lib/prism/node.rb#15017 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end @@ -23411,7 +24297,7 @@ class Prism::NumberedReferenceReadNode < ::Prism::Node # # $4294967296 # number `0` # - # source://prism//lib/prism/node.rb#13873 + # source://prism//lib/prism/node.rb#15014 sig { returns(Integer) } def number; end @@ -23430,7 +24316,7 @@ class Prism::NumberedReferenceReadNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#13897 + # source://prism//lib/prism/node.rb#15037 sig { override.returns(Symbol) } def type; end @@ -23442,7 +24328,7 @@ class Prism::NumberedReferenceReadNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#13907 + # source://prism//lib/prism/node.rb#15047 def type; end end end @@ -23453,13 +24339,13 @@ end # ^^^^ # end # -# source://prism//lib/prism/node.rb#13917 +# source://prism//lib/prism/node.rb#15064 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#13919 + # source://prism//lib/prism/node.rb#15066 sig do params( source: Prism::Source, @@ -23472,33 +24358,39 @@ class Prism::OptionalKeywordParameterNode < ::Prism::Node end def initialize(source, flags, name, name_loc, value, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#15173 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13930 + # source://prism//lib/prism/node.rb#15077 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13935 + # source://prism//lib/prism/node.rb#15082 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13945 + # source://prism//lib/prism/node.rb#15092 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13940 + # source://prism//lib/prism/node.rb#15087 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#13950 + # source://prism//lib/prism/node.rb#15097 sig do params( flags: Integer, @@ -23513,13 +24405,13 @@ class Prism::OptionalKeywordParameterNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13935 + # source://prism//lib/prism/node.rb#15082 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#13958 + # source://prism//lib/prism/node.rb#15105 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -23528,19 +24420,19 @@ class Prism::OptionalKeywordParameterNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#13986 + # source://prism//lib/prism/node.rb#15132 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#13967 + # source://prism//lib/prism/node.rb#15114 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#13970 + # source://prism//lib/prism/node.rb#15117 sig { returns(Prism::Location) } def name_loc; end @@ -23548,7 +24440,7 @@ class Prism::OptionalKeywordParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#13981 + # source://prism//lib/prism/node.rb#15127 sig { returns(T::Boolean) } def repeated_parameter?; end @@ -23567,21 +24459,21 @@ class Prism::OptionalKeywordParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#14011 + # source://prism//lib/prism/node.rb#15157 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#13977 + # source://prism//lib/prism/node.rb#15124 sig { returns(Prism::Node) } def value; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#13963 + # source://prism//lib/prism/node.rb#15110 sig { returns(Integer) } def flags; end @@ -23593,7 +24485,7 @@ class Prism::OptionalKeywordParameterNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#14021 + # source://prism//lib/prism/node.rb#15167 def type; end end end @@ -23604,13 +24496,13 @@ end # ^^^^^ # end # -# source://prism//lib/prism/node.rb#14031 +# source://prism//lib/prism/node.rb#15187 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#14033 + # source://prism//lib/prism/node.rb#15189 sig do params( source: Prism::Source, @@ -23624,33 +24516,39 @@ class Prism::OptionalParameterNode < ::Prism::Node end def initialize(source, flags, name, name_loc, operator_loc, value, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#15310 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14045 + # source://prism//lib/prism/node.rb#15201 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14050 + # source://prism//lib/prism/node.rb#15206 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14060 + # source://prism//lib/prism/node.rb#15216 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14055 + # source://prism//lib/prism/node.rb#15211 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#14065 + # source://prism//lib/prism/node.rb#15221 sig do params( flags: Integer, @@ -23666,13 +24564,13 @@ class Prism::OptionalParameterNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14050 + # source://prism//lib/prism/node.rb#15206 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#14073 + # source://prism//lib/prism/node.rb#15229 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -23681,31 +24579,31 @@ class Prism::OptionalParameterNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#14113 + # source://prism//lib/prism/node.rb#15268 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#14082 + # source://prism//lib/prism/node.rb#15238 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#14085 + # source://prism//lib/prism/node.rb#15241 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#14108 + # source://prism//lib/prism/node.rb#15263 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#14092 + # source://prism//lib/prism/node.rb#15248 sig { returns(Prism::Location) } def operator_loc; end @@ -23713,7 +24611,7 @@ class Prism::OptionalParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#14103 + # source://prism//lib/prism/node.rb#15258 sig { returns(T::Boolean) } def repeated_parameter?; end @@ -23732,21 +24630,21 @@ class Prism::OptionalParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#14139 + # source://prism//lib/prism/node.rb#15294 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#14099 + # source://prism//lib/prism/node.rb#15255 sig { returns(Prism::Node) } def value; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#14078 + # source://prism//lib/prism/node.rb#15234 sig { returns(Integer) } def flags; end @@ -23758,7 +24656,7 @@ class Prism::OptionalParameterNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#14149 + # source://prism//lib/prism/node.rb#15304 def type; end end end @@ -23768,13 +24666,13 @@ end # left or right # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#14158 +# source://prism//lib/prism/node.rb#15324 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#14160 + # source://prism//lib/prism/node.rb#15326 sig do params( source: Prism::Source, @@ -23786,33 +24684,39 @@ class Prism::OrNode < ::Prism::Node end def initialize(source, left, right, operator_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#15442 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14170 + # source://prism//lib/prism/node.rb#15336 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14175 + # source://prism//lib/prism/node.rb#15341 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14185 + # source://prism//lib/prism/node.rb#15351 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14180 + # source://prism//lib/prism/node.rb#15346 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#14190 + # source://prism//lib/prism/node.rb#15356 sig do params( left: Prism::Node, @@ -23826,13 +24730,13 @@ class Prism::OrNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14175 + # source://prism//lib/prism/node.rb#15341 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#14198 + # source://prism//lib/prism/node.rb#15364 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -23841,7 +24745,7 @@ class Prism::OrNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#14237 + # source://prism//lib/prism/node.rb#15402 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end @@ -23853,13 +24757,13 @@ class Prism::OrNode < ::Prism::Node # 1 || 2 # ^ # - # source://prism//lib/prism/node.rb#14209 + # source://prism//lib/prism/node.rb#15375 sig { returns(Prism::Node) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#14232 + # source://prism//lib/prism/node.rb#15397 sig { returns(String) } def operator; end @@ -23868,7 +24772,7 @@ class Prism::OrNode < ::Prism::Node # left or right # ^^ # - # source://prism//lib/prism/node.rb#14224 + # source://prism//lib/prism/node.rb#15390 sig { returns(Prism::Location) } def operator_loc; end @@ -23880,7 +24784,7 @@ class Prism::OrNode < ::Prism::Node # 1 or 2 # ^ # - # source://prism//lib/prism/node.rb#14218 + # source://prism//lib/prism/node.rb#15384 sig { returns(Prism::Node) } def right; end @@ -23899,7 +24803,7 @@ class Prism::OrNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#14261 + # source://prism//lib/prism/node.rb#15426 sig { override.returns(Symbol) } def type; end @@ -23911,7 +24815,7 @@ class Prism::OrNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#14271 + # source://prism//lib/prism/node.rb#15436 def type; end end end @@ -24160,12 +25064,12 @@ Prism::Pack::UTF8 = T.let(T.unsafe(nil), Symbol) # Flags for parameter nodes. # -# source://prism//lib/prism/node.rb#18902 +# source://prism//lib/prism/node.rb#20409 module Prism::ParameterFlags; end # a parameter name that has been repeated in the method signature # -# source://prism//lib/prism/node.rb#18904 +# source://prism//lib/prism/node.rb#20411 Prism::ParameterFlags::REPEATED_PARAMETER = T.let(T.unsafe(nil), Integer) # Represents the list of parameters on a method, block, or lambda definition. @@ -24174,13 +25078,13 @@ Prism::ParameterFlags::REPEATED_PARAMETER = T.let(T.unsafe(nil), Integer) # ^^^^^^^ # end # -# source://prism//lib/prism/node.rb#14281 +# source://prism//lib/prism/node.rb#15455 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 # # @return [ParametersNode] a new instance of ParametersNode # - # source://prism//lib/prism/node.rb#14283 + # source://prism//lib/prism/node.rb#15457 sig do params( source: Prism::Source, @@ -24196,39 +25100,45 @@ class Prism::ParametersNode < ::Prism::Node end def initialize(source, requireds, optionals, rest, posts, keywords, keyword_rest, block, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#15590 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14297 + # source://prism//lib/prism/node.rb#15471 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader block: BlockParameterNode? # - # source://prism//lib/prism/node.rb#14356 + # source://prism//lib/prism/node.rb#15530 sig { returns(T.nilable(Prism::BlockParameterNode)) } def block; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14302 + # source://prism//lib/prism/node.rb#15476 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14320 + # source://prism//lib/prism/node.rb#15494 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14307 + # source://prism//lib/prism/node.rb#15481 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 # - # source://prism//lib/prism/node.rb#14325 + # source://prism//lib/prism/node.rb#15499 sig do params( requireds: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)], @@ -24246,13 +25156,13 @@ class Prism::ParametersNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14302 + # source://prism//lib/prism/node.rb#15476 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 } # - # source://prism//lib/prism/node.rb#14333 + # source://prism//lib/prism/node.rb#15507 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -24261,13 +25171,13 @@ class Prism::ParametersNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#14360 + # source://prism//lib/prism/node.rb#15533 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil # - # source://prism//lib/prism/node.rb#14353 + # source://prism//lib/prism/node.rb#15527 sig do returns(T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode))) end @@ -24275,19 +25185,19 @@ class Prism::ParametersNode < ::Prism::Node # attr_reader keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode] # - # source://prism//lib/prism/node.rb#14350 + # source://prism//lib/prism/node.rb#15524 sig { returns(T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)]) } def keywords; end # attr_reader optionals: Array[OptionalParameterNode] # - # source://prism//lib/prism/node.rb#14341 + # source://prism//lib/prism/node.rb#15515 sig { returns(T::Array[Prism::OptionalParameterNode]) } def optionals; end # attr_reader posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode] # - # source://prism//lib/prism/node.rb#14347 + # source://prism//lib/prism/node.rb#15521 sig do returns(T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode)]) end @@ -24295,13 +25205,13 @@ class Prism::ParametersNode < ::Prism::Node # attr_reader requireds: Array[RequiredParameterNode | MultiTargetNode] # - # source://prism//lib/prism/node.rb#14338 + # source://prism//lib/prism/node.rb#15512 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#14344 + # source://prism//lib/prism/node.rb#15518 sig { returns(T.nilable(T.any(Prism::RestParameterNode, Prism::ImplicitRestNode))) } def rest; end @@ -24326,7 +25236,7 @@ class Prism::ParametersNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#14401 + # source://prism//lib/prism/node.rb#15574 sig { override.returns(Symbol) } def type; end @@ -24338,7 +25248,7 @@ class Prism::ParametersNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#14411 + # source://prism//lib/prism/node.rb#15584 def type; end end end @@ -24348,13 +25258,13 @@ end # (10 + 34) # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#14420 +# source://prism//lib/prism/node.rb#15610 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#14422 + # source://prism//lib/prism/node.rb#15612 sig do params( source: Prism::Source, @@ -24366,51 +25276,57 @@ class Prism::ParenthesesNode < ::Prism::Node end def initialize(source, body, opening_loc, closing_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#15731 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14432 + # source://prism//lib/prism/node.rb#15622 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: Prism::node? # - # source://prism//lib/prism/node.rb#14471 + # source://prism//lib/prism/node.rb#15661 sig { returns(T.nilable(Prism::Node)) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14441 + # source://prism//lib/prism/node.rb#15631 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#14494 + # source://prism//lib/prism/node.rb#15683 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#14481 + # source://prism//lib/prism/node.rb#15671 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14453 + # source://prism//lib/prism/node.rb#15643 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14446 + # source://prism//lib/prism/node.rb#15636 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#14458 + # source://prism//lib/prism/node.rb#15648 sig do params( body: T.nilable(Prism::Node), @@ -24424,13 +25340,13 @@ class Prism::ParenthesesNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14441 + # source://prism//lib/prism/node.rb#15631 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#14466 + # source://prism//lib/prism/node.rb#15656 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -24439,23 +25355,23 @@ class Prism::ParenthesesNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#14499 + # source://prism//lib/prism/node.rb#15688 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String # - # source://prism//lib/prism/node.rb#14489 + # source://prism//lib/prism/node.rb#15678 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#14474 + # source://prism//lib/prism/node.rb#15664 sig { returns(Prism::Location) } def opening_loc; end - # source://prism//lib/prism/node.rb#14436 + # 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 @@ -24473,7 +25389,7 @@ class Prism::ParenthesesNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#14526 + # source://prism//lib/prism/node.rb#15715 sig { override.returns(Symbol) } def type; end @@ -24485,7 +25401,7 @@ class Prism::ParenthesesNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#14536 + # source://prism//lib/prism/node.rb#15725 def type; end end end @@ -24517,39 +25433,41 @@ class Prism::ParseError # The level of this error. # # source://prism//lib/prism/parse_result.rb#385 + 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 + sig { returns(Prism::Location) } def location; end # The message associated with this error. # # source://prism//lib/prism/parse_result.rb#379 + 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 + sig { returns(Symbol) } def type; end end -# This represents the result of a call to ::parse or ::parse_file. It contains -# the AST, any comments that were encounters, and any errors that were -# encountered. +# This is a result specific to the `parse_lex` and `parse_lex_file` methods. # -# source://prism//lib/prism/parse_result.rb#443 -class Prism::ParseResult - # Create a new parse result object with the given values. +# source://prism//lib/prism/parse_result.rb#532 +class Prism::ParseLexResult < ::Prism::Result + # Create a new parse lex result object with the given values. # - # @return [ParseResult] a new instance of ParseResult + # @return [ParseLexResult] a new instance of ParseLexResult # - # source://prism//lib/prism/parse_result.rb#470 + # source://prism//lib/prism/parse_result.rb#538 sig do params( - value: Value, + value: [Prism::ProgramNode, T::Array[T.untyped]], comments: T::Array[Prism::Comment], magic_comments: T::Array[Prism::MagicComment], data_loc: T.nilable(Prism::Location), @@ -24560,86 +25478,63 @@ class Prism::ParseResult end def initialize(value, comments, magic_comments, data_loc, errors, warnings, source); end - # Attach the list of comments to their respective locations in the tree. - # - # source://prism//lib/prism/parse_result/comments.rb#190 - def attach_comments!; end - - # The list of comments that were encountered during parsing. - # - # source://prism//lib/prism/parse_result.rb#450 - def comments; end - - # An optional location that represents the location of the __END__ marker - # and the rest of the content of the file. This content is loaded into the - # DATA constant when the file being parsed is the main file being executed. - # - # source://prism//lib/prism/parse_result.rb#458 - def data_loc; end - - # Implement the hash pattern matching interface for ParseResult. + # Implement the hash pattern matching interface for ParseLexResult. # - # source://prism//lib/prism/parse_result.rb#481 + # source://prism//lib/prism/parse_result.rb#544 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. + # 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#486 - sig { returns(Encoding) } - def encoding; end + # source://prism//lib/prism/parse_result.rb#535 + sig { returns([Prism::ProgramNode, T::Array[T.untyped]]) } + def value; end +end - # The list of errors that were generated during parsing. +# This is a result specific to the `parse` and `parse_file` methods. +# +# source://prism//lib/prism/parse_result.rb#498 +class Prism::ParseResult < ::Prism::Result + # Create a new parse result object with the given values. # - # source://prism//lib/prism/parse_result.rb#461 - def errors; end - - # Returns true if there were errors during parsing and false if there were - # not. + # @return [ParseResult] a new instance of ParseResult # - # @return [Boolean] + # source://prism//lib/prism/parse_result.rb#503 + sig do + params( + value: Prism::ProgramNode, + comments: T::Array[Prism::Comment], + magic_comments: T::Array[Prism::MagicComment], + data_loc: T.nilable(Prism::Location), + errors: T::Array[Prism::ParseError], + warnings: T::Array[Prism::ParseWarning], + source: Prism::Source + ).void + end + def initialize(value, comments, magic_comments, data_loc, errors, warnings, source); end + + # Attach the list of comments to their respective locations in the tree. # - # source://prism//lib/prism/parse_result.rb#498 - sig { returns(T::Boolean) } - def failure?; end + # source://prism//lib/prism/parse_result/comments.rb#190 + def attach_comments!; end - # The list of magic comments that were encountered during parsing. + # Implement the hash pattern matching interface for ParseResult. # - # source://prism//lib/prism/parse_result.rb#453 - def magic_comments; end + # source://prism//lib/prism/parse_result.rb#509 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end # Walk the tree and mark nodes that are on a new line. # # source://prism//lib/prism/parse_result/newlines.rb#60 def mark_newlines!; end - # A Source instance that represents the source code that was parsed. - # - # source://prism//lib/prism/parse_result.rb#467 - def source; end - - # Returns true if there were no errors during parsing and false if there - # were. - # - # @return [Boolean] - # - # source://prism//lib/prism/parse_result.rb#492 - sig { returns(T::Boolean) } - def success?; end - - # The value that was generated by parsing. Normally this holds the AST, but - # it can sometimes how a list of tokens or other results passed back from - # the parser. + # The syntax tree that was parsed from the source code. # - # source://prism//lib/prism/parse_result.rb#447 + # source://prism//lib/prism/parse_result.rb#500 + sig { returns(Prism::ProgramNode) } def value; end - - # The list of warnings that were generated during parsing. - # - # source://prism//lib/prism/parse_result.rb#464 - def warnings; end - - Value = type_member end # When we've parsed the source, we have both the syntax tree and the list of @@ -24827,22 +25722,26 @@ class Prism::ParseWarning # The level of this warning. # # source://prism//lib/prism/parse_result.rb#419 + 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 + sig { returns(Prism::Location) } def location; end # The message associated with this warning. # # source://prism//lib/prism/parse_result.rb#413 + 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 + sig { returns(Symbol) } def type; end end @@ -25007,13 +25906,13 @@ end # foo in ^(bar) # ^^^^^^ # -# source://prism//lib/prism/node.rb#14545 +# source://prism//lib/prism/node.rb#15743 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#14547 + # source://prism//lib/prism/node.rb#15745 sig do params( source: Prism::Source, @@ -25026,33 +25925,39 @@ class Prism::PinnedExpressionNode < ::Prism::Node end def initialize(source, expression, operator_loc, lparen_loc, rparen_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#15868 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14558 + # source://prism//lib/prism/node.rb#15756 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14563 + # source://prism//lib/prism/node.rb#15761 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14573 + # source://prism//lib/prism/node.rb#15771 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14568 + # source://prism//lib/prism/node.rb#15766 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#14578 + # source://prism//lib/prism/node.rb#15776 sig do params( expression: Prism::Node, @@ -25067,19 +25972,19 @@ class Prism::PinnedExpressionNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14563 + # source://prism//lib/prism/node.rb#15761 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#14586 + # source://prism//lib/prism/node.rb#15784 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#14591 + # source://prism//lib/prism/node.rb#15789 sig { returns(Prism::Node) } def expression; end @@ -25088,43 +25993,43 @@ class Prism::PinnedExpressionNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#14631 + # source://prism//lib/prism/node.rb#15828 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def lparen: () -> String # - # source://prism//lib/prism/node.rb#14621 + # source://prism//lib/prism/node.rb#15818 sig { returns(String) } def lparen; end # attr_reader lparen_loc: Location # - # source://prism//lib/prism/node.rb#14601 + # source://prism//lib/prism/node.rb#15799 sig { returns(Prism::Location) } def lparen_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#14616 + # source://prism//lib/prism/node.rb#15813 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#14594 + # source://prism//lib/prism/node.rb#15792 sig { returns(Prism::Location) } def operator_loc; end # def rparen: () -> String # - # source://prism//lib/prism/node.rb#14626 + # source://prism//lib/prism/node.rb#15823 sig { returns(String) } def rparen; end # attr_reader rparen_loc: Location # - # source://prism//lib/prism/node.rb#14608 + # source://prism//lib/prism/node.rb#15806 sig { returns(Prism::Location) } def rparen_loc; end @@ -25143,7 +26048,7 @@ class Prism::PinnedExpressionNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#14655 + # source://prism//lib/prism/node.rb#15852 sig { override.returns(Symbol) } def type; end @@ -25155,7 +26060,7 @@ class Prism::PinnedExpressionNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#14665 + # source://prism//lib/prism/node.rb#15862 def type; end end end @@ -25165,13 +26070,13 @@ end # foo in ^bar # ^^^^ # -# source://prism//lib/prism/node.rb#14674 +# source://prism//lib/prism/node.rb#15881 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#14676 + # source://prism//lib/prism/node.rb#15883 sig do params( source: Prism::Source, @@ -25182,33 +26087,39 @@ class Prism::PinnedVariableNode < ::Prism::Node end def initialize(source, variable, operator_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#15978 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14685 + # source://prism//lib/prism/node.rb#15892 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14690 + # source://prism//lib/prism/node.rb#15897 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14700 + # source://prism//lib/prism/node.rb#15907 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14695 + # source://prism//lib/prism/node.rb#15902 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#14705 + # source://prism//lib/prism/node.rb#15912 sig do params( variable: Prism::Node, @@ -25221,13 +26132,13 @@ class Prism::PinnedVariableNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14690 + # source://prism//lib/prism/node.rb#15897 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#14713 + # source://prism//lib/prism/node.rb#15920 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -25236,19 +26147,19 @@ class Prism::PinnedVariableNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#14734 + # source://prism//lib/prism/node.rb#15940 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # - # source://prism//lib/prism/node.rb#14729 + # source://prism//lib/prism/node.rb#15935 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#14721 + # source://prism//lib/prism/node.rb#15928 sig { returns(Prism::Location) } def operator_loc; end @@ -25267,13 +26178,13 @@ class Prism::PinnedVariableNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#14756 + # source://prism//lib/prism/node.rb#15962 sig { override.returns(Symbol) } def type; end # attr_reader variable: Prism::node # - # source://prism//lib/prism/node.rb#14718 + # source://prism//lib/prism/node.rb#15925 sig { returns(Prism::Node) } def variable; end @@ -25285,7 +26196,7 @@ class Prism::PinnedVariableNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#14766 + # source://prism//lib/prism/node.rb#15972 def type; end end end @@ -25295,13 +26206,13 @@ end # END { foo } # ^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#14775 +# source://prism//lib/prism/node.rb#15989 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#14777 + # source://prism//lib/prism/node.rb#15991 sig do params( source: Prism::Source, @@ -25314,45 +26225,51 @@ class Prism::PostExecutionNode < ::Prism::Node end def initialize(source, statements, keyword_loc, opening_loc, closing_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#16120 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14788 + # source://prism//lib/prism/node.rb#16002 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14793 + # source://prism//lib/prism/node.rb#16007 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#14858 + # source://prism//lib/prism/node.rb#16071 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#14840 + # source://prism//lib/prism/node.rb#16054 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14805 + # source://prism//lib/prism/node.rb#16019 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14798 + # source://prism//lib/prism/node.rb#16012 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#14810 + # source://prism//lib/prism/node.rb#16024 sig do params( statements: T.nilable(Prism::StatementsNode), @@ -25367,13 +26284,13 @@ class Prism::PostExecutionNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14793 + # source://prism//lib/prism/node.rb#16007 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#14818 + # source://prism//lib/prism/node.rb#16032 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -25382,37 +26299,37 @@ class Prism::PostExecutionNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#14863 + # source://prism//lib/prism/node.rb#16076 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#14848 + # source://prism//lib/prism/node.rb#16061 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#14826 + # source://prism//lib/prism/node.rb#16040 sig { returns(Prism::Location) } def keyword_loc; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#14853 + # source://prism//lib/prism/node.rb#16066 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#14833 + # source://prism//lib/prism/node.rb#16047 sig { returns(Prism::Location) } def opening_loc; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#14823 + # source://prism//lib/prism/node.rb#16037 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -25431,7 +26348,7 @@ class Prism::PostExecutionNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#14891 + # source://prism//lib/prism/node.rb#16104 sig { override.returns(Symbol) } def type; end @@ -25443,7 +26360,7 @@ class Prism::PostExecutionNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#14901 + # source://prism//lib/prism/node.rb#16114 def type; end end end @@ -25453,13 +26370,13 @@ end # BEGIN { foo } # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#14910 +# source://prism//lib/prism/node.rb#16133 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#14912 + # source://prism//lib/prism/node.rb#16135 sig do params( source: Prism::Source, @@ -25472,45 +26389,51 @@ class Prism::PreExecutionNode < ::Prism::Node end def initialize(source, statements, keyword_loc, opening_loc, closing_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#16264 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14923 + # source://prism//lib/prism/node.rb#16146 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14928 + # source://prism//lib/prism/node.rb#16151 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#14993 + # source://prism//lib/prism/node.rb#16215 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#14975 + # source://prism//lib/prism/node.rb#16198 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14940 + # source://prism//lib/prism/node.rb#16163 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14933 + # source://prism//lib/prism/node.rb#16156 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#14945 + # source://prism//lib/prism/node.rb#16168 sig do params( statements: T.nilable(Prism::StatementsNode), @@ -25525,13 +26448,13 @@ class Prism::PreExecutionNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14928 + # source://prism//lib/prism/node.rb#16151 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#14953 + # source://prism//lib/prism/node.rb#16176 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -25540,37 +26463,37 @@ class Prism::PreExecutionNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#14998 + # source://prism//lib/prism/node.rb#16220 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#14983 + # source://prism//lib/prism/node.rb#16205 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#14961 + # source://prism//lib/prism/node.rb#16184 sig { returns(Prism::Location) } def keyword_loc; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#14988 + # source://prism//lib/prism/node.rb#16210 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#14968 + # source://prism//lib/prism/node.rb#16191 sig { returns(Prism::Location) } def opening_loc; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#14958 + # source://prism//lib/prism/node.rb#16181 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -25589,7 +26512,7 @@ class Prism::PreExecutionNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#15026 + # source://prism//lib/prism/node.rb#16248 sig { override.returns(Symbol) } def type; end @@ -25601,20 +26524,20 @@ class Prism::PreExecutionNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#15036 + # source://prism//lib/prism/node.rb#16258 def type; end end end # The top level node of any parse tree. # -# source://prism//lib/prism/node.rb#15042 +# source://prism//lib/prism/node.rb#16274 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#15044 + # source://prism//lib/prism/node.rb#16276 sig do params( source: Prism::Source, @@ -25625,33 +26548,39 @@ class Prism::ProgramNode < ::Prism::Node end def initialize(source, locals, statements, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#16362 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15053 + # source://prism//lib/prism/node.rb#16285 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15058 + # source://prism//lib/prism/node.rb#16290 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15068 + # source://prism//lib/prism/node.rb#16300 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15063 + # source://prism//lib/prism/node.rb#16295 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#15073 + # source://prism//lib/prism/node.rb#16305 sig do params( locals: T::Array[Symbol], @@ -25664,13 +26593,13 @@ class Prism::ProgramNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15058 + # source://prism//lib/prism/node.rb#16290 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#15081 + # source://prism//lib/prism/node.rb#16313 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -25679,19 +26608,19 @@ class Prism::ProgramNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#15093 + # source://prism//lib/prism/node.rb#16324 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#15086 + # source://prism//lib/prism/node.rb#16318 sig { returns(T::Array[Symbol]) } def locals; end # attr_reader statements: StatementsNode # - # source://prism//lib/prism/node.rb#15089 + # source://prism//lib/prism/node.rb#16321 sig { returns(Prism::StatementsNode) } def statements; end @@ -25710,7 +26639,7 @@ class Prism::ProgramNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#15115 + # source://prism//lib/prism/node.rb#16346 sig { override.returns(Symbol) } def type; end @@ -25722,19 +26651,19 @@ class Prism::ProgramNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#15125 + # source://prism//lib/prism/node.rb#16356 def type; end end end # Flags for range and flip-flop nodes. # -# source://prism//lib/prism/node.rb#18908 +# source://prism//lib/prism/node.rb#20415 module Prism::RangeFlags; end # ... operator # -# source://prism//lib/prism/node.rb#18910 +# source://prism//lib/prism/node.rb#20417 Prism::RangeFlags::EXCLUDE_END = T.let(T.unsafe(nil), Integer) # Represents the use of the `..` or `...` operators. @@ -25745,13 +26674,13 @@ Prism::RangeFlags::EXCLUDE_END = T.let(T.unsafe(nil), Integer) # c if a =~ /left/ ... b =~ /right/ # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#15137 +# source://prism//lib/prism/node.rb#16377 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#15139 + # source://prism//lib/prism/node.rb#16379 sig do params( source: Prism::Source, @@ -25764,33 +26693,39 @@ class Prism::RangeNode < ::Prism::Node end def initialize(source, flags, left, right, operator_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#16516 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15150 + # source://prism//lib/prism/node.rb#16390 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15155 + # source://prism//lib/prism/node.rb#16395 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15168 + # source://prism//lib/prism/node.rb#16408 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15160 + # source://prism//lib/prism/node.rb#16400 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#15173 + # source://prism//lib/prism/node.rb#16413 sig do params( flags: Integer, @@ -25805,13 +26740,13 @@ class Prism::RangeNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15155 + # source://prism//lib/prism/node.rb#16395 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#15181 + # source://prism//lib/prism/node.rb#16421 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -25819,7 +26754,7 @@ class Prism::RangeNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15217 + # source://prism//lib/prism/node.rb#16456 sig { returns(T::Boolean) } def exclude_end?; end @@ -25828,7 +26763,7 @@ class Prism::RangeNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#15227 + # source://prism//lib/prism/node.rb#16466 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end @@ -25840,19 +26775,19 @@ class Prism::RangeNode < ::Prism::Node # hello...goodbye # ^^^^^ # - # source://prism//lib/prism/node.rb#15196 + # source://prism//lib/prism/node.rb#16436 sig { returns(T.nilable(Prism::Node)) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#15222 + # source://prism//lib/prism/node.rb#16461 sig { returns(String) } def operator; end # The location of the `..` or `...` operator. # - # source://prism//lib/prism/node.rb#15209 + # source://prism//lib/prism/node.rb#16449 sig { returns(Prism::Location) } def operator_loc; end @@ -25865,7 +26800,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#15206 + # source://prism//lib/prism/node.rb#16446 sig { returns(T.nilable(Prism::Node)) } def right; end @@ -25884,15 +26819,15 @@ class Prism::RangeNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#15261 + # source://prism//lib/prism/node.rb#16500 sig { override.returns(Symbol) } def type; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#15186 + # source://prism//lib/prism/node.rb#16426 sig { returns(Integer) } def flags; end @@ -25904,7 +26839,7 @@ class Prism::RangeNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#15271 + # source://prism//lib/prism/node.rb#16510 def type; end end end @@ -25914,56 +26849,62 @@ end # 1.0r # ^^^^ # -# source://prism//lib/prism/node.rb#15280 +# source://prism//lib/prism/node.rb#16529 class Prism::RationalNode < ::Prism::Node # def initialize: (Prism::node numeric, Location location) -> void # # @return [RationalNode] a new instance of RationalNode # - # source://prism//lib/prism/node.rb#15282 + # 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 + # Implements case-equality for 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 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15290 + # source://prism//lib/prism/node.rb#16539 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15295 + # source://prism//lib/prism/node.rb#16544 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15305 + # source://prism//lib/prism/node.rb#16554 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15300 + # source://prism//lib/prism/node.rb#16549 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?numeric: Prism::node, ?location: Location) -> RationalNode # - # source://prism//lib/prism/node.rb#15310 + # 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 # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15295 + # source://prism//lib/prism/node.rb#16544 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { numeric: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#15318 + # source://prism//lib/prism/node.rb#16567 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -25972,13 +26913,13 @@ class Prism::RationalNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#15327 + # source://prism//lib/prism/node.rb#16575 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader numeric: Prism::node # - # source://prism//lib/prism/node.rb#15323 + # source://prism//lib/prism/node.rb#16572 sig { returns(Prism::Node) } def numeric; end @@ -25997,7 +26938,7 @@ class Prism::RationalNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#15348 + # source://prism//lib/prism/node.rb#16596 sig { override.returns(Symbol) } def type; end @@ -26015,7 +26956,7 @@ class Prism::RationalNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#15358 + # source://prism//lib/prism/node.rb#16606 def type; end end end @@ -26025,56 +26966,62 @@ end # redo # ^^^^ # -# source://prism//lib/prism/node.rb#15367 +# source://prism//lib/prism/node.rb#16622 class Prism::RedoNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [RedoNode] a new instance of RedoNode # - # source://prism//lib/prism/node.rb#15369 + # source://prism//lib/prism/node.rb#16624 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 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15376 + # source://prism//lib/prism/node.rb#16631 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15381 + # source://prism//lib/prism/node.rb#16636 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15391 + # source://prism//lib/prism/node.rb#16646 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15386 + # source://prism//lib/prism/node.rb#16641 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?location: Location) -> RedoNode # - # source://prism//lib/prism/node.rb#15396 + # source://prism//lib/prism/node.rb#16651 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#15381 + # source://prism//lib/prism/node.rb#16636 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#15404 + # source://prism//lib/prism/node.rb#16659 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -26083,7 +27030,7 @@ class Prism::RedoNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#15410 + # source://prism//lib/prism/node.rb#16664 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end @@ -26102,7 +27049,7 @@ class Prism::RedoNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#15429 + # source://prism//lib/prism/node.rb#16683 sig { override.returns(Symbol) } def type; end @@ -26114,7 +27061,7 @@ class Prism::RedoNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#15439 + # source://prism//lib/prism/node.rb#16693 def type; end end end @@ -26128,7 +27075,7 @@ module Prism::Reflection class << self # Returns the fields for the given node. # - # source://prism//lib/prism/reflection.rb#114 + # source://prism//lib/prism/reflection.rb#104 sig { params(node: T.class_of(Prism::Node)).returns(T::Array[Prism::Reflection::Field]) } def fields_for(node); end end @@ -26147,13 +27094,6 @@ class Prism::Reflection::ConstantField < ::Prism::Reflection::Field; end # source://prism//lib/prism/reflection.rb#55 class Prism::Reflection::ConstantListField < ::Prism::Reflection::Field; end -# A double field represents a double-precision floating point value. It is -# used exclusively to represent the value of a floating point literal. It -# resolves to a Float in Ruby. -# -# source://prism//lib/prism/reflection.rb#110 -class Prism::Reflection::DoubleField < ::Prism::Reflection::Field; end - # A field represents a single piece of data on a node. It is the base class # for all other field types. # @@ -26170,6 +27110,7 @@ class Prism::Reflection::Field # The name of the field. # # source://prism//lib/prism/reflection.rb#18 + sig { returns(Symbol) } def name; end end @@ -26178,27 +27119,35 @@ end # node because the integer is kept private. Instead, the various flags in # the bitset should be accessed through their query methods. # -# source://prism//lib/prism/reflection.rb#90 +# source://prism//lib/prism/reflection.rb#92 class Prism::Reflection::FlagsField < ::Prism::Reflection::Field # Initializes the flags field with the given name and flags. # # @return [FlagsField] a new instance of FlagsField # - # source://prism//lib/prism/reflection.rb#95 + # source://prism//lib/prism/reflection.rb#97 sig { params(name: Symbol, flags: T::Array[Symbol]).void } def initialize(name, flags); end # The names of the flags in the bitset. # - # source://prism//lib/prism/reflection.rb#92 + # source://prism//lib/prism/reflection.rb#94 + sig { returns(T::Array[Symbol]) } def flags; end end -# An integer field represents an arbitrarily-sized integer value. It is used -# exclusively to represent the value of an integer literal. It resolves to -# an Integer in Ruby. +# A float field represents a double-precision floating point value. It is +# used exclusively to represent the value of a floating point literal. It +# resolves to a Float in Ruby. +# +# source://prism//lib/prism/reflection.rb#85 +class Prism::Reflection::FloatField < ::Prism::Reflection::Field; end + +# An integer field represents an integer value. It is used to represent the +# value of an integer literal, the depth of local variables, and the number +# of a numbered reference. It resolves to an Integer in Ruby. # -# source://prism//lib/prism/reflection.rb#104 +# source://prism//lib/prism/reflection.rb#79 class Prism::Reflection::IntegerField < ::Prism::Reflection::Field; end # A location field represents the location of some part of the node in the @@ -26247,76 +27196,64 @@ class Prism::Reflection::OptionalNodeField < ::Prism::Reflection::Field; end # source://prism//lib/prism/reflection.rb#61 class Prism::Reflection::StringField < ::Prism::Reflection::Field; end -# A uint32 field represents an unsigned 32-bit integer value on a node. It -# resolves to an Integer in Ruby. -# -# source://prism//lib/prism/reflection.rb#83 -class Prism::Reflection::UInt32Field < ::Prism::Reflection::Field; end - -# A uint8 field represents an unsigned 8-bit integer value on a node. It -# resolves to an Integer in Ruby. -# -# source://prism//lib/prism/reflection.rb#78 -class Prism::Reflection::UInt8Field < ::Prism::Reflection::Field; end - # Flags for regular expression and match last line nodes. # -# source://prism//lib/prism/node.rb#18914 +# source://prism//lib/prism/node.rb#20421 module Prism::RegularExpressionFlags; end # n - forces the ASCII-8BIT encoding # -# source://prism//lib/prism/node.rb#18931 +# source://prism//lib/prism/node.rb#20438 Prism::RegularExpressionFlags::ASCII_8BIT = T.let(T.unsafe(nil), Integer) # e - forces the EUC-JP encoding # -# source://prism//lib/prism/node.rb#18928 +# source://prism//lib/prism/node.rb#20435 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#18919 +# source://prism//lib/prism/node.rb#20426 Prism::RegularExpressionFlags::EXTENDED = T.let(T.unsafe(nil), Integer) # internal bytes forced the encoding to binary # -# source://prism//lib/prism/node.rb#18943 +# source://prism//lib/prism/node.rb#20450 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#18946 +# source://prism//lib/prism/node.rb#20453 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#18940 +# source://prism//lib/prism/node.rb#20447 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#18916 +# source://prism//lib/prism/node.rb#20423 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#18922 +# source://prism//lib/prism/node.rb#20429 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#18925 +# source://prism//lib/prism/node.rb#20432 Prism::RegularExpressionFlags::ONCE = T.let(T.unsafe(nil), Integer) # u - forces the UTF-8 encoding # -# source://prism//lib/prism/node.rb#18937 +# source://prism//lib/prism/node.rb#20444 Prism::RegularExpressionFlags::UTF_8 = T.let(T.unsafe(nil), Integer) # s - forces the Windows-31J encoding # -# source://prism//lib/prism/node.rb#18934 +# source://prism//lib/prism/node.rb#20441 Prism::RegularExpressionFlags::WINDOWS_31J = T.let(T.unsafe(nil), Integer) # Represents a regular expression literal with no interpolation. @@ -26324,7 +27261,7 @@ Prism::RegularExpressionFlags::WINDOWS_31J = T.let(T.unsafe(nil), Integer) # /foo/i # ^^^^^^ # -# source://prism//lib/prism/node.rb#15448 +# source://prism//lib/prism/node.rb#16708 class Prism::RegularExpressionNode < ::Prism::Node include ::Prism::RegularExpressionOptions @@ -26332,7 +27269,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [RegularExpressionNode] a new instance of RegularExpressionNode # - # source://prism//lib/prism/node.rb#15450 + # source://prism//lib/prism/node.rb#16710 sig do params( source: Prism::Source, @@ -26346,9 +27283,15 @@ class Prism::RegularExpressionNode < ::Prism::Node end def initialize(source, flags, opening_loc, content_loc, closing_loc, unescaped, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#16894 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15462 + # source://prism//lib/prism/node.rb#16722 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -26356,55 +27299,55 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15549 + # source://prism//lib/prism/node.rb#16808 sig { returns(T::Boolean) } def ascii_8bit?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15467 + # source://prism//lib/prism/node.rb#16727 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#15589 + # source://prism//lib/prism/node.rb#16848 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#15513 + # source://prism//lib/prism/node.rb#16773 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15477 + # source://prism//lib/prism/node.rb#16737 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15472 + # source://prism//lib/prism/node.rb#16732 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def content: () -> String # - # source://prism//lib/prism/node.rb#15584 + # source://prism//lib/prism/node.rb#16843 sig { returns(String) } def content; end # attr_reader content_loc: Location # - # source://prism//lib/prism/node.rb#15506 + # source://prism//lib/prism/node.rb#16766 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#15482 + # source://prism//lib/prism/node.rb#16742 sig do params( flags: Integer, @@ -26420,13 +27363,13 @@ class Prism::RegularExpressionNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15467 + # source://prism//lib/prism/node.rb#16727 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#15490 + # source://prism//lib/prism/node.rb#16750 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -26434,7 +27377,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15544 + # source://prism//lib/prism/node.rb#16803 sig { returns(T::Boolean) } def euc_jp?; end @@ -26442,7 +27385,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15529 + # source://prism//lib/prism/node.rb#16788 sig { returns(T::Boolean) } def extended?; end @@ -26453,7 +27396,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15569 + # source://prism//lib/prism/node.rb#16828 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -26461,7 +27404,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15574 + # source://prism//lib/prism/node.rb#16833 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end @@ -26469,7 +27412,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15564 + # source://prism//lib/prism/node.rb#16823 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -26477,13 +27420,13 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15524 + # source://prism//lib/prism/node.rb#16783 sig { returns(T::Boolean) } def ignore_case?; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#15594 + # source://prism//lib/prism/node.rb#16853 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end @@ -26491,7 +27434,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15534 + # source://prism//lib/prism/node.rb#16793 sig { returns(T::Boolean) } def multi_line?; end @@ -26499,19 +27442,19 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15539 + # source://prism//lib/prism/node.rb#16798 sig { returns(T::Boolean) } def once?; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#15579 + # source://prism//lib/prism/node.rb#16838 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#15499 + # source://prism//lib/prism/node.rb#16759 sig { returns(Prism::Location) } def opening_loc; end @@ -26533,13 +27476,13 @@ class Prism::RegularExpressionNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#15619 + # source://prism//lib/prism/node.rb#16878 sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#15520 + # source://prism//lib/prism/node.rb#16780 sig { returns(String) } def unescaped; end @@ -26547,7 +27490,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15559 + # source://prism//lib/prism/node.rb#16818 sig { returns(T::Boolean) } def utf_8?; end @@ -26555,15 +27498,15 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15554 + # source://prism//lib/prism/node.rb#16813 sig { returns(T::Boolean) } def windows_31j?; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#15495 + # source://prism//lib/prism/node.rb#16755 sig { returns(Integer) } def flags; end @@ -26575,7 +27518,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#15629 + # source://prism//lib/prism/node.rb#16888 def type; end end end @@ -26595,13 +27538,13 @@ end # ^^ # end # -# source://prism//lib/prism/node.rb#15639 +# source://prism//lib/prism/node.rb#16909 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#15641 + # source://prism//lib/prism/node.rb#16911 sig do params( source: Prism::Source, @@ -26613,33 +27556,39 @@ class Prism::RequiredKeywordParameterNode < ::Prism::Node end def initialize(source, flags, name, name_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#17012 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15651 + # source://prism//lib/prism/node.rb#16921 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15656 + # source://prism//lib/prism/node.rb#16926 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15666 + # source://prism//lib/prism/node.rb#16936 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15661 + # source://prism//lib/prism/node.rb#16931 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#15671 + # source://prism//lib/prism/node.rb#16941 sig do params( flags: Integer, @@ -26653,13 +27602,13 @@ class Prism::RequiredKeywordParameterNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15656 + # source://prism//lib/prism/node.rb#16926 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#15679 + # source://prism//lib/prism/node.rb#16949 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -26668,19 +27617,19 @@ class Prism::RequiredKeywordParameterNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#15704 + # source://prism//lib/prism/node.rb#16973 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#15688 + # source://prism//lib/prism/node.rb#16958 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#15691 + # source://prism//lib/prism/node.rb#16961 sig { returns(Prism::Location) } def name_loc; end @@ -26688,7 +27637,7 @@ class Prism::RequiredKeywordParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15699 + # source://prism//lib/prism/node.rb#16968 sig { returns(T::Boolean) } def repeated_parameter?; end @@ -26707,15 +27656,15 @@ class Prism::RequiredKeywordParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#15727 + # source://prism//lib/prism/node.rb#16996 sig { override.returns(Symbol) } def type; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#15684 + # source://prism//lib/prism/node.rb#16954 sig { returns(Integer) } def flags; end @@ -26727,7 +27676,7 @@ class Prism::RequiredKeywordParameterNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#15737 + # source://prism//lib/prism/node.rb#17006 def type; end end end @@ -26738,56 +27687,62 @@ end # ^ # end # -# source://prism//lib/prism/node.rb#15747 +# source://prism//lib/prism/node.rb#17025 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#15749 + # source://prism//lib/prism/node.rb#17027 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 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15758 + # source://prism//lib/prism/node.rb#17036 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15763 + # source://prism//lib/prism/node.rb#17041 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15773 + # source://prism//lib/prism/node.rb#17051 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15768 + # source://prism//lib/prism/node.rb#17046 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#15778 + # source://prism//lib/prism/node.rb#17056 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#15763 + # source://prism//lib/prism/node.rb#17041 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#15786 + # source://prism//lib/prism/node.rb#17064 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -26796,13 +27751,13 @@ class Prism::RequiredParameterNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#15804 + # source://prism//lib/prism/node.rb#17081 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#15795 + # source://prism//lib/prism/node.rb#17073 sig { returns(Symbol) } def name; end @@ -26810,7 +27765,7 @@ class Prism::RequiredParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15799 + # source://prism//lib/prism/node.rb#17076 sig { returns(T::Boolean) } def repeated_parameter?; end @@ -26829,15 +27784,15 @@ class Prism::RequiredParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#15826 + # source://prism//lib/prism/node.rb#17103 sig { override.returns(Symbol) } def type; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#15791 + # source://prism//lib/prism/node.rb#17069 sig { returns(Integer) } def flags; end @@ -26849,7 +27804,7 @@ class Prism::RequiredParameterNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#15836 + # source://prism//lib/prism/node.rb#17113 def type; end end end @@ -26859,13 +27814,13 @@ end # foo rescue nil # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#15845 +# source://prism//lib/prism/node.rb#17130 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#15847 + # source://prism//lib/prism/node.rb#17132 sig do params( source: Prism::Source, @@ -26877,33 +27832,39 @@ class Prism::RescueModifierNode < ::Prism::Node end def initialize(source, expression, keyword_loc, rescue_expression, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#17237 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15857 + # source://prism//lib/prism/node.rb#17142 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15866 + # source://prism//lib/prism/node.rb#17151 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15876 + # source://prism//lib/prism/node.rb#17161 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15871 + # source://prism//lib/prism/node.rb#17156 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#15881 + # source://prism//lib/prism/node.rb#17166 sig do params( expression: Prism::Node, @@ -26917,19 +27878,19 @@ class Prism::RescueModifierNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15866 + # source://prism//lib/prism/node.rb#17151 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#15889 + # source://prism//lib/prism/node.rb#17174 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#15894 + # source://prism//lib/prism/node.rb#17179 sig { returns(Prism::Node) } def expression; end @@ -26938,29 +27899,29 @@ class Prism::RescueModifierNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#15913 + # source://prism//lib/prism/node.rb#17197 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#15908 + # source://prism//lib/prism/node.rb#17192 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#15897 + # source://prism//lib/prism/node.rb#17182 sig { returns(Prism::Location) } def keyword_loc; end # attr_reader rescue_expression: Prism::node # - # source://prism//lib/prism/node.rb#15904 + # source://prism//lib/prism/node.rb#17189 sig { returns(Prism::Node) } def rescue_expression; end - # source://prism//lib/prism/node.rb#15861 + # 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 @@ -26978,7 +27939,7 @@ class Prism::RescueModifierNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#15937 + # source://prism//lib/prism/node.rb#17221 sig { override.returns(Symbol) } def type; end @@ -26990,7 +27951,7 @@ class Prism::RescueModifierNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#15947 + # source://prism//lib/prism/node.rb#17231 def type; end end end @@ -27005,13 +27966,13 @@ end # # `Foo, *splat, Bar` are in the `exceptions` field. `ex` is in the `exception` field. # -# source://prism//lib/prism/node.rb#15961 +# source://prism//lib/prism/node.rb#17254 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#15963 + # source://prism//lib/prism/node.rb#17256 sig do params( source: Prism::Source, @@ -27026,39 +27987,45 @@ class Prism::RescueNode < ::Prism::Node end def initialize(source, keyword_loc, exceptions, operator_loc, reference, statements, consequent, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#17405 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15976 + # source://prism//lib/prism/node.rb#17269 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15981 + # source://prism//lib/prism/node.rb#17274 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15996 + # source://prism//lib/prism/node.rb#17289 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15986 + # source://prism//lib/prism/node.rb#17279 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader consequent: RescueNode? # - # source://prism//lib/prism/node.rb#16043 + # source://prism//lib/prism/node.rb#17336 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#16001 + # source://prism//lib/prism/node.rb#17294 sig do params( keyword_loc: Prism::Location, @@ -27075,19 +28042,19 @@ class Prism::RescueNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15981 + # source://prism//lib/prism/node.rb#17274 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#16009 + # source://prism//lib/prism/node.rb#17302 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#16021 + # source://prism//lib/prism/node.rb#17314 sig { returns(T::Array[Prism::Node]) } def exceptions; end @@ -27096,43 +28063,43 @@ class Prism::RescueNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#16057 + # source://prism//lib/prism/node.rb#17349 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#16047 + # source://prism//lib/prism/node.rb#17339 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#16014 + # source://prism//lib/prism/node.rb#17307 sig { returns(Prism::Location) } def keyword_loc; end # def operator: () -> String? # - # source://prism//lib/prism/node.rb#16052 + # source://prism//lib/prism/node.rb#17344 sig { returns(T.nilable(String)) } def operator; end # attr_reader operator_loc: Location? # - # source://prism//lib/prism/node.rb#16024 + # source://prism//lib/prism/node.rb#17317 sig { returns(T.nilable(Prism::Location)) } def operator_loc; end # attr_reader reference: Prism::node? # - # source://prism//lib/prism/node.rb#16037 + # source://prism//lib/prism/node.rb#17330 sig { returns(T.nilable(Prism::Node)) } def reference; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#16040 + # source://prism//lib/prism/node.rb#17333 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -27151,7 +28118,7 @@ class Prism::RescueNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#16097 + # source://prism//lib/prism/node.rb#17389 sig { override.returns(Symbol) } def type; end @@ -27163,7 +28130,7 @@ class Prism::RescueNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#16107 + # source://prism//lib/prism/node.rb#17399 def type; end end end @@ -27174,13 +28141,13 @@ end # ^^ # end # -# source://prism//lib/prism/node.rb#16117 +# source://prism//lib/prism/node.rb#17422 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#16119 + # source://prism//lib/prism/node.rb#17424 sig do params( source: Prism::Source, @@ -27193,33 +28160,39 @@ class Prism::RestParameterNode < ::Prism::Node end def initialize(source, flags, name, name_loc, operator_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#17549 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16130 + # source://prism//lib/prism/node.rb#17435 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16135 + # source://prism//lib/prism/node.rb#17440 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16145 + # source://prism//lib/prism/node.rb#17450 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16140 + # source://prism//lib/prism/node.rb#17445 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#16150 + # source://prism//lib/prism/node.rb#17455 sig do params( flags: Integer, @@ -27234,13 +28207,13 @@ class Prism::RestParameterNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16135 + # source://prism//lib/prism/node.rb#17440 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#16158 + # source://prism//lib/prism/node.rb#17463 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -27249,31 +28222,31 @@ class Prism::RestParameterNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#16201 + # source://prism//lib/prism/node.rb#17505 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol? # - # source://prism//lib/prism/node.rb#16167 + # source://prism//lib/prism/node.rb#17472 sig { returns(T.nilable(Symbol)) } def name; end # attr_reader name_loc: Location? # - # source://prism//lib/prism/node.rb#16170 + # source://prism//lib/prism/node.rb#17475 sig { returns(T.nilable(Prism::Location)) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#16196 + # source://prism//lib/prism/node.rb#17500 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#16183 + # source://prism//lib/prism/node.rb#17488 sig { returns(Prism::Location) } def operator_loc; end @@ -27281,7 +28254,7 @@ class Prism::RestParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16191 + # source://prism//lib/prism/node.rb#17495 sig { returns(T::Boolean) } def repeated_parameter?; end @@ -27300,15 +28273,15 @@ class Prism::RestParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#16229 + # source://prism//lib/prism/node.rb#17533 sig { override.returns(Symbol) } def type; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#16163 + # source://prism//lib/prism/node.rb#17468 sig { returns(Integer) } def flags; end @@ -27320,66 +28293,164 @@ class Prism::RestParameterNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#16239 + # source://prism//lib/prism/node.rb#17543 def type; end end end +# This represents the result of a call to ::parse or ::parse_file. It contains +# the requested structure, any comments that were encounters, and any errors +# that were encountered. +# +# source://prism//lib/prism/parse_result.rb#443 +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 + sig do + params( + comments: T::Array[Prism::Comment], + magic_comments: T::Array[Prism::MagicComment], + data_loc: T.nilable(Prism::Location), + errors: T::Array[Prism::ParseError], + warnings: T::Array[Prism::ParseWarning], + source: Prism::Source + ).void + end + def initialize(comments, magic_comments, data_loc, errors, warnings, source); end + + # The list of comments that were encountered during parsing. + # + # source://prism//lib/prism/parse_result.rb#445 + sig { returns(T::Array[Prism::Comment]) } + def comments; end + + # An optional location that represents the location of the __END__ marker + # and the rest of the content of the file. This content is loaded into the + # DATA constant when the file being parsed is the main file being executed. + # + # source://prism//lib/prism/parse_result.rb#453 + 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 + 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 + sig { returns(Encoding) } + def encoding; end + + # The list of errors that were generated during parsing. + # + # source://prism//lib/prism/parse_result.rb#456 + sig { returns(T::Array[Prism::ParseError]) } + def errors; end + + # Returns true if there were errors during parsing and false if there were + # not. + # + # @return [Boolean] + # + # source://prism//lib/prism/parse_result.rb#492 + 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 + 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 + sig { returns(Prism::Source) } + def source; end + + # Returns true if there were no errors during parsing and false if there + # were. + # + # @return [Boolean] + # + # source://prism//lib/prism/parse_result.rb#486 + sig { returns(T::Boolean) } + def success?; end + + # The list of warnings that were generated during parsing. + # + # source://prism//lib/prism/parse_result.rb#459 + sig { returns(T::Array[Prism::ParseWarning]) } + def warnings; end +end + # Represents the use of the `retry` keyword. # # retry # ^^^^^ # -# source://prism//lib/prism/node.rb#16248 +# source://prism//lib/prism/node.rb#17562 class Prism::RetryNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [RetryNode] a new instance of RetryNode # - # source://prism//lib/prism/node.rb#16250 + # source://prism//lib/prism/node.rb#17564 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 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16257 + # source://prism//lib/prism/node.rb#17571 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16262 + # source://prism//lib/prism/node.rb#17576 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16272 + # source://prism//lib/prism/node.rb#17586 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16267 + # source://prism//lib/prism/node.rb#17581 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?location: Location) -> RetryNode # - # source://prism//lib/prism/node.rb#16277 + # source://prism//lib/prism/node.rb#17591 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#16262 + # source://prism//lib/prism/node.rb#17576 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#16285 + # source://prism//lib/prism/node.rb#17599 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -27388,7 +28459,7 @@ class Prism::RetryNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#16291 + # source://prism//lib/prism/node.rb#17604 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end @@ -27407,7 +28478,7 @@ class Prism::RetryNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#16310 + # source://prism//lib/prism/node.rb#17623 sig { override.returns(Symbol) } def type; end @@ -27419,7 +28490,7 @@ class Prism::RetryNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#16320 + # source://prism//lib/prism/node.rb#17633 def type; end end end @@ -27429,13 +28500,13 @@ end # return 1 # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#16329 +# source://prism//lib/prism/node.rb#17648 class Prism::ReturnNode < ::Prism::Node # def initialize: (Location keyword_loc, ArgumentsNode? arguments, Location location) -> void # # @return [ReturnNode] a new instance of ReturnNode # - # source://prism//lib/prism/node.rb#16331 + # source://prism//lib/prism/node.rb#17650 sig do params( source: Prism::Source, @@ -27446,39 +28517,45 @@ class Prism::ReturnNode < ::Prism::Node end def initialize(source, 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 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16340 + # source://prism//lib/prism/node.rb#17659 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#16382 + # source://prism//lib/prism/node.rb#17701 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16345 + # source://prism//lib/prism/node.rb#17664 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16357 + # source://prism//lib/prism/node.rb#17676 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16350 + # source://prism//lib/prism/node.rb#17669 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?keyword_loc: Location, ?arguments: ArgumentsNode?, ?location: Location) -> ReturnNode # - # source://prism//lib/prism/node.rb#16362 + # source://prism//lib/prism/node.rb#17681 sig do params( keyword_loc: Prism::Location, @@ -27491,13 +28568,13 @@ class Prism::ReturnNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16345 + # source://prism//lib/prism/node.rb#17664 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 } # - # source://prism//lib/prism/node.rb#16370 + # source://prism//lib/prism/node.rb#17689 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -27506,19 +28583,19 @@ class Prism::ReturnNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#16391 + # source://prism//lib/prism/node.rb#17709 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#16386 + # source://prism//lib/prism/node.rb#17704 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#16375 + # source://prism//lib/prism/node.rb#17694 sig { returns(Prism::Location) } def keyword_loc; end @@ -27537,7 +28614,7 @@ class Prism::ReturnNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#16417 + # source://prism//lib/prism/node.rb#17735 sig { override.returns(Symbol) } def type; end @@ -27549,7 +28626,7 @@ class Prism::ReturnNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#16427 + # source://prism//lib/prism/node.rb#17745 def type; end end end @@ -27559,56 +28636,62 @@ end # self # ^^^^ # -# source://prism//lib/prism/node.rb#16436 +# source://prism//lib/prism/node.rb#17762 class Prism::SelfNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [SelfNode] a new instance of SelfNode # - # source://prism//lib/prism/node.rb#16438 + # source://prism//lib/prism/node.rb#17764 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 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16445 + # source://prism//lib/prism/node.rb#17771 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16450 + # source://prism//lib/prism/node.rb#17776 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16460 + # source://prism//lib/prism/node.rb#17786 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16455 + # source://prism//lib/prism/node.rb#17781 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?location: Location) -> SelfNode # - # source://prism//lib/prism/node.rb#16465 + # source://prism//lib/prism/node.rb#17791 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#16450 + # source://prism//lib/prism/node.rb#17776 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#16473 + # source://prism//lib/prism/node.rb#17799 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -27617,7 +28700,7 @@ class Prism::SelfNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#16479 + # source://prism//lib/prism/node.rb#17804 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end @@ -27636,7 +28719,7 @@ class Prism::SelfNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#16498 + # source://prism//lib/prism/node.rb#17823 sig { override.returns(Symbol) } def type; end @@ -27648,7 +28731,7 @@ class Prism::SelfNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#16508 + # source://prism//lib/prism/node.rb#17833 def type; end end end @@ -27715,22 +28798,22 @@ class Prism::Serialize::Loader # source://prism//lib/prism/serialize.rb#114 def load_line_offsets; end - # source://prism//lib/prism/serialize.rb#413 + # source://prism//lib/prism/serialize.rb#416 def load_metadata; end - # source://prism//lib/prism/serialize.rb#447 + # source://prism//lib/prism/serialize.rb#450 def load_nodes; end - # source://prism//lib/prism/serialize.rb#461 + # source://prism//lib/prism/serialize.rb#464 def load_result; end # source://prism//lib/prism/serialize.rb#110 def load_start_line; end - # source://prism//lib/prism/serialize.rb#422 + # source://prism//lib/prism/serialize.rb#425 def load_tokens; end - # source://prism//lib/prism/serialize.rb#435 + # source://prism//lib/prism/serialize.rb#438 def load_tokens_result; end # Returns the value of attribute serialized. @@ -27750,61 +28833,61 @@ class Prism::Serialize::Loader private - # source://prism//lib/prism/serialize.rb#547 + # source://prism//lib/prism/serialize.rb#550 def load_constant(index); end - # source://prism//lib/prism/serialize.rb#500 + # source://prism//lib/prism/serialize.rb#503 def load_double; end - # source://prism//lib/prism/serialize.rb#515 + # source://prism//lib/prism/serialize.rb#518 def load_embedded_string; end - # source://prism//lib/prism/serialize.rb#577 + # source://prism//lib/prism/serialize.rb#580 def load_error_level; end - # source://prism//lib/prism/serialize.rb#489 + # source://prism//lib/prism/serialize.rb#492 def load_integer; end - # source://prism//lib/prism/serialize.rb#531 + # source://prism//lib/prism/serialize.rb#534 def load_location; end - # source://prism//lib/prism/serialize.rb#535 + # source://prism//lib/prism/serialize.rb#538 def load_location_object; end - # source://prism//lib/prism/serialize.rb#606 + # source://prism//lib/prism/serialize.rb#609 def load_node; end - # source://prism//lib/prism/serialize.rb#572 + # source://prism//lib/prism/serialize.rb#575 def load_optional_constant; end - # source://prism//lib/prism/serialize.rb#539 + # source://prism//lib/prism/serialize.rb#542 def load_optional_location; end - # source://prism//lib/prism/serialize.rb#543 + # source://prism//lib/prism/serialize.rb#546 def load_optional_location_object; end - # source://prism//lib/prism/serialize.rb#508 + # source://prism//lib/prism/serialize.rb#511 def load_optional_node; end - # source://prism//lib/prism/serialize.rb#568 + # source://prism//lib/prism/serialize.rb#571 def load_required_constant; end - # source://prism//lib/prism/serialize.rb#519 + # source://prism//lib/prism/serialize.rb#522 def load_string; end - # source://prism//lib/prism/serialize.rb#504 + # source://prism//lib/prism/serialize.rb#507 def load_uint32; end - # source://prism//lib/prism/serialize.rb#484 + # source://prism//lib/prism/serialize.rb#487 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#470 + # source://prism//lib/prism/serialize.rb#473 def load_varuint; end - # source://prism//lib/prism/serialize.rb#592 + # source://prism//lib/prism/serialize.rb#595 def load_warning_level; end end @@ -27836,7 +28919,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#1830 +# source://prism//lib/prism/serialize.rb#1833 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. @@ -27844,13 +28927,13 @@ Prism::Serialize::TOKEN_TYPES = T.let(T.unsafe(nil), Array) # C = { a: 1 } # ^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#16518 +# source://prism//lib/prism/node.rb#17849 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#16520 + # source://prism//lib/prism/node.rb#17851 sig do params( source: Prism::Source, @@ -27861,33 +28944,39 @@ class Prism::ShareableConstantNode < ::Prism::Node end def initialize(source, flags, write, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#17954 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16529 + # source://prism//lib/prism/node.rb#17860 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16534 + # source://prism//lib/prism/node.rb#17865 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16544 + # source://prism//lib/prism/node.rb#17875 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16539 + # source://prism//lib/prism/node.rb#17870 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#16549 + # source://prism//lib/prism/node.rb#17880 sig do params( flags: Integer, @@ -27900,13 +28989,13 @@ class Prism::ShareableConstantNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16534 + # source://prism//lib/prism/node.rb#17865 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#16557 + # source://prism//lib/prism/node.rb#17888 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -27914,7 +29003,7 @@ class Prism::ShareableConstantNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16580 + # source://prism//lib/prism/node.rb#17910 sig { returns(T::Boolean) } def experimental_copy?; end @@ -27922,7 +29011,7 @@ class Prism::ShareableConstantNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16575 + # source://prism//lib/prism/node.rb#17905 sig { returns(T::Boolean) } def experimental_everything?; end @@ -27931,7 +29020,7 @@ class Prism::ShareableConstantNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#16585 + # source://prism//lib/prism/node.rb#17915 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end @@ -27939,7 +29028,7 @@ class Prism::ShareableConstantNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16570 + # source://prism//lib/prism/node.rb#17900 sig { returns(T::Boolean) } def literal?; end @@ -27958,23 +29047,23 @@ class Prism::ShareableConstantNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#16608 + # source://prism//lib/prism/node.rb#17938 sig { override.returns(Symbol) } def type; end # The constant write that should be modified with the shareability state. # - # source://prism//lib/prism/node.rb#16566 + # source://prism//lib/prism/node.rb#17897 sig do returns(T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode)) end def write; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#16562 + # source://prism//lib/prism/node.rb#17893 sig { returns(Integer) } def flags; end @@ -27986,29 +29075,29 @@ class Prism::ShareableConstantNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#16618 + # source://prism//lib/prism/node.rb#17948 def type; end end end # Flags for shareable constant nodes. # -# source://prism//lib/prism/node.rb#18950 +# source://prism//lib/prism/node.rb#20457 module Prism::ShareableConstantNodeFlags; end # constant writes that should be modified with shareable constant value experimental copy # -# source://prism//lib/prism/node.rb#18958 +# source://prism//lib/prism/node.rb#20465 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#18955 +# source://prism//lib/prism/node.rb#20462 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#18952 +# source://prism//lib/prism/node.rb#20459 Prism::ShareableConstantNodeFlags::LITERAL = T.let(T.unsafe(nil), Integer) # Represents a singleton class declaration involving the `class` keyword. @@ -28016,13 +29105,13 @@ Prism::ShareableConstantNodeFlags::LITERAL = T.let(T.unsafe(nil), Integer) # class << self end # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#16627 +# source://prism//lib/prism/node.rb#17965 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#16629 + # source://prism//lib/prism/node.rb#17967 sig do params( source: Prism::Source, @@ -28037,51 +29126,57 @@ class Prism::SingletonClassNode < ::Prism::Node end def initialize(source, locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#18108 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16642 + # source://prism//lib/prism/node.rb#17980 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: Prism::node? # - # source://prism//lib/prism/node.rb#16698 + # source://prism//lib/prism/node.rb#18036 sig { returns(T.nilable(Prism::Node)) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16647 + # source://prism//lib/prism/node.rb#17985 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def class_keyword: () -> String # - # source://prism//lib/prism/node.rb#16709 + # source://prism//lib/prism/node.rb#18046 sig { returns(String) } def class_keyword; end # attr_reader class_keyword_loc: Location # - # source://prism//lib/prism/node.rb#16681 + # source://prism//lib/prism/node.rb#18019 sig { returns(Prism::Location) } def class_keyword_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16660 + # source://prism//lib/prism/node.rb#17998 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16652 + # source://prism//lib/prism/node.rb#17990 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#16665 + # source://prism//lib/prism/node.rb#18003 sig do params( locals: T::Array[Symbol], @@ -28098,31 +29193,31 @@ class Prism::SingletonClassNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16647 + # source://prism//lib/prism/node.rb#17985 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#16673 + # source://prism//lib/prism/node.rb#18011 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#16719 + # source://prism//lib/prism/node.rb#18056 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#16701 + # source://prism//lib/prism/node.rb#18039 sig { returns(Prism::Location) } def end_keyword_loc; end # attr_reader expression: Prism::node # - # source://prism//lib/prism/node.rb#16695 + # source://prism//lib/prism/node.rb#18033 sig { returns(Prism::Node) } def expression; end @@ -28131,25 +29226,25 @@ class Prism::SingletonClassNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#16724 + # source://prism//lib/prism/node.rb#18061 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#16678 + # source://prism//lib/prism/node.rb#18016 sig { returns(T::Array[Symbol]) } def locals; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#16714 + # source://prism//lib/prism/node.rb#18051 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#16688 + # source://prism//lib/prism/node.rb#18026 sig { returns(Prism::Location) } def operator_loc; end @@ -28168,7 +29263,7 @@ class Prism::SingletonClassNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#16755 + # source://prism//lib/prism/node.rb#18092 sig { override.returns(Symbol) } def type; end @@ -28180,7 +29275,7 @@ class Prism::SingletonClassNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#16765 + # source://prism//lib/prism/node.rb#18102 def type; end end end @@ -28259,6 +29354,7 @@ class Prism::Source # The list of newline byte offsets in the source code. # # source://prism//lib/prism/parse_result.rb#15 + sig { returns(T::Array[Integer]) } def offsets; end # Perform a byteslice on the source code using the given byte offset and @@ -28271,11 +29367,13 @@ class Prism::Source # The source code that this source object represents. # # source://prism//lib/prism/parse_result.rb#9 + sig { returns(String) } def source; end # The line number where this source starts. # # source://prism//lib/prism/parse_result.rb#12 + sig { returns(Integer) } def start_line; end private @@ -28292,56 +29390,62 @@ end # __ENCODING__ # ^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#16774 +# source://prism//lib/prism/node.rb#18124 class Prism::SourceEncodingNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [SourceEncodingNode] a new instance of SourceEncodingNode # - # source://prism//lib/prism/node.rb#16776 + # source://prism//lib/prism/node.rb#18126 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 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16783 + # source://prism//lib/prism/node.rb#18133 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16788 + # source://prism//lib/prism/node.rb#18138 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16798 + # source://prism//lib/prism/node.rb#18148 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16793 + # source://prism//lib/prism/node.rb#18143 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?location: Location) -> SourceEncodingNode # - # source://prism//lib/prism/node.rb#16803 + # source://prism//lib/prism/node.rb#18153 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#16788 + # source://prism//lib/prism/node.rb#18138 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#16811 + # source://prism//lib/prism/node.rb#18161 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -28350,7 +29454,7 @@ class Prism::SourceEncodingNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#16817 + # source://prism//lib/prism/node.rb#18166 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end @@ -28369,7 +29473,7 @@ class Prism::SourceEncodingNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#16836 + # source://prism//lib/prism/node.rb#18185 sig { override.returns(Symbol) } def type; end @@ -28381,7 +29485,7 @@ class Prism::SourceEncodingNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#16846 + # source://prism//lib/prism/node.rb#18195 def type; end end end @@ -28391,65 +29495,71 @@ end # __FILE__ # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#16855 +# source://prism//lib/prism/node.rb#18210 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#16857 + # source://prism//lib/prism/node.rb#18212 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 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16866 + # source://prism//lib/prism/node.rb#18221 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16871 + # source://prism//lib/prism/node.rb#18226 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16881 + # source://prism//lib/prism/node.rb#18236 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16876 + # source://prism//lib/prism/node.rb#18231 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#16886 + # source://prism//lib/prism/node.rb#18241 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#16871 + # source://prism//lib/prism/node.rb#18226 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#16894 + # source://prism//lib/prism/node.rb#18249 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # attr_reader filepath: String + # 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#16903 + # source://prism//lib/prism/node.rb#18258 sig { returns(String) } def filepath; end @@ -28457,7 +29567,7 @@ class Prism::SourceFileNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16912 + # source://prism//lib/prism/node.rb#18266 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -28465,7 +29575,7 @@ class Prism::SourceFileNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16907 + # source://prism//lib/prism/node.rb#18261 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -28473,13 +29583,13 @@ class Prism::SourceFileNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16917 + # source://prism//lib/prism/node.rb#18271 sig { returns(T::Boolean) } def frozen?; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#16927 + # source://prism//lib/prism/node.rb#18281 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end @@ -28487,7 +29597,7 @@ class Prism::SourceFileNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16922 + # source://prism//lib/prism/node.rb#18276 sig { returns(T::Boolean) } def mutable?; end @@ -28506,15 +29616,15 @@ class Prism::SourceFileNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#16949 + # source://prism//lib/prism/node.rb#18303 sig { override.returns(Symbol) } def type; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#16899 + # source://prism//lib/prism/node.rb#18254 sig { returns(Integer) } def flags; end @@ -28526,7 +29636,7 @@ class Prism::SourceFileNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#16959 + # source://prism//lib/prism/node.rb#18313 def type; end end end @@ -28536,56 +29646,62 @@ end # __LINE__ # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#16968 +# source://prism//lib/prism/node.rb#18330 class Prism::SourceLineNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [SourceLineNode] a new instance of SourceLineNode # - # source://prism//lib/prism/node.rb#16970 + # source://prism//lib/prism/node.rb#18332 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 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16977 + # source://prism//lib/prism/node.rb#18339 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16982 + # source://prism//lib/prism/node.rb#18344 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16992 + # source://prism//lib/prism/node.rb#18354 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16987 + # source://prism//lib/prism/node.rb#18349 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?location: Location) -> SourceLineNode # - # source://prism//lib/prism/node.rb#16997 + # source://prism//lib/prism/node.rb#18359 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#16982 + # source://prism//lib/prism/node.rb#18344 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#17005 + # source://prism//lib/prism/node.rb#18367 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -28594,7 +29710,7 @@ class Prism::SourceLineNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#17011 + # source://prism//lib/prism/node.rb#18372 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end @@ -28613,7 +29729,7 @@ class Prism::SourceLineNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#17030 + # source://prism//lib/prism/node.rb#18391 sig { override.returns(Symbol) } def type; end @@ -28625,7 +29741,7 @@ class Prism::SourceLineNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#17040 + # source://prism//lib/prism/node.rb#18401 def type; end end end @@ -28635,13 +29751,13 @@ end # [*a] # ^^ # -# source://prism//lib/prism/node.rb#17049 +# source://prism//lib/prism/node.rb#18416 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#17051 + # source://prism//lib/prism/node.rb#18418 sig do params( source: Prism::Source, @@ -28652,33 +29768,39 @@ class Prism::SplatNode < ::Prism::Node end def initialize(source, operator_loc, expression, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#18519 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17060 + # source://prism//lib/prism/node.rb#18427 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17065 + # source://prism//lib/prism/node.rb#18432 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17077 + # source://prism//lib/prism/node.rb#18444 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17070 + # source://prism//lib/prism/node.rb#18437 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#17082 + # source://prism//lib/prism/node.rb#18449 sig do params( operator_loc: Prism::Location, @@ -28691,19 +29813,19 @@ class Prism::SplatNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17065 + # source://prism//lib/prism/node.rb#18432 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#17090 + # source://prism//lib/prism/node.rb#18457 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#17102 + # source://prism//lib/prism/node.rb#18469 sig { returns(T.nilable(Prism::Node)) } def expression; end @@ -28712,19 +29834,19 @@ class Prism::SplatNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#17111 + # source://prism//lib/prism/node.rb#18477 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # - # source://prism//lib/prism/node.rb#17106 + # source://prism//lib/prism/node.rb#18472 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#17095 + # source://prism//lib/prism/node.rb#18462 sig { returns(Prism::Location) } def operator_loc; end @@ -28743,7 +29865,7 @@ class Prism::SplatNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#17137 + # source://prism//lib/prism/node.rb#18503 sig { override.returns(Symbol) } def type; end @@ -28755,7 +29877,7 @@ class Prism::SplatNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#17147 + # source://prism//lib/prism/node.rb#18513 def type; end end end @@ -28765,62 +29887,68 @@ end # foo; bar; baz # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#17156 +# source://prism//lib/prism/node.rb#18530 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#17158 + # source://prism//lib/prism/node.rb#18532 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 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17166 + # source://prism//lib/prism/node.rb#18540 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#17199 + # source://prism//lib/prism/node.rb#18573 sig { returns(T::Array[Prism::Node]) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17171 + # source://prism//lib/prism/node.rb#18545 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17181 + # source://prism//lib/prism/node.rb#18555 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17176 + # source://prism//lib/prism/node.rb#18550 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#17186 + # source://prism//lib/prism/node.rb#18560 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#17171 + # source://prism//lib/prism/node.rb#18545 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#17194 + # source://prism//lib/prism/node.rb#18568 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -28829,7 +29957,7 @@ class Prism::StatementsNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#17203 + # source://prism//lib/prism/node.rb#18576 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end @@ -28848,7 +29976,7 @@ class Prism::StatementsNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#17223 + # source://prism//lib/prism/node.rb#18596 sig { override.returns(Symbol) } def type; end @@ -28860,30 +29988,30 @@ class Prism::StatementsNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#17233 + # source://prism//lib/prism/node.rb#18606 def type; end end end # Flags for string nodes. # -# source://prism//lib/prism/node.rb#18962 +# source://prism//lib/prism/node.rb#20469 module Prism::StringFlags; end # internal bytes forced the encoding to binary # -# source://prism//lib/prism/node.rb#18967 +# source://prism//lib/prism/node.rb#20474 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#18964 +# source://prism//lib/prism/node.rb#20471 Prism::StringFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/node.rb#18970 +# source://prism//lib/prism/node.rb#20477 Prism::StringFlags::FROZEN = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/node.rb#18973 +# source://prism//lib/prism/node.rb#20480 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. @@ -28897,7 +30025,7 @@ Prism::StringFlags::MUTABLE = T.let(T.unsafe(nil), Integer) # "foo #{bar} baz" # ^^^^ ^^^^ # -# source://prism//lib/prism/node.rb#17248 +# source://prism//lib/prism/node.rb#18629 class Prism::StringNode < ::Prism::Node include ::Prism::HeredocQuery @@ -28905,7 +30033,7 @@ class Prism::StringNode < ::Prism::Node # # @return [StringNode] a new instance of StringNode # - # source://prism//lib/prism/node.rb#17250 + # source://prism//lib/prism/node.rb#18631 sig do params( source: Prism::Source, @@ -28919,57 +30047,63 @@ class Prism::StringNode < ::Prism::Node end def initialize(source, flags, opening_loc, content_loc, closing_loc, unescaped, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#18792 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17262 + # source://prism//lib/prism/node.rb#18643 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17267 + # source://prism//lib/prism/node.rb#18648 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#17366 + # source://prism//lib/prism/node.rb#18746 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#17319 + # source://prism//lib/prism/node.rb#18700 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17277 + # source://prism//lib/prism/node.rb#18658 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17272 + # source://prism//lib/prism/node.rb#18653 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def content: () -> String # - # source://prism//lib/prism/node.rb#17361 + # source://prism//lib/prism/node.rb#18741 sig { returns(String) } def content; end # attr_reader content_loc: Location # - # source://prism//lib/prism/node.rb#17312 + # source://prism//lib/prism/node.rb#18693 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#17282 + # source://prism//lib/prism/node.rb#18663 sig do params( flags: Integer, @@ -28985,13 +30119,13 @@ class Prism::StringNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17267 + # source://prism//lib/prism/node.rb#18648 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#17290 + # source://prism//lib/prism/node.rb#18671 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -29002,7 +30136,7 @@ class Prism::StringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#17341 + # source://prism//lib/prism/node.rb#18721 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -29010,7 +30144,7 @@ class Prism::StringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#17336 + # source://prism//lib/prism/node.rb#18716 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -29018,7 +30152,7 @@ class Prism::StringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#17346 + # source://prism//lib/prism/node.rb#18726 sig { returns(T::Boolean) } def frozen?; end @@ -29027,7 +30161,7 @@ class Prism::StringNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#17371 + # source://prism//lib/prism/node.rb#18751 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end @@ -29035,19 +30169,19 @@ class Prism::StringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#17351 + # source://prism//lib/prism/node.rb#18731 sig { returns(T::Boolean) } def mutable?; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#17356 + # source://prism//lib/prism/node.rb#18736 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#17299 + # source://prism//lib/prism/node.rb#18680 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end @@ -29073,21 +30207,21 @@ class Prism::StringNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#17396 + # source://prism//lib/prism/node.rb#18776 sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#17332 + # source://prism//lib/prism/node.rb#18713 sig { returns(String) } def unescaped; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#17295 + # source://prism//lib/prism/node.rb#18676 sig { returns(Integer) } def flags; end @@ -29099,7 +30233,7 @@ class Prism::StringNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#17406 + # source://prism//lib/prism/node.rb#18786 def type; end end end @@ -29112,13 +30246,13 @@ end # super foo, bar # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#17418 +# source://prism//lib/prism/node.rb#18809 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#17420 + # source://prism//lib/prism/node.rb#18811 sig do params( source: Prism::Source, @@ -29132,45 +30266,51 @@ class Prism::SuperNode < ::Prism::Node end def initialize(source, keyword_loc, lparen_loc, arguments, rparen_loc, block, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#18963 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17432 + # source://prism//lib/prism/node.rb#18823 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#17488 + # source://prism//lib/prism/node.rb#18879 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # attr_reader block: Prism::node? # - # source://prism//lib/prism/node.rb#17504 + # source://prism//lib/prism/node.rb#18895 sig { returns(T.nilable(Prism::Node)) } def block; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17437 + # source://prism//lib/prism/node.rb#18828 sig { 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#18841 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17442 + # source://prism//lib/prism/node.rb#18833 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#17455 + # source://prism//lib/prism/node.rb#18846 sig do params( keyword_loc: Prism::Location, @@ -29186,13 +30326,13 @@ class Prism::SuperNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17437 + # source://prism//lib/prism/node.rb#18828 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#17463 + # source://prism//lib/prism/node.rb#18854 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -29201,43 +30341,43 @@ class Prism::SuperNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#17523 + # source://prism//lib/prism/node.rb#18913 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#17508 + # source://prism//lib/prism/node.rb#18898 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#17468 + # source://prism//lib/prism/node.rb#18859 sig { returns(Prism::Location) } def keyword_loc; end # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#17513 + # source://prism//lib/prism/node.rb#18903 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#17475 + # source://prism//lib/prism/node.rb#18866 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#17518 + # source://prism//lib/prism/node.rb#18908 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#17491 + # source://prism//lib/prism/node.rb#18882 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end @@ -29256,7 +30396,7 @@ class Prism::SuperNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#17557 + # source://prism//lib/prism/node.rb#18947 sig { override.returns(Symbol) } def type; end @@ -29268,29 +30408,29 @@ class Prism::SuperNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#17567 + # source://prism//lib/prism/node.rb#18957 def type; end end end # Flags for symbol nodes. # -# source://prism//lib/prism/node.rb#18977 +# source://prism//lib/prism/node.rb#20484 module Prism::SymbolFlags; end # internal bytes forced the encoding to binary # -# source://prism//lib/prism/node.rb#18982 +# source://prism//lib/prism/node.rb#20489 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#18985 +# source://prism//lib/prism/node.rb#20492 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#18979 +# source://prism//lib/prism/node.rb#20486 Prism::SymbolFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # Represents a symbol literal or a symbol contained within a `%i` list. @@ -29301,13 +30441,13 @@ Prism::SymbolFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # %i[foo] # ^^^ # -# source://prism//lib/prism/node.rb#17579 +# source://prism//lib/prism/node.rb#18980 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#17581 + # source://prism//lib/prism/node.rb#18982 sig do params( source: Prism::Source, @@ -29321,45 +30461,51 @@ class Prism::SymbolNode < ::Prism::Node end def initialize(source, flags, opening_loc, value_loc, closing_loc, unescaped, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#19144 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17593 + # source://prism//lib/prism/node.rb#18994 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17598 + # source://prism//lib/prism/node.rb#18999 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#17698 + # source://prism//lib/prism/node.rb#19098 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#17656 + # source://prism//lib/prism/node.rb#19057 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17608 + # source://prism//lib/prism/node.rb#19009 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17603 + # source://prism//lib/prism/node.rb#19004 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#17613 + # source://prism//lib/prism/node.rb#19014 sig do params( flags: Integer, @@ -29375,13 +30521,13 @@ class Prism::SymbolNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17598 + # source://prism//lib/prism/node.rb#18999 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#17621 + # source://prism//lib/prism/node.rb#19022 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -29392,7 +30538,7 @@ class Prism::SymbolNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#17678 + # source://prism//lib/prism/node.rb#19078 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -29400,7 +30546,7 @@ class Prism::SymbolNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#17683 + # source://prism//lib/prism/node.rb#19083 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end @@ -29408,25 +30554,25 @@ class Prism::SymbolNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#17673 + # source://prism//lib/prism/node.rb#19073 sig { returns(T::Boolean) } def forced_utf8_encoding?; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#17703 + # source://prism//lib/prism/node.rb#19103 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#17688 + # source://prism//lib/prism/node.rb#19088 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#17630 + # source://prism//lib/prism/node.rb#19031 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end @@ -29445,33 +30591,33 @@ class Prism::SymbolNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#17728 + # source://prism//lib/prism/node.rb#19128 sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#17669 + # source://prism//lib/prism/node.rb#19070 sig { returns(String) } def unescaped; end # def value: () -> String? # - # source://prism//lib/prism/node.rb#17693 + # source://prism//lib/prism/node.rb#19093 sig { returns(T.nilable(String)) } def value; end # attr_reader value_loc: Location? # - # source://prism//lib/prism/node.rb#17643 + # source://prism//lib/prism/node.rb#19044 sig { returns(T.nilable(Prism::Location)) } def value_loc; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#17626 + # source://prism//lib/prism/node.rb#19027 sig { returns(Integer) } def flags; end @@ -29483,62 +30629,65 @@ class Prism::SymbolNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#17738 + # source://prism//lib/prism/node.rb#19138 def type; end end end # This represents a token from the Ruby source. # -# source://prism//lib/prism/parse_result.rb#504 +# source://prism//lib/prism/parse_result.rb#550 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#516 + # source://prism//lib/prism/parse_result.rb#562 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#551 + # source://prism//lib/prism/parse_result.rb#597 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#524 + # source://prism//lib/prism/parse_result.rb#570 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#529 + # source://prism//lib/prism/parse_result.rb#575 sig { returns(Prism::Location) } def location; end # Implement the pretty print interface for Token. # - # source://prism//lib/prism/parse_result.rb#536 + # source://prism//lib/prism/parse_result.rb#582 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#510 + # source://prism//lib/prism/parse_result.rb#556 + sig { returns(Symbol) } def type; end # A byteslice of the source that this token represents. # - # source://prism//lib/prism/parse_result.rb#513 + # source://prism//lib/prism/parse_result.rb#559 + sig { returns(String) } def value; end private # The Source object that represents the source this token came from. # - # source://prism//lib/prism/parse_result.rb#506 + # source://prism//lib/prism/parse_result.rb#552 + sig { returns(Prism::Source) } def source; end end @@ -30090,7 +31239,7 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # if foo .. bar; end # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1350 + # source://prism//lib/prism/translation/parser/compiler.rb#1364 def visit_flip_flop_node(node); end # 1.0 @@ -30317,10 +31466,16 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # source://prism//lib/prism/translation/parser/compiler.rb#1020 def visit_interpolated_x_string_node(node); end + # -> { it } + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1035 + def visit_it_parameters_node(node); end + # foo(bar: baz) # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1035 + # source://prism//lib/prism/translation/parser/compiler.rb#1041 def visit_keyword_hash_node(node); end # def foo(**bar); end @@ -30329,13 +31484,13 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # def foo(**); end # ^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1044 + # source://prism//lib/prism/translation/parser/compiler.rb#1050 def visit_keyword_rest_parameter_node(node); end # -> {} # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1053 + # source://prism//lib/prism/translation/parser/compiler.rb#1059 def visit_lambda_node(node); end # foo += bar @@ -30343,13 +31498,13 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # foo &&= bar # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1094 + # source://prism//lib/prism/translation/parser/compiler.rb#1108 def visit_local_variable_and_write_node(node); end # foo += bar # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1094 + # source://prism//lib/prism/translation/parser/compiler.rb#1108 def visit_local_variable_operator_write_node(node); end # foo += bar @@ -30357,25 +31512,25 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # foo ||= bar # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1094 + # source://prism//lib/prism/translation/parser/compiler.rb#1108 def visit_local_variable_or_write_node(node); end # foo # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1078 + # source://prism//lib/prism/translation/parser/compiler.rb#1085 def visit_local_variable_read_node(node); end # foo, = bar # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1112 + # source://prism//lib/prism/translation/parser/compiler.rb#1126 def visit_local_variable_target_node(node); end # foo = 1 # ^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1084 + # source://prism//lib/prism/translation/parser/compiler.rb#1098 def visit_local_variable_write_node(node); end # /foo/ @@ -30383,50 +31538,50 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # if /foo/ then end # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1384 + # source://prism//lib/prism/translation/parser/compiler.rb#1398 def visit_match_last_line_node(node); end # foo in bar # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1122 + # source://prism//lib/prism/translation/parser/compiler.rb#1136 def visit_match_predicate_node(node); end # foo => bar # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1132 + # source://prism//lib/prism/translation/parser/compiler.rb#1146 def visit_match_required_node(node); end # /(?foo)/ =~ bar # ^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1142 + # source://prism//lib/prism/translation/parser/compiler.rb#1156 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#1153 + # source://prism//lib/prism/translation/parser/compiler.rb#1167 def visit_missing_node(node); end # module Foo; end # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1159 + # source://prism//lib/prism/translation/parser/compiler.rb#1173 def visit_module_node(node); end # foo, bar = baz # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1170 + # source://prism//lib/prism/translation/parser/compiler.rb#1184 def visit_multi_target_node(node); end # foo, bar = baz # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1184 + # source://prism//lib/prism/translation/parser/compiler.rb#1198 def visit_multi_write_node(node); end # next @@ -30435,55 +31590,55 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # next foo # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1205 + # source://prism//lib/prism/translation/parser/compiler.rb#1219 def visit_next_node(node); end # nil # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1217 + # source://prism//lib/prism/translation/parser/compiler.rb#1231 def visit_nil_node(node); end # def foo(**nil); end # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1223 + # source://prism//lib/prism/translation/parser/compiler.rb#1237 def visit_no_keywords_parameter_node(node); end # -> { _1 + _2 } # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1233 + # source://prism//lib/prism/translation/parser/compiler.rb#1247 def visit_numbered_parameters_node(node); end # $1 # ^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1239 + # source://prism//lib/prism/translation/parser/compiler.rb#1253 def visit_numbered_reference_read_node(node); end # def foo(bar: baz); end # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1245 + # source://prism//lib/prism/translation/parser/compiler.rb#1259 def visit_optional_keyword_parameter_node(node); end # def foo(bar = 1); end # ^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1251 + # source://prism//lib/prism/translation/parser/compiler.rb#1265 def visit_optional_parameter_node(node); end # a or b # ^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1257 + # source://prism//lib/prism/translation/parser/compiler.rb#1271 def visit_or_node(node); end # def foo(bar, *baz); end # ^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1263 + # source://prism//lib/prism/translation/parser/compiler.rb#1277 def visit_parameters_node(node); end # () @@ -30492,76 +31647,76 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # (1) # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1302 + # source://prism//lib/prism/translation/parser/compiler.rb#1316 def visit_parentheses_node(node); end # foo => ^(bar) # ^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1312 + # source://prism//lib/prism/translation/parser/compiler.rb#1326 def visit_pinned_expression_node(node); end # foo = 1 and bar => ^foo # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1319 + # source://prism//lib/prism/translation/parser/compiler.rb#1333 def visit_pinned_variable_node(node); end # END {} # - # source://prism//lib/prism/translation/parser/compiler.rb#1324 + # source://prism//lib/prism/translation/parser/compiler.rb#1338 def visit_post_execution_node(node); end # BEGIN {} # - # source://prism//lib/prism/translation/parser/compiler.rb#1334 + # source://prism//lib/prism/translation/parser/compiler.rb#1348 def visit_pre_execution_node(node); end # The top-level program node. # - # source://prism//lib/prism/translation/parser/compiler.rb#1344 + # source://prism//lib/prism/translation/parser/compiler.rb#1358 def visit_program_node(node); end # 0..5 # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1350 + # source://prism//lib/prism/translation/parser/compiler.rb#1364 def visit_range_node(node); end # 1r # ^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1372 + # source://prism//lib/prism/translation/parser/compiler.rb#1386 def visit_rational_node(node); end # redo # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1378 + # source://prism//lib/prism/translation/parser/compiler.rb#1392 def visit_redo_node(node); end # /foo/ # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1384 + # source://prism//lib/prism/translation/parser/compiler.rb#1398 def visit_regular_expression_node(node); end # def foo(bar:); end # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1399 + # source://prism//lib/prism/translation/parser/compiler.rb#1413 def visit_required_keyword_parameter_node(node); end # def foo(bar); end # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1405 + # source://prism//lib/prism/translation/parser/compiler.rb#1419 def visit_required_parameter_node(node); end # foo rescue bar # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1411 + # source://prism//lib/prism/translation/parser/compiler.rb#1425 def visit_rescue_modifier_node(node); end # begin; rescue; end @@ -30569,7 +31724,7 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # # @raise [CompilationError] # - # source://prism//lib/prism/translation/parser/compiler.rb#1429 + # source://prism//lib/prism/translation/parser/compiler.rb#1443 def visit_rescue_node(node); end # def foo(*bar); end @@ -30578,13 +31733,13 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # def foo(*); end # ^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1438 + # source://prism//lib/prism/translation/parser/compiler.rb#1452 def visit_rest_parameter_node(node); end # retry # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1444 + # source://prism//lib/prism/translation/parser/compiler.rb#1458 def visit_retry_node(node); end # return @@ -30593,42 +31748,42 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # return 1 # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1453 + # source://prism//lib/prism/translation/parser/compiler.rb#1467 def visit_return_node(node); end # self # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1465 + # source://prism//lib/prism/translation/parser/compiler.rb#1479 def visit_self_node(node); end # A shareable constant. # - # source://prism//lib/prism/translation/parser/compiler.rb#1470 + # source://prism//lib/prism/translation/parser/compiler.rb#1484 def visit_shareable_constant_node(node); end # class << self; end # ^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1476 + # source://prism//lib/prism/translation/parser/compiler.rb#1490 def visit_singleton_class_node(node); end # __ENCODING__ # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1488 + # source://prism//lib/prism/translation/parser/compiler.rb#1502 def visit_source_encoding_node(node); end # __FILE__ # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1494 + # source://prism//lib/prism/translation/parser/compiler.rb#1508 def visit_source_file_node(node); end # __LINE__ # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1500 + # source://prism//lib/prism/translation/parser/compiler.rb#1514 def visit_source_line_node(node); end # foo(*bar) @@ -30640,42 +31795,42 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # def foo(*); bar(*); end # ^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1512 + # source://prism//lib/prism/translation/parser/compiler.rb#1526 def visit_splat_node(node); end # A list of statements. # - # source://prism//lib/prism/translation/parser/compiler.rb#1525 + # source://prism//lib/prism/translation/parser/compiler.rb#1539 def visit_statements_node(node); end # "foo" # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1531 + # source://prism//lib/prism/translation/parser/compiler.rb#1545 def visit_string_node(node); end # super(foo) # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1572 + # source://prism//lib/prism/translation/parser/compiler.rb#1586 def visit_super_node(node); end # :foo # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1595 + # source://prism//lib/prism/translation/parser/compiler.rb#1609 def visit_symbol_node(node); end # true # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1627 + # source://prism//lib/prism/translation/parser/compiler.rb#1641 def visit_true_node(node); end # undef foo # ^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1633 + # source://prism//lib/prism/translation/parser/compiler.rb#1647 def visit_undef_node(node); end # unless foo; bar end @@ -30684,22 +31839,22 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # bar unless foo # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1642 + # source://prism//lib/prism/translation/parser/compiler.rb#1656 def visit_unless_node(node); end # until foo; bar end - # ^^^^^^^^^^^^^^^^^ + # ^^^^^^^^^^^^^^^^^^ # # bar until foo # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1672 + # source://prism//lib/prism/translation/parser/compiler.rb#1686 def visit_until_node(node); end # case foo; when bar; end # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1694 + # source://prism//lib/prism/translation/parser/compiler.rb#1708 def visit_when_node(node); end # while foo; bar end @@ -30708,13 +31863,13 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # bar while foo # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1712 + # source://prism//lib/prism/translation/parser/compiler.rb#1726 def visit_while_node(node); end # `foo` # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1734 + # source://prism//lib/prism/translation/parser/compiler.rb#1748 def visit_x_string_node(node); end # yield @@ -30723,7 +31878,7 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # yield 1 # ^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1766 + # source://prism//lib/prism/translation/parser/compiler.rb#1780 def visit_yield_node(node); end private @@ -30731,20 +31886,20 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # 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#1780 + # source://prism//lib/prism/translation/parser/compiler.rb#1794 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#1787 + # source://prism//lib/prism/translation/parser/compiler.rb#1801 def find_forwarding(node); end # Because we have mutated the AST to allow for newlines in the middle of # a rational, we need to manually handle the value here. # - # source://prism//lib/prism/translation/parser/compiler.rb#1801 + # source://prism//lib/prism/translation/parser/compiler.rb#1815 def imaginary_value(node); end # Negate the value of a numeric node. This is a special case where you @@ -30753,7 +31908,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#1810 + # source://prism//lib/prism/translation/parser/compiler.rb#1824 def numeric_negate(message_loc, receiver); end # Blocks can have a special set of parameters that automatically expand @@ -30762,55 +31917,58 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # # @return [Boolean] # - # source://prism//lib/prism/translation/parser/compiler.rb#1822 + # source://prism//lib/prism/translation/parser/compiler.rb#1836 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#1835 + # 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#1849 + # source://prism//lib/prism/translation/parser/compiler.rb#1863 def srange(location); end # Constructs a new source range by finding the given tokens between the # given start offset and end offset. If the needle is not found, it - # returns nil. + # returns nil. Importantly it does not search past newlines or comments. # - # source://prism//lib/prism/translation/parser/compiler.rb#1861 + # 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 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#1854 + # source://prism//lib/prism/translation/parser/compiler.rb#1868 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#1870 + # source://prism//lib/prism/translation/parser/compiler.rb#1888 def token(location); end # Visit a block node on a call. # - # source://prism//lib/prism/translation/parser/compiler.rb#1875 + # source://prism//lib/prism/translation/parser/compiler.rb#1893 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#1908 + # source://prism//lib/prism/translation/parser/compiler.rb#1927 def visit_heredoc(node); end # Visit a numeric node and account for the optional sign. # - # source://prism//lib/prism/translation/parser/compiler.rb#1954 + # source://prism//lib/prism/translation/parser/compiler.rb#1973 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#1966 + # source://prism//lib/prism/translation/parser/compiler.rb#1985 def within_pattern; end end @@ -30823,7 +31981,7 @@ 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#1846 +# source://prism//lib/prism/translation/parser/compiler.rb#1860 Prism::Translation::Parser::Compiler::Range = Parser::Source::Range # source://prism//lib/prism/translation/parser.rb#12 @@ -30945,26 +32103,26 @@ Prism::Translation::Parser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) # The main known difference is that we may omit dispatching some events in # some cases. This impacts the following events: # -# * on_assign_error -# * on_comma -# * on_ignored_nl -# * on_ignored_sp -# * on_kw -# * on_label_end -# * on_lbrace -# * on_lbracket -# * on_lparen -# * on_nl -# * on_op -# * on_operator_ambiguous -# * on_rbrace -# * on_rbracket -# * on_rparen -# * on_semicolon -# * on_sp -# * on_symbeg -# * on_tstring_beg -# * on_tstring_end +# - on_assign_error +# - on_comma +# - on_ignored_nl +# - on_ignored_sp +# - on_kw +# - on_label_end +# - on_lbrace +# - on_lbracket +# - on_lparen +# - on_nl +# - on_op +# - on_operator_ambiguous +# - on_rbrace +# - on_rbracket +# - on_rparen +# - on_semicolon +# - on_sp +# - on_symbeg +# - on_tstring_beg +# - on_tstring_end # # source://prism//lib/prism/translation/ripper.rb#43 class Prism::Translation::Ripper < ::Prism::Compiler @@ -32741,20 +33899,20 @@ class Prism::Translation::Ripper < ::Prism::Compiler # By default, this method does not handle syntax errors in +src+, # use the +raise_errors+ keyword to raise a SyntaxError for an error in +src+. # - # require 'ripper' - # require 'pp' - # - # pp Ripper.lex("def m(a) nil end") - # #=> [[[1, 0], :on_kw, "def", FNAME ], - # [[1, 3], :on_sp, " ", FNAME ], - # [[1, 4], :on_ident, "m", ENDFN ], - # [[1, 5], :on_lparen, "(", BEG|LABEL], - # [[1, 6], :on_ident, "a", ARG ], - # [[1, 7], :on_rparen, ")", ENDFN ], - # [[1, 8], :on_sp, " ", BEG ], - # [[1, 9], :on_kw, "nil", END ], - # [[1, 12], :on_sp, " ", END ], - # [[1, 13], :on_kw, "end", END ]] + # require "ripper" + # require "pp" + # + # pp Ripper.lex("def m(a) nil end") + # #=> [[[1, 0], :on_kw, "def", FNAME ], + # [[1, 3], :on_sp, " ", FNAME ], + # [[1, 4], :on_ident, "m", ENDFN ], + # [[1, 5], :on_lparen, "(", BEG|LABEL], + # [[1, 6], :on_ident, "a", ARG ], + # [[1, 7], :on_rparen, ")", ENDFN ], + # [[1, 8], :on_sp, " ", BEG ], + # [[1, 9], :on_kw, "nil", END ], + # [[1, 12], :on_sp, " ", END ], + # [[1, 13], :on_kw, "end", END ]] # # source://prism//lib/prism/translation/ripper.rb#72 def lex(src, filename = T.unsafe(nil), lineno = T.unsafe(nil), raise_errors: T.unsafe(nil)); end @@ -32773,15 +33931,15 @@ class Prism::Translation::Ripper < ::Prism::Compiler # returning +nil+ in such cases. Use the +raise_errors+ keyword # to raise a SyntaxError for an error in +src+. # - # require "ripper" - # require "pp" + # require "ripper" + # require "pp" # - # pp Ripper.sexp("def m(a) nil end") - # #=> [:program, - # [[:def, - # [:@ident, "m", [1, 4]], - # [:paren, [:params, [[:@ident, "a", [1, 6]]], nil, nil, nil, nil, nil, nil]], - # [:bodystmt, [[:var_ref, [:@kw, "nil", [1, 9]]]], nil, nil, nil]]]] + # pp Ripper.sexp("def m(a) nil end") + # #=> [:program, + # [[:def, + # [:@ident, "m", [1, 4]], + # [:paren, [:params, [[:@ident, "a", [1, 6]]], nil, nil, nil, nil, nil, nil]], + # [:bodystmt, [[:var_ref, [:@kw, "nil", [1, 9]]]], nil, nil, nil]]]] # # source://prism//lib/prism/translation/ripper.rb#381 def sexp(src, filename = T.unsafe(nil), lineno = T.unsafe(nil), raise_errors: T.unsafe(nil)); end @@ -32793,21 +33951,21 @@ class Prism::Translation::Ripper < ::Prism::Compiler # returning +nil+ in such cases. Use the +raise_errors+ keyword # to raise a SyntaxError for an error in +src+. # - # require 'ripper' - # require 'pp' - # - # pp Ripper.sexp_raw("def m(a) nil end") - # #=> [:program, - # [:stmts_add, - # [:stmts_new], - # [:def, - # [:@ident, "m", [1, 4]], - # [:paren, [:params, [[:@ident, "a", [1, 6]]], nil, nil, nil]], - # [:bodystmt, - # [:stmts_add, [:stmts_new], [:var_ref, [:@kw, "nil", [1, 9]]]], - # nil, - # nil, - # nil]]]] + # require "ripper" + # require "pp" + # + # pp Ripper.sexp_raw("def m(a) nil end") + # #=> [:program, + # [:stmts_add, + # [:stmts_new], + # [:def, + # [:@ident, "m", [1, 4]], + # [:paren, [:params, [[:@ident, "a", [1, 6]]], nil, nil, nil]], + # [:bodystmt, + # [:stmts_add, [:stmts_new], [:var_ref, [:@kw, "nil", [1, 9]]]], + # nil, + # nil, + # nil]]]] # # source://prism//lib/prism/translation/ripper.rb#416 def sexp_raw(src, filename = T.unsafe(nil), lineno = T.unsafe(nil), raise_errors: T.unsafe(nil)); end @@ -33558,56 +34716,62 @@ end # true # ^^^^ # -# source://prism//lib/prism/node.rb#17747 +# source://prism//lib/prism/node.rb#19158 class Prism::TrueNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [TrueNode] a new instance of TrueNode # - # source://prism//lib/prism/node.rb#17749 + # source://prism//lib/prism/node.rb#19160 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 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17756 + # source://prism//lib/prism/node.rb#19167 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17761 + # source://prism//lib/prism/node.rb#19172 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17771 + # source://prism//lib/prism/node.rb#19182 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17766 + # source://prism//lib/prism/node.rb#19177 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?location: Location) -> TrueNode # - # source://prism//lib/prism/node.rb#17776 + # source://prism//lib/prism/node.rb#19187 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#17761 + # source://prism//lib/prism/node.rb#19172 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#17784 + # source://prism//lib/prism/node.rb#19195 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -33616,7 +34780,7 @@ class Prism::TrueNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#17790 + # source://prism//lib/prism/node.rb#19200 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end @@ -33635,7 +34799,7 @@ class Prism::TrueNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#17809 + # source://prism//lib/prism/node.rb#19219 sig { override.returns(Symbol) } def type; end @@ -33647,7 +34811,7 @@ class Prism::TrueNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#17819 + # source://prism//lib/prism/node.rb#19229 def type; end end end @@ -33657,13 +34821,13 @@ end # undef :foo, :bar, :baz # ^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#17828 +# source://prism//lib/prism/node.rb#19244 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#17830 + # source://prism//lib/prism/node.rb#19246 sig do params( source: Prism::Source, @@ -33674,33 +34838,39 @@ class Prism::UndefNode < ::Prism::Node end def initialize(source, names, keyword_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#19340 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17839 + # source://prism//lib/prism/node.rb#19255 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17844 + # source://prism//lib/prism/node.rb#19260 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17854 + # source://prism//lib/prism/node.rb#19270 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17849 + # source://prism//lib/prism/node.rb#19265 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#17859 + # source://prism//lib/prism/node.rb#19275 sig do params( names: T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)], @@ -33713,13 +34883,13 @@ class Prism::UndefNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17844 + # source://prism//lib/prism/node.rb#19260 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#17867 + # source://prism//lib/prism/node.rb#19283 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -33728,25 +34898,25 @@ class Prism::UndefNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#17888 + # source://prism//lib/prism/node.rb#19303 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#17883 + # source://prism//lib/prism/node.rb#19298 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#17875 + # source://prism//lib/prism/node.rb#19291 sig { returns(Prism::Location) } def keyword_loc; end # attr_reader names: Array[SymbolNode | InterpolatedSymbolNode] # - # source://prism//lib/prism/node.rb#17872 + # source://prism//lib/prism/node.rb#19288 sig { returns(T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)]) } def names; end @@ -33765,7 +34935,7 @@ class Prism::UndefNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#17909 + # source://prism//lib/prism/node.rb#19324 sig { override.returns(Symbol) } def type; end @@ -33777,7 +34947,7 @@ class Prism::UndefNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#17919 + # source://prism//lib/prism/node.rb#19334 def type; end end end @@ -33790,13 +34960,13 @@ end # unless foo then bar end # ^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#17931 +# source://prism//lib/prism/node.rb#19355 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#17933 + # source://prism//lib/prism/node.rb#19357 sig do params( source: Prism::Source, @@ -33811,39 +34981,48 @@ class Prism::UnlessNode < ::Prism::Node end def initialize(source, keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#19543 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17946 + # source://prism//lib/prism/node.rb#19370 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17955 + # source://prism//lib/prism/node.rb#19379 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17969 + # source://prism//lib/prism/node.rb#19393 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17960 + # source://prism//lib/prism/node.rb#19384 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # attr_reader consequent: ElseNode? + # The else clause of the unless expression, if present. + # + # unless cond then bar else baz end + # ^^^^^^^^ # - # source://prism//lib/prism/node.rb#18013 + # source://prism//lib/prism/node.rb#19457 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#17974 + # source://prism//lib/prism/node.rb#19398 sig do params( keyword_loc: Prism::Location, @@ -33860,25 +35039,28 @@ class Prism::UnlessNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17955 + # source://prism//lib/prism/node.rb#19379 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#17982 + # source://prism//lib/prism/node.rb#19406 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#18040 + # source://prism//lib/prism/node.rb#19486 sig { returns(T.nilable(String)) } def end_keyword; end - # attr_reader end_keyword_loc: Location? + # The location of the `end` keyword, if present. # - # source://prism//lib/prism/node.rb#18016 + # unless cond then bar end + # ^^^ + # + # source://prism//lib/prism/node.rb#19463 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end @@ -33887,46 +35069,63 @@ class Prism::UnlessNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#18045 + # source://prism//lib/prism/node.rb#19491 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#18030 + # source://prism//lib/prism/node.rb#19476 sig { returns(String) } def keyword; end - # attr_reader keyword_loc: Location + # The location of the `unless` keyword. # - # source://prism//lib/prism/node.rb#17987 + # unless cond then bar end + # ^^^^^^ + # + # bar unless cond + # ^^^^^^ + # + # source://prism//lib/prism/node.rb#19417 sig { returns(Prism::Location) } def keyword_loc; end - # attr_reader predicate: Prism::node + # The condition to be evaluated for the unless expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # unless cond then bar end + # ^^^^ + # + # bar unless cond + # ^^^^ # - # source://prism//lib/prism/node.rb#17994 + # source://prism//lib/prism/node.rb#19430 sig { returns(Prism::Node) } def predicate; end - # source://prism//lib/prism/node.rb#17950 + # source://prism//lib/prism/node.rb#19374 def set_newline_flag(newline_marked); end - # attr_reader statements: StatementsNode? + # 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#18010 + # source://prism//lib/prism/node.rb#19451 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # def then_keyword: () -> String? # - # source://prism//lib/prism/node.rb#18035 + # source://prism//lib/prism/node.rb#19481 sig { returns(T.nilable(String)) } def then_keyword; end - # attr_reader then_keyword_loc: Location? + # The location of the `then` keyword, if present. + # unless cond then bar end ^^^^ # - # source://prism//lib/prism/node.rb#17997 + # source://prism//lib/prism/node.rb#19434 sig { returns(T.nilable(Prism::Location)) } def then_keyword_loc; end @@ -33945,7 +35144,7 @@ class Prism::UnlessNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#18081 + # source://prism//lib/prism/node.rb#19527 sig { override.returns(Symbol) } def type; end @@ -33957,7 +35156,7 @@ class Prism::UnlessNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#18091 + # source://prism//lib/prism/node.rb#19537 def type; end end end @@ -33970,13 +35169,13 @@ end # until foo do bar end # ^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#18103 +# source://prism//lib/prism/node.rb#19561 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#18105 + # source://prism//lib/prism/node.rb#19563 sig do params( source: Prism::Source, @@ -33990,9 +35189,15 @@ class Prism::UntilNode < ::Prism::Node end def initialize(source, flags, keyword_loc, closing_loc, predicate, statements, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#19707 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18117 + # source://prism//lib/prism/node.rb#19575 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -34000,43 +35205,43 @@ class Prism::UntilNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#18188 + # source://prism//lib/prism/node.rb#19645 sig { returns(T::Boolean) } def begin_modifier?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18126 + # source://prism//lib/prism/node.rb#19584 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#18198 + # source://prism//lib/prism/node.rb#19655 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#18168 + # source://prism//lib/prism/node.rb#19626 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18139 + # source://prism//lib/prism/node.rb#19597 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18131 + # source://prism//lib/prism/node.rb#19589 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#18144 + # source://prism//lib/prism/node.rb#19602 sig do params( flags: Integer, @@ -34052,13 +35257,13 @@ class Prism::UntilNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18126 + # source://prism//lib/prism/node.rb#19584 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#18152 + # source://prism//lib/prism/node.rb#19610 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -34067,34 +35272,34 @@ class Prism::UntilNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#18203 + # source://prism//lib/prism/node.rb#19660 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#18193 + # source://prism//lib/prism/node.rb#19650 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#18161 + # source://prism//lib/prism/node.rb#19619 sig { returns(Prism::Location) } def keyword_loc; end # attr_reader predicate: Prism::node # - # source://prism//lib/prism/node.rb#18181 + # source://prism//lib/prism/node.rb#19639 sig { returns(Prism::Node) } def predicate; end - # source://prism//lib/prism/node.rb#18121 + # source://prism//lib/prism/node.rb#19579 def set_newline_flag(newline_marked); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#18184 + # source://prism//lib/prism/node.rb#19642 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -34113,15 +35318,15 @@ class Prism::UntilNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#18234 + # source://prism//lib/prism/node.rb#19691 sig { override.returns(Symbol) } def type; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#18157 + # source://prism//lib/prism/node.rb#19615 sig { returns(Integer) } def flags; end @@ -34133,7 +35338,7 @@ class Prism::UntilNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#18244 + # source://prism//lib/prism/node.rb#19701 def type; end end end @@ -35070,13 +36275,13 @@ end # ^^^^^^^^^ # end # -# source://prism//lib/prism/node.rb#18255 +# source://prism//lib/prism/node.rb#19723 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#18257 + # source://prism//lib/prism/node.rb#19725 sig do params( source: Prism::Source, @@ -35089,39 +36294,45 @@ class Prism::WhenNode < ::Prism::Node end def initialize(source, keyword_loc, conditions, then_keyword_loc, statements, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#19852 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18268 + # source://prism//lib/prism/node.rb#19736 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18273 + # source://prism//lib/prism/node.rb#19741 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18286 + # source://prism//lib/prism/node.rb#19754 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18278 + # source://prism//lib/prism/node.rb#19746 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader conditions: Array[Prism::node] # - # source://prism//lib/prism/node.rb#18311 + # source://prism//lib/prism/node.rb#19779 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#18291 + # source://prism//lib/prism/node.rb#19759 sig do params( keyword_loc: Prism::Location, @@ -35136,13 +36347,13 @@ class Prism::WhenNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18273 + # source://prism//lib/prism/node.rb#19741 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#18299 + # source://prism//lib/prism/node.rb#19767 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -35151,37 +36362,37 @@ class Prism::WhenNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#18341 + # source://prism//lib/prism/node.rb#19808 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#18331 + # source://prism//lib/prism/node.rb#19798 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#18304 + # source://prism//lib/prism/node.rb#19772 sig { returns(Prism::Location) } def keyword_loc; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#18327 + # source://prism//lib/prism/node.rb#19795 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # def then_keyword: () -> String? # - # source://prism//lib/prism/node.rb#18336 + # source://prism//lib/prism/node.rb#19803 sig { returns(T.nilable(String)) } def then_keyword; end # attr_reader then_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#18314 + # source://prism//lib/prism/node.rb#19782 sig { returns(T.nilable(Prism::Location)) } def then_keyword_loc; end @@ -35200,7 +36411,7 @@ class Prism::WhenNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#18369 + # source://prism//lib/prism/node.rb#19836 sig { override.returns(Symbol) } def type; end @@ -35212,7 +36423,7 @@ class Prism::WhenNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#18379 + # source://prism//lib/prism/node.rb#19846 def type; end end end @@ -35225,13 +36436,13 @@ end # while foo do bar end # ^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#18391 +# source://prism//lib/prism/node.rb#19869 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#18393 + # source://prism//lib/prism/node.rb#19871 sig do params( source: Prism::Source, @@ -35245,9 +36456,15 @@ class Prism::WhileNode < ::Prism::Node end def initialize(source, flags, keyword_loc, closing_loc, predicate, statements, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#20015 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18405 + # source://prism//lib/prism/node.rb#19883 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -35255,43 +36472,43 @@ class Prism::WhileNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#18476 + # source://prism//lib/prism/node.rb#19953 sig { returns(T::Boolean) } def begin_modifier?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18414 + # source://prism//lib/prism/node.rb#19892 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#18486 + # source://prism//lib/prism/node.rb#19963 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#18456 + # source://prism//lib/prism/node.rb#19934 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18427 + # source://prism//lib/prism/node.rb#19905 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18419 + # source://prism//lib/prism/node.rb#19897 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#18432 + # source://prism//lib/prism/node.rb#19910 sig do params( flags: Integer, @@ -35307,13 +36524,13 @@ class Prism::WhileNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18414 + # source://prism//lib/prism/node.rb#19892 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#18440 + # source://prism//lib/prism/node.rb#19918 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -35322,34 +36539,34 @@ class Prism::WhileNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#18491 + # source://prism//lib/prism/node.rb#19968 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#18481 + # source://prism//lib/prism/node.rb#19958 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#18449 + # source://prism//lib/prism/node.rb#19927 sig { returns(Prism::Location) } def keyword_loc; end # attr_reader predicate: Prism::node # - # source://prism//lib/prism/node.rb#18469 + # source://prism//lib/prism/node.rb#19947 sig { returns(Prism::Node) } def predicate; end - # source://prism//lib/prism/node.rb#18409 + # source://prism//lib/prism/node.rb#19887 def set_newline_flag(newline_marked); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#18472 + # source://prism//lib/prism/node.rb#19950 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -35368,15 +36585,15 @@ class Prism::WhileNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#18522 + # source://prism//lib/prism/node.rb#19999 sig { override.returns(Symbol) } def type; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#18445 + # source://prism//lib/prism/node.rb#19923 sig { returns(Integer) } def flags; end @@ -35388,7 +36605,7 @@ class Prism::WhileNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#18532 + # source://prism//lib/prism/node.rb#20009 def type; end end end @@ -35398,7 +36615,7 @@ end # `foo` # ^^^^^ # -# source://prism//lib/prism/node.rb#18541 +# source://prism//lib/prism/node.rb#20029 class Prism::XStringNode < ::Prism::Node include ::Prism::HeredocQuery @@ -35406,7 +36623,7 @@ class Prism::XStringNode < ::Prism::Node # # @return [XStringNode] a new instance of XStringNode # - # source://prism//lib/prism/node.rb#18543 + # source://prism//lib/prism/node.rb#20031 sig do params( source: Prism::Source, @@ -35420,57 +36637,63 @@ class Prism::XStringNode < ::Prism::Node end def initialize(source, flags, opening_loc, content_loc, closing_loc, unescaped, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#20170 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18555 + # source://prism//lib/prism/node.rb#20043 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18560 + # source://prism//lib/prism/node.rb#20048 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#18637 + # source://prism//lib/prism/node.rb#20124 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#18606 + # source://prism//lib/prism/node.rb#20094 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18570 + # source://prism//lib/prism/node.rb#20058 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18565 + # source://prism//lib/prism/node.rb#20053 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def content: () -> String # - # source://prism//lib/prism/node.rb#18632 + # source://prism//lib/prism/node.rb#20119 sig { returns(String) } def content; end # attr_reader content_loc: Location # - # source://prism//lib/prism/node.rb#18599 + # source://prism//lib/prism/node.rb#20087 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#18575 + # source://prism//lib/prism/node.rb#20063 sig do params( flags: Integer, @@ -35486,13 +36709,13 @@ class Prism::XStringNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18560 + # source://prism//lib/prism/node.rb#20048 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#18583 + # source://prism//lib/prism/node.rb#20071 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -35503,7 +36726,7 @@ class Prism::XStringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#18622 + # source://prism//lib/prism/node.rb#20109 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -35511,7 +36734,7 @@ class Prism::XStringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#18617 + # source://prism//lib/prism/node.rb#20104 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -35520,19 +36743,19 @@ class Prism::XStringNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#18642 + # source://prism//lib/prism/node.rb#20129 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String # - # source://prism//lib/prism/node.rb#18627 + # source://prism//lib/prism/node.rb#20114 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#18592 + # source://prism//lib/prism/node.rb#20080 sig { returns(Prism::Location) } def opening_loc; end @@ -35558,21 +36781,21 @@ class Prism::XStringNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#18667 + # source://prism//lib/prism/node.rb#20154 sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#18613 + # source://prism//lib/prism/node.rb#20101 sig { returns(String) } def unescaped; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#18588 + # source://prism//lib/prism/node.rb#20076 sig { returns(Integer) } def flags; end @@ -35584,7 +36807,7 @@ class Prism::XStringNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#18677 + # source://prism//lib/prism/node.rb#20164 def type; end end end @@ -35594,13 +36817,13 @@ end # yield 1 # ^^^^^^^ # -# source://prism//lib/prism/node.rb#18686 +# source://prism//lib/prism/node.rb#20184 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#18688 + # source://prism//lib/prism/node.rb#20186 sig do params( source: Prism::Source, @@ -35613,39 +36836,45 @@ class Prism::YieldNode < ::Prism::Node end def initialize(source, keyword_loc, lparen_loc, arguments, rparen_loc, location); end + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#20327 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18699 + # source://prism//lib/prism/node.rb#20197 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#18754 + # source://prism//lib/prism/node.rb#20252 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18704 + # source://prism//lib/prism/node.rb#20202 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18716 + # source://prism//lib/prism/node.rb#20214 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18709 + # source://prism//lib/prism/node.rb#20207 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#18721 + # source://prism//lib/prism/node.rb#20219 sig do params( keyword_loc: Prism::Location, @@ -35660,13 +36889,13 @@ class Prism::YieldNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18704 + # source://prism//lib/prism/node.rb#20202 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#18729 + # source://prism//lib/prism/node.rb#20227 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -35675,43 +36904,43 @@ class Prism::YieldNode < ::Prism::Node # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#18786 + # source://prism//lib/prism/node.rb#20283 sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#18771 + # source://prism//lib/prism/node.rb#20268 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#18734 + # source://prism//lib/prism/node.rb#20232 sig { returns(Prism::Location) } def keyword_loc; end # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#18776 + # source://prism//lib/prism/node.rb#20273 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#18741 + # source://prism//lib/prism/node.rb#20239 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#18781 + # source://prism//lib/prism/node.rb#20278 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#18757 + # source://prism//lib/prism/node.rb#20255 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end @@ -35730,7 +36959,7 @@ class Prism::YieldNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#18814 + # source://prism//lib/prism/node.rb#20311 sig { override.returns(Symbol) } def type; end @@ -35742,7 +36971,7 @@ class Prism::YieldNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#18824 + # source://prism//lib/prism/node.rb#20321 def type; end end end From 5cf07ff4f3b68552583996642d367172abde42c6 Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Wed, 24 Apr 2024 13:06:15 -0400 Subject: [PATCH 041/189] Bump version to v0.16.6 --- Gemfile.lock | 2 +- VERSION | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index a6f47ae0bb..ba6324a9de 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -9,7 +9,7 @@ GIT PATH remote: . specs: - ruby-lsp (0.16.5) + ruby-lsp (0.16.6) language_server-protocol (~> 3.17.0) prism (>= 0.23.0, < 0.28) sorbet-runtime (>= 0.5.10782) diff --git a/VERSION b/VERSION index 19270385ea..c3f65805f7 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.16.5 +0.16.6 From 2a22994699cc2d1d77124f0bd220256fdedcf92f Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Wed, 24 Apr 2024 13:13:50 -0400 Subject: [PATCH 042/189] Revert "Bump version to v0.16.6" This reverts commit 5cf07ff4f3b68552583996642d367172abde42c6. --- Gemfile.lock | 2 +- VERSION | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index ba6324a9de..a6f47ae0bb 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -9,7 +9,7 @@ GIT PATH remote: . specs: - ruby-lsp (0.16.6) + ruby-lsp (0.16.5) language_server-protocol (~> 3.17.0) prism (>= 0.23.0, < 0.28) sorbet-runtime (>= 0.5.10782) diff --git a/VERSION b/VERSION index c3f65805f7..19270385ea 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.16.6 +0.16.5 From 30bc0001b1085463d7bb420756c2de662c34202b Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Wed, 24 Apr 2024 13:43:41 -0400 Subject: [PATCH 043/189] Implement ASDF as a manager object (#1845) --- vscode/src/ruby.ts | 47 +-------- vscode/src/ruby/asdf.ts | 135 ++++++++++++++++++++++++ vscode/src/test/suite/ruby/asdf.test.ts | 72 +++++++++++++ 3 files changed, 211 insertions(+), 43 deletions(-) create mode 100644 vscode/src/ruby/asdf.ts create mode 100644 vscode/src/test/suite/ruby/asdf.test.ts diff --git a/vscode/src/ruby.ts b/vscode/src/ruby.ts index 57b4150ec7..aaed867bf4 100644 --- a/vscode/src/ruby.ts +++ b/vscode/src/ruby.ts @@ -15,6 +15,7 @@ import { Rbenv } from "./ruby/rbenv"; import { Rvm } from "./ruby/rvm"; import { None } from "./ruby/none"; import { Custom } from "./ruby/custom"; +import { Asdf } from "./ruby/asdf"; export enum ManagerIdentifier { Asdf = "asdf", @@ -48,7 +49,6 @@ export class Ruby implements RubyInterface { private _error = false; private readonly context: vscode.ExtensionContext; private readonly customBundleGemfile?: string; - private readonly cwd: string; private readonly outputChannel: WorkspaceChannel; constructor( @@ -71,10 +71,6 @@ export class Ruby implements RubyInterface { path.join(this.workspaceFolder.uri.fsPath, customBundleGemfile), ); } - - this.cwd = this.customBundleGemfile - ? path.dirname(this.customBundleGemfile) - : this.workspaceFolder.uri.fsPath; } get versionManager(): ManagerConfiguration { @@ -117,7 +113,9 @@ export class Ruby implements RubyInterface { try { switch (this.versionManager.identifier) { case ManagerIdentifier.Asdf: - await this.activate("asdf exec ruby"); + await this.runActivation( + new Asdf(this.workspaceFolder, this.outputChannel), + ); break; case ManagerIdentifier.Chruby: await this.runActivation( @@ -192,43 +190,6 @@ export class Ruby implements RubyInterface { this.yjitEnabled = (yjit && major > 3) || (major === 3 && minor >= 2); } - private async activate(ruby: string) { - let command = this.shell ? `${this.shell} -i -c '` : ""; - - // The Ruby activation script is intentionally written as an array that gets joined into a one liner because some - // terminals cannot handle line breaks. Do not switch this to a multiline string or that will break activation for - // those terminals - const script = [ - "STDERR.printf(%{RUBY_ENV_ACTIVATE%sRUBY_ENV_ACTIVATE}, ", - "JSON.dump({ env: ENV.to_h, ruby_version: RUBY_VERSION, yjit: defined?(RubyVM::YJIT) }))", - ].join(""); - - command += `${ruby} -rjson -e "${script}"`; - - if (this.shell) { - command += "'"; - } - - this.outputChannel.info( - `Trying to activate Ruby environment with command: ${command} inside directory: ${this.cwd}`, - ); - - const result = await asyncExec(command, { cwd: this.cwd }); - const rubyInfoJson = /RUBY_ENV_ACTIVATE(.*)RUBY_ENV_ACTIVATE/.exec( - result.stderr, - )![1]; - - const rubyInfo = JSON.parse(rubyInfoJson); - - this._env = rubyInfo.env; - this.rubyVersion = rubyInfo.ruby_version; - - const [major, minor, _patch] = rubyInfo.ruby_version.split(".").map(Number); - this.yjitEnabled = - (rubyInfo.yjit === "constant" && major > 3) || - (major === 3 && minor >= 2); - } - // Fetch information related to the Ruby version. This can only be invoked after activation, so that `rubyVersion` is // set private fetchRubyVersionInfo() { diff --git a/vscode/src/ruby/asdf.ts b/vscode/src/ruby/asdf.ts new file mode 100644 index 0000000000..5262254b9e --- /dev/null +++ b/vscode/src/ruby/asdf.ts @@ -0,0 +1,135 @@ +/* eslint-disable no-process-env */ + +import path from "path"; +import os from "os"; + +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 +// +// Learn more: https://github.com/asdf-vm/asdf +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( + `. ${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 = JSON.parse(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, + version: parsedResult.version, + }; + } + + // 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 { + // 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 + // 2. Pacman + // 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("/"), + "opt", + "homebrew", + "opt", + "asdf", + "libexec", + "asdf.sh", + ), + vscode.Uri.joinPath( + vscode.Uri.file("/"), + "usr", + "local", + "opt", + "asdf", + "libexec", + "asdf.sh", + ), + ]; + + for (const possiblePath of possiblePaths) { + try { + await vscode.workspace.fs.stat(possiblePath); + return possiblePath; + } catch (error: any) { + // Continue looking + } + } + + throw new Error( + `Could not find ASDF installation. Searched in ${possiblePaths.join(", ")}`, + ); + } +} diff --git a/vscode/src/test/suite/ruby/asdf.test.ts b/vscode/src/test/suite/ruby/asdf.test.ts new file mode 100644 index 0000000000..fb07b3f15e --- /dev/null +++ b/vscode/src/test/suite/ruby/asdf.test.ts @@ -0,0 +1,72 @@ +import assert from "assert"; +import path from "path"; +import os from "os"; + +import * as vscode from "vscode"; +import sinon from "sinon"; + +import { Asdf } from "../../../ruby/asdf"; +import { WorkspaceChannel } from "../../../workspaceChannel"; +import * as common from "../../../common"; + +suite("Asdf", () => { + if (os.platform() === "win32") { + // eslint-disable-next-line no-console + console.log("Skipping Asdf tests on Windows"); + return; + } + + test("Finds Ruby based on .tool-versions", 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.sh`)); + const findDataDirStub = sinon + .stub(asdf, "findAsdfDataDir") + .resolves(vscode.Uri.file(`${os.homedir()}/.asdf`)); + + const { env, version, yjit } = await asdf.activate(); + + assert.ok( + execStub.calledOnceWithExactly( + `. ${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`, + }, + }, + ), + ); + + 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(); + }); +}); From 92c9f834316d87ea9b76cb0e00e71f28ec920710 Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Wed, 24 Apr 2024 14:14:39 -0400 Subject: [PATCH 044/189] Avoid setting GEM_HOME and GEM_PATH for rbenv (#1966) --- vscode/src/ruby/rbenv.ts | 20 ++------------------ vscode/src/test/suite/ruby/rbenv.test.ts | 17 ++--------------- 2 files changed, 4 insertions(+), 33 deletions(-) diff --git a/vscode/src/ruby/rbenv.ts b/vscode/src/ruby/rbenv.ts index 9e1384f488..bbc510a825 100644 --- a/vscode/src/ruby/rbenv.ts +++ b/vscode/src/ruby/rbenv.ts @@ -1,7 +1,5 @@ /* eslint-disable no-process-env */ -import path from "path"; - import { asyncExec } from "../common"; import { VersionManager, ActivationResult } from "./versionManager"; @@ -11,11 +9,8 @@ import { VersionManager, ActivationResult } from "./versionManager"; // Learn more: https://github.com/rbenv/rbenv export class Rbenv extends VersionManager { async activate(): Promise { - const activationScript = [ - "STDERR.print(", - "{env: ENV.to_h,yjit:!!defined?(RubyVM::YJIT),version:RUBY_VERSION,home:Gem.user_dir,default:Gem.default_dir}", - ".to_json)", - ].join(""); + const activationScript = + "STDERR.print({env: ENV.to_h,yjit:!!defined?(RubyVM::YJIT),version:RUBY_VERSION}.to_json)"; const result = await asyncExec( `rbenv exec ruby -W0 -rjson -e '${activationScript}'`, @@ -26,17 +21,6 @@ export class Rbenv extends VersionManager { const parsedResult = JSON.parse(result.stderr); - // The addition of GEM_HOME, GEM_PATH and putting the bin directories into the PATH happens through Rbenv's shell - // hooks. Since we want to avoid spawning shells due to integration issues, we need to insert these variables - // ourselves, so that gem executables can be properly found - parsedResult.env.GEM_HOME = parsedResult.home; - parsedResult.env.GEM_PATH = `${parsedResult.home}${path.delimiter}${parsedResult.default}`; - parsedResult.env.PATH = [ - path.join(parsedResult.home, "bin"), - path.join(parsedResult.default, "bin"), - parsedResult.env.PATH, - ].join(path.delimiter); - return { env: { ...process.env, ...parsedResult.env }, yjit: parsedResult.yjit, diff --git a/vscode/src/test/suite/ruby/rbenv.test.ts b/vscode/src/test/suite/ruby/rbenv.test.ts index 68be2056f8..b900c09d99 100644 --- a/vscode/src/test/suite/ruby/rbenv.test.ts +++ b/vscode/src/test/suite/ruby/rbenv.test.ts @@ -27,11 +27,8 @@ suite("Rbenv", () => { const outputChannel = new WorkspaceChannel("fake", common.LOG_CHANNEL); const rbenv = new Rbenv(workspaceFolder, outputChannel); - const activationScript = [ - "STDERR.print(", - "{env: ENV.to_h,yjit:!!defined?(RubyVM::YJIT),version:RUBY_VERSION,home:Gem.user_dir,default:Gem.default_dir}", - ".to_json)", - ].join(""); + 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: "", @@ -39,8 +36,6 @@ suite("Rbenv", () => { env: { ANY: "true" }, yjit: true, version: "3.0.0", - home: "/home/user/.gem/ruby/3.0.0", - default: "/usr/lib/ruby/gems/3.0.0", }), }); @@ -55,15 +50,7 @@ suite("Rbenv", () => { assert.strictEqual(version, "3.0.0"); assert.strictEqual(yjit, true); - assert.strictEqual(env.GEM_HOME, "/home/user/.gem/ruby/3.0.0"); - assert.strictEqual( - env.GEM_PATH, - "/home/user/.gem/ruby/3.0.0:/usr/lib/ruby/gems/3.0.0", - ); - assert.ok(env.PATH!.includes("/home/user/.gem/ruby/3.0.0/bin")); - assert.ok(env.PATH!.includes("/usr/lib/ruby/gems/3.0.0/bin")); assert.strictEqual(env.ANY, "true"); - execStub.restore(); }); }); From 7d917f0c5ebc4774124f739bce6c04e73d3e1a27 Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Wed, 24 Apr 2024 14:32:41 -0400 Subject: [PATCH 045/189] Bump extension version to v0.5.20 --- vscode/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vscode/package.json b/vscode/package.json index 2014729f0b..ed2583ce3e 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.19", + "version": "0.5.20", "publisher": "Shopify", "repository": { "type": "git", From 1639dd41f16bbf7f506d6ce06dc5a0b5e60b79df Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Thu, 25 Apr 2024 10:29:22 -0400 Subject: [PATCH 046/189] Prevent debugger from printing to STDOUT (#1968) --- exe/ruby-lsp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/exe/ruby-lsp b/exe/ruby-lsp index 6b1e8cc194..f3a93c2e5a 100755 --- a/exe/ruby-lsp +++ b/exe/ruby-lsp @@ -75,14 +75,18 @@ require "ruby_lsp/internal" if options[:debug] if ["x64-mingw-ucrt", "x64-mingw32"].include?(RUBY_PLATFORM) - puts "Debugging is not supported on Windows" + $stderr.puts "Debugging is not supported on Windows" exit 1 end begin + original_stdout = $stdout + $stdout = $stderr require "debug/open_nonstop" rescue LoadError - warn("You need to install the debug gem to use the --debug flag") + $stderr.puts("You need to install the debug gem to use the --debug flag") + ensure + $stdout = original_stdout end end From 9b31275d18007cec25fd697c065f94d4f197f38c Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Fri, 26 Apr 2024 09:41:54 -0400 Subject: [PATCH 047/189] Make module tracking lazy (#1978) --- lib/ruby_indexer/lib/ruby_indexer/entry.rb | 28 +++++++--------------- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/lib/ruby_indexer/lib/ruby_indexer/entry.rb b/lib/ruby_indexer/lib/ruby_indexer/entry.rb index f5e7a36876..d9e17e2db4 100644 --- a/lib/ruby_indexer/lib/ruby_indexer/entry.rb +++ b/lib/ruby_indexer/lib/ruby_indexer/entry.rb @@ -60,29 +60,19 @@ class Namespace < Entry abstract! - sig { returns(T::Array[String]) } - attr_accessor :included_modules + sig { returns(String) } + def short_name + T.must(@name.split("::").last) + end sig { returns(T::Array[String]) } - attr_accessor :prepended_modules - - sig do - params( - name: String, - file_path: String, - location: T.any(Prism::Location, RubyIndexer::Location), - comments: T::Array[String], - ).void - end - def initialize(name, file_path, location, comments) - super(name, file_path, location, comments) - @included_modules = T.let([], T::Array[String]) - @prepended_modules = T.let([], T::Array[String]) + def included_modules + @included_modules ||= T.let([], T.nilable(T::Array[String])) end - sig { returns(String) } - def short_name - T.must(@name.split("::").last) + sig { returns(T::Array[String]) } + def prepended_modules + @prepended_modules ||= T.let([], T.nilable(T::Array[String])) end end From 494e90eb05b8ee20ed85aa113a93ab77e527603e Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Fri, 26 Apr 2024 11:30:07 -0400 Subject: [PATCH 048/189] Remove unused short_name method (#1980) --- lib/ruby_indexer/lib/ruby_indexer/entry.rb | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/ruby_indexer/lib/ruby_indexer/entry.rb b/lib/ruby_indexer/lib/ruby_indexer/entry.rb index d9e17e2db4..df1be9d081 100644 --- a/lib/ruby_indexer/lib/ruby_indexer/entry.rb +++ b/lib/ruby_indexer/lib/ruby_indexer/entry.rb @@ -60,11 +60,6 @@ class Namespace < Entry abstract! - sig { returns(String) } - def short_name - T.must(@name.split("::").last) - end - sig { returns(T::Array[String]) } def included_modules @included_modules ||= T.let([], T.nilable(T::Array[String])) From 1c7199aed8090aff3da89c91e5aba9b69c0bb0af Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Fri, 26 Apr 2024 23:37:50 +0800 Subject: [PATCH 049/189] Always expand indexables' full paths (#1977) Depends on the `included_pattern`'s value, `Dir.glob` may return relative paths as its default base is the current working directory. For example, if the `included_pattern` is `**/*.rb`, the `Dir.glob` will return relative paths like `lib/foo.rb` instead of the full path like `/path/to/project/lib/foo.rb`. This commit ensures that the full paths are always expanded by using `File.expand_path` on the paths returned by `Dir.glob`. Fixes #1971 --- lib/ruby_indexer/lib/ruby_indexer/configuration.rb | 1 + lib/ruby_indexer/test/configuration_test.rb | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/lib/ruby_indexer/lib/ruby_indexer/configuration.rb b/lib/ruby_indexer/lib/ruby_indexer/configuration.rb index 34d5e5c80d..a3377fbf85 100644 --- a/lib/ruby_indexer/lib/ruby_indexer/configuration.rb +++ b/lib/ruby_indexer/lib/ruby_indexer/configuration.rb @@ -56,6 +56,7 @@ def indexables load_path_entry = T.let(nil, T.nilable(String)) Dir.glob(pattern, File::FNM_PATHNAME | File::FNM_EXTGLOB).map! do |path| + path = File.expand_path(path) # All entries for the same pattern match the same $LOAD_PATH entry. Since searching the $LOAD_PATH for every # entry is expensive, we memoize it until we find a path that doesn't belong to that $LOAD_PATH. This happens # on repositories that define multiple gems, like Rails. All frameworks are defined inside the Dir.pwd, but diff --git a/lib/ruby_indexer/test/configuration_test.rb b/lib/ruby_indexer/test/configuration_test.rb index 09a3428150..e7e774e6e1 100644 --- a/lib/ruby_indexer/test/configuration_test.rb +++ b/lib/ruby_indexer/test/configuration_test.rb @@ -20,6 +20,14 @@ def test_load_configuration_executes_configure_block assert(indexables.none? { |indexable| indexable.full_path == __FILE__ }) end + def test_indexables_have_expanded_full_paths + @config.apply_config({ "included_patterns" => ["**/*.rb"] }) + indexables = @config.indexables + + # All paths should be expanded + assert(indexables.none? { |indexable| indexable.full_path.start_with?("lib/") }) + end + def test_indexables_only_includes_gem_require_paths indexables = @config.indexables From 81deb14dcbdffe8179912655df13e4fee3e65b56 Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Fri, 26 Apr 2024 14:10:36 -0400 Subject: [PATCH 050/189] Discard method call target if position doesn't cover identifier (#1981) --- lib/ruby_lsp/requests/definition.rb | 33 +++++++----- lib/ruby_lsp/requests/hover.rb | 18 ++++--- lib/ruby_lsp/requests/request.rb | 14 +++++ test/requests/definition_expectations_test.rb | 52 +++++++++++++++++++ test/requests/hover_expectations_test.rb | 30 +++++++++++ 5 files changed, 128 insertions(+), 19 deletions(-) diff --git a/lib/ruby_lsp/requests/definition.rb b/lib/ruby_lsp/requests/definition.rb index ff06d0ec2f..a3b014a0b3 100644 --- a/lib/ruby_lsp/requests/definition.rb +++ b/lib/ruby_lsp/requests/definition.rb @@ -43,6 +43,7 @@ def initialize(document, global_state, position, dispatcher, typechecker_enabled ResponseBuilders::CollectionResponseBuilder[Interface::Location].new, ResponseBuilders::CollectionResponseBuilder[Interface::Location], ) + @dispatcher = dispatcher target, parent, nesting = document.locate_node( position, @@ -50,33 +51,41 @@ def initialize(document, global_state, position, dispatcher, typechecker_enabled ) 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 target = determine_target( target, parent, position, ) + elsif target.is_a?(Prism::CallNode) && target.name != :require && target.name != :require_relative && + !covers_position?(target.message_loc, position) + # 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 end - Listeners::Definition.new( - @response_builder, - global_state, - document.uri, - nesting, - dispatcher, - typechecker_enabled, - ) + if target + Listeners::Definition.new( + @response_builder, + global_state, + document.uri, + nesting, + dispatcher, + typechecker_enabled, + ) - Addon.addons.each do |addon| - addon.create_definition_listener(@response_builder, document.uri, nesting, dispatcher) + Addon.addons.each do |addon| + addon.create_definition_listener(@response_builder, document.uri, nesting, dispatcher) + end end @target = T.let(target, T.nilable(Prism::Node)) - @dispatcher = dispatcher end sig { override.returns(T::Array[Interface::Location]) } def perform - @dispatcher.dispatch_once(@target) + @dispatcher.dispatch_once(@target) if @target @response_builder.response end end diff --git a/lib/ruby_lsp/requests/hover.rb b/lib/ruby_lsp/requests/hover.rb index 95b170a16c..e75f2f804a 100644 --- a/lib/ruby_lsp/requests/hover.rb +++ b/lib/ruby_lsp/requests/hover.rb @@ -41,25 +41,29 @@ def provider end def initialize(document, global_state, position, dispatcher, typechecker_enabled) super() - @target = T.let(nil, T.nilable(Prism::Node)) - @target, parent, nesting = document.locate_node( + target, parent, nesting = document.locate_node( position, node_types: Listeners::Hover::ALLOWED_TARGETS, ) if (Listeners::Hover::ALLOWED_TARGETS.include?(parent.class) && - !Listeners::Hover::ALLOWED_TARGETS.include?(@target.class)) || - (parent.is_a?(Prism::ConstantPathNode) && @target.is_a?(Prism::ConstantReadNode)) - @target = determine_target( - T.must(@target), + !Listeners::Hover::ALLOWED_TARGETS.include?(target.class)) || + (parent.is_a?(Prism::ConstantPathNode) && target.is_a?(Prism::ConstantReadNode)) + target = determine_target( + T.must(target), T.must(parent), position, ) + elsif target.is_a?(Prism::CallNode) && target.name != :require && target.name != :require_relative && + !covers_position?(target.message_loc, position) + + target = nil end # Don't need to instantiate any listeners if there's no target - return unless @target + return unless target + @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) diff --git a/lib/ruby_lsp/requests/request.rb b/lib/ruby_lsp/requests/request.rb index 903763a15d..b4c8b62c3e 100644 --- a/lib/ruby_lsp/requests/request.rb +++ b/lib/ruby_lsp/requests/request.rb @@ -65,6 +65,20 @@ def determine_target(target, parent, position) target end + + # Checks if a given location covers the position requested + sig { params(location: T.nilable(Prism::Location), position: T::Hash[Symbol, T.untyped]).returns(T::Boolean) } + def covers_position?(location, position) + return false unless location + + start_line = location.start_line - 1 + end_line = location.end_line - 1 + line = position[:line] + character = position[:character] + + (start_line < line || (start_line == line && location.start_column <= character)) && + (end_line > line || (end_line == line && location.end_column >= character)) + end end end end diff --git a/test/requests/definition_expectations_test.rb b/test/requests/definition_expectations_test.rb index 3296588809..36ba75a344 100644 --- a/test/requests/definition_expectations_test.rb +++ b/test/requests/definition_expectations_test.rb @@ -403,6 +403,58 @@ def foo; end end end + def test_definition_precision_for_methods_with_block_arguments + source = <<~RUBY + class Foo + def foo(&block); end + end + + bar.foo(&:argument) + 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/definition", + params: { textDocument: { uri: uri }, position: { character: 12, line: 4 } }, + ) + assert_empty(server.pop_response.response) + + server.process_message( + id: 1, + method: "textDocument/definition", + params: { textDocument: { uri: uri }, position: { character: 4, line: 4 } }, + ) + refute_empty(server.pop_response.response) + end + end + + def test_definition_for_method_call_inside_arguments + source = <<~RUBY + class Foo + def foo; end + + def bar(a:, b:); end + + def baz + bar(a: foo, b: 42) + end + end + RUBY + + with_server(source) do |server, uri| + server.process_message( + id: 1, + method: "textDocument/definition", + params: { textDocument: { uri: uri }, position: { character: 11, line: 6 } }, + ) + response = server.pop_response.response.first + assert_equal(1, response.range.start.line) + assert_equal(1, response.range.end.line) + end + end + private def create_definition_addon diff --git a/test/requests/hover_expectations_test.rb b/test/requests/hover_expectations_test.rb index 0a24311dad..c0baf1050a 100644 --- a/test/requests/hover_expectations_test.rb +++ b/test/requests/hover_expectations_test.rb @@ -281,6 +281,36 @@ class Post end end + def test_hover_precision_for_methods_with_block_arguments + source = <<~RUBY + class Foo + # Hello + def foo(&block); end + + def bar + foo(&:argument) + 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: 12, line: 5 } }, + ) + assert_nil(server.pop_response.response) + + server.process_message( + id: 1, + method: "textDocument/hover", + params: { textDocument: { uri: uri }, position: { character: 4, line: 5 } }, + ) + assert_match("Hello", server.pop_response.response.contents.value) + end + end + private def create_hover_addon From 5e059f135c98af85ba6d1201e7b726fb3249139b Mon Sep 17 00:00:00 2001 From: "shopify-github-actions-access[bot]" <109624739+shopify-github-actions-access[bot]@users.noreply.github.com> Date: Fri, 26 Apr 2024 20:15:16 +0100 Subject: [PATCH 051/189] Bump version to v0.16.6 (#1965) Co-authored-by: github-actions --- Gemfile.lock | 2 +- VERSION | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index a6f47ae0bb..ba6324a9de 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -9,7 +9,7 @@ GIT PATH remote: . specs: - ruby-lsp (0.16.5) + ruby-lsp (0.16.6) language_server-protocol (~> 3.17.0) prism (>= 0.23.0, < 0.28) sorbet-runtime (>= 0.5.10782) diff --git a/VERSION b/VERSION index 19270385ea..c3f65805f7 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.16.5 +0.16.6 From 608209f3665a52a9114ffba75150b8579440f7cb Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 26 Apr 2024 20:02:34 +0000 Subject: [PATCH 052/189] Bump version to v0.16.7 --- Gemfile.lock | 2 +- VERSION | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index ba6324a9de..cea5c78c5f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -9,7 +9,7 @@ GIT PATH remote: . specs: - ruby-lsp (0.16.6) + ruby-lsp (0.16.7) language_server-protocol (~> 3.17.0) prism (>= 0.23.0, < 0.28) sorbet-runtime (>= 0.5.10782) diff --git a/VERSION b/VERSION index c3f65805f7..427cda05dc 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.16.6 +0.16.7 From ba357b9186f1558f82b9b881d45ea2f3e1cddefc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Apr 2024 02:19:18 +0000 Subject: [PATCH 053/189] Bump the minor-and-patch group with 4 updates Bumps the minor-and-patch group with 4 updates: [rubocop-sorbet](https://github.com/shopify/rubocop-sorbet), [rubocop](https://github.com/rubocop/rubocop), [sorbet-static-and-runtime](https://github.com/sorbet/sorbet) and [sorbet-runtime](https://github.com/sorbet/sorbet). Updates `rubocop-sorbet` from 0.8.1 to 0.8.2 - [Release notes](https://github.com/shopify/rubocop-sorbet/releases) - [Commits](https://github.com/shopify/rubocop-sorbet/compare/v0.8.1...v0.8.2) Updates `rubocop` from 1.63.2 to 1.63.4 - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop/compare/v1.63.2...v1.63.4) Updates `sorbet-static-and-runtime` from 0.5.11352 to 0.5.11361 - [Release notes](https://github.com/sorbet/sorbet/releases) - [Commits](https://github.com/sorbet/sorbet/commits) Updates `sorbet-runtime` from 0.5.11352 to 0.5.11361 - [Release notes](https://github.com/sorbet/sorbet/releases) - [Commits](https://github.com/sorbet/sorbet/commits) --- updated-dependencies: - dependency-name: rubocop-sorbet dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: rubocop dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: sorbet-static-and-runtime dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: sorbet-runtime dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index cea5c78c5f..eee0b9e529 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -41,7 +41,7 @@ GEM ruby2_keywords (>= 0.0.5) netrc (0.11.0) parallel (1.24.0) - parser (3.3.0.5) + parser (3.3.1.0) ast (~> 2.4.1) racc prettier_print (1.2.1) @@ -58,7 +58,7 @@ GEM reline (0.5.0) io-console (~> 0.5) rexml (3.2.6) - rubocop (1.63.2) + rubocop (1.63.4) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) @@ -78,7 +78,7 @@ GEM rubocop (~> 1.0) rubocop-shopify (2.15.1) rubocop (~> 1.51) - rubocop-sorbet (0.8.1) + rubocop-sorbet (0.8.2) rubocop (>= 0.90.0) ruby-progressbar (1.13.0) ruby2_keywords (0.0.5) @@ -88,14 +88,14 @@ GEM simplecov_json_formatter (~> 0.1) simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) - sorbet (0.5.11352) - sorbet-static (= 0.5.11352) - sorbet-runtime (0.5.11352) - sorbet-static (0.5.11352-universal-darwin) - sorbet-static (0.5.11352-x86_64-linux) - sorbet-static-and-runtime (0.5.11352) - sorbet (= 0.5.11352) - sorbet-runtime (= 0.5.11352) + sorbet (0.5.11361) + sorbet-static (= 0.5.11361) + sorbet-runtime (0.5.11361) + sorbet-static (0.5.11361-universal-darwin) + sorbet-static (0.5.11361-x86_64-linux) + sorbet-static-and-runtime (0.5.11361) + sorbet (= 0.5.11361) + sorbet-runtime (= 0.5.11361) spoom (1.3.0) erubi (>= 1.10.0) prism (>= 0.19.0) @@ -122,8 +122,6 @@ GEM PLATFORMS arm64-darwin - x64-mingw-ucrt - x64-mingw32 x86_64-darwin x86_64-linux From 448104ab380c92404d156ee6b4a0fac1deff5724 Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 29 Apr 2024 02:25:03 +0000 Subject: [PATCH 054/189] Update RBI files for gems 2024-04-29 [dependabot skip] --- ...{parser@3.3.0.5.rbi => parser@3.3.1.0.rbi} | 418 ++++++++++-------- .../gems/{rbi@0.1.11.rbi => rbi@0.1.12.rbi} | 4 +- ...bet@0.8.1.rbi => rubocop-sorbet@0.8.2.rbi} | 146 ++++-- ...{rubocop@1.63.2.rbi => rubocop@1.63.4.rbi} | 169 +++---- 4 files changed, 419 insertions(+), 318 deletions(-) rename sorbet/rbi/gems/{parser@3.3.0.5.rbi => parser@3.3.1.0.rbi} (93%) rename sorbet/rbi/gems/{rbi@0.1.11.rbi => rbi@0.1.12.rbi} (99%) rename sorbet/rbi/gems/{rubocop-sorbet@0.8.1.rbi => rubocop-sorbet@0.8.2.rbi} (94%) rename sorbet/rbi/gems/{rubocop@1.63.2.rbi => rubocop@1.63.4.rbi} (99%) diff --git a/sorbet/rbi/gems/parser@3.3.0.5.rbi b/sorbet/rbi/gems/parser@3.3.1.0.rbi similarity index 93% rename from sorbet/rbi/gems/parser@3.3.0.5.rbi rename to sorbet/rbi/gems/parser@3.3.1.0.rbi index 0acdc763d8..383051a545 100644 --- a/sorbet/rbi/gems/parser@3.3.0.5.rbi +++ b/sorbet/rbi/gems/parser@3.3.1.0.rbi @@ -52,603 +52,605 @@ end # @api public # # source://parser//lib/parser/ast/processor.rb#9 -class Parser::AST::Processor < ::AST::Processor +class Parser::AST::Processor + include ::AST::Processor::Mixin + # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_alias(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_and(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_and_asgn(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#116 + # source://parser//lib/parser/ast/processor.rb#118 def on_arg(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_arg_expr(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_args(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#103 + # source://parser//lib/parser/ast/processor.rb#105 def on_argument(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_array(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_array_pattern(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_array_pattern_with_tail(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#32 + # source://parser//lib/parser/ast/processor.rb#34 def on_back_ref(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_begin(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_block(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_block_pass(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#116 + # source://parser//lib/parser/ast/processor.rb#118 def on_blockarg(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_blockarg_expr(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_break(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_case(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_case_match(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#87 + # source://parser//lib/parser/ast/processor.rb#89 def on_casgn(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_class(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#79 + # source://parser//lib/parser/ast/processor.rb#81 def on_const(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_const_pattern(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#179 + # source://parser//lib/parser/ast/processor.rb#181 def on_csend(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#32 + # source://parser//lib/parser/ast/processor.rb#34 def on_cvar(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#56 + # source://parser//lib/parser/ast/processor.rb#58 def on_cvasgn(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#158 + # source://parser//lib/parser/ast/processor.rb#160 def on_def(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_defined?(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#167 + # source://parser//lib/parser/ast/processor.rb#169 def on_defs(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_dstr(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_dsym(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_eflipflop(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#286 + # source://parser//lib/parser/ast/processor.rb#288 def on_empty_else(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_ensure(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_erange(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_find_pattern(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_for(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#116 + # source://parser//lib/parser/ast/processor.rb#118 def on_forward_arg(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_forwarded_kwrestarg(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_forwarded_restarg(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#32 + # source://parser//lib/parser/ast/processor.rb#34 def on_gvar(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#56 + # source://parser//lib/parser/ast/processor.rb#58 def on_gvasgn(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_hash(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_hash_pattern(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_if(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_if_guard(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_iflipflop(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_in_match(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_in_pattern(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_index(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_indexasgn(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_irange(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#32 + # source://parser//lib/parser/ast/processor.rb#34 def on_ivar(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#56 + # source://parser//lib/parser/ast/processor.rb#58 def on_ivasgn(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#116 + # source://parser//lib/parser/ast/processor.rb#118 def on_kwarg(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_kwargs(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_kwbegin(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#116 + # source://parser//lib/parser/ast/processor.rb#118 def on_kwoptarg(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#116 + # source://parser//lib/parser/ast/processor.rb#118 def on_kwrestarg(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_kwsplat(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_lambda(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#32 + # source://parser//lib/parser/ast/processor.rb#34 def on_lvar(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#56 + # source://parser//lib/parser/ast/processor.rb#58 def on_lvasgn(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_masgn(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_match_alt(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_match_as(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_match_current_line(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_match_pattern(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_match_pattern_p(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_match_rest(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#32 + # source://parser//lib/parser/ast/processor.rb#34 def on_match_var(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_match_with_lvasgn(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_mlhs(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_module(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_next(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_not(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#32 + # source://parser//lib/parser/ast/processor.rb#34 def on_nth_ref(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#196 + # source://parser//lib/parser/ast/processor.rb#198 def on_numblock(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#68 + # source://parser//lib/parser/ast/processor.rb#70 def on_op_asgn(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#116 + # source://parser//lib/parser/ast/processor.rb#118 def on_optarg(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_or(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_or_asgn(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_pair(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_pin(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_postexe(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_preexe(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#130 + # source://parser//lib/parser/ast/processor.rb#132 def on_procarg0(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_redo(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_regexp(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_resbody(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_rescue(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#116 + # source://parser//lib/parser/ast/processor.rb#118 def on_restarg(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_restarg_expr(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_retry(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_return(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_sclass(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#179 + # source://parser//lib/parser/ast/processor.rb#181 def on_send(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#116 + # source://parser//lib/parser/ast/processor.rb#118 def on_shadowarg(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_splat(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_super(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_undef(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_unless_guard(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_until(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_until_post(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#27 + # source://parser//lib/parser/ast/processor.rb#29 def on_var(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#43 + # source://parser//lib/parser/ast/processor.rb#45 def on_vasgn(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_when(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_while(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_while_post(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_xstr(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_yield(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#279 + # source://parser//lib/parser/ast/processor.rb#281 def process_argument_node(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def process_regular_node(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#271 + # source://parser//lib/parser/ast/processor.rb#273 def process_var_asgn_node(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#263 + # source://parser//lib/parser/ast/processor.rb#265 def process_variable_node(node); end end @@ -861,7 +863,7 @@ end # @api public # -# source://parser//lib/parser.rb#77 +# source://parser//lib/parser.rb#78 module Parser::Builders; end # source://parser//lib/parser/builders/default.rb#8 @@ -3329,7 +3331,7 @@ class Parser::Source::Buffer # @api public # @return [Buffer] a new instance of Buffer # - # source://parser//lib/parser/source/buffer.rb#105 + # source://parser//lib/parser/source/buffer.rb#110 def initialize(name, first_line = T.unsafe(nil), source: T.unsafe(nil)); end # Convert a character index into the source to a column number. @@ -3338,7 +3340,7 @@ class Parser::Source::Buffer # @param position [Integer] # @return [Integer] column # - # source://parser//lib/parser/source/buffer.rb#242 + # source://parser//lib/parser/source/buffer.rb#247 def column_for_position(position); end # Convert a character index into the source to a `[line, column]` tuple. @@ -3347,7 +3349,7 @@ class Parser::Source::Buffer # @param position [Integer] # @return [[Integer, Integer]] `[line, column]` # - # source://parser//lib/parser/source/buffer.rb#217 + # source://parser//lib/parser/source/buffer.rb#222 def decompose_position(position); end # First line of the buffer, 1 by default. @@ -3360,12 +3362,12 @@ class Parser::Source::Buffer # @api public # - # source://parser//lib/parser/source/buffer.rb#312 + # source://parser//lib/parser/source/buffer.rb#317 def freeze; end # @api public # - # source://parser//lib/parser/source/buffer.rb#318 + # source://parser//lib/parser/source/buffer.rb#323 def inspect; end # Number of last line in the buffer @@ -3373,7 +3375,7 @@ class Parser::Source::Buffer # @api public # @return [Integer] # - # source://parser//lib/parser/source/buffer.rb#307 + # source://parser//lib/parser/source/buffer.rb#312 def last_line; end # Convert a character index into the source to a line number. @@ -3382,7 +3384,7 @@ class Parser::Source::Buffer # @param position [Integer] # @return [Integer] line # - # source://parser//lib/parser/source/buffer.rb#231 + # source://parser//lib/parser/source/buffer.rb#236 def line_for_position(position); end # Extract line `lineno` as a new `Range`, taking `first_line` into account. @@ -3392,7 +3394,7 @@ class Parser::Source::Buffer # @raise [IndexError] if `lineno` is out of bounds # @return [Range] # - # source://parser//lib/parser/source/buffer.rb#284 + # source://parser//lib/parser/source/buffer.rb#289 def line_range(lineno); end # Buffer name. If the buffer was created from a file, the name corresponds @@ -3411,7 +3413,7 @@ class Parser::Source::Buffer # @raise [ArgumentError] if already populated # @return [String] # - # source://parser//lib/parser/source/buffer.rb#180 + # source://parser//lib/parser/source/buffer.rb#185 def raw_source=(input); end # Populate this buffer from correspondingly named file. @@ -3422,12 +3424,12 @@ class Parser::Source::Buffer # @raise [ArgumentError] if already populated # @return [Buffer] self # - # source://parser//lib/parser/source/buffer.rb#131 + # source://parser//lib/parser/source/buffer.rb#136 def read; end # @api public # - # source://parser//lib/parser/source/buffer.rb#194 + # source://parser//lib/parser/source/buffer.rb#199 def slice(start, length = T.unsafe(nil)); end # Source code contained in this buffer. @@ -3436,7 +3438,7 @@ class Parser::Source::Buffer # @raise [RuntimeError] if buffer is not populated yet # @return [String] source code # - # source://parser//lib/parser/source/buffer.rb#145 + # source://parser//lib/parser/source/buffer.rb#150 def source; end # Populate this buffer from a string with encoding autodetection. @@ -3448,7 +3450,7 @@ class Parser::Source::Buffer # @raise [EncodingError] if `input` includes invalid byte sequence for the encoding # @return [String] # - # source://parser//lib/parser/source/buffer.rb#162 + # source://parser//lib/parser/source/buffer.rb#167 def source=(input); end # Extract line `lineno` from source, taking `first_line` into account. @@ -3458,7 +3460,7 @@ class Parser::Source::Buffer # @raise [IndexError] if `lineno` is out of bounds # @return [String] # - # source://parser//lib/parser/source/buffer.rb#273 + # source://parser//lib/parser/source/buffer.rb#278 def source_line(lineno); end # Return an `Array` of source code lines. @@ -3466,30 +3468,30 @@ class Parser::Source::Buffer # @api public # @return [Array] # - # source://parser//lib/parser/source/buffer.rb#252 + # source://parser//lib/parser/source/buffer.rb#257 def source_lines; end # @api public # @return [Range] A range covering the whole source # - # source://parser//lib/parser/source/buffer.rb#298 + # source://parser//lib/parser/source/buffer.rb#303 def source_range; end private # @api public # - # source://parser//lib/parser/source/buffer.rb#348 + # source://parser//lib/parser/source/buffer.rb#353 def bsearch(line_begins, position); end # @api public # - # source://parser//lib/parser/source/buffer.rb#325 + # source://parser//lib/parser/source/buffer.rb#330 def line_begins; end # @api public # - # source://parser//lib/parser/source/buffer.rb#339 + # source://parser//lib/parser/source/buffer.rb#344 def line_index_for_position(position); end class << self @@ -3498,9 +3500,10 @@ class Parser::Source::Buffer # # @api public # @param string [String] + # @raise [Parser::UnknownEncodingInMagicComment] if the encoding is not recognized # @return [String, nil] encoding name, if recognized # - # source://parser//lib/parser/source/buffer.rb#51 + # source://parser//lib/parser/source/buffer.rb#52 def recognize_encoding(string); end # Recognize encoding of `input` and process it so it could be lexed. @@ -3518,7 +3521,7 @@ class Parser::Source::Buffer # @raise [EncodingError] # @return [String] # - # source://parser//lib/parser/source/buffer.rb#90 + # source://parser//lib/parser/source/buffer.rb#95 def reencode_string(input); end end end @@ -5124,80 +5127,80 @@ end # source://parser//lib/parser/source/tree_rewriter.rb#391 Parser::Source::TreeRewriter::ACTIONS = T.let(T.unsafe(nil), Array) -# source://parser//lib/parser/source/tree_rewriter/action.rb#13 +# source://parser//lib/parser/source/tree_rewriter/action.rb#14 class Parser::Source::TreeRewriter::Action - # source://parser//lib/parser/source/tree_rewriter/action.rb#16 + # source://parser//lib/parser/source/tree_rewriter/action.rb#17 def initialize(range, enforcer, insert_before: T.unsafe(nil), replacement: T.unsafe(nil), insert_after: T.unsafe(nil), children: T.unsafe(nil)); end - # source://parser//lib/parser/source/tree_rewriter/action.rb#28 + # source://parser//lib/parser/source/tree_rewriter/action.rb#29 def combine(action); end - # source://parser//lib/parser/source/tree_rewriter/action.rb#67 + # source://parser//lib/parser/source/tree_rewriter/action.rb#68 def contract; end - # source://parser//lib/parser/source/tree_rewriter/action.rb#33 + # source://parser//lib/parser/source/tree_rewriter/action.rb#34 def empty?; end - # source://parser//lib/parser/source/tree_rewriter/action.rb#14 + # source://parser//lib/parser/source/tree_rewriter/action.rb#15 def insert_after; end - # source://parser//lib/parser/source/tree_rewriter/action.rb#14 + # source://parser//lib/parser/source/tree_rewriter/action.rb#15 def insert_before; end - # source://parser//lib/parser/source/tree_rewriter/action.rb#57 + # source://parser//lib/parser/source/tree_rewriter/action.rb#58 def insertion?; end - # source://parser//lib/parser/source/tree_rewriter/action.rb#80 + # source://parser//lib/parser/source/tree_rewriter/action.rb#81 def moved(source_buffer, offset); end - # source://parser//lib/parser/source/tree_rewriter/action.rb#49 + # source://parser//lib/parser/source/tree_rewriter/action.rb#50 def nested_actions; end - # source://parser//lib/parser/source/tree_rewriter/action.rb#40 + # source://parser//lib/parser/source/tree_rewriter/action.rb#41 def ordered_replacements; end - # source://parser//lib/parser/source/tree_rewriter/action.rb#14 + # source://parser//lib/parser/source/tree_rewriter/action.rb#15 def range; end - # source://parser//lib/parser/source/tree_rewriter/action.rb#14 + # source://parser//lib/parser/source/tree_rewriter/action.rb#15 def replacement; end protected - # source://parser//lib/parser/source/tree_rewriter/action.rb#158 + # source://parser//lib/parser/source/tree_rewriter/action.rb#159 def analyse_hierarchy(action); end - # source://parser//lib/parser/source/tree_rewriter/action.rb#145 + # source://parser//lib/parser/source/tree_rewriter/action.rb#146 def bsearch_child_index(from = T.unsafe(nil)); end - # source://parser//lib/parser/source/tree_rewriter/action.rb#224 + # source://parser//lib/parser/source/tree_rewriter/action.rb#225 def call_enforcer_for_merge(action); end - # source://parser//lib/parser/source/tree_rewriter/action.rb#204 + # source://parser//lib/parser/source/tree_rewriter/action.rb#205 def check_fusible(action, *fusible); end - # source://parser//lib/parser/source/tree_rewriter/action.rb#94 + # source://parser//lib/parser/source/tree_rewriter/action.rb#95 def children; end - # source://parser//lib/parser/source/tree_rewriter/action.rb#129 + # source://parser//lib/parser/source/tree_rewriter/action.rb#130 def combine_children(more_children); end - # source://parser//lib/parser/source/tree_rewriter/action.rb#102 + # source://parser//lib/parser/source/tree_rewriter/action.rb#103 def do_combine(action); end - # source://parser//lib/parser/source/tree_rewriter/action.rb#135 + # source://parser//lib/parser/source/tree_rewriter/action.rb#136 def fuse_deletions(action, fusible, other_sibblings); end - # source://parser//lib/parser/source/tree_rewriter/action.rb#215 + # source://parser//lib/parser/source/tree_rewriter/action.rb#216 def merge(action); end - # source://parser//lib/parser/source/tree_rewriter/action.rb#110 + # source://parser//lib/parser/source/tree_rewriter/action.rb#111 def place_in_hierarchy(action); end - # source://parser//lib/parser/source/tree_rewriter/action.rb#232 + # source://parser//lib/parser/source/tree_rewriter/action.rb#233 def swallow(children); end - # source://parser//lib/parser/source/tree_rewriter/action.rb#96 + # source://parser//lib/parser/source/tree_rewriter/action.rb#97 def with(range: T.unsafe(nil), enforcer: T.unsafe(nil), children: T.unsafe(nil), insert_before: T.unsafe(nil), replacement: T.unsafe(nil), insert_after: T.unsafe(nil)); end end @@ -5215,90 +5218,122 @@ Parser::Source::TreeRewriter::POLICY_TO_LEVEL = T.let(T.unsafe(nil), Hash) class Parser::StaticEnvironment # @return [StaticEnvironment] a new instance of StaticEnvironment # - # source://parser//lib/parser/static_environment.rb#11 + # source://parser//lib/parser/static_environment.rb#17 def initialize; end - # source://parser//lib/parser/static_environment.rb#40 + # source://parser//lib/parser/static_environment.rb#55 def declare(name); end - # source://parser//lib/parser/static_environment.rb#58 + # Anonymous blockarg + # + # source://parser//lib/parser/static_environment.rb#77 def declare_anonymous_blockarg; end - # source://parser//lib/parser/static_environment.rb#82 + # Anonymous kwresarg + # + # source://parser//lib/parser/static_environment.rb#113 def declare_anonymous_kwrestarg; end - # source://parser//lib/parser/static_environment.rb#70 + # Anonymous restarg + # + # source://parser//lib/parser/static_environment.rb#95 def declare_anonymous_restarg; end - # source://parser//lib/parser/static_environment.rb#50 + # Forward args + # + # source://parser//lib/parser/static_environment.rb#67 def declare_forward_args; end # @return [Boolean] # - # source://parser//lib/parser/static_environment.rb#46 + # source://parser//lib/parser/static_environment.rb#61 def declared?(name); end # @return [Boolean] # - # source://parser//lib/parser/static_environment.rb#62 + # source://parser//lib/parser/static_environment.rb#81 def declared_anonymous_blockarg?; end # @return [Boolean] # - # source://parser//lib/parser/static_environment.rb#86 + # source://parser//lib/parser/static_environment.rb#85 + def declared_anonymous_blockarg_in_current_scpe?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#117 def declared_anonymous_kwrestarg?; end # @return [Boolean] # - # source://parser//lib/parser/static_environment.rb#74 + # source://parser//lib/parser/static_environment.rb#121 + def declared_anonymous_kwrestarg_in_current_scope?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#99 def declared_anonymous_restarg?; end # @return [Boolean] # - # source://parser//lib/parser/static_environment.rb#54 + # source://parser//lib/parser/static_environment.rb#103 + def declared_anonymous_restarg_in_current_scope?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#71 def declared_forward_args?; end # @return [Boolean] # - # source://parser//lib/parser/static_environment.rb#94 + # source://parser//lib/parser/static_environment.rb#129 def empty?; end - # source://parser//lib/parser/static_environment.rb#27 + # source://parser//lib/parser/static_environment.rb#33 def extend_dynamic; end - # source://parser//lib/parser/static_environment.rb#20 + # source://parser//lib/parser/static_environment.rb#26 def extend_static; end # @return [Boolean] # - # source://parser//lib/parser/static_environment.rb#66 + # source://parser//lib/parser/static_environment.rb#89 def parent_has_anonymous_blockarg?; end # @return [Boolean] # - # source://parser//lib/parser/static_environment.rb#90 + # source://parser//lib/parser/static_environment.rb#125 def parent_has_anonymous_kwrestarg?; end # @return [Boolean] # - # source://parser//lib/parser/static_environment.rb#78 + # source://parser//lib/parser/static_environment.rb#107 def parent_has_anonymous_restarg?; end - # source://parser//lib/parser/static_environment.rb#15 + # source://parser//lib/parser/static_environment.rb#21 def reset; end - # source://parser//lib/parser/static_environment.rb#34 + # source://parser//lib/parser/static_environment.rb#49 def unextend; end end -# source://parser//lib/parser/static_environment.rb#7 -Parser::StaticEnvironment::ANONYMOUS_BLOCKARG = T.let(T.unsafe(nil), Symbol) +# source://parser//lib/parser/static_environment.rb#15 +Parser::StaticEnvironment::ANONYMOUS_BLOCKARG_INHERITED = T.let(T.unsafe(nil), Symbol) + +# source://parser//lib/parser/static_environment.rb#14 +Parser::StaticEnvironment::ANONYMOUS_BLOCKARG_IN_CURRENT_SCOPE = T.let(T.unsafe(nil), Symbol) + +# source://parser//lib/parser/static_environment.rb#12 +Parser::StaticEnvironment::ANONYMOUS_KWRESTARG_INHERITED = T.let(T.unsafe(nil), Symbol) + +# source://parser//lib/parser/static_environment.rb#11 +Parser::StaticEnvironment::ANONYMOUS_KWRESTARG_IN_CURRENT_SCOPE = T.let(T.unsafe(nil), Symbol) # source://parser//lib/parser/static_environment.rb#9 -Parser::StaticEnvironment::ANONYMOUS_KWRESTARG = T.let(T.unsafe(nil), Symbol) +Parser::StaticEnvironment::ANONYMOUS_RESTARG_INHERITED = T.let(T.unsafe(nil), Symbol) # source://parser//lib/parser/static_environment.rb#8 -Parser::StaticEnvironment::ANONYMOUS_RESTARG = T.let(T.unsafe(nil), Symbol) +Parser::StaticEnvironment::ANONYMOUS_RESTARG_IN_CURRENT_SCOPE = T.let(T.unsafe(nil), Symbol) # source://parser//lib/parser/static_environment.rb#6 Parser::StaticEnvironment::FORWARD_ARGS = T.let(T.unsafe(nil), Symbol) @@ -5438,6 +5473,17 @@ class Parser::TreeRewriter < ::Parser::AST::Processor def wrap(range, before, after); end end +# {Parser::UnknownEncodingInMagicComment} is raised when a magic encoding +# comment is encountered that the currently running Ruby version doesn't +# recognize. It inherits from {ArgumentError} since that is the exception +# Ruby itself raises when trying to execute a file with an unknown encoding. +# As such, it is also not a {Parser::SyntaxError}. +# +# @api public +# +# source://parser//lib/parser/unknown_encoding_in_magic_comment_error.rb#13 +class Parser::UnknownEncodingInMagicComment < ::ArgumentError; end + # source://parser//lib/parser/version.rb#4 Parser::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/rbi@0.1.11.rbi b/sorbet/rbi/gems/rbi@0.1.12.rbi similarity index 99% rename from sorbet/rbi/gems/rbi@0.1.11.rbi rename to sorbet/rbi/gems/rbi@0.1.12.rbi index 71b0e6847d..7e121a9772 100644 --- a/sorbet/rbi/gems/rbi@0.1.11.rbi +++ b/sorbet/rbi/gems/rbi@0.1.12.rbi @@ -1944,7 +1944,7 @@ class RBI::Rewriters::Merge::Conflict < ::T::Struct def to_s; end class << self - # source://sorbet-runtime/0.5.11352/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11361/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.11352/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11361/lib/types/struct.rb#13 def inherited(s); end end end diff --git a/sorbet/rbi/gems/rubocop-sorbet@0.8.1.rbi b/sorbet/rbi/gems/rubocop-sorbet@0.8.2.rbi similarity index 94% rename from sorbet/rbi/gems/rubocop-sorbet@0.8.1.rbi rename to sorbet/rbi/gems/rubocop-sorbet@0.8.2.rbi index 6f4cc551fa..69266e924a 100644 --- a/sorbet/rbi/gems/rubocop-sorbet@0.8.1.rbi +++ b/sorbet/rbi/gems/rubocop-sorbet@0.8.2.rbi @@ -523,6 +523,42 @@ class RuboCop::Cop::Sorbet::FalseSigil < ::RuboCop::Cop::Sorbet::HasSigil def minimum_strictness; end end +# Disallow including the `Comparable` module in `T::Enum`. +# +# @example +# +# # bad +# class Priority < T::Enum +# include Comparable +# +# enums do +# High = new(3) +# Medium = new(2) +# Low = new(1) +# end +# +# def <=>(other) +# serialize <=> other.serialize +# end +# end +# +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/t_enum/forbid_comparable_t_enum.rb#24 +class RuboCop::Cop::Sorbet::ForbidComparableTEnum < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Sorbet::TEnum + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/t_enum/forbid_comparable_t_enum.rb#32 + def mix_in_comparable?(param0 = T.unsafe(nil)); end + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/t_enum/forbid_comparable_t_enum.rb#36 + def on_send(node); end +end + +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/t_enum/forbid_comparable_t_enum.rb#27 +RuboCop::Cop::Sorbet::ForbidComparableTEnum::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/t_enum/forbid_comparable_t_enum.rb#29 +RuboCop::Cop::Sorbet::ForbidComparableTEnum::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Ensures RBI shims do not include a call to extend T::Sig # or to extend T::Helpers # @@ -1059,6 +1095,42 @@ class RuboCop::Cop::Sorbet::KeywordArgumentOrdering < ::RuboCop::Cop::Cop def check_order_for_kwoptargs(parameters); end end +# Disallow creating a `T::Enum` with less than two values. +# +# @example +# +# # bad +# class ErrorMessages < T::Enum +# enums do +# ServerError = new("There was a server error.") +# end +# end +# +# # good +# class ErrorMessages < T::Enum +# enums do +# ServerError = new("There was a server error.") +# NotFound = new("The resource was not found.") +# end +# end +# +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/t_enum/multiple_t_enum_values.rb#24 +class RuboCop::Cop::Sorbet::MultipleTEnumValues < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Sorbet::TEnum + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/t_enum/multiple_t_enum_values.rb#30 + def enums_block?(param0 = T.unsafe(nil)); end + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/t_enum/multiple_t_enum_values.rb#40 + def on_block(node); end + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/t_enum/multiple_t_enum_values.rb#34 + def on_class(node); end +end + +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/t_enum/multiple_t_enum_values.rb#27 +RuboCop::Cop::Sorbet::MultipleTEnumValues::MSG = T.let(T.unsafe(nil), String) + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#8 module RuboCop::Cop::Sorbet::MutableConstantSorbetAwareBehaviour # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#18 @@ -1123,54 +1195,6 @@ end # source://rubocop-sorbet//lib/rubocop/cop/sorbet/obsolete_strict_memoization.rb#47 RuboCop::Cop::Sorbet::ObsoleteStrictMemoization::MSG = T.let(T.unsafe(nil), String) -# Ensures one ancestor per requires_ancestor line -# rather than chaining them as a comma-separated list. -# -# @example -# -# # bad -# module SomeModule -# requires_ancestor Kernel, Minitest::Assertions -# end -# -# # good -# module SomeModule -# requires_ancestor Kernel -# requires_ancestor Minitest::Assertions -# end -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#24 -class RuboCop::Cop::Sorbet::OneAncestorPerLine < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#38 - def abstract?(param0); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#56 - def autocorrect(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#33 - def more_than_one_ancestor(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#49 - def on_class(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#42 - def on_module(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#28 - def requires_ancestors(param0); end - - private - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#72 - def new_ra_line(indent_count); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#66 - def process_node(node); end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#25 -RuboCop::Cop::Sorbet::OneAncestorPerLine::MSG = T.let(T.unsafe(nil), String) - # Forbids the use of redundant `extend T::Sig`. Only for use in # applications that monkey patch `Module.include(T::Sig)` globally, # which would make it redundant. @@ -1323,6 +1347,32 @@ class RuboCop::Cop::Sorbet::StrongSigil < ::RuboCop::Cop::Sorbet::HasSigil def minimum_strictness; end end +# Mixing for writing cops that deal with `T::Enum`s +# +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/t_enum.rb#7 +module RuboCop::Cop::Sorbet::TEnum + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/t_enum.rb#9 + def initialize(*_arg0); end + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/t_enum.rb#23 + def after_class(node); end + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/t_enum.rb#19 + def on_class(node); end + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/t_enum.rb#15 + def t_enum?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/t_enum.rb#29 + def in_t_enum_class?; end +end + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb#6 module RuboCop::Cop::Sorbet::TargetSorbetVersion mixes_in_class_methods ::RuboCop::Cop::Sorbet::TargetSorbetVersion::ClassMethods diff --git a/sorbet/rbi/gems/rubocop@1.63.2.rbi b/sorbet/rbi/gems/rubocop@1.63.4.rbi similarity index 99% rename from sorbet/rbi/gems/rubocop@1.63.2.rbi rename to sorbet/rbi/gems/rubocop@1.63.4.rbi index b31bf2d311..f82db723ef 100644 --- a/sorbet/rbi/gems/rubocop@1.63.2.rbi +++ b/sorbet/rbi/gems/rubocop@1.63.4.rbi @@ -744,6 +744,11 @@ class RuboCop::CachedData # source://rubocop//lib/rubocop/cached_data.rb#47 def deserialize_offenses(offenses); end + # @api private + # + # source://rubocop//lib/rubocop/cached_data.rb#56 + def location_from_source_buffer(offense, source_buffer); end + # @api private # # source://rubocop//lib/rubocop/cached_data.rb#40 @@ -5087,7 +5092,7 @@ class RuboCop::Cop::Corrector < ::Parser::Source::TreeRewriter # Legacy # - # source://parser/3.3.0.5/lib/parser/source/tree_rewriter.rb#252 + # source://parser/3.3.1.0/lib/parser/source/tree_rewriter.rb#252 def rewrite; end # Swaps sources at the given ranges. @@ -41825,7 +41830,7 @@ class RuboCop::Cop::Style::MutableConstant < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-sorbet/0.8.1/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#18 + # source://rubocop-sorbet/0.8.2/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 @@ -41843,7 +41848,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.1/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#12 + # source://rubocop-sorbet/0.8.2/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#12 def t_let(param0 = T.unsafe(nil)); end private @@ -45905,12 +45910,12 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#180 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#182 def argument_is_method?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#144 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#146 def argument_newline?(node); end # @return [Boolean] @@ -45918,7 +45923,7 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#101 def ends_with_backslash_without_comment?(source_line); end - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#160 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#162 def find_node_for_line(line); end # @return [Boolean] @@ -45938,7 +45943,7 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#187 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#189 def method_call_with_arguments?(node); end # A method call without parentheses such as the following cannot remove `\`: @@ -45963,12 +45968,12 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#166 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#168 def same_line?(node, line); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#191 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#193 def start_with_arithmetic_operator?(source_line); end # @return [Boolean] @@ -48299,12 +48304,12 @@ RuboCop::Cop::Style::Semicolon::MSG = T.let(T.unsafe(nil), String) # # @example # # bad -# Foo.send(:bar) -# quuz.send(:fred) +# Foo.send(bar) +# quuz.send(fred) # # # good -# Foo.__send__(:bar) -# quuz.public_send(:fred) +# Foo.__send__(bar) +# quuz.public_send(fred) # # source://rubocop//lib/rubocop/cop/style/send.rb#16 class RuboCop::Cop::Style::Send < ::RuboCop::Cop::Base @@ -55696,7 +55701,7 @@ class RuboCop::LSP::Routes # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#170 + # source://rubocop//lib/rubocop/lsp/routes.rb#168 def handle_method_missing(request); end # source://rubocop//lib/rubocop/lsp/routes.rb#67 @@ -55704,39 +55709,39 @@ class RuboCop::LSP::Routes # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#159 + # source://rubocop//lib/rubocop/lsp/routes.rb#157 def handle_unsupported_method(request, method = T.unsafe(nil)); end private # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#208 + # source://rubocop//lib/rubocop/lsp/routes.rb#206 def diagnostic(file_uri, text); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#178 + # source://rubocop//lib/rubocop/lsp/routes.rb#176 def extract_initialization_options_from(request); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#188 + # source://rubocop//lib/rubocop/lsp/routes.rb#186 def format_file(file_uri, command: T.unsafe(nil)); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#222 + # source://rubocop//lib/rubocop/lsp/routes.rb#220 def remove_file_protocol_from(uri); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#226 + # source://rubocop//lib/rubocop/lsp/routes.rb#224 def to_diagnostic(offense); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#238 + # source://rubocop//lib/rubocop/lsp/routes.rb#236 def to_range(location); end class << self @@ -55830,32 +55835,32 @@ class RuboCop::LSP::Server # @api private # - # source://rubocop//lib/rubocop/lsp/server.rb#59 + # source://rubocop//lib/rubocop/lsp/server.rb#61 def configure(options); end # @api private # - # source://rubocop//lib/rubocop/lsp/server.rb#51 + # source://rubocop//lib/rubocop/lsp/server.rb#53 def format(path, text, command:); end # @api private # - # source://rubocop//lib/rubocop/lsp/server.rb#55 + # source://rubocop//lib/rubocop/lsp/server.rb#57 def offenses(path, text); end # @api private # - # source://rubocop//lib/rubocop/lsp/server.rb#32 + # source://rubocop//lib/rubocop/lsp/server.rb#34 def start; end # @api private # - # source://rubocop//lib/rubocop/lsp/server.rb#65 + # source://rubocop//lib/rubocop/lsp/server.rb#67 def stop(&block); end # @api private # - # source://rubocop//lib/rubocop/lsp/server.rb#47 + # source://rubocop//lib/rubocop/lsp/server.rb#49 def write(response); end end @@ -55883,13 +55888,13 @@ RuboCop::LSP::Severity::SEVERITIES = T.let(T.unsafe(nil), Hash) # # @api private # -# source://rubocop//lib/rubocop/lockfile.rb#7 +# source://rubocop//lib/rubocop/lockfile.rb#15 class RuboCop::Lockfile # @api private # @param lockfile_path [String, Pathname, nil] # @return [Lockfile] a new instance of Lockfile # - # source://rubocop//lib/rubocop/lockfile.rb#9 + # source://rubocop//lib/rubocop/lockfile.rb#17 def initialize(lockfile_path = T.unsafe(nil)); end # Gems that the bundle directly depends on. @@ -55897,7 +55902,7 @@ class RuboCop::Lockfile # @api private # @return [Array, nil] # - # source://rubocop//lib/rubocop/lockfile.rb#17 + # source://rubocop//lib/rubocop/lockfile.rb#29 def dependencies; end # Returns the locked versions of gems from this lockfile. @@ -55906,7 +55911,7 @@ class RuboCop::Lockfile # @param include_transitive_dependencies: [Boolean] When false, only direct dependencies # are returned, i.e. those listed explicitly in the `Gemfile`. # - # source://rubocop//lib/rubocop/lockfile.rb#37 + # source://rubocop//lib/rubocop/lockfile.rb#49 def gem_versions(include_transitive_dependencies: T.unsafe(nil)); end # All activated gems, including transitive dependencies. @@ -55914,7 +55919,7 @@ class RuboCop::Lockfile # @api private # @return [Array, nil] # - # source://rubocop//lib/rubocop/lockfile.rb#25 + # source://rubocop//lib/rubocop/lockfile.rb#37 def gems; end # Whether this lockfile includes the named gem, directly or indirectly. @@ -55923,7 +55928,7 @@ class RuboCop::Lockfile # @param name [String] # @return [Boolean] # - # source://rubocop//lib/rubocop/lockfile.rb#53 + # source://rubocop//lib/rubocop/lockfile.rb#65 def includes_gem?(name); end private @@ -55931,13 +55936,13 @@ class RuboCop::Lockfile # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/lockfile.rb#73 + # source://rubocop//lib/rubocop/lockfile.rb#85 def bundler_lock_parser_defined?; end # @api private # @return [Bundler::LockfileParser, nil] # - # source://rubocop//lib/rubocop/lockfile.rb#60 + # source://rubocop//lib/rubocop/lockfile.rb#72 def parser; end end @@ -57208,145 +57213,145 @@ RuboCop::ResultCache::NON_CHANGING = T.let(T.unsafe(nil), Array) class RuboCop::Runner # @return [Runner] a new instance of Runner # - # source://rubocop//lib/rubocop/runner.rb#62 + # source://rubocop//lib/rubocop/runner.rb#63 def initialize(options, config_store); end # Sets the attribute aborting # # @param value the value to set the attribute aborting to. # - # source://rubocop//lib/rubocop/runner.rb#60 + # source://rubocop//lib/rubocop/runner.rb#61 def aborting=(_arg0); end # @return [Boolean] # - # source://rubocop//lib/rubocop/runner.rb#86 + # source://rubocop//lib/rubocop/runner.rb#87 def aborting?; end # Returns the value of attribute errors. # - # source://rubocop//lib/rubocop/runner.rb#59 + # source://rubocop//lib/rubocop/runner.rb#60 def errors; end - # source://rubocop//lib/rubocop/runner.rb#70 + # source://rubocop//lib/rubocop/runner.rb#71 def run(paths); end # Returns the value of attribute warnings. # - # source://rubocop//lib/rubocop/runner.rb#59 + # source://rubocop//lib/rubocop/runner.rb#60 def warnings; end private - # source://rubocop//lib/rubocop/runner.rb#199 + # source://rubocop//lib/rubocop/runner.rb#200 def add_redundant_disables(file, offenses, source); end - # source://rubocop//lib/rubocop/runner.rb#173 + # source://rubocop//lib/rubocop/runner.rb#174 def cached_result(file, team); end # @return [Boolean] # - # source://rubocop//lib/rubocop/runner.rb#253 + # source://rubocop//lib/rubocop/runner.rb#254 def cached_run?; end # Check whether a run created source identical to a previous run, which # means that we definitely have an infinite loop. # - # source://rubocop//lib/rubocop/runner.rb#331 + # source://rubocop//lib/rubocop/runner.rb#332 def check_for_infinite_loop(processed_source, offenses_by_iteration); end # @return [Boolean] # - # source://rubocop//lib/rubocop/runner.rb#225 + # source://rubocop//lib/rubocop/runner.rb#226 def check_for_redundant_disables?(source); end # @return [Boolean] # - # source://rubocop//lib/rubocop/runner.rb#426 + # source://rubocop//lib/rubocop/runner.rb#427 def considered_failure?(offense); end - # source://rubocop//lib/rubocop/runner.rb#459 + # source://rubocop//lib/rubocop/runner.rb#460 def default_config(cop_name); end - # source://rubocop//lib/rubocop/runner.rb#275 + # source://rubocop//lib/rubocop/runner.rb#276 def do_inspection_loop(file); end - # source://rubocop//lib/rubocop/runner.rb#136 + # source://rubocop//lib/rubocop/runner.rb#137 def each_inspected_file(files); end # @return [Boolean] # - # source://rubocop//lib/rubocop/runner.rb#239 + # source://rubocop//lib/rubocop/runner.rb#240 def except_redundant_cop_disable_directive?; end - # source://rubocop//lib/rubocop/runner.rb#360 + # source://rubocop//lib/rubocop/runner.rb#361 def extract_ruby_sources(processed_source); end - # source://rubocop//lib/rubocop/runner.rb#248 + # source://rubocop//lib/rubocop/runner.rb#249 def file_finished(file, offenses); end - # source://rubocop//lib/rubocop/runner.rb#177 + # source://rubocop//lib/rubocop/runner.rb#178 def file_offense_cache(file); end - # source://rubocop//lib/rubocop/runner.rb#165 + # source://rubocop//lib/rubocop/runner.rb#166 def file_offenses(file); end - # source://rubocop//lib/rubocop/runner.rb#243 + # source://rubocop//lib/rubocop/runner.rb#244 def file_started(file); end - # source://rubocop//lib/rubocop/runner.rb#406 + # source://rubocop//lib/rubocop/runner.rb#407 def filter_cop_classes(cop_classes, config); end - # source://rubocop//lib/rubocop/runner.rb#107 + # source://rubocop//lib/rubocop/runner.rb#108 def find_target_files(paths); end - # source://rubocop//lib/rubocop/runner.rb#417 + # source://rubocop//lib/rubocop/runner.rb#418 def formatter_set; end - # source://rubocop//lib/rubocop/runner.rb#474 + # source://rubocop//lib/rubocop/runner.rb#475 def get_processed_source(file); end - # source://rubocop//lib/rubocop/runner.rb#345 + # source://rubocop//lib/rubocop/runner.rb#346 def inspect_file(processed_source, team = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/runner.rb#118 + # source://rubocop//lib/rubocop/runner.rb#119 def inspect_files(files); end - # source://rubocop//lib/rubocop/runner.rb#306 + # source://rubocop//lib/rubocop/runner.rb#307 def iterate_until_no_changes(source, offenses_by_iteration); end - # source://rubocop//lib/rubocop/runner.rb#151 + # source://rubocop//lib/rubocop/runner.rb#152 def list_files(paths); end # @return [Boolean] # - # source://rubocop//lib/rubocop/runner.rb#455 + # source://rubocop//lib/rubocop/runner.rb#456 def mark_as_safe_by_config?(config); end - # source://rubocop//lib/rubocop/runner.rb#463 + # source://rubocop//lib/rubocop/runner.rb#464 def minimum_severity_to_fail; end - # source://rubocop//lib/rubocop/runner.rb#367 + # source://rubocop//lib/rubocop/runner.rb#368 def mobilize_team(processed_source); end - # source://rubocop//lib/rubocop/runner.rb#372 + # source://rubocop//lib/rubocop/runner.rb#373 def mobilized_cop_classes(config); end - # source://rubocop//lib/rubocop/runner.rb#435 + # source://rubocop//lib/rubocop/runner.rb#436 def offenses_to_report(offenses); end - # source://rubocop//lib/rubocop/runner.rb#155 + # source://rubocop//lib/rubocop/runner.rb#156 def process_file(file); end - # source://rubocop//lib/rubocop/runner.rb#396 + # source://rubocop//lib/rubocop/runner.rb#397 def qualify_option_cop_names; end # @yield [cop] # - # source://rubocop//lib/rubocop/runner.rb#231 + # source://rubocop//lib/rubocop/runner.rb#232 def redundant_cop_disable_directive(file); end - # source://rubocop//lib/rubocop/runner.rb#265 + # source://rubocop//lib/rubocop/runner.rb#266 def save_in_cache(cache, offenses); end # A Cop::Team instance is stateful and may change when inspecting. @@ -57354,41 +57359,41 @@ class RuboCop::Runner # otherwise dormant team that can be used for config- and option- # level caching in ResultCache. # - # source://rubocop//lib/rubocop/runner.rb#502 + # source://rubocop//lib/rubocop/runner.rb#503 def standby_team(config); end # @return [Boolean] # - # source://rubocop//lib/rubocop/runner.rb#413 + # source://rubocop//lib/rubocop/runner.rb#414 def style_guide_cops_only?(config); end # @return [Boolean] # - # source://rubocop//lib/rubocop/runner.rb#447 + # source://rubocop//lib/rubocop/runner.rb#448 def supports_safe_autocorrect?(offense); end # @yield [team] # - # source://rubocop//lib/rubocop/runner.rb#214 + # source://rubocop//lib/rubocop/runner.rb#215 def team_for_redundant_disables(file, offenses, source); end # Warms up the RuboCop cache by forking a suitable number of RuboCop # instances that each inspects its allotted group of files. # - # source://rubocop//lib/rubocop/runner.rb#94 + # source://rubocop//lib/rubocop/runner.rb#95 def warm_cache(target_files); end class << self # @return [Array<#call>] # - # source://rubocop//lib/rubocop/runner.rb#32 + # source://rubocop//lib/rubocop/runner.rb#33 def ruby_extractors; end private # @return [#call] # - # source://rubocop//lib/rubocop/runner.rb#39 + # source://rubocop//lib/rubocop/runner.rb#40 def default_ruby_extractor; end end end @@ -57411,12 +57416,12 @@ end # @api private # -# source://rubocop//lib/rubocop/runner.rb#52 +# source://rubocop//lib/rubocop/runner.rb#53 RuboCop::Runner::MAX_ITERATIONS = T.let(T.unsafe(nil), Integer) # @api private # -# source://rubocop//lib/rubocop/runner.rb#55 +# source://rubocop//lib/rubocop/runner.rb#56 RuboCop::Runner::REDUNDANT_COP_DISABLE_DIRECTIVE_RULES = T.let(T.unsafe(nil), Array) # Take a string with embedded escapes, and convert the escapes as the Ruby From dc0ae18fddbeb16f26ef1b14f0b3a0a3e0452275 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Apr 2024 02:26:18 +0000 Subject: [PATCH 055/189] Bump test/fixtures/prism from `eeae958` to `6a2c499` Bumps [test/fixtures/prism](https://github.com/ruby/prism) from `eeae958` to `6a2c499`. - [Release notes](https://github.com/ruby/prism/releases) - [Commits](https://github.com/ruby/prism/compare/eeae95867505807d9f0b071bd81a32896a63f576...6a2c49990a0508235864a45e9a6f210068b92214) --- updated-dependencies: - dependency-name: test/fixtures/prism dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- test/fixtures/prism | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/fixtures/prism b/test/fixtures/prism index eeae958675..6a2c49990a 160000 --- a/test/fixtures/prism +++ b/test/fixtures/prism @@ -1 +1 @@ -Subproject commit eeae95867505807d9f0b071bd81a32896a63f576 +Subproject commit 6a2c49990a0508235864a45e9a6f210068b92214 From 3c01c48675b6d72493e04a3668d5f4e9dd2e3572 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Apr 2024 02:40:02 +0000 Subject: [PATCH 056/189] Bump the minor-and-patch group in /vscode with 2 updates Bumps the minor-and-patch group in /vscode with 2 updates: [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) and [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser). Updates `@typescript-eslint/eslint-plugin` from 7.7.0 to 7.7.1 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.7.1/packages/eslint-plugin) Updates `@typescript-eslint/parser` from 7.7.0 to 7.7.1 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.7.1/packages/parser) --- updated-dependencies: - dependency-name: "@typescript-eslint/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: "@typescript-eslint/parser" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] --- vscode/package.json | 4 +- vscode/yarn.lock | 100 ++++++++++++++++++++++---------------------- 2 files changed, 52 insertions(+), 52 deletions(-) diff --git a/vscode/package.json b/vscode/package.json index ed2583ce3e..24ebbf4086 100644 --- a/vscode/package.json +++ b/vscode/package.json @@ -536,8 +536,8 @@ "@types/node": "20.x", "@types/sinon": "^17.0.3", "@types/vscode": "^1.68.0", - "@typescript-eslint/eslint-plugin": "^7.7.0", - "@typescript-eslint/parser": "^7.7.0", + "@typescript-eslint/eslint-plugin": "^7.7.1", + "@typescript-eslint/parser": "^7.7.1", "@vscode/test-electron": "^2.3.9", "@vscode/vsce": "^2.26.0", "esbuild": "^0.20.2", diff --git a/vscode/yarn.lock b/vscode/yarn.lock index a5bb16d6ea..3369aedf19 100644 --- a/vscode/yarn.lock +++ b/vscode/yarn.lock @@ -749,16 +749,16 @@ semver "^7.5.4" ts-api-utils "^1.0.1" -"@typescript-eslint/eslint-plugin@^7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.7.0.tgz#bf34a02f221811505b8bf2f31060c8560c1bb0a3" - integrity sha512-GJWR0YnfrKnsRoluVO3PRb9r5aMZriiMMM/RHj5nnTrBy1/wIgk76XCtCKcnXGjpZQJQRFtGV9/0JJ6n30uwpQ== +"@typescript-eslint/eslint-plugin@^7.7.1": + version "7.7.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.7.1.tgz#50a9044e3e5fe76b22caf64fb7fc1f97614bdbfd" + integrity sha512-KwfdWXJBOviaBVhxO3p5TJiLpNuh2iyXyjmWN0f1nU87pwyvfS0EmjC6ukQVYVFJd/K1+0NWGPDXiyEyQorn0Q== dependencies: "@eslint-community/regexpp" "^4.10.0" - "@typescript-eslint/scope-manager" "7.7.0" - "@typescript-eslint/type-utils" "7.7.0" - "@typescript-eslint/utils" "7.7.0" - "@typescript-eslint/visitor-keys" "7.7.0" + "@typescript-eslint/scope-manager" "7.7.1" + "@typescript-eslint/type-utils" "7.7.1" + "@typescript-eslint/utils" "7.7.1" + "@typescript-eslint/visitor-keys" "7.7.1" debug "^4.3.4" graphemer "^1.4.0" ignore "^5.3.1" @@ -777,15 +777,15 @@ "@typescript-eslint/visitor-keys" "6.21.0" debug "^4.3.4" -"@typescript-eslint/parser@^7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.7.0.tgz#6b1b3ce76c5de002c43af8ae933613b0f2b4bcc6" - integrity sha512-fNcDm3wSwVM8QYL4HKVBggdIPAy9Q41vcvC/GtDobw3c4ndVT3K6cqudUmjHPw8EAp4ufax0o58/xvWaP2FmTg== +"@typescript-eslint/parser@^7.7.1": + version "7.7.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.7.1.tgz#f940e9f291cdca40c46cb75916217d3a42d6ceea" + integrity sha512-vmPzBOOtz48F6JAGVS/kZYk4EkXao6iGrD838sp1w3NQQC0W8ry/q641KU4PrG7AKNAf56NOcR8GOpH8l9FPCw== dependencies: - "@typescript-eslint/scope-manager" "7.7.0" - "@typescript-eslint/types" "7.7.0" - "@typescript-eslint/typescript-estree" "7.7.0" - "@typescript-eslint/visitor-keys" "7.7.0" + "@typescript-eslint/scope-manager" "7.7.1" + "@typescript-eslint/types" "7.7.1" + "@typescript-eslint/typescript-estree" "7.7.1" + "@typescript-eslint/visitor-keys" "7.7.1" debug "^4.3.4" "@typescript-eslint/scope-manager@5.62.0": @@ -804,13 +804,13 @@ "@typescript-eslint/types" "6.21.0" "@typescript-eslint/visitor-keys" "6.21.0" -"@typescript-eslint/scope-manager@7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.7.0.tgz#3f0db079b275bb8b0cb5be7613fb3130cfb5de77" - integrity sha512-/8INDn0YLInbe9Wt7dK4cXLDYp0fNHP5xKLHvZl3mOT5X17rK/YShXaiNmorl+/U4VKCVIjJnx4Ri5b0y+HClw== +"@typescript-eslint/scope-manager@7.7.1": + version "7.7.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.7.1.tgz#07fe59686ca843f66e3e2b5c151522bc38effab2" + integrity sha512-PytBif2SF+9SpEUKynYn5g1RHFddJUcyynGpztX3l/ik7KmZEv19WCMhUBkHXPU9es/VWGD3/zg3wg90+Dh2rA== dependencies: - "@typescript-eslint/types" "7.7.0" - "@typescript-eslint/visitor-keys" "7.7.0" + "@typescript-eslint/types" "7.7.1" + "@typescript-eslint/visitor-keys" "7.7.1" "@typescript-eslint/type-utils@6.21.0": version "6.21.0" @@ -822,13 +822,13 @@ debug "^4.3.4" ts-api-utils "^1.0.1" -"@typescript-eslint/type-utils@7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.7.0.tgz#36792ff4209a781b058de61631a48df17bdefbc5" - integrity sha512-bOp3ejoRYrhAlnT/bozNQi3nio9tIgv3U5C0mVDdZC7cpcQEDZXvq8inrHYghLVwuNABRqrMW5tzAv88Vy77Sg== +"@typescript-eslint/type-utils@7.7.1": + version "7.7.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.7.1.tgz#2f8094edca3bebdaad009008929df645ed9c8743" + integrity sha512-ZksJLW3WF7o75zaBPScdW1Gbkwhd/lyeXGf1kQCxJaOeITscoSl0MjynVvCzuV5boUz/3fOI06Lz8La55mu29Q== dependencies: - "@typescript-eslint/typescript-estree" "7.7.0" - "@typescript-eslint/utils" "7.7.0" + "@typescript-eslint/typescript-estree" "7.7.1" + "@typescript-eslint/utils" "7.7.1" debug "^4.3.4" ts-api-utils "^1.3.0" @@ -842,10 +842,10 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.21.0.tgz#205724c5123a8fef7ecd195075fa6e85bac3436d" integrity sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg== -"@typescript-eslint/types@7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.7.0.tgz#23af4d24bf9ce15d8d301236e3e3014143604f27" - integrity sha512-G01YPZ1Bd2hn+KPpIbrAhEWOn5lQBrjxkzHkWvP6NucMXFtfXoevK82hzQdpfuQYuhkvFDeQYbzXCjR1z9Z03w== +"@typescript-eslint/types@7.7.1": + version "7.7.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.7.1.tgz#f903a651fb004c75add08e4e9e207f169d4b98d7" + integrity sha512-AmPmnGW1ZLTpWa+/2omPrPfR7BcbUU4oha5VIbSbS1a1Tv966bklvLNXxp3mrbc+P2j4MNOTfDffNsk4o0c6/w== "@typescript-eslint/typescript-estree@5.62.0": version "5.62.0" @@ -874,13 +874,13 @@ semver "^7.5.4" ts-api-utils "^1.0.1" -"@typescript-eslint/typescript-estree@7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.7.0.tgz#b5dd6383b4c6a852d7b256a37af971e8982be97f" - integrity sha512-8p71HQPE6CbxIBy2kWHqM1KGrC07pk6RJn40n0DSc6bMOBBREZxSDJ+BmRzc8B5OdaMh1ty3mkuWRg4sCFiDQQ== +"@typescript-eslint/typescript-estree@7.7.1": + version "7.7.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.7.1.tgz#5cafde48fe390fe1c1b329b2ce0ba8a73c1e87b2" + integrity sha512-CXe0JHCXru8Fa36dteXqmH2YxngKJjkQLjxzoj6LYwzZ7qZvgsLSc+eqItCrqIop8Vl2UKoAi0StVWu97FQZIQ== dependencies: - "@typescript-eslint/types" "7.7.0" - "@typescript-eslint/visitor-keys" "7.7.0" + "@typescript-eslint/types" "7.7.1" + "@typescript-eslint/visitor-keys" "7.7.1" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" @@ -901,17 +901,17 @@ "@typescript-eslint/typescript-estree" "6.21.0" semver "^7.5.4" -"@typescript-eslint/utils@7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.7.0.tgz#3d2b6606a60ac34f3c625facfb3b3ab7e126f58d" - integrity sha512-LKGAXMPQs8U/zMRFXDZOzmMKgFv3COlxUQ+2NMPhbqgVm6R1w+nU1i4836Pmxu9jZAuIeyySNrN/6Rc657ggig== +"@typescript-eslint/utils@7.7.1": + version "7.7.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.7.1.tgz#5d161f2b4a55e1bc38b634bebb921e4bd4e4a16e" + integrity sha512-QUvBxPEaBXf41ZBbaidKICgVL8Hin0p6prQDu6bbetWo39BKbWJxRsErOzMNT1rXvTll+J7ChrbmMCXM9rsvOQ== dependencies: "@eslint-community/eslint-utils" "^4.4.0" "@types/json-schema" "^7.0.15" "@types/semver" "^7.5.8" - "@typescript-eslint/scope-manager" "7.7.0" - "@typescript-eslint/types" "7.7.0" - "@typescript-eslint/typescript-estree" "7.7.0" + "@typescript-eslint/scope-manager" "7.7.1" + "@typescript-eslint/types" "7.7.1" + "@typescript-eslint/typescript-estree" "7.7.1" semver "^7.6.0" "@typescript-eslint/utils@^5.10.0": @@ -944,12 +944,12 @@ "@typescript-eslint/types" "6.21.0" eslint-visitor-keys "^3.4.1" -"@typescript-eslint/visitor-keys@7.7.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.7.0.tgz#950148cf1ac11562a2d903fdf7acf76714a2dc9e" - integrity sha512-h0WHOj8MhdhY8YWkzIF30R379y0NqyOHExI9N9KCzvmu05EgG4FumeYa3ccfKUSphyWkWQE1ybVrgz/Pbam6YA== +"@typescript-eslint/visitor-keys@7.7.1": + version "7.7.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.7.1.tgz#da2294796220bb0f3b4add5ecbb1b9c3f4f65798" + integrity sha512-gBL3Eq25uADw1LQ9kVpf3hRM+DWzs0uZknHYK3hq4jcTPqVCClHGDnB6UUUV2SFeBeA4KWHWbbLqmbGcZ4FYbw== dependencies: - "@typescript-eslint/types" "7.7.0" + "@typescript-eslint/types" "7.7.1" eslint-visitor-keys "^3.4.3" "@ungap/structured-clone@^1.2.0": From f4bb4716c7d6967fe2fab0f54f7cf8559412f96f Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Mon, 29 Apr 2024 12:48:39 +0100 Subject: [PATCH 057/189] Restore removed platforms --- Gemfile.lock | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Gemfile.lock b/Gemfile.lock index eee0b9e529..e6f9041ce8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -122,6 +122,8 @@ GEM PLATFORMS arm64-darwin + x64-mingw-ucrt + x64-mingw32 x86_64-darwin x86_64-linux From 93056e21609dc1d7db024ac1ebe29aba0d3be0ff Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Mon, 29 Apr 2024 13:25:36 +0100 Subject: [PATCH 058/189] Update rubocop-sorbet to v0.8.3 --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index e6f9041ce8..f17c26c6b6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -78,7 +78,7 @@ GEM rubocop (~> 1.0) rubocop-shopify (2.15.1) rubocop (~> 1.51) - rubocop-sorbet (0.8.2) + rubocop-sorbet (0.8.3) rubocop (>= 0.90.0) ruby-progressbar (1.13.0) ruby2_keywords (0.0.5) From 18ba05b18e8945c67dd687deaf6a7552225a5f7b Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Mon, 29 Apr 2024 17:01:18 -0400 Subject: [PATCH 059/189] Support symbol procs in definition (#1982) --- lib/ruby_lsp/listeners/definition.rb | 23 +++++++++++++------ lib/ruby_lsp/requests/definition.rb | 2 +- test/requests/definition_expectations_test.rb | 10 ++++---- 3 files changed, 23 insertions(+), 12 deletions(-) diff --git a/lib/ruby_lsp/listeners/definition.rb b/lib/ruby_lsp/listeners/definition.rb index fefc3f0204..0757b5e2b8 100644 --- a/lib/ruby_lsp/listeners/definition.rb +++ b/lib/ruby_lsp/listeners/definition.rb @@ -30,6 +30,7 @@ def initialize(response_builder, global_state, uri, nesting, dispatcher, typeche dispatcher.register( self, :on_call_node_enter, + :on_block_argument_node_enter, :on_constant_read_node_enter, :on_constant_path_node_enter, ) @@ -42,10 +43,21 @@ def on_call_node_enter(node) if message == :require || message == :require_relative handle_require_definition(node) else - handle_method_definition(node) + handle_method_definition(message.to_s, self_receiver?(node)) end end + sig { params(node: Prism::BlockArgumentNode).void } + def on_block_argument_node_enter(node) + expression = node.expression + return unless expression.is_a?(Prism::SymbolNode) + + value = expression.value + return unless value + + handle_method_definition(value, false) + end + sig { params(node: Prism::ConstantPathNode).void } def on_constant_path_node_enter(node) name = constant_name(node) @@ -64,12 +76,9 @@ def on_constant_read_node_enter(node) private - sig { params(node: Prism::CallNode).void } - def handle_method_definition(node) - message = node.message - return unless message - - methods = if self_receiver?(node) + 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("::")) else # If the method doesn't have a receiver, then we provide a few candidates to jump to diff --git a/lib/ruby_lsp/requests/definition.rb b/lib/ruby_lsp/requests/definition.rb index a3b014a0b3..a3de7f4293 100644 --- a/lib/ruby_lsp/requests/definition.rb +++ b/lib/ruby_lsp/requests/definition.rb @@ -47,7 +47,7 @@ def initialize(document, global_state, position, dispatcher, typechecker_enabled target, parent, nesting = document.locate_node( position, - node_types: [Prism::CallNode, Prism::ConstantReadNode, Prism::ConstantPathNode], + node_types: [Prism::CallNode, Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::BlockArgumentNode], ) if target.is_a?(Prism::ConstantReadNode) && parent.is_a?(Prism::ConstantPathNode) diff --git a/test/requests/definition_expectations_test.rb b/test/requests/definition_expectations_test.rb index 36ba75a344..d8ca6b9870 100644 --- a/test/requests/definition_expectations_test.rb +++ b/test/requests/definition_expectations_test.rb @@ -407,6 +407,8 @@ def test_definition_precision_for_methods_with_block_arguments source = <<~RUBY class Foo def foo(&block); end + + def argument; end end bar.foo(&:argument) @@ -417,16 +419,16 @@ def foo(&block); end server.process_message( id: 1, method: "textDocument/definition", - params: { textDocument: { uri: uri }, position: { character: 12, line: 4 } }, + params: { textDocument: { uri: uri }, position: { character: 12, line: 6 } }, ) - assert_empty(server.pop_response.response) + assert_equal(3, server.pop_response.response.first.range.start.line) server.process_message( id: 1, method: "textDocument/definition", - params: { textDocument: { uri: uri }, position: { character: 4, line: 4 } }, + params: { textDocument: { uri: uri }, position: { character: 4, line: 6 } }, ) - refute_empty(server.pop_response.response) + assert_equal(1, server.pop_response.response.first.range.start.line) end end From 4e26ebbfde644d2143b2bbfa8c9c2231b5ba5b65 Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Tue, 30 Apr 2024 05:06:47 +0800 Subject: [PATCH 060/189] Update auto assign workflow to reflect team change (#1993) --- .github/workflows/auto_assign.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/auto_assign.yml b/.github/workflows/auto_assign.yml index 2d9ee28b38..4a0140c9c7 100644 --- a/.github/workflows/auto_assign.yml +++ b/.github/workflows/auto_assign.yml @@ -22,7 +22,6 @@ jobs: "dirceu", "paracycle", "vinistock", - "aryan-soni", "rafaelfranca", "Morriar", "st0012", @@ -35,7 +34,6 @@ jobs: const dxReviewers = [ "andyw8", "vinistock", - "aryan-soni", "st0012", ]; const assignee = dxReviewers[Math.floor(Math.random() * dxReviewers.length)]; From 722e4a8c8853d042253069a2002fd010a77a8a1c Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Tue, 30 Apr 2024 22:48:58 +0800 Subject: [PATCH 061/189] Improve version manager troubleshooting (#1992) * Move VERSION_MANAGERS.md to top-level * Add troubleshooting guide for asdf * Add intro to VERSION_MANAGERS.md * Update --- TROUBLESHOOTING.md | 6 +++++- vscode/VERSION_MANAGERS.md => VERSION_MANAGERS.md | 8 ++++++++ vscode/README.md | 2 +- vscode/src/ruby/custom.ts | 2 +- 4 files changed, 15 insertions(+), 3 deletions(-) rename vscode/VERSION_MANAGERS.md => VERSION_MANAGERS.md (74%) diff --git a/TROUBLESHOOTING.md b/TROUBLESHOOTING.md index 892b434bc5..83a1c789bd 100644 --- a/TROUBLESHOOTING.md +++ b/TROUBLESHOOTING.md @@ -131,11 +131,15 @@ Did it select your preferred version manager? You can define which version manag You can enable logging to the VS Code output tab, [as described in the CONTRIBUTING](CONTRIBUTING.md#tracing-lsp-requests-and-responses) docs. +### Environment activation failed + +We listed version manager related information and tips in this [documentation](VERSION_MANAGERS.md). + ### My preferred version manager is not supported We default to supporting the most common version managers, but that may not cover every single tool available. For these cases, we offer custom activation support. More context in the version manager -[documentation](https://github.com/Shopify/ruby-lsp/blob/main/vscode/VERSION_MANAGERS.md). +[documentation](VERSION_MANAGERS.md#custom-activation). ### Try to run the Ruby activation manually diff --git a/vscode/VERSION_MANAGERS.md b/VERSION_MANAGERS.md similarity index 74% rename from vscode/VERSION_MANAGERS.md rename to VERSION_MANAGERS.md index 22cb2239c8..5cba1927d6 100644 --- a/vscode/VERSION_MANAGERS.md +++ b/VERSION_MANAGERS.md @@ -1,3 +1,11 @@ +# Version Managers + +This document contains information and tips to help Ruby LSP's VS Code extension work with your Ruby version manager. + +## 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. + ## Chruby If you use `chruby` but don't have a `.ruby-version` file in the project root, you can add `.ruby-version` to its parent folder as a fallback. diff --git a/vscode/README.md b/vscode/README.md index eaf5b85474..55505d571e 100644 --- a/vscode/README.md +++ b/vscode/README.md @@ -100,7 +100,7 @@ default shell. > [!NOTE] > > For manager-specific notes, setting up custom activation for managers not listed above and community-contributed -> examples, please see [version managers](https://github.com/Shopify/ruby-lsp/blob/main/vscode/VERSION_MANAGERS.md). +> examples, please see [version managers](https://github.com/Shopify/ruby-lsp/blob/main/VERSION_MANAGERS.md). #### Configuring a formatter diff --git a/vscode/src/ruby/custom.ts b/vscode/src/ruby/custom.ts index 80cdcfa021..8996a41304 100644 --- a/vscode/src/ruby/custom.ts +++ b/vscode/src/ruby/custom.ts @@ -38,7 +38,7 @@ export class Custom extends VersionManager { if (customCommand === undefined) { throw new Error( "The customRubyCommand configuration must be set when 'custom' is selected as the version manager. \ - See the [README](https://github.com/Shopify/ruby-lsp/blob/main/vscode/VERSION_MANAGERS.md) for instructions.", + See the [README](https://github.com/Shopify/ruby-lsp/blob/main/VERSION_MANAGERS.md) for instructions.", ); } From b97e2a0085ca70710eb724963b3c75be8e721f7e Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Wed, 1 May 2024 12:53:06 -0400 Subject: [PATCH 062/189] Remove Sorbet sigs from docs (#1998) * Remove Sorbet sigs from docs * Remove # frozen_string_literal: true from docs --------- Co-authored-by: Andy Waite --- ADDONS.md | 22 ---------------------- CONTRIBUTING.md | 4 ---- vscode/README.md | 1 - 3 files changed, 27 deletions(-) diff --git a/ADDONS.md b/ADDONS.md index a988ed4579..fb7f3ac6ab 100644 --- a/ADDONS.md +++ b/ADDONS.md @@ -60,20 +60,15 @@ require "ruby_lsp/addon" module RubyLsp module MyGem class Addon < ::RubyLsp::Addon - extend T::Sig - # Performs any activation that needs to happen once when the language server is booted - sig { override.params(message_queue: Thread::Queue).void } def activate(message_queue) end # Performs any cleanup when shutting down the server, like terminating a subprocess - sig { override.void } def deactivate end # Returns the name of the addon - sig { override.returns(String) } def name "Ruby LSP My Gem" end @@ -136,31 +131,18 @@ following listener implementation. module RubyLsp module MyGem class Addon < ::RubyLsp::Addon - extend T::Sig - - sig { override.params(message_queue: Thread::Queue).void } def activate(message_queue) @message_queue = message_queue @config = SomeConfiguration.new end - sig { override.void } def deactivate end - sig { override.returns(String) } def name "Ruby LSP My Gem" end - sig do - override.params( - response_builder: ResponseBuilders::Hover, - nesting: T::Array[String], - index: RubyIndexer::Index, - dispatcher: Prism::Dispatcher, - ).void - end def create_hover_listener(response_builder, nesting, 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 @@ -168,8 +150,6 @@ module RubyLsp end class Hover - extend T::Sig - # The Requests::Support::Common module provides some helper methods you may find helpful. include Requests::Support::Common @@ -180,7 +160,6 @@ module RubyLsp # to this object, which will then build the Ruby LSP's response. # Additionally, listeners are instantiated with a message_queue to push notifications (not used in this example). # See "Sending notifications to the client" for more information. - sig { params(client: RailsClient, response_builder: ResponseBuilders::Hover, config: SomeConfiguration, dispatcher: Prism::Dispatcher).void } def initialize(client, response_builder, config, dispatcher) super(dispatcher) @@ -195,7 +174,6 @@ module RubyLsp # Listeners must define methods for each event they registered with the dispatcher. In this case, we have to # define `on_constant_read_node_enter` to specify what this listener should do every time we find a constant - sig { params(node: Prism::ConstantReadNode).void } def on_constant_read_node_enter(node) # Certain builders are made available to listeners to build LSP responses. The classes under `RubyLsp::ResponseBuilders` # are used to build responses conforming to the LSP Specification. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5fcdb551c1..ad429afa2a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -67,8 +67,6 @@ To add a new expectations test runner for a new request handler: - Add a new file under `test/requests/MY_REQUEST_expectations_test.rb` ```ruby -# frozen_string_literal: true - require "test_helper" require "expectations/expectations_test_runner" @@ -84,8 +82,6 @@ the base run and assert method to achieve the right behaviour. See `diagnostics_ example ```ruby -# frozen_string_literal: true - require "test_helper" require "expectations/expectations_test_runner" diff --git a/vscode/README.md b/vscode/README.md index 55505d571e..993bcc1015 100644 --- a/vscode/README.md +++ b/vscode/README.md @@ -151,7 +151,6 @@ Create a `Gemfile` for development tools inside that directory. ```ruby # the/directory/Gemfile -# frozen_string_literal: true source "https://rubygems.org" From 96c55414137989d8e700f0b4a5a35fbcc28bafba Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Wed, 1 May 2024 16:42:53 -0400 Subject: [PATCH 063/189] Add manual Ruby configuration (#1967) --- vscode/package.json | 4 + vscode/src/ruby.ts | 216 ++++++++++++++++++------- vscode/src/ruby/none.ts | 23 ++- vscode/src/rubyLsp.ts | 51 ++++-- vscode/src/status.ts | 2 +- vscode/src/test/suite/debugger.test.ts | 8 +- vscode/src/test/suite/ruby.test.ts | 12 +- vscode/src/test/suite/status.test.ts | 2 +- 8 files changed, 234 insertions(+), 84 deletions(-) diff --git a/vscode/package.json b/vscode/package.json index 24ebbf4086..d27576ada1 100644 --- a/vscode/package.json +++ b/vscode/package.json @@ -318,6 +318,10 @@ "description": "Ignores if the project uses a typechecker. Only intended to be used while working on the Ruby LSP itself", "type": "boolean", "default": false + }, + "rubyLsp.rubyExecutablePath": { + "description": "Path to the Ruby installation. This is used as a fallback if version manager activation fails", + "type": "string" } } }, diff --git a/vscode/src/ruby.ts b/vscode/src/ruby.ts index aaed867bf4..8ba6d502fe 100644 --- a/vscode/src/ruby.ts +++ b/vscode/src/ruby.ts @@ -101,80 +101,103 @@ export class Ruby implements RubyInterface { .get("rubyVersionManager")!, ) { this.versionManager = versionManager; + this._error = false; - // If the version manager is auto, discover the actual manager before trying to activate anything - if (this.versionManager.identifier === ManagerIdentifier.Auto) { - await this.discoverVersionManager(); - this.outputChannel.info( - `Discovered version manager ${this.versionManager.identifier}`, + const workspaceRubyPath = this.context.workspaceState.get< + string | undefined + >(`rubyLsp.workspaceRubyPath.${this.workspaceFolder.name}`); + + if (workspaceRubyPath) { + // If a workspace specific Ruby path is configured, then we use that to activate the environment + await this.runActivation( + new None(this.workspaceFolder, this.outputChannel, workspaceRubyPath), ); - } + } else { + // If the version manager is auto, discover the actual manager before trying to activate anything + if (this.versionManager.identifier === ManagerIdentifier.Auto) { + await this.discoverVersionManager(); + this.outputChannel.info( + `Discovered version manager ${this.versionManager.identifier}`, + ); + } - try { - switch (this.versionManager.identifier) { - case ManagerIdentifier.Asdf: - await this.runActivation( - new Asdf(this.workspaceFolder, this.outputChannel), - ); - break; - case ManagerIdentifier.Chruby: - await this.runActivation( - new Chruby(this.workspaceFolder, this.outputChannel), - ); - break; - case ManagerIdentifier.Rbenv: - await this.runActivation( - new Rbenv(this.workspaceFolder, this.outputChannel), - ); - break; - case ManagerIdentifier.Rvm: - await this.runActivation( - new Rvm(this.workspaceFolder, this.outputChannel), - ); - break; - case ManagerIdentifier.Mise: - await this.runActivation( - new Mise(this.workspaceFolder, this.outputChannel), - ); - break; - case ManagerIdentifier.RubyInstaller: - await this.runActivation( - new RubyInstaller(this.workspaceFolder, this.outputChannel), - ); - break; - case ManagerIdentifier.Custom: - await this.runActivation( - new Custom(this.workspaceFolder, this.outputChannel), - ); - break; - case ManagerIdentifier.None: - await this.runActivation( - new None(this.workspaceFolder, this.outputChannel), - ); - break; - default: + try { + await this.runManagerActivation(); + } catch (error: any) { + // If an error occurred and a global Ruby path is configured, then we can try to fallback to that + const globalRubyPath = vscode.workspace + .getConfiguration("rubyLsp") + .get("rubyExecutablePath"); + + if (globalRubyPath) { await this.runActivation( - new Shadowenv(this.workspaceFolder, this.outputChannel), + new None(this.workspaceFolder, this.outputChannel, globalRubyPath), ); - break; + } else { + this._error = true; + + // When running tests, we need to throw the error or else activation may silently fail and it's very difficult + // to debug + if (this.context.extensionMode === vscode.ExtensionMode.Test) { + throw error; + } + + await this.handleRubyError(error.message); + } } + } + if (!this.error) { this.fetchRubyVersionInfo(); await this.setupBundlePath(); - this._error = false; - } catch (error: any) { - this._error = true; + } + } - // When running tests, we need to throw the error or else activation may silently fail and it's very difficult to - // debug - if (this.context.extensionMode === vscode.ExtensionMode.Test) { - throw error; - } + async manuallySelectRuby() { + const manualSelection = await vscode.window.showInformationMessage( + "Configure global fallback or workspace specific Ruby?", + "global", + "workspace", + "clear previous workspace selection", + ); - await vscode.window.showErrorMessage( - `Failed to activate ${this.versionManager.identifier} environment: ${error.message}`, + if (!manualSelection) { + return; + } + + if (manualSelection === "clear previous workspace selection") { + await this.context.workspaceState.update( + `rubyLsp.workspaceRubyPath.${this.workspaceFolder.name}`, + undefined, ); + return this.activateRuby(); + } + + const selection = await vscode.window.showOpenDialog({ + title: `Select Ruby binary path for ${manualSelection} configuration`, + openLabel: "Select Ruby binary", + canSelectMany: false, + }); + + if (!selection) { + return; } + + const selectedPath = selection[0].fsPath; + + if (manualSelection === "global") { + await vscode.workspace + .getConfiguration("rubyLsp") + .update("rubyExecutablePath", selectedPath, true); + } else { + // We must update the cached Ruby path for this workspace if the user decided to change it + await this.context.workspaceState.update( + `rubyLsp.workspaceRubyPath.${this.workspaceFolder.name}`, + selectedPath, + ); + } + + return this.activateRuby(); } private async runActivation(manager: VersionManager) { @@ -230,6 +253,56 @@ export class Ruby implements RubyInterface { delete env.DEBUG; } + private async runManagerActivation() { + switch (this.versionManager.identifier) { + case ManagerIdentifier.Asdf: + await this.runActivation( + new Asdf(this.workspaceFolder, this.outputChannel), + ); + break; + case ManagerIdentifier.Chruby: + await this.runActivation( + new Chruby(this.workspaceFolder, this.outputChannel), + ); + break; + case ManagerIdentifier.Rbenv: + await this.runActivation( + new Rbenv(this.workspaceFolder, this.outputChannel), + ); + break; + case ManagerIdentifier.Rvm: + await this.runActivation( + new Rvm(this.workspaceFolder, this.outputChannel), + ); + break; + case ManagerIdentifier.Mise: + await this.runActivation( + new Mise(this.workspaceFolder, this.outputChannel), + ); + break; + case ManagerIdentifier.RubyInstaller: + await this.runActivation( + new RubyInstaller(this.workspaceFolder, this.outputChannel), + ); + break; + case ManagerIdentifier.Custom: + await this.runActivation( + new Custom(this.workspaceFolder, this.outputChannel), + ); + break; + case ManagerIdentifier.None: + await this.runActivation( + new None(this.workspaceFolder, this.outputChannel), + ); + break; + default: + await this.runActivation( + new Shadowenv(this.workspaceFolder, this.outputChannel), + ); + break; + } + } + private async setupBundlePath() { // Some users like to define a completely separate Gemfile for development tools. We allow them to use // `rubyLsp.bundleGemfile` to configure that and need to inject it into the environment @@ -322,4 +395,25 @@ export class Ruby implements RubyInterface { return false; } } + + private async handleRubyError(message: string) { + const answer = await vscode.window.showErrorMessage( + `Automatic Ruby environment activation with ${this.versionManager.identifier} failed: ${message}`, + "Retry", + "Select Ruby manually", + ); + + // If the user doesn't answer anything, we can just return. The error property was already set to true and we won't + // try to launch the LSP + if (!answer) { + return; + } + + // For retrying, reload the entire window to get rid of any state + if (answer === "Retry") { + await vscode.commands.executeCommand("workbench.action.reloadWindow"); + } + + return this.manuallySelectRuby(); + } } diff --git a/vscode/src/ruby/none.ts b/vscode/src/ruby/none.ts index c356d8d5a9..4e3f111699 100644 --- a/vscode/src/ruby/none.ts +++ b/vscode/src/ruby/none.ts @@ -1,5 +1,8 @@ /* eslint-disable no-process-env */ +import * as vscode from "vscode"; + import { asyncExec } from "../common"; +import { WorkspaceChannel } from "../workspaceChannel"; import { VersionManager, ActivationResult } from "./versionManager"; @@ -12,13 +15,27 @@ import { VersionManager, ActivationResult } from "./versionManager"; // If you don't have Ruby automatically available in your PATH and are not using a version manager, look into // configuring custom Ruby activation export class None extends VersionManager { + private readonly rubyPath: string; + + constructor( + workspaceFolder: vscode.WorkspaceFolder, + outputChannel: WorkspaceChannel, + rubyPath?: string, + ) { + super(workspaceFolder, outputChannel); + this.rubyPath = rubyPath ?? "ruby"; + } + async activate(): Promise { const activationScript = "STDERR.print({ env: ENV.to_h, yjit: !!defined?(RubyVM::YJIT), version: RUBY_VERSION }.to_json)"; - const result = await asyncExec(`ruby -W0 -rjson -e '${activationScript}'`, { - cwd: this.bundleUri.fsPath, - }); + const result = await asyncExec( + `${this.rubyPath} -W0 -rjson -e '${activationScript}'`, + { + cwd: this.bundleUri.fsPath, + }, + ); const parsedResult = JSON.parse(result.stderr); return { diff --git a/vscode/src/rubyLsp.ts b/vscode/src/rubyLsp.ts index cb458b8074..d64fa5f5e8 100644 --- a/vscode/src/rubyLsp.ts +++ b/vscode/src/rubyLsp.ts @@ -285,22 +285,43 @@ export class RubyLsp { vscode.commands.registerCommand( Command.SelectVersionManager, async () => { - const configuration = vscode.workspace.getConfiguration("rubyLsp"); - const managerConfig = - configuration.get("rubyVersionManager")!; - const options = Object.values(ManagerIdentifier); - const manager = (await vscode.window.showQuickPick(options, { - placeHolder: `Current: ${managerConfig.identifier}`, - })) as ManagerIdentifier | undefined; - - if (manager !== undefined) { - managerConfig.identifier = manager; - await configuration.update( - "rubyVersionManager", - managerConfig, - true, - ); + const answer = await vscode.window.showQuickPick( + ["Change version manager", "Change manual Ruby configuration"], + { placeHolder: "What would you like to do?" }, + ); + + if (!answer) { + return; + } + + if (answer === "Change version manager") { + const configuration = vscode.workspace.getConfiguration("rubyLsp"); + const managerConfig = + configuration.get("rubyVersionManager")!; + const options = Object.values(ManagerIdentifier); + const manager = (await vscode.window.showQuickPick(options, { + placeHolder: `Current: ${managerConfig.identifier}`, + })) as ManagerIdentifier | undefined; + + if (manager !== undefined) { + managerConfig.identifier = manager; + await configuration.update( + "rubyVersionManager", + managerConfig, + true, + ); + } + + return; } + + const workspace = await this.showWorkspacePick(); + + if (!workspace) { + return; + } + + await workspace.ruby.manuallySelectRuby(); }, ), vscode.commands.registerCommand( diff --git a/vscode/src/status.ts b/vscode/src/status.ts index 701c883336..773399a3bd 100644 --- a/vscode/src/status.ts +++ b/vscode/src/status.ts @@ -36,7 +36,7 @@ export class RubyVersionStatus extends StatusItem { this.item.name = "Ruby LSP Status"; this.item.command = { - title: "Change version manager", + title: "Configure", command: Command.SelectVersionManager, }; diff --git a/vscode/src/test/suite/debugger.test.ts b/vscode/src/test/suite/debugger.test.ts index 3fbd4ea51b..efa1338e59 100644 --- a/vscode/src/test/suite/debugger.test.ts +++ b/vscode/src/test/suite/debugger.test.ts @@ -190,7 +190,13 @@ suite("Debugger", () => { 'source "https://rubygems.org"\ngem "debug"', ); - const context = { subscriptions: [] } as unknown as vscode.ExtensionContext; + const context = { + subscriptions: [], + workspaceState: { + get: () => undefined, + update: () => undefined, + }, + } as unknown as vscode.ExtensionContext; const outputChannel = new WorkspaceChannel("fake", LOG_CHANNEL); const workspaceFolder: vscode.WorkspaceFolder = { uri: vscode.Uri.file(tmpPath), diff --git a/vscode/src/test/suite/ruby.test.ts b/vscode/src/test/suite/ruby.test.ts index 8c9ab62d2c..7da73e64cd 100644 --- a/vscode/src/test/suite/ruby.test.ts +++ b/vscode/src/test/suite/ruby.test.ts @@ -40,7 +40,11 @@ suite("Ruby environment activation", () => { const context = { extensionMode: vscode.ExtensionMode.Test, - } as vscode.ExtensionContext; + workspaceState: { + get: () => undefined, + update: () => undefined, + }, + } as unknown as vscode.ExtensionContext; const outputChannel = new WorkspaceChannel("fake", LOG_CHANNEL); const ruby = new Ruby(context, workspaceFolder, outputChannel); @@ -77,7 +81,11 @@ suite("Ruby environment activation", () => { const context = { extensionMode: vscode.ExtensionMode.Test, - } as vscode.ExtensionContext; + workspaceState: { + get: () => undefined, + update: () => undefined, + }, + } as unknown as vscode.ExtensionContext; const outputChannel = new WorkspaceChannel("fake", LOG_CHANNEL); const ruby = new Ruby(context, workspaceFolder, outputChannel); diff --git a/vscode/src/test/suite/status.test.ts b/vscode/src/test/suite/status.test.ts index 1ba43bda86..a15270a391 100644 --- a/vscode/src/test/suite/status.test.ts +++ b/vscode/src/test/suite/status.test.ts @@ -49,7 +49,7 @@ suite("StatusItems", () => { test("Status is initialized with the right values", () => { assert.strictEqual(status.item.text, "Using Ruby 3.2.0 with shadowenv"); assert.strictEqual(status.item.name, "Ruby LSP Status"); - assert.strictEqual(status.item.command?.title, "Change version manager"); + assert.strictEqual(status.item.command?.title, "Configure"); assert.strictEqual( status.item.command.command, Command.SelectVersionManager, From f6f42b163d72459a9be682b1e07769af39f1ecc4 Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Wed, 1 May 2024 16:46:32 -0400 Subject: [PATCH 064/189] Allow configuring extra chruby paths (#1976) --- vscode/package.json | 4 ++++ vscode/src/ruby/chruby.ts | 21 +++++++++++++++++++- vscode/src/test/suite/ruby/chruby.test.ts | 24 +++++++++++++++++++++++ 3 files changed, 48 insertions(+), 1 deletion(-) diff --git a/vscode/package.json b/vscode/package.json index d27576ada1..4d7b809db3 100644 --- a/vscode/package.json +++ b/vscode/package.json @@ -253,6 +253,10 @@ "miseExecutablePath": { "description": "The path to the Mise executable, if not installed in ~/.local/bin/mise", "type": "string" + }, + "chrubyRubies": { + "description": "An array of extra directories to search for Ruby installations when using chruby. Equivalent to the RUBIES environment variable", + "type": "array" } }, "default": { diff --git a/vscode/src/ruby/chruby.ts b/vscode/src/ruby/chruby.ts index 6f863de741..1d6ac0e248 100644 --- a/vscode/src/ruby/chruby.ts +++ b/vscode/src/ruby/chruby.ts @@ -5,6 +5,7 @@ import path from "path"; import * as vscode from "vscode"; import { asyncExec } from "../common"; +import { WorkspaceChannel } from "../workspaceChannel"; import { ActivationResult, VersionManager } from "./versionManager"; @@ -22,6 +23,23 @@ export class Chruby extends VersionManager { vscode.Uri.joinPath(vscode.Uri.file(os.homedir()), ".rubies"), ]; + constructor( + workspaceFolder: vscode.WorkspaceFolder, + outputChannel: WorkspaceChannel, + ) { + super(workspaceFolder, outputChannel); + + const configuredRubies = vscode.workspace + .getConfiguration("rubyLsp") + .get("rubyVersionManager.chrubyRubies"); + + if (configuredRubies) { + this.rubyInstallationUris.push( + ...configuredRubies.map((path) => vscode.Uri.file(path)), + ); + } + } + async activate(): Promise { const versionInfo = await this.discoverRubyVersion(); const rubyUri = await this.findRubyUri(versionInfo); @@ -72,7 +90,8 @@ export class Chruby extends VersionManager { } throw new Error( - `Cannot find installation directory for Ruby version ${possibleVersionNames.join(" or ")}`, + `Cannot find installation directory for Ruby version ${possibleVersionNames.join(" or ")}. + Searched in ${this.rubyInstallationUris.map((uri) => uri.fsPath).join(", ")}`, ); } diff --git a/vscode/src/test/suite/ruby/chruby.test.ts b/vscode/src/test/suite/ruby/chruby.test.ts index cd4cd8add5..30bc0ec307 100644 --- a/vscode/src/test/suite/ruby/chruby.test.ts +++ b/vscode/src/test/suite/ruby/chruby.test.ts @@ -6,6 +6,7 @@ import os from "os"; import { before, after } from "mocha"; import * as vscode from "vscode"; +import sinon from "sinon"; import { Chruby } from "../../../ruby/chruby"; import { WorkspaceChannel } from "../../../workspaceChannel"; @@ -157,4 +158,27 @@ suite("Chruby", () => { assert.strictEqual(version, RUBY_VERSION); assert.notStrictEqual(yjit, undefined); }); + + test("Finds Ruby when extra RUBIES are configured", async () => { + fs.writeFileSync(path.join(workspacePath, ".ruby-version"), RUBY_VERSION); + + const configStub = sinon + .stub(vscode.workspace, "getConfiguration") + .returns({ + get: (name: string) => + name === "rubyVersionManager.chrubyRubies" + ? [path.join(rootPath, "opt", "rubies")] + : "", + } as any); + + const chruby = new Chruby(workspaceFolder, outputChannel); + configStub.restore(); + + 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); + }); }); From 1475a6c56772df102fdcd21633509bf23c9c1602 Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Thu, 2 May 2024 10:32:41 -0400 Subject: [PATCH 065/189] Log invalid JSON environment (#2000) --- vscode/src/ruby/asdf.ts | 2 +- vscode/src/ruby/chruby.ts | 2 +- vscode/src/ruby/custom.ts | 2 +- vscode/src/ruby/mise.ts | 2 +- vscode/src/ruby/none.ts | 2 +- vscode/src/ruby/rbenv.ts | 2 +- vscode/src/ruby/rvm.ts | 2 +- vscode/src/ruby/shadowenv.ts | 2 +- vscode/src/ruby/versionManager.ts | 12 +++++++ vscode/src/test/suite/ruby/rbenv.test.ts | 43 ++++++++++++++++++++++++ 10 files changed, 63 insertions(+), 8 deletions(-) diff --git a/vscode/src/ruby/asdf.ts b/vscode/src/ruby/asdf.ts index 5262254b9e..8c83ed2769 100644 --- a/vscode/src/ruby/asdf.ts +++ b/vscode/src/ruby/asdf.ts @@ -30,7 +30,7 @@ export class Asdf extends VersionManager { }, ); - const parsedResult = JSON.parse(result.stderr); + 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 diff --git a/vscode/src/ruby/chruby.ts b/vscode/src/ruby/chruby.ts index 1d6ac0e248..99ab5e1fd3 100644 --- a/vscode/src/ruby/chruby.ts +++ b/vscode/src/ruby/chruby.ts @@ -164,6 +164,6 @@ export class Chruby extends VersionManager { { cwd: this.bundleUri.fsPath }, ); - return JSON.parse(result.stderr); + return this.parseWithErrorHandling(result.stderr); } } diff --git a/vscode/src/ruby/custom.ts b/vscode/src/ruby/custom.ts index 8996a41304..f81b420469 100644 --- a/vscode/src/ruby/custom.ts +++ b/vscode/src/ruby/custom.ts @@ -22,7 +22,7 @@ export class Custom extends VersionManager { }, ); - const parsedResult = JSON.parse(result.stderr); + const parsedResult = this.parseWithErrorHandling(result.stderr); return { env: { ...process.env, ...parsedResult.env }, yjit: parsedResult.yjit, diff --git a/vscode/src/ruby/mise.ts b/vscode/src/ruby/mise.ts index 9059098d63..c9a142a0b6 100644 --- a/vscode/src/ruby/mise.ts +++ b/vscode/src/ruby/mise.ts @@ -25,7 +25,7 @@ export class Mise extends VersionManager { }, ); - const parsedResult = JSON.parse(result.stderr); + const parsedResult = this.parseWithErrorHandling(result.stderr); return { env: { ...process.env, ...parsedResult.env }, yjit: parsedResult.yjit, diff --git a/vscode/src/ruby/none.ts b/vscode/src/ruby/none.ts index 4e3f111699..729ec6b3e6 100644 --- a/vscode/src/ruby/none.ts +++ b/vscode/src/ruby/none.ts @@ -37,7 +37,7 @@ export class None extends VersionManager { }, ); - const parsedResult = JSON.parse(result.stderr); + const parsedResult = this.parseWithErrorHandling(result.stderr); return { env: { ...process.env, ...parsedResult.env }, yjit: parsedResult.yjit, diff --git a/vscode/src/ruby/rbenv.ts b/vscode/src/ruby/rbenv.ts index bbc510a825..8b5ae160ab 100644 --- a/vscode/src/ruby/rbenv.ts +++ b/vscode/src/ruby/rbenv.ts @@ -19,7 +19,7 @@ export class Rbenv extends VersionManager { }, ); - const parsedResult = JSON.parse(result.stderr); + const parsedResult = this.parseWithErrorHandling(result.stderr); return { env: { ...process.env, ...parsedResult.env }, diff --git a/vscode/src/ruby/rvm.ts b/vscode/src/ruby/rvm.ts index a41d70ebe4..220fd83988 100644 --- a/vscode/src/ruby/rvm.ts +++ b/vscode/src/ruby/rvm.ts @@ -25,7 +25,7 @@ export class Rvm extends VersionManager { }, ); - const parsedResult = JSON.parse(result.stderr); + const parsedResult = this.parseWithErrorHandling(result.stderr); const activatedKeys = Object.entries(parsedResult.env) .map(([key, value]) => `${key}=${value}`) .join(" "); diff --git a/vscode/src/ruby/shadowenv.ts b/vscode/src/ruby/shadowenv.ts index a5447b6f7b..d9224aabf3 100644 --- a/vscode/src/ruby/shadowenv.ts +++ b/vscode/src/ruby/shadowenv.ts @@ -33,7 +33,7 @@ export class Shadowenv extends VersionManager { }, ); - const parsedResult = JSON.parse(result.stderr); + const parsedResult = this.parseWithErrorHandling(result.stderr); return { env: { ...process.env, ...parsedResult.env }, yjit: parsedResult.yjit, diff --git a/vscode/src/ruby/versionManager.ts b/vscode/src/ruby/versionManager.ts index d674133a1d..8a8d6b392a 100644 --- a/vscode/src/ruby/versionManager.ts +++ b/vscode/src/ruby/versionManager.ts @@ -42,4 +42,16 @@ export abstract class VersionManager { // Activate the Ruby environment for the version manager, returning all of the necessary information to boot the // language server abstract activate(): Promise; + + protected parseWithErrorHandling(json: string) { + try { + return JSON.parse(json); + } catch (error: any) { + this.outputChannel.error( + `Tried parsing invalid JSON environment: ${json}`, + ); + + throw error; + } + } } diff --git a/vscode/src/test/suite/ruby/rbenv.test.ts b/vscode/src/test/suite/ruby/rbenv.test.ts index b900c09d99..51d4c0adee 100644 --- a/vscode/src/test/suite/ruby/rbenv.test.ts +++ b/vscode/src/test/suite/ruby/rbenv.test.ts @@ -53,4 +53,47 @@ suite("Rbenv", () => { assert.strictEqual(env.ANY, "true"); execStub.restore(); }); + + test("Reports invalid JSON environments", 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 rbenv = new Rbenv(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: "not a json", + }); + + const errorStub = sinon.stub(outputChannel, "error"); + + await assert.rejects( + rbenv.activate(), + "SyntaxError: Unexpected token 'o', \"not a json\" is not valid JSON", + ); + + assert.ok( + execStub.calledOnceWithExactly( + `rbenv exec ruby -W0 -rjson -e '${activationScript}'`, + { cwd: workspacePath }, + ), + ); + + assert.ok( + errorStub.calledOnceWithExactly( + "Tried parsing invalid JSON environment: not a json", + ), + ); + + execStub.restore(); + errorStub.restore(); + }); }); From a90f39d3699466656314c8e0492990d834b3ef3e Mon Sep 17 00:00:00 2001 From: Earlopain <14981592+Earlopain@users.noreply.github.com> Date: Thu, 2 May 2024 16:55:49 +0200 Subject: [PATCH 066/189] Document how addons can listen for file changes (#1972) --- ADDONS.md | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/ADDONS.md b/ADDONS.md index fb7f3ac6ab..d6074ef0f8 100644 --- a/ADDONS.md +++ b/ADDONS.md @@ -279,6 +279,62 @@ module RubyLsp end ``` +### Registering for file update events + +By default, the Ruby LSP listens for changes to files ending in `.rb` to continuously update its index when Ruby source +code is modified. If your addon uses a tool that is configured through a file (like RuboCop and its `.rubocop.yml`) +you can register for changes to these files and react when the configuration changes. + +**Note**: you will receive events from `ruby-lsp` and other addons as well, in addition to your own registered ones. + + +```ruby +module RubyLsp + module MyGem + class Addon < ::RubyLsp::Addon + def activate(global_state, message_queue) + register_additional_file_watchers(global_state, message_queue) + end + + def deactivate; end + + def register_additional_file_watchers(global_state, message_queue) + # Clients are not required to implement this capability + return unless global_state.supports_watching_files + + message_queue << Request.new( + id: "ruby-lsp-my-gem-file-watcher", + method: "client/registerCapability", + params: Interface::RegistrationParams.new( + registrations: [ + Interface::Registration.new( + id: "workspace/didChangeWatchedFilesMyGem", + method: "workspace/didChangeWatchedFiles", + register_options: Interface::DidChangeWatchedFilesRegistrationOptions.new( + watchers: [ + Interface::FileSystemWatcher.new( + glob_pattern: "**/.my-config.yml", + kind: Constant::WatchKind::CREATE | Constant::WatchKind::CHANGE | Constant::WatchKind::DELETE, + ), + ], + ), + ), + ], + ), + ) + end + + + def workspace_did_change_watched_files(changes) + if changes.any? { |change| change[:uri].end_with?(".my-config.yml") } + # Do something to reload the config here + end + end + end + end +end +``` + ### Ensuring consistent documentation The Ruby LSP exports a Rake task to help authors make sure all of their listeners are documented and include demos and From c1d4b7b2ebf53786d1345e7fbd7f5aa87b91b377 Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Thu, 2 May 2024 11:05:04 -0400 Subject: [PATCH 067/189] Bump extension version to v0.5.21 --- vscode/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vscode/package.json b/vscode/package.json index 4d7b809db3..cbbae33342 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.20", + "version": "0.5.21", "publisher": "Shopify", "repository": { "type": "git", From 6d5b1e4c5ff02f2f061b5da5185511645337537a Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Thu, 2 May 2024 11:44:34 -0400 Subject: [PATCH 068/189] Fix markdown syntax for docs (#2002) Co-authored-by: Andy Waite --- lib/ruby_lsp/requests/completion.rb | 1 + lib/ruby_lsp/requests/definition.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/ruby_lsp/requests/completion.rb b/lib/ruby_lsp/requests/completion.rb index 1620875ee3..2ceda099a4 100644 --- a/lib/ruby_lsp/requests/completion.rb +++ b/lib/ruby_lsp/requests/completion.rb @@ -11,6 +11,7 @@ module Requests # suggests possible completions according to what the developer is typing. # # Currently supported targets: + # # - Classes # - Modules # - Constants diff --git a/lib/ruby_lsp/requests/definition.rb b/lib/ruby_lsp/requests/definition.rb index a3de7f4293..a24b84819c 100644 --- a/lib/ruby_lsp/requests/definition.rb +++ b/lib/ruby_lsp/requests/definition.rb @@ -12,6 +12,7 @@ module Requests # definition of the symbol under the cursor. # # Currently supported targets: + # # - Classes # - Modules # - Constants From 94194d8f8ee3feff23d2f3d99bebdb5f3a733074 Mon Sep 17 00:00:00 2001 From: Earlopain <14981592+Earlopain@users.noreply.github.com> Date: Thu, 2 May 2024 20:16:40 +0200 Subject: [PATCH 069/189] Add `rubocop-md` to lint markdown snippets with Ruby code (#2003) --- .rubocop.yml | 2 ++ ADDONS.md | 13 +++++++------ DESIGN_AND_ROADMAP.md | 2 +- Gemfile | 1 + Gemfile.lock | 3 +++ 5 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index b57b6afe6a..36a502e575 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -3,6 +3,7 @@ inherit_gem: require: - rubocop-sorbet + - rubocop-md - rubocop-minitest - rubocop-rake - ./lib/rubocop/cop/ruby_lsp/use_language_server_aliases @@ -15,6 +16,7 @@ AllCops: - "sorbet/rbi/shims/**/*.rbi" Exclude: - "vendor/**/*" + - "vscode/**/*" - "features/**/*" - "test/fixtures/**/*" - "test/expectations/**/*" diff --git a/ADDONS.md b/ADDONS.md index d6074ef0f8..219473cbab 100644 --- a/ADDONS.md +++ b/ADDONS.md @@ -148,6 +148,7 @@ module RubyLsp # pre-computed information in the addon. These factory methods are invoked on every request Hover.new(client, response_builder, @config, dispatcher) end + end class Hover # The Requests::Support::Common module provides some helper methods you may find helpful. @@ -175,9 +176,10 @@ module RubyLsp # Listeners must define methods for each event they registered with the dispatcher. In this case, we have to # define `on_constant_read_node_enter` to specify what this listener should do every time we find a constant def on_constant_read_node_enter(node) - # Certain builders are made available to listeners to build LSP responses. The classes under `RubyLsp::ResponseBuilders` - # are used to build responses conforming to the LSP Specification. - # ResponseBuilders::Hover itself also requires a content category to be specified (title, links, or documentation). + # Certain builders are made available to listeners to build LSP responses. The classes under + # `RubyLsp::ResponseBuilders` are used to build responses conforming to the LSP Specification. + # ResponseBuilders::Hover itself also requires a content category to be specified (title, links, + # or documentation). @response_builder.push("Hello!", category: :documentation) end end @@ -271,7 +273,7 @@ module RubyLsp params: Interface::ProgressParams.new( token: "progress-token-id", value: Interface::WorkDoneProgressBegin.new(kind: "begin", title: "Starting slow work!"), - ) + ), ) end end @@ -324,7 +326,6 @@ module RubyLsp ) end - def workspace_did_change_watched_files(changes) if changes.any? { |change| change[:uri].end_with?(".my-config.yml") } # Do something to reload the config here @@ -348,7 +349,7 @@ require "ruby_lsp/check_docs" # The second argument is the file list of GIF files with the demos of all listeners RubyLsp::CheckDocs.new( FileList["#{__dir__}/lib/ruby_lsp/ruby_lsp_rails/**/*.rb"], - FileList.new("#{__dir__}/misc/**/*.gif") + FileList.new("#{__dir__}/misc/**/*.gif"), ) ``` diff --git a/DESIGN_AND_ROADMAP.md b/DESIGN_AND_ROADMAP.md index 2ccb1dd5bb..6bea316c8d 100644 --- a/DESIGN_AND_ROADMAP.md +++ b/DESIGN_AND_ROADMAP.md @@ -77,7 +77,7 @@ long term roadmap to see what’s planned "".upcase 1.to_s {}.merge!({ a: 1 }) -[].concat([]) +[].push(1) ## Scenarios where can assume the receiver type class Foo diff --git a/Gemfile b/Gemfile index bff1999f4f..27d8f0fc86 100644 --- a/Gemfile +++ b/Gemfile @@ -13,6 +13,7 @@ group :development do gem "psych", "~> 5.1", require: false gem "rake", "~> 13.2" gem "rdoc", require: false, github: "Shopify/rdoc", branch: "create_snapper_generator" + gem "rubocop-md", "~> 1.2.0", require: false gem "rubocop-minitest", "~> 0.35.0", require: false gem "rubocop-rake", "~> 0.6.0", require: false gem "rubocop-shopify", "~> 2.15", require: false diff --git a/Gemfile.lock b/Gemfile.lock index f17c26c6b6..ac953cb7de 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -71,6 +71,8 @@ GEM unicode-display_width (>= 2.4.0, < 3.0) rubocop-ast (1.31.2) parser (>= 3.3.0.4) + rubocop-md (1.2.2) + rubocop (>= 1.0) rubocop-minitest (0.35.0) rubocop (>= 1.61, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) @@ -137,6 +139,7 @@ DEPENDENCIES rake (~> 13.2) rdoc! rubocop (~> 1.63) + rubocop-md (~> 1.2.0) rubocop-minitest (~> 0.35.0) rubocop-rake (~> 0.6.0) rubocop-shopify (~> 2.15) From 2a7bc10340dc69fa1ec31b787c047761157ba48b Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Thu, 2 May 2024 16:24:25 -0400 Subject: [PATCH 070/189] Allow omitting patch in .ruby-version (#2004) --- vscode/src/ruby/chruby.ts | 100 ++++++++++++++++------ vscode/src/test/suite/ruby/chruby.test.ts | 35 ++++++++ 2 files changed, 107 insertions(+), 28 deletions(-) diff --git a/vscode/src/ruby/chruby.ts b/vscode/src/ruby/chruby.ts index 99ab5e1fd3..55763ee3f5 100644 --- a/vscode/src/ruby/chruby.ts +++ b/vscode/src/ruby/chruby.ts @@ -43,7 +43,7 @@ export class Chruby extends VersionManager { async activate(): Promise { const versionInfo = await this.discoverRubyVersion(); const rubyUri = await this.findRubyUri(versionInfo); - const { defaultGems, gemHome, yjit } = + const { defaultGems, gemHome, yjit, version } = await this.runActivationScript(rubyUri); this.outputChannel.info( @@ -62,12 +62,51 @@ export class Chruby extends VersionManager { return { env: { ...process.env, ...rubyEnv }, yjit, - version: versionInfo.version, + version, }; } // Returns the full URI to the Ruby executable protected async findRubyUri(rubyVersion: RubyVersion): Promise { + if (/\d+\.\d+\.\d+/.exec(rubyVersion.version)) { + return this.findRubyUriForCompleteVersion(rubyVersion); + } + + return this.findRubyUriWithOmittedPatch(rubyVersion); + } + + private async findRubyUriWithOmittedPatch( + rubyVersion: RubyVersion, + ): Promise { + const possibleVersionNames = rubyVersion.engine + ? [`${rubyVersion.engine}-${rubyVersion.version}`, rubyVersion.version] + : [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]), + ); + + for (const versionName of possibleVersionNames) { + const targetDirectory = directories.find(([name]) => + name.startsWith(versionName), + ); + + if (targetDirectory) { + return vscode.Uri.joinPath(uri, targetDirectory[0], "bin", "ruby"); + } + } + } + + throw new Error( + `Cannot find installation directory for Ruby version ${possibleVersionNames.join(" or ")}. + Searched in ${this.rubyInstallationUris.map((uri) => uri.fsPath).join(", ")}`, + ); + } + + private async findRubyUriForCompleteVersion( + rubyVersion: RubyVersion, + ): Promise { // If an engine was specified in the .ruby-version file, we favor looking for that first and also try just the // version number. If no engine was specified, we first try just the version number and then we try using `ruby` as // the default engine @@ -99,46 +138,51 @@ export class Chruby extends VersionManager { private async discoverRubyVersion(): Promise { let uri = this.bundleUri; const root = path.parse(uri.fsPath).root; + let version: string; + let rubyVersionUri: vscode.Uri; while (uri.fsPath !== root) { try { - const rubyVersionUri = vscode.Uri.joinPath(uri, ".ruby-version"); + rubyVersionUri = vscode.Uri.joinPath(uri, ".ruby-version"); const content = await vscode.workspace.fs.readFile(rubyVersionUri); - const version = content.toString().trim(); - - if (version === "") { - throw new Error(`Ruby version file ${rubyVersionUri} is empty`); - } - - const match = - /((?[A-Za-z]+)-)?(?\d\.\d\.\d(-[A-Za-z0-9]+)?)/.exec( - version, - ); - - if (!match?.groups) { - throw new Error( - `Ruby version file ${rubyVersionUri} contains invalid format. Expected (engine-)?version, got ${version}`, - ); - } - - this.outputChannel.info( - `Discovered Ruby version ${version} from ${rubyVersionUri.toString()}`, - ); - return { engine: match.groups.engine, version: match.groups.version }; + version = content.toString().trim(); } catch (error: any) { // If the file doesn't exist, continue going up the directory tree uri = vscode.Uri.file(path.dirname(uri.fsPath)); continue; } + + if (version === "") { + throw new Error(`Ruby version file ${rubyVersionUri} is empty`); + } + + const match = + /((?[A-Za-z]+)-)?(?\d+\.\d+(\.\d+)?(-[A-Za-z0-9]+)?)/.exec( + version, + ); + + if (!match?.groups) { + throw new Error( + `Ruby version file ${rubyVersionUri} contains invalid format. Expected (engine-)?version, got ${version}`, + ); + } + + this.outputChannel.info( + `Discovered Ruby version ${version} from ${rubyVersionUri.toString()}`, + ); + return { engine: match.groups.engine, version: match.groups.version }; } throw new Error("No .ruby-version file was found"); } // Run the activation script using the Ruby installation we found so that we can discover gem paths - private async runActivationScript( - rubyExecutableUri: vscode.Uri, - ): Promise<{ defaultGems: string; gemHome: string; yjit: boolean }> { + private async runActivationScript(rubyExecutableUri: vscode.Uri): Promise<{ + defaultGems: string; + gemHome: string; + yjit: boolean; + version: string; + }> { // Typically, GEM_HOME points to $HOME/.gem/ruby/version_without_patch. For example, for Ruby 3.2.2, it would be // $HOME/.gem/ruby/3.2.0. However, chruby overrides GEM_HOME to use the patch part of the version, resulting in // $HOME/.gem/ruby/3.2.2. In our activation script, we check if a directory using the patch exists and then prefer @@ -155,7 +199,7 @@ export class Chruby extends VersionManager { "end", "newer_gem_home = File.join(File.dirname(user_dir), RUBY_VERSION)", "gems = (Dir.exist?(newer_gem_home) ? newer_gem_home : user_dir)", - "data = { defaultGems: Gem.default_dir, gemHome: gems, yjit: !!defined?(RubyVM::YJIT) }", + "data = { defaultGems: Gem.default_dir, gemHome: gems, yjit: !!defined?(RubyVM::YJIT), version: RUBY_VERSION }", "STDERR.print(JSON.dump(data))", ].join(";"); diff --git a/vscode/src/test/suite/ruby/chruby.test.ts b/vscode/src/test/suite/ruby/chruby.test.ts index 30bc0ec307..80d7df5049 100644 --- a/vscode/src/test/suite/ruby/chruby.test.ts +++ b/vscode/src/test/suite/ruby/chruby.test.ts @@ -135,6 +135,10 @@ suite("Chruby", () => { assert.match(env.GEM_PATH!, new RegExp(`lib/ruby/gems/${VERSION_REGEX}`)); assert.strictEqual(version, RUBY_VERSION); assert.notStrictEqual(yjit, undefined); + fs.rmSync(path.join(rootPath, "opt", "rubies", `${RUBY_VERSION}-custom`), { + recursive: true, + force: true, + }); }); test("Considers Ruby as the default engine if missing", async () => { @@ -181,4 +185,35 @@ suite("Chruby", () => { assert.strictEqual(version, RUBY_VERSION); assert.notStrictEqual(yjit, undefined); }); + + test("Finds Ruby when .ruby-version omits 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, "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); + + fs.rmSync(path.join(rootPath, "opt", "rubies", `${major}.${minor}.0`), { + recursive: true, + force: true, + }); + }); }); From 7e3af51a60807c8feb4662417c7cd1a513e438b4 Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Fri, 3 May 2024 04:45:35 +0800 Subject: [PATCH 071/189] Add --time-index flag for timing index (#2005) --- exe/ruby-lsp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/exe/ruby-lsp b/exe/ruby-lsp index f3a93c2e5a..bf56654e90 100755 --- a/exe/ruby-lsp +++ b/exe/ruby-lsp @@ -18,6 +18,10 @@ parser = OptionParser.new do |opts| options[:debug] = true end + opts.on("--time-index", "Measure the time it takes to index the project") do + options[:time_index] = true + end + opts.on( "--branch [BRANCH]", "Launch the Ruby LSP using the specified branch rather than the release version", @@ -90,4 +94,14 @@ if options[:debug] end end +if options[:time_index] + require "benchmark" + + index = RubyIndexer::Index.new + + result = Benchmark.realtime { index.index_all } + puts "Ruby LSP v#{RubyLsp::VERSION}: Indexing took #{result.round(5)} seconds" + return +end + RubyLsp::Server.new.start From 55e36dc3f1368263c24a29cd4e031e44ebf82f8b Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Fri, 3 May 2024 23:24:32 +0800 Subject: [PATCH 072/189] Add number of entries to --time-index's message (#2007) It generates a message like this: ``` Ruby LSP v0.16.7: Indexing took 0.84149 seconds and generated: - Module: 1894 - InstanceMethod: 12548 - Class: 1937 - Constant: 1416 - Accessor: 1994 - SingletonMethod: 1132 - UnresolvedAlias: 134 ``` --- exe/ruby-lsp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/exe/ruby-lsp b/exe/ruby-lsp index bf56654e90..f91b3bbe78 100755 --- a/exe/ruby-lsp +++ b/exe/ruby-lsp @@ -100,7 +100,13 @@ if options[:time_index] index = RubyIndexer::Index.new result = Benchmark.realtime { index.index_all } - puts "Ruby LSP v#{RubyLsp::VERSION}: Indexing took #{result.round(5)} seconds" + entries = index.instance_variable_get(:@entries) + entries_by_entry_type = entries.values.flatten.group_by(&:class) + + puts <<~MSG + Ruby LSP v#{RubyLsp::VERSION}: Indexing took #{result.round(5)} seconds and generated: + - #{entries_by_entry_type.map { |k, v| "#{k.name.split("::").last}: #{v.size}" }.join("\n- ")} + MSG return end From 324c6429fb2abaa649c755e709c248d5a490c67e Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Fri, 3 May 2024 15:57:09 -0400 Subject: [PATCH 073/189] Turn off IRB integration on server launch (#2010) --- exe/ruby-lsp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/exe/ruby-lsp b/exe/ruby-lsp index f91b3bbe78..2335b4535e 100755 --- a/exe/ruby-lsp +++ b/exe/ruby-lsp @@ -84,13 +84,10 @@ if options[:debug] end begin - original_stdout = $stdout - $stdout = $stderr + ENV.delete("RUBY_DEBUG_IRB_CONSOLE") require "debug/open_nonstop" rescue LoadError $stderr.puts("You need to install the debug gem to use the --debug flag") - ensure - $stdout = original_stdout end end From b4806296dfbac755bb8c782c1525205a7ffe79d4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 May 2024 02:17:36 +0000 Subject: [PATCH 074/189] Bump the minor-and-patch group with 2 updates Bumps the minor-and-patch group with 2 updates: [sorbet-static-and-runtime](https://github.com/sorbet/sorbet) and [sorbet-runtime](https://github.com/sorbet/sorbet). Updates `sorbet-static-and-runtime` from 0.5.11361 to 0.5.11368 - [Release notes](https://github.com/sorbet/sorbet/releases) - [Commits](https://github.com/sorbet/sorbet/commits) Updates `sorbet-runtime` from 0.5.11361 to 0.5.11368 - [Release notes](https://github.com/sorbet/sorbet/releases) - [Commits](https://github.com/sorbet/sorbet/commits) --- updated-dependencies: - dependency-name: sorbet-static-and-runtime dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: sorbet-runtime dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index ac953cb7de..86b841d918 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -90,14 +90,14 @@ GEM simplecov_json_formatter (~> 0.1) simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) - sorbet (0.5.11361) - sorbet-static (= 0.5.11361) - sorbet-runtime (0.5.11361) - sorbet-static (0.5.11361-universal-darwin) - sorbet-static (0.5.11361-x86_64-linux) - sorbet-static-and-runtime (0.5.11361) - sorbet (= 0.5.11361) - sorbet-runtime (= 0.5.11361) + 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) spoom (1.3.0) erubi (>= 1.10.0) prism (>= 0.19.0) @@ -124,8 +124,6 @@ GEM PLATFORMS arm64-darwin - x64-mingw-ucrt - x64-mingw32 x86_64-darwin x86_64-linux From 6fd5b9147fcb8d46b10dfbf2f0372bf710865b22 Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 6 May 2024 02:18:09 +0000 Subject: [PATCH 075/189] Update RBI files for gems 2024-05-06 [dependabot skip] --- sorbet/rbi/gems/rubocop-md@1.2.2.rbi | 119 ++++++++++++++++++ ...bet@0.8.2.rbi => rubocop-sorbet@0.8.3.rbi} | 0 2 files changed, 119 insertions(+) create mode 100644 sorbet/rbi/gems/rubocop-md@1.2.2.rbi rename sorbet/rbi/gems/{rubocop-sorbet@0.8.2.rbi => rubocop-sorbet@0.8.3.rbi} (100%) diff --git a/sorbet/rbi/gems/rubocop-md@1.2.2.rbi b/sorbet/rbi/gems/rubocop-md@1.2.2.rbi new file mode 100644 index 0000000000..488dc9021a --- /dev/null +++ b/sorbet/rbi/gems/rubocop-md@1.2.2.rbi @@ -0,0 +1,119 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rubocop-md` gem. +# Please instead update this file by running `bin/tapioca gem rubocop-md`. + +# source://rubocop-md//lib/rubocop/markdown/version.rb#3 +module RuboCop; end + +# Plugin to run Rubocop against Markdown files +# +# source://rubocop-md//lib/rubocop/markdown/version.rb#4 +module RuboCop::Markdown; end + +# source://rubocop-md//lib/rubocop/markdown.rb#10 +RuboCop::Markdown::CONFIG_DEFAULT = T.let(T.unsafe(nil), Pathname) + +# source://rubocop-md//lib/rubocop/markdown.rb#9 +RuboCop::Markdown::PROJECT_ROOT = T.let(T.unsafe(nil), Pathname) + +# Transform source Markdown file into valid Ruby file +# by commenting out all non-code lines +# +# source://rubocop-md//lib/rubocop/markdown/preprocess.rb#9 +class RuboCop::Markdown::Preprocess + # @return [Preprocess] a new instance of Preprocess + # + # source://rubocop-md//lib/rubocop/markdown/preprocess.rb#51 + def initialize(file); end + + # source://rubocop-md//lib/rubocop/markdown/preprocess.rb#56 + def call(src); end + + # Returns the value of attribute config. + # + # source://rubocop-md//lib/rubocop/markdown/preprocess.rb#49 + def config; end + + private + + # Whether to try to detect Ruby by parsing codeblock. + # If it's set to false we lint only implicitly specified Ruby blocks. + # + # @return [Boolean] + # + # source://rubocop-md//lib/rubocop/markdown/preprocess.rb#112 + def autodetect?; end + + # source://rubocop-md//lib/rubocop/markdown/preprocess.rb#116 + def comment_lines(src); end + + # Check codeblock attribute to prevent from parsing + # non-Ruby snippets and avoid false positives + # + # @return [Boolean] + # + # source://rubocop-md//lib/rubocop/markdown/preprocess.rb#87 + def maybe_ruby?(syntax); end + + # Check codeblack attribute if it's defined and of Ruby type + # + # @return [Boolean] + # + # source://rubocop-md//lib/rubocop/markdown/preprocess.rb#92 + def ruby?(syntax); end + + # @return [Boolean] + # + # source://rubocop-md//lib/rubocop/markdown/preprocess.rb#81 + def ruby_codeblock?(syntax, src); end + + # Try to parse with Ripper + # Invalid Ruby code (or non-Ruby) returns `nil`. + # Return true if it's explicit Ruby and warn_invalid? + # + # @return [Boolean] + # + # source://rubocop-md//lib/rubocop/markdown/preprocess.rb#99 + def valid_syntax?(syntax, src); end + + # Whether to show warning when snippet is not a valid Ruby + # + # @return [Boolean] + # + # source://rubocop-md//lib/rubocop/markdown/preprocess.rb#106 + def warn_invalid?; end + + class << self + # Revert preprocess changes. + # + # When autocorrect is applied, RuboCop re-writes the file + # using preproccessed source buffer. + # + # We have to restore it. + # + # source://rubocop-md//lib/rubocop/markdown/preprocess.rb#42 + def restore!(file); end + end +end + +# source://rubocop-md//lib/rubocop/markdown/preprocess.rb#23 +RuboCop::Markdown::Preprocess::MARKER = T.let(T.unsafe(nil), String) + +# This is a regexp to parse code blocks from .md files. +# +# Only recognizes backticks-style code blocks. +# +# Try it: https://rubular.com/r/YMqSWiBuh2TKIJ +# +# source://rubocop-md//lib/rubocop/markdown/preprocess.rb#15 +RuboCop::Markdown::Preprocess::MD_REGEXP = T.let(T.unsafe(nil), Regexp) + +# See https://github.com/github/linguist/blob/v5.3.3/lib/linguist/languages.yml#L3925 +# +# source://rubocop-md//lib/rubocop/markdown/preprocess.rb#26 +RuboCop::Markdown::Preprocess::RUBY_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop-md//lib/rubocop/markdown/version.rb#5 +RuboCop::Markdown::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/rubocop-sorbet@0.8.2.rbi b/sorbet/rbi/gems/rubocop-sorbet@0.8.3.rbi similarity index 100% rename from sorbet/rbi/gems/rubocop-sorbet@0.8.2.rbi rename to sorbet/rbi/gems/rubocop-sorbet@0.8.3.rbi From 58d2429dfc8e70beceee18f2673d994a4dce6c03 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 May 2024 02:41:56 +0000 Subject: [PATCH 076/189] Bump the minor-and-patch group in /vscode with 5 updates Bumps the minor-and-patch group in /vscode with 5 updates: | Package | From | To | | --- | --- | --- | | [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) | `7.24.4` | `7.24.5` | | [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `20.12.7` | `20.12.8` | | [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) | `7.7.1` | `7.8.0` | | [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) | `7.7.1` | `7.8.0` | | [@vscode/vsce](https://github.com/Microsoft/vsce) | `2.26.0` | `2.26.1` | Updates `@babel/core` from 7.24.4 to 7.24.5 - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.24.5/packages/babel-core) Updates `@types/node` from 20.12.7 to 20.12.8 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Updates `@typescript-eslint/eslint-plugin` from 7.7.1 to 7.8.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.8.0/packages/eslint-plugin) Updates `@typescript-eslint/parser` from 7.7.1 to 7.8.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.8.0/packages/parser) Updates `@vscode/vsce` from 2.26.0 to 2.26.1 - [Release notes](https://github.com/Microsoft/vsce/releases) - [Commits](https://github.com/Microsoft/vsce/compare/v2.26.0...v2.26.1) --- updated-dependencies: - dependency-name: "@babel/core" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: "@typescript-eslint/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: "@typescript-eslint/parser" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: "@vscode/vsce" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] --- vscode/package.json | 8 +- vscode/yarn.lock | 255 ++++++++++++++++++++++---------------------- 2 files changed, 134 insertions(+), 129 deletions(-) diff --git a/vscode/package.json b/vscode/package.json index cbbae33342..909a612dd9 100644 --- a/vscode/package.json +++ b/vscode/package.json @@ -536,7 +536,7 @@ "ws": ">= 7.4.6" }, "devDependencies": { - "@babel/core": "^7.24.4", + "@babel/core": "^7.24.5", "@shopify/eslint-plugin": "^44.0.0", "@shopify/prettier-config": "^1.1.2", "@types/glob": "^8.1.0", @@ -544,10 +544,10 @@ "@types/node": "20.x", "@types/sinon": "^17.0.3", "@types/vscode": "^1.68.0", - "@typescript-eslint/eslint-plugin": "^7.7.1", - "@typescript-eslint/parser": "^7.7.1", + "@typescript-eslint/eslint-plugin": "^7.8.0", + "@typescript-eslint/parser": "^7.8.0", "@vscode/test-electron": "^2.3.9", - "@vscode/vsce": "^2.26.0", + "@vscode/vsce": "^2.26.1", "esbuild": "^0.20.2", "eslint": "^8.57.0", "eslint-import-resolver-typescript": "^3.6.1", diff --git a/vscode/yarn.lock b/vscode/yarn.lock index 3369aedf19..5de0184625 100644 --- a/vscode/yarn.lock +++ b/vscode/yarn.lock @@ -128,7 +128,7 @@ jsonwebtoken "^9.0.0" uuid "^8.3.0" -"@babel/code-frame@^7.23.5", "@babel/code-frame@^7.24.1", "@babel/code-frame@^7.24.2": +"@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== @@ -141,21 +141,21 @@ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.23.5.tgz#ffb878728bb6bdcb6f4510aa51b1be9afb8cfd98" integrity sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw== -"@babel/core@^7.24.4": - version "7.24.4" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.24.4.tgz#1f758428e88e0d8c563874741bc4ffc4f71a4717" - integrity sha512-MBVlMXP+kkl5394RBLSxxk/iLTeVGuXTV3cIDXavPpMMqnSnt6apKgan/U8O3USWZCWZT/TbgfEpKa4uMgN4Dg== +"@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== dependencies: "@ampproject/remapping" "^2.2.0" "@babel/code-frame" "^7.24.2" - "@babel/generator" "^7.24.4" + "@babel/generator" "^7.24.5" "@babel/helper-compilation-targets" "^7.23.6" - "@babel/helper-module-transforms" "^7.23.3" - "@babel/helpers" "^7.24.4" - "@babel/parser" "^7.24.4" + "@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.1" - "@babel/types" "^7.24.0" + "@babel/traverse" "^7.24.5" + "@babel/types" "^7.24.5" convert-source-map "^2.0.0" debug "^4.1.0" gensync "^1.0.0-beta.2" @@ -178,12 +178,12 @@ dependencies: eslint-rule-composer "^0.3.0" -"@babel/generator@^7.24.1", "@babel/generator@^7.24.4": - version "7.24.4" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.24.4.tgz#1fc55532b88adf952025d5d2d1e71f946cb1c498" - integrity sha512-Xd6+v6SnjWVx/nus+y0l1sxMOTOMBkyL4+BIdbALyatQnAe/SRVjANeDPSCYaX+i1iJmuGSKf3Z+E+V/va1Hvw== +"@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== dependencies: - "@babel/types" "^7.24.0" + "@babel/types" "^7.24.5" "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.25" jsesc "^2.5.1" @@ -219,61 +219,66 @@ dependencies: "@babel/types" "^7.22.5" -"@babel/helper-module-imports@^7.22.15": - version "7.22.15" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz#16146307acdc40cc00c3b2c647713076464bdbf0" - integrity sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w== +"@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== dependencies: - "@babel/types" "^7.22.15" + "@babel/types" "^7.24.0" -"@babel/helper-module-transforms@^7.23.3": - version "7.23.3" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz#d7d12c3c5d30af5b3c0fcab2a6d5217773e2d0f1" - integrity sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ== +"@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== dependencies: "@babel/helper-environment-visitor" "^7.22.20" - "@babel/helper-module-imports" "^7.22.15" - "@babel/helper-simple-access" "^7.22.5" - "@babel/helper-split-export-declaration" "^7.22.6" - "@babel/helper-validator-identifier" "^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-simple-access@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz#4938357dc7d782b80ed6dbb03a0fba3d22b1d5de" - integrity sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w== +"@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== dependencies: - "@babel/types" "^7.22.5" + "@babel/types" "^7.24.5" -"@babel/helper-split-export-declaration@^7.22.6": - version "7.22.6" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz#322c61b7310c0997fe4c323955667f18fcefb91c" - integrity sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g== +"@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== dependencies: - "@babel/types" "^7.22.5" + "@babel/types" "^7.24.5" -"@babel/helper-string-parser@^7.23.4": - version "7.23.4" - resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz#9478c707febcbbe1ddb38a3d91a2e054ae622d83" - integrity sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ== +"@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-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.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.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.4": - version "7.24.4" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.24.4.tgz#dc00907fd0d95da74563c142ef4cd21f2cb856b6" - integrity sha512-FewdlZbSiwaVGlgT1DPANDuCHaDMiOo+D/IDYRFYjHOuv66xMSJ7fQwwODwRNAPkADIO/z1EoF/l2BCWlWABDw== +"@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== dependencies: "@babel/template" "^7.24.0" - "@babel/traverse" "^7.24.1" - "@babel/types" "^7.24.0" + "@babel/traverse" "^7.24.5" + "@babel/types" "^7.24.5" "@babel/highlight@^7.24.2": version "7.24.2" @@ -285,10 +290,10 @@ js-tokens "^4.0.0" picocolors "^1.0.0" -"@babel/parser@^7.24.0", "@babel/parser@^7.24.1", "@babel/parser@^7.24.4": - version "7.24.4" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.4.tgz#234487a110d89ad5a3ed4a8a566c36b9453e8c88" - integrity sha512-zTvEBcghmeBma9QIGunWevvBAp4/Qu9Bdq+2k0Ot4fVMD6v3dsC9WOcRSKk7tRRyBM/53yKMJko9xOatGQAwSg== +"@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/runtime@^7.23.2": version "7.23.9" @@ -306,29 +311,29 @@ "@babel/parser" "^7.24.0" "@babel/types" "^7.24.0" -"@babel/traverse@^7.24.1": - version "7.24.1" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.24.1.tgz#d65c36ac9dd17282175d1e4a3c49d5b7988f530c" - integrity sha512-xuU6o9m68KeqZbQuDt2TcKSxUw/mrsvavlEqQ1leZ/B+C9tk6E4sRWy97WaXgvq5E+nU3cXMxv3WKOCanVMCmQ== +"@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.1" - "@babel/generator" "^7.24.1" + "@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.22.6" - "@babel/parser" "^7.24.1" - "@babel/types" "^7.24.0" + "@babel/helper-split-export-declaration" "^7.24.5" + "@babel/parser" "^7.24.5" + "@babel/types" "^7.24.5" debug "^4.3.1" globals "^11.1.0" -"@babel/types@^7.22.15", "@babel/types@^7.22.5", "@babel/types@^7.23.0", "@babel/types@^7.24.0": - version "7.24.0" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.24.0.tgz#3b951f435a92e7333eba05b7566fd297960ea1bf" - integrity sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w== +"@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== dependencies: - "@babel/helper-string-parser" "^7.23.4" - "@babel/helper-validator-identifier" "^7.22.20" + "@babel/helper-string-parser" "^7.24.1" + "@babel/helper-validator-identifier" "^7.24.5" to-fast-properties "^2.0.0" "@esbuild/aix-ppc64@0.20.2": @@ -704,9 +709,9 @@ integrity sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg== "@types/node@*", "@types/node@20.x": - version "20.12.7" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.7.tgz#04080362fa3dd6c5822061aa3124f5c152cff384" - integrity sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg== + 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== dependencies: undici-types "~5.26.4" @@ -749,16 +754,16 @@ semver "^7.5.4" ts-api-utils "^1.0.1" -"@typescript-eslint/eslint-plugin@^7.7.1": - version "7.7.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.7.1.tgz#50a9044e3e5fe76b22caf64fb7fc1f97614bdbfd" - integrity sha512-KwfdWXJBOviaBVhxO3p5TJiLpNuh2iyXyjmWN0f1nU87pwyvfS0EmjC6ukQVYVFJd/K1+0NWGPDXiyEyQorn0Q== +"@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== dependencies: "@eslint-community/regexpp" "^4.10.0" - "@typescript-eslint/scope-manager" "7.7.1" - "@typescript-eslint/type-utils" "7.7.1" - "@typescript-eslint/utils" "7.7.1" - "@typescript-eslint/visitor-keys" "7.7.1" + "@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" graphemer "^1.4.0" ignore "^5.3.1" @@ -777,15 +782,15 @@ "@typescript-eslint/visitor-keys" "6.21.0" debug "^4.3.4" -"@typescript-eslint/parser@^7.7.1": - version "7.7.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.7.1.tgz#f940e9f291cdca40c46cb75916217d3a42d6ceea" - integrity sha512-vmPzBOOtz48F6JAGVS/kZYk4EkXao6iGrD838sp1w3NQQC0W8ry/q641KU4PrG7AKNAf56NOcR8GOpH8l9FPCw== +"@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== dependencies: - "@typescript-eslint/scope-manager" "7.7.1" - "@typescript-eslint/types" "7.7.1" - "@typescript-eslint/typescript-estree" "7.7.1" - "@typescript-eslint/visitor-keys" "7.7.1" + "@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" debug "^4.3.4" "@typescript-eslint/scope-manager@5.62.0": @@ -804,13 +809,13 @@ "@typescript-eslint/types" "6.21.0" "@typescript-eslint/visitor-keys" "6.21.0" -"@typescript-eslint/scope-manager@7.7.1": - version "7.7.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.7.1.tgz#07fe59686ca843f66e3e2b5c151522bc38effab2" - integrity sha512-PytBif2SF+9SpEUKynYn5g1RHFddJUcyynGpztX3l/ik7KmZEv19WCMhUBkHXPU9es/VWGD3/zg3wg90+Dh2rA== +"@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== dependencies: - "@typescript-eslint/types" "7.7.1" - "@typescript-eslint/visitor-keys" "7.7.1" + "@typescript-eslint/types" "7.8.0" + "@typescript-eslint/visitor-keys" "7.8.0" "@typescript-eslint/type-utils@6.21.0": version "6.21.0" @@ -822,13 +827,13 @@ debug "^4.3.4" ts-api-utils "^1.0.1" -"@typescript-eslint/type-utils@7.7.1": - version "7.7.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.7.1.tgz#2f8094edca3bebdaad009008929df645ed9c8743" - integrity sha512-ZksJLW3WF7o75zaBPScdW1Gbkwhd/lyeXGf1kQCxJaOeITscoSl0MjynVvCzuV5boUz/3fOI06Lz8La55mu29Q== +"@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.7.1" - "@typescript-eslint/utils" "7.7.1" + "@typescript-eslint/typescript-estree" "7.8.0" + "@typescript-eslint/utils" "7.8.0" debug "^4.3.4" ts-api-utils "^1.3.0" @@ -842,10 +847,10 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.21.0.tgz#205724c5123a8fef7ecd195075fa6e85bac3436d" integrity sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg== -"@typescript-eslint/types@7.7.1": - version "7.7.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.7.1.tgz#f903a651fb004c75add08e4e9e207f169d4b98d7" - integrity sha512-AmPmnGW1ZLTpWa+/2omPrPfR7BcbUU4oha5VIbSbS1a1Tv966bklvLNXxp3mrbc+P2j4MNOTfDffNsk4o0c6/w== +"@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" @@ -874,13 +879,13 @@ semver "^7.5.4" ts-api-utils "^1.0.1" -"@typescript-eslint/typescript-estree@7.7.1": - version "7.7.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.7.1.tgz#5cafde48fe390fe1c1b329b2ce0ba8a73c1e87b2" - integrity sha512-CXe0JHCXru8Fa36dteXqmH2YxngKJjkQLjxzoj6LYwzZ7qZvgsLSc+eqItCrqIop8Vl2UKoAi0StVWu97FQZIQ== +"@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== dependencies: - "@typescript-eslint/types" "7.7.1" - "@typescript-eslint/visitor-keys" "7.7.1" + "@typescript-eslint/types" "7.8.0" + "@typescript-eslint/visitor-keys" "7.8.0" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" @@ -901,17 +906,17 @@ "@typescript-eslint/typescript-estree" "6.21.0" semver "^7.5.4" -"@typescript-eslint/utils@7.7.1": - version "7.7.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.7.1.tgz#5d161f2b4a55e1bc38b634bebb921e4bd4e4a16e" - integrity sha512-QUvBxPEaBXf41ZBbaidKICgVL8Hin0p6prQDu6bbetWo39BKbWJxRsErOzMNT1rXvTll+J7ChrbmMCXM9rsvOQ== +"@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.7.1" - "@typescript-eslint/types" "7.7.1" - "@typescript-eslint/typescript-estree" "7.7.1" + "@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": @@ -944,12 +949,12 @@ "@typescript-eslint/types" "6.21.0" eslint-visitor-keys "^3.4.1" -"@typescript-eslint/visitor-keys@7.7.1": - version "7.7.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.7.1.tgz#da2294796220bb0f3b4add5ecbb1b9c3f4f65798" - integrity sha512-gBL3Eq25uADw1LQ9kVpf3hRM+DWzs0uZknHYK3hq4jcTPqVCClHGDnB6UUUV2SFeBeA4KWHWbbLqmbGcZ4FYbw== +"@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== dependencies: - "@typescript-eslint/types" "7.7.1" + "@typescript-eslint/types" "7.8.0" eslint-visitor-keys "^3.4.3" "@ungap/structured-clone@^1.2.0": @@ -967,10 +972,10 @@ jszip "^3.10.1" semver "^7.5.2" -"@vscode/vsce@^2.25.0", "@vscode/vsce@^2.26.0": - version "2.26.0" - resolved "https://registry.yarnpkg.com/@vscode/vsce/-/vsce-2.26.0.tgz#104b4f6f0b2d8af89a2b90880d91846370bf6208" - integrity sha512-v54ltgMzUG8lGY0kAgaOlry57xse1RlWzes9FotfGEx+Fr05KeR8rZicQzEMDmi9QnOgVWHuiEq+xA2HWkAz+Q== +"@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== dependencies: "@azure/identity" "^4.1.0" azure-devops-node-api "^12.5.0" From 39238c218e2a01abff3262b0d89c3c5a0e8db49f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 May 2024 03:00:19 +0000 Subject: [PATCH 077/189] Bump test/fixtures/prism from `6a2c499` to `e418265` Bumps [test/fixtures/prism](https://github.com/ruby/prism) from `6a2c499` to `e418265`. - [Release notes](https://github.com/ruby/prism/releases) - [Commits](https://github.com/ruby/prism/compare/6a2c49990a0508235864a45e9a6f210068b92214...e418265166975d879efefdf91e868ad35e68e593) --- updated-dependencies: - dependency-name: test/fixtures/prism dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- test/fixtures/prism | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/fixtures/prism b/test/fixtures/prism index 6a2c49990a..e418265166 160000 --- a/test/fixtures/prism +++ b/test/fixtures/prism @@ -1 +1 @@ -Subproject commit 6a2c49990a0508235864a45e9a6f210068b92214 +Subproject commit e418265166975d879efefdf91e868ad35e68e593 From c2791c64ed7027854d985f0a5b491dce810ecb95 Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Mon, 6 May 2024 09:15:28 -0400 Subject: [PATCH 078/189] Re-add Windows platforms --- Gemfile.lock | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Gemfile.lock b/Gemfile.lock index 86b841d918..97e9aaf589 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -124,6 +124,8 @@ GEM PLATFORMS arm64-darwin + x64-mingw-ucrt + x64-mingw32 x86_64-darwin x86_64-linux From 3ec84317198b2418f0a5149fa903c668894ba856 Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Mon, 6 May 2024 09:33:55 -0400 Subject: [PATCH 079/189] Mention that bundleGemfile is not intended for multiroot workspaces (#2011) --- vscode/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vscode/package.json b/vscode/package.json index 909a612dd9..5872f8618b 100644 --- a/vscode/package.json +++ b/vscode/package.json @@ -289,7 +289,7 @@ "default": null }, "rubyLsp.bundleGemfile": { - "description": "Relative or absolute path to the Gemfile to use for bundling the Ruby LSP server. Only necessary when using a separate Gemfile for the Ruby LSP", + "description": "Relative or absolute path to the Gemfile to use for bundling the Ruby LSP server. Do not use this if you're working on a monorepo or your project's Gemfile is in a subdirectory (look into multiroot workspaces instead). Only necessary when using a separate Gemfile for the Ruby LSP", "type": "string", "default": "" }, From 670b6ba0326d0a0922224a4ed5b8df245c17d9fd Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Mon, 6 May 2024 15:54:57 -0400 Subject: [PATCH 080/189] Fix false positive in gem list matching (#2012) --- vscode/src/workspace.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vscode/src/workspace.ts b/vscode/src/workspace.ts index 795d025353..458d351a09 100644 --- a/vscode/src/workspace.ts +++ b/vscode/src/workspace.ts @@ -193,7 +193,7 @@ export class Workspace implements WorkspaceInterface { }); // If the gem is not yet installed, install it - if (!stdout.includes("ruby-lsp")) { + if (!/^ruby-lsp[\s]/.exec(stdout)) { await asyncExec("gem install ruby-lsp", { cwd: this.workspaceFolder.uri.fsPath, env: this.ruby.env, From 1f2c02857202d3f8f7d4316a4431be21c8c82a48 Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Wed, 8 May 2024 00:02:00 +0800 Subject: [PATCH 081/189] Replace RubyIndexer::Collector with RubyIndexer::DeclarationListener (#2008) This rewrite will give us a few benefits: - We can use the same pattern as we write request listeners, which will make maintenance easier. - It will make some future indexing features easier to implement. With collector, we don't have access to a node's leave events, which makes features like capturing visibility hard to implement. - Since `Prism::Dispatcher` visits all nodes in the AST, we can now collect nodes that are defined unconventionally, like behind conditionals or begin blocks, just by doing the switching. Unfortunately, this change will make indexing slower. In Core, it increases the indexing time from ~32 seconds to ~41 seconds (~28%). But on the other hand, if in the future `Prism::Dispatcher` receives performance improvements, the indexer will benefit automatically from them too. --- exe/ruby-lsp-check | 4 +- exe/ruby-lsp-doctor | 5 +- .../{collector.rb => declaration_listener.rb} | 223 +++++++++--------- lib/ruby_indexer/lib/ruby_indexer/index.rb | 6 +- lib/ruby_indexer/ruby_indexer.rb | 2 +- .../test/classes_and_modules_test.rb | 18 ++ lib/ruby_indexer/test/constant_test.rb | 3 + lib/ruby_indexer/test/method_test.rb | 11 + 8 files changed, 144 insertions(+), 128 deletions(-) rename lib/ruby_indexer/lib/ruby_indexer/{collector.rb => declaration_listener.rb} (76%) diff --git a/exe/ruby-lsp-check b/exe/ruby-lsp-check index c3d70d3606..447ca09492 100755 --- a/exe/ruby-lsp-check +++ b/exe/ruby-lsp-check @@ -47,9 +47,7 @@ index = RubyIndexer::Index.new indexables = RubyIndexer.configuration.indexables indexables.each_with_index do |indexable, i| - result = Prism.parse(File.read(indexable.full_path)) - collector = RubyIndexer::Collector.new(index, result, indexable.full_path) - collector.collect(result.value) + index.index_single(indexable) rescue => e errors[indexable.full_path] = e ensure diff --git a/exe/ruby-lsp-doctor b/exe/ruby-lsp-doctor index 0bc944a2c4..73a4477bc8 100755 --- a/exe/ruby-lsp-doctor +++ b/exe/ruby-lsp-doctor @@ -19,8 +19,5 @@ puts "Globbing for indexable files" RubyIndexer.configuration.indexables.each do |indexable| puts "indexing: #{indexable.full_path}" - content = File.read(indexable.full_path) - result = Prism.parse(content) - collector = RubyIndexer::Collector.new(index, result, indexable.full_path) - collector.collect(result.value) + index.index_single(indexable) end diff --git a/lib/ruby_indexer/lib/ruby_indexer/collector.rb b/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb similarity index 76% rename from lib/ruby_indexer/lib/ruby_indexer/collector.rb rename to lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb index dab6b359d4..431885b4c6 100644 --- a/lib/ruby_indexer/lib/ruby_indexer/collector.rb +++ b/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb @@ -2,13 +2,13 @@ # frozen_string_literal: true module RubyIndexer - class Collector + class DeclarationListener extend T::Sig - LEAVE_EVENT = T.let(Object.new.freeze, Object) - - sig { params(index: Index, parse_result: Prism::ParseResult, file_path: String).void } - def initialize(index, parse_result, file_path) + 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 @stack = T.let([], T::Array[String]) @@ -18,63 +18,79 @@ def initialize(index, parse_result, file_path) end, T::Hash[Integer, Prism::Comment], ) - @queue = T.let([], T::Array[Object]) + @inside_def = T.let(false, T::Boolean) @current_owner = T.let(nil, T.nilable(Entry::Namespace)) - super() + dispatcher.register( + self, + :on_class_node_enter, + :on_class_node_leave, + :on_module_node_enter, + :on_module_node_leave, + :on_def_node_enter, + :on_def_node_leave, + :on_call_node_enter, + :on_multi_write_node_enter, + :on_constant_path_write_node_enter, + :on_constant_path_or_write_node_enter, + :on_constant_path_operator_write_node_enter, + :on_constant_path_and_write_node_enter, + :on_constant_or_write_node_enter, + :on_constant_write_node_enter, + :on_constant_or_write_node_enter, + :on_constant_and_write_node_enter, + :on_constant_operator_write_node_enter, + ) end - sig { params(node: Prism::Node).void } - def collect(node) - @queue = [node] - - until @queue.empty? - node_or_event = @queue.shift - - case node_or_event - when Prism::ProgramNode - @queue << node_or_event.statements - when Prism::StatementsNode - T.unsafe(@queue).prepend(*node_or_event.body) - when Prism::ClassNode - add_class_entry(node_or_event) - when Prism::ModuleNode - add_module_entry(node_or_event) - when Prism::MultiWriteNode - handle_multi_write_node(node_or_event) - when Prism::ConstantPathWriteNode - handle_constant_path_write_node(node_or_event) - when Prism::ConstantPathOrWriteNode - handle_constant_path_or_write_node(node_or_event) - when Prism::ConstantPathOperatorWriteNode - handle_constant_path_operator_write_node(node_or_event) - when Prism::ConstantPathAndWriteNode - handle_constant_path_and_write_node(node_or_event) - when Prism::ConstantWriteNode - handle_constant_write_node(node_or_event) - when Prism::ConstantOrWriteNode - name = fully_qualify_name(node_or_event.name.to_s) - add_constant(node_or_event, name) - when Prism::ConstantAndWriteNode - name = fully_qualify_name(node_or_event.name.to_s) - add_constant(node_or_event, name) - when Prism::ConstantOperatorWriteNode - name = fully_qualify_name(node_or_event.name.to_s) - add_constant(node_or_event, name) - when Prism::CallNode - handle_call_node(node_or_event) - when Prism::DefNode - handle_def_node(node_or_event) - when LEAVE_EVENT - @stack.pop - end + sig { params(node: Prism::ClassNode).void } + def on_class_node_enter(node) + name = node.constant_path.location.slice + + return unless /^[A-Z:]/.match?(name) + + comments = collect_comments(node) + + superclass = node.superclass + parent_class = case superclass + when Prism::ConstantReadNode, Prism::ConstantPathNode + superclass.slice end + + @current_owner = Entry::Class.new( + fully_qualify_name(name), + @file_path, + node.location, + comments, + parent_class, + ) + @index << @current_owner + @stack << name end - private + sig { params(node: Prism::ClassNode).void } + def on_class_node_leave(node) + @stack.pop + end + + sig { params(node: Prism::ModuleNode).void } + def on_module_node_enter(node) + name = node.constant_path.location.slice + return unless /^[A-Z:]/.match?(name) + + comments = collect_comments(node) + @current_owner = Entry::Module.new(fully_qualify_name(name), @file_path, node.location, comments) + @index << @current_owner + @stack << name + end + + sig { params(node: Prism::ModuleNode).void } + def on_module_node_leave(node) + @stack.pop + end sig { params(node: Prism::MultiWriteNode).void } - def handle_multi_write_node(node) + def on_multi_write_node_enter(node) value = node.value values = value.is_a?(Prism::ArrayNode) && value.opening_loc ? value.elements : [] @@ -94,7 +110,7 @@ def handle_multi_write_node(node) end sig { params(node: Prism::ConstantPathWriteNode).void } - def handle_constant_path_write_node(node) + def on_constant_path_write_node_enter(node) # ignore variable constants like `var::FOO` or `self.class::FOO` target = node.target return unless target.parent.nil? || target.parent.is_a?(Prism::ConstantReadNode) @@ -104,7 +120,7 @@ def handle_constant_path_write_node(node) end sig { params(node: Prism::ConstantPathOrWriteNode).void } - def handle_constant_path_or_write_node(node) + def on_constant_path_or_write_node_enter(node) # ignore variable constants like `var::FOO` or `self.class::FOO` target = node.target return unless target.parent.nil? || target.parent.is_a?(Prism::ConstantReadNode) @@ -114,7 +130,7 @@ def handle_constant_path_or_write_node(node) end sig { params(node: Prism::ConstantPathOperatorWriteNode).void } - def handle_constant_path_operator_write_node(node) + def on_constant_path_operator_write_node_enter(node) # ignore variable constants like `var::FOO` or `self.class::FOO` target = node.target return unless target.parent.nil? || target.parent.is_a?(Prism::ConstantReadNode) @@ -124,7 +140,7 @@ def handle_constant_path_operator_write_node(node) end sig { params(node: Prism::ConstantPathAndWriteNode).void } - def handle_constant_path_and_write_node(node) + def on_constant_path_and_write_node_enter(node) # ignore variable constants like `var::FOO` or `self.class::FOO` target = node.target return unless target.parent.nil? || target.parent.is_a?(Prism::ConstantReadNode) @@ -134,13 +150,31 @@ def handle_constant_path_and_write_node(node) end sig { params(node: Prism::ConstantWriteNode).void } - def handle_constant_write_node(node) + def on_constant_write_node_enter(node) + name = fully_qualify_name(node.name.to_s) + add_constant(node, name) + end + + sig { params(node: Prism::ConstantOrWriteNode).void } + def on_constant_or_write_node_enter(node) + name = fully_qualify_name(node.name.to_s) + add_constant(node, name) + end + + sig { params(node: Prism::ConstantAndWriteNode).void } + def on_constant_and_write_node_enter(node) + name = fully_qualify_name(node.name.to_s) + add_constant(node, name) + end + + sig { params(node: Prism::ConstantOperatorWriteNode).void } + def on_constant_operator_write_node_enter(node) name = fully_qualify_name(node.name.to_s) add_constant(node, name) end sig { params(node: Prism::CallNode).void } - def handle_call_node(node) + def on_call_node_enter(node) message = node.name case message @@ -153,14 +187,15 @@ def handle_call_node(node) when :attr_accessor handle_attribute(node, reader: true, writer: true) when :include - handle_include(node) + handle_module_operation(node, :included_modules) when :prepend - handle_prepend(node) + handle_module_operation(node, :prepended_modules) end end sig { params(node: Prism::DefNode).void } - def handle_def_node(node) + def on_def_node_enter(node) + @inside_def = true method_name = node.name.to_s comments = collect_comments(node) case node.receiver @@ -185,6 +220,13 @@ def handle_def_node(node) end end + sig { params(node: Prism::DefNode).void } + def on_def_node_leave(node) + @inside_def = false + end + + private + sig { params(node: Prism::CallNode).void } def handle_private_constant(node) arguments = node.arguments&.arguments @@ -240,62 +282,16 @@ def add_constant(node, name, value = nil) # If the right hand side is another constant assignment, we need to visit it because that constant has to be # indexed too - @queue.prepend(value) Entry::UnresolvedAlias.new(value.name.to_s, @stack.dup, name, @file_path, node.location, comments) when Prism::ConstantPathWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode, Prism::ConstantPathAndWriteNode - @queue.prepend(value) 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::ModuleNode).void } - def add_module_entry(node) - name = node.constant_path.location.slice - unless /^[A-Z:]/.match?(name) - @queue << node.body - return - end - - comments = collect_comments(node) - @current_owner = Entry::Module.new(fully_qualify_name(name), @file_path, node.location, comments) - @index << @current_owner - @stack << name - @queue.prepend(node.body, LEAVE_EVENT) - end - - sig { params(node: Prism::ClassNode).void } - def add_class_entry(node) - name = node.constant_path.location.slice - - unless /^[A-Z:]/.match?(name) - @queue << node.body - return - end - - comments = collect_comments(node) - - superclass = node.superclass - parent_class = case superclass - when Prism::ConstantReadNode, Prism::ConstantPathNode - superclass.slice - end - - @current_owner = Entry::Class.new( - fully_qualify_name(name), - @file_path, - node.location, - comments, - parent_class, - ) - @index << @current_owner - @stack << name - @queue.prepend(node.body, LEAVE_EVENT) - end - sig { params(node: Prism::Node).returns(T::Array[String]) } def collect_comments(node) comments = [] @@ -355,18 +351,9 @@ def handle_attribute(node, reader:, writer:) end end - sig { params(node: Prism::CallNode).void } - def handle_include(node) - handle_module_operation(node, :included_modules) - end - - sig { params(node: Prism::CallNode).void } - def handle_prepend(node) - handle_module_operation(node, :prepended_modules) - end - sig { params(node: Prism::CallNode, operation: Symbol).void } def handle_module_operation(node, operation) + return if @inside_def return unless @current_owner arguments = node.arguments&.arguments diff --git a/lib/ruby_indexer/lib/ruby_indexer/index.rb b/lib/ruby_indexer/lib/ruby_indexer/index.rb index 7228be0d99..363a376a24 100644 --- a/lib/ruby_indexer/lib/ruby_indexer/index.rb +++ b/lib/ruby_indexer/lib/ruby_indexer/index.rb @@ -185,9 +185,11 @@ def index_all(indexable_paths: RubyIndexer.configuration.indexables, &block) sig { params(indexable_path: IndexablePath, source: T.nilable(String)).void } def index_single(indexable_path, source = nil) content = source || File.read(indexable_path.full_path) + dispatcher = Prism::Dispatcher.new + result = Prism.parse(content) - collector = Collector.new(self, result, indexable_path.full_path) - collector.collect(result.value) + DeclarationListener.new(self, dispatcher, result, indexable_path.full_path) + dispatcher.dispatch(result.value) require_path = indexable_path.require_path @require_paths_tree.insert(require_path, indexable_path) if require_path diff --git a/lib/ruby_indexer/ruby_indexer.rb b/lib/ruby_indexer/ruby_indexer.rb index ee5af2dc63..d85facf79d 100644 --- a/lib/ruby_indexer/ruby_indexer.rb +++ b/lib/ruby_indexer/ruby_indexer.rb @@ -5,7 +5,7 @@ require "did_you_mean" require "ruby_indexer/lib/ruby_indexer/indexable_path" -require "ruby_indexer/lib/ruby_indexer/collector" +require "ruby_indexer/lib/ruby_indexer/declaration_listener" require "ruby_indexer/lib/ruby_indexer/index" require "ruby_indexer/lib/ruby_indexer/entry" require "ruby_indexer/lib/ruby_indexer/configuration" diff --git a/lib/ruby_indexer/test/classes_and_modules_test.rb b/lib/ruby_indexer/test/classes_and_modules_test.rb index a33d185788..fb02a7458e 100644 --- a/lib/ruby_indexer/test/classes_and_modules_test.rb +++ b/lib/ruby_indexer/test/classes_and_modules_test.rb @@ -14,6 +14,15 @@ class Foo assert_entry("Foo", Entry::Class, "/fake/path/foo.rb:0-0:1-3") end + def test_conditional_class + index(<<~RUBY) + class Foo + end if condition + RUBY + + assert_entry("Foo", Entry::Class, "/fake/path/foo.rb:0-0:1-3") + end + def test_class_with_statements index(<<~RUBY) class Foo @@ -72,6 +81,15 @@ module Foo assert_entry("Foo", Entry::Module, "/fake/path/foo.rb:0-0:1-3") end + def test_conditional_module + index(<<~RUBY) + module Foo + end if condition + RUBY + + assert_entry("Foo", Entry::Module, "/fake/path/foo.rb:0-0:1-3") + end + def test_module_with_statements index(<<~RUBY) module Foo diff --git a/lib/ruby_indexer/test/constant_test.rb b/lib/ruby_indexer/test/constant_test.rb index 16aec45dfe..44839ffa32 100644 --- a/lib/ruby_indexer/test/constant_test.rb +++ b/lib/ruby_indexer/test/constant_test.rb @@ -12,10 +12,13 @@ def test_constant_writes class ::Bar FOO = 2 end + + BAR = 3 if condition RUBY assert_entry("FOO", Entry::Constant, "/fake/path/foo.rb:0-0:0-7") assert_entry("Bar::FOO", Entry::Constant, "/fake/path/foo.rb:3-2:3-9") + assert_entry("BAR", Entry::Constant, "/fake/path/foo.rb:6-0:6-7") end def test_constant_or_writes diff --git a/lib/ruby_indexer/test/method_test.rb b/lib/ruby_indexer/test/method_test.rb index 3e58546679..b3e9f97152 100644 --- a/lib/ruby_indexer/test/method_test.rb +++ b/lib/ruby_indexer/test/method_test.rb @@ -16,6 +16,17 @@ def bar assert_entry("bar", Entry::InstanceMethod, "/fake/path/foo.rb:1-2:2-5") end + def test_conditional_method + index(<<~RUBY) + class Foo + def bar + end if condition + end + RUBY + + assert_entry("bar", Entry::InstanceMethod, "/fake/path/foo.rb:1-2:2-5") + end + def test_singleton_method_using_self_receiver index(<<~RUBY) class Foo From f7acc5bdbfd528adedf7c97171f161a01166ec16 Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Wed, 8 May 2024 12:29:34 -0400 Subject: [PATCH 082/189] Avoid mutating completion item in resolve (#2009) --- lib/ruby_lsp/requests/completion_resolve.rb | 27 +++++++++++++-------- test/requests/completion_resolve_test.rb | 24 ++++++++++-------- 2 files changed, 31 insertions(+), 20 deletions(-) diff --git a/lib/ruby_lsp/requests/completion_resolve.rb b/lib/ruby_lsp/requests/completion_resolve.rb index ec5fb3a06b..0a9b557480 100644 --- a/lib/ruby_lsp/requests/completion_resolve.rb +++ b/lib/ruby_lsp/requests/completion_resolve.rb @@ -36,20 +36,27 @@ def initialize(global_state, item) @item = item end - sig { override.returns(Interface::CompletionItem) } + sig { override.returns(T::Hash[Symbol, T.untyped]) } def perform + # Based on the spec https://microsoft.github.io/language-server-protocol/specification#textDocument_completion, + # a completion resolve request must always return the original completion item without modifying ANY fields + # other than label details and documentation. If we modify anything, the completion behaviour might be broken. + # + # For example, forgetting to return the `insertText` included in the original item will make the editor use the + # `label` for the text edit instead label = @item[:label] entries = @index[label] || [] - Interface::CompletionItem.new( - label: label, - label_details: Interface::CompletionItemLabelDetails.new( - description: entries.take(MAX_DOCUMENTATION_ENTRIES).map(&:file_name).join(","), - ), - documentation: Interface::MarkupContent.new( - kind: "markdown", - value: markdown_from_index_entries(label, entries, MAX_DOCUMENTATION_ENTRIES), - ), + + @item[:labelDetails] = Interface::CompletionItemLabelDetails.new( + description: entries.take(MAX_DOCUMENTATION_ENTRIES).map(&:file_name).join(","), + ) + + @item[:documentation] = Interface::MarkupContent.new( + kind: "markdown", + value: markdown_from_index_entries(label, entries, MAX_DOCUMENTATION_ENTRIES), ) + + @item end end end diff --git a/test/requests/completion_resolve_test.rb b/test/requests/completion_resolve_test.rb index 547215d459..af07d3ccdd 100644 --- a/test/requests/completion_resolve_test.rb +++ b/test/requests/completion_resolve_test.rb @@ -11,29 +11,33 @@ class CompletionResolveTest < Minitest::Test def test_completion_resolve_for_constant source = +<<~RUBY - # This is a class that does things - class Foo + module Foo + # This is a class that does things + class Bar + end end RUBY with_server(source, stub_no_typechecker: true) do |server, _uri| - server.process_message(id: 1, method: "completionItem/resolve", params: { - label: "Foo", - }) + existing_item = { + label: "Foo::Bar", + insertText: "Bar", + } + + server.process_message(id: 1, method: "completionItem/resolve", params: existing_item) result = server.pop_response.response - expected = Interface::CompletionItem.new( - label: "Foo", - label_details: Interface::CompletionItemLabelDetails.new( + expected = existing_item.merge( + labelDetails: Interface::CompletionItemLabelDetails.new( description: "fake.rb", ), documentation: Interface::MarkupContent.new( kind: "markdown", - value: markdown_from_index_entries("Foo", T.must(server.global_state.index["Foo"])), + value: markdown_from_index_entries("Foo::Bar", T.must(server.global_state.index["Foo::Bar"])), ), ) - assert_match(/This is a class that does things/, result.documentation.value) + assert_match(/This is a class that does things/, result[:documentation].value) assert_equal(expected.to_json, result.to_json) end end From f4a2c16564746bbe0b8d87d127133b4adf13095e Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Fri, 10 May 2024 00:48:09 +0800 Subject: [PATCH 083/189] Always push namespace onto the stack (#2019) Always push namespace to stack Currently, the indexer doesn't index classes and modules that have dynamic namespace. Similarly, those classes and modules' names are not pushed onto the namespace stack. However, the stack is currently popped on every class or module exit, which could lead to an incorrect stack popping. This commit fixes the issue by always pushing the namespace to the stack, even when the namespace is dynamic. This also means that we'll start indexing dynamic namespaces' methods with the correct owner. --- .../lib/ruby_indexer/declaration_listener.rb | 3 -- .../test/classes_and_modules_test.rb | 34 ++++++++++++++++++- lib/ruby_indexer/test/method_test.rb | 22 ++++++++++++ test/requests/definition_expectations_test.rb | 29 ++++++++++++++++ 4 files changed, 84 insertions(+), 4 deletions(-) diff --git a/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb b/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb index 431885b4c6..d35b19dd9e 100644 --- a/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb +++ b/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb @@ -47,8 +47,6 @@ def initialize(index, dispatcher, parse_result, file_path) def on_class_node_enter(node) name = node.constant_path.location.slice - return unless /^[A-Z:]/.match?(name) - comments = collect_comments(node) superclass = node.superclass @@ -76,7 +74,6 @@ def on_class_node_leave(node) sig { params(node: Prism::ModuleNode).void } def on_module_node_enter(node) name = node.constant_path.location.slice - return unless /^[A-Z:]/.match?(name) comments = collect_comments(node) @current_owner = Entry::Module.new(fully_qualify_name(name), @file_path, node.location, comments) diff --git a/lib/ruby_indexer/test/classes_and_modules_test.rb b/lib/ruby_indexer/test/classes_and_modules_test.rb index fb02a7458e..d18cb1b02f 100644 --- a/lib/ruby_indexer/test/classes_and_modules_test.rb +++ b/lib/ruby_indexer/test/classes_and_modules_test.rb @@ -69,7 +69,23 @@ class self::Bar end RUBY + assert_entry("self::Bar", Entry::Class, "/fake/path/foo.rb:0-0:1-3") + end + + def test_dynamically_namespaced_class_doesnt_affect_other_classes + index(<<~RUBY) + class Foo + class self::Bar + end + + class Bar + end + end + RUBY + refute_entry("self::Bar") + assert_entry("Foo", Entry::Class, "/fake/path/foo.rb:0-0:6-3") + assert_entry("Foo::Bar", Entry::Class, "/fake/path/foo.rb:4-2:5-5") end def test_empty_statements_module @@ -124,7 +140,23 @@ module self::Bar end RUBY - refute_entry("self::Bar") + assert_entry("self::Bar", Entry::Module, "/fake/path/foo.rb:0-0:1-3") + end + + def test_dynamically_namespaced_module_doesnt_affect_other_modules + index(<<~RUBY) + module Foo + class self::Bar + end + + module Bar + end + end + RUBY + + assert_entry("Foo::self::Bar", Entry::Class, "/fake/path/foo.rb:1-2:2-5") + assert_entry("Foo", Entry::Module, "/fake/path/foo.rb:0-0:6-3") + assert_entry("Foo::Bar", Entry::Module, "/fake/path/foo.rb:4-2:5-5") end def test_nested_modules_and_classes diff --git a/lib/ruby_indexer/test/method_test.rb b/lib/ruby_indexer/test/method_test.rb index b3e9f97152..4a74a3f367 100644 --- a/lib/ruby_indexer/test/method_test.rb +++ b/lib/ruby_indexer/test/method_test.rb @@ -49,6 +49,28 @@ def String.bar assert_no_entry("bar") end + def test_method_under_dynamic_class_or_module + index(<<~RUBY) + module Foo + class self::Bar + def bar + end + end + end + + module Bar + def bar + end + end + RUBY + + assert_equal(2, @index["bar"].length) + first_entry = T.must(@index["bar"].first) + assert_equal("Foo::self::Bar", first_entry.owner.name) + second_entry = T.must(@index["bar"].last) + assert_equal("Bar", second_entry.owner.name) + end + def test_method_with_parameters index(<<~RUBY) class Foo diff --git a/test/requests/definition_expectations_test.rb b/test/requests/definition_expectations_test.rb index d8ca6b9870..244ed3c17d 100644 --- a/test/requests/definition_expectations_test.rb +++ b/test/requests/definition_expectations_test.rb @@ -344,6 +344,35 @@ def bar end end + def test_methods_with_dynamic_namespace_is_also_suggested + source = <<~RUBY + # typed: false + + class self::A + def foo; end + + def bar + foo + 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 + + assert_equal(1, response.size) + + range = response[0].attributes[:range].attributes + range_hash = { start: range[:start].to_hash, end: range[:end].to_hash } + assert_equal({ start: { line: 3, character: 2 }, end: { line: 3, character: 14 } }, range_hash) + end + end + def test_definitions_are_listed_for_method_with_unknown_receiver source = <<~RUBY # typed: false From 894fd4110b6a63a4d4f62d569fcd5b121f94994b Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Thu, 9 May 2024 13:03:22 -0400 Subject: [PATCH 084/189] Use owner stack to associate owners to methods (#2025) Use owner stack to keep track of method owners --- .../lib/ruby_indexer/declaration_listener.rb | 37 +++++++++++++------ lib/ruby_indexer/test/method_test.rb | 23 ++++++++++++ 2 files changed, 48 insertions(+), 12 deletions(-) diff --git a/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb b/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb index d35b19dd9e..c4fbf51cba 100644 --- a/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb +++ b/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb @@ -11,7 +11,6 @@ class DeclarationListener def initialize(index, dispatcher, parse_result, file_path) @index = index @file_path = file_path - @stack = T.let([], T::Array[String]) @comments_by_line = T.let( parse_result.comments.to_h do |c| [c.location.start_line, c] @@ -19,7 +18,13 @@ def initialize(index, dispatcher, parse_result, file_path) T::Hash[Integer, Prism::Comment], ) @inside_def = T.let(false, T::Boolean) - @current_owner = T.let(nil, T.nilable(Entry::Namespace)) + + # The nesting stack we're currently inside. Used to determine the fully qualified name of constants, but only + # stored by unresolved aliases which need the original nesting to be lazily resolved + @stack = T.let([], T::Array[String]) + + # A stack of namespace entries that represent where we currently are. Used to properly assign methods to an owner + @owner_stack = T.let([], T::Array[Entry::Namespace]) dispatcher.register( self, @@ -55,20 +60,23 @@ def on_class_node_enter(node) superclass.slice end - @current_owner = Entry::Class.new( + entry = Entry::Class.new( fully_qualify_name(name), @file_path, node.location, comments, parent_class, ) - @index << @current_owner + + @owner_stack << entry + @index << entry @stack << name end sig { params(node: Prism::ClassNode).void } def on_class_node_leave(node) @stack.pop + @owner_stack.pop end sig { params(node: Prism::ModuleNode).void } @@ -76,14 +84,17 @@ def on_module_node_enter(node) name = node.constant_path.location.slice comments = collect_comments(node) - @current_owner = Entry::Module.new(fully_qualify_name(name), @file_path, node.location, comments) - @index << @current_owner + entry = Entry::Module.new(fully_qualify_name(name), @file_path, node.location, comments) + + @owner_stack << entry + @index << entry @stack << name end sig { params(node: Prism::ModuleNode).void } def on_module_node_leave(node) @stack.pop + @owner_stack.pop end sig { params(node: Prism::MultiWriteNode).void } @@ -203,7 +214,7 @@ def on_def_node_enter(node) node.location, comments, node.parameters, - @current_owner, + @owner_stack.last, ) when Prism::SelfNode @index << Entry::SingletonMethod.new( @@ -212,7 +223,7 @@ def on_def_node_enter(node) node.location, comments, node.parameters, - @current_owner, + @owner_stack.last, ) end end @@ -343,15 +354,17 @@ def handle_attribute(node, reader:, writer:) next unless name && loc - @index << Entry::Accessor.new(name, @file_path, loc, comments, @current_owner) if reader - @index << Entry::Accessor.new("#{name}=", @file_path, loc, comments, @current_owner) if writer + @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 end end sig { params(node: Prism::CallNode, operation: Symbol).void } def handle_module_operation(node, operation) return if @inside_def - return unless @current_owner + + owner = @owner_stack.last + return unless owner arguments = node.arguments&.arguments return unless arguments @@ -365,7 +378,7 @@ def handle_module_operation(node, operation) # If a constant path reference is dynamic or missing parts, we can't # index it end - collection = operation == :included_modules ? @current_owner.included_modules : @current_owner.prepended_modules + collection = operation == :included_modules ? owner.included_modules : owner.prepended_modules collection.concat(names) end end diff --git a/lib/ruby_indexer/test/method_test.rb b/lib/ruby_indexer/test/method_test.rb index 4a74a3f367..ff1245fa6e 100644 --- a/lib/ruby_indexer/test/method_test.rb +++ b/lib/ruby_indexer/test/method_test.rb @@ -318,5 +318,28 @@ class Foo assert_no_entry("bar") end + + def test_properly_tracks_multiple_levels_of_nesting + index(<<~RUBY) + module Foo + def first; end + + module Bar + def second; end + end + + def third; end + end + RUBY + + entry = T.must(@index["first"]&.first) + assert_equal("Foo", T.must(entry.owner).name) + + entry = T.must(@index["second"]&.first) + assert_equal("Foo::Bar", T.must(entry.owner).name) + + entry = T.must(@index["third"]&.first) + assert_equal("Foo", T.must(entry.owner).name) + end end end From ce5ec29bcbee86323635f61c60519354d54f2d18 Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Fri, 10 May 2024 10:50:42 -0400 Subject: [PATCH 085/189] Add RubyMine note (#2030) Co-authored-by: Andy Waite --- EDITORS.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/EDITORS.md b/EDITORS.md index b9bbf0ac57..0c59108699 100644 --- a/EDITORS.md +++ b/EDITORS.md @@ -181,3 +181,7 @@ 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. + +## RubyMine (not yet supported) + +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. From 76b62a5340a7d35c9730c8ae79bb8726687e6dc7 Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Fri, 10 May 2024 13:59:36 -0400 Subject: [PATCH 086/189] Remove magic comment version handling for tests (#2031) Remove magic comment version handling Co-authored-by: Andy Waite --- .../document_symbol/def_endless.exp.json | 8 ++++---- test/expectations/expectations_test_runner.rb | 18 +----------------- .../selection_ranges/def_endless.exp.json | 14 +++++++------- .../semantic_highlighting/def_endless.exp.json | 2 +- test/fixtures/def_endless.rb | 4 +--- 5 files changed, 14 insertions(+), 32 deletions(-) diff --git a/test/expectations/document_symbol/def_endless.exp.json b/test/expectations/document_symbol/def_endless.exp.json index 4cc3522f29..6f1496ffb1 100644 --- a/test/expectations/document_symbol/def_endless.exp.json +++ b/test/expectations/document_symbol/def_endless.exp.json @@ -5,21 +5,21 @@ "kind": 6, "range": { "start": { - "line": 2, + "line": 0, "character": 0 }, "end": { - "line": 2, + "line": 0, "character": 12 } }, "selectionRange": { "start": { - "line": 2, + "line": 0, "character": 4 }, "end": { - "line": 2, + "line": 0, "character": 7 } }, diff --git a/test/expectations/expectations_test_runner.rb b/test/expectations/expectations_test_runner.rb index 2a1c76a3a3..6b78f48798 100644 --- a/test/expectations/expectations_test_runner.rb +++ b/test/expectations/expectations_test_runner.rb @@ -44,14 +44,7 @@ def default_args raise "multiple expectations for #{test_name}" end - required_ruby_version = ruby_requirement_magic_comment_version(path) - if required_ruby_version && RUBY_VERSION < required_ruby_version - class_eval(<<~RB, __FILE__, __LINE__ + 1) - def test_#{expectation_suffix}__#{test_name} - skip "Fixture requires Ruby v#{required_ruby_version} while currently running v#{RUBY_VERSION}" - end - RB - elsif expectation_path && File.file?(expectation_path) + if expectation_path && File.file?(expectation_path) class_eval(<<~RB, __FILE__, __LINE__ + 1) def test_#{expectation_suffix}__#{test_name} @_path = "#{path}" @@ -91,15 +84,6 @@ def test_#{expectation_suffix}__#{uniq_name_from_path(path)}__does_not_raise def uniq_name_from_path(path) path.gsub("/", "_").gsub('.txt', '') end - - def ruby_requirement_magic_comment_version(fixture_path) - File.read(fixture_path) - .lines - .first - &.match(/^#\s*required_ruby_version:\s*(?\d+\.\d+(\.\d+)?)$/) - &.named_captures - &.fetch("version") - end end private diff --git a/test/expectations/selection_ranges/def_endless.exp.json b/test/expectations/selection_ranges/def_endless.exp.json index 378a449c09..5b458c171e 100644 --- a/test/expectations/selection_ranges/def_endless.exp.json +++ b/test/expectations/selection_ranges/def_endless.exp.json @@ -1,7 +1,7 @@ { "params": [ { - "line": 2, + "line": 0, "character": 2 } ], @@ -9,33 +9,33 @@ { "range": { "start": { - "line": 2, + "line": 0, "character": 0 }, "end": { - "line": 2, + "line": 0, "character": 12 } }, "parent": { "range": { "start": { - "line": 2, + "line": 0, "character": 0 }, "end": { - "line": 2, + "line": 0, "character": 12 } }, "parent": { "range": { "start": { - "line": 2, + "line": 0, "character": 0 }, "end": { - "line": 2, + "line": 0, "character": 12 } } diff --git a/test/expectations/semantic_highlighting/def_endless.exp.json b/test/expectations/semantic_highlighting/def_endless.exp.json index c0038b40a1..1f8de64e18 100644 --- a/test/expectations/semantic_highlighting/def_endless.exp.json +++ b/test/expectations/semantic_highlighting/def_endless.exp.json @@ -1,7 +1,7 @@ { "result": [ { - "delta_line": 2, + "delta_line": 0, "delta_start_char": 4, "length": 3, "token_type": 13, diff --git a/test/fixtures/def_endless.rb b/test/fixtures/def_endless.rb index 499b242a6a..78d31d43ec 100644 --- a/test/fixtures/def_endless.rb +++ b/test/fixtures/def_endless.rb @@ -1,3 +1 @@ -# required_ruby_version: 3.0 - -def baz = 10 \ No newline at end of file +def baz = 10 From 487ec61fbced53adc53387b04344c8961e19b490 Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Fri, 10 May 2024 15:31:28 -0400 Subject: [PATCH 087/189] Add note about logging setting (#2035) Co-authored-by: Andy Waite --- .vscode/settings.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 85331525e1..cfc896113f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,6 @@ { - // Set this value to `verbose` to see the full JSON content of LSP requests and responses + // Set this value to `messages` to see names of LSP requests and responses, + // or to `verbose` to see the full JSON content of LSP requests and responses "ruby lsp.trace.server": "off", "[ruby]": { "editor.defaultFormatter": "Shopify.ruby-lsp" From ba50b3d273bc7f6d19377cfc0265e005915dc93a Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Fri, 10 May 2024 17:08:13 -0400 Subject: [PATCH 088/189] Add note about Zed editor (#2037) --- EDITORS.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/EDITORS.md b/EDITORS.md index 0c59108699..4b549a83c4 100644 --- a/EDITORS.md +++ b/EDITORS.md @@ -182,6 +182,10 @@ 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) + +See https://github.com/zed-industries/zed/issues/4834 for discussion. + ## RubyMine (not yet supported) 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. From 772cf0b106e2c270e5bc540753f0e51b6968ea7a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 02:26:30 +0000 Subject: [PATCH 089/189] Bump the minor-and-patch group in /vscode with 4 updates Bumps the minor-and-patch group in /vscode with 4 updates: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node), [esbuild](https://github.com/evanw/esbuild), [glob](https://github.com/isaacs/node-glob) and [sinon](https://github.com/sinonjs/sinon). Updates `@types/node` from 20.12.8 to 20.12.11 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Updates `esbuild` from 0.20.2 to 0.21.2 - [Release notes](https://github.com/evanw/esbuild/releases) - [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md) - [Commits](https://github.com/evanw/esbuild/compare/v0.20.2...v0.21.2) Updates `glob` from 10.3.12 to 10.3.15 - [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md) - [Commits](https://github.com/isaacs/node-glob/compare/v10.3.12...v10.3.15) Updates `sinon` from 17.0.1 to 17.0.2 - [Release notes](https://github.com/sinonjs/sinon/releases) - [Changelog](https://github.com/sinonjs/sinon/blob/main/docs/changelog.md) - [Commits](https://github.com/sinonjs/sinon/compare/v17.0.1...v17.0.2) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: esbuild dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: glob dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: sinon dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] --- vscode/package.json | 6 +- vscode/yarn.lock | 330 ++++++++++++++++++++++---------------------- 2 files changed, 168 insertions(+), 168 deletions(-) diff --git a/vscode/package.json b/vscode/package.json index 5872f8618b..b21bde94dd 100644 --- a/vscode/package.json +++ b/vscode/package.json @@ -548,16 +548,16 @@ "@typescript-eslint/parser": "^7.8.0", "@vscode/test-electron": "^2.3.9", "@vscode/vsce": "^2.26.1", - "esbuild": "^0.20.2", + "esbuild": "^0.21.2", "eslint": "^8.57.0", "eslint-import-resolver-typescript": "^3.6.1", "eslint-plugin-prettier": "^5.1.3", - "glob": "^10.3.12", + "glob": "^10.3.15", "mocha": "^10.4.0", "ovsx": "^0.9.1", "prettier": "^3.2.5", "typescript": "^5.4.5", - "sinon": "^17.0.1", + "sinon": "^17.0.2", "vscode-oniguruma": "^2.0.1", "vscode-textmate": "^9.0.0" }, diff --git a/vscode/yarn.lock b/vscode/yarn.lock index 5de0184625..4dfb978a35 100644 --- a/vscode/yarn.lock +++ b/vscode/yarn.lock @@ -336,120 +336,120 @@ "@babel/helper-validator-identifier" "^7.24.5" 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.2": + version "0.21.2" + resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.21.2.tgz#7ccd2a552dc4eb740f094a46d18a1b1508b8d37c" + integrity sha512-/c7hocx0pm14bHQlqUVKmxwdT/e5/KkyoY1W8F9lk/8CkE037STDDz8PXUP/LE6faj2HqchvDs9GcShxFhI78Q== + +"@esbuild/android-arm64@0.21.2": + version "0.21.2" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.21.2.tgz#016abbee9f0c6f646b0c6b43b172a5053fe53aab" + integrity sha512-SGZKngoTWVUriO5bDjI4WDGsNx2VKZoXcds+ita/kVYB+8IkSCKDRDaK+5yu0b5S0eq6B3S7fpiEvpsa2ammlQ== + +"@esbuild/android-arm@0.21.2": + version "0.21.2" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.21.2.tgz#99f3a3c90bf8ac37d1881af6b87d404a02007164" + integrity sha512-G1ve3b4FeyJeyCjB4MX1CiWyTaIJwT9wAYE+8+IRA53YoN/reC/Bf2GDRXAzDTnh69Fpl+1uIKg76DiB3U6vwQ== + +"@esbuild/android-x64@0.21.2": + version "0.21.2" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.21.2.tgz#5039e8d0b2ed03ca75d77e581ead591b1d87826f" + integrity sha512-1wzzNoj2QtNkAYwIcWJ66UTRA80+RTQ/kuPMtEuP0X6dp5Ar23Dn566q3aV61h4EYrrgGlOgl/HdcqN/2S/2vg== + +"@esbuild/darwin-arm64@0.21.2": + version "0.21.2" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.21.2.tgz#6f55b81878d2295d7d4ecdbbb5ee418d379fb49a" + integrity sha512-ZyMkPWc5eTROcLOA10lEqdDSTc6ds6nuh3DeHgKip/XJrYjZDfnkCVSty8svWdy+SC1f77ULtVeIqymTzaB6/Q== + +"@esbuild/darwin-x64@0.21.2": + version "0.21.2" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.21.2.tgz#f295d838c60e0e068c7a91e7784674c6b06c358e" + integrity sha512-K4ZdVq1zP9v51h/cKVna7im7G0zGTKKB6bP2yJiSmHjjOykbd8DdhrSi8V978sF69rkwrn8zCyL2t6I3ei6j9A== + +"@esbuild/freebsd-arm64@0.21.2": + version "0.21.2" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.2.tgz#f665703471824e67ff5f62e6c9ed298f3c363b1b" + integrity sha512-4kbOGdpA61CXqadD+Gb/Pw3YXamQGiz9mal/h93rFVSjr5cgMnmJd/gbfPRm+3BMifvnaOfS1gNWaIDxkE2A3A== + +"@esbuild/freebsd-x64@0.21.2": + version "0.21.2" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.21.2.tgz#6493aa56760521125badd41f78369f18c49e367e" + integrity sha512-ShS+R09nuHzDBfPeMUliKZX27Wrmr8UFp93aFf/S8p+++x5BZ+D344CLKXxmY6qzgTL3mILSImPCNJOzD6+RRg== + +"@esbuild/linux-arm64@0.21.2": + version "0.21.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.21.2.tgz#beb96b83bfe32630d34eedc09b8e0722819f1a5b" + integrity sha512-Hdu8BL+AmO+eCDvvT6kz/fPQhvuHL8YK4ExKZfANWsNe1kFGOHw7VJvS/FKSLFqheXmB3rTF3xFQIgUWPYsGnA== + +"@esbuild/linux-arm@0.21.2": + version "0.21.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.21.2.tgz#b1c5176479397b34c36334218063e223b4e588dd" + integrity sha512-nnGXjOAv+7cM3LYRx4tJsYdgy8dGDGkAzF06oIDGppWbUkUKN9SmgQA8H0KukpU0Pjrj9XmgbWqMVSX/U7eeTA== + +"@esbuild/linux-ia32@0.21.2": + version "0.21.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.21.2.tgz#8ce387793eccdc28f5964e19f4dcbdb901099be4" + integrity sha512-m73BOCW2V9lcj7RtEMi+gBfHC6n3+VHpwQXP5offtQMPLDkpVolYn1YGXxOZ9hp4h3UPRKuezL7WkBsw+3EB3Q== + +"@esbuild/linux-loong64@0.21.2": + version "0.21.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.21.2.tgz#c7360523a8e5e04e0b76b6e9a89a91ba573ac613" + integrity sha512-84eYHwwWHq3myIY/6ikALMcnwkf6Qo7NIq++xH0x+cJuUNpdwh8mlpUtRY+JiGUc60yu7ElWBbVHGWTABTclGw== + +"@esbuild/linux-mips64el@0.21.2": + version "0.21.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.21.2.tgz#0adac2cc3451c25817b0c93bf160cd19008ed03a" + integrity sha512-9siSZngT0/ZKG+AH+/agwKF29LdCxw4ODi/PiE0F52B2rtLozlDP92umf8G2GPoVV611LN4pZ+nSTckebOscUA== + +"@esbuild/linux-ppc64@0.21.2": + version "0.21.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.21.2.tgz#d9e79563999288d367eeba2b8194874bef0e8a35" + integrity sha512-y0T4aV2CA+ic04ULya1A/8M2RDpDSK2ckgTj6jzHKFJvCq0jQg8afQQIn4EM0G8u2neyOiNHgSF9YKPfuqKOVw== + +"@esbuild/linux-riscv64@0.21.2": + version "0.21.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.21.2.tgz#34227910d843b399447a48180381425529eae7d6" + integrity sha512-x5ssCdXmZC86L2Li1qQPF/VaC4VP20u/Zm8jlAu9IiVOVi79YsSz6cpPDYZl1rfKSHYCJW9XBfFCo66S5gVPSA== + +"@esbuild/linux-s390x@0.21.2": + version "0.21.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.21.2.tgz#2835f5b9b4c961baf6d6f03a870ab2d5bc3fbfcc" + integrity sha512-NP7fTpGSFWdXyvp8iAFU04uFh9ARoplFVM/m+8lTRpaYG+2ytHPZWyscSsMM6cvObSIK2KoPHXiZD4l99WaxbQ== + +"@esbuild/linux-x64@0.21.2": + version "0.21.2" + resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.21.2.tgz#756282185a936e752a3a80b227a950813fe62ee7" + integrity sha512-giZ/uOxWDKda44ZuyfKbykeXznfuVNkTgXOUOPJIjbayJV6FRpQ4zxUy9JMBPLaK9IJcdWtaoeQrYBMh3Rr4vQ== + +"@esbuild/netbsd-x64@0.21.2": + version "0.21.2" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.21.2.tgz#e1dde3694f5f8fbf2f7696d021c026e601579167" + integrity sha512-IeFMfGFSQfIj1d4XU+6lkbFzMR+mFELUUVYrZ+jvWzG4NGvs6o53ReEHLHpYkjRbdEjJy2W3lTekTxrFHW7YJg== + +"@esbuild/openbsd-x64@0.21.2": + version "0.21.2" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.21.2.tgz#b0a8c1ce0077a5b24c5e4cf1c4417128ae5b6489" + integrity sha512-48QhWD6WxcebNNaE4FCwgvQVUnAycuTd+BdvA/oZu+/MmbpU8pY2dMEYlYzj5uNHWIG5jvdDmFXu0naQeOWUoA== + +"@esbuild/sunos-x64@0.21.2": + version "0.21.2" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.21.2.tgz#fc7dd917ffcb2ebab4f22728a23ece3dd36c2979" + integrity sha512-90r3nTBLgdIgD4FCVV9+cR6Hq2Dzs319icVsln+NTmTVwffWcCqXGml8rAoocHuJ85kZK36DCteii96ba/PX8g== + +"@esbuild/win32-arm64@0.21.2": + version "0.21.2" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.21.2.tgz#251e4cdafae688d54a43ac8544cb8c71e8fcdf15" + integrity sha512-sNndlsBT8OeE/MZDSGpRDJlWuhjuUz/dn80nH0EP4ZzDUYvMDVa7G87DVpweBrn4xdJYyXS/y4CQNrf7R2ODXg== + +"@esbuild/win32-ia32@0.21.2": + version "0.21.2" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.21.2.tgz#1e3a818791b7e93ed353901c83d7cdc901ffcc8a" + integrity sha512-Ti2QChGNFzWhUNNVuU4w21YkYTErsNh3h+CzvlEhzgRbwsJ7TrWQqRzW3bllLKKvTppuF3DJ3XP1GEg11AfrEQ== + +"@esbuild/win32-x64@0.21.2": + version "0.21.2" + resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.21.2.tgz#825b4e7c89b7e7ec64c450ed494a8af7e405a84d" + integrity sha512-VEfTCZicoZnZ6sGkjFPGRFFJuL2fZn2bLhsekZl1CJslflp2cJS/VoKs1jMk+3pDfsGW6CfQVUckP707HwbXeQ== "@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": version "4.4.0" @@ -647,7 +647,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== @@ -709,9 +709,9 @@ 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.12.11" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.11.tgz#c4ef00d3507000d17690643278a60dc55a9dc9be" + integrity sha512-vDg9PZ/zi+Nqp6boSOT7plNuthRugEKixDv5sFTIpkE89MmNtEArAShI4mxuX2+UrLEe9pxC1vm2cjm9YlWbJw== dependencies: undici-types "~5.26.4" @@ -1638,7 +1638,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== @@ -1864,34 +1864,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.2: + version "0.21.2" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.21.2.tgz#6a58b5aa6347eb9e96d060a44e7adaee21bc76c1" + integrity sha512-LmHPAa5h4tSxz+g/D8IHY6wCjtIiFx8I7/Q0Aq+NmvtoYvyMnJU0KQJcqB6QH30X9x/W4CemgUtPgQDZFca5SA== 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.2" + "@esbuild/android-arm" "0.21.2" + "@esbuild/android-arm64" "0.21.2" + "@esbuild/android-x64" "0.21.2" + "@esbuild/darwin-arm64" "0.21.2" + "@esbuild/darwin-x64" "0.21.2" + "@esbuild/freebsd-arm64" "0.21.2" + "@esbuild/freebsd-x64" "0.21.2" + "@esbuild/linux-arm" "0.21.2" + "@esbuild/linux-arm64" "0.21.2" + "@esbuild/linux-ia32" "0.21.2" + "@esbuild/linux-loong64" "0.21.2" + "@esbuild/linux-mips64el" "0.21.2" + "@esbuild/linux-ppc64" "0.21.2" + "@esbuild/linux-riscv64" "0.21.2" + "@esbuild/linux-s390x" "0.21.2" + "@esbuild/linux-x64" "0.21.2" + "@esbuild/netbsd-x64" "0.21.2" + "@esbuild/openbsd-x64" "0.21.2" + "@esbuild/sunos-x64" "0.21.2" + "@esbuild/win32-arm64" "0.21.2" + "@esbuild/win32-ia32" "0.21.2" + "@esbuild/win32-x64" "0.21.2" escalade@^3.1.1: version "3.1.2" @@ -2439,16 +2439,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.3.15: + version "10.3.15" + resolved "https://registry.yarnpkg.com/glob/-/glob-10.3.15.tgz#e72bc61bc3038c90605f5dd48543dc67aaf3b50d" + integrity sha512-0c6RlJt1TICLyvJYIApxb8GsXoai0KUP7AxKKAtsYXdgJR1mGEUa7DgwShbdk1nly0PYoZj01xd4hzbq3fsjpw== dependencies: foreground-child "^3.1.0" jackspeak "^2.3.6" minimatch "^9.0.1" minipass "^7.0.4" - path-scurry "^1.10.2" + path-scurry "^1.11.0" glob@^7.0.6, glob@^7.1.3: version "7.2.3" @@ -3336,7 +3336,7 @@ 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: +nise@^5.1.9: version "5.1.9" resolved "https://registry.yarnpkg.com/nise/-/nise-5.1.9.tgz#0cb73b5e4499d738231a473cd89bd8afbb618139" integrity sha512-qOnoujW4SV6e40dYxJOb3uvuoPHtmLzIk4TFo+j0jPJoC+5Z9xja5qH5JZobEPsa8+YYphMrOSwnrshEhG2qww== @@ -3602,10 +3602,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.0: + 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" @@ -4004,17 +4004,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@^17.0.2: + version "17.0.2" + resolved "https://registry.yarnpkg.com/sinon/-/sinon-17.0.2.tgz#470894bcc2d24b01bad539722ea46da949892405" + integrity sha512-uihLiaB9FhzesElPDFZA7hDcNABzsVHwr3YfmM9sBllVwab3l0ltGlRV1XhpNfIacNDLGD1QRZNLs5nU5+hTuA== 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 "^5.1.9" + supports-color "^7" slash@^3.0.0: version "3.0.0" @@ -4167,7 +4167,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== From dde7dd322c340ce77a0690c23d4afc3ffdb091df Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 02:37:42 +0000 Subject: [PATCH 090/189] Bump the minor-and-patch group with 3 updates Bumps the minor-and-patch group with 3 updates: [rubocop](https://github.com/rubocop/rubocop), [sorbet-static-and-runtime](https://github.com/sorbet/sorbet) and [sorbet-runtime](https://github.com/sorbet/sorbet). Updates `rubocop` from 1.63.4 to 1.63.5 - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop/compare/v1.63.4...v1.63.5) Updates `sorbet-static-and-runtime` from 0.5.11368 to 0.5.11372 - [Release notes](https://github.com/sorbet/sorbet/releases) - [Commits](https://github.com/sorbet/sorbet/commits) Updates `sorbet-runtime` from 0.5.11368 to 0.5.11372 - [Release notes](https://github.com/sorbet/sorbet/releases) - [Commits](https://github.com/sorbet/sorbet/commits) --- updated-dependencies: - dependency-name: rubocop dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: sorbet-static-and-runtime dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: sorbet-runtime dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 97e9aaf589..943ea969f9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -54,11 +54,11 @@ GEM rbi (0.1.12) prism (>= 0.18.0, < 0.28) sorbet-runtime (>= 0.5.9204) - regexp_parser (2.9.0) + regexp_parser (2.9.1) reline (0.5.0) io-console (~> 0.5) rexml (3.2.6) - rubocop (1.63.4) + rubocop (1.63.5) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) @@ -69,8 +69,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,14 +90,14 @@ 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.11372) + sorbet-static (= 0.5.11372) + sorbet-runtime (0.5.11372) + sorbet-static (0.5.11372-universal-darwin) + sorbet-static (0.5.11372-x86_64-linux) + sorbet-static-and-runtime (0.5.11372) + sorbet (= 0.5.11372) + sorbet-runtime (= 0.5.11372) spoom (1.3.0) erubi (>= 1.10.0) prism (>= 0.19.0) @@ -124,8 +124,6 @@ GEM PLATFORMS arm64-darwin - x64-mingw-ucrt - x64-mingw32 x86_64-darwin x86_64-linux From 44f1914b4cc71f844217cd758cfecd817dac060b Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 13 May 2024 02:38:41 +0000 Subject: [PATCH 091/189] Update RBI files for gems 2024-05-13 [dependabot skip] --- ...rser@2.9.0.rbi => regexp_parser@2.9.1.rbi} | 0 ...-ast@1.31.2.rbi => rubocop-ast@1.31.3.rbi} | 24 +-- ...{rubocop@1.63.4.rbi => rubocop@1.63.5.rbi} | 182 +++++++++--------- 3 files changed, 105 insertions(+), 101 deletions(-) rename sorbet/rbi/gems/{regexp_parser@2.9.0.rbi => regexp_parser@2.9.1.rbi} (100%) rename sorbet/rbi/gems/{rubocop-ast@1.31.2.rbi => rubocop-ast@1.31.3.rbi} (99%) rename sorbet/rbi/gems/{rubocop@1.63.4.rbi => rubocop@1.63.5.rbi} (99%) diff --git a/sorbet/rbi/gems/regexp_parser@2.9.0.rbi b/sorbet/rbi/gems/regexp_parser@2.9.1.rbi similarity index 100% rename from sorbet/rbi/gems/regexp_parser@2.9.0.rbi rename to sorbet/rbi/gems/regexp_parser@2.9.1.rbi 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 6846621537..04b45a8a8c 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.63.5.rbi similarity index 99% rename from sorbet/rbi/gems/rubocop@1.63.4.rbi rename to sorbet/rbi/gems/rubocop@1.63.5.rbi index f82db723ef..f5800e52c4 100644 --- a/sorbet/rbi/gems/rubocop@1.63.4.rbi +++ b/sorbet/rbi/gems/rubocop@1.63.5.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 @@ -10711,43 +10711,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 @@ -41830,7 +41830,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 +41848,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 +43156,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 +43178,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 @@ -48935,13 +48940,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 +48982,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 +49008,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. @@ -55701,47 +55705,47 @@ class RuboCop::LSP::Routes # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#168 + # source://rubocop//lib/rubocop/lsp/routes.rb#169 def handle_method_missing(request); end - # source://rubocop//lib/rubocop/lsp/routes.rb#67 + # source://rubocop//lib/rubocop/lsp/routes.rb#68 def handle_shutdown(request); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#157 + # source://rubocop//lib/rubocop/lsp/routes.rb#158 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#207 def diagnostic(file_uri, text); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#176 + # source://rubocop//lib/rubocop/lsp/routes.rb#177 def extract_initialization_options_from(request); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#186 + # source://rubocop//lib/rubocop/lsp/routes.rb#187 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#221 def remove_file_protocol_from(uri); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#224 + # source://rubocop//lib/rubocop/lsp/routes.rb#225 def to_diagnostic(offense); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#236 + # source://rubocop//lib/rubocop/lsp/routes.rb#237 def to_range(location); end class << self From ef193b9fdb3d289319707b225cfd16eb48eb05f3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 02:43:38 +0000 Subject: [PATCH 092/189] Bump test/fixtures/prism from `e418265` to `1f49ca9` Bumps [test/fixtures/prism](https://github.com/ruby/prism) from `e418265` to `1f49ca9`. - [Release notes](https://github.com/ruby/prism/releases) - [Commits](https://github.com/ruby/prism/compare/e418265166975d879efefdf91e868ad35e68e593...1f49ca9a33a43f867b31e79f383e51b33dc11c50) --- updated-dependencies: - dependency-name: test/fixtures/prism dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- test/fixtures/prism | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/fixtures/prism b/test/fixtures/prism index e418265166..1f49ca9a33 160000 --- a/test/fixtures/prism +++ b/test/fixtures/prism @@ -1 +1 @@ -Subproject commit e418265166975d879efefdf91e868ad35e68e593 +Subproject commit 1f49ca9a33a43f867b31e79f383e51b33dc11c50 From a65591e7bd285c00de546452b038a1c5095a14b4 Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Mon, 13 May 2024 10:21:39 -0400 Subject: [PATCH 093/189] Restore Windows platforms --- Gemfile.lock | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Gemfile.lock b/Gemfile.lock index 943ea969f9..4f6fd03648 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -124,6 +124,8 @@ GEM PLATFORMS arm64-darwin + x64-mingw-ucrt + x64-mingw32 x86_64-darwin x86_64-linux From 6d94dee22104b0a4e42f266f0399e66b34b1d1eb Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Tue, 14 May 2024 09:19:38 -0400 Subject: [PATCH 094/189] Update note about Zed (#2046) --- EDITORS.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/EDITORS.md b/EDITORS.md index 4b549a83c4..0954774906 100644 --- a/EDITORS.md +++ b/EDITORS.md @@ -182,9 +182,11 @@ 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 (some limitations) -See https://github.com/zed-industries/zed/issues/4834 for discussion. +[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 (not yet supported) From 5676185cf83b8ae68875c601302b6d10fab98892 Mon Sep 17 00:00:00 2001 From: Sathish Manohar Date: Wed, 15 May 2024 21:51:29 +0530 Subject: [PATCH 095/189] Update README about method definition support (#2047) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 919f072d98..9bde229606 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). From 4c1906172add4d5c39c35d3396aa29c768bfb898 Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Thu, 16 May 2024 11:42:22 +0900 Subject: [PATCH 096/189] Handle constant completion when typing path separator (#2043) --- lib/ruby_lsp/listeners/completion.rb | 116 ++++++++++++++++++--------- lib/ruby_lsp/requests/completion.rb | 2 +- test/requests/completion_test.rb | 24 ++++++ 3 files changed, 101 insertions(+), 41 deletions(-) diff --git a/lib/ruby_lsp/listeners/completion.rb b/lib/ruby_lsp/listeners/completion.rb index e7aff969a4..36108ec668 100644 --- a/lib/ruby_lsp/listeners/completion.rb +++ b/lib/ruby_lsp/listeners/completion.rb @@ -47,7 +47,7 @@ def on_constant_read_node_enter(node) @response_builder << build_entry_completion( complete_name, name, - node, + range_from_location(node.location), entries, top_level?(complete_name), ) @@ -62,6 +62,53 @@ def on_constant_path_node_enter(node) 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 + + 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,8 +118,13 @@ 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("::") + aliased_namespace = if name.end_with?("::") + name.delete_suffix("::") + else + *namespace, incomplete_name = name.split("::") + T.must(namespace).join("::") + end + namespace_entries = @index.resolve(aliased_namespace, @nesting) return unless namespace_entries @@ -88,37 +140,19 @@ def on_constant_path_node_enter(node) 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) - + 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) - end - end - - private - sig { params(node: Prism::CallNode).void } def complete_require(node) arguments_node = node.arguments @@ -223,12 +257,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 +297,22 @@ 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) + unless @nesting.join("::").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 = "#{@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) + end end # When using a top level constant reference (e.g.: `::Bar`), the editor includes the `::` as part of the filter. @@ -286,7 +322,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, diff --git a/lib/ruby_lsp/requests/completion.rb b/lib/ruby_lsp/requests/completion.rb index 2ceda099a4..b00d33a699 100644 --- a/lib/ruby_lsp/requests/completion.rb +++ b/lib/ruby_lsp/requests/completion.rb @@ -35,7 +35,7 @@ class << self def provider Interface::CompletionOptions.new( resolve_provider: true, - trigger_characters: ["/", "\"", "'"], + trigger_characters: ["/", "\"", "'", ":"], completion_item: { labelDetailsSupport: true, }, diff --git a/test/requests/completion_test.rb b/test/requests/completion_test.rb index 703aa7e727..8b68b89c90 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 From 69066e11aeaf2f969044668bfb1b364330369d52 Mon Sep 17 00:00:00 2001 From: Emily Samp Date: Thu, 16 May 2024 13:08:43 -0500 Subject: [PATCH 097/189] Set dependabot `open-pull-requests-limit` to 100 --- .github/dependabot.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 8a7303a0cd..3ddfd21b9c 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: From 082b96ccab21bf673e4f18ca78568a743ce9c2e7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 18:54:03 +0000 Subject: [PATCH 098/189] Bump test/fixtures/prism from `1f49ca9` to `1c8d08b` Bumps [test/fixtures/prism](https://github.com/ruby/prism) from `1f49ca9` to `1c8d08b`. - [Release notes](https://github.com/ruby/prism/releases) - [Commits](https://github.com/ruby/prism/compare/1f49ca9a33a43f867b31e79f383e51b33dc11c50...1c8d08b79108b92cfdd1985a895c437bfbbb003a) --- updated-dependencies: - dependency-name: test/fixtures/prism dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- test/fixtures/prism | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/fixtures/prism b/test/fixtures/prism index 1f49ca9a33..1c8d08b791 160000 --- a/test/fixtures/prism +++ b/test/fixtures/prism @@ -1 +1 @@ -Subproject commit 1f49ca9a33a43f867b31e79f383e51b33dc11c50 +Subproject commit 1c8d08b79108b92cfdd1985a895c437bfbbb003a From 23d95ce0b94de95039d207fa546565dfefd9cbae Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 18:54:53 +0000 Subject: [PATCH 099/189] Bump the minor-and-patch group with 3 updates Bumps the minor-and-patch group with 3 updates: [minitest](https://github.com/minitest/minitest), [sorbet-static-and-runtime](https://github.com/sorbet/sorbet) and [sorbet-runtime](https://github.com/sorbet/sorbet). Updates `minitest` from 5.22.3 to 5.23.0 - [Changelog](https://github.com/minitest/minitest/blob/master/History.rdoc) - [Commits](https://github.com/minitest/minitest/compare/v5.22.3...v5.23.0) Updates `sorbet-static-and-runtime` from 0.5.11372 to 0.5.11380 - [Release notes](https://github.com/sorbet/sorbet/releases) - [Commits](https://github.com/sorbet/sorbet/commits) Updates `sorbet-runtime` from 0.5.11372 to 0.5.11380 - [Release notes](https://github.com/sorbet/sorbet/releases) - [Commits](https://github.com/sorbet/sorbet/commits) --- updated-dependencies: - dependency-name: minitest dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: sorbet-static-and-runtime dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: sorbet-runtime dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] --- Gemfile | 2 +- Gemfile.lock | 22 ++++++++++------------ 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/Gemfile b/Gemfile index 27d8f0fc86..040aa2f719 100644 --- a/Gemfile +++ b/Gemfile @@ -8,7 +8,7 @@ group :development do gem "bundler", "~> 2.5" gem "debug", "~> 1.9", require: false gem "minitest-reporters", "~> 1.6" - gem "minitest", "~> 5.22" + gem "minitest", "~> 5.23" gem "mocha", "~> 2.2" gem "psych", "~> 5.1", require: false gem "rake", "~> 13.2" diff --git a/Gemfile.lock b/Gemfile.lock index 4f6fd03648..43f0026d7c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -31,7 +31,7 @@ GEM reline (>= 0.4.2) json (2.7.2) language_server-protocol (3.17.0.3) - minitest (5.22.3) + minitest (5.23.0) minitest-reporters (1.6.1) ansi builder @@ -90,14 +90,14 @@ GEM simplecov_json_formatter (~> 0.1) simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) - sorbet (0.5.11372) - sorbet-static (= 0.5.11372) - sorbet-runtime (0.5.11372) - sorbet-static (0.5.11372-universal-darwin) - sorbet-static (0.5.11372-x86_64-linux) - sorbet-static-and-runtime (0.5.11372) - sorbet (= 0.5.11372) - sorbet-runtime (= 0.5.11372) + sorbet (0.5.11380) + sorbet-static (= 0.5.11380) + sorbet-runtime (0.5.11380) + sorbet-static (0.5.11380-universal-darwin) + sorbet-static (0.5.11380-x86_64-linux) + sorbet-static-and-runtime (0.5.11380) + sorbet (= 0.5.11380) + sorbet-runtime (= 0.5.11380) spoom (1.3.0) erubi (>= 1.10.0) prism (>= 0.19.0) @@ -124,15 +124,13 @@ GEM PLATFORMS arm64-darwin - x64-mingw-ucrt - x64-mingw32 x86_64-darwin x86_64-linux DEPENDENCIES bundler (~> 2.5) debug (~> 1.9) - minitest (~> 5.22) + minitest (~> 5.23) minitest-reporters (~> 1.6) mocha (~> 2.2) psych (~> 5.1) From 031cf9ad0479951ed1b7f4fcf189110d55c1ba7d Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 16 May 2024 18:55:22 +0000 Subject: [PATCH 100/189] Update RBI files for gems 2024-05-16 [dependabot skip] --- ...initest@5.22.3.rbi => minitest@5.23.0.rbi} | 300 ++++++++++-------- 1 file changed, 159 insertions(+), 141 deletions(-) rename sorbet/rbi/gems/{minitest@5.22.3.rbi => minitest@5.23.0.rbi} (86%) diff --git a/sorbet/rbi/gems/minitest@5.22.3.rbi b/sorbet/rbi/gems/minitest@5.23.0.rbi similarity index 86% rename from sorbet/rbi/gems/minitest@5.22.3.rbi rename to sorbet/rbi/gems/minitest@5.23.0.rbi index a78f7d6c25..a9c1d0cd3f 100644 --- a/sorbet/rbi/gems/minitest@5.22.3.rbi +++ b/sorbet/rbi/gems/minitest@5.23.0.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) From cf417cc080c8830cad52bfd05ddd8dae815981bc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 18:55:36 +0000 Subject: [PATCH 101/189] Bump the minor-and-patch group in /vscode with 5 updates Bumps the minor-and-patch group in /vscode with 5 updates: | Package | From | To | | --- | --- | --- | | [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `20.12.11` | `20.12.12` | | [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) | `7.8.0` | `7.9.0` | | [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) | `7.8.0` | `7.9.0` | | [@vscode/test-electron](https://github.com/Microsoft/vscode-test) | `2.3.9` | `2.3.10` | | [esbuild](https://github.com/evanw/esbuild) | `0.21.2` | `0.21.3` | Updates `@types/node` from 20.12.11 to 20.12.12 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Updates `@typescript-eslint/eslint-plugin` from 7.8.0 to 7.9.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.9.0/packages/eslint-plugin) Updates `@typescript-eslint/parser` from 7.8.0 to 7.9.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.9.0/packages/parser) Updates `@vscode/test-electron` from 2.3.9 to 2.3.10 - [Changelog](https://github.com/microsoft/vscode-test/blob/main/CHANGELOG.md) - [Commits](https://github.com/Microsoft/vscode-test/compare/v2.3.9...v2.3.10) Updates `esbuild` from 0.21.2 to 0.21.3 - [Release notes](https://github.com/evanw/esbuild/releases) - [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md) - [Commits](https://github.com/evanw/esbuild/compare/v0.21.2...v0.21.3) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: "@typescript-eslint/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: "@typescript-eslint/parser" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: "@vscode/test-electron" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: esbuild dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] --- vscode/package.json | 8 +- vscode/yarn.lock | 405 ++++++++++++++++++++++---------------------- 2 files changed, 204 insertions(+), 209 deletions(-) diff --git a/vscode/package.json b/vscode/package.json index b21bde94dd..88fce6b454 100644 --- a/vscode/package.json +++ b/vscode/package.json @@ -544,11 +544,11 @@ "@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", + "@typescript-eslint/eslint-plugin": "^7.9.0", + "@typescript-eslint/parser": "^7.9.0", + "@vscode/test-electron": "^2.3.10", "@vscode/vsce": "^2.26.1", - "esbuild": "^0.21.2", + "esbuild": "^0.21.3", "eslint": "^8.57.0", "eslint-import-resolver-typescript": "^3.6.1", "eslint-plugin-prettier": "^5.1.3", diff --git a/vscode/yarn.lock b/vscode/yarn.lock index 4dfb978a35..ad5a043272 100644 --- a/vscode/yarn.lock +++ b/vscode/yarn.lock @@ -336,120 +336,120 @@ "@babel/helper-validator-identifier" "^7.24.5" to-fast-properties "^2.0.0" -"@esbuild/aix-ppc64@0.21.2": - version "0.21.2" - resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.21.2.tgz#7ccd2a552dc4eb740f094a46d18a1b1508b8d37c" - integrity sha512-/c7hocx0pm14bHQlqUVKmxwdT/e5/KkyoY1W8F9lk/8CkE037STDDz8PXUP/LE6faj2HqchvDs9GcShxFhI78Q== - -"@esbuild/android-arm64@0.21.2": - version "0.21.2" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.21.2.tgz#016abbee9f0c6f646b0c6b43b172a5053fe53aab" - integrity sha512-SGZKngoTWVUriO5bDjI4WDGsNx2VKZoXcds+ita/kVYB+8IkSCKDRDaK+5yu0b5S0eq6B3S7fpiEvpsa2ammlQ== - -"@esbuild/android-arm@0.21.2": - version "0.21.2" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.21.2.tgz#99f3a3c90bf8ac37d1881af6b87d404a02007164" - integrity sha512-G1ve3b4FeyJeyCjB4MX1CiWyTaIJwT9wAYE+8+IRA53YoN/reC/Bf2GDRXAzDTnh69Fpl+1uIKg76DiB3U6vwQ== - -"@esbuild/android-x64@0.21.2": - version "0.21.2" - resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.21.2.tgz#5039e8d0b2ed03ca75d77e581ead591b1d87826f" - integrity sha512-1wzzNoj2QtNkAYwIcWJ66UTRA80+RTQ/kuPMtEuP0X6dp5Ar23Dn566q3aV61h4EYrrgGlOgl/HdcqN/2S/2vg== - -"@esbuild/darwin-arm64@0.21.2": - version "0.21.2" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.21.2.tgz#6f55b81878d2295d7d4ecdbbb5ee418d379fb49a" - integrity sha512-ZyMkPWc5eTROcLOA10lEqdDSTc6ds6nuh3DeHgKip/XJrYjZDfnkCVSty8svWdy+SC1f77ULtVeIqymTzaB6/Q== - -"@esbuild/darwin-x64@0.21.2": - version "0.21.2" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.21.2.tgz#f295d838c60e0e068c7a91e7784674c6b06c358e" - integrity sha512-K4ZdVq1zP9v51h/cKVna7im7G0zGTKKB6bP2yJiSmHjjOykbd8DdhrSi8V978sF69rkwrn8zCyL2t6I3ei6j9A== - -"@esbuild/freebsd-arm64@0.21.2": - version "0.21.2" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.2.tgz#f665703471824e67ff5f62e6c9ed298f3c363b1b" - integrity sha512-4kbOGdpA61CXqadD+Gb/Pw3YXamQGiz9mal/h93rFVSjr5cgMnmJd/gbfPRm+3BMifvnaOfS1gNWaIDxkE2A3A== - -"@esbuild/freebsd-x64@0.21.2": - version "0.21.2" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.21.2.tgz#6493aa56760521125badd41f78369f18c49e367e" - integrity sha512-ShS+R09nuHzDBfPeMUliKZX27Wrmr8UFp93aFf/S8p+++x5BZ+D344CLKXxmY6qzgTL3mILSImPCNJOzD6+RRg== - -"@esbuild/linux-arm64@0.21.2": - version "0.21.2" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.21.2.tgz#beb96b83bfe32630d34eedc09b8e0722819f1a5b" - integrity sha512-Hdu8BL+AmO+eCDvvT6kz/fPQhvuHL8YK4ExKZfANWsNe1kFGOHw7VJvS/FKSLFqheXmB3rTF3xFQIgUWPYsGnA== - -"@esbuild/linux-arm@0.21.2": - version "0.21.2" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.21.2.tgz#b1c5176479397b34c36334218063e223b4e588dd" - integrity sha512-nnGXjOAv+7cM3LYRx4tJsYdgy8dGDGkAzF06oIDGppWbUkUKN9SmgQA8H0KukpU0Pjrj9XmgbWqMVSX/U7eeTA== - -"@esbuild/linux-ia32@0.21.2": - version "0.21.2" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.21.2.tgz#8ce387793eccdc28f5964e19f4dcbdb901099be4" - integrity sha512-m73BOCW2V9lcj7RtEMi+gBfHC6n3+VHpwQXP5offtQMPLDkpVolYn1YGXxOZ9hp4h3UPRKuezL7WkBsw+3EB3Q== - -"@esbuild/linux-loong64@0.21.2": - version "0.21.2" - resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.21.2.tgz#c7360523a8e5e04e0b76b6e9a89a91ba573ac613" - integrity sha512-84eYHwwWHq3myIY/6ikALMcnwkf6Qo7NIq++xH0x+cJuUNpdwh8mlpUtRY+JiGUc60yu7ElWBbVHGWTABTclGw== - -"@esbuild/linux-mips64el@0.21.2": - version "0.21.2" - resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.21.2.tgz#0adac2cc3451c25817b0c93bf160cd19008ed03a" - integrity sha512-9siSZngT0/ZKG+AH+/agwKF29LdCxw4ODi/PiE0F52B2rtLozlDP92umf8G2GPoVV611LN4pZ+nSTckebOscUA== - -"@esbuild/linux-ppc64@0.21.2": - version "0.21.2" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.21.2.tgz#d9e79563999288d367eeba2b8194874bef0e8a35" - integrity sha512-y0T4aV2CA+ic04ULya1A/8M2RDpDSK2ckgTj6jzHKFJvCq0jQg8afQQIn4EM0G8u2neyOiNHgSF9YKPfuqKOVw== - -"@esbuild/linux-riscv64@0.21.2": - version "0.21.2" - resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.21.2.tgz#34227910d843b399447a48180381425529eae7d6" - integrity sha512-x5ssCdXmZC86L2Li1qQPF/VaC4VP20u/Zm8jlAu9IiVOVi79YsSz6cpPDYZl1rfKSHYCJW9XBfFCo66S5gVPSA== - -"@esbuild/linux-s390x@0.21.2": - version "0.21.2" - resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.21.2.tgz#2835f5b9b4c961baf6d6f03a870ab2d5bc3fbfcc" - integrity sha512-NP7fTpGSFWdXyvp8iAFU04uFh9ARoplFVM/m+8lTRpaYG+2ytHPZWyscSsMM6cvObSIK2KoPHXiZD4l99WaxbQ== - -"@esbuild/linux-x64@0.21.2": - version "0.21.2" - resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.21.2.tgz#756282185a936e752a3a80b227a950813fe62ee7" - integrity sha512-giZ/uOxWDKda44ZuyfKbykeXznfuVNkTgXOUOPJIjbayJV6FRpQ4zxUy9JMBPLaK9IJcdWtaoeQrYBMh3Rr4vQ== - -"@esbuild/netbsd-x64@0.21.2": - version "0.21.2" - resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.21.2.tgz#e1dde3694f5f8fbf2f7696d021c026e601579167" - integrity sha512-IeFMfGFSQfIj1d4XU+6lkbFzMR+mFELUUVYrZ+jvWzG4NGvs6o53ReEHLHpYkjRbdEjJy2W3lTekTxrFHW7YJg== - -"@esbuild/openbsd-x64@0.21.2": - version "0.21.2" - resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.21.2.tgz#b0a8c1ce0077a5b24c5e4cf1c4417128ae5b6489" - integrity sha512-48QhWD6WxcebNNaE4FCwgvQVUnAycuTd+BdvA/oZu+/MmbpU8pY2dMEYlYzj5uNHWIG5jvdDmFXu0naQeOWUoA== - -"@esbuild/sunos-x64@0.21.2": - version "0.21.2" - resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.21.2.tgz#fc7dd917ffcb2ebab4f22728a23ece3dd36c2979" - integrity sha512-90r3nTBLgdIgD4FCVV9+cR6Hq2Dzs319icVsln+NTmTVwffWcCqXGml8rAoocHuJ85kZK36DCteii96ba/PX8g== - -"@esbuild/win32-arm64@0.21.2": - version "0.21.2" - resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.21.2.tgz#251e4cdafae688d54a43ac8544cb8c71e8fcdf15" - integrity sha512-sNndlsBT8OeE/MZDSGpRDJlWuhjuUz/dn80nH0EP4ZzDUYvMDVa7G87DVpweBrn4xdJYyXS/y4CQNrf7R2ODXg== - -"@esbuild/win32-ia32@0.21.2": - version "0.21.2" - resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.21.2.tgz#1e3a818791b7e93ed353901c83d7cdc901ffcc8a" - integrity sha512-Ti2QChGNFzWhUNNVuU4w21YkYTErsNh3h+CzvlEhzgRbwsJ7TrWQqRzW3bllLKKvTppuF3DJ3XP1GEg11AfrEQ== - -"@esbuild/win32-x64@0.21.2": - version "0.21.2" - resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.21.2.tgz#825b4e7c89b7e7ec64c450ed494a8af7e405a84d" - integrity sha512-VEfTCZicoZnZ6sGkjFPGRFFJuL2fZn2bLhsekZl1CJslflp2cJS/VoKs1jMk+3pDfsGW6CfQVUckP707HwbXeQ== +"@esbuild/aix-ppc64@0.21.3": + version "0.21.3" + resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.21.3.tgz#78d3e6dcd19c1cb91f3940143e86dad1094aee81" + integrity sha512-yTgnwQpFVYfvvo4SvRFB0SwrW8YjOxEoT7wfMT7Ol5v7v5LDNvSGo67aExmxOb87nQNeWPVvaGBNfQ7BXcrZ9w== + +"@esbuild/android-arm64@0.21.3": + version "0.21.3" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.21.3.tgz#5eea56c21d61734942e050840d881eb7bedc3993" + integrity sha512-c+ty9necz3zB1Y+d/N+mC6KVVkGUUOcm4ZmT5i/Fk5arOaY3i6CA3P5wo/7+XzV8cb4GrI/Zjp8NuOQ9Lfsosw== + +"@esbuild/android-arm@0.21.3": + version "0.21.3" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.21.3.tgz#7fda92e3231043c071ea6aa76c92accea86439fd" + integrity sha512-bviJOLMgurLJtF1/mAoJLxDZDL6oU5/ztMHnJQRejbJrSc9FFu0QoUoFhvi6qSKJEw9y5oGyvr9fuDtzJ30rNQ== + +"@esbuild/android-x64@0.21.3": + version "0.21.3" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.21.3.tgz#625d139bde81b81f54ff493b1381ca0f540200f3" + integrity sha512-JReHfYCRK3FVX4Ra+y5EBH1b9e16TV2OxrPAvzMsGeES0X2Ndm9ImQRI4Ket757vhc5XBOuGperw63upesclRw== + +"@esbuild/darwin-arm64@0.21.3": + version "0.21.3" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.21.3.tgz#fa25f38a43ff4c469589d1dc93448d534d7f313b" + integrity sha512-U3fuQ0xNiAkXOmQ6w5dKpEvXQRSpHOnbw7gEfHCRXPeTKW9sBzVck6C5Yneb8LfJm0l6le4NQfkNPnWMSlTFUQ== + +"@esbuild/darwin-x64@0.21.3": + version "0.21.3" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.21.3.tgz#2e450b8214f179a56b4559b2f107060e2b792c7e" + integrity sha512-3m1CEB7F07s19wmaMNI2KANLcnaqryJxO1fXHUV5j1rWn+wMxdUYoPyO2TnAbfRZdi7ADRwJClmOwgT13qlP3Q== + +"@esbuild/freebsd-arm64@0.21.3": + version "0.21.3" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.3.tgz#f6b29e07bce25c545f6f7bb031d3be6a6ea1dc50" + integrity sha512-fsNAAl5pU6wmKHq91cHWQT0Fz0vtyE1JauMzKotrwqIKAswwP5cpHUCxZNSTuA/JlqtScq20/5KZ+TxQdovU/g== + +"@esbuild/freebsd-x64@0.21.3": + version "0.21.3" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.21.3.tgz#1a5da2bf89f8d67102820d893d271a270ae55751" + integrity sha512-tci+UJ4zP5EGF4rp8XlZIdq1q1a/1h9XuronfxTMCNBslpCtmk97Q/5qqy1Mu4zIc0yswN/yP/BLX+NTUC1bXA== + +"@esbuild/linux-arm64@0.21.3": + version "0.21.3" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.21.3.tgz#355f6624c1ac6f5f68841a327ac90b98c679626c" + integrity sha512-vvG6R5g5ieB4eCJBQevyDMb31LMHthLpXTc2IGkFnPWS/GzIFDnaYFp558O+XybTmYrVjxnryru7QRleJvmZ6Q== + +"@esbuild/linux-arm@0.21.3": + version "0.21.3" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.21.3.tgz#872a476ca18a962a98700024c447a79279db1d45" + integrity sha512-f6kz2QpSuyHHg01cDawj0vkyMwuIvN62UAguQfnNVzbge2uWLhA7TCXOn83DT0ZvyJmBI943MItgTovUob36SQ== + +"@esbuild/linux-ia32@0.21.3": + version "0.21.3" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.21.3.tgz#da713eb80ff6c011ed01aa4deebb5fc758906046" + integrity sha512-HjCWhH7K96Na+66TacDLJmOI9R8iDWDDiqe17C7znGvvE4sW1ECt9ly0AJ3dJH62jHyVqW9xpxZEU1jKdt+29A== + +"@esbuild/linux-loong64@0.21.3": + version "0.21.3" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.21.3.tgz#a7c5dc9e961009018d23ec53a43baa8c03c5a1d5" + integrity sha512-BGpimEccmHBZRcAhdlRIxMp7x9PyJxUtj7apL2IuoG9VxvU/l/v1z015nFs7Si7tXUwEsvjc1rOJdZCn4QTU+Q== + +"@esbuild/linux-mips64el@0.21.3": + version "0.21.3" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.21.3.tgz#b97543f3d8655365729f3702ed07f6e41be5e48e" + integrity sha512-5rMOWkp7FQGtAH3QJddP4w3s47iT20hwftqdm7b+loe95o8JU8ro3qZbhgMRy0VuFU0DizymF1pBKkn3YHWtsw== + +"@esbuild/linux-ppc64@0.21.3": + version "0.21.3" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.21.3.tgz#23b9064d5bc0bf28a115a2f9cf69f3b01cdfe01c" + integrity sha512-h0zj1ldel89V5sjPLo5H1SyMzp4VrgN1tPkN29TmjvO1/r0MuMRwJxL8QY05SmfsZRs6TF0c/IDH3u7XYYmbAg== + +"@esbuild/linux-riscv64@0.21.3": + version "0.21.3" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.21.3.tgz#4f2536327f6d444c0573bd35bbd3a67897dbd5da" + integrity sha512-dkAKcTsTJ+CRX6bnO17qDJbLoW37npd5gSNtSzjYQr0svghLJYGYB0NF1SNcU1vDcjXLYS5pO4qOW4YbFama4A== + +"@esbuild/linux-s390x@0.21.3": + version "0.21.3" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.21.3.tgz#05e6f3a12a0dcd60672f25e8789a83cd3affa487" + integrity sha512-vnD1YUkovEdnZWEuMmy2X2JmzsHQqPpZElXx6dxENcIwTu+Cu5ERax6+Ke1QsE814Zf3c6rxCfwQdCTQ7tPuXA== + +"@esbuild/linux-x64@0.21.3": + version "0.21.3" + resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.21.3.tgz#994d347e7f530c33628e35e48ccde8f299adbcb6" + integrity sha512-IOXOIm9WaK7plL2gMhsWJd+l2bfrhfilv0uPTptoRoSb2p09RghhQQp9YY6ZJhk/kqmeRt6siRdMSLLwzuT0KQ== + +"@esbuild/netbsd-x64@0.21.3": + version "0.21.3" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.21.3.tgz#309d8c323632e9c70ee92cf5414fa65b5eb7e00e" + integrity sha512-uTgCwsvQ5+vCQnqM//EfDSuomo2LhdWhFPS8VL8xKf+PKTCrcT/2kPPoWMTs22aB63MLdGMJiE3f1PHvCDmUOw== + +"@esbuild/openbsd-x64@0.21.3": + version "0.21.3" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.21.3.tgz#28820f9431fe00f2b04aac57511754213ff060eb" + integrity sha512-vNAkR17Ub2MgEud2Wag/OE4HTSI6zlb291UYzHez/psiKarp0J8PKGDnAhMBcHFoOHMXHfExzmjMojJNbAStrQ== + +"@esbuild/sunos-x64@0.21.3": + version "0.21.3" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.21.3.tgz#a1f7f98b85bd221fe0f545d01abc0e6123ae60dc" + integrity sha512-W8H9jlGiSBomkgmouaRoTXo49j4w4Kfbl6I1bIdO/vT0+0u4f20ko3ELzV3hPI6XV6JNBVX+8BC+ajHkvffIJA== + +"@esbuild/win32-arm64@0.21.3": + version "0.21.3" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.21.3.tgz#c6c3c0b1a1dfc6327ef4db6aa4fb6efd9df531f7" + integrity sha512-EjEomwyLSCg8Ag3LDILIqYCZAq/y3diJ04PnqGRgq8/4O3VNlXyMd54j/saShaN4h5o5mivOjAzmU6C3X4v0xw== + +"@esbuild/win32-ia32@0.21.3": + version "0.21.3" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.21.3.tgz#471b8d2cad1bd6479eee5acf04bba2c0e4d37e24" + integrity sha512-WGiE/GgbsEwR33++5rzjiYsKyHywE8QSZPF7Rfx9EBfK3Qn3xyR6IjyCr5Uk38Kg8fG4/2phN7sXp4NPWd3fcw== + +"@esbuild/win32-x64@0.21.3": + version "0.21.3" + resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.21.3.tgz#899c03576c4c28c83228f0e64dfa10edae99c9a2" + integrity sha512-xRxC0jaJWDLYvcUvjQmHCJSfMrgmUuvsoXgDeU/wTorQ1ngDdUBuFtgY3W1Pc5sprGAvZBtWdJX7RPg/iZZUqA== "@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": version "4.4.0" @@ -688,7 +688,7 @@ "@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": +"@types/json-schema@^7.0.12", "@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== @@ -709,13 +709,13 @@ integrity sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg== "@types/node@*", "@types/node@20.x": - version "20.12.11" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.11.tgz#c4ef00d3507000d17690643278a60dc55a9dc9be" - integrity sha512-vDg9PZ/zi+Nqp6boSOT7plNuthRugEKixDv5sFTIpkE89MmNtEArAShI4mxuX2+UrLEe9pxC1vm2cjm9YlWbJw== + version "20.12.12" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.12.tgz#7cbecdf902085cec634fdb362172dfe12b8f2050" + integrity sha512-eWLDGF/FOSPtAvEqeRAQ4C8LSA7M1I7i0ky1I8U7kD1J5ITyW3AsRhQrKVoWf5pFKZ2kILsEGJhsI9r93PYnOw== dependencies: undici-types "~5.26.4" -"@types/semver@^7.3.12", "@types/semver@^7.5.0", "@types/semver@^7.5.8": +"@types/semver@^7.3.12", "@types/semver@^7.5.0": version "7.5.8" resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.8.tgz#8268a8c57a3e4abd25c165ecd36237db7948a55e" integrity sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ== @@ -754,21 +754,19 @@ 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.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.9.0.tgz#093b96fc4e342226e65d5f18f9c87081e0b04a31" + integrity sha512-6e+X0X3sFe/G/54aC3jt0txuMTURqLyekmEHViqyA2VnxhLMpvA6nqmcjIy+Cr9tLDHPssA74BP5Mx9HQIxBEA== 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.9.0" + "@typescript-eslint/type-utils" "7.9.0" + "@typescript-eslint/utils" "7.9.0" + "@typescript-eslint/visitor-keys" "7.9.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": @@ -782,15 +780,15 @@ "@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.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.9.0.tgz#fb3ba01b75e0e65cb78037a360961b00301f6c70" + integrity sha512-qHMJfkL5qvgQB2aLvhUSXxbK7OLnDkwPzFalg458pxQgfxKDfT1ZDbHQM/I6mDIf/svlMkj21kzKuQ2ixJlatQ== 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.9.0" + "@typescript-eslint/types" "7.9.0" + "@typescript-eslint/typescript-estree" "7.9.0" + "@typescript-eslint/visitor-keys" "7.9.0" debug "^4.3.4" "@typescript-eslint/scope-manager@5.62.0": @@ -809,13 +807,13 @@ "@typescript-eslint/types" "6.21.0" "@typescript-eslint/visitor-keys" "6.21.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/scope-manager@7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.9.0.tgz#1dd3e63a4411db356a9d040e75864851b5f2619b" + integrity sha512-ZwPK4DeCDxr3GJltRz5iZejPFAAr4Wk3+2WIBaj1L5PYK5RgxExu/Y68FFVclN0y6GGwH8q+KgKRCvaTmFBbgQ== dependencies: - "@typescript-eslint/types" "7.8.0" - "@typescript-eslint/visitor-keys" "7.8.0" + "@typescript-eslint/types" "7.9.0" + "@typescript-eslint/visitor-keys" "7.9.0" "@typescript-eslint/type-utils@6.21.0": version "6.21.0" @@ -827,13 +825,13 @@ 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== +"@typescript-eslint/type-utils@7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.9.0.tgz#f523262e1b66ca65540b7a65a1222db52e0a90c9" + integrity sha512-6Qy8dfut0PFrFRAZsGzuLoM4hre4gjzWJB6sUvdunCYZsYemTkzZNwF1rnGea326PHPT3zn5Lmg32M/xfJfByA== dependencies: - "@typescript-eslint/typescript-estree" "7.8.0" - "@typescript-eslint/utils" "7.8.0" + "@typescript-eslint/typescript-estree" "7.9.0" + "@typescript-eslint/utils" "7.9.0" debug "^4.3.4" ts-api-utils "^1.3.0" @@ -847,10 +845,10 @@ 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/types@7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.9.0.tgz#b58e485e4bfba055659c7e683ad4f5f0821ae2ec" + integrity sha512-oZQD9HEWQanl9UfsbGVcZ2cGaR0YT5476xfWE0oE5kQa2sNK2frxOlkeacLOTh9po4AlUT5rtkGyYM5kew0z5w== "@typescript-eslint/typescript-estree@5.62.0": version "5.62.0" @@ -879,13 +877,13 @@ semver "^7.5.4" ts-api-utils "^1.0.1" -"@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.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.9.0.tgz#3395e27656060dc313a6b406c3a298b729685e07" + integrity sha512-zBCMCkrb2YjpKV3LA0ZJubtKCDxLttxfdGmwZvTqqWevUPN0FZvSI26FalGFFUZU/9YQK/A4xcQF9o/VVaCKAg== dependencies: - "@typescript-eslint/types" "7.8.0" - "@typescript-eslint/visitor-keys" "7.8.0" + "@typescript-eslint/types" "7.9.0" + "@typescript-eslint/visitor-keys" "7.9.0" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" @@ -906,18 +904,15 @@ "@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== +"@typescript-eslint/utils@7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.9.0.tgz#1b96a34eefdca1c820cb1bbc2751d848b4540899" + integrity sha512-5KVRQCzZajmT4Ep+NEgjXCvjuypVvYHUW7RHlXzNPuak2oWpVoD1jf5xCP0dPAuNIchjC7uQyvbdaSTFaLqSdA== 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/scope-manager" "7.9.0" + "@typescript-eslint/types" "7.9.0" + "@typescript-eslint/typescript-estree" "7.9.0" "@typescript-eslint/utils@^5.10.0": version "5.62.0" @@ -949,12 +944,12 @@ "@typescript-eslint/types" "6.21.0" eslint-visitor-keys "^3.4.1" -"@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.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.9.0.tgz#82162656e339c3def02895f5c8546f6888d9b9ea" + integrity sha512-iESPx2TNLDNGQLyjKhUvIKprlP49XNEK+MvIf9nIO7ZZaZdbnfWKHnXAgufpxqfA0YryH8XToi4+CjBgVnFTSQ== dependencies: - "@typescript-eslint/types" "7.8.0" + "@typescript-eslint/types" "7.9.0" eslint-visitor-keys "^3.4.3" "@ungap/structured-clone@^1.2.0": @@ -962,10 +957,10 @@ 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.3.10": + version "2.3.10" + resolved "https://registry.yarnpkg.com/@vscode/test-electron/-/test-electron-2.3.10.tgz#c63e2437ec4d65ff56c7cfcb4dfceb0e883ef473" + integrity sha512-FxMqrvUm6a8S5tP4CymNJ40e6kD+wUTWTc6K32U629yrCCa+kl/rmpkC2gKpN4F4zjg1r+0Hnk9sl0+N2atsYA== dependencies: http-proxy-agent "^4.0.1" https-proxy-agent "^5.0.0" @@ -1864,34 +1859,34 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" -esbuild@^0.21.2: - version "0.21.2" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.21.2.tgz#6a58b5aa6347eb9e96d060a44e7adaee21bc76c1" - integrity sha512-LmHPAa5h4tSxz+g/D8IHY6wCjtIiFx8I7/Q0Aq+NmvtoYvyMnJU0KQJcqB6QH30X9x/W4CemgUtPgQDZFca5SA== +esbuild@^0.21.3: + version "0.21.3" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.21.3.tgz#cbb10b100c768b0cfb35d61d9e70324553437c38" + integrity sha512-Kgq0/ZsAPzKrbOjCQcjoSmPoWhlcVnGAUo7jvaLHoxW1Drto0KGkR1xBNg2Cp43b9ImvxmPEJZ9xkfcnqPsfBw== optionalDependencies: - "@esbuild/aix-ppc64" "0.21.2" - "@esbuild/android-arm" "0.21.2" - "@esbuild/android-arm64" "0.21.2" - "@esbuild/android-x64" "0.21.2" - "@esbuild/darwin-arm64" "0.21.2" - "@esbuild/darwin-x64" "0.21.2" - "@esbuild/freebsd-arm64" "0.21.2" - "@esbuild/freebsd-x64" "0.21.2" - "@esbuild/linux-arm" "0.21.2" - "@esbuild/linux-arm64" "0.21.2" - "@esbuild/linux-ia32" "0.21.2" - "@esbuild/linux-loong64" "0.21.2" - "@esbuild/linux-mips64el" "0.21.2" - "@esbuild/linux-ppc64" "0.21.2" - "@esbuild/linux-riscv64" "0.21.2" - "@esbuild/linux-s390x" "0.21.2" - "@esbuild/linux-x64" "0.21.2" - "@esbuild/netbsd-x64" "0.21.2" - "@esbuild/openbsd-x64" "0.21.2" - "@esbuild/sunos-x64" "0.21.2" - "@esbuild/win32-arm64" "0.21.2" - "@esbuild/win32-ia32" "0.21.2" - "@esbuild/win32-x64" "0.21.2" + "@esbuild/aix-ppc64" "0.21.3" + "@esbuild/android-arm" "0.21.3" + "@esbuild/android-arm64" "0.21.3" + "@esbuild/android-x64" "0.21.3" + "@esbuild/darwin-arm64" "0.21.3" + "@esbuild/darwin-x64" "0.21.3" + "@esbuild/freebsd-arm64" "0.21.3" + "@esbuild/freebsd-x64" "0.21.3" + "@esbuild/linux-arm" "0.21.3" + "@esbuild/linux-arm64" "0.21.3" + "@esbuild/linux-ia32" "0.21.3" + "@esbuild/linux-loong64" "0.21.3" + "@esbuild/linux-mips64el" "0.21.3" + "@esbuild/linux-ppc64" "0.21.3" + "@esbuild/linux-riscv64" "0.21.3" + "@esbuild/linux-s390x" "0.21.3" + "@esbuild/linux-x64" "0.21.3" + "@esbuild/netbsd-x64" "0.21.3" + "@esbuild/openbsd-x64" "0.21.3" + "@esbuild/sunos-x64" "0.21.3" + "@esbuild/win32-arm64" "0.21.3" + "@esbuild/win32-ia32" "0.21.3" + "@esbuild/win32-x64" "0.21.3" escalade@^3.1.1: version "3.1.2" From 7b4de4b51ea5b195ea59eb5904c2971386ac41fe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 19:08:45 +0000 Subject: [PATCH 102/189] Bump rexml from 3.2.6 to 3.2.8 in the bundler group Bumps the bundler group with 1 update: [rexml](https://github.com/ruby/rexml). Updates `rexml` from 3.2.6 to 3.2.8 - [Release notes](https://github.com/ruby/rexml/releases) - [Changelog](https://github.com/ruby/rexml/blob/master/NEWS.md) - [Commits](https://github.com/ruby/rexml/compare/v3.2.6...v3.2.8) --- updated-dependencies: - dependency-name: rexml dependency-type: indirect dependency-group: bundler ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 4f6fd03648..6b97207e19 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -57,7 +57,8 @@ GEM regexp_parser (2.9.1) reline (0.5.0) io-console (~> 0.5) - rexml (3.2.6) + rexml (3.2.8) + strscan (>= 3.0.9) rubocop (1.63.5) json (~> 2.3) language_server-protocol (>= 3.17.0) @@ -104,6 +105,7 @@ GEM 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) @@ -124,8 +126,6 @@ GEM PLATFORMS arm64-darwin - x64-mingw-ucrt - x64-mingw32 x86_64-darwin x86_64-linux From bb69ca8a5c9e85ee8d5e19f78eb46433e7ed483a Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 16 May 2024 19:09:18 +0000 Subject: [PATCH 103/189] Update RBI files for gems 2024-05-16 [dependabot skip] --- .../gems/{rexml@3.2.6.rbi => rexml@3.2.8.rbi} | 228 +++++++++--------- sorbet/rbi/gems/strscan@3.1.0.rbi | 8 + 2 files changed, 128 insertions(+), 108 deletions(-) rename sorbet/rbi/gems/{rexml@3.2.6.rbi => rexml@3.2.8.rbi} (96%) create mode 100644 sorbet/rbi/gems/strscan@3.1.0.rbi 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 c8d67b58de..d536b53b8c 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/strscan@3.1.0.rbi b/sorbet/rbi/gems/strscan@3.1.0.rbi new file mode 100644 index 0000000000..e74659c964 --- /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 From e3c0f201239b56f47c5c6bdd3d034ea6b0bda5f9 Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Fri, 17 May 2024 04:11:06 +0900 Subject: [PATCH 104/189] Update Prism requirement to v0.28 (#2017) Co-authored-by: Andy Waite --- .github/workflows/ci.yml | 4 +- Gemfile.lock | 10 +- lib/core_ext/uri.rb | 3 + lib/ruby_lsp/listeners/document_highlight.rb | 2 +- lib/ruby_lsp/listeners/document_link.rb | 2 +- .../listeners/semantic_highlighting.rb | 62 +- lib/ruby_lsp/requests/support/common.rb | 18 + ruby-lsp.gemspec | 2 +- .../{prism@0.27.0.rbi => prism@0.28.0.rbi} | 8788 +++++++++-------- .../gems/{rbi@0.1.12.rbi => rbi@0.1.13.rbi} | 4 +- .../full_name_highlight.exp.json | 13 + .../semantic_highlighting/const.exp.json | 35 +- test/requests/support/uri_test.rb | 5 + test/ruby_document_test.rb | 17 +- 14 files changed, 4973 insertions(+), 3992 deletions(-) rename sorbet/rbi/gems/{prism@0.27.0.rbi => prism@0.28.0.rbi} (85%) rename sorbet/rbi/gems/{rbi@0.1.12.rbi => rbi@0.1.13.rbi} (99%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a0a2824d4d..4616e8d3a1 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/Gemfile.lock b/Gemfile.lock index 4f6fd03648..91e43dc764 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ PATH specs: ruby-lsp (0.16.7) language_server-protocol (~> 3.17.0) - prism (>= 0.23.0, < 0.28) + prism (>= 0.28.0, < 0.29) sorbet-runtime (>= 0.5.10782) GEM @@ -45,14 +45,14 @@ GEM ast (~> 2.4.1) racc prettier_print (1.2.1) - prism (0.27.0) + prism (0.28.0) psych (5.1.2) stringio racc (1.7.3) 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.1) reline (0.5.0) @@ -151,4 +151,4 @@ DEPENDENCIES tapioca (~> 0.13) BUNDLED WITH - 2.5.6 + 2.5.10 diff --git a/lib/core_ext/uri.rb b/lib/core_ext/uri.rb index 2f3d02386c..43997393fc 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_lsp/listeners/document_highlight.rb b/lib/ruby_lsp/listeners/document_highlight.rb index 3952d5161e..89ddb59e8c 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 f531407436..6c1b2d7389 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/semantic_highlighting.rb b/lib/ruby_lsp/listeners/semantic_highlighting.rb index 744f4754af..42f317c1f7 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/requests/support/common.rb b/lib/ruby_lsp/requests/support/common.rb index 135bd469b4..85a5598a78 100644 --- a/lib/ruby_lsp/requests/support/common.rb +++ b/lib/ruby_lsp/requests/support/common.rb @@ -167,6 +167,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/ruby-lsp.gemspec b/ruby-lsp.gemspec index 7632cfdeb0..e685e1e863 100644 --- a/ruby-lsp.gemspec +++ b/ruby-lsp.gemspec @@ -19,7 +19,7 @@ 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.28.0", "< 0.29") s.add_dependency("sorbet-runtime", ">= 0.5.10782") s.required_ruby_version = ">= 3.0" diff --git a/sorbet/rbi/gems/prism@0.27.0.rbi b/sorbet/rbi/gems/prism@0.28.0.rbi similarity index 85% rename from sorbet/rbi/gems/prism@0.27.0.rbi rename to sorbet/rbi/gems/prism@0.28.0.rbi index 36267480bf..2757b1cde8 100644 --- a/sorbet/rbi/gems/prism@0.27.0.rbi +++ b/sorbet/rbi/gems/prism@0.28.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. @@ -131,18 +123,57 @@ module Prism 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#188 class Prism::AliasGlobalVariableNode < ::Prism::Node # def initialize: (Prism::node new_name, Prism::node old_name, Location keyword_loc, Location location) -> void # # @return [AliasGlobalVariableNode] a new instance of AliasGlobalVariableNode # - # source://prism//lib/prism/node.rb#137 + # source://prism//lib/prism/node.rb#190 sig do params( source: Prism::Source, @@ -157,36 +188,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#294 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#147 + # source://prism//lib/prism/node.rb#200 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#152 + # source://prism//lib/prism/node.rb#205 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#162 + # source://prism//lib/prism/node.rb#215 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#157 + # source://prism//lib/prism/node.rb#210 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?new_name: Prism::node, ?old_name: Prism::node, ?keyword_loc: Location, ?location: Location) -> AliasGlobalVariableNode # - # source://prism//lib/prism/node.rb#167 + # source://prism//lib/prism/node.rb#220 sig do params( new_name: Prism::Node, @@ -200,28 +231,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#205 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { new_name: Prism::node, old_name: Prism::node, keyword_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#175 + # source://prism//lib/prism/node.rb#228 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#260 + sig { override.returns(String) } + def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#202 + # source://prism//lib/prism/node.rb#255 sig { returns(String) } def keyword; end @@ -230,7 +261,7 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # alias $foo $bar # ^^^^^ # - # source://prism//lib/prism/node.rb#195 + # source://prism//lib/prism/node.rb#248 sig { returns(Prism::Location) } def keyword_loc; end @@ -239,7 +270,7 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # alias $foo $bar # ^^^^ # - # source://prism//lib/prism/node.rb#183 + # source://prism//lib/prism/node.rb#236 sig { returns(Prism::Node) } def new_name; end @@ -248,7 +279,7 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # alias $foo $bar # ^^^^ # - # source://prism//lib/prism/node.rb#189 + # source://prism//lib/prism/node.rb#242 sig { returns(Prism::Node) } def old_name; end @@ -267,7 +298,7 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#231 + # source://prism//lib/prism/node.rb#278 sig { override.returns(Symbol) } def type; end @@ -279,7 +310,7 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#241 + # source://prism//lib/prism/node.rb#288 def type; end end end @@ -289,13 +320,13 @@ end # alias foo bar # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#259 +# source://prism//lib/prism/node.rb#306 class Prism::AliasMethodNode < ::Prism::Node # def initialize: (Prism::node new_name, Prism::node old_name, Location keyword_loc, Location location) -> void # # @return [AliasMethodNode] a new instance of AliasMethodNode # - # source://prism//lib/prism/node.rb#261 + # source://prism//lib/prism/node.rb#308 sig do params( source: Prism::Source, @@ -310,36 +341,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#403 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#271 + # source://prism//lib/prism/node.rb#318 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#276 + # source://prism//lib/prism/node.rb#323 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#286 + # source://prism//lib/prism/node.rb#333 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#281 + # source://prism//lib/prism/node.rb#328 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?new_name: Prism::node, ?old_name: Prism::node, ?keyword_loc: Location, ?location: Location) -> AliasMethodNode # - # source://prism//lib/prism/node.rb#291 + # source://prism//lib/prism/node.rb#338 sig do params( new_name: Prism::Node, @@ -353,46 +384,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#323 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { new_name: Prism::node, old_name: Prism::node, keyword_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#299 + # source://prism//lib/prism/node.rb#346 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#369 + sig { override.returns(String) } + def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#317 + # source://prism//lib/prism/node.rb#364 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#310 + # source://prism//lib/prism/node.rb#357 sig { returns(Prism::Location) } def keyword_loc; end # attr_reader new_name: Prism::node # - # source://prism//lib/prism/node.rb#304 + # source://prism//lib/prism/node.rb#351 sig { returns(Prism::Node) } def new_name; end # attr_reader old_name: Prism::node # - # source://prism//lib/prism/node.rb#307 + # source://prism//lib/prism/node.rb#354 sig { returns(Prism::Node) } def old_name; end @@ -411,7 +442,7 @@ class Prism::AliasMethodNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#346 + # source://prism//lib/prism/node.rb#387 sig { override.returns(Symbol) } def type; end @@ -423,7 +454,7 @@ class Prism::AliasMethodNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#356 + # source://prism//lib/prism/node.rb#397 def type; end end end @@ -433,13 +464,13 @@ end # foo => bar | baz # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#374 +# source://prism//lib/prism/node.rb#415 class Prism::AlternationPatternNode < ::Prism::Node # def initialize: (Prism::node left, Prism::node right, Location operator_loc, Location location) -> void # # @return [AlternationPatternNode] a new instance of AlternationPatternNode # - # source://prism//lib/prism/node.rb#376 + # source://prism//lib/prism/node.rb#417 sig do params( source: Prism::Source, @@ -454,36 +485,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#512 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#386 + # source://prism//lib/prism/node.rb#427 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#391 + # source://prism//lib/prism/node.rb#432 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#401 + # source://prism//lib/prism/node.rb#442 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#396 + # source://prism//lib/prism/node.rb#437 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?left: Prism::node, ?right: Prism::node, ?operator_loc: Location, ?location: Location) -> AlternationPatternNode # - # source://prism//lib/prism/node.rb#406 + # source://prism//lib/prism/node.rb#447 sig do params( left: Prism::Node, @@ -497,46 +528,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#432 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { left: Prism::node, right: Prism::node, operator_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#414 + # source://prism//lib/prism/node.rb#455 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#478 + 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#460 sig { returns(Prism::Node) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#432 + # source://prism//lib/prism/node.rb#473 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#425 + # source://prism//lib/prism/node.rb#466 sig { returns(Prism::Location) } def operator_loc; end # attr_reader right: Prism::node # - # source://prism//lib/prism/node.rb#422 + # source://prism//lib/prism/node.rb#463 sig { returns(Prism::Node) } def right; end @@ -555,7 +586,7 @@ class Prism::AlternationPatternNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#461 + # source://prism//lib/prism/node.rb#496 sig { override.returns(Symbol) } def type; end @@ -567,7 +598,7 @@ class Prism::AlternationPatternNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#471 + # source://prism//lib/prism/node.rb#506 def type; end end end @@ -577,13 +608,13 @@ end # left and right # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#489 +# source://prism//lib/prism/node.rb#524 class Prism::AndNode < ::Prism::Node # def initialize: (Prism::node left, Prism::node right, Location operator_loc, Location location) -> void # # @return [AndNode] a new instance of AndNode # - # source://prism//lib/prism/node.rb#491 + # source://prism//lib/prism/node.rb#526 sig do params( source: Prism::Source, @@ -598,36 +629,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#636 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#501 + # source://prism//lib/prism/node.rb#536 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#506 + # source://prism//lib/prism/node.rb#541 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#516 + # source://prism//lib/prism/node.rb#551 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#511 + # source://prism//lib/prism/node.rb#546 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?left: Prism::node, ?right: Prism::node, ?operator_loc: Location, ?location: Location) -> AndNode # - # source://prism//lib/prism/node.rb#521 + # source://prism//lib/prism/node.rb#556 sig do params( left: Prism::Node, @@ -641,24 +672,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#541 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { left: Prism::node, right: Prism::node, operator_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#529 + # source://prism//lib/prism/node.rb#564 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#602 + sig { override.returns(String) } + def inspect; end # Represents the left side of the expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). # @@ -668,13 +699,13 @@ class Prism::AndNode < ::Prism::Node # 1 && 2 # ^ # - # source://prism//lib/prism/node.rb#540 + # source://prism//lib/prism/node.rb#575 sig { returns(Prism::Node) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#562 + # source://prism//lib/prism/node.rb#597 sig { returns(String) } def operator; end @@ -683,7 +714,7 @@ class Prism::AndNode < ::Prism::Node # left and right # ^^^ # - # source://prism//lib/prism/node.rb#555 + # source://prism//lib/prism/node.rb#590 sig { returns(Prism::Location) } def operator_loc; end @@ -695,7 +726,7 @@ class Prism::AndNode < ::Prism::Node # 1 and 2 # ^ # - # source://prism//lib/prism/node.rb#549 + # source://prism//lib/prism/node.rb#584 sig { returns(Prism::Node) } def right; end @@ -714,7 +745,7 @@ class Prism::AndNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#591 + # source://prism//lib/prism/node.rb#620 sig { override.returns(Symbol) } def type; end @@ -726,7 +757,7 @@ class Prism::AndNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#601 + # source://prism//lib/prism/node.rb#630 def type; end end end @@ -736,13 +767,13 @@ end # return foo, bar, baz # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#619 +# source://prism//lib/prism/node.rb#648 class Prism::ArgumentsNode < ::Prism::Node # def initialize: (Integer flags, Array[Prism::node] arguments, Location location) -> void # # @return [ArgumentsNode] a new instance of ArgumentsNode # - # source://prism//lib/prism/node.rb#621 + # source://prism//lib/prism/node.rb#650 sig do params( source: Prism::Source, @@ -756,36 +787,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#743 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#630 + # source://prism//lib/prism/node.rb#659 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: Array[Prism::node] # - # source://prism//lib/prism/node.rb#667 + # source://prism//lib/prism/node.rb#696 sig { returns(T::Array[Prism::Node]) } def arguments; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#635 + # source://prism//lib/prism/node.rb#664 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#645 + # source://prism//lib/prism/node.rb#674 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#640 + # source://prism//lib/prism/node.rb#669 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end @@ -793,13 +824,21 @@ class Prism::ArgumentsNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#670 + # source://prism//lib/prism/node.rb#704 sig { returns(T::Boolean) } def contains_keyword_splat?; end + # def contains_keywords?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#699 + sig { returns(T::Boolean) } + def contains_keywords?; end + # def copy: (?flags: Integer, ?arguments: Array[Prism::node], ?location: Location) -> ArgumentsNode # - # source://prism//lib/prism/node.rb#650 + # source://prism//lib/prism/node.rb#679 sig do params( flags: Integer, @@ -812,24 +851,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#664 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, arguments: Array[Prism::node], location: Location } # - # source://prism//lib/prism/node.rb#658 + # source://prism//lib/prism/node.rb#687 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#709 + sig { override.returns(String) } + def inspect; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by @@ -846,7 +885,7 @@ class Prism::ArgumentsNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#697 + # source://prism//lib/prism/node.rb#727 sig { override.returns(Symbol) } def type; end @@ -854,7 +893,7 @@ class Prism::ArgumentsNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#663 + # source://prism//lib/prism/node.rb#692 sig { returns(Integer) } def flags; end @@ -866,19 +905,24 @@ class Prism::ArgumentsNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#707 + # source://prism//lib/prism/node.rb#737 def type; end end end # Flags for arguments nodes. # -# source://prism//lib/prism/node.rb#20337 +# source://prism//lib/prism/node.rb#19202 module Prism::ArgumentsNodeFlags; end +# if arguments contain keywords +# +# source://prism//lib/prism/node.rb#19204 +Prism::ArgumentsNodeFlags::CONTAINS_KEYWORDS = T.let(T.unsafe(nil), Integer) + # if arguments contain keyword splat # -# source://prism//lib/prism/node.rb#20339 +# source://prism//lib/prism/node.rb#19207 Prism::ArgumentsNodeFlags::CONTAINS_KEYWORD_SPLAT = T.let(T.unsafe(nil), Integer) # Represents an array literal. This can be a regular array using brackets or a special array using % like %w or %i. @@ -886,13 +930,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#755 class Prism::ArrayNode < ::Prism::Node # def initialize: (Integer flags, Array[Prism::node] elements, Location? opening_loc, Location? closing_loc, Location location) -> void # # @return [ArrayNode] a new instance of ArrayNode # - # source://prism//lib/prism/node.rb#727 + # source://prism//lib/prism/node.rb#757 sig do params( source: Prism::Source, @@ -908,24 +952,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#893 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#738 + # source://prism//lib/prism/node.rb#768 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#743 + # source://prism//lib/prism/node.rb#773 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#824 + # source://prism//lib/prism/node.rb#854 sig { returns(T.nilable(String)) } def closing; end @@ -936,19 +980,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#831 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#783 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#748 + # source://prism//lib/prism/node.rb#778 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end @@ -956,13 +1000,13 @@ class Prism::ArrayNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#814 + # source://prism//lib/prism/node.rb#844 sig { returns(T::Boolean) } def contains_splat?; end # def copy: (?flags: Integer, ?elements: Array[Prism::node], ?opening_loc: Location?, ?closing_loc: Location?, ?location: Location) -> ArrayNode # - # source://prism//lib/prism/node.rb#758 + # source://prism//lib/prism/node.rb#788 sig do params( flags: Integer, @@ -977,34 +1021,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#773 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, elements: Array[Prism::node], opening_loc: Location?, closing_loc: Location?, location: Location } # - # source://prism//lib/prism/node.rb#766 + # source://prism//lib/prism/node.rb#796 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # Represent the list of zero or more [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression) within the array. # - # source://prism//lib/prism/node.rb#775 + # source://prism//lib/prism/node.rb#805 sig { returns(T::Array[Prism::Node]) } def elements; end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#859 + sig { override.returns(String) } + def inspect; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#819 + # source://prism//lib/prism/node.rb#849 sig { returns(T.nilable(String)) } def opening; end @@ -1015,7 +1059,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#813 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end @@ -1034,7 +1078,7 @@ class Prism::ArrayNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#853 + # source://prism//lib/prism/node.rb#877 sig { override.returns(Symbol) } def type; end @@ -1042,7 +1086,7 @@ class Prism::ArrayNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#771 + # source://prism//lib/prism/node.rb#801 sig { returns(Integer) } def flags; end @@ -1054,19 +1098,19 @@ class Prism::ArrayNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#863 + # source://prism//lib/prism/node.rb#887 def type; end end end # Flags for array nodes. # -# source://prism//lib/prism/node.rb#20343 +# source://prism//lib/prism/node.rb#19211 module Prism::ArrayNodeFlags; end # if array contains splat nodes # -# source://prism//lib/prism/node.rb#20345 +# source://prism//lib/prism/node.rb#19213 Prism::ArrayNodeFlags::CONTAINS_SPLAT = T.let(T.unsafe(nil), Integer) # Represents an array pattern in pattern matching. @@ -1086,13 +1130,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#919 class Prism::ArrayPatternNode < ::Prism::Node # def initialize: (Prism::node? constant, Array[Prism::node] requireds, Prism::node? rest, Array[Prism::node] posts, Location? opening_loc, Location? closing_loc, Location location) -> void # # @return [ArrayPatternNode] a new instance of ArrayPatternNode # - # source://prism//lib/prism/node.rb#897 + # source://prism//lib/prism/node.rb#921 sig do params( source: Prism::Source, @@ -1110,54 +1154,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#1054 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#910 + # source://prism//lib/prism/node.rb#934 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#915 + # source://prism//lib/prism/node.rb#939 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#991 + # source://prism//lib/prism/node.rb#1015 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#973 + # source://prism//lib/prism/node.rb#997 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#930 + # source://prism//lib/prism/node.rb#954 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#920 + # source://prism//lib/prism/node.rb#944 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader constant: Prism::node? # - # source://prism//lib/prism/node.rb#948 + # source://prism//lib/prism/node.rb#972 sig { returns(T.nilable(Prism::Node)) } def constant; end # def copy: (?constant: Prism::node?, ?requireds: Array[Prism::node], ?rest: Prism::node?, ?posts: Array[Prism::node], ?opening_loc: Location?, ?closing_loc: Location?, ?location: Location) -> ArrayPatternNode # - # source://prism//lib/prism/node.rb#935 + # source://prism//lib/prism/node.rb#959 sig do params( constant: T.nilable(Prism::Node), @@ -1174,52 +1218,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#939 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { constant: Prism::node?, requireds: Array[Prism::node], rest: Prism::node?, posts: Array[Prism::node], opening_loc: Location?, closing_loc: Location?, location: Location } # - # source://prism//lib/prism/node.rb#943 + # source://prism//lib/prism/node.rb#967 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#1020 + sig { override.returns(String) } + def inspect; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#986 + # source://prism//lib/prism/node.rb#1010 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#960 + # source://prism//lib/prism/node.rb#984 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader posts: Array[Prism::node] # - # source://prism//lib/prism/node.rb#957 + # source://prism//lib/prism/node.rb#981 sig { returns(T::Array[Prism::Node]) } def posts; end # attr_reader requireds: Array[Prism::node] # - # source://prism//lib/prism/node.rb#951 + # source://prism//lib/prism/node.rb#975 sig { returns(T::Array[Prism::Node]) } def requireds; end # attr_reader rest: Prism::node? # - # source://prism//lib/prism/node.rb#954 + # source://prism//lib/prism/node.rb#978 sig { returns(T.nilable(Prism::Node)) } def rest; end @@ -1238,7 +1282,7 @@ class Prism::ArrayPatternNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#1031 + # source://prism//lib/prism/node.rb#1038 sig { override.returns(Symbol) } def type; end @@ -1250,7 +1294,7 @@ class Prism::ArrayPatternNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#1041 + # source://prism//lib/prism/node.rb#1048 def type; end end end @@ -1260,13 +1304,13 @@ end # { a => b } # ^^^^^^ # -# source://prism//lib/prism/node.rb#1064 +# source://prism//lib/prism/node.rb#1071 class Prism::AssocNode < ::Prism::Node # def initialize: (Prism::node key, Prism::node value, Location? operator_loc, Location location) -> void # # @return [AssocNode] a new instance of AssocNode # - # source://prism//lib/prism/node.rb#1066 + # source://prism//lib/prism/node.rb#1073 sig do params( source: Prism::Source, @@ -1281,36 +1325,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#1192 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1076 + # source://prism//lib/prism/node.rb#1083 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1081 + # source://prism//lib/prism/node.rb#1088 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1091 + # source://prism//lib/prism/node.rb#1098 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1086 + # source://prism//lib/prism/node.rb#1093 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?key: Prism::node, ?value: Prism::node, ?operator_loc: Location?, ?location: Location) -> AssocNode # - # source://prism//lib/prism/node.rb#1096 + # source://prism//lib/prism/node.rb#1103 sig do params( key: Prism::Node, @@ -1324,24 +1368,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#1088 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { key: Prism::node, value: Prism::node, operator_loc: Location?, location: Location } # - # source://prism//lib/prism/node.rb#1104 + # source://prism//lib/prism/node.rb#1111 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#1158 + sig { override.returns(String) } + def inspect; end # The key of the association. This can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). # @@ -1354,13 +1398,13 @@ class Prism::AssocNode < ::Prism::Node # { def a; end => 1 } # ^^^^^^^^^^ # - # source://prism//lib/prism/node.rb#1118 + # source://prism//lib/prism/node.rb#1125 sig { returns(Prism::Node) } def key; end # def operator: () -> String? # - # source://prism//lib/prism/node.rb#1146 + # source://prism//lib/prism/node.rb#1153 sig { returns(T.nilable(String)) } def operator; end @@ -1369,7 +1413,7 @@ class Prism::AssocNode < ::Prism::Node # { foo => bar } # ^^ # - # source://prism//lib/prism/node.rb#1133 + # source://prism//lib/prism/node.rb#1140 sig { returns(T.nilable(Prism::Location)) } def operator_loc; end @@ -1388,7 +1432,7 @@ class Prism::AssocNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#1175 + # source://prism//lib/prism/node.rb#1176 sig { override.returns(Symbol) } def type; end @@ -1400,7 +1444,7 @@ class Prism::AssocNode < ::Prism::Node # { x: 1 } # ^ # - # source://prism//lib/prism/node.rb#1127 + # source://prism//lib/prism/node.rb#1134 sig { returns(Prism::Node) } def value; end @@ -1412,7 +1456,7 @@ class Prism::AssocNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#1185 + # source://prism//lib/prism/node.rb#1186 def type; end end end @@ -1422,13 +1466,13 @@ end # { **foo } # ^^^^^ # -# source://prism//lib/prism/node.rb#1203 +# source://prism//lib/prism/node.rb#1204 class Prism::AssocSplatNode < ::Prism::Node # def initialize: (Prism::node? value, Location operator_loc, Location location) -> void # # @return [AssocSplatNode] a new instance of AssocSplatNode # - # source://prism//lib/prism/node.rb#1205 + # source://prism//lib/prism/node.rb#1206 sig do params( source: Prism::Source, @@ -1442,36 +1486,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#1305 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1214 + # source://prism//lib/prism/node.rb#1215 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1219 + # source://prism//lib/prism/node.rb#1220 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1231 + # source://prism//lib/prism/node.rb#1232 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1224 + # source://prism//lib/prism/node.rb#1225 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?value: Prism::node?, ?operator_loc: Location, ?location: Location) -> AssocSplatNode # - # source://prism//lib/prism/node.rb#1236 + # source://prism//lib/prism/node.rb#1237 sig do params( value: T.nilable(Prism::Node), @@ -1484,28 +1528,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#1220 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::node?, operator_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#1244 + # source://prism//lib/prism/node.rb#1245 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#1271 + sig { override.returns(String) } + def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#1265 + # source://prism//lib/prism/node.rb#1266 sig { returns(String) } def operator; end @@ -1514,7 +1558,7 @@ class Prism::AssocSplatNode < ::Prism::Node # { **x } # ^^ # - # source://prism//lib/prism/node.rb#1258 + # source://prism//lib/prism/node.rb#1259 sig { returns(Prism::Location) } def operator_loc; end @@ -1533,7 +1577,7 @@ class Prism::AssocSplatNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#1296 + # source://prism//lib/prism/node.rb#1289 sig { override.returns(Symbol) } def type; end @@ -1542,7 +1586,7 @@ class Prism::AssocSplatNode < ::Prism::Node # { **foo } # ^^^ # - # source://prism//lib/prism/node.rb#1252 + # source://prism//lib/prism/node.rb#1253 sig { returns(T.nilable(Prism::Node)) } def value; end @@ -1554,14 +1598,14 @@ class Prism::AssocSplatNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#1306 + # source://prism//lib/prism/node.rb#1299 def type; end end end # The FFI backend is used on other Ruby implementations. # -# source://prism//lib/prism.rb#84 +# source://prism//lib/prism.rb#85 Prism::BACKEND = T.let(T.unsafe(nil), Symbol) # Represents reading a reference to a field in the previous match. @@ -1569,73 +1613,73 @@ Prism::BACKEND = T.let(T.unsafe(nil), Symbol) # $' # ^^ # -# source://prism//lib/prism/node.rb#1323 +# source://prism//lib/prism/node.rb#1316 class Prism::BackReferenceReadNode < ::Prism::Node # def initialize: (Symbol name, Location location) -> void # # @return [BackReferenceReadNode] a new instance of BackReferenceReadNode # - # source://prism//lib/prism/node.rb#1325 + # source://prism//lib/prism/node.rb#1318 sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } def initialize(source, name, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#1409 + # source://prism//lib/prism/node.rb#1400 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1333 + # source://prism//lib/prism/node.rb#1326 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1338 + # source://prism//lib/prism/node.rb#1331 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1348 + # source://prism//lib/prism/node.rb#1341 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1343 + # source://prism//lib/prism/node.rb#1336 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?location: Location) -> BackReferenceReadNode # - # source://prism//lib/prism/node.rb#1353 + # source://prism//lib/prism/node.rb#1346 sig { params(name: Symbol, location: Prism::Location).returns(Prism::BackReferenceReadNode) } def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1338 + # source://prism//lib/prism/node.rb#1331 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } # - # source://prism//lib/prism/node.rb#1361 + # source://prism//lib/prism/node.rb#1354 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#1366 + sig { override.returns(String) } + def inspect; end # The name of the back-reference variable, including the leading `$`. # @@ -1643,7 +1687,7 @@ class Prism::BackReferenceReadNode < ::Prism::Node # # $+ # name `:$+` # - # source://prism//lib/prism/node.rb#1370 + # source://prism//lib/prism/node.rb#1363 sig { returns(Symbol) } def name; end @@ -1662,7 +1706,7 @@ class Prism::BackReferenceReadNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#1393 + # source://prism//lib/prism/node.rb#1384 sig { override.returns(Symbol) } def type; end @@ -1674,7 +1718,7 @@ class Prism::BackReferenceReadNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#1403 + # source://prism//lib/prism/node.rb#1394 def type; end end end @@ -1713,13 +1757,13 @@ end # end # ^^^^^ # -# source://prism//lib/prism/node.rb#1421 +# source://prism//lib/prism/node.rb#1412 class Prism::BeginNode < ::Prism::Node # def initialize: (Location? begin_keyword_loc, StatementsNode? statements, RescueNode? rescue_clause, ElseNode? else_clause, EnsureNode? ensure_clause, Location? end_keyword_loc, Location location) -> void # # @return [BeginNode] a new instance of BeginNode # - # source://prism//lib/prism/node.rb#1423 + # source://prism//lib/prism/node.rb#1414 sig do params( source: Prism::Source, @@ -1737,48 +1781,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#1551 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1436 + # source://prism//lib/prism/node.rb#1427 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def begin_keyword: () -> String? # - # source://prism//lib/prism/node.rb#1516 + # source://prism//lib/prism/node.rb#1507 sig { returns(T.nilable(String)) } def begin_keyword; end # attr_reader begin_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#1478 + # source://prism//lib/prism/node.rb#1469 sig { returns(T.nilable(Prism::Location)) } def begin_keyword_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1445 + # source://prism//lib/prism/node.rb#1436 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1460 + # source://prism//lib/prism/node.rb#1451 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1450 + # source://prism//lib/prism/node.rb#1441 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?begin_keyword_loc: Location?, ?statements: StatementsNode?, ?rescue_clause: RescueNode?, ?else_clause: ElseNode?, ?ensure_clause: EnsureNode?, ?end_keyword_loc: Location?, ?location: Location) -> BeginNode # - # source://prism//lib/prism/node.rb#1465 + # source://prism//lib/prism/node.rb#1456 sig do params( begin_keyword_loc: T.nilable(Prism::Location), @@ -1795,61 +1839,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#1436 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { begin_keyword_loc: Location?, statements: StatementsNode?, rescue_clause: RescueNode?, else_clause: ElseNode?, ensure_clause: EnsureNode?, end_keyword_loc: Location?, location: Location } # - # source://prism//lib/prism/node.rb#1473 + # source://prism//lib/prism/node.rb#1464 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader else_clause: ElseNode? # - # source://prism//lib/prism/node.rb#1497 + # source://prism//lib/prism/node.rb#1488 sig { returns(T.nilable(Prism::ElseNode)) } def else_clause; end # def end_keyword: () -> String? # - # source://prism//lib/prism/node.rb#1521 + # source://prism//lib/prism/node.rb#1512 sig { returns(T.nilable(String)) } def end_keyword; end # attr_reader end_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#1503 + # source://prism//lib/prism/node.rb#1494 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end # attr_reader ensure_clause: EnsureNode? # - # source://prism//lib/prism/node.rb#1500 + # source://prism//lib/prism/node.rb#1491 sig { returns(T.nilable(Prism::EnsureNode)) } def ensure_clause; end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#1517 + sig { override.returns(String) } + def inspect; end # attr_reader rescue_clause: RescueNode? # - # source://prism//lib/prism/node.rb#1494 + # source://prism//lib/prism/node.rb#1485 sig { returns(T.nilable(Prism::RescueNode)) } def rescue_clause; end - # source://prism//lib/prism/node.rb#1440 + # source://prism//lib/prism/node.rb#1431 def set_newline_flag(newline_marked); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#1491 + # source://prism//lib/prism/node.rb#1482 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -1868,7 +1912,7 @@ class Prism::BeginNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#1571 + # source://prism//lib/prism/node.rb#1535 sig { override.returns(Symbol) } def type; end @@ -1880,7 +1924,7 @@ class Prism::BeginNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#1581 + # source://prism//lib/prism/node.rb#1545 def type; end end end @@ -1890,13 +1934,13 @@ end # bar(&args) # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#1602 +# source://prism//lib/prism/node.rb#1566 class Prism::BlockArgumentNode < ::Prism::Node # def initialize: (Prism::node? expression, Location operator_loc, Location location) -> void # # @return [BlockArgumentNode] a new instance of BlockArgumentNode # - # source://prism//lib/prism/node.rb#1604 + # source://prism//lib/prism/node.rb#1568 sig do params( source: Prism::Source, @@ -1910,36 +1954,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#1661 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1613 + # source://prism//lib/prism/node.rb#1577 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1618 + # source://prism//lib/prism/node.rb#1582 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1630 + # source://prism//lib/prism/node.rb#1594 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1623 + # source://prism//lib/prism/node.rb#1587 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?expression: Prism::node?, ?operator_loc: Location, ?location: Location) -> BlockArgumentNode # - # source://prism//lib/prism/node.rb#1635 + # source://prism//lib/prism/node.rb#1599 sig do params( expression: T.nilable(Prism::Node), @@ -1952,40 +1996,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#1582 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { expression: Prism::node?, operator_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#1643 + # source://prism//lib/prism/node.rb#1607 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader expression: Prism::node? # - # source://prism//lib/prism/node.rb#1648 + # source://prism//lib/prism/node.rb#1612 sig { returns(T.nilable(Prism::Node)) } def expression; end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#1627 + sig { override.returns(String) } + def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#1658 + # source://prism//lib/prism/node.rb#1622 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#1651 + # source://prism//lib/prism/node.rb#1615 sig { returns(Prism::Location) } def operator_loc; end @@ -2004,7 +2048,7 @@ class Prism::BlockArgumentNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#1689 + # source://prism//lib/prism/node.rb#1645 sig { override.returns(Symbol) } def type; end @@ -2016,7 +2060,7 @@ class Prism::BlockArgumentNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#1699 + # source://prism//lib/prism/node.rb#1655 def type; end end end @@ -2026,77 +2070,77 @@ end # a { |; b| } # ^ # -# source://prism//lib/prism/node.rb#1716 +# source://prism//lib/prism/node.rb#1672 class Prism::BlockLocalVariableNode < ::Prism::Node # def initialize: (Integer flags, Symbol name, Location location) -> void # # @return [BlockLocalVariableNode] a new instance of BlockLocalVariableNode # - # source://prism//lib/prism/node.rb#1718 + # source://prism//lib/prism/node.rb#1674 sig { params(source: Prism::Source, flags: Integer, name: Symbol, location: Prism::Location).void } def initialize(source, flags, name, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#1810 + # source://prism//lib/prism/node.rb#1762 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1727 + # source://prism//lib/prism/node.rb#1683 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1732 + # source://prism//lib/prism/node.rb#1688 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1742 + # source://prism//lib/prism/node.rb#1698 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1737 + # source://prism//lib/prism/node.rb#1693 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?name: Symbol, ?location: Location) -> BlockLocalVariableNode # - # source://prism//lib/prism/node.rb#1747 + # source://prism//lib/prism/node.rb#1703 sig { params(flags: Integer, name: Symbol, location: Prism::Location).returns(Prism::BlockLocalVariableNode) } def copy(flags: T.unsafe(nil), name: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1732 + # source://prism//lib/prism/node.rb#1688 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, location: Location } # - # source://prism//lib/prism/node.rb#1755 + # source://prism//lib/prism/node.rb#1711 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#1728 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#1764 + # source://prism//lib/prism/node.rb#1720 sig { returns(Symbol) } def name; end @@ -2104,7 +2148,7 @@ class Prism::BlockLocalVariableNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#1767 + # source://prism//lib/prism/node.rb#1723 sig { returns(T::Boolean) } def repeated_parameter?; end @@ -2123,7 +2167,7 @@ class Prism::BlockLocalVariableNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#1794 + # source://prism//lib/prism/node.rb#1746 sig { override.returns(Symbol) } def type; end @@ -2131,7 +2175,7 @@ class Prism::BlockLocalVariableNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#1760 + # source://prism//lib/prism/node.rb#1716 sig { returns(Integer) } def flags; end @@ -2143,7 +2187,7 @@ class Prism::BlockLocalVariableNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#1804 + # source://prism//lib/prism/node.rb#1756 def type; end end end @@ -2153,13 +2197,13 @@ end # [1, 2, 3].each { |i| puts x } # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#1821 +# source://prism//lib/prism/node.rb#1773 class Prism::BlockNode < ::Prism::Node # def initialize: (Array[Symbol] locals, Prism::node? parameters, Prism::node? body, Location opening_loc, Location closing_loc, Location location) -> void # # @return [BlockNode] a new instance of BlockNode # - # source://prism//lib/prism/node.rb#1823 + # source://prism//lib/prism/node.rb#1775 sig do params( source: Prism::Source, @@ -2176,54 +2220,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#1890 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1835 + # source://prism//lib/prism/node.rb#1787 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: Prism::node? # - # source://prism//lib/prism/node.rb#1877 + # source://prism//lib/prism/node.rb#1829 sig { returns(T.nilable(Prism::Node)) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1840 + # source://prism//lib/prism/node.rb#1792 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#1899 + # source://prism//lib/prism/node.rb#1851 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#1887 + # source://prism//lib/prism/node.rb#1839 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1853 + # source://prism//lib/prism/node.rb#1805 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1845 + # source://prism//lib/prism/node.rb#1797 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?locals: Array[Symbol], ?parameters: Prism::node?, ?body: Prism::node?, ?opening_loc: Location, ?closing_loc: Location, ?location: Location) -> BlockNode # - # source://prism//lib/prism/node.rb#1858 + # source://prism//lib/prism/node.rb#1810 sig do params( locals: T::Array[Symbol], @@ -2239,46 +2283,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#1792 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], parameters: Prism::node?, body: Prism::node?, opening_loc: Location, closing_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#1866 + # source://prism//lib/prism/node.rb#1818 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#1856 + 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#1823 sig { returns(T::Array[Symbol]) } def locals; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#1894 + # source://prism//lib/prism/node.rb#1846 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#1880 + # source://prism//lib/prism/node.rb#1832 sig { returns(Prism::Location) } def opening_loc; end # attr_reader parameters: Prism::node? # - # source://prism//lib/prism/node.rb#1874 + # source://prism//lib/prism/node.rb#1826 sig { returns(T.nilable(Prism::Node)) } def parameters; end @@ -2297,7 +2341,7 @@ class Prism::BlockNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#1938 + # source://prism//lib/prism/node.rb#1874 sig { override.returns(Symbol) } def type; end @@ -2309,7 +2353,7 @@ class Prism::BlockNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#1948 + # source://prism//lib/prism/node.rb#1884 def type; end end end @@ -2320,13 +2364,13 @@ end # ^^ # end # -# source://prism//lib/prism/node.rb#1970 +# source://prism//lib/prism/node.rb#1906 class Prism::BlockParameterNode < ::Prism::Node # def initialize: (Integer flags, Symbol? name, Location? name_loc, Location operator_loc, Location location) -> void # # @return [BlockParameterNode] a new instance of BlockParameterNode # - # source://prism//lib/prism/node.rb#1972 + # source://prism//lib/prism/node.rb#1908 sig do params( source: Prism::Source, @@ -2342,36 +2386,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#2023 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1983 + # source://prism//lib/prism/node.rb#1919 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1988 + # source://prism//lib/prism/node.rb#1924 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1998 + # source://prism//lib/prism/node.rb#1934 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1993 + # source://prism//lib/prism/node.rb#1929 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location, ?location: Location) -> BlockParameterNode # - # source://prism//lib/prism/node.rb#2003 + # source://prism//lib/prism/node.rb#1939 sig do params( flags: Integer, @@ -2386,46 +2430,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#1924 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#2011 + # source://prism//lib/prism/node.rb#1947 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#1989 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol? # - # source://prism//lib/prism/node.rb#2020 + # source://prism//lib/prism/node.rb#1956 sig { returns(T.nilable(Symbol)) } def name; end # attr_reader name_loc: Location? # - # source://prism//lib/prism/node.rb#2023 + # source://prism//lib/prism/node.rb#1959 sig { returns(T.nilable(Prism::Location)) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#2048 + # source://prism//lib/prism/node.rb#1984 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#2036 + # source://prism//lib/prism/node.rb#1972 sig { returns(Prism::Location) } def operator_loc; end @@ -2433,7 +2477,7 @@ class Prism::BlockParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2043 + # source://prism//lib/prism/node.rb#1979 sig { returns(T::Boolean) } def repeated_parameter?; end @@ -2452,7 +2496,7 @@ class Prism::BlockParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#2081 + # source://prism//lib/prism/node.rb#2007 sig { override.returns(Symbol) } def type; end @@ -2460,7 +2504,7 @@ class Prism::BlockParameterNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#2016 + # source://prism//lib/prism/node.rb#1952 sig { returns(Integer) } def flags; end @@ -2472,7 +2516,7 @@ class Prism::BlockParameterNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#2091 + # source://prism//lib/prism/node.rb#2017 def type; end end end @@ -2486,13 +2530,13 @@ end # ^^^^^^^^^^^^^^^^^ # end # -# source://prism//lib/prism/node.rb#2114 +# source://prism//lib/prism/node.rb#2040 class Prism::BlockParametersNode < ::Prism::Node # def initialize: (ParametersNode? parameters, Array[BlockLocalVariableNode] locals, Location? opening_loc, Location? closing_loc, Location location) -> void # # @return [BlockParametersNode] a new instance of BlockParametersNode # - # source://prism//lib/prism/node.rb#2116 + # source://prism//lib/prism/node.rb#2042 sig do params( source: Prism::Source, @@ -2508,48 +2552,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#2165 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2127 + # source://prism//lib/prism/node.rb#2053 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2132 + # source://prism//lib/prism/node.rb#2058 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#2200 + # source://prism//lib/prism/node.rb#2126 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#2182 + # source://prism//lib/prism/node.rb#2108 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#2145 + # source://prism//lib/prism/node.rb#2071 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#2137 + # source://prism//lib/prism/node.rb#2063 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?parameters: ParametersNode?, ?locals: Array[BlockLocalVariableNode], ?opening_loc: Location?, ?closing_loc: Location?, ?location: Location) -> BlockParametersNode # - # source://prism//lib/prism/node.rb#2150 + # source://prism//lib/prism/node.rb#2076 sig do params( parameters: T.nilable(Prism::ParametersNode), @@ -2564,46 +2608,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#2058 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { parameters: ParametersNode?, locals: Array[BlockLocalVariableNode], opening_loc: Location?, closing_loc: Location?, location: Location } # - # source://prism//lib/prism/node.rb#2158 + # source://prism//lib/prism/node.rb#2084 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#2131 + 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#2092 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#2121 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#2095 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#2089 sig { returns(T.nilable(Prism::ParametersNode)) } def parameters; end @@ -2622,7 +2666,7 @@ class Prism::BlockParametersNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#2233 + # source://prism//lib/prism/node.rb#2149 sig { override.returns(Symbol) } def type; end @@ -2634,7 +2678,7 @@ class Prism::BlockParametersNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#2243 + # source://prism//lib/prism/node.rb#2159 def type; end end end @@ -2644,13 +2688,13 @@ end # break foo # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#2263 +# source://prism//lib/prism/node.rb#2179 class Prism::BreakNode < ::Prism::Node # def initialize: (ArgumentsNode? arguments, Location keyword_loc, Location location) -> void # # @return [BreakNode] a new instance of BreakNode # - # source://prism//lib/prism/node.rb#2265 + # source://prism//lib/prism/node.rb#2181 sig do params( source: Prism::Source, @@ -2664,12 +2708,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#2280 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2274 + # source://prism//lib/prism/node.rb#2190 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -2678,31 +2722,31 @@ class Prism::BreakNode < ::Prism::Node # break foo # ^^^ # - # source://prism//lib/prism/node.rb#2312 + # source://prism//lib/prism/node.rb#2228 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2279 + # source://prism//lib/prism/node.rb#2195 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#2291 + # source://prism//lib/prism/node.rb#2207 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#2284 + # source://prism//lib/prism/node.rb#2200 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?arguments: ArgumentsNode?, ?keyword_loc: Location, ?location: Location) -> BreakNode # - # source://prism//lib/prism/node.rb#2296 + # source://prism//lib/prism/node.rb#2212 sig do params( arguments: T.nilable(Prism::ArgumentsNode), @@ -2715,28 +2759,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#2195 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { arguments: ArgumentsNode?, keyword_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#2304 + # source://prism//lib/prism/node.rb#2220 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#2246 + sig { override.returns(String) } + def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#2325 + # source://prism//lib/prism/node.rb#2241 sig { returns(String) } def keyword; end @@ -2745,7 +2789,7 @@ class Prism::BreakNode < ::Prism::Node # break foo # ^^^^^ # - # source://prism//lib/prism/node.rb#2318 + # source://prism//lib/prism/node.rb#2234 sig { returns(Prism::Location) } def keyword_loc; end @@ -2764,7 +2808,7 @@ class Prism::BreakNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#2356 + # source://prism//lib/prism/node.rb#2264 sig { override.returns(Symbol) } def type; end @@ -2776,7 +2820,7 @@ class Prism::BreakNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#2366 + # source://prism//lib/prism/node.rb#2274 def type; end end end @@ -2786,13 +2830,13 @@ end # foo.bar &&= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#2383 +# source://prism//lib/prism/node.rb#2291 class Prism::CallAndWriteNode < ::Prism::Node # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location? message_loc, Symbol read_name, Symbol write_name, Location operator_loc, Prism::node value, Location location) -> void # # @return [CallAndWriteNode] a new instance of CallAndWriteNode # - # source://prism//lib/prism/node.rb#2385 + # source://prism//lib/prism/node.rb#2293 sig do params( source: Prism::Source, @@ -2812,12 +2856,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#2462 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2400 + # source://prism//lib/prism/node.rb#2308 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -2825,43 +2869,43 @@ class Prism::CallAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2495 + # source://prism//lib/prism/node.rb#2403 sig { returns(T::Boolean) } def attribute_write?; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#2505 + # source://prism//lib/prism/node.rb#2413 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#2443 + # source://prism//lib/prism/node.rb#2351 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2405 + # source://prism//lib/prism/node.rb#2313 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#2418 + # source://prism//lib/prism/node.rb#2326 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#2410 + # source://prism//lib/prism/node.rb#2318 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> CallAndWriteNode # - # source://prism//lib/prism/node.rb#2423 + # source://prism//lib/prism/node.rb#2331 sig do params( flags: Integer, @@ -2880,13 +2924,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#2313 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#2431 + # source://prism//lib/prism/node.rb#2339 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -2897,49 +2941,49 @@ class Prism::CallAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2500 + # source://prism//lib/prism/node.rb#2408 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#2428 + sig { override.returns(String) } + def inspect; end # def message: () -> String? # - # source://prism//lib/prism/node.rb#2510 + # source://prism//lib/prism/node.rb#2418 sig { returns(T.nilable(String)) } def message; end # attr_reader message_loc: Location? # - # source://prism//lib/prism/node.rb#2456 + # source://prism//lib/prism/node.rb#2364 sig { returns(T.nilable(Prism::Location)) } def message_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#2515 + # source://prism//lib/prism/node.rb#2423 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#2475 + # source://prism//lib/prism/node.rb#2383 sig { returns(Prism::Location) } def operator_loc; end # attr_reader read_name: Symbol # - # source://prism//lib/prism/node.rb#2469 + # source://prism//lib/prism/node.rb#2377 sig { returns(Symbol) } def read_name; end # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#2440 + # source://prism//lib/prism/node.rb#2348 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -2947,7 +2991,7 @@ class Prism::CallAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2485 + # source://prism//lib/prism/node.rb#2393 sig { returns(T::Boolean) } def safe_navigation?; end @@ -2966,13 +3010,13 @@ class Prism::CallAndWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#2554 + # source://prism//lib/prism/node.rb#2446 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#2482 + # source://prism//lib/prism/node.rb#2390 sig { returns(Prism::Node) } def value; end @@ -2980,13 +3024,13 @@ class Prism::CallAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2490 + # source://prism//lib/prism/node.rb#2398 sig { returns(T::Boolean) } def variable_call?; end # attr_reader write_name: Symbol # - # source://prism//lib/prism/node.rb#2472 + # source://prism//lib/prism/node.rb#2380 sig { returns(Symbol) } def write_name; end @@ -2994,7 +3038,7 @@ class Prism::CallAndWriteNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#2436 + # source://prism//lib/prism/node.rb#2344 sig { returns(Integer) } def flags; end @@ -3006,7 +3050,7 @@ class Prism::CallAndWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#2564 + # source://prism//lib/prism/node.rb#2456 def type; end end end @@ -3031,13 +3075,13 @@ end # foo&.bar # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#2602 +# source://prism//lib/prism/node.rb#2494 class Prism::CallNode < ::Prism::Node # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Symbol name, Location? message_loc, Location? opening_loc, ArgumentsNode? arguments, Location? closing_loc, Prism::node? block, Location location) -> void # # @return [CallNode] a new instance of CallNode # - # source://prism//lib/prism/node.rb#2604 + # source://prism//lib/prism/node.rb#2496 sig do params( source: Prism::Source, @@ -3058,18 +3102,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#2700 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2620 + # source://prism//lib/prism/node.rb#2512 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#2715 + # source://prism//lib/prism/node.rb#2607 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end @@ -3077,61 +3121,61 @@ class Prism::CallNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2744 + # source://prism//lib/prism/node.rb#2636 sig { returns(T::Boolean) } def attribute_write?; end # attr_reader block: Prism::node? # - # source://prism//lib/prism/node.rb#2731 + # source://prism//lib/prism/node.rb#2623 sig { returns(T.nilable(Prism::Node)) } def block; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#2754 + # source://prism//lib/prism/node.rb#2646 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#2673 + # source://prism//lib/prism/node.rb#2565 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2625 + # source://prism//lib/prism/node.rb#2517 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#2769 + # source://prism//lib/prism/node.rb#2661 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#2718 + # source://prism//lib/prism/node.rb#2610 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#2639 + # source://prism//lib/prism/node.rb#2531 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#2630 + # source://prism//lib/prism/node.rb#2522 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?name: Symbol, ?message_loc: Location?, ?opening_loc: Location?, ?arguments: ArgumentsNode?, ?closing_loc: Location?, ?block: Prism::node?, ?location: Location) -> CallNode # - # source://prism//lib/prism/node.rb#2644 + # source://prism//lib/prism/node.rb#2536 sig do params( flags: Integer, @@ -3151,13 +3195,13 @@ 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#2517 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, name: Symbol, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, block: Prism::node?, location: Location } # - # source://prism//lib/prism/node.rb#2652 + # source://prism//lib/prism/node.rb#2544 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -3168,43 +3212,43 @@ class Prism::CallNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2749 + # source://prism//lib/prism/node.rb#2641 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#2666 + sig { override.returns(String) } + def inspect; end # def message: () -> String? # - # source://prism//lib/prism/node.rb#2759 + # source://prism//lib/prism/node.rb#2651 sig { returns(T.nilable(String)) } def message; end # attr_reader message_loc: Location? # - # source://prism//lib/prism/node.rb#2689 + # source://prism//lib/prism/node.rb#2581 sig { returns(T.nilable(Prism::Location)) } def message_loc; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#2686 + # source://prism//lib/prism/node.rb#2578 sig { returns(Symbol) } def name; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#2764 + # source://prism//lib/prism/node.rb#2656 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#2702 + # source://prism//lib/prism/node.rb#2594 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end @@ -3219,7 +3263,7 @@ class Prism::CallNode < ::Prism::Node # foo + bar # ^^^ # - # source://prism//lib/prism/node.rb#2670 + # source://prism//lib/prism/node.rb#2562 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -3227,7 +3271,7 @@ class Prism::CallNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2734 + # source://prism//lib/prism/node.rb#2626 sig { returns(T::Boolean) } def safe_navigation?; end @@ -3246,7 +3290,7 @@ class Prism::CallNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#2818 + # source://prism//lib/prism/node.rb#2684 sig { override.returns(Symbol) } def type; end @@ -3254,7 +3298,7 @@ class Prism::CallNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2739 + # source://prism//lib/prism/node.rb#2631 sig { returns(T::Boolean) } def variable_call?; end @@ -3262,7 +3306,7 @@ class Prism::CallNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#2657 + # source://prism//lib/prism/node.rb#2549 sig { returns(Integer) } def flags; end @@ -3274,34 +3318,34 @@ class Prism::CallNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#2828 + # source://prism//lib/prism/node.rb#2694 def type; end end end # Flags for call nodes. # -# source://prism//lib/prism/node.rb#20349 +# source://prism//lib/prism/node.rb#19217 module Prism::CallNodeFlags; end # a call that is an attribute write, so the value being written should be returned # -# source://prism//lib/prism/node.rb#20357 +# source://prism//lib/prism/node.rb#19225 Prism::CallNodeFlags::ATTRIBUTE_WRITE = T.let(T.unsafe(nil), Integer) # a call that ignores method visibility # -# source://prism//lib/prism/node.rb#20360 +# source://prism//lib/prism/node.rb#19228 Prism::CallNodeFlags::IGNORE_VISIBILITY = T.let(T.unsafe(nil), Integer) # &. operator # -# source://prism//lib/prism/node.rb#20351 +# source://prism//lib/prism/node.rb#19219 Prism::CallNodeFlags::SAFE_NAVIGATION = T.let(T.unsafe(nil), Integer) # a call that could have been a local variable # -# source://prism//lib/prism/node.rb#20354 +# source://prism//lib/prism/node.rb#19222 Prism::CallNodeFlags::VARIABLE_CALL = T.let(T.unsafe(nil), Integer) # Represents the use of an assignment operator on a call. @@ -3309,13 +3353,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#2718 class Prism::CallOperatorWriteNode < ::Prism::Node # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location? message_loc, Symbol read_name, Symbol write_name, Symbol operator, Location 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#2720 sig do params( source: Prism::Source, @@ -3336,12 +3380,12 @@ class Prism::CallOperatorWriteNode < ::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#3039 + # source://prism//lib/prism/node.rb#2888 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2870 + # source://prism//lib/prism/node.rb#2736 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -3349,43 +3393,43 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2968 + # source://prism//lib/prism/node.rb#2834 sig { returns(T::Boolean) } def attribute_write?; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#2978 + # source://prism//lib/prism/node.rb#2844 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#2913 + # source://prism//lib/prism/node.rb#2779 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2875 + # source://prism//lib/prism/node.rb#2741 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#2888 + # source://prism//lib/prism/node.rb#2754 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#2880 + # source://prism//lib/prism/node.rb#2746 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?operator: Symbol, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> CallOperatorWriteNode # - # source://prism//lib/prism/node.rb#2893 + # source://prism//lib/prism/node.rb#2759 sig do params( flags: Integer, @@ -3405,13 +3449,13 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2875 + # source://prism//lib/prism/node.rb#2741 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator: Symbol, operator_loc: Location, value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#2901 + # source://prism//lib/prism/node.rb#2767 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -3422,49 +3466,49 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2973 + # source://prism//lib/prism/node.rb#2839 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#2854 + sig { override.returns(String) } + def inspect; end # def message: () -> String? # - # source://prism//lib/prism/node.rb#2983 + # source://prism//lib/prism/node.rb#2849 sig { returns(T.nilable(String)) } def message; end # attr_reader message_loc: Location? # - # source://prism//lib/prism/node.rb#2926 + # source://prism//lib/prism/node.rb#2792 sig { returns(T.nilable(Prism::Location)) } def message_loc; end # attr_reader operator: Symbol # - # source://prism//lib/prism/node.rb#2945 + # source://prism//lib/prism/node.rb#2811 sig { returns(Symbol) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#2948 + # source://prism//lib/prism/node.rb#2814 sig { returns(Prism::Location) } def operator_loc; end # attr_reader read_name: Symbol # - # source://prism//lib/prism/node.rb#2939 + # source://prism//lib/prism/node.rb#2805 sig { returns(Symbol) } def read_name; end # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#2910 + # source://prism//lib/prism/node.rb#2776 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -3472,7 +3516,7 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2958 + # source://prism//lib/prism/node.rb#2824 sig { returns(T::Boolean) } def safe_navigation?; end @@ -3491,13 +3535,13 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#3023 + # source://prism//lib/prism/node.rb#2872 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#2955 + # source://prism//lib/prism/node.rb#2821 sig { returns(Prism::Node) } def value; end @@ -3505,13 +3549,13 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2963 + # source://prism//lib/prism/node.rb#2829 sig { returns(T::Boolean) } def variable_call?; end # attr_reader write_name: Symbol # - # source://prism//lib/prism/node.rb#2942 + # source://prism//lib/prism/node.rb#2808 sig { returns(Symbol) } def write_name; end @@ -3519,7 +3563,7 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#2906 + # source://prism//lib/prism/node.rb#2772 sig { returns(Integer) } def flags; end @@ -3531,7 +3575,7 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#3033 + # source://prism//lib/prism/node.rb#2882 def type; end end end @@ -3541,13 +3585,13 @@ end # foo.bar ||= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3057 +# source://prism//lib/prism/node.rb#2906 class Prism::CallOrWriteNode < ::Prism::Node # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location? message_loc, Symbol read_name, Symbol write_name, Location operator_loc, Prism::node value, Location location) -> void # # @return [CallOrWriteNode] a new instance of CallOrWriteNode # - # source://prism//lib/prism/node.rb#3059 + # source://prism//lib/prism/node.rb#2908 sig do params( source: Prism::Source, @@ -3567,12 +3611,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#3077 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3074 + # source://prism//lib/prism/node.rb#2923 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -3580,43 +3624,43 @@ class Prism::CallOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3169 + # source://prism//lib/prism/node.rb#3018 sig { returns(T::Boolean) } def attribute_write?; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#3179 + # source://prism//lib/prism/node.rb#3028 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#3117 + # source://prism//lib/prism/node.rb#2966 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3079 + # source://prism//lib/prism/node.rb#2928 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3092 + # source://prism//lib/prism/node.rb#2941 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3084 + # source://prism//lib/prism/node.rb#2933 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> CallOrWriteNode # - # source://prism//lib/prism/node.rb#3097 + # source://prism//lib/prism/node.rb#2946 sig do params( flags: Integer, @@ -3635,13 +3679,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#2928 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#3105 + # source://prism//lib/prism/node.rb#2954 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -3652,49 +3696,49 @@ class Prism::CallOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3174 + # source://prism//lib/prism/node.rb#3023 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#3043 + sig { override.returns(String) } + def inspect; end # def message: () -> String? # - # source://prism//lib/prism/node.rb#3184 + # source://prism//lib/prism/node.rb#3033 sig { returns(T.nilable(String)) } def message; end # attr_reader message_loc: Location? # - # source://prism//lib/prism/node.rb#3130 + # source://prism//lib/prism/node.rb#2979 sig { returns(T.nilable(Prism::Location)) } def message_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#3189 + # source://prism//lib/prism/node.rb#3038 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#3149 + # source://prism//lib/prism/node.rb#2998 sig { returns(Prism::Location) } def operator_loc; end # attr_reader read_name: Symbol # - # source://prism//lib/prism/node.rb#3143 + # source://prism//lib/prism/node.rb#2992 sig { returns(Symbol) } def read_name; end # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#3114 + # source://prism//lib/prism/node.rb#2963 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -3702,7 +3746,7 @@ class Prism::CallOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3159 + # source://prism//lib/prism/node.rb#3008 sig { returns(T::Boolean) } def safe_navigation?; end @@ -3721,13 +3765,13 @@ class Prism::CallOrWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#3228 + # source://prism//lib/prism/node.rb#3061 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#3156 + # source://prism//lib/prism/node.rb#3005 sig { returns(Prism::Node) } def value; end @@ -3735,13 +3779,13 @@ class Prism::CallOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3164 + # source://prism//lib/prism/node.rb#3013 sig { returns(T::Boolean) } def variable_call?; end # attr_reader write_name: Symbol # - # source://prism//lib/prism/node.rb#3146 + # source://prism//lib/prism/node.rb#2995 sig { returns(Symbol) } def write_name; end @@ -3749,7 +3793,7 @@ class Prism::CallOrWriteNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#3110 + # source://prism//lib/prism/node.rb#2959 sig { returns(Integer) } def flags; end @@ -3761,7 +3805,7 @@ class Prism::CallOrWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#3238 + # source://prism//lib/prism/node.rb#3071 def type; end end end @@ -3779,13 +3823,13 @@ end # for foo.bar in baz do end # ^^^^^^^ # -# source://prism//lib/prism/node.rb#3269 +# source://prism//lib/prism/node.rb#3102 class Prism::CallTargetNode < ::Prism::Node # def initialize: (Integer flags, Prism::node receiver, Location call_operator_loc, Symbol name, Location message_loc, Location location) -> void # # @return [CallTargetNode] a new instance of CallTargetNode # - # source://prism//lib/prism/node.rb#3271 + # source://prism//lib/prism/node.rb#3104 sig do params( source: Prism::Source, @@ -3802,12 +3846,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#3237 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3283 + # source://prism//lib/prism/node.rb#3116 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -3815,43 +3859,43 @@ class Prism::CallTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3350 + # source://prism//lib/prism/node.rb#3183 sig { returns(T::Boolean) } def attribute_write?; end # def call_operator: () -> String # - # source://prism//lib/prism/node.rb#3360 + # source://prism//lib/prism/node.rb#3193 sig { returns(String) } def call_operator; end # attr_reader call_operator_loc: Location # - # source://prism//lib/prism/node.rb#3323 + # source://prism//lib/prism/node.rb#3156 sig { returns(Prism::Location) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3288 + # source://prism//lib/prism/node.rb#3121 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3298 + # source://prism//lib/prism/node.rb#3131 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3293 + # source://prism//lib/prism/node.rb#3126 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?receiver: Prism::node, ?call_operator_loc: Location, ?name: Symbol, ?message_loc: Location, ?location: Location) -> CallTargetNode # - # source://prism//lib/prism/node.rb#3303 + # source://prism//lib/prism/node.rb#3136 sig do params( flags: Integer, @@ -3867,13 +3911,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#3121 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node, call_operator_loc: Location, name: Symbol, message_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#3311 + # source://prism//lib/prism/node.rb#3144 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -3884,37 +3928,37 @@ class Prism::CallTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3355 + # source://prism//lib/prism/node.rb#3188 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#3203 + sig { override.returns(String) } + def inspect; end # def message: () -> String # - # source://prism//lib/prism/node.rb#3365 + # source://prism//lib/prism/node.rb#3198 sig { returns(String) } def message; end # attr_reader message_loc: Location # - # source://prism//lib/prism/node.rb#3333 + # source://prism//lib/prism/node.rb#3166 sig { returns(Prism::Location) } def message_loc; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#3330 + # source://prism//lib/prism/node.rb#3163 sig { returns(Symbol) } def name; end # attr_reader receiver: Prism::node # - # source://prism//lib/prism/node.rb#3320 + # source://prism//lib/prism/node.rb#3153 sig { returns(Prism::Node) } def receiver; end @@ -3922,7 +3966,7 @@ class Prism::CallTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3340 + # source://prism//lib/prism/node.rb#3173 sig { returns(T::Boolean) } def safe_navigation?; end @@ -3941,7 +3985,7 @@ class Prism::CallTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#3396 + # source://prism//lib/prism/node.rb#3221 sig { override.returns(Symbol) } def type; end @@ -3949,7 +3993,7 @@ class Prism::CallTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3345 + # source://prism//lib/prism/node.rb#3178 sig { returns(T::Boolean) } def variable_call?; end @@ -3957,7 +4001,7 @@ class Prism::CallTargetNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#3316 + # source://prism//lib/prism/node.rb#3149 sig { returns(Integer) } def flags; end @@ -3969,7 +4013,7 @@ class Prism::CallTargetNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#3406 + # source://prism//lib/prism/node.rb#3231 def type; end end end @@ -3979,13 +4023,13 @@ end # foo => [bar => baz] # ^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3426 +# source://prism//lib/prism/node.rb#3251 class Prism::CapturePatternNode < ::Prism::Node # def initialize: (Prism::node value, Prism::node target, Location operator_loc, Location location) -> void # # @return [CapturePatternNode] a new instance of CapturePatternNode # - # source://prism//lib/prism/node.rb#3428 + # source://prism//lib/prism/node.rb#3253 sig do params( source: Prism::Source, @@ -4000,36 +4044,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#3348 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3438 + # source://prism//lib/prism/node.rb#3263 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3443 + # source://prism//lib/prism/node.rb#3268 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3453 + # source://prism//lib/prism/node.rb#3278 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3448 + # source://prism//lib/prism/node.rb#3273 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?value: Prism::node, ?target: Prism::node, ?operator_loc: Location, ?location: Location) -> CapturePatternNode # - # source://prism//lib/prism/node.rb#3458 + # source://prism//lib/prism/node.rb#3283 sig do params( value: Prism::Node, @@ -4043,40 +4087,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#3268 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::node, target: Prism::node, operator_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#3466 + # source://prism//lib/prism/node.rb#3291 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#3314 + sig { override.returns(String) } + def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#3484 + # source://prism//lib/prism/node.rb#3309 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#3477 + # source://prism//lib/prism/node.rb#3302 sig { returns(Prism::Location) } def operator_loc; end # attr_reader target: Prism::node # - # source://prism//lib/prism/node.rb#3474 + # source://prism//lib/prism/node.rb#3299 sig { returns(Prism::Node) } def target; end @@ -4095,13 +4139,13 @@ class Prism::CapturePatternNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#3513 + # source://prism//lib/prism/node.rb#3332 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#3471 + # source://prism//lib/prism/node.rb#3296 sig { returns(Prism::Node) } def value; end @@ -4113,7 +4157,7 @@ class Prism::CapturePatternNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#3523 + # source://prism//lib/prism/node.rb#3342 def type; end end end @@ -4125,13 +4169,13 @@ end # end # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3543 +# source://prism//lib/prism/node.rb#3362 class Prism::CaseMatchNode < ::Prism::Node # def initialize: (Prism::node? predicate, Array[Prism::node] conditions, ElseNode? consequent, Location case_keyword_loc, Location end_keyword_loc, Location location) -> void # # @return [CaseMatchNode] a new instance of CaseMatchNode # - # source://prism//lib/prism/node.rb#3545 + # source://prism//lib/prism/node.rb#3364 sig do params( source: Prism::Source, @@ -4148,60 +4192,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#3480 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3557 + # source://prism//lib/prism/node.rb#3376 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def case_keyword: () -> String # - # source://prism//lib/prism/node.rb#3617 + # source://prism//lib/prism/node.rb#3436 sig { returns(String) } def case_keyword; end # attr_reader case_keyword_loc: Location # - # source://prism//lib/prism/node.rb#3603 + # source://prism//lib/prism/node.rb#3422 sig { returns(Prism::Location) } def case_keyword_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3562 + # source://prism//lib/prism/node.rb#3381 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3576 + # source://prism//lib/prism/node.rb#3395 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3567 + # source://prism//lib/prism/node.rb#3386 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader conditions: Array[Prism::node] # - # source://prism//lib/prism/node.rb#3597 + # source://prism//lib/prism/node.rb#3416 sig { returns(T::Array[Prism::Node]) } def conditions; end # attr_reader consequent: ElseNode? # - # source://prism//lib/prism/node.rb#3600 + # source://prism//lib/prism/node.rb#3419 sig { returns(T.nilable(Prism::ElseNode)) } def consequent; end # def copy: (?predicate: Prism::node?, ?conditions: Array[Prism::node], ?consequent: ElseNode?, ?case_keyword_loc: Location, ?end_keyword_loc: Location, ?location: Location) -> CaseMatchNode # - # source://prism//lib/prism/node.rb#3581 + # source://prism//lib/prism/node.rb#3400 sig do params( predicate: T.nilable(Prism::Node), @@ -4217,40 +4261,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#3381 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { predicate: Prism::node?, conditions: Array[Prism::node], consequent: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#3589 + # source://prism//lib/prism/node.rb#3408 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def end_keyword: () -> String # - # source://prism//lib/prism/node.rb#3622 + # source://prism//lib/prism/node.rb#3441 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#3610 + # source://prism//lib/prism/node.rb#3429 sig { returns(Prism::Location) } def end_keyword_loc; end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#3446 + 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#3413 sig { returns(T.nilable(Prism::Node)) } def predicate; end @@ -4269,7 +4313,7 @@ class Prism::CaseMatchNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#3661 + # source://prism//lib/prism/node.rb#3464 sig { override.returns(Symbol) } def type; end @@ -4281,7 +4325,7 @@ class Prism::CaseMatchNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#3671 + # source://prism//lib/prism/node.rb#3474 def type; end end end @@ -4293,13 +4337,13 @@ end # end # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3694 +# source://prism//lib/prism/node.rb#3497 class Prism::CaseNode < ::Prism::Node # def initialize: (Prism::node? predicate, Array[Prism::node] conditions, ElseNode? consequent, Location case_keyword_loc, Location end_keyword_loc, Location location) -> void # # @return [CaseNode] a new instance of CaseNode # - # source://prism//lib/prism/node.rb#3696 + # source://prism//lib/prism/node.rb#3499 sig do params( source: Prism::Source, @@ -4316,60 +4360,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#3615 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3708 + # source://prism//lib/prism/node.rb#3511 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def case_keyword: () -> String # - # source://prism//lib/prism/node.rb#3768 + # source://prism//lib/prism/node.rb#3571 sig { returns(String) } def case_keyword; end # attr_reader case_keyword_loc: Location # - # source://prism//lib/prism/node.rb#3754 + # source://prism//lib/prism/node.rb#3557 sig { returns(Prism::Location) } def case_keyword_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3713 + # source://prism//lib/prism/node.rb#3516 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3727 + # source://prism//lib/prism/node.rb#3530 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3718 + # source://prism//lib/prism/node.rb#3521 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader conditions: Array[Prism::node] # - # source://prism//lib/prism/node.rb#3748 + # source://prism//lib/prism/node.rb#3551 sig { returns(T::Array[Prism::Node]) } def conditions; end # attr_reader consequent: ElseNode? # - # source://prism//lib/prism/node.rb#3751 + # source://prism//lib/prism/node.rb#3554 sig { returns(T.nilable(Prism::ElseNode)) } def consequent; end # def copy: (?predicate: Prism::node?, ?conditions: Array[Prism::node], ?consequent: ElseNode?, ?case_keyword_loc: Location, ?end_keyword_loc: Location, ?location: Location) -> CaseNode # - # source://prism//lib/prism/node.rb#3732 + # source://prism//lib/prism/node.rb#3535 sig do params( predicate: T.nilable(Prism::Node), @@ -4385,40 +4429,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#3516 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { predicate: Prism::node?, conditions: Array[Prism::node], consequent: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#3740 + # source://prism//lib/prism/node.rb#3543 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def end_keyword: () -> String # - # source://prism//lib/prism/node.rb#3773 + # source://prism//lib/prism/node.rb#3576 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#3761 + # source://prism//lib/prism/node.rb#3564 sig { returns(Prism::Location) } def end_keyword_loc; end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#3581 + 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#3548 sig { returns(T.nilable(Prism::Node)) } def predicate; end @@ -4437,7 +4481,7 @@ class Prism::CaseNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#3812 + # source://prism//lib/prism/node.rb#3599 sig { override.returns(Symbol) } def type; end @@ -4449,7 +4493,7 @@ class Prism::CaseNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#3822 + # source://prism//lib/prism/node.rb#3609 def type; end end end @@ -4459,13 +4503,13 @@ end # class Foo end # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3843 +# source://prism//lib/prism/node.rb#3630 class Prism::ClassNode < ::Prism::Node # def initialize: (Array[Symbol] locals, Location class_keyword_loc, Prism::node constant_path, Location? inheritance_operator_loc, Prism::node? superclass, Prism::node? body, Location end_keyword_loc, Symbol name, Location location) -> void # # @return [ClassNode] a new instance of ClassNode # - # source://prism//lib/prism/node.rb#3845 + # source://prism//lib/prism/node.rb#3632 sig do params( source: Prism::Source, @@ -4485,60 +4529,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#3775 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3860 + # source://prism//lib/prism/node.rb#3647 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: Prism::node? # - # source://prism//lib/prism/node.rb#3926 + # source://prism//lib/prism/node.rb#3713 sig { returns(T.nilable(Prism::Node)) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3865 + # source://prism//lib/prism/node.rb#3652 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def class_keyword: () -> String # - # source://prism//lib/prism/node.rb#3939 + # source://prism//lib/prism/node.rb#3726 sig { returns(String) } def class_keyword; end # attr_reader class_keyword_loc: Location # - # source://prism//lib/prism/node.rb#3900 + # source://prism//lib/prism/node.rb#3687 sig { returns(Prism::Location) } def class_keyword_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3879 + # source://prism//lib/prism/node.rb#3666 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3870 + # source://prism//lib/prism/node.rb#3657 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader constant_path: Prism::node # - # source://prism//lib/prism/node.rb#3907 + # source://prism//lib/prism/node.rb#3694 sig { returns(Prism::Node) } def constant_path; end # def copy: (?locals: Array[Symbol], ?class_keyword_loc: Location, ?constant_path: Prism::node, ?inheritance_operator_loc: Location?, ?superclass: Prism::node?, ?body: Prism::node?, ?end_keyword_loc: Location, ?name: Symbol, ?location: Location) -> ClassNode # - # source://prism//lib/prism/node.rb#3884 + # source://prism//lib/prism/node.rb#3671 sig do params( locals: T::Array[Symbol], @@ -4557,25 +4601,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#3652 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], class_keyword_loc: Location, constant_path: Prism::node, inheritance_operator_loc: Location?, superclass: Prism::node?, body: Prism::node?, end_keyword_loc: Location, name: Symbol, location: Location } # - # source://prism//lib/prism/node.rb#3892 + # source://prism//lib/prism/node.rb#3679 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def end_keyword: () -> String # - # source://prism//lib/prism/node.rb#3949 + # source://prism//lib/prism/node.rb#3736 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#3929 + # source://prism//lib/prism/node.rb#3716 sig { returns(Prism::Location) } def end_keyword_loc; end @@ -4584,37 +4628,37 @@ class Prism::ClassNode < ::Prism::Node # def inheritance_operator: () -> String? # - # source://prism//lib/prism/node.rb#3944 + # source://prism//lib/prism/node.rb#3731 sig { returns(T.nilable(String)) } def inheritance_operator; end # attr_reader inheritance_operator_loc: Location? # - # source://prism//lib/prism/node.rb#3910 + # source://prism//lib/prism/node.rb#3697 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#3741 + 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#3684 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#3723 sig { returns(Symbol) } def name; end # attr_reader superclass: Prism::node? # - # source://prism//lib/prism/node.rb#3923 + # source://prism//lib/prism/node.rb#3710 sig { returns(T.nilable(Prism::Node)) } def superclass; end @@ -4633,7 +4677,7 @@ class Prism::ClassNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#3992 + # source://prism//lib/prism/node.rb#3759 sig { override.returns(Symbol) } def type; end @@ -4645,7 +4689,7 @@ class Prism::ClassNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#4002 + # source://prism//lib/prism/node.rb#3769 def type; end end end @@ -4655,13 +4699,13 @@ end # @@target &&= value # ^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4026 +# source://prism//lib/prism/node.rb#3793 class Prism::ClassVariableAndWriteNode < ::Prism::Node # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void # # @return [ClassVariableAndWriteNode] a new instance of ClassVariableAndWriteNode # - # source://prism//lib/prism/node.rb#4028 + # source://prism//lib/prism/node.rb#3795 sig do params( source: Prism::Source, @@ -4677,36 +4721,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#3898 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4039 + # source://prism//lib/prism/node.rb#3806 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4044 + # source://prism//lib/prism/node.rb#3811 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4054 + # source://prism//lib/prism/node.rb#3821 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4049 + # source://prism//lib/prism/node.rb#3816 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ClassVariableAndWriteNode # - # source://prism//lib/prism/node.rb#4059 + # source://prism//lib/prism/node.rb#3826 sig do params( name: Symbol, @@ -4721,13 +4765,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#3811 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#4067 + # source://prism//lib/prism/node.rb#3834 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -4737,33 +4781,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#3864 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4072 + # source://prism//lib/prism/node.rb#3839 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#4075 + # source://prism//lib/prism/node.rb#3842 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#4092 + # source://prism//lib/prism/node.rb#3859 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#4082 + # source://prism//lib/prism/node.rb#3849 sig { returns(Prism::Location) } def operator_loc; end @@ -4782,13 +4826,13 @@ class Prism::ClassVariableAndWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#4121 + # source://prism//lib/prism/node.rb#3882 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#4089 + # source://prism//lib/prism/node.rb#3856 sig { returns(Prism::Node) } def value; end @@ -4800,7 +4844,7 @@ class Prism::ClassVariableAndWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#4131 + # source://prism//lib/prism/node.rb#3892 def type; end end end @@ -4810,13 +4854,13 @@ end # @@target += value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4150 +# source://prism//lib/prism/node.rb#3911 class Prism::ClassVariableOperatorWriteNode < ::Prism::Node # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Symbol operator, Location location) -> void # # @return [ClassVariableOperatorWriteNode] a new instance of ClassVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#4152 + # source://prism//lib/prism/node.rb#3913 sig do params( source: Prism::Source, @@ -4833,36 +4877,36 @@ class Prism::ClassVariableOperatorWriteNode < ::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#4261 + # source://prism//lib/prism/node.rb#4015 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4164 + # source://prism//lib/prism/node.rb#3925 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4169 + # source://prism//lib/prism/node.rb#3930 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4179 + # source://prism//lib/prism/node.rb#3940 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4174 + # source://prism//lib/prism/node.rb#3935 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?operator: Symbol, ?location: Location) -> ClassVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#4184 + # source://prism//lib/prism/node.rb#3945 sig do params( name: Symbol, @@ -4878,13 +4922,13 @@ class Prism::ClassVariableOperatorWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4169 + # source://prism//lib/prism/node.rb#3930 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, operator: Symbol, location: Location } # - # source://prism//lib/prism/node.rb#4192 + # source://prism//lib/prism/node.rb#3953 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -4894,33 +4938,33 @@ 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#3981 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4197 + # source://prism//lib/prism/node.rb#3958 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#4200 + # source://prism//lib/prism/node.rb#3961 sig { returns(Prism::Location) } def name_loc; end # attr_reader operator: Symbol # - # source://prism//lib/prism/node.rb#4217 + # source://prism//lib/prism/node.rb#3978 sig { returns(Symbol) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#4207 + # source://prism//lib/prism/node.rb#3968 sig { returns(Prism::Location) } def operator_loc; end @@ -4939,13 +4983,13 @@ class Prism::ClassVariableOperatorWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#4245 + # source://prism//lib/prism/node.rb#3999 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#4214 + # source://prism//lib/prism/node.rb#3975 sig { returns(Prism::Node) } def value; end @@ -4957,7 +5001,7 @@ class Prism::ClassVariableOperatorWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#4255 + # source://prism//lib/prism/node.rb#4009 def type; end end end @@ -4967,13 +5011,13 @@ end # @@target ||= value # ^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4275 +# source://prism//lib/prism/node.rb#4029 class Prism::ClassVariableOrWriteNode < ::Prism::Node # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void # # @return [ClassVariableOrWriteNode] a new instance of ClassVariableOrWriteNode # - # source://prism//lib/prism/node.rb#4277 + # source://prism//lib/prism/node.rb#4031 sig do params( source: Prism::Source, @@ -4989,36 +5033,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#4134 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4288 + # source://prism//lib/prism/node.rb#4042 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4293 + # source://prism//lib/prism/node.rb#4047 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4303 + # source://prism//lib/prism/node.rb#4057 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4298 + # source://prism//lib/prism/node.rb#4052 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ClassVariableOrWriteNode # - # source://prism//lib/prism/node.rb#4308 + # source://prism//lib/prism/node.rb#4062 sig do params( name: Symbol, @@ -5033,13 +5077,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#4047 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#4316 + # source://prism//lib/prism/node.rb#4070 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -5049,33 +5093,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#4100 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4321 + # source://prism//lib/prism/node.rb#4075 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#4324 + # source://prism//lib/prism/node.rb#4078 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#4341 + # source://prism//lib/prism/node.rb#4095 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#4331 + # source://prism//lib/prism/node.rb#4085 sig { returns(Prism::Location) } def operator_loc; end @@ -5094,13 +5138,13 @@ class Prism::ClassVariableOrWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#4370 + # source://prism//lib/prism/node.rb#4118 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#4338 + # source://prism//lib/prism/node.rb#4092 sig { returns(Prism::Node) } def value; end @@ -5112,7 +5156,7 @@ class Prism::ClassVariableOrWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#4380 + # source://prism//lib/prism/node.rb#4128 def type; end end end @@ -5122,73 +5166,73 @@ end # @@foo # ^^^^^ # -# source://prism//lib/prism/node.rb#4399 +# source://prism//lib/prism/node.rb#4147 class Prism::ClassVariableReadNode < ::Prism::Node # def initialize: (Symbol name, Location location) -> void # # @return [ClassVariableReadNode] a new instance of ClassVariableReadNode # - # source://prism//lib/prism/node.rb#4401 + # source://prism//lib/prism/node.rb#4149 sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } def initialize(source, name, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#4485 + # source://prism//lib/prism/node.rb#4231 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4409 + # source://prism//lib/prism/node.rb#4157 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4414 + # source://prism//lib/prism/node.rb#4162 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4424 + # source://prism//lib/prism/node.rb#4172 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4419 + # source://prism//lib/prism/node.rb#4167 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?location: Location) -> ClassVariableReadNode # - # source://prism//lib/prism/node.rb#4429 + # source://prism//lib/prism/node.rb#4177 sig { params(name: Symbol, location: Prism::Location).returns(Prism::ClassVariableReadNode) } def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4414 + # source://prism//lib/prism/node.rb#4162 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } # - # source://prism//lib/prism/node.rb#4437 + # source://prism//lib/prism/node.rb#4185 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#4197 + sig { override.returns(String) } + def inspect; end # The name of the class variable, which is a `@@` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). # @@ -5196,7 +5240,7 @@ class Prism::ClassVariableReadNode < ::Prism::Node # # @@_test # name `:@@_test` # - # source://prism//lib/prism/node.rb#4446 + # source://prism//lib/prism/node.rb#4194 sig { returns(Symbol) } def name; end @@ -5215,7 +5259,7 @@ class Prism::ClassVariableReadNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#4469 + # source://prism//lib/prism/node.rb#4215 sig { override.returns(Symbol) } def type; end @@ -5227,7 +5271,7 @@ class Prism::ClassVariableReadNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#4479 + # source://prism//lib/prism/node.rb#4225 def type; end end end @@ -5237,77 +5281,77 @@ end # @@foo, @@bar = baz # ^^^^^ ^^^^^ # -# source://prism//lib/prism/node.rb#4495 +# source://prism//lib/prism/node.rb#4241 class Prism::ClassVariableTargetNode < ::Prism::Node # def initialize: (Symbol name, Location location) -> void # # @return [ClassVariableTargetNode] a new instance of ClassVariableTargetNode # - # source://prism//lib/prism/node.rb#4497 + # source://prism//lib/prism/node.rb#4243 sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } def initialize(source, name, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#4577 + # source://prism//lib/prism/node.rb#4321 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4505 + # source://prism//lib/prism/node.rb#4251 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4510 + # source://prism//lib/prism/node.rb#4256 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4520 + # source://prism//lib/prism/node.rb#4266 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4515 + # source://prism//lib/prism/node.rb#4261 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?location: Location) -> ClassVariableTargetNode # - # source://prism//lib/prism/node.rb#4525 + # source://prism//lib/prism/node.rb#4271 sig { params(name: Symbol, location: Prism::Location).returns(Prism::ClassVariableTargetNode) } def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4510 + # source://prism//lib/prism/node.rb#4256 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } # - # source://prism//lib/prism/node.rb#4533 + # source://prism//lib/prism/node.rb#4279 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#4287 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4538 + # source://prism//lib/prism/node.rb#4284 sig { returns(Symbol) } def name; end @@ -5326,7 +5370,7 @@ class Prism::ClassVariableTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#4561 + # source://prism//lib/prism/node.rb#4305 sig { override.returns(Symbol) } def type; end @@ -5338,7 +5382,7 @@ class Prism::ClassVariableTargetNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#4571 + # source://prism//lib/prism/node.rb#4315 def type; end end end @@ -5348,13 +5392,13 @@ end # @@foo = 1 # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4587 +# source://prism//lib/prism/node.rb#4331 class Prism::ClassVariableWriteNode < ::Prism::Node # def initialize: (Symbol name, Location name_loc, Prism::node value, Location operator_loc, Location location) -> void # # @return [ClassVariableWriteNode] a new instance of ClassVariableWriteNode # - # source://prism//lib/prism/node.rb#4589 + # source://prism//lib/prism/node.rb#4333 sig do params( source: Prism::Source, @@ -5370,36 +5414,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#4452 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4600 + # source://prism//lib/prism/node.rb#4344 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4605 + # source://prism//lib/prism/node.rb#4349 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4615 + # source://prism//lib/prism/node.rb#4359 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4610 + # source://prism//lib/prism/node.rb#4354 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location, ?location: Location) -> ClassVariableWriteNode # - # source://prism//lib/prism/node.rb#4620 + # source://prism//lib/prism/node.rb#4364 sig do params( name: Symbol, @@ -5414,24 +5458,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#4349 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#4628 + # source://prism//lib/prism/node.rb#4372 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#4418 + sig { override.returns(String) } + def inspect; end # The name of the class variable, which is a `@@` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). # @@ -5439,7 +5483,7 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # # @@_test = :test # name `@@_test` # - # source://prism//lib/prism/node.rb#4637 + # source://prism//lib/prism/node.rb#4381 sig { returns(Symbol) } def name; end @@ -5448,13 +5492,13 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # @@foo = :bar # ^^^^^ # - # source://prism//lib/prism/node.rb#4643 + # source://prism//lib/prism/node.rb#4387 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#4669 + # source://prism//lib/prism/node.rb#4413 sig { returns(String) } def operator; end @@ -5463,7 +5507,7 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # @@foo = :bar # ^ # - # source://prism//lib/prism/node.rb#4662 + # source://prism//lib/prism/node.rb#4406 sig { returns(Prism::Location) } def operator_loc; end @@ -5482,7 +5526,7 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#4698 + # source://prism//lib/prism/node.rb#4436 sig { override.returns(Symbol) } def type; end @@ -5494,7 +5538,7 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # @@_xyz = 123 # ^^^ # - # source://prism//lib/prism/node.rb#4656 + # source://prism//lib/prism/node.rb#4400 sig { returns(Prism::Node) } def value; end @@ -5506,7 +5550,7 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#4708 + # source://prism//lib/prism/node.rb#4446 def type; end end end @@ -5514,7 +5558,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 +5566,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 +5614,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 +5632,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 +5776,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. @@ -6484,8 +6528,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 +6535,13 @@ end # Target &&= value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4727 +# source://prism//lib/prism/node.rb#4465 class Prism::ConstantAndWriteNode < ::Prism::Node # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void # # @return [ConstantAndWriteNode] a new instance of ConstantAndWriteNode # - # source://prism//lib/prism/node.rb#4729 + # source://prism//lib/prism/node.rb#4467 sig do params( source: Prism::Source, @@ -6515,36 +6557,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#4570 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4740 + # source://prism//lib/prism/node.rb#4478 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4745 + # source://prism//lib/prism/node.rb#4483 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4755 + # source://prism//lib/prism/node.rb#4493 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4750 + # source://prism//lib/prism/node.rb#4488 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ConstantAndWriteNode # - # source://prism//lib/prism/node.rb#4760 + # source://prism//lib/prism/node.rb#4498 sig do params( name: Symbol, @@ -6559,13 +6601,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#4483 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#4768 + # source://prism//lib/prism/node.rb#4506 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -6575,33 +6617,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#4536 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4773 + # source://prism//lib/prism/node.rb#4511 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#4776 + # source://prism//lib/prism/node.rb#4514 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#4793 + # source://prism//lib/prism/node.rb#4531 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#4783 + # source://prism//lib/prism/node.rb#4521 sig { returns(Prism::Location) } def operator_loc; end @@ -6620,13 +6662,13 @@ class Prism::ConstantAndWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#4822 + # source://prism//lib/prism/node.rb#4554 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#4790 + # source://prism//lib/prism/node.rb#4528 sig { returns(Prism::Node) } def value; end @@ -6638,7 +6680,7 @@ class Prism::ConstantAndWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#4832 + # source://prism//lib/prism/node.rb#4564 def type; end end end @@ -6648,13 +6690,13 @@ end # Target += value # ^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4851 +# source://prism//lib/prism/node.rb#4583 class Prism::ConstantOperatorWriteNode < ::Prism::Node # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Symbol operator, Location location) -> void # # @return [ConstantOperatorWriteNode] a new instance of ConstantOperatorWriteNode # - # source://prism//lib/prism/node.rb#4853 + # source://prism//lib/prism/node.rb#4585 sig do params( source: Prism::Source, @@ -6671,36 +6713,36 @@ class Prism::ConstantOperatorWriteNode < ::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#4962 + # source://prism//lib/prism/node.rb#4687 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4865 + # source://prism//lib/prism/node.rb#4597 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4870 + # source://prism//lib/prism/node.rb#4602 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4880 + # source://prism//lib/prism/node.rb#4612 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4875 + # source://prism//lib/prism/node.rb#4607 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?operator: Symbol, ?location: Location) -> ConstantOperatorWriteNode # - # source://prism//lib/prism/node.rb#4885 + # source://prism//lib/prism/node.rb#4617 sig do params( name: Symbol, @@ -6716,13 +6758,13 @@ class Prism::ConstantOperatorWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4870 + # source://prism//lib/prism/node.rb#4602 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, operator: Symbol, location: Location } # - # source://prism//lib/prism/node.rb#4893 + # source://prism//lib/prism/node.rb#4625 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -6732,33 +6774,33 @@ 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#4653 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4898 + # source://prism//lib/prism/node.rb#4630 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#4901 + # source://prism//lib/prism/node.rb#4633 sig { returns(Prism::Location) } def name_loc; end # attr_reader operator: Symbol # - # source://prism//lib/prism/node.rb#4918 + # source://prism//lib/prism/node.rb#4650 sig { returns(Symbol) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#4908 + # source://prism//lib/prism/node.rb#4640 sig { returns(Prism::Location) } def operator_loc; end @@ -6777,13 +6819,13 @@ class Prism::ConstantOperatorWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#4946 + # source://prism//lib/prism/node.rb#4671 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#4915 + # source://prism//lib/prism/node.rb#4647 sig { returns(Prism::Node) } def value; end @@ -6795,7 +6837,7 @@ class Prism::ConstantOperatorWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#4956 + # source://prism//lib/prism/node.rb#4681 def type; end end end @@ -6805,13 +6847,13 @@ end # Target ||= value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4976 +# source://prism//lib/prism/node.rb#4701 class Prism::ConstantOrWriteNode < ::Prism::Node # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void # # @return [ConstantOrWriteNode] a new instance of ConstantOrWriteNode # - # source://prism//lib/prism/node.rb#4978 + # source://prism//lib/prism/node.rb#4703 sig do params( source: Prism::Source, @@ -6827,36 +6869,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#4806 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4989 + # source://prism//lib/prism/node.rb#4714 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4994 + # source://prism//lib/prism/node.rb#4719 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5004 + # source://prism//lib/prism/node.rb#4729 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4999 + # source://prism//lib/prism/node.rb#4724 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ConstantOrWriteNode # - # source://prism//lib/prism/node.rb#5009 + # source://prism//lib/prism/node.rb#4734 sig do params( name: Symbol, @@ -6871,13 +6913,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#4719 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#5017 + # source://prism//lib/prism/node.rb#4742 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -6887,33 +6929,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#4772 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#5022 + # source://prism//lib/prism/node.rb#4747 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#5025 + # source://prism//lib/prism/node.rb#4750 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#5042 + # source://prism//lib/prism/node.rb#4767 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#5032 + # source://prism//lib/prism/node.rb#4757 sig { returns(Prism::Location) } def operator_loc; end @@ -6932,13 +6974,13 @@ class Prism::ConstantOrWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#5071 + # source://prism//lib/prism/node.rb#4790 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#5039 + # source://prism//lib/prism/node.rb#4764 sig { returns(Prism::Node) } def value; end @@ -6950,7 +6992,7 @@ class Prism::ConstantOrWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#5081 + # source://prism//lib/prism/node.rb#4800 def type; end end end @@ -6960,13 +7002,13 @@ end # Parent::Child &&= value # ^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#5100 +# source://prism//lib/prism/node.rb#4819 class Prism::ConstantPathAndWriteNode < ::Prism::Node # def initialize: (ConstantPathNode target, Location operator_loc, Prism::node value, Location location) -> void # # @return [ConstantPathAndWriteNode] a new instance of ConstantPathAndWriteNode # - # source://prism//lib/prism/node.rb#5102 + # source://prism//lib/prism/node.rb#4821 sig do params( source: Prism::Source, @@ -6981,36 +7023,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#4916 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5112 + # source://prism//lib/prism/node.rb#4831 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5117 + # source://prism//lib/prism/node.rb#4836 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5127 + # source://prism//lib/prism/node.rb#4846 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5122 + # source://prism//lib/prism/node.rb#4841 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ConstantPathAndWriteNode # - # source://prism//lib/prism/node.rb#5132 + # source://prism//lib/prism/node.rb#4851 sig do params( target: Prism::ConstantPathNode, @@ -7024,40 +7066,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#4836 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#5140 + # source://prism//lib/prism/node.rb#4859 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#4882 + sig { override.returns(String) } + def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#5158 + # source://prism//lib/prism/node.rb#4877 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#5148 + # source://prism//lib/prism/node.rb#4867 sig { returns(Prism::Location) } def operator_loc; end # attr_reader target: ConstantPathNode # - # source://prism//lib/prism/node.rb#5145 + # source://prism//lib/prism/node.rb#4864 sig { returns(Prism::ConstantPathNode) } def target; end @@ -7076,13 +7118,13 @@ class Prism::ConstantPathAndWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#5187 + # source://prism//lib/prism/node.rb#4900 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#5155 + # source://prism//lib/prism/node.rb#4874 sig { returns(Prism::Node) } def value; end @@ -7094,7 +7136,7 @@ class Prism::ConstantPathAndWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#5197 + # source://prism//lib/prism/node.rb#4910 def type; end end end @@ -7104,99 +7146,92 @@ end # Foo::Bar # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#5215 +# source://prism//lib/prism/node.rb#4928 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#4930 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#5056 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5227 + # source://prism//lib/prism/node.rb#4941 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. - # - # ::Foo - # ^^^ + # 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. # - # 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#170 def child; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5232 + # source://prism//lib/prism/node.rb#4946 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5245 + # source://prism//lib/prism/node.rb#4958 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5237 + # source://prism//lib/prism/node.rb#4951 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#4963 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#4946 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#4971 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def delimiter: () -> String # - # source://prism//lib/prism/node.rb#5301 + # source://prism//lib/prism/node.rb#5017 sig { returns(String) } def delimiter; end @@ -7208,7 +7243,7 @@ class Prism::ConstantPathNode < ::Prism::Node # One::Two # ^^ # - # source://prism//lib/prism/node.rb#5294 + # source://prism//lib/prism/node.rb#4997 sig { returns(Prism::Location) } def delimiter_loc; end @@ -7217,7 +7252,7 @@ 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#163 sig { returns(String) } def full_name; end @@ -7228,11 +7263,29 @@ class Prism::ConstantPathNode < ::Prism::Node sig { returns(T::Array[Symbol]) } def full_name_parts; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String + # + # source://prism//lib/prism/node.rb#5022 + sig { override.returns(String) } + def inspect; end + + # The name of the constant being accessed. This could be `nil` in the event of a syntax error. + # + # source://prism//lib/prism/node.rb#4988 + sig { returns(T.nilable(Symbol)) } + def name; end + + # The location of the name of the constant. + # + # ::Foo + # ^^^ + # + # One::Two + # ^^^ # - # source://prism//lib/prism/node.rb#5306 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#5010 + sig { returns(Prism::Location) } + def name_loc; end # The left-hand node of the path, if present. It can be `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). It will be `nil` when the constant lookup is at the root of the module tree. # @@ -7245,7 +7298,7 @@ class Prism::ConstantPathNode < ::Prism::Node # a.b::C # ^^^ # - # source://prism//lib/prism/node.rb#5272 + # source://prism//lib/prism/node.rb#4985 sig { returns(T.nilable(Prism::Node)) } def parent; end @@ -7264,7 +7317,7 @@ class Prism::ConstantPathNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#5334 + # source://prism//lib/prism/node.rb#5040 sig { override.returns(Symbol) } def type; end @@ -7276,7 +7329,7 @@ class Prism::ConstantPathNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#5344 + # source://prism//lib/prism/node.rb#5050 def type; end end end @@ -7303,13 +7356,13 @@ class Prism::ConstantPathNode::MissingNodesInConstantPathError < ::StandardError # Parent::Child += value # ^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#5362 +# source://prism//lib/prism/node.rb#5069 class Prism::ConstantPathOperatorWriteNode < ::Prism::Node # def initialize: (ConstantPathNode target, Location operator_loc, Prism::node value, Symbol operator, Location location) -> void # # @return [ConstantPathOperatorWriteNode] a new instance of ConstantPathOperatorWriteNode # - # source://prism//lib/prism/node.rb#5364 + # source://prism//lib/prism/node.rb#5071 sig do params( source: Prism::Source, @@ -7325,36 +7378,36 @@ class Prism::ConstantPathOperatorWriteNode < ::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#5465 + # source://prism//lib/prism/node.rb#5165 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5375 + # source://prism//lib/prism/node.rb#5082 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5380 + # source://prism//lib/prism/node.rb#5087 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5390 + # source://prism//lib/prism/node.rb#5097 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5385 + # source://prism//lib/prism/node.rb#5092 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 # - # source://prism//lib/prism/node.rb#5395 + # source://prism//lib/prism/node.rb#5102 sig do params( target: Prism::ConstantPathNode, @@ -7369,40 +7422,40 @@ class Prism::ConstantPathOperatorWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5380 + # source://prism//lib/prism/node.rb#5087 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Prism::node, operator: Symbol, location: Location } # - # source://prism//lib/prism/node.rb#5403 + # source://prism//lib/prism/node.rb#5110 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#5131 + sig { override.returns(String) } + def inspect; end # attr_reader operator: Symbol # - # source://prism//lib/prism/node.rb#5421 + # source://prism//lib/prism/node.rb#5128 sig { returns(Symbol) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#5411 + # source://prism//lib/prism/node.rb#5118 sig { returns(Prism::Location) } def operator_loc; end # attr_reader target: ConstantPathNode # - # source://prism//lib/prism/node.rb#5408 + # source://prism//lib/prism/node.rb#5115 sig { returns(Prism::ConstantPathNode) } def target; end @@ -7421,13 +7474,13 @@ class Prism::ConstantPathOperatorWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#5449 + # source://prism//lib/prism/node.rb#5149 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#5418 + # source://prism//lib/prism/node.rb#5125 sig { returns(Prism::Node) } def value; end @@ -7439,7 +7492,7 @@ class Prism::ConstantPathOperatorWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#5459 + # source://prism//lib/prism/node.rb#5159 def type; end end end @@ -7449,13 +7502,13 @@ end # Parent::Child ||= value # ^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#5478 +# source://prism//lib/prism/node.rb#5178 class Prism::ConstantPathOrWriteNode < ::Prism::Node # def initialize: (ConstantPathNode target, Location operator_loc, Prism::node value, Location location) -> void # # @return [ConstantPathOrWriteNode] a new instance of ConstantPathOrWriteNode # - # source://prism//lib/prism/node.rb#5480 + # source://prism//lib/prism/node.rb#5180 sig do params( source: Prism::Source, @@ -7470,36 +7523,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#5275 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5490 + # source://prism//lib/prism/node.rb#5190 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5495 + # source://prism//lib/prism/node.rb#5195 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5505 + # source://prism//lib/prism/node.rb#5205 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5500 + # source://prism//lib/prism/node.rb#5200 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ConstantPathOrWriteNode # - # source://prism//lib/prism/node.rb#5510 + # source://prism//lib/prism/node.rb#5210 sig do params( target: Prism::ConstantPathNode, @@ -7513,40 +7566,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#5195 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#5518 + # source://prism//lib/prism/node.rb#5218 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#5241 + sig { override.returns(String) } + def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#5536 + # source://prism//lib/prism/node.rb#5236 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#5526 + # source://prism//lib/prism/node.rb#5226 sig { returns(Prism::Location) } def operator_loc; end # attr_reader target: ConstantPathNode # - # source://prism//lib/prism/node.rb#5523 + # source://prism//lib/prism/node.rb#5223 sig { returns(Prism::ConstantPathNode) } def target; end @@ -7565,13 +7618,13 @@ class Prism::ConstantPathOrWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#5565 + # source://prism//lib/prism/node.rb#5259 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#5533 + # source://prism//lib/prism/node.rb#5233 sig { returns(Prism::Node) } def value; end @@ -7583,7 +7636,7 @@ class Prism::ConstantPathOrWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#5575 + # source://prism//lib/prism/node.rb#5269 def type; end end end @@ -7593,95 +7646,98 @@ end # Foo::Foo, Bar::Bar = baz # ^^^^^^^^ ^^^^^^^^ # -# source://prism//lib/prism/node.rb#5593 +# source://prism//lib/prism/node.rb#5287 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#5289 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#5394 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5605 + # source://prism//lib/prism/node.rb#5300 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#212 def child; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5610 + # source://prism//lib/prism/node.rb#5305 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5623 + # source://prism//lib/prism/node.rb#5317 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5615 + # source://prism//lib/prism/node.rb#5310 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#5322 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#5305 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#5330 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def delimiter: () -> String # - # source://prism//lib/prism/node.rb#5654 + # source://prism//lib/prism/node.rb#5355 sig { returns(String) } def delimiter; end # attr_reader delimiter_loc: Location # - # source://prism//lib/prism/node.rb#5647 + # source://prism//lib/prism/node.rb#5341 sig { returns(Prism::Location) } def delimiter_loc; end @@ -7690,26 +7746,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#205 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#185 sig { returns(T::Array[Symbol]) } def full_name_parts; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String + # + # source://prism//lib/prism/node.rb#5360 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol? + # + # source://prism//lib/prism/node.rb#5338 + sig { returns(T.nilable(Symbol)) } + def name; end + + # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#5659 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#5348 + sig { returns(Prism::Location) } + def name_loc; end # attr_reader parent: Prism::node? # - # source://prism//lib/prism/node.rb#5641 + # source://prism//lib/prism/node.rb#5335 sig { returns(T.nilable(Prism::Node)) } def parent; end @@ -7728,7 +7796,7 @@ class Prism::ConstantPathTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#5687 + # source://prism//lib/prism/node.rb#5378 sig { override.returns(Symbol) } def type; end @@ -7740,7 +7808,7 @@ class Prism::ConstantPathTargetNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#5697 + # source://prism//lib/prism/node.rb#5388 def type; end end end @@ -7756,13 +7824,13 @@ end # ::Foo::Bar = 1 # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#5721 +# source://prism//lib/prism/node.rb#5413 class Prism::ConstantPathWriteNode < ::Prism::Node # def initialize: (ConstantPathNode target, Location operator_loc, Prism::node value, Location location) -> void # # @return [ConstantPathWriteNode] a new instance of ConstantPathWriteNode # - # source://prism//lib/prism/node.rb#5723 + # source://prism//lib/prism/node.rb#5415 sig do params( source: Prism::Source, @@ -7777,36 +7845,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#5522 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5733 + # source://prism//lib/prism/node.rb#5425 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5738 + # source://prism//lib/prism/node.rb#5430 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5748 + # source://prism//lib/prism/node.rb#5440 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5743 + # source://prism//lib/prism/node.rb#5435 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ConstantPathWriteNode # - # source://prism//lib/prism/node.rb#5753 + # source://prism//lib/prism/node.rb#5445 sig do params( target: Prism::ConstantPathNode, @@ -7820,28 +7888,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#5430 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#5761 + # source://prism//lib/prism/node.rb#5453 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#5488 + sig { override.returns(String) } + def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#5791 + # source://prism//lib/prism/node.rb#5483 sig { returns(String) } def operator; end @@ -7850,7 +7918,7 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # ::ABC = 123 # ^ # - # source://prism//lib/prism/node.rb#5778 + # source://prism//lib/prism/node.rb#5470 sig { returns(Prism::Location) } def operator_loc; end @@ -7862,7 +7930,7 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # ::Foo = :abc # ^^^^^ # - # source://prism//lib/prism/node.rb#5772 + # source://prism//lib/prism/node.rb#5464 sig { returns(Prism::ConstantPathNode) } def target; end @@ -7881,7 +7949,7 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#5820 + # source://prism//lib/prism/node.rb#5506 sig { override.returns(Symbol) } def type; end @@ -7890,7 +7958,7 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # FOO::BAR = :abc # ^^^^ # - # source://prism//lib/prism/node.rb#5788 + # source://prism//lib/prism/node.rb#5480 sig { returns(Prism::Node) } def value; end @@ -7902,7 +7970,7 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#5830 + # source://prism//lib/prism/node.rb#5516 def type; end end end @@ -7912,62 +7980,62 @@ end # Foo # ^^^ # -# source://prism//lib/prism/node.rb#5848 +# source://prism//lib/prism/node.rb#5534 class Prism::ConstantReadNode < ::Prism::Node # def initialize: (Symbol name, Location location) -> void # # @return [ConstantReadNode] a new instance of ConstantReadNode # - # source://prism//lib/prism/node.rb#5850 + # source://prism//lib/prism/node.rb#5536 sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } def initialize(source, name, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#5934 + # source://prism//lib/prism/node.rb#5618 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5858 + # source://prism//lib/prism/node.rb#5544 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5863 + # source://prism//lib/prism/node.rb#5549 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5873 + # source://prism//lib/prism/node.rb#5559 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5868 + # source://prism//lib/prism/node.rb#5554 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?location: Location) -> ConstantReadNode # - # source://prism//lib/prism/node.rb#5878 + # source://prism//lib/prism/node.rb#5564 sig { params(name: Symbol, location: Prism::Location).returns(Prism::ConstantReadNode) } def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5863 + # source://prism//lib/prism/node.rb#5549 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } # - # source://prism//lib/prism/node.rb#5886 + # source://prism//lib/prism/node.rb#5572 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -7987,11 +8055,11 @@ class Prism::ConstantReadNode < ::Prism::Node 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#5584 + sig { override.returns(String) } + def inspect; end # The name of the [constant](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#constants). # @@ -7999,7 +8067,7 @@ class Prism::ConstantReadNode < ::Prism::Node # # SOME_CONSTANT # name `:SOME_CONSTANT` # - # source://prism//lib/prism/node.rb#5895 + # source://prism//lib/prism/node.rb#5581 sig { returns(Symbol) } def name; end @@ -8018,7 +8086,7 @@ class Prism::ConstantReadNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#5918 + # source://prism//lib/prism/node.rb#5602 sig { override.returns(Symbol) } def type; end @@ -8030,7 +8098,7 @@ class Prism::ConstantReadNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#5928 + # source://prism//lib/prism/node.rb#5612 def type; end end end @@ -8040,62 +8108,62 @@ end # Foo, Bar = baz # ^^^ ^^^ # -# source://prism//lib/prism/node.rb#5944 +# source://prism//lib/prism/node.rb#5628 class Prism::ConstantTargetNode < ::Prism::Node # def initialize: (Symbol name, Location location) -> void # # @return [ConstantTargetNode] a new instance of ConstantTargetNode # - # source://prism//lib/prism/node.rb#5946 + # source://prism//lib/prism/node.rb#5630 sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } def initialize(source, name, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#6026 + # source://prism//lib/prism/node.rb#5708 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5954 + # source://prism//lib/prism/node.rb#5638 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5959 + # source://prism//lib/prism/node.rb#5643 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5969 + # source://prism//lib/prism/node.rb#5653 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5964 + # source://prism//lib/prism/node.rb#5648 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?location: Location) -> ConstantTargetNode # - # source://prism//lib/prism/node.rb#5974 + # source://prism//lib/prism/node.rb#5658 sig { params(name: Symbol, location: Prism::Location).returns(Prism::ConstantTargetNode) } def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5959 + # source://prism//lib/prism/node.rb#5643 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } # - # source://prism//lib/prism/node.rb#5982 + # source://prism//lib/prism/node.rb#5666 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -8104,26 +8172,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#232 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#227 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#5674 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#5987 + # source://prism//lib/prism/node.rb#5671 sig { returns(Symbol) } def name; end @@ -8142,7 +8210,7 @@ class Prism::ConstantTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#6010 + # source://prism//lib/prism/node.rb#5692 sig { override.returns(Symbol) } def type; end @@ -8154,7 +8222,7 @@ class Prism::ConstantTargetNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#6020 + # source://prism//lib/prism/node.rb#5702 def type; end end end @@ -8164,13 +8232,13 @@ end # Foo = 1 # ^^^^^^^ # -# source://prism//lib/prism/node.rb#6036 +# source://prism//lib/prism/node.rb#5718 class Prism::ConstantWriteNode < ::Prism::Node # def initialize: (Symbol name, Location name_loc, Prism::node value, Location operator_loc, Location location) -> void # # @return [ConstantWriteNode] a new instance of ConstantWriteNode # - # source://prism//lib/prism/node.rb#6038 + # source://prism//lib/prism/node.rb#5720 sig do params( source: Prism::Source, @@ -8186,36 +8254,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#5839 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6049 + # source://prism//lib/prism/node.rb#5731 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6054 + # source://prism//lib/prism/node.rb#5736 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6064 + # source://prism//lib/prism/node.rb#5746 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6059 + # source://prism//lib/prism/node.rb#5741 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location, ?location: Location) -> ConstantWriteNode # - # source://prism//lib/prism/node.rb#6069 + # source://prism//lib/prism/node.rb#5751 sig do params( name: Symbol, @@ -8230,13 +8298,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#5736 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#6077 + # source://prism//lib/prism/node.rb#5759 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -8256,11 +8324,11 @@ class Prism::ConstantWriteNode < ::Prism::Node 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#5805 + sig { override.returns(String) } + def inspect; end # The name of the [constant](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#constants). # @@ -8268,7 +8336,7 @@ class Prism::ConstantWriteNode < ::Prism::Node # # XYZ = 1 # name `:XYZ` # - # source://prism//lib/prism/node.rb#6086 + # source://prism//lib/prism/node.rb#5768 sig { returns(Symbol) } def name; end @@ -8277,13 +8345,13 @@ class Prism::ConstantWriteNode < ::Prism::Node # FOO = 1 # ^^^ # - # source://prism//lib/prism/node.rb#6092 + # source://prism//lib/prism/node.rb#5774 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#6118 + # source://prism//lib/prism/node.rb#5800 sig { returns(String) } def operator; end @@ -8292,7 +8360,7 @@ class Prism::ConstantWriteNode < ::Prism::Node # FOO = :bar # ^ # - # source://prism//lib/prism/node.rb#6111 + # source://prism//lib/prism/node.rb#5793 sig { returns(Prism::Location) } def operator_loc; end @@ -8311,7 +8379,7 @@ class Prism::ConstantWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#6147 + # source://prism//lib/prism/node.rb#5823 sig { override.returns(Symbol) } def type; end @@ -8323,7 +8391,7 @@ class Prism::ConstantWriteNode < ::Prism::Node # MyClass = Class.new # ^^^^^^^^^ # - # source://prism//lib/prism/node.rb#6105 + # source://prism//lib/prism/node.rb#5787 sig { returns(Prism::Node) } def value; end @@ -8335,7 +8403,7 @@ class Prism::ConstantWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#6157 + # source://prism//lib/prism/node.rb#5833 def type; end end end @@ -8343,7 +8411,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 +8429,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), @@ -8560,7 +8628,7 @@ 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 # @@ -8575,7 +8643,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 # @@ -9035,7 +9103,7 @@ module Prism::DSL # 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 + def ReturnNode(flags, keyword_loc, arguments, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new SelfNode node # @@ -9281,13 +9349,13 @@ end # end # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#6177 +# source://prism//lib/prism/node.rb#5853 class Prism::DefNode < ::Prism::Node # def initialize: (Symbol name, Location name_loc, Prism::node? receiver, ParametersNode? parameters, Prism::node? body, Array[Symbol] locals, Location def_keyword_loc, Location? operator_loc, Location? lparen_loc, Location? rparen_loc, Location? equal_loc, Location? end_keyword_loc, Location location) -> void # # @return [DefNode] a new instance of DefNode # - # source://prism//lib/prism/node.rb#6179 + # source://prism//lib/prism/node.rb#5855 sig do params( source: Prism::Source, @@ -9311,42 +9379,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#6069 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6198 + # source://prism//lib/prism/node.rb#5874 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: Prism::node? # - # source://prism//lib/prism/node.rb#6251 + # source://prism//lib/prism/node.rb#5927 sig { returns(T.nilable(Prism::Node)) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6203 + # source://prism//lib/prism/node.rb#5879 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6217 + # source://prism//lib/prism/node.rb#5893 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6208 + # source://prism//lib/prism/node.rb#5884 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?name_loc: Location, ?receiver: Prism::node?, ?parameters: ParametersNode?, ?body: Prism::node?, ?locals: Array[Symbol], ?def_keyword_loc: Location, ?operator_loc: Location?, ?lparen_loc: Location?, ?rparen_loc: Location?, ?equal_loc: Location?, ?end_keyword_loc: Location?, ?location: Location) -> DefNode # - # source://prism//lib/prism/node.rb#6222 + # source://prism//lib/prism/node.rb#5898 sig do params( name: Symbol, @@ -9369,124 +9437,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#5879 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, receiver: Prism::node?, parameters: ParametersNode?, body: Prism::node?, locals: Array[Symbol], def_keyword_loc: Location, operator_loc: Location?, lparen_loc: Location?, rparen_loc: Location?, equal_loc: Location?, end_keyword_loc: Location?, location: Location } # - # source://prism//lib/prism/node.rb#6230 + # source://prism//lib/prism/node.rb#5906 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def def_keyword: () -> String # - # source://prism//lib/prism/node.rb#6329 + # source://prism//lib/prism/node.rb#6005 sig { returns(String) } def def_keyword; end # attr_reader def_keyword_loc: Location # - # source://prism//lib/prism/node.rb#6257 + # source://prism//lib/prism/node.rb#5933 sig { returns(Prism::Location) } def def_keyword_loc; end # def end_keyword: () -> String? # - # source://prism//lib/prism/node.rb#6354 + # source://prism//lib/prism/node.rb#6030 sig { returns(T.nilable(String)) } def end_keyword; end # attr_reader end_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#6316 + # source://prism//lib/prism/node.rb#5992 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end # def equal: () -> String? # - # source://prism//lib/prism/node.rb#6349 + # source://prism//lib/prism/node.rb#6025 sig { returns(T.nilable(String)) } def equal; end # attr_reader equal_loc: Location? # - # source://prism//lib/prism/node.rb#6303 + # source://prism//lib/prism/node.rb#5979 sig { returns(T.nilable(Prism::Location)) } def equal_loc; end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#6035 + 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#5930 sig { returns(T::Array[Symbol]) } def locals; end # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#6339 + # source://prism//lib/prism/node.rb#6015 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#6277 + # source://prism//lib/prism/node.rb#5953 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#6235 + # source://prism//lib/prism/node.rb#5911 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#6238 + # source://prism//lib/prism/node.rb#5914 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String? # - # source://prism//lib/prism/node.rb#6334 + # source://prism//lib/prism/node.rb#6010 sig { returns(T.nilable(String)) } def operator; end # attr_reader operator_loc: Location? # - # source://prism//lib/prism/node.rb#6264 + # source://prism//lib/prism/node.rb#5940 sig { returns(T.nilable(Prism::Location)) } def operator_loc; end # attr_reader parameters: ParametersNode? # - # source://prism//lib/prism/node.rb#6248 + # source://prism//lib/prism/node.rb#5924 sig { returns(T.nilable(Prism::ParametersNode)) } def parameters; end # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#6245 + # source://prism//lib/prism/node.rb#5921 sig { returns(T.nilable(Prism::Node)) } def receiver; end # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#6344 + # source://prism//lib/prism/node.rb#6020 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#6290 + # source://prism//lib/prism/node.rb#5966 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end @@ -9505,7 +9573,7 @@ class Prism::DefNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#6405 + # source://prism//lib/prism/node.rb#6053 sig { override.returns(Symbol) } def type; end @@ -9517,7 +9585,7 @@ class Prism::DefNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#6415 + # source://prism//lib/prism/node.rb#6063 def type; end end end @@ -9527,13 +9595,13 @@ end # defined?(a) # ^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#6443 +# source://prism//lib/prism/node.rb#6091 class Prism::DefinedNode < ::Prism::Node # def initialize: (Location? lparen_loc, Prism::node value, Location? rparen_loc, Location keyword_loc, Location location) -> void # # @return [DefinedNode] a new instance of DefinedNode # - # source://prism//lib/prism/node.rb#6445 + # source://prism//lib/prism/node.rb#6093 sig do params( source: Prism::Source, @@ -9549,36 +9617,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#6222 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6456 + # source://prism//lib/prism/node.rb#6104 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6461 + # source://prism//lib/prism/node.rb#6109 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6471 + # source://prism//lib/prism/node.rb#6119 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6466 + # source://prism//lib/prism/node.rb#6114 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?lparen_loc: Location?, ?value: Prism::node, ?rparen_loc: Location?, ?keyword_loc: Location, ?location: Location) -> DefinedNode # - # source://prism//lib/prism/node.rb#6476 + # source://prism//lib/prism/node.rb#6124 sig do params( lparen_loc: T.nilable(Prism::Location), @@ -9593,58 +9661,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#6109 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { lparen_loc: Location?, value: Prism::node, rparen_loc: Location?, keyword_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#6484 + # source://prism//lib/prism/node.rb#6132 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#6188 + sig { override.returns(String) } + def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#6535 + # source://prism//lib/prism/node.rb#6183 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#6518 + # source://prism//lib/prism/node.rb#6166 sig { returns(Prism::Location) } def keyword_loc; end # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#6525 + # source://prism//lib/prism/node.rb#6173 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#6489 + # source://prism//lib/prism/node.rb#6137 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#6530 + # source://prism//lib/prism/node.rb#6178 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#6505 + # source://prism//lib/prism/node.rb#6153 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end @@ -9663,13 +9731,13 @@ class Prism::DefinedNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#6564 + # source://prism//lib/prism/node.rb#6206 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#6502 + # source://prism//lib/prism/node.rb#6150 sig { returns(Prism::Node) } def value; end @@ -9681,7 +9749,7 @@ class Prism::DefinedNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#6574 + # source://prism//lib/prism/node.rb#6216 def type; end end end @@ -9729,8 +9797,6 @@ end # # source://prism//lib/prism/desugar_compiler.rb#218 class Prism::DesugarCompiler < ::Prism::MutationCompiler - Result = type_member { { fixed: Prism::Node } } - # @@foo &&= bar # # becomes @@ -11908,567 +11974,567 @@ 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 ItParametersNode node. # - # source://prism//lib/prism/dot_visitor.rb#2780 + # source://prism//lib/prism/dot_visitor.rb#2784 def visit_it_parameters_node(node); end # Visit a KeywordHashNode node. # - # source://prism//lib/prism/dot_visitor.rb#2794 + # source://prism//lib/prism/dot_visitor.rb#2798 def visit_keyword_hash_node(node); end # Visit a KeywordRestParameterNode node. # - # source://prism//lib/prism/dot_visitor.rb#2824 + # source://prism//lib/prism/dot_visitor.rb#2828 def visit_keyword_rest_parameter_node(node); end # Visit a LambdaNode node. # - # source://prism//lib/prism/dot_visitor.rb#2852 + # source://prism//lib/prism/dot_visitor.rb#2856 def visit_lambda_node(node); end # Visit a LocalVariableAndWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#2890 + # source://prism//lib/prism/dot_visitor.rb#2894 def visit_local_variable_and_write_node(node); end # Visit a LocalVariableOperatorWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#2920 + # source://prism//lib/prism/dot_visitor.rb#2924 def visit_local_variable_operator_write_node(node); end # Visit a LocalVariableOrWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#2953 + # source://prism//lib/prism/dot_visitor.rb#2957 def visit_local_variable_or_write_node(node); end # Visit a LocalVariableReadNode node. # - # source://prism//lib/prism/dot_visitor.rb#2983 + # source://prism//lib/prism/dot_visitor.rb#2987 def visit_local_variable_read_node(node); end # Visit a LocalVariableTargetNode node. # - # source://prism//lib/prism/dot_visitor.rb#3003 + # source://prism//lib/prism/dot_visitor.rb#3007 def visit_local_variable_target_node(node); end # Visit a LocalVariableWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#3023 + # source://prism//lib/prism/dot_visitor.rb#3027 def visit_local_variable_write_node(node); end # Visit a MatchLastLineNode node. # - # source://prism//lib/prism/dot_visitor.rb#3053 + # source://prism//lib/prism/dot_visitor.rb#3057 def visit_match_last_line_node(node); end # Visit a MatchPredicateNode node. # - # source://prism//lib/prism/dot_visitor.rb#3082 + # source://prism//lib/prism/dot_visitor.rb#3086 def visit_match_predicate_node(node); end # Visit a MatchRequiredNode node. # - # source://prism//lib/prism/dot_visitor.rb#3107 + # source://prism//lib/prism/dot_visitor.rb#3111 def visit_match_required_node(node); end # Visit a MatchWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#3132 + # source://prism//lib/prism/dot_visitor.rb#3136 def visit_match_write_node(node); end # Visit a MissingNode node. # - # source://prism//lib/prism/dot_visitor.rb#3163 + # source://prism//lib/prism/dot_visitor.rb#3167 def visit_missing_node(node); end # Visit a ModuleNode node. # - # source://prism//lib/prism/dot_visitor.rb#3177 + # source://prism//lib/prism/dot_visitor.rb#3181 def visit_module_node(node); end # Visit a MultiTargetNode node. # - # source://prism//lib/prism/dot_visitor.rb#3213 + # source://prism//lib/prism/dot_visitor.rb#3217 def visit_multi_target_node(node); end # Visit a MultiWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#3269 + # source://prism//lib/prism/dot_visitor.rb#3273 def visit_multi_write_node(node); end # Visit a NextNode node. # - # source://prism//lib/prism/dot_visitor.rb#3332 + # source://prism//lib/prism/dot_visitor.rb#3336 def visit_next_node(node); end # Visit a NilNode node. # - # source://prism//lib/prism/dot_visitor.rb#3355 + # source://prism//lib/prism/dot_visitor.rb#3359 def visit_nil_node(node); end # Visit a NoKeywordsParameterNode node. # - # source://prism//lib/prism/dot_visitor.rb#3369 + # source://prism//lib/prism/dot_visitor.rb#3373 def visit_no_keywords_parameter_node(node); end # Visit a NumberedParametersNode node. # - # source://prism//lib/prism/dot_visitor.rb#3389 + # source://prism//lib/prism/dot_visitor.rb#3393 def visit_numbered_parameters_node(node); end # Visit a NumberedReferenceReadNode node. # - # source://prism//lib/prism/dot_visitor.rb#3406 + # source://prism//lib/prism/dot_visitor.rb#3410 def visit_numbered_reference_read_node(node); end # Visit a OptionalKeywordParameterNode node. # - # source://prism//lib/prism/dot_visitor.rb#3423 + # source://prism//lib/prism/dot_visitor.rb#3427 def visit_optional_keyword_parameter_node(node); end # Visit a OptionalParameterNode node. # - # source://prism//lib/prism/dot_visitor.rb#3450 + # source://prism//lib/prism/dot_visitor.rb#3454 def visit_optional_parameter_node(node); end # Visit a OrNode node. # - # source://prism//lib/prism/dot_visitor.rb#3480 + # source://prism//lib/prism/dot_visitor.rb#3484 def visit_or_node(node); end # Visit a ParametersNode node. # - # source://prism//lib/prism/dot_visitor.rb#3505 + # source://prism//lib/prism/dot_visitor.rb#3509 def visit_parameters_node(node); end # Visit a ParenthesesNode node. # - # source://prism//lib/prism/dot_visitor.rb#3589 + # source://prism//lib/prism/dot_visitor.rb#3593 def visit_parentheses_node(node); end # Visit a PinnedExpressionNode node. # - # source://prism//lib/prism/dot_visitor.rb#3615 + # source://prism//lib/prism/dot_visitor.rb#3619 def visit_pinned_expression_node(node); end # Visit a PinnedVariableNode node. # - # source://prism//lib/prism/dot_visitor.rb#3642 + # source://prism//lib/prism/dot_visitor.rb#3646 def visit_pinned_variable_node(node); end # Visit a PostExecutionNode node. # - # source://prism//lib/prism/dot_visitor.rb#3663 + # source://prism//lib/prism/dot_visitor.rb#3667 def visit_post_execution_node(node); end # Visit a PreExecutionNode node. # - # source://prism//lib/prism/dot_visitor.rb#3692 + # source://prism//lib/prism/dot_visitor.rb#3696 def visit_pre_execution_node(node); end # Visit a ProgramNode node. # - # source://prism//lib/prism/dot_visitor.rb#3721 + # source://prism//lib/prism/dot_visitor.rb#3725 def visit_program_node(node); end # Visit a RangeNode node. # - # source://prism//lib/prism/dot_visitor.rb#3742 + # source://prism//lib/prism/dot_visitor.rb#3746 def visit_range_node(node); end # Visit a RationalNode node. # - # source://prism//lib/prism/dot_visitor.rb#3774 + # source://prism//lib/prism/dot_visitor.rb#3778 def visit_rational_node(node); end # Visit a RedoNode node. # - # source://prism//lib/prism/dot_visitor.rb#3792 + # source://prism//lib/prism/dot_visitor.rb#3796 def visit_redo_node(node); end # Visit a RegularExpressionNode node. # - # source://prism//lib/prism/dot_visitor.rb#3806 + # source://prism//lib/prism/dot_visitor.rb#3810 def visit_regular_expression_node(node); end # Visit a RequiredKeywordParameterNode node. # - # source://prism//lib/prism/dot_visitor.rb#3835 + # source://prism//lib/prism/dot_visitor.rb#3839 def visit_required_keyword_parameter_node(node); end # Visit a RequiredParameterNode node. # - # source://prism//lib/prism/dot_visitor.rb#3858 + # source://prism//lib/prism/dot_visitor.rb#3862 def visit_required_parameter_node(node); end # Visit a RescueModifierNode node. # - # source://prism//lib/prism/dot_visitor.rb#3878 + # source://prism//lib/prism/dot_visitor.rb#3882 def visit_rescue_modifier_node(node); end # Visit a RescueNode node. # - # source://prism//lib/prism/dot_visitor.rb#3903 + # source://prism//lib/prism/dot_visitor.rb#3907 def visit_rescue_node(node); end # Visit a RestParameterNode node. # - # source://prism//lib/prism/dot_visitor.rb#3956 + # source://prism//lib/prism/dot_visitor.rb#3960 def visit_rest_parameter_node(node); end # Visit a RetryNode node. # - # source://prism//lib/prism/dot_visitor.rb#3984 + # source://prism//lib/prism/dot_visitor.rb#3988 def visit_retry_node(node); end # Visit a ReturnNode node. # - # source://prism//lib/prism/dot_visitor.rb#3998 + # source://prism//lib/prism/dot_visitor.rb#4002 def visit_return_node(node); end # Visit a SelfNode node. # - # source://prism//lib/prism/dot_visitor.rb#4021 + # source://prism//lib/prism/dot_visitor.rb#4028 def visit_self_node(node); end # Visit a ShareableConstantNode node. # - # source://prism//lib/prism/dot_visitor.rb#4035 + # source://prism//lib/prism/dot_visitor.rb#4042 def visit_shareable_constant_node(node); end # Visit a SingletonClassNode node. # - # source://prism//lib/prism/dot_visitor.rb#4056 + # source://prism//lib/prism/dot_visitor.rb#4063 def visit_singleton_class_node(node); end # Visit a SourceEncodingNode node. # - # source://prism//lib/prism/dot_visitor.rb#4092 + # source://prism//lib/prism/dot_visitor.rb#4099 def visit_source_encoding_node(node); end # Visit a SourceFileNode node. # - # source://prism//lib/prism/dot_visitor.rb#4106 + # source://prism//lib/prism/dot_visitor.rb#4113 def visit_source_file_node(node); end # Visit a SourceLineNode node. # - # source://prism//lib/prism/dot_visitor.rb#4126 + # source://prism//lib/prism/dot_visitor.rb#4133 def visit_source_line_node(node); end # Visit a SplatNode node. # - # source://prism//lib/prism/dot_visitor.rb#4140 + # source://prism//lib/prism/dot_visitor.rb#4147 def visit_splat_node(node); end # Visit a StatementsNode node. # - # source://prism//lib/prism/dot_visitor.rb#4163 + # source://prism//lib/prism/dot_visitor.rb#4170 def visit_statements_node(node); end # Visit a StringNode node. # - # source://prism//lib/prism/dot_visitor.rb#4190 + # source://prism//lib/prism/dot_visitor.rb#4197 def visit_string_node(node); end # Visit a SuperNode node. # - # source://prism//lib/prism/dot_visitor.rb#4223 + # source://prism//lib/prism/dot_visitor.rb#4230 def visit_super_node(node); end # Visit a SymbolNode node. # - # source://prism//lib/prism/dot_visitor.rb#4262 + # source://prism//lib/prism/dot_visitor.rb#4269 def visit_symbol_node(node); end # Visit a TrueNode node. # - # source://prism//lib/prism/dot_visitor.rb#4297 + # source://prism//lib/prism/dot_visitor.rb#4304 def visit_true_node(node); end # Visit a UndefNode node. # - # source://prism//lib/prism/dot_visitor.rb#4311 + # source://prism//lib/prism/dot_visitor.rb#4318 def visit_undef_node(node); end # Visit a UnlessNode node. # - # source://prism//lib/prism/dot_visitor.rb#4341 + # source://prism//lib/prism/dot_visitor.rb#4348 def visit_unless_node(node); end # Visit a UntilNode node. # - # source://prism//lib/prism/dot_visitor.rb#4384 + # source://prism//lib/prism/dot_visitor.rb#4391 def visit_until_node(node); end # Visit a WhenNode node. # - # source://prism//lib/prism/dot_visitor.rb#4419 + # source://prism//lib/prism/dot_visitor.rb#4426 def visit_when_node(node); end # Visit a WhileNode node. # - # source://prism//lib/prism/dot_visitor.rb#4460 + # source://prism//lib/prism/dot_visitor.rb#4467 def visit_while_node(node); end # Visit a XStringNode node. # - # source://prism//lib/prism/dot_visitor.rb#4495 + # source://prism//lib/prism/dot_visitor.rb#4502 def visit_x_string_node(node); end # Visit a YieldNode node. # - # source://prism//lib/prism/dot_visitor.rb#4524 + # source://prism//lib/prism/dot_visitor.rb#4531 def visit_yield_node(node); end private @@ -12476,95 +12542,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#4577 def arguments_node_flags_inspect(node); end # Inspect a node that has array_node_flags flags to display the flags as a # comma-separated list. # - # source://prism//lib/prism/dot_visitor.rb#4578 + # source://prism//lib/prism/dot_visitor.rb#4586 def array_node_flags_inspect(node); end # Inspect a node that has call_node_flags flags to display the flags as a # comma-separated list. # - # source://prism//lib/prism/dot_visitor.rb#4586 + # source://prism//lib/prism/dot_visitor.rb#4594 def call_node_flags_inspect(node); end # Inspect a node that has encoding_flags flags to display the flags as a # comma-separated list. # - # source://prism//lib/prism/dot_visitor.rb#4597 + # source://prism//lib/prism/dot_visitor.rb#4605 def encoding_flags_inspect(node); end # Inspect a node that has integer_base_flags flags to display the flags as a # comma-separated list. # - # source://prism//lib/prism/dot_visitor.rb#4606 + # source://prism//lib/prism/dot_visitor.rb#4614 def integer_base_flags_inspect(node); end # Inspect a node that has interpolated_string_node_flags flags to display the flags as a # comma-separated list. # - # source://prism//lib/prism/dot_visitor.rb#4617 + # source://prism//lib/prism/dot_visitor.rb#4625 def interpolated_string_node_flags_inspect(node); end # Inspect a node that has keyword_hash_node_flags flags to display the flags as a # comma-separated list. # - # source://prism//lib/prism/dot_visitor.rb#4626 + # source://prism//lib/prism/dot_visitor.rb#4634 def keyword_hash_node_flags_inspect(node); end # Inspect a location to display the start and end line and column numbers. # - # source://prism//lib/prism/dot_visitor.rb#4564 + # source://prism//lib/prism/dot_visitor.rb#4571 def location_inspect(location); end # Inspect a node that has loop_flags flags to display the flags as a # comma-separated list. # - # source://prism//lib/prism/dot_visitor.rb#4634 + # source://prism//lib/prism/dot_visitor.rb#4642 def loop_flags_inspect(node); end # Generate a unique node ID for a node throughout the digraph. # - # source://prism//lib/prism/dot_visitor.rb#4559 + # source://prism//lib/prism/dot_visitor.rb#4566 def node_id(node); end # Inspect a node that has parameter_flags flags to display the flags as a # comma-separated list. # - # source://prism//lib/prism/dot_visitor.rb#4642 + # source://prism//lib/prism/dot_visitor.rb#4650 def parameter_flags_inspect(node); end # Inspect a node that has range_flags flags to display the flags as a # comma-separated list. # - # source://prism//lib/prism/dot_visitor.rb#4650 + # source://prism//lib/prism/dot_visitor.rb#4658 def range_flags_inspect(node); end # Inspect a node that has regular_expression_flags flags to display the flags as a # comma-separated list. # - # source://prism//lib/prism/dot_visitor.rb#4658 + # source://prism//lib/prism/dot_visitor.rb#4666 def regular_expression_flags_inspect(node); end + # Inspect a node that has return_node_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4684 + def return_node_flags_inspect(node); end + # Inspect a node that has shareable_constant_node_flags flags to display the flags as a # comma-separated list. # - # source://prism//lib/prism/dot_visitor.rb#4676 + # source://prism//lib/prism/dot_visitor.rb#4692 def shareable_constant_node_flags_inspect(node); end # Inspect a node that has string_flags flags to display the flags as a # comma-separated list. # - # source://prism//lib/prism/dot_visitor.rb#4686 + # source://prism//lib/prism/dot_visitor.rb#4702 def string_flags_inspect(node); end # Inspect a node that has symbol_flags flags to display the flags as a # comma-separated list. # - # source://prism//lib/prism/dot_visitor.rb#4697 + # source://prism//lib/prism/dot_visitor.rb#4713 def symbol_flags_inspect(node); end end @@ -12658,13 +12730,13 @@ end # if a then b else c end # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#6593 +# source://prism//lib/prism/node.rb#6235 class Prism::ElseNode < ::Prism::Node # def initialize: (Location else_keyword_loc, StatementsNode? statements, Location? end_keyword_loc, Location location) -> void # # @return [ElseNode] a new instance of ElseNode # - # source://prism//lib/prism/node.rb#6595 + # source://prism//lib/prism/node.rb#6237 sig do params( source: Prism::Source, @@ -12679,36 +12751,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#6349 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6605 + # source://prism//lib/prism/node.rb#6247 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6610 + # source://prism//lib/prism/node.rb#6252 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6622 + # source://prism//lib/prism/node.rb#6264 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6615 + # source://prism//lib/prism/node.rb#6257 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?else_keyword_loc: Location, ?statements: StatementsNode?, ?end_keyword_loc: Location?, ?location: Location) -> ElseNode # - # source://prism//lib/prism/node.rb#6627 + # source://prism//lib/prism/node.rb#6269 sig do params( else_keyword_loc: Prism::Location, @@ -12722,52 +12794,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#6252 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { else_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location?, location: Location } # - # source://prism//lib/prism/node.rb#6635 + # source://prism//lib/prism/node.rb#6277 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def else_keyword: () -> String # - # source://prism//lib/prism/node.rb#6663 + # source://prism//lib/prism/node.rb#6305 sig { returns(String) } def else_keyword; end # attr_reader else_keyword_loc: Location # - # source://prism//lib/prism/node.rb#6640 + # source://prism//lib/prism/node.rb#6282 sig { returns(Prism::Location) } def else_keyword_loc; end # def end_keyword: () -> String? # - # source://prism//lib/prism/node.rb#6668 + # source://prism//lib/prism/node.rb#6310 sig { returns(T.nilable(String)) } def end_keyword; end # attr_reader end_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#6650 + # source://prism//lib/prism/node.rb#6292 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#6315 + sig { override.returns(String) } + def inspect; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#6647 + # source://prism//lib/prism/node.rb#6289 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -12786,7 +12858,7 @@ class Prism::ElseNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#6700 + # source://prism//lib/prism/node.rb#6333 sig { override.returns(Symbol) } def type; end @@ -12798,7 +12870,7 @@ class Prism::ElseNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#6710 + # source://prism//lib/prism/node.rb#6343 def type; end end end @@ -12806,11 +12878,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 +12890,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 +12900,13 @@ end # "foo #{bar}" # ^^^^^^ # -# source://prism//lib/prism/node.rb#6728 +# source://prism//lib/prism/node.rb#6361 class Prism::EmbeddedStatementsNode < ::Prism::Node # def initialize: (Location opening_loc, StatementsNode? statements, Location closing_loc, Location location) -> void # # @return [EmbeddedStatementsNode] a new instance of EmbeddedStatementsNode # - # source://prism//lib/prism/node.rb#6730 + # source://prism//lib/prism/node.rb#6363 sig do params( source: Prism::Source, @@ -12849,48 +12921,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#6469 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6740 + # source://prism//lib/prism/node.rb#6373 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6745 + # source://prism//lib/prism/node.rb#6378 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#6797 + # source://prism//lib/prism/node.rb#6430 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#6785 + # source://prism//lib/prism/node.rb#6418 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6757 + # source://prism//lib/prism/node.rb#6390 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6750 + # source://prism//lib/prism/node.rb#6383 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?opening_loc: Location, ?statements: StatementsNode?, ?closing_loc: Location, ?location: Location) -> EmbeddedStatementsNode # - # source://prism//lib/prism/node.rb#6762 + # source://prism//lib/prism/node.rb#6395 sig do params( opening_loc: Prism::Location, @@ -12904,40 +12976,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#6378 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location, statements: StatementsNode?, closing_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#6770 + # source://prism//lib/prism/node.rb#6403 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#6435 + sig { override.returns(String) } + def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#6792 + # source://prism//lib/prism/node.rb#6425 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#6775 + # source://prism//lib/prism/node.rb#6408 sig { returns(Prism::Location) } def opening_loc; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#6782 + # source://prism//lib/prism/node.rb#6415 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -12956,7 +13028,7 @@ class Prism::EmbeddedStatementsNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#6829 + # source://prism//lib/prism/node.rb#6453 sig { override.returns(Symbol) } def type; end @@ -12968,7 +13040,7 @@ class Prism::EmbeddedStatementsNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#6839 + # source://prism//lib/prism/node.rb#6463 def type; end end end @@ -12978,13 +13050,13 @@ end # "foo #@bar" # ^^^^^ # -# source://prism//lib/prism/node.rb#6857 +# source://prism//lib/prism/node.rb#6481 class Prism::EmbeddedVariableNode < ::Prism::Node # def initialize: (Location operator_loc, Prism::node variable, Location location) -> void # # @return [EmbeddedVariableNode] a new instance of EmbeddedVariableNode # - # source://prism//lib/prism/node.rb#6859 + # source://prism//lib/prism/node.rb#6483 sig do params( source: Prism::Source, @@ -12998,36 +13070,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#6574 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6868 + # source://prism//lib/prism/node.rb#6492 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6873 + # source://prism//lib/prism/node.rb#6497 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6883 + # source://prism//lib/prism/node.rb#6507 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6878 + # source://prism//lib/prism/node.rb#6502 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?operator_loc: Location, ?variable: Prism::node, ?location: Location) -> EmbeddedVariableNode # - # source://prism//lib/prism/node.rb#6888 + # source://prism//lib/prism/node.rb#6512 sig do params( operator_loc: Prism::Location, @@ -13040,34 +13112,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#6497 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { operator_loc: Location, variable: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#6896 + # source://prism//lib/prism/node.rb#6520 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#6540 + sig { override.returns(String) } + def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#6911 + # source://prism//lib/prism/node.rb#6535 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#6901 + # source://prism//lib/prism/node.rb#6525 sig { returns(Prism::Location) } def operator_loc; end @@ -13086,13 +13158,13 @@ class Prism::EmbeddedVariableNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#6938 + # source://prism//lib/prism/node.rb#6558 sig { override.returns(Symbol) } def type; end # attr_reader variable: Prism::node # - # source://prism//lib/prism/node.rb#6908 + # source://prism//lib/prism/node.rb#6532 sig { returns(Prism::Node) } def variable; end @@ -13104,24 +13176,24 @@ class Prism::EmbeddedVariableNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#6948 + # source://prism//lib/prism/node.rb#6568 def type; end end end # Flags for nodes that have unescaped content. # -# source://prism//lib/prism/node.rb#20364 +# source://prism//lib/prism/node.rb#19232 module Prism::EncodingFlags; end # internal bytes forced the encoding to binary # -# source://prism//lib/prism/node.rb#20369 +# source://prism//lib/prism/node.rb#19237 Prism::EncodingFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer) # internal bytes forced the encoding to UTF-8 # -# source://prism//lib/prism/node.rb#20366 +# source://prism//lib/prism/node.rb#19234 Prism::EncodingFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # Represents an `ensure` clause in a `begin` statement. @@ -13133,13 +13205,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#6589 class Prism::EnsureNode < ::Prism::Node # def initialize: (Location ensure_keyword_loc, StatementsNode? statements, Location end_keyword_loc, Location location) -> void # # @return [EnsureNode] a new instance of EnsureNode # - # source://prism//lib/prism/node.rb#6971 + # source://prism//lib/prism/node.rb#6591 sig do params( source: Prism::Source, @@ -13154,36 +13226,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#6697 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6981 + # source://prism//lib/prism/node.rb#6601 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6986 + # source://prism//lib/prism/node.rb#6606 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6998 + # source://prism//lib/prism/node.rb#6618 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6991 + # source://prism//lib/prism/node.rb#6611 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?ensure_keyword_loc: Location, ?statements: StatementsNode?, ?end_keyword_loc: Location, ?location: Location) -> EnsureNode # - # source://prism//lib/prism/node.rb#7003 + # source://prism//lib/prism/node.rb#6623 sig do params( ensure_keyword_loc: Prism::Location, @@ -13197,52 +13269,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#6606 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { ensure_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#7011 + # source://prism//lib/prism/node.rb#6631 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def end_keyword: () -> String # - # source://prism//lib/prism/node.rb#7038 + # source://prism//lib/prism/node.rb#6658 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#7026 + # source://prism//lib/prism/node.rb#6646 sig { returns(Prism::Location) } def end_keyword_loc; end # def ensure_keyword: () -> String # - # source://prism//lib/prism/node.rb#7033 + # source://prism//lib/prism/node.rb#6653 sig { returns(String) } def ensure_keyword; end # attr_reader ensure_keyword_loc: Location # - # source://prism//lib/prism/node.rb#7016 + # source://prism//lib/prism/node.rb#6636 sig { returns(Prism::Location) } def ensure_keyword_loc; end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#6663 + sig { override.returns(String) } + def inspect; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#7023 + # source://prism//lib/prism/node.rb#6643 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -13261,7 +13333,7 @@ class Prism::EnsureNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#7070 + # source://prism//lib/prism/node.rb#6681 sig { override.returns(Symbol) } def type; end @@ -13273,7 +13345,7 @@ class Prism::EnsureNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#7080 + # source://prism//lib/prism/node.rb#6691 def type; end end end @@ -13283,73 +13355,73 @@ end # false # ^^^^^ # -# source://prism//lib/prism/node.rb#7098 +# source://prism//lib/prism/node.rb#6709 class Prism::FalseNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [FalseNode] a new instance of FalseNode # - # source://prism//lib/prism/node.rb#7100 + # source://prism//lib/prism/node.rb#6711 sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#7175 + # source://prism//lib/prism/node.rb#6785 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7107 + # source://prism//lib/prism/node.rb#6718 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7112 + # source://prism//lib/prism/node.rb#6723 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7122 + # source://prism//lib/prism/node.rb#6733 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7117 + # source://prism//lib/prism/node.rb#6728 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?location: Location) -> FalseNode # - # source://prism//lib/prism/node.rb#7127 + # source://prism//lib/prism/node.rb#6738 sig { params(location: Prism::Location).returns(Prism::FalseNode) } def copy(location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7112 + # source://prism//lib/prism/node.rb#6723 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } # - # source://prism//lib/prism/node.rb#7135 + # source://prism//lib/prism/node.rb#6746 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#6751 + sig { override.returns(String) } + def inspect; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by @@ -13366,7 +13438,7 @@ class Prism::FalseNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#7159 + # source://prism//lib/prism/node.rb#6769 sig { override.returns(Symbol) } def type; end @@ -13378,7 +13450,7 @@ class Prism::FalseNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#7169 + # source://prism//lib/prism/node.rb#6779 def type; end end end @@ -13394,13 +13466,13 @@ end # foo in Foo(*bar, baz, *qux) # ^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#7190 +# source://prism//lib/prism/node.rb#6800 class Prism::FindPatternNode < ::Prism::Node # def initialize: (Prism::node? constant, Prism::node left, Array[Prism::node] requireds, Prism::node right, Location? opening_loc, Location? closing_loc, Location location) -> void # # @return [FindPatternNode] a new instance of FindPatternNode # - # source://prism//lib/prism/node.rb#7192 + # source://prism//lib/prism/node.rb#6802 sig do params( source: Prism::Source, @@ -13418,54 +13490,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#6935 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7205 + # source://prism//lib/prism/node.rb#6815 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7210 + # source://prism//lib/prism/node.rb#6820 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#7286 + # source://prism//lib/prism/node.rb#6896 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#7268 + # source://prism//lib/prism/node.rb#6878 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7225 + # source://prism//lib/prism/node.rb#6835 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7215 + # source://prism//lib/prism/node.rb#6825 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader constant: Prism::node? # - # source://prism//lib/prism/node.rb#7243 + # source://prism//lib/prism/node.rb#6853 sig { returns(T.nilable(Prism::Node)) } def constant; end # def copy: (?constant: Prism::node?, ?left: Prism::node, ?requireds: Array[Prism::node], ?right: Prism::node, ?opening_loc: Location?, ?closing_loc: Location?, ?location: Location) -> FindPatternNode # - # source://prism//lib/prism/node.rb#7230 + # source://prism//lib/prism/node.rb#6840 sig do params( constant: T.nilable(Prism::Node), @@ -13482,52 +13554,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#6820 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { constant: Prism::node?, left: Prism::node, requireds: Array[Prism::node], right: Prism::node, opening_loc: Location?, closing_loc: Location?, location: Location } # - # source://prism//lib/prism/node.rb#7238 + # source://prism//lib/prism/node.rb#6848 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#6901 + 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#6856 sig { returns(Prism::Node) } def left; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#7281 + # source://prism//lib/prism/node.rb#6891 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#7255 + # source://prism//lib/prism/node.rb#6865 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader requireds: Array[Prism::node] # - # source://prism//lib/prism/node.rb#7249 + # source://prism//lib/prism/node.rb#6859 sig { returns(T::Array[Prism::Node]) } def requireds; end # attr_reader right: Prism::node # - # source://prism//lib/prism/node.rb#7252 + # source://prism//lib/prism/node.rb#6862 sig { returns(Prism::Node) } def right; end @@ -13546,7 +13618,7 @@ class Prism::FindPatternNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#7323 + # source://prism//lib/prism/node.rb#6919 sig { override.returns(Symbol) } def type; end @@ -13558,7 +13630,7 @@ class Prism::FindPatternNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#7333 + # source://prism//lib/prism/node.rb#6929 def type; end end end @@ -13568,13 +13640,13 @@ end # baz if foo .. bar # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#7355 +# source://prism//lib/prism/node.rb#6951 class Prism::FlipFlopNode < ::Prism::Node # def initialize: (Integer flags, Prism::node? left, Prism::node? right, Location operator_loc, Location location) -> void # # @return [FlipFlopNode] a new instance of FlipFlopNode # - # source://prism//lib/prism/node.rb#7357 + # source://prism//lib/prism/node.rb#6953 sig do params( source: Prism::Source, @@ -13590,36 +13662,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#7061 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7368 + # source://prism//lib/prism/node.rb#6964 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7373 + # source://prism//lib/prism/node.rb#6969 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7386 + # source://prism//lib/prism/node.rb#6982 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7378 + # source://prism//lib/prism/node.rb#6974 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?left: Prism::node?, ?right: Prism::node?, ?operator_loc: Location, ?location: Location) -> FlipFlopNode # - # source://prism//lib/prism/node.rb#7391 + # source://prism//lib/prism/node.rb#6987 sig do params( flags: Integer, @@ -13634,13 +13706,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#6969 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, left: Prism::node?, right: Prism::node?, operator_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#7399 + # source://prism//lib/prism/node.rb#6995 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -13648,40 +13720,40 @@ class Prism::FlipFlopNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#7421 + # source://prism//lib/prism/node.rb#7017 sig { returns(T::Boolean) } def exclude_end?; end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#7027 + 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#7004 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#7022 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#7414 + # source://prism//lib/prism/node.rb#7010 sig { returns(Prism::Location) } def operator_loc; end # attr_reader right: Prism::node? # - # source://prism//lib/prism/node.rb#7411 + # source://prism//lib/prism/node.rb#7007 sig { returns(T.nilable(Prism::Node)) } def right; end @@ -13700,7 +13772,7 @@ class Prism::FlipFlopNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#7465 + # source://prism//lib/prism/node.rb#7045 sig { override.returns(Symbol) } def type; end @@ -13708,7 +13780,7 @@ class Prism::FlipFlopNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#7404 + # source://prism//lib/prism/node.rb#7000 sig { returns(Integer) } def flags; end @@ -13720,7 +13792,7 @@ class Prism::FlipFlopNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#7475 + # source://prism//lib/prism/node.rb#7055 def type; end end end @@ -13730,73 +13802,73 @@ end # 1.0 # ^^^ # -# source://prism//lib/prism/node.rb#7494 +# source://prism//lib/prism/node.rb#7074 class Prism::FloatNode < ::Prism::Node # def initialize: (Float value, Location location) -> void # # @return [FloatNode] a new instance of FloatNode # - # source://prism//lib/prism/node.rb#7496 + # source://prism//lib/prism/node.rb#7076 sig { params(source: Prism::Source, value: Float, location: Prism::Location).void } def initialize(source, value, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#7576 + # source://prism//lib/prism/node.rb#7154 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7504 + # source://prism//lib/prism/node.rb#7084 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7509 + # source://prism//lib/prism/node.rb#7089 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7519 + # source://prism//lib/prism/node.rb#7099 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7514 + # source://prism//lib/prism/node.rb#7094 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?value: Float, ?location: Location) -> FloatNode # - # source://prism//lib/prism/node.rb#7524 + # source://prism//lib/prism/node.rb#7104 sig { params(value: Float, location: Prism::Location).returns(Prism::FloatNode) } def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7509 + # source://prism//lib/prism/node.rb#7089 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { value: Float, location: Location } # - # source://prism//lib/prism/node.rb#7532 + # source://prism//lib/prism/node.rb#7112 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#7120 + sig { override.returns(String) } + def inspect; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by @@ -13813,13 +13885,13 @@ class Prism::FloatNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#7560 + # source://prism//lib/prism/node.rb#7138 sig { override.returns(Symbol) } def type; end # The value of the floating point number as a Float. # - # source://prism//lib/prism/node.rb#7537 + # source://prism//lib/prism/node.rb#7117 sig { returns(Float) } def value; end @@ -13831,7 +13903,7 @@ class Prism::FloatNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#7570 + # source://prism//lib/prism/node.rb#7148 def type; end end end @@ -13841,13 +13913,13 @@ end # for i in a end # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#7586 +# source://prism//lib/prism/node.rb#7164 class Prism::ForNode < ::Prism::Node # def initialize: (Prism::node index, Prism::node collection, StatementsNode? statements, Location for_keyword_loc, Location in_keyword_loc, Location? do_keyword_loc, Location end_keyword_loc, Location location) -> void # # @return [ForNode] a new instance of ForNode # - # source://prism//lib/prism/node.rb#7588 + # source://prism//lib/prism/node.rb#7166 sig do params( source: Prism::Source, @@ -13866,42 +13938,42 @@ 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#7314 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7602 + # source://prism//lib/prism/node.rb#7180 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7607 + # source://prism//lib/prism/node.rb#7185 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # attr_reader collection: Prism::node # - # source://prism//lib/prism/node.rb#7642 + # source://prism//lib/prism/node.rb#7220 sig { returns(Prism::Node) } def collection; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7621 + # source://prism//lib/prism/node.rb#7199 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7612 + # source://prism//lib/prism/node.rb#7190 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?index: Prism::node, ?collection: Prism::node, ?statements: StatementsNode?, ?for_keyword_loc: Location, ?in_keyword_loc: Location, ?do_keyword_loc: Location?, ?end_keyword_loc: Location, ?location: Location) -> ForNode # - # source://prism//lib/prism/node.rb#7626 + # source://prism//lib/prism/node.rb#7204 sig do params( index: Prism::Node, @@ -13919,37 +13991,37 @@ 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#7185 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { index: Prism::node, collection: Prism::node, statements: StatementsNode?, for_keyword_loc: Location, in_keyword_loc: Location, do_keyword_loc: Location?, end_keyword_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#7634 + # source://prism//lib/prism/node.rb#7212 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def do_keyword: () -> String? # - # source://prism//lib/prism/node.rb#7692 + # source://prism//lib/prism/node.rb#7270 sig { returns(T.nilable(String)) } def do_keyword; end # attr_reader do_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#7662 + # source://prism//lib/prism/node.rb#7240 sig { returns(T.nilable(Prism::Location)) } def do_keyword_loc; end # def end_keyword: () -> String # - # source://prism//lib/prism/node.rb#7697 + # source://prism//lib/prism/node.rb#7275 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#7675 + # source://prism//lib/prism/node.rb#7253 sig { returns(Prism::Location) } def end_keyword_loc; end @@ -13958,43 +14030,43 @@ class Prism::ForNode < ::Prism::Node # def for_keyword: () -> String # - # source://prism//lib/prism/node.rb#7682 + # source://prism//lib/prism/node.rb#7260 sig { returns(String) } def for_keyword; end # attr_reader for_keyword_loc: Location # - # source://prism//lib/prism/node.rb#7648 + # source://prism//lib/prism/node.rb#7226 sig { returns(Prism::Location) } def for_keyword_loc; end # def in_keyword: () -> String # - # source://prism//lib/prism/node.rb#7687 + # source://prism//lib/prism/node.rb#7265 sig { returns(String) } def in_keyword; end # attr_reader in_keyword_loc: Location # - # source://prism//lib/prism/node.rb#7655 + # source://prism//lib/prism/node.rb#7233 sig { returns(Prism::Location) } def in_keyword_loc; end # attr_reader index: Prism::node # - # source://prism//lib/prism/node.rb#7639 + # source://prism//lib/prism/node.rb#7217 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#7280 + sig { override.returns(String) } + def inspect; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#7645 + # source://prism//lib/prism/node.rb#7223 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -14013,7 +14085,7 @@ class Prism::ForNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#7735 + # source://prism//lib/prism/node.rb#7298 sig { override.returns(Symbol) } def type; end @@ -14025,7 +14097,7 @@ class Prism::ForNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#7745 + # source://prism//lib/prism/node.rb#7308 def type; end end end @@ -14037,73 +14109,73 @@ end # ^^^ # end # -# source://prism//lib/prism/node.rb#7769 +# source://prism//lib/prism/node.rb#7332 class Prism::ForwardingArgumentsNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [ForwardingArgumentsNode] a new instance of ForwardingArgumentsNode # - # source://prism//lib/prism/node.rb#7771 + # source://prism//lib/prism/node.rb#7334 sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#7846 + # source://prism//lib/prism/node.rb#7408 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7778 + # source://prism//lib/prism/node.rb#7341 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7783 + # source://prism//lib/prism/node.rb#7346 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7793 + # source://prism//lib/prism/node.rb#7356 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7788 + # source://prism//lib/prism/node.rb#7351 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?location: Location) -> ForwardingArgumentsNode # - # source://prism//lib/prism/node.rb#7798 + # source://prism//lib/prism/node.rb#7361 sig { params(location: Prism::Location).returns(Prism::ForwardingArgumentsNode) } def copy(location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7783 + # source://prism//lib/prism/node.rb#7346 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } # - # source://prism//lib/prism/node.rb#7806 + # source://prism//lib/prism/node.rb#7369 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#7374 + sig { override.returns(String) } + def inspect; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by @@ -14120,7 +14192,7 @@ class Prism::ForwardingArgumentsNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#7830 + # source://prism//lib/prism/node.rb#7392 sig { override.returns(Symbol) } def type; end @@ -14132,7 +14204,7 @@ class Prism::ForwardingArgumentsNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#7840 + # source://prism//lib/prism/node.rb#7402 def type; end end end @@ -14143,73 +14215,73 @@ end # ^^^ # end # -# source://prism//lib/prism/node.rb#7856 +# source://prism//lib/prism/node.rb#7418 class Prism::ForwardingParameterNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [ForwardingParameterNode] a new instance of ForwardingParameterNode # - # source://prism//lib/prism/node.rb#7858 + # source://prism//lib/prism/node.rb#7420 sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#7933 + # source://prism//lib/prism/node.rb#7494 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7865 + # source://prism//lib/prism/node.rb#7427 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7870 + # source://prism//lib/prism/node.rb#7432 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7880 + # source://prism//lib/prism/node.rb#7442 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7875 + # source://prism//lib/prism/node.rb#7437 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?location: Location) -> ForwardingParameterNode # - # source://prism//lib/prism/node.rb#7885 + # source://prism//lib/prism/node.rb#7447 sig { params(location: Prism::Location).returns(Prism::ForwardingParameterNode) } def copy(location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7870 + # source://prism//lib/prism/node.rb#7432 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } # - # source://prism//lib/prism/node.rb#7893 + # source://prism//lib/prism/node.rb#7455 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#7460 + sig { override.returns(String) } + def inspect; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by @@ -14226,7 +14298,7 @@ class Prism::ForwardingParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#7917 + # source://prism//lib/prism/node.rb#7478 sig { override.returns(Symbol) } def type; end @@ -14238,7 +14310,7 @@ class Prism::ForwardingParameterNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#7927 + # source://prism//lib/prism/node.rb#7488 def type; end end end @@ -14248,79 +14320,79 @@ end # super # ^^^^^ # -# source://prism//lib/prism/node.rb#7942 +# source://prism//lib/prism/node.rb#7503 class Prism::ForwardingSuperNode < ::Prism::Node # def initialize: (BlockNode? block, Location location) -> void # # @return [ForwardingSuperNode] a new instance of ForwardingSuperNode # - # source://prism//lib/prism/node.rb#7944 + # source://prism//lib/prism/node.rb#7505 sig { params(source: Prism::Source, block: T.nilable(Prism::BlockNode), location: Prism::Location).void } def initialize(source, block, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#8031 + # source://prism//lib/prism/node.rb#7585 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7952 + # source://prism//lib/prism/node.rb#7513 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader block: BlockNode? # - # source://prism//lib/prism/node.rb#7987 + # source://prism//lib/prism/node.rb#7548 sig { returns(T.nilable(Prism::BlockNode)) } def block; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7957 + # source://prism//lib/prism/node.rb#7518 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7969 + # source://prism//lib/prism/node.rb#7530 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7962 + # source://prism//lib/prism/node.rb#7523 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?block: BlockNode?, ?location: Location) -> ForwardingSuperNode # - # source://prism//lib/prism/node.rb#7974 + # source://prism//lib/prism/node.rb#7535 sig { params(block: T.nilable(Prism::BlockNode), location: Prism::Location).returns(Prism::ForwardingSuperNode) } def copy(block: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7957 + # source://prism//lib/prism/node.rb#7518 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { block: BlockNode?, location: Location } # - # source://prism//lib/prism/node.rb#7982 + # source://prism//lib/prism/node.rb#7543 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#7551 + sig { override.returns(String) } + def inspect; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by @@ -14337,7 +14409,7 @@ class Prism::ForwardingSuperNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#8015 + # source://prism//lib/prism/node.rb#7569 sig { override.returns(Symbol) } def type; end @@ -14349,7 +14421,7 @@ class Prism::ForwardingSuperNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#8025 + # source://prism//lib/prism/node.rb#7579 def type; end end end @@ -14359,13 +14431,13 @@ end # $target &&= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#8041 +# source://prism//lib/prism/node.rb#7595 class Prism::GlobalVariableAndWriteNode < ::Prism::Node # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void # # @return [GlobalVariableAndWriteNode] a new instance of GlobalVariableAndWriteNode # - # source://prism//lib/prism/node.rb#8043 + # source://prism//lib/prism/node.rb#7597 sig do params( source: Prism::Source, @@ -14381,36 +14453,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#7700 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8054 + # source://prism//lib/prism/node.rb#7608 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8059 + # source://prism//lib/prism/node.rb#7613 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8069 + # source://prism//lib/prism/node.rb#7623 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8064 + # source://prism//lib/prism/node.rb#7618 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> GlobalVariableAndWriteNode # - # source://prism//lib/prism/node.rb#8074 + # source://prism//lib/prism/node.rb#7628 sig do params( name: Symbol, @@ -14425,13 +14497,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#7613 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#8082 + # source://prism//lib/prism/node.rb#7636 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -14441,33 +14513,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#7666 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#8087 + # source://prism//lib/prism/node.rb#7641 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#8090 + # source://prism//lib/prism/node.rb#7644 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#8107 + # source://prism//lib/prism/node.rb#7661 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#8097 + # source://prism//lib/prism/node.rb#7651 sig { returns(Prism::Location) } def operator_loc; end @@ -14486,13 +14558,13 @@ class Prism::GlobalVariableAndWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#8136 + # source://prism//lib/prism/node.rb#7684 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#8104 + # source://prism//lib/prism/node.rb#7658 sig { returns(Prism::Node) } def value; end @@ -14504,7 +14576,7 @@ class Prism::GlobalVariableAndWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#8146 + # source://prism//lib/prism/node.rb#7694 def type; end end end @@ -14514,13 +14586,13 @@ end # $target += value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#8165 +# source://prism//lib/prism/node.rb#7713 class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Symbol operator, Location location) -> void # # @return [GlobalVariableOperatorWriteNode] a new instance of GlobalVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#8167 + # source://prism//lib/prism/node.rb#7715 sig do params( source: Prism::Source, @@ -14537,36 +14609,36 @@ class Prism::GlobalVariableOperatorWriteNode < ::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#8276 + # source://prism//lib/prism/node.rb#7817 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8179 + # source://prism//lib/prism/node.rb#7727 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8184 + # source://prism//lib/prism/node.rb#7732 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8194 + # source://prism//lib/prism/node.rb#7742 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8189 + # source://prism//lib/prism/node.rb#7737 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?operator: Symbol, ?location: Location) -> GlobalVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#8199 + # source://prism//lib/prism/node.rb#7747 sig do params( name: Symbol, @@ -14582,13 +14654,13 @@ class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8184 + # source://prism//lib/prism/node.rb#7732 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, operator: Symbol, location: Location } # - # source://prism//lib/prism/node.rb#8207 + # source://prism//lib/prism/node.rb#7755 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -14598,33 +14670,33 @@ 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#7783 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#8212 + # source://prism//lib/prism/node.rb#7760 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#8215 + # source://prism//lib/prism/node.rb#7763 sig { returns(Prism::Location) } def name_loc; end # attr_reader operator: Symbol # - # source://prism//lib/prism/node.rb#8232 + # source://prism//lib/prism/node.rb#7780 sig { returns(Symbol) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#8222 + # source://prism//lib/prism/node.rb#7770 sig { returns(Prism::Location) } def operator_loc; end @@ -14643,13 +14715,13 @@ class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#8260 + # source://prism//lib/prism/node.rb#7801 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#8229 + # source://prism//lib/prism/node.rb#7777 sig { returns(Prism::Node) } def value; end @@ -14661,7 +14733,7 @@ class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#8270 + # source://prism//lib/prism/node.rb#7811 def type; end end end @@ -14671,13 +14743,13 @@ end # $target ||= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#8290 +# source://prism//lib/prism/node.rb#7831 class Prism::GlobalVariableOrWriteNode < ::Prism::Node # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void # # @return [GlobalVariableOrWriteNode] a new instance of GlobalVariableOrWriteNode # - # source://prism//lib/prism/node.rb#8292 + # source://prism//lib/prism/node.rb#7833 sig do params( source: Prism::Source, @@ -14693,36 +14765,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#7936 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8303 + # source://prism//lib/prism/node.rb#7844 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8308 + # source://prism//lib/prism/node.rb#7849 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8318 + # source://prism//lib/prism/node.rb#7859 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8313 + # source://prism//lib/prism/node.rb#7854 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> GlobalVariableOrWriteNode # - # source://prism//lib/prism/node.rb#8323 + # source://prism//lib/prism/node.rb#7864 sig do params( name: Symbol, @@ -14737,13 +14809,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#7849 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#8331 + # source://prism//lib/prism/node.rb#7872 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -14753,33 +14825,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#7902 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#8336 + # source://prism//lib/prism/node.rb#7877 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#8339 + # source://prism//lib/prism/node.rb#7880 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#8356 + # source://prism//lib/prism/node.rb#7897 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#8346 + # source://prism//lib/prism/node.rb#7887 sig { returns(Prism::Location) } def operator_loc; end @@ -14798,13 +14870,13 @@ class Prism::GlobalVariableOrWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#8385 + # source://prism//lib/prism/node.rb#7920 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#8353 + # source://prism//lib/prism/node.rb#7894 sig { returns(Prism::Node) } def value; end @@ -14816,7 +14888,7 @@ class Prism::GlobalVariableOrWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#8395 + # source://prism//lib/prism/node.rb#7930 def type; end end end @@ -14826,73 +14898,73 @@ end # $foo # ^^^^ # -# source://prism//lib/prism/node.rb#8414 +# source://prism//lib/prism/node.rb#7949 class Prism::GlobalVariableReadNode < ::Prism::Node # def initialize: (Symbol name, Location location) -> void # # @return [GlobalVariableReadNode] a new instance of GlobalVariableReadNode # - # source://prism//lib/prism/node.rb#8416 + # source://prism//lib/prism/node.rb#7951 sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } def initialize(source, name, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#8500 + # source://prism//lib/prism/node.rb#8033 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8424 + # source://prism//lib/prism/node.rb#7959 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8429 + # source://prism//lib/prism/node.rb#7964 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8439 + # source://prism//lib/prism/node.rb#7974 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8434 + # source://prism//lib/prism/node.rb#7969 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?location: Location) -> GlobalVariableReadNode # - # source://prism//lib/prism/node.rb#8444 + # source://prism//lib/prism/node.rb#7979 sig { params(name: Symbol, location: Prism::Location).returns(Prism::GlobalVariableReadNode) } def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8429 + # source://prism//lib/prism/node.rb#7964 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } # - # source://prism//lib/prism/node.rb#8452 + # source://prism//lib/prism/node.rb#7987 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#7999 + sig { override.returns(String) } + def inspect; end # The name of the global variable, which is a `$` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifier). Alternatively, it can be one of the special global variables designated by a symbol. # @@ -14900,7 +14972,7 @@ class Prism::GlobalVariableReadNode < ::Prism::Node # # $_Test # name `:$_Test` # - # source://prism//lib/prism/node.rb#8461 + # source://prism//lib/prism/node.rb#7996 sig { returns(Symbol) } def name; end @@ -14919,7 +14991,7 @@ class Prism::GlobalVariableReadNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#8484 + # source://prism//lib/prism/node.rb#8017 sig { override.returns(Symbol) } def type; end @@ -14931,7 +15003,7 @@ class Prism::GlobalVariableReadNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#8494 + # source://prism//lib/prism/node.rb#8027 def type; end end end @@ -14941,77 +15013,77 @@ end # $foo, $bar = baz # ^^^^ ^^^^ # -# source://prism//lib/prism/node.rb#8510 +# source://prism//lib/prism/node.rb#8043 class Prism::GlobalVariableTargetNode < ::Prism::Node # def initialize: (Symbol name, Location location) -> void # # @return [GlobalVariableTargetNode] a new instance of GlobalVariableTargetNode # - # source://prism//lib/prism/node.rb#8512 + # source://prism//lib/prism/node.rb#8045 sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } def initialize(source, name, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#8592 + # source://prism//lib/prism/node.rb#8123 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8520 + # source://prism//lib/prism/node.rb#8053 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8525 + # source://prism//lib/prism/node.rb#8058 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8535 + # source://prism//lib/prism/node.rb#8068 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8530 + # source://prism//lib/prism/node.rb#8063 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?location: Location) -> GlobalVariableTargetNode # - # source://prism//lib/prism/node.rb#8540 + # source://prism//lib/prism/node.rb#8073 sig { params(name: Symbol, location: Prism::Location).returns(Prism::GlobalVariableTargetNode) } def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8525 + # source://prism//lib/prism/node.rb#8058 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } # - # source://prism//lib/prism/node.rb#8548 + # source://prism//lib/prism/node.rb#8081 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#8089 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#8553 + # source://prism//lib/prism/node.rb#8086 sig { returns(Symbol) } def name; end @@ -15030,7 +15102,7 @@ class Prism::GlobalVariableTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#8576 + # source://prism//lib/prism/node.rb#8107 sig { override.returns(Symbol) } def type; end @@ -15042,7 +15114,7 @@ class Prism::GlobalVariableTargetNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#8586 + # source://prism//lib/prism/node.rb#8117 def type; end end end @@ -15052,13 +15124,13 @@ end # $foo = 1 # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#8602 +# source://prism//lib/prism/node.rb#8133 class Prism::GlobalVariableWriteNode < ::Prism::Node # def initialize: (Symbol name, Location name_loc, Prism::node value, Location operator_loc, Location location) -> void # # @return [GlobalVariableWriteNode] a new instance of GlobalVariableWriteNode # - # source://prism//lib/prism/node.rb#8604 + # source://prism//lib/prism/node.rb#8135 sig do params( source: Prism::Source, @@ -15074,36 +15146,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#8254 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8615 + # source://prism//lib/prism/node.rb#8146 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8620 + # source://prism//lib/prism/node.rb#8151 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8630 + # source://prism//lib/prism/node.rb#8161 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8625 + # source://prism//lib/prism/node.rb#8156 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location, ?location: Location) -> GlobalVariableWriteNode # - # source://prism//lib/prism/node.rb#8635 + # source://prism//lib/prism/node.rb#8166 sig do params( name: Symbol, @@ -15118,24 +15190,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#8151 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#8643 + # source://prism//lib/prism/node.rb#8174 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#8220 + sig { override.returns(String) } + def inspect; end # The name of the global variable, which is a `$` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifier). Alternatively, it can be one of the special global variables designated by a symbol. # @@ -15143,7 +15215,7 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # # $_Test = 123 # name `:$_Test` # - # source://prism//lib/prism/node.rb#8652 + # source://prism//lib/prism/node.rb#8183 sig { returns(Symbol) } def name; end @@ -15152,13 +15224,13 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # $foo = :bar # ^^^^ # - # source://prism//lib/prism/node.rb#8658 + # source://prism//lib/prism/node.rb#8189 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#8684 + # source://prism//lib/prism/node.rb#8215 sig { returns(String) } def operator; end @@ -15167,7 +15239,7 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # $foo = :bar # ^ # - # source://prism//lib/prism/node.rb#8677 + # source://prism//lib/prism/node.rb#8208 sig { returns(Prism::Location) } def operator_loc; end @@ -15186,7 +15258,7 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#8713 + # source://prism//lib/prism/node.rb#8238 sig { override.returns(Symbol) } def type; end @@ -15198,7 +15270,7 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # $-xyz = 123 # ^^^ # - # source://prism//lib/prism/node.rb#8671 + # source://prism//lib/prism/node.rb#8202 sig { returns(Prism::Node) } def value; end @@ -15210,7 +15282,7 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#8723 + # source://prism//lib/prism/node.rb#8248 def type; end end end @@ -15220,13 +15292,13 @@ end # { a => b } # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#8742 +# source://prism//lib/prism/node.rb#8267 class Prism::HashNode < ::Prism::Node # def initialize: (Location opening_loc, Array[AssocNode | AssocSplatNode] elements, Location closing_loc, Location location) -> void # # @return [HashNode] a new instance of HashNode # - # source://prism//lib/prism/node.rb#8744 + # source://prism//lib/prism/node.rb#8269 sig do params( source: Prism::Source, @@ -15241,24 +15313,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#8385 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8754 + # source://prism//lib/prism/node.rb#8279 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8759 + # source://prism//lib/prism/node.rb#8284 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#8821 + # source://prism//lib/prism/node.rb#8346 sig { returns(String) } def closing; end @@ -15267,25 +15339,25 @@ class Prism::HashNode < ::Prism::Node # { a => b } # ^ # - # source://prism//lib/prism/node.rb#8809 + # source://prism//lib/prism/node.rb#8334 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8769 + # source://prism//lib/prism/node.rb#8294 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8764 + # source://prism//lib/prism/node.rb#8289 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?opening_loc: Location, ?elements: Array[AssocNode | AssocSplatNode], ?closing_loc: Location, ?location: Location) -> HashNode # - # source://prism//lib/prism/node.rb#8774 + # source://prism//lib/prism/node.rb#8299 sig do params( opening_loc: Prism::Location, @@ -15299,13 +15371,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#8284 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location, elements: Array[AssocNode | AssocSplatNode], closing_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#8782 + # source://prism//lib/prism/node.rb#8307 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -15317,22 +15389,22 @@ class Prism::HashNode < ::Prism::Node # { **foo } # ^^^^^ # - # source://prism//lib/prism/node.rb#8803 + # source://prism//lib/prism/node.rb#8328 sig { returns(T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)]) } def elements; end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#8351 + sig { override.returns(String) } + def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#8816 + # source://prism//lib/prism/node.rb#8341 sig { returns(String) } def opening; end @@ -15341,7 +15413,7 @@ class Prism::HashNode < ::Prism::Node # { a => b } # ^ # - # source://prism//lib/prism/node.rb#8790 + # source://prism//lib/prism/node.rb#8315 sig { returns(Prism::Location) } def opening_loc; end @@ -15360,7 +15432,7 @@ class Prism::HashNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#8848 + # source://prism//lib/prism/node.rb#8369 sig { override.returns(Symbol) } def type; end @@ -15372,7 +15444,7 @@ class Prism::HashNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#8858 + # source://prism//lib/prism/node.rb#8379 def type; end end end @@ -15385,13 +15457,13 @@ end # foo => { a: 1, b: 2, **c } # ^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#8880 +# source://prism//lib/prism/node.rb#8401 class Prism::HashPatternNode < ::Prism::Node # def initialize: (Prism::node? constant, Array[AssocNode] elements, AssocSplatNode | NoKeywordsParameterNode | nil rest, Location? opening_loc, Location? closing_loc, Location location) -> void # # @return [HashPatternNode] a new instance of HashPatternNode # - # source://prism//lib/prism/node.rb#8882 + # source://prism//lib/prism/node.rb#8403 sig do params( source: Prism::Source, @@ -15408,54 +15480,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#8531 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8894 + # source://prism//lib/prism/node.rb#8415 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8899 + # source://prism//lib/prism/node.rb#8420 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#8971 + # source://prism//lib/prism/node.rb#8492 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#8953 + # source://prism//lib/prism/node.rb#8474 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8913 + # source://prism//lib/prism/node.rb#8434 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8904 + # source://prism//lib/prism/node.rb#8425 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader constant: Prism::node? # - # source://prism//lib/prism/node.rb#8931 + # source://prism//lib/prism/node.rb#8452 sig { returns(T.nilable(Prism::Node)) } def constant; end # def copy: (?constant: Prism::node?, ?elements: Array[AssocNode], ?rest: AssocSplatNode | NoKeywordsParameterNode | nil, ?opening_loc: Location?, ?closing_loc: Location?, ?location: Location) -> HashPatternNode # - # source://prism//lib/prism/node.rb#8918 + # source://prism//lib/prism/node.rb#8439 sig do params( constant: T.nilable(Prism::Node), @@ -15471,46 +15543,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#8420 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { constant: Prism::node?, elements: Array[AssocNode], rest: AssocSplatNode | NoKeywordsParameterNode | nil, opening_loc: Location?, closing_loc: Location?, location: Location } # - # source://prism//lib/prism/node.rb#8926 + # source://prism//lib/prism/node.rb#8447 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader elements: Array[AssocNode] # - # source://prism//lib/prism/node.rb#8934 + # source://prism//lib/prism/node.rb#8455 sig { returns(T::Array[Prism::AssocNode]) } def elements; end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#8497 + sig { override.returns(String) } + def inspect; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#8966 + # source://prism//lib/prism/node.rb#8487 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#8940 + # source://prism//lib/prism/node.rb#8461 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader rest: AssocSplatNode | NoKeywordsParameterNode | nil # - # source://prism//lib/prism/node.rb#8937 + # source://prism//lib/prism/node.rb#8458 sig { returns(T.nilable(T.any(Prism::AssocSplatNode, Prism::NoKeywordsParameterNode))) } def rest; end @@ -15529,7 +15601,7 @@ class Prism::HashPatternNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#9010 + # source://prism//lib/prism/node.rb#8515 sig { override.returns(Symbol) } def type; end @@ -15541,7 +15613,7 @@ class Prism::HashPatternNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#9020 + # source://prism//lib/prism/node.rb#8525 def type; end end end @@ -15567,13 +15639,13 @@ end # foo ? bar : baz # ^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#9047 +# source://prism//lib/prism/node.rb#8552 class Prism::IfNode < ::Prism::Node # def initialize: (Location? if_keyword_loc, Prism::node predicate, Location? then_keyword_loc, StatementsNode? statements, Prism::node? consequent, Location? end_keyword_loc, Location location) -> void # # @return [IfNode] a new instance of IfNode # - # source://prism//lib/prism/node.rb#9049 + # source://prism//lib/prism/node.rb#8554 sig do params( source: Prism::Source, @@ -15591,30 +15663,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#8751 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9062 + # source://prism//lib/prism/node.rb#8567 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9071 + # source://prism//lib/prism/node.rb#8576 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9085 + # source://prism//lib/prism/node.rb#8590 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#9076 + # source://prism//lib/prism/node.rb#8581 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end @@ -15632,13 +15704,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#8681 sig { returns(T.nilable(Prism::Node)) } def consequent; end # def copy: (?if_keyword_loc: Location?, ?predicate: Prism::node, ?then_keyword_loc: Location?, ?statements: StatementsNode?, ?consequent: Prism::node?, ?end_keyword_loc: Location?, ?location: Location) -> IfNode # - # source://prism//lib/prism/node.rb#9090 + # source://prism//lib/prism/node.rb#8595 sig do params( if_keyword_loc: T.nilable(Prism::Location), @@ -15655,19 +15727,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#8576 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { if_keyword_loc: Location?, predicate: Prism::node, then_keyword_loc: Location?, statements: StatementsNode?, consequent: Prism::node?, end_keyword_loc: Location?, location: Location } # - # source://prism//lib/prism/node.rb#9098 + # source://prism//lib/prism/node.rb#8603 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def end_keyword: () -> String? # - # source://prism//lib/prism/node.rb#9207 + # source://prism//lib/prism/node.rb#8712 sig { returns(T.nilable(String)) } def end_keyword; end @@ -15678,7 +15750,7 @@ class Prism::IfNode < ::Prism::Node # end # ^^^ # - # source://prism//lib/prism/node.rb#9184 + # source://prism//lib/prism/node.rb#8689 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end @@ -15687,7 +15759,7 @@ class Prism::IfNode < ::Prism::Node # def if_keyword: () -> String? # - # source://prism//lib/prism/node.rb#9197 + # source://prism//lib/prism/node.rb#8702 sig { returns(T.nilable(String)) } def if_keyword; end @@ -15698,15 +15770,15 @@ 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#8613 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#8717 + sig { override.returns(String) } + def inspect; end # The node for the condition the `IfNode` is testing. # @@ -15721,11 +15793,11 @@ class Prism::IfNode < ::Prism::Node # foo ? bar : baz # ^^^ # - # source://prism//lib/prism/node.rb#9132 + # source://prism//lib/prism/node.rb#8637 sig { returns(Prism::Node) } def predicate; end - # source://prism//lib/prism/node.rb#9066 + # source://prism//lib/prism/node.rb#8571 def set_newline_flag(newline_marked); end # Represents the body of statements that will be executed when the predicate is evaluated as truthy. Will be `nil` when no body is provided. @@ -15737,13 +15809,13 @@ class Prism::IfNode < ::Prism::Node # ^^^ # end # - # source://prism//lib/prism/node.rb#9161 + # source://prism//lib/prism/node.rb#8666 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # def then_keyword: () -> String? # - # source://prism//lib/prism/node.rb#9202 + # source://prism//lib/prism/node.rb#8707 sig { returns(T.nilable(String)) } def then_keyword; end @@ -15755,7 +15827,7 @@ class Prism::IfNode < ::Prism::Node # a ? b : c # ^ # - # source://prism//lib/prism/node.rb#9141 + # source://prism//lib/prism/node.rb#8646 sig { returns(T.nilable(Prism::Location)) } def then_keyword_loc; end @@ -15774,7 +15846,7 @@ class Prism::IfNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#9248 + # source://prism//lib/prism/node.rb#8735 sig { override.returns(Symbol) } def type; end @@ -15786,7 +15858,7 @@ class Prism::IfNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#9258 + # source://prism//lib/prism/node.rb#8745 def type; end end end @@ -15796,13 +15868,13 @@ end # 1.0i # ^^^^ # -# source://prism//lib/prism/node.rb#9279 +# source://prism//lib/prism/node.rb#8766 class Prism::ImaginaryNode < ::Prism::Node # def initialize: (FloatNode | IntegerNode | RationalNode numeric, Location location) -> void # # @return [ImaginaryNode] a new instance of ImaginaryNode # - # source://prism//lib/prism/node.rb#9281 + # source://prism//lib/prism/node.rb#8768 sig do params( source: Prism::Source, @@ -15815,36 +15887,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#8846 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9289 + # source://prism//lib/prism/node.rb#8776 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9294 + # source://prism//lib/prism/node.rb#8781 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9304 + # source://prism//lib/prism/node.rb#8791 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#9299 + # source://prism//lib/prism/node.rb#8786 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?numeric: FloatNode | IntegerNode | RationalNode, ?location: Location) -> ImaginaryNode # - # source://prism//lib/prism/node.rb#9309 + # source://prism//lib/prism/node.rb#8796 sig do params( numeric: T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode), @@ -15856,28 +15928,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#8781 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { numeric: FloatNode | IntegerNode | RationalNode, location: Location } # - # source://prism//lib/prism/node.rb#9317 + # source://prism//lib/prism/node.rb#8804 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#8812 + 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#8809 sig { returns(T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode)) } def numeric; end @@ -15896,7 +15968,7 @@ class Prism::ImaginaryNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#9346 + # source://prism//lib/prism/node.rb#8830 sig { override.returns(Symbol) } def type; end @@ -15914,7 +15986,7 @@ class Prism::ImaginaryNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#9356 + # source://prism//lib/prism/node.rb#8840 def type; end end end @@ -15930,73 +16002,73 @@ end # foo in { bar: } # ^^^^ # -# source://prism//lib/prism/node.rb#9378 +# source://prism//lib/prism/node.rb#8862 class Prism::ImplicitNode < ::Prism::Node # def initialize: (Prism::node value, Location location) -> void # # @return [ImplicitNode] a new instance of ImplicitNode # - # source://prism//lib/prism/node.rb#9380 + # source://prism//lib/prism/node.rb#8864 sig { params(source: Prism::Source, value: Prism::Node, location: Prism::Location).void } def initialize(source, value, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#9461 + # source://prism//lib/prism/node.rb#8942 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9388 + # source://prism//lib/prism/node.rb#8872 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9393 + # source://prism//lib/prism/node.rb#8877 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9403 + # source://prism//lib/prism/node.rb#8887 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#9398 + # source://prism//lib/prism/node.rb#8882 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?value: Prism::node, ?location: Location) -> ImplicitNode # - # source://prism//lib/prism/node.rb#9408 + # source://prism//lib/prism/node.rb#8892 sig { params(value: Prism::Node, location: Prism::Location).returns(Prism::ImplicitNode) } def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9393 + # source://prism//lib/prism/node.rb#8877 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#9416 + # source://prism//lib/prism/node.rb#8900 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#8908 + sig { override.returns(String) } + def inspect; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by @@ -16013,13 +16085,13 @@ class Prism::ImplicitNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#9445 + # source://prism//lib/prism/node.rb#8926 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#9421 + # source://prism//lib/prism/node.rb#8905 sig { returns(Prism::Node) } def value; end @@ -16031,7 +16103,7 @@ class Prism::ImplicitNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#9455 + # source://prism//lib/prism/node.rb#8936 def type; end end end @@ -16050,73 +16122,73 @@ end # foo, = bar # ^ # -# source://prism//lib/prism/node.rb#9480 +# source://prism//lib/prism/node.rb#8961 class Prism::ImplicitRestNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [ImplicitRestNode] a new instance of ImplicitRestNode # - # source://prism//lib/prism/node.rb#9482 + # source://prism//lib/prism/node.rb#8963 sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#9557 + # source://prism//lib/prism/node.rb#9037 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9489 + # source://prism//lib/prism/node.rb#8970 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9494 + # source://prism//lib/prism/node.rb#8975 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9504 + # source://prism//lib/prism/node.rb#8985 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#9499 + # source://prism//lib/prism/node.rb#8980 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?location: Location) -> ImplicitRestNode # - # source://prism//lib/prism/node.rb#9509 + # source://prism//lib/prism/node.rb#8990 sig { params(location: Prism::Location).returns(Prism::ImplicitRestNode) } def copy(location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9494 + # source://prism//lib/prism/node.rb#8975 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } # - # source://prism//lib/prism/node.rb#9517 + # source://prism//lib/prism/node.rb#8998 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#9003 + sig { override.returns(String) } + def inspect; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by @@ -16133,7 +16205,7 @@ class Prism::ImplicitRestNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#9541 + # source://prism//lib/prism/node.rb#9021 sig { override.returns(Symbol) } def type; end @@ -16145,7 +16217,7 @@ class Prism::ImplicitRestNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#9551 + # source://prism//lib/prism/node.rb#9031 def type; end end end @@ -16155,13 +16227,13 @@ end # case a; in b then c end # ^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#9566 +# source://prism//lib/prism/node.rb#9046 class Prism::InNode < ::Prism::Node # def initialize: (Prism::node pattern, StatementsNode? statements, Location in_loc, Location? then_loc, Location location) -> void # # @return [InNode] a new instance of InNode # - # source://prism//lib/prism/node.rb#9568 + # source://prism//lib/prism/node.rb#9048 sig do params( source: Prism::Source, @@ -16177,36 +16249,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#9165 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9579 + # source://prism//lib/prism/node.rb#9059 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9584 + # source://prism//lib/prism/node.rb#9064 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9597 + # source://prism//lib/prism/node.rb#9077 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#9589 + # source://prism//lib/prism/node.rb#9069 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?pattern: Prism::node, ?statements: StatementsNode?, ?in_loc: Location, ?then_loc: Location?, ?location: Location) -> InNode # - # source://prism//lib/prism/node.rb#9602 + # source://prism//lib/prism/node.rb#9082 sig do params( pattern: Prism::Node, @@ -16221,13 +16293,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#9064 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { pattern: Prism::node, statements: StatementsNode?, in_loc: Location, then_loc: Location?, location: Location } # - # source://prism//lib/prism/node.rb#9610 + # source://prism//lib/prism/node.rb#9090 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -16236,43 +16308,43 @@ class Prism::InNode < ::Prism::Node # def in: () -> String # - # source://prism//lib/prism/node.rb#9641 + # source://prism//lib/prism/node.rb#9121 sig { returns(String) } def in; end # attr_reader in_loc: Location # - # source://prism//lib/prism/node.rb#9621 + # source://prism//lib/prism/node.rb#9101 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#9131 + 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#9095 sig { returns(Prism::Node) } def pattern; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#9618 + # source://prism//lib/prism/node.rb#9098 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # def then: () -> String? # - # source://prism//lib/prism/node.rb#9646 + # source://prism//lib/prism/node.rb#9126 sig { returns(T.nilable(String)) } def then; end # attr_reader then_loc: Location? # - # source://prism//lib/prism/node.rb#9628 + # source://prism//lib/prism/node.rb#9108 sig { returns(T.nilable(Prism::Location)) } def then_loc; end @@ -16291,7 +16363,7 @@ class Prism::InNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#9680 + # source://prism//lib/prism/node.rb#9149 sig { override.returns(Symbol) } def type; end @@ -16303,7 +16375,7 @@ class Prism::InNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#9690 + # source://prism//lib/prism/node.rb#9159 def type; end end end @@ -16313,13 +16385,13 @@ end # foo.bar[baz] &&= value # ^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#9709 +# source://prism//lib/prism/node.rb#9178 class Prism::IndexAndWriteNode < ::Prism::Node # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Prism::node? block, Location operator_loc, Prism::node value, Location location) -> void # # @return [IndexAndWriteNode] a new instance of IndexAndWriteNode # - # source://prism//lib/prism/node.rb#9711 + # source://prism//lib/prism/node.rb#9180 sig do params( source: Prism::Source, @@ -16340,18 +16412,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#9358 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9727 + # source://prism//lib/prism/node.rb#9196 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#9792 + # source://prism//lib/prism/node.rb#9261 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end @@ -16359,61 +16431,61 @@ class Prism::IndexAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9825 + # source://prism//lib/prism/node.rb#9294 sig { returns(T::Boolean) } def attribute_write?; end # attr_reader block: Prism::node? # - # source://prism//lib/prism/node.rb#9802 + # source://prism//lib/prism/node.rb#9271 sig { returns(T.nilable(Prism::Node)) } def block; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#9835 + # source://prism//lib/prism/node.rb#9304 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#9772 + # source://prism//lib/prism/node.rb#9241 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9732 + # source://prism//lib/prism/node.rb#9201 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#9845 + # source://prism//lib/prism/node.rb#9314 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#9795 + # source://prism//lib/prism/node.rb#9264 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9747 + # source://prism//lib/prism/node.rb#9216 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#9737 + # source://prism//lib/prism/node.rb#9206 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: Prism::node?, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> IndexAndWriteNode # - # source://prism//lib/prism/node.rb#9752 + # source://prism//lib/prism/node.rb#9221 sig do params( flags: Integer, @@ -16433,13 +16505,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#9201 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Prism::node?, operator_loc: Location, value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#9760 + # source://prism//lib/prism/node.rb#9229 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -16450,43 +16522,43 @@ class Prism::IndexAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9830 + # source://prism//lib/prism/node.rb#9299 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#9324 + sig { override.returns(String) } + def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#9840 + # source://prism//lib/prism/node.rb#9309 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#9785 + # source://prism//lib/prism/node.rb#9254 sig { returns(Prism::Location) } def opening_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#9850 + # source://prism//lib/prism/node.rb#9319 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#9805 + # source://prism//lib/prism/node.rb#9274 sig { returns(Prism::Location) } def operator_loc; end # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#9769 + # source://prism//lib/prism/node.rb#9238 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -16494,7 +16566,7 @@ class Prism::IndexAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9815 + # source://prism//lib/prism/node.rb#9284 sig { returns(T::Boolean) } def safe_navigation?; end @@ -16513,13 +16585,13 @@ class Prism::IndexAndWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#9900 + # source://prism//lib/prism/node.rb#9342 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#9812 + # source://prism//lib/prism/node.rb#9281 sig { returns(Prism::Node) } def value; end @@ -16527,7 +16599,7 @@ class Prism::IndexAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9820 + # source://prism//lib/prism/node.rb#9289 sig { returns(T::Boolean) } def variable_call?; end @@ -16535,7 +16607,7 @@ class Prism::IndexAndWriteNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#9765 + # source://prism//lib/prism/node.rb#9234 sig { returns(Integer) } def flags; end @@ -16547,7 +16619,7 @@ class Prism::IndexAndWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#9910 + # source://prism//lib/prism/node.rb#9352 def type; end end end @@ -16557,13 +16629,13 @@ end # foo.bar[baz] += value # ^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#9934 +# source://prism//lib/prism/node.rb#9376 class Prism::IndexOperatorWriteNode < ::Prism::Node # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Prism::node? block, Symbol operator, Location 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#9378 sig do params( source: Prism::Source, @@ -16585,18 +16657,18 @@ class Prism::IndexOperatorWriteNode < ::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#10141 + # source://prism//lib/prism/node.rb#9555 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9953 + # source://prism//lib/prism/node.rb#9395 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#10018 + # source://prism//lib/prism/node.rb#9460 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end @@ -16604,61 +16676,61 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10054 + # source://prism//lib/prism/node.rb#9496 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#9470 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#9506 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#9440 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#9400 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#9516 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#10021 + # source://prism//lib/prism/node.rb#9463 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9973 + # source://prism//lib/prism/node.rb#9415 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#9963 + # source://prism//lib/prism/node.rb#9405 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: Prism::node?, ?operator: Symbol, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> IndexOperatorWriteNode # - # source://prism//lib/prism/node.rb#9978 + # source://prism//lib/prism/node.rb#9420 sig do params( flags: Integer, @@ -16679,13 +16751,13 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9958 + # source://prism//lib/prism/node.rb#9400 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Prism::node?, operator: Symbol, operator_loc: Location, value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#9986 + # source://prism//lib/prism/node.rb#9428 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -16696,43 +16768,43 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10059 + # source://prism//lib/prism/node.rb#9501 sig { returns(T::Boolean) } def ignore_visibility?; end - # def inspect(NodeInspector inspector) -> String + # def inspect -> String # - # source://prism//lib/prism/node.rb#10079 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#9521 + sig { override.returns(String) } + def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#10069 + # source://prism//lib/prism/node.rb#9511 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#10011 + # source://prism//lib/prism/node.rb#9453 sig { returns(Prism::Location) } def opening_loc; end # attr_reader operator: Symbol # - # source://prism//lib/prism/node.rb#10031 + # source://prism//lib/prism/node.rb#9473 sig { returns(Symbol) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#10034 + # source://prism//lib/prism/node.rb#9476 sig { returns(Prism::Location) } def operator_loc; end # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#9995 + # source://prism//lib/prism/node.rb#9437 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -16740,7 +16812,7 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10044 + # source://prism//lib/prism/node.rb#9486 sig { returns(T::Boolean) } def safe_navigation?; end @@ -16759,13 +16831,13 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#10125 + # source://prism//lib/prism/node.rb#9539 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#10041 + # source://prism//lib/prism/node.rb#9483 sig { returns(Prism::Node) } def value; end @@ -16773,7 +16845,7 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10049 + # source://prism//lib/prism/node.rb#9491 sig { returns(T::Boolean) } def variable_call?; end @@ -16781,7 +16853,7 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#9991 + # source://prism//lib/prism/node.rb#9433 sig { returns(Integer) } def flags; end @@ -16793,7 +16865,7 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#10135 + # source://prism//lib/prism/node.rb#9549 def type; end end end @@ -16803,13 +16875,13 @@ end # foo.bar[baz] ||= value # ^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#10160 +# source://prism//lib/prism/node.rb#9574 class Prism::IndexOrWriteNode < ::Prism::Node # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Prism::node? block, Location operator_loc, Prism::node value, Location location) -> void # # @return [IndexOrWriteNode] a new instance of IndexOrWriteNode # - # source://prism//lib/prism/node.rb#10162 + # source://prism//lib/prism/node.rb#9576 sig do params( source: Prism::Source, @@ -16830,18 +16902,18 @@ class Prism::IndexOrWriteNode < ::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#10367 + # source://prism//lib/prism/node.rb#9754 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10178 + # source://prism//lib/prism/node.rb#9592 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#10243 + # source://prism//lib/prism/node.rb#9657 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end @@ -16849,61 +16921,61 @@ class Prism::IndexOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10276 + # source://prism//lib/prism/node.rb#9690 sig { returns(T::Boolean) } def attribute_write?; end # attr_reader block: Prism::node? # - # source://prism//lib/prism/node.rb#10253 + # source://prism//lib/prism/node.rb#9667 sig { returns(T.nilable(Prism::Node)) } def block; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#10286 + # source://prism//lib/prism/node.rb#9700 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#10223 + # source://prism//lib/prism/node.rb#9637 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10183 + # source://prism//lib/prism/node.rb#9597 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#10296 + # source://prism//lib/prism/node.rb#9710 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#10246 + # source://prism//lib/prism/node.rb#9660 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10198 + # source://prism//lib/prism/node.rb#9612 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10188 + # source://prism//lib/prism/node.rb#9602 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: Prism::node?, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> IndexOrWriteNode # - # source://prism//lib/prism/node.rb#10203 + # source://prism//lib/prism/node.rb#9617 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#9597 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Prism::node?, operator_loc: Location, value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#10211 + # source://prism//lib/prism/node.rb#9625 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -16940,43 +17012,43 @@ class Prism::IndexOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10281 + # source://prism//lib/prism/node.rb#9695 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#9720 + sig { override.returns(String) } + def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#10291 + # source://prism//lib/prism/node.rb#9705 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#10236 + # source://prism//lib/prism/node.rb#9650 sig { returns(Prism::Location) } def opening_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#10301 + # source://prism//lib/prism/node.rb#9715 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#10256 + # source://prism//lib/prism/node.rb#9670 sig { returns(Prism::Location) } def operator_loc; end # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#10220 + # source://prism//lib/prism/node.rb#9634 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#9680 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#9738 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#9677 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#9685 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#9630 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#9748 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#9780 class Prism::IndexTargetNode < ::Prism::Node # def initialize: (Integer flags, Prism::node receiver, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Prism::node? block, Location location) -> void # # @return [IndexTargetNode] a new instance of IndexTargetNode # - # source://prism//lib/prism/node.rb#10395 + # source://prism//lib/prism/node.rb#9782 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#9923 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10408 + # source://prism//lib/prism/node.rb#9795 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#10459 + # source://prism//lib/prism/node.rb#9846 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#9869 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#9856 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#9800 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#9884 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#10462 + # source://prism//lib/prism/node.rb#9849 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10427 + # source://prism//lib/prism/node.rb#9814 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10418 + # source://prism//lib/prism/node.rb#9805 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?receiver: Prism::node, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: Prism::node?, ?location: Location) -> IndexTargetNode # - # source://prism//lib/prism/node.rb#10432 + # source://prism//lib/prism/node.rb#9819 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#9800 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Prism::node?, location: Location } # - # source://prism//lib/prism/node.rb#10440 + # source://prism//lib/prism/node.rb#9827 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -17174,31 +17246,31 @@ class Prism::IndexTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10487 + # source://prism//lib/prism/node.rb#9874 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#9889 + sig { override.returns(String) } + def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#10492 + # source://prism//lib/prism/node.rb#9879 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#10452 + # source://prism//lib/prism/node.rb#9839 sig { returns(Prism::Location) } def opening_loc; end # attr_reader receiver: Prism::node # - # source://prism//lib/prism/node.rb#10449 + # source://prism//lib/prism/node.rb#9836 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#9859 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#9907 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#9864 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#9832 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#9917 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,23 +17346,840 @@ 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 +# This visitor is responsible for composing the strings that get returned by +# the various #inspect methods defined on each of the nodes. +# +# source://prism//lib/prism/inspect_visitor.rb#12 +class Prism::InspectVisitor < ::Prism::Visitor + # Initializes a new instance of the InspectVisitor. + # + # @return [InspectVisitor] a new instance of InspectVisitor + # + # source://prism//lib/prism/inspect_visitor.rb#35 + sig { params(indent: String).void } + def initialize(indent = T.unsafe(nil)); end + + # The list of commands that we need to execute in order to compose the + # final string. + # + # source://prism//lib/prism/inspect_visitor.rb#32 + def commands; end + + # Compose the final string. + # + # source://prism//lib/prism/inspect_visitor.rb#48 + sig { returns(String) } + def compose; end + + # The current prefix string. + # + # source://prism//lib/prism/inspect_visitor.rb#28 + def indent; end + + # Inspect a AliasGlobalVariableNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#77 + def visit_alias_global_variable_node(node); end + + # Inspect a AliasMethodNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#87 + def visit_alias_method_node(node); end + + # Inspect a AlternationPatternNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#97 + def visit_alternation_pattern_node(node); end + + # Inspect a AndNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#107 + def visit_and_node(node); end + + # Inspect a ArgumentsNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#117 + def visit_arguments_node(node); end + + # Inspect a ArrayNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#133 + def visit_array_node(node); end + + # Inspect a ArrayPatternNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#151 + def visit_array_pattern_node(node); end + + # Inspect a AssocNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#188 + def visit_assoc_node(node); end + + # Inspect a AssocSplatNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#198 + def visit_assoc_splat_node(node); end + + # Inspect a BackReferenceReadNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#210 + def visit_back_reference_read_node(node); end + + # Inspect a BeginNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#216 + def visit_begin_node(node); end + + # Inspect a BlockArgumentNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#247 + def visit_block_argument_node(node); end + + # Inspect a BlockLocalVariableNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#259 + def visit_block_local_variable_node(node); end + + # Inspect a BlockNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#267 + def visit_block_node(node); end + + # Inspect a BlockParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#287 + def visit_block_parameter_node(node); end + + # Inspect a BlockParametersNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#301 + def visit_block_parameters_node(node); end + + # Inspect a BreakNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#323 + def visit_break_node(node); end + + # Inspect a CallAndWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#335 + def visit_call_and_write_node(node); end + + # Inspect a CallNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#355 + def visit_call_node(node); end + + # Inspect a CallOperatorWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#385 + def visit_call_operator_write_node(node); end + + # Inspect a CallOrWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#406 + def visit_call_or_write_node(node); end + + # Inspect a CallTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#426 + def visit_call_target_node(node); end + + # Inspect a CapturePatternNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#438 + def visit_capture_pattern_node(node); end + + # Inspect a CaseMatchNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#448 + def visit_case_match_node(node); end + + # Inspect a CaseNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#476 + def visit_case_node(node); end + + # Inspect a ClassNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#504 + def visit_class_node(node); end + + # Inspect a ClassVariableAndWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#528 + def visit_class_variable_and_write_node(node); end + + # Inspect a ClassVariableOperatorWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#538 + def visit_class_variable_operator_write_node(node); end + + # Inspect a ClassVariableOrWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#549 + def visit_class_variable_or_write_node(node); end + + # Inspect a ClassVariableReadNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#559 + def visit_class_variable_read_node(node); end + + # Inspect a ClassVariableTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#565 + def visit_class_variable_target_node(node); end + + # Inspect a ClassVariableWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#571 + def visit_class_variable_write_node(node); end + + # Inspect a ConstantAndWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#581 + def visit_constant_and_write_node(node); end + + # Inspect a ConstantOperatorWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#591 + def visit_constant_operator_write_node(node); end + + # Inspect a ConstantOrWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#602 + def visit_constant_or_write_node(node); end + + # Inspect a ConstantPathAndWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#612 + def visit_constant_path_and_write_node(node); end + + # Inspect a ConstantPathNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#622 + def visit_constant_path_node(node); end + + # Inspect a ConstantPathOperatorWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#640 + def visit_constant_path_operator_write_node(node); end + + # Inspect a ConstantPathOrWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#651 + def visit_constant_path_or_write_node(node); end + + # Inspect a ConstantPathTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#661 + def visit_constant_path_target_node(node); end + + # Inspect a ConstantPathWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#679 + def visit_constant_path_write_node(node); end + + # Inspect a ConstantReadNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#689 + def visit_constant_read_node(node); end + + # Inspect a ConstantTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#695 + def visit_constant_target_node(node); end + + # Inspect a ConstantWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#701 + def visit_constant_write_node(node); end + + # Inspect a DefNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#711 + def visit_def_node(node); end + + # Inspect a DefinedNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#743 + def visit_defined_node(node); end + + # Inspect a ElseNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#753 + def visit_else_node(node); end + + # Inspect a EmbeddedStatementsNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#766 + def visit_embedded_statements_node(node); end + + # Inspect a EmbeddedVariableNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#779 + def visit_embedded_variable_node(node); end + + # Inspect a EnsureNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#787 + def visit_ensure_node(node); end + + # Inspect a FalseNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#800 + def visit_false_node(node); end + + # Inspect a FindPatternNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#805 + def visit_find_pattern_node(node); end + + # Inspect a FlipFlopNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#831 + def visit_flip_flop_node(node); end + + # Inspect a FloatNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#851 + def visit_float_node(node); end + + # Inspect a ForNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#857 + def visit_for_node(node); end + + # Inspect a ForwardingArgumentsNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#876 + def visit_forwarding_arguments_node(node); end + + # Inspect a ForwardingParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#881 + def visit_forwarding_parameter_node(node); end + + # Inspect a ForwardingSuperNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#886 + def visit_forwarding_super_node(node); end + + # Inspect a GlobalVariableAndWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#897 + def visit_global_variable_and_write_node(node); end + + # Inspect a GlobalVariableOperatorWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#907 + def visit_global_variable_operator_write_node(node); end + + # Inspect a GlobalVariableOrWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#918 + def visit_global_variable_or_write_node(node); end + + # Inspect a GlobalVariableReadNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#928 + def visit_global_variable_read_node(node); end + + # Inspect a GlobalVariableTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#934 + def visit_global_variable_target_node(node); end + + # Inspect a GlobalVariableWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#940 + def visit_global_variable_write_node(node); end + + # Inspect a HashNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#950 + def visit_hash_node(node); end + + # Inspect a HashPatternNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#966 + def visit_hash_pattern_node(node); end + + # Inspect a IfNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#994 + def visit_if_node(node); end + + # Inspect a ImaginaryNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1016 + def visit_imaginary_node(node); end + + # Inspect a ImplicitNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1023 + def visit_implicit_node(node); end + + # Inspect a ImplicitRestNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1030 + def visit_implicit_rest_node(node); end + + # Inspect a InNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1035 + def visit_in_node(node); end + + # Inspect a IndexAndWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1050 + def visit_index_and_write_node(node); end + + # Inspect a IndexOperatorWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1081 + def visit_index_operator_write_node(node); end + + # Inspect a IndexOrWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1113 + def visit_index_or_write_node(node); end + + # Inspect a IndexTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1144 + def visit_index_target_node(node); end + + # Inspect a InstanceVariableAndWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1167 + def visit_instance_variable_and_write_node(node); end + + # Inspect a InstanceVariableOperatorWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1177 + def visit_instance_variable_operator_write_node(node); end + + # Inspect a InstanceVariableOrWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1188 + def visit_instance_variable_or_write_node(node); end + + # Inspect a InstanceVariableReadNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1198 + def visit_instance_variable_read_node(node); end + + # Inspect a InstanceVariableTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1204 + def visit_instance_variable_target_node(node); end + + # Inspect a InstanceVariableWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1210 + def visit_instance_variable_write_node(node); end + + # Inspect a IntegerNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1220 + def visit_integer_node(node); end + + # Inspect a InterpolatedMatchLastLineNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1228 + def visit_interpolated_match_last_line_node(node); end + + # Inspect a InterpolatedRegularExpressionNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1246 + def visit_interpolated_regular_expression_node(node); end + + # Inspect a InterpolatedStringNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1264 + def visit_interpolated_string_node(node); end + + # Inspect a InterpolatedSymbolNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1282 + def visit_interpolated_symbol_node(node); end + + # Inspect a InterpolatedXStringNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1298 + def visit_interpolated_x_string_node(node); end + + # Inspect a ItParametersNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1314 + def visit_it_parameters_node(node); end + + # Inspect a KeywordHashNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1319 + def visit_keyword_hash_node(node); end + + # Inspect a KeywordRestParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1335 + def visit_keyword_rest_parameter_node(node); end + + # Inspect a LambdaNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1349 + def visit_lambda_node(node); end + + # Inspect a LocalVariableAndWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1370 + def visit_local_variable_and_write_node(node); end + + # Inspect a LocalVariableOperatorWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1381 + def visit_local_variable_operator_write_node(node); end + + # Inspect a LocalVariableOrWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1393 + def visit_local_variable_or_write_node(node); end + + # Inspect a LocalVariableReadNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1404 + def visit_local_variable_read_node(node); end + + # Inspect a LocalVariableTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1411 + def visit_local_variable_target_node(node); end + + # Inspect a LocalVariableWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1418 + def visit_local_variable_write_node(node); end + + # Inspect a MatchLastLineNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1429 + def visit_match_last_line_node(node); end + + # Inspect a MatchPredicateNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1440 + def visit_match_predicate_node(node); end + + # Inspect a MatchRequiredNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1450 + def visit_match_required_node(node); end + + # Inspect a MatchWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1460 + def visit_match_write_node(node); end + + # Inspect a MissingNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1476 + def visit_missing_node(node); end + + # Inspect a ModuleNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1481 + def visit_module_node(node); end + + # Inspect a MultiTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1498 + def visit_multi_target_node(node); end + + # Inspect a MultiWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1529 + def visit_multi_write_node(node); end + + # Inspect a NextNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1563 + def visit_next_node(node); end + + # Inspect a NilNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1575 + def visit_nil_node(node); end + + # Inspect a NoKeywordsParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1580 + def visit_no_keywords_parameter_node(node); end + + # Inspect a NumberedParametersNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1587 + def visit_numbered_parameters_node(node); end + + # Inspect a NumberedReferenceReadNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1593 + def visit_numbered_reference_read_node(node); end + + # Inspect a OptionalKeywordParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1599 + def visit_optional_keyword_parameter_node(node); end + + # Inspect a OptionalParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1610 + def visit_optional_parameter_node(node); end + + # Inspect a OrNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1622 + def visit_or_node(node); end + + # Inspect a ParametersNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1632 + def visit_parameters_node(node); end + + # Inspect a ParenthesesNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1691 + def visit_parentheses_node(node); end + + # Inspect a PinnedExpressionNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1704 + def visit_pinned_expression_node(node); end + + # Inspect a PinnedVariableNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1714 + def visit_pinned_variable_node(node); end + + # Inspect a PostExecutionNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1722 + def visit_post_execution_node(node); end + + # Inspect a PreExecutionNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1736 + def visit_pre_execution_node(node); end + + # Inspect a ProgramNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1750 + def visit_program_node(node); end + + # Inspect a RangeNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1758 + def visit_range_node(node); end + + # Inspect a RationalNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1778 + def visit_rational_node(node); end + + # Inspect a RedoNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1785 + def visit_redo_node(node); end + + # Inspect a RegularExpressionNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1790 + def visit_regular_expression_node(node); end + + # Inspect a RequiredKeywordParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1801 + def visit_required_keyword_parameter_node(node); end + + # Inspect a RequiredParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1810 + def visit_required_parameter_node(node); end + + # Inspect a RescueModifierNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1818 + def visit_rescue_modifier_node(node); end + + # Inspect a RescueNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1828 + def visit_rescue_node(node); end + + # Inspect a RestParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1862 + def visit_rest_parameter_node(node); end + + # Inspect a RetryNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1876 + def visit_retry_node(node); end + + # Inspect a ReturnNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1881 + def visit_return_node(node); end + + # Inspect a SelfNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1895 + def visit_self_node(node); end + + # Inspect a ShareableConstantNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1900 + def visit_shareable_constant_node(node); end + + # Inspect a SingletonClassNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1909 + def visit_singleton_class_node(node); end + + # Inspect a SourceEncodingNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1926 + def visit_source_encoding_node(node); end + + # Inspect a SourceFileNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1931 + def visit_source_file_node(node); end + + # Inspect a SourceLineNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1939 + def visit_source_line_node(node); end + + # Inspect a SplatNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1944 + def visit_splat_node(node); end + + # Inspect a StatementsNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1956 + def visit_statements_node(node); end + + # Inspect a StringNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1970 + def visit_string_node(node); end + + # Inspect a SuperNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1981 + def visit_super_node(node); end + + # Inspect a SymbolNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2001 + def visit_symbol_node(node); end + + # Inspect a TrueNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2012 + def visit_true_node(node); end + + # Inspect a UndefNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2017 + def visit_undef_node(node); end + + # Inspect a UnlessNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2032 + def visit_unless_node(node); end + + # Inspect a UntilNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2054 + def visit_until_node(node); end + + # Inspect a WhenNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2071 + def visit_when_node(node); end + + # Inspect a WhileNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2093 + def visit_while_node(node); end + + # Inspect a XStringNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2110 + def visit_x_string_node(node); end + + # Inspect a YieldNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2121 + def visit_yield_node(node); end + + private + + # Compose a string representing the given inner location field. + # + # source://prism//lib/prism/inspect_visitor.rb#2148 + def inspect_location(location); end + + # Compose a header for the given node. + # + # source://prism//lib/prism/inspect_visitor.rb#2137 + def inspect_node(name, node); end + + class << self + # Compose an inspect string for the given node. + # + # source://prism//lib/prism/inspect_visitor.rb#41 + sig { params(node: Prism::Node).returns(String) } + def compose(node); end + end +end + +# Most of the time, we can simply pass down the indent to the next node. +# However, when we are inside a list we want some extra special formatting +# when we hit an element in that list. In this case, we have a special +# command that replaces the subsequent indent with the given value. +# +# source://prism//lib/prism/inspect_visitor.rb#17 +class Prism::InspectVisitor::Replace + # @return [Replace] a new instance of Replace + # + # source://prism//lib/prism/inspect_visitor.rb#20 + def initialize(value); end + + # source://prism//lib/prism/inspect_visitor.rb#18 + def value; end +end + # Represents the use of the `&&=` operator for assignment to an instance variable. # # @target &&= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#10570 +# source://prism//lib/prism/node.rb#9938 class Prism::InstanceVariableAndWriteNode < ::Prism::Node # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void # # @return [InstanceVariableAndWriteNode] a new instance of InstanceVariableAndWriteNode # - # source://prism//lib/prism/node.rb#10572 + # source://prism//lib/prism/node.rb#9940 sig do params( source: Prism::Source, @@ -17306,36 +18195,36 @@ class Prism::InstanceVariableAndWriteNode < ::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#10681 + # source://prism//lib/prism/node.rb#10043 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10583 + # source://prism//lib/prism/node.rb#9951 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10588 + # source://prism//lib/prism/node.rb#9956 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10598 + # source://prism//lib/prism/node.rb#9966 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10593 + # source://prism//lib/prism/node.rb#9961 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> InstanceVariableAndWriteNode # - # source://prism//lib/prism/node.rb#10603 + # source://prism//lib/prism/node.rb#9971 sig do params( name: Symbol, @@ -17350,13 +18239,13 @@ class Prism::InstanceVariableAndWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10588 + # source://prism//lib/prism/node.rb#9956 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#10611 + # source://prism//lib/prism/node.rb#9979 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -17366,33 +18255,33 @@ class Prism::InstanceVariableAndWriteNode < ::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#10641 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#10009 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#10616 + # source://prism//lib/prism/node.rb#9984 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#10619 + # source://prism//lib/prism/node.rb#9987 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#10636 + # source://prism//lib/prism/node.rb#10004 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#10626 + # source://prism//lib/prism/node.rb#9994 sig { returns(Prism::Location) } def operator_loc; end @@ -17411,13 +18300,13 @@ class Prism::InstanceVariableAndWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#10665 + # source://prism//lib/prism/node.rb#10027 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#10633 + # source://prism//lib/prism/node.rb#10001 sig { returns(Prism::Node) } def value; end @@ -17429,7 +18318,7 @@ class Prism::InstanceVariableAndWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#10675 + # source://prism//lib/prism/node.rb#10037 def type; end end end @@ -17439,13 +18328,13 @@ end # @target += value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#10694 +# source://prism//lib/prism/node.rb#10056 class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Symbol operator, Location location) -> void # # @return [InstanceVariableOperatorWriteNode] a new instance of InstanceVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#10696 + # source://prism//lib/prism/node.rb#10058 sig do params( source: Prism::Source, @@ -17462,36 +18351,36 @@ class Prism::InstanceVariableOperatorWriteNode < ::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#10805 + # source://prism//lib/prism/node.rb#10160 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10708 + # source://prism//lib/prism/node.rb#10070 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10713 + # source://prism//lib/prism/node.rb#10075 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10723 + # source://prism//lib/prism/node.rb#10085 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10718 + # source://prism//lib/prism/node.rb#10080 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?operator: Symbol, ?location: Location) -> InstanceVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#10728 + # source://prism//lib/prism/node.rb#10090 sig do params( name: Symbol, @@ -17507,13 +18396,13 @@ class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10713 + # source://prism//lib/prism/node.rb#10075 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, operator: Symbol, location: Location } # - # source://prism//lib/prism/node.rb#10736 + # source://prism//lib/prism/node.rb#10098 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -17523,33 +18412,33 @@ class Prism::InstanceVariableOperatorWriteNode < ::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#10764 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#10126 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#10741 + # source://prism//lib/prism/node.rb#10103 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#10744 + # source://prism//lib/prism/node.rb#10106 sig { returns(Prism::Location) } def name_loc; end # attr_reader operator: Symbol # - # source://prism//lib/prism/node.rb#10761 + # source://prism//lib/prism/node.rb#10123 sig { returns(Symbol) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#10751 + # source://prism//lib/prism/node.rb#10113 sig { returns(Prism::Location) } def operator_loc; end @@ -17568,13 +18457,13 @@ class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#10789 + # source://prism//lib/prism/node.rb#10144 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#10758 + # source://prism//lib/prism/node.rb#10120 sig { returns(Prism::Node) } def value; end @@ -17586,7 +18475,7 @@ class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#10799 + # source://prism//lib/prism/node.rb#10154 def type; end end end @@ -17596,13 +18485,13 @@ end # @target ||= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#10819 +# source://prism//lib/prism/node.rb#10174 class Prism::InstanceVariableOrWriteNode < ::Prism::Node # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void # # @return [InstanceVariableOrWriteNode] a new instance of InstanceVariableOrWriteNode # - # source://prism//lib/prism/node.rb#10821 + # source://prism//lib/prism/node.rb#10176 sig do params( source: Prism::Source, @@ -17618,36 +18507,36 @@ class Prism::InstanceVariableOrWriteNode < ::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#10930 + # source://prism//lib/prism/node.rb#10279 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10832 + # source://prism//lib/prism/node.rb#10187 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10837 + # source://prism//lib/prism/node.rb#10192 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10847 + # source://prism//lib/prism/node.rb#10202 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10842 + # source://prism//lib/prism/node.rb#10197 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> InstanceVariableOrWriteNode # - # source://prism//lib/prism/node.rb#10852 + # source://prism//lib/prism/node.rb#10207 sig do params( name: Symbol, @@ -17662,13 +18551,13 @@ class Prism::InstanceVariableOrWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10837 + # source://prism//lib/prism/node.rb#10192 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#10860 + # source://prism//lib/prism/node.rb#10215 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -17678,33 +18567,33 @@ class Prism::InstanceVariableOrWriteNode < ::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#10890 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#10245 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#10865 + # source://prism//lib/prism/node.rb#10220 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#10868 + # source://prism//lib/prism/node.rb#10223 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#10885 + # source://prism//lib/prism/node.rb#10240 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#10875 + # source://prism//lib/prism/node.rb#10230 sig { returns(Prism::Location) } def operator_loc; end @@ -17723,13 +18612,13 @@ class Prism::InstanceVariableOrWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#10914 + # source://prism//lib/prism/node.rb#10263 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#10882 + # source://prism//lib/prism/node.rb#10237 sig { returns(Prism::Node) } def value; end @@ -17741,7 +18630,7 @@ class Prism::InstanceVariableOrWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#10924 + # source://prism//lib/prism/node.rb#10273 def type; end end end @@ -17751,73 +18640,73 @@ end # @foo # ^^^^ # -# source://prism//lib/prism/node.rb#10943 +# source://prism//lib/prism/node.rb#10292 class Prism::InstanceVariableReadNode < ::Prism::Node # def initialize: (Symbol name, Location location) -> void # # @return [InstanceVariableReadNode] a new instance of InstanceVariableReadNode # - # source://prism//lib/prism/node.rb#10945 + # source://prism//lib/prism/node.rb#10294 sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } def initialize(source, name, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#11029 + # source://prism//lib/prism/node.rb#10376 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10953 + # source://prism//lib/prism/node.rb#10302 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10958 + # source://prism//lib/prism/node.rb#10307 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10968 + # source://prism//lib/prism/node.rb#10317 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10963 + # source://prism//lib/prism/node.rb#10312 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?location: Location) -> InstanceVariableReadNode # - # source://prism//lib/prism/node.rb#10973 + # source://prism//lib/prism/node.rb#10322 sig { params(name: Symbol, location: Prism::Location).returns(Prism::InstanceVariableReadNode) } def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10958 + # source://prism//lib/prism/node.rb#10307 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } # - # source://prism//lib/prism/node.rb#10981 + # source://prism//lib/prism/node.rb#10330 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#10342 + sig { override.returns(String) } + def inspect; end # The name of the instance variable, which is a `@` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). # @@ -17825,7 +18714,7 @@ class Prism::InstanceVariableReadNode < ::Prism::Node # # @_test # name `:@_test` # - # source://prism//lib/prism/node.rb#10990 + # source://prism//lib/prism/node.rb#10339 sig { returns(Symbol) } def name; end @@ -17844,7 +18733,7 @@ class Prism::InstanceVariableReadNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#11013 + # source://prism//lib/prism/node.rb#10360 sig { override.returns(Symbol) } def type; end @@ -17856,7 +18745,7 @@ class Prism::InstanceVariableReadNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#11023 + # source://prism//lib/prism/node.rb#10370 def type; end end end @@ -17866,77 +18755,77 @@ end # @foo, @bar = baz # ^^^^ ^^^^ # -# source://prism//lib/prism/node.rb#11039 +# source://prism//lib/prism/node.rb#10386 class Prism::InstanceVariableTargetNode < ::Prism::Node # def initialize: (Symbol name, Location location) -> void # # @return [InstanceVariableTargetNode] a new instance of InstanceVariableTargetNode # - # source://prism//lib/prism/node.rb#11041 + # source://prism//lib/prism/node.rb#10388 sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } def initialize(source, name, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#11121 + # source://prism//lib/prism/node.rb#10466 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11049 + # source://prism//lib/prism/node.rb#10396 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11054 + # source://prism//lib/prism/node.rb#10401 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11064 + # source://prism//lib/prism/node.rb#10411 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11059 + # source://prism//lib/prism/node.rb#10406 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?location: Location) -> InstanceVariableTargetNode # - # source://prism//lib/prism/node.rb#11069 + # source://prism//lib/prism/node.rb#10416 sig { params(name: Symbol, location: Prism::Location).returns(Prism::InstanceVariableTargetNode) } def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11054 + # source://prism//lib/prism/node.rb#10401 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } # - # source://prism//lib/prism/node.rb#11077 + # source://prism//lib/prism/node.rb#10424 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#10432 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#11082 + # source://prism//lib/prism/node.rb#10429 sig { returns(Symbol) } def name; end @@ -17955,7 +18844,7 @@ class Prism::InstanceVariableTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#11105 + # source://prism//lib/prism/node.rb#10450 sig { override.returns(Symbol) } def type; end @@ -17967,7 +18856,7 @@ class Prism::InstanceVariableTargetNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#11115 + # source://prism//lib/prism/node.rb#10460 def type; end end end @@ -17977,13 +18866,13 @@ end # @foo = 1 # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#11131 +# source://prism//lib/prism/node.rb#10476 class Prism::InstanceVariableWriteNode < ::Prism::Node # def initialize: (Symbol name, Location name_loc, Prism::node value, Location operator_loc, Location location) -> void # # @return [InstanceVariableWriteNode] a new instance of InstanceVariableWriteNode # - # source://prism//lib/prism/node.rb#11133 + # source://prism//lib/prism/node.rb#10478 sig do params( source: Prism::Source, @@ -17999,36 +18888,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#10597 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11144 + # source://prism//lib/prism/node.rb#10489 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11149 + # source://prism//lib/prism/node.rb#10494 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11159 + # source://prism//lib/prism/node.rb#10504 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11154 + # source://prism//lib/prism/node.rb#10499 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location, ?location: Location) -> InstanceVariableWriteNode # - # source://prism//lib/prism/node.rb#11164 + # source://prism//lib/prism/node.rb#10509 sig do params( name: Symbol, @@ -18043,24 +18932,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#10494 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#11172 + # source://prism//lib/prism/node.rb#10517 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#10563 + sig { override.returns(String) } + def inspect; end # The name of the instance variable, which is a `@` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). # @@ -18068,7 +18957,7 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # # @_foo = "bar" # name `@_foo` # - # source://prism//lib/prism/node.rb#11181 + # source://prism//lib/prism/node.rb#10526 sig { returns(Symbol) } def name; end @@ -18077,13 +18966,13 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # @_x = 1 # ^^^ # - # source://prism//lib/prism/node.rb#11187 + # source://prism//lib/prism/node.rb#10532 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#11213 + # source://prism//lib/prism/node.rb#10558 sig { returns(String) } def operator; end @@ -18092,7 +18981,7 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # @x = y # ^ # - # source://prism//lib/prism/node.rb#11206 + # source://prism//lib/prism/node.rb#10551 sig { returns(Prism::Location) } def operator_loc; end @@ -18111,7 +19000,7 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#11242 + # source://prism//lib/prism/node.rb#10581 sig { override.returns(Symbol) } def type; end @@ -18123,7 +19012,7 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # @_x = 1234 # ^^^^ # - # source://prism//lib/prism/node.rb#11200 + # source://prism//lib/prism/node.rb#10545 sig { returns(Prism::Node) } def value; end @@ -18135,34 +19024,34 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#11252 + # source://prism//lib/prism/node.rb#10591 def type; end end end # Flags for integer nodes that correspond to the base of the integer. # -# source://prism//lib/prism/node.rb#20373 +# source://prism//lib/prism/node.rb#19241 module Prism::IntegerBaseFlags; end # 0b prefix # -# source://prism//lib/prism/node.rb#20375 +# source://prism//lib/prism/node.rb#19243 Prism::IntegerBaseFlags::BINARY = T.let(T.unsafe(nil), Integer) # 0d or no prefix # -# source://prism//lib/prism/node.rb#20378 +# source://prism//lib/prism/node.rb#19246 Prism::IntegerBaseFlags::DECIMAL = T.let(T.unsafe(nil), Integer) # 0x prefix # -# source://prism//lib/prism/node.rb#20384 +# source://prism//lib/prism/node.rb#19252 Prism::IntegerBaseFlags::HEXADECIMAL = T.let(T.unsafe(nil), Integer) # 0o or 0 prefix # -# source://prism//lib/prism/node.rb#20381 +# source://prism//lib/prism/node.rb#19249 Prism::IntegerBaseFlags::OCTAL = T.let(T.unsafe(nil), Integer) # Represents an integer number literal. @@ -18170,25 +19059,25 @@ Prism::IntegerBaseFlags::OCTAL = T.let(T.unsafe(nil), Integer) # 1 # ^ # -# source://prism//lib/prism/node.rb#11271 +# source://prism//lib/prism/node.rb#10610 class Prism::IntegerNode < ::Prism::Node # def initialize: (Integer flags, Integer value, Location location) -> void # # @return [IntegerNode] a new instance of IntegerNode # - # source://prism//lib/prism/node.rb#11273 + # source://prism//lib/prism/node.rb#10612 sig { params(source: Prism::Source, flags: Integer, value: Integer, location: Prism::Location).void } def initialize(source, flags, value, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#11380 + # source://prism//lib/prism/node.rb#10715 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11282 + # source://prism//lib/prism/node.rb#10621 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -18196,31 +19085,31 @@ class Prism::IntegerNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11322 + # source://prism//lib/prism/node.rb#10661 sig { returns(T::Boolean) } def binary?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11287 + # source://prism//lib/prism/node.rb#10626 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11297 + # source://prism//lib/prism/node.rb#10636 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11292 + # source://prism//lib/prism/node.rb#10631 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?value: Integer, ?location: Location) -> IntegerNode # - # source://prism//lib/prism/node.rb#11302 + # source://prism//lib/prism/node.rb#10641 sig { params(flags: Integer, value: Integer, location: Prism::Location).returns(Prism::IntegerNode) } def copy(flags: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end @@ -18228,20 +19117,20 @@ class Prism::IntegerNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11327 + # source://prism//lib/prism/node.rb#10666 sig { returns(T::Boolean) } def decimal?; end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11287 + # source://prism//lib/prism/node.rb#10626 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, value: Integer, location: Location } # - # source://prism//lib/prism/node.rb#11310 + # source://prism//lib/prism/node.rb#10649 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -18252,21 +19141,21 @@ class Prism::IntegerNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11337 + # source://prism//lib/prism/node.rb#10676 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#10681 + 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#10671 sig { returns(T::Boolean) } def octal?; end @@ -18285,13 +19174,13 @@ class Prism::IntegerNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#11364 + # source://prism//lib/prism/node.rb#10699 sig { override.returns(Symbol) } def type; end # The value of the integer literal as a number. # - # source://prism//lib/prism/node.rb#11319 + # source://prism//lib/prism/node.rb#10658 sig { returns(Integer) } def value; end @@ -18299,7 +19188,7 @@ class Prism::IntegerNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#11315 + # source://prism//lib/prism/node.rb#10654 sig { returns(Integer) } def flags; end @@ -18311,7 +19200,7 @@ class Prism::IntegerNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#11374 + # source://prism//lib/prism/node.rb#10709 def type; end end end @@ -18321,7 +19210,7 @@ end # if /foo #{bar} baz/ then end # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11391 +# source://prism//lib/prism/node.rb#10726 class Prism::InterpolatedMatchLastLineNode < ::Prism::Node include ::Prism::RegularExpressionOptions @@ -18329,7 +19218,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#10728 sig do params( source: Prism::Source, @@ -18345,12 +19234,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#10897 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11404 + # source://prism//lib/prism/node.rb#10739 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -18358,43 +19247,43 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11488 + # source://prism//lib/prism/node.rb#10823 sig { returns(T::Boolean) } def ascii_8bit?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11414 + # source://prism//lib/prism/node.rb#10749 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#11523 + # source://prism//lib/prism/node.rb#10858 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#11456 + # source://prism//lib/prism/node.rb#10791 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11424 + # source://prism//lib/prism/node.rb#10759 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11419 + # source://prism//lib/prism/node.rb#10754 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location, ?location: Location) -> InterpolatedMatchLastLineNode # - # source://prism//lib/prism/node.rb#11429 + # source://prism//lib/prism/node.rb#10764 sig do params( flags: Integer, @@ -18409,13 +19298,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#10749 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#11437 + # source://prism//lib/prism/node.rb#10772 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -18423,7 +19312,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11483 + # source://prism//lib/prism/node.rb#10818 sig { returns(T::Boolean) } def euc_jp?; end @@ -18431,7 +19320,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11468 + # source://prism//lib/prism/node.rb#10803 sig { returns(T::Boolean) } def extended?; end @@ -18442,7 +19331,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11508 + # source://prism//lib/prism/node.rb#10843 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -18450,7 +19339,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11513 + # source://prism//lib/prism/node.rb#10848 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end @@ -18458,7 +19347,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11503 + # source://prism//lib/prism/node.rb#10838 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -18466,21 +19355,21 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11463 + # source://prism//lib/prism/node.rb#10798 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#10863 + 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#10808 sig { returns(T::Boolean) } def multi_line?; end @@ -18488,19 +19377,19 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11478 + # source://prism//lib/prism/node.rb#10813 sig { returns(T::Boolean) } def once?; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#11518 + # source://prism//lib/prism/node.rb#10853 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#11446 + # source://prism//lib/prism/node.rb#10781 sig { returns(Prism::Location) } def opening_loc; end @@ -18509,11 +19398,11 @@ 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#10788 sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } def parts; end - # source://prism//lib/prism/node.rb#11408 + # source://prism//lib/prism/node.rb#10743 def set_newline_flag(newline_marked); end # Sometimes you want to check an instance of a node against a list of @@ -18531,7 +19420,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#11552 + # source://prism//lib/prism/node.rb#10881 sig { override.returns(Symbol) } def type; end @@ -18539,7 +19428,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11498 + # source://prism//lib/prism/node.rb#10833 sig { returns(T::Boolean) } def utf_8?; end @@ -18547,7 +19436,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11493 + # source://prism//lib/prism/node.rb#10828 sig { returns(T::Boolean) } def windows_31j?; end @@ -18555,7 +19444,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#11442 + # source://prism//lib/prism/node.rb#10777 sig { returns(Integer) } def flags; end @@ -18567,7 +19456,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#11562 + # source://prism//lib/prism/node.rb#10891 def type; end end end @@ -18577,7 +19466,7 @@ end # /foo #{bar} baz/ # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11582 +# source://prism//lib/prism/node.rb#10911 class Prism::InterpolatedRegularExpressionNode < ::Prism::Node include ::Prism::RegularExpressionOptions @@ -18585,7 +19474,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#10913 sig do params( source: Prism::Source, @@ -18601,12 +19490,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#11082 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11595 + # source://prism//lib/prism/node.rb#10924 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -18614,43 +19503,43 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11679 + # source://prism//lib/prism/node.rb#11008 sig { returns(T::Boolean) } def ascii_8bit?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11605 + # source://prism//lib/prism/node.rb#10934 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#11714 + # source://prism//lib/prism/node.rb#11043 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#11647 + # source://prism//lib/prism/node.rb#10976 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11615 + # source://prism//lib/prism/node.rb#10944 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11610 + # source://prism//lib/prism/node.rb#10939 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location, ?location: Location) -> InterpolatedRegularExpressionNode # - # source://prism//lib/prism/node.rb#11620 + # source://prism//lib/prism/node.rb#10949 sig do params( flags: Integer, @@ -18665,13 +19554,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#10934 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#11628 + # source://prism//lib/prism/node.rb#10957 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -18679,7 +19568,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11674 + # source://prism//lib/prism/node.rb#11003 sig { returns(T::Boolean) } def euc_jp?; end @@ -18687,7 +19576,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11659 + # source://prism//lib/prism/node.rb#10988 sig { returns(T::Boolean) } def extended?; end @@ -18698,7 +19587,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11699 + # source://prism//lib/prism/node.rb#11028 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -18706,7 +19595,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11704 + # source://prism//lib/prism/node.rb#11033 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end @@ -18714,7 +19603,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11694 + # source://prism//lib/prism/node.rb#11023 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -18722,21 +19611,21 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11654 + # source://prism//lib/prism/node.rb#10983 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#11048 + 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#10993 sig { returns(T::Boolean) } def multi_line?; end @@ -18744,19 +19633,19 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11669 + # source://prism//lib/prism/node.rb#10998 sig { returns(T::Boolean) } def once?; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#11709 + # source://prism//lib/prism/node.rb#11038 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#11637 + # source://prism//lib/prism/node.rb#10966 sig { returns(Prism::Location) } def opening_loc; end @@ -18765,11 +19654,11 @@ 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#10973 sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } def parts; end - # source://prism//lib/prism/node.rb#11599 + # source://prism//lib/prism/node.rb#10928 def set_newline_flag(newline_marked); end # Sometimes you want to check an instance of a node against a list of @@ -18787,7 +19676,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#11743 + # source://prism//lib/prism/node.rb#11066 sig { override.returns(Symbol) } def type; end @@ -18795,7 +19684,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11689 + # source://prism//lib/prism/node.rb#11018 sig { returns(T::Boolean) } def utf_8?; end @@ -18803,7 +19692,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11684 + # source://prism//lib/prism/node.rb#11013 sig { returns(T::Boolean) } def windows_31j?; end @@ -18811,7 +19700,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#11633 + # source://prism//lib/prism/node.rb#10962 sig { returns(Integer) } def flags; end @@ -18823,7 +19712,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#11753 + # source://prism//lib/prism/node.rb#11076 def type; end end end @@ -18833,7 +19722,7 @@ end # "foo #{bar} baz" # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11773 +# source://prism//lib/prism/node.rb#11096 class Prism::InterpolatedStringNode < ::Prism::Node include ::Prism::HeredocQuery @@ -18841,7 +19730,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#11098 sig do params( source: Prism::Source, @@ -18857,48 +19746,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#11234 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11786 + # source://prism//lib/prism/node.rb#11109 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11796 + # source://prism//lib/prism/node.rb#11119 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#11872 + # source://prism//lib/prism/node.rb#11195 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#11844 + # source://prism//lib/prism/node.rb#11167 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11806 + # source://prism//lib/prism/node.rb#11129 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11801 + # source://prism//lib/prism/node.rb#11124 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?opening_loc: Location?, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode], ?closing_loc: Location?, ?location: Location) -> InterpolatedStringNode # - # source://prism//lib/prism/node.rb#11811 + # source://prism//lib/prism/node.rb#11134 sig do params( flags: Integer, @@ -18913,13 +19802,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#11119 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location?, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode], closing_loc: Location?, location: Location } # - # source://prism//lib/prism/node.rb#11819 + # source://prism//lib/prism/node.rb#11142 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -18930,48 +19819,48 @@ class Prism::InterpolatedStringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11857 + # source://prism//lib/prism/node.rb#11180 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#11200 + 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#11185 sig { returns(T::Boolean) } def mutable?; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#11867 + # source://prism//lib/prism/node.rb#11190 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#11828 + # source://prism//lib/prism/node.rb#11151 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode] # - # source://prism//lib/prism/node.rb#11841 + # source://prism//lib/prism/node.rb#11164 sig do returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode, Prism::InterpolatedStringNode)]) end def parts; end - # source://prism//lib/prism/node.rb#11790 + # source://prism//lib/prism/node.rb#11113 def set_newline_flag(newline_marked); end # Sometimes you want to check an instance of a node against a list of @@ -18989,7 +19878,7 @@ class Prism::InterpolatedStringNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#11901 + # source://prism//lib/prism/node.rb#11218 sig { override.returns(Symbol) } def type; end @@ -18997,7 +19886,7 @@ class Prism::InterpolatedStringNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#11824 + # source://prism//lib/prism/node.rb#11147 sig { returns(Integer) } def flags; end @@ -19009,20 +19898,20 @@ class Prism::InterpolatedStringNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#11911 + # source://prism//lib/prism/node.rb#11228 def type; end end end # Flags for interpolated string nodes that indicated mutability if they are also marked as literals. # -# source://prism//lib/prism/node.rb#20388 +# source://prism//lib/prism/node.rb#19256 module Prism::InterpolatedStringNodeFlags; end -# source://prism//lib/prism/node.rb#20390 +# source://prism//lib/prism/node.rb#19258 Prism::InterpolatedStringNodeFlags::FROZEN = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/node.rb#20393 +# source://prism//lib/prism/node.rb#19261 Prism::InterpolatedStringNodeFlags::MUTABLE = T.let(T.unsafe(nil), Integer) # Represents a symbol literal that contains interpolation. @@ -19030,13 +19919,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#11248 class Prism::InterpolatedSymbolNode < ::Prism::Node # def initialize: (Location? opening_loc, Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] parts, Location? closing_loc, Location location) -> void # # @return [InterpolatedSymbolNode] a new instance of InterpolatedSymbolNode # - # source://prism//lib/prism/node.rb#11933 + # source://prism//lib/prism/node.rb#11250 sig do params( source: Prism::Source, @@ -19051,48 +19940,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#11371 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11943 + # source://prism//lib/prism/node.rb#11260 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11953 + # source://prism//lib/prism/node.rb#11270 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#12015 + # source://prism//lib/prism/node.rb#11332 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#11997 + # source://prism//lib/prism/node.rb#11314 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11963 + # source://prism//lib/prism/node.rb#11280 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11958 + # source://prism//lib/prism/node.rb#11275 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?opening_loc: Location?, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location?, ?location: Location) -> InterpolatedSymbolNode # - # source://prism//lib/prism/node.rb#11968 + # source://prism//lib/prism/node.rb#11285 sig do params( opening_loc: T.nilable(Prism::Location), @@ -19106,44 +19995,44 @@ 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#11270 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location?, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location?, location: Location } # - # source://prism//lib/prism/node.rb#11976 + # source://prism//lib/prism/node.rb#11293 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#11337 + sig { override.returns(String) } + def inspect; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#12010 + # source://prism//lib/prism/node.rb#11327 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#11981 + # source://prism//lib/prism/node.rb#11298 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] # - # source://prism//lib/prism/node.rb#11994 + # source://prism//lib/prism/node.rb#11311 sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } def parts; end - # source://prism//lib/prism/node.rb#11947 + # source://prism//lib/prism/node.rb#11264 def set_newline_flag(newline_marked); end # Sometimes you want to check an instance of a node against a list of @@ -19161,7 +20050,7 @@ class Prism::InterpolatedSymbolNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#12042 + # source://prism//lib/prism/node.rb#11355 sig { override.returns(Symbol) } def type; end @@ -19173,7 +20062,7 @@ class Prism::InterpolatedSymbolNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#12052 + # source://prism//lib/prism/node.rb#11365 def type; end end end @@ -19183,7 +20072,7 @@ end # `foo #{bar} baz` # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#12071 +# source://prism//lib/prism/node.rb#11384 class Prism::InterpolatedXStringNode < ::Prism::Node include ::Prism::HeredocQuery @@ -19191,7 +20080,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#11386 sig do params( source: Prism::Source, @@ -19206,48 +20095,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#11495 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12083 + # source://prism//lib/prism/node.rb#11396 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12093 + # source://prism//lib/prism/node.rb#11406 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#12143 + # source://prism//lib/prism/node.rb#11456 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#12131 + # source://prism//lib/prism/node.rb#11444 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12103 + # source://prism//lib/prism/node.rb#11416 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12098 + # source://prism//lib/prism/node.rb#11411 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location, ?location: Location) -> InterpolatedXStringNode # - # source://prism//lib/prism/node.rb#12108 + # source://prism//lib/prism/node.rb#11421 sig do params( opening_loc: Prism::Location, @@ -19261,13 +20150,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#11406 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#12116 + # source://prism//lib/prism/node.rb#11429 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -19277,31 +20166,31 @@ 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#11461 + sig { override.returns(String) } + def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#12138 + # source://prism//lib/prism/node.rb#11451 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#12121 + # source://prism//lib/prism/node.rb#11434 sig { returns(Prism::Location) } def opening_loc; end # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] # - # source://prism//lib/prism/node.rb#12128 + # source://prism//lib/prism/node.rb#11441 sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } def parts; end - # source://prism//lib/prism/node.rb#12087 + # source://prism//lib/prism/node.rb#11400 def set_newline_flag(newline_marked); end # Sometimes you want to check an instance of a node against a list of @@ -19319,7 +20208,7 @@ class Prism::InterpolatedXStringNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#12170 + # source://prism//lib/prism/node.rb#11479 sig { override.returns(Symbol) } def type; end @@ -19331,7 +20220,7 @@ class Prism::InterpolatedXStringNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#12180 + # source://prism//lib/prism/node.rb#11489 def type; end end end @@ -19341,73 +20230,73 @@ end # -> { it + it } # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#12199 +# source://prism//lib/prism/node.rb#11508 class Prism::ItParametersNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [ItParametersNode] a new instance of ItParametersNode # - # source://prism//lib/prism/node.rb#12201 + # source://prism//lib/prism/node.rb#11510 sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#12276 + # source://prism//lib/prism/node.rb#11584 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12208 + # source://prism//lib/prism/node.rb#11517 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12213 + # source://prism//lib/prism/node.rb#11522 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12223 + # source://prism//lib/prism/node.rb#11532 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12218 + # source://prism//lib/prism/node.rb#11527 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?location: Location) -> ItParametersNode # - # source://prism//lib/prism/node.rb#12228 + # source://prism//lib/prism/node.rb#11537 sig { params(location: Prism::Location).returns(Prism::ItParametersNode) } def copy(location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12213 + # source://prism//lib/prism/node.rb#11522 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } # - # source://prism//lib/prism/node.rb#12236 + # source://prism//lib/prism/node.rb#11545 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#11550 + sig { override.returns(String) } + def inspect; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by @@ -19424,7 +20313,7 @@ class Prism::ItParametersNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#12260 + # source://prism//lib/prism/node.rb#11568 sig { override.returns(Symbol) } def type; end @@ -19436,7 +20325,7 @@ class Prism::ItParametersNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#12270 + # source://prism//lib/prism/node.rb#11578 def type; end end end @@ -19446,13 +20335,13 @@ end # foo(a: b) # ^^^^ # -# source://prism//lib/prism/node.rb#12285 +# source://prism//lib/prism/node.rb#11593 class Prism::KeywordHashNode < ::Prism::Node # def initialize: (Integer flags, Array[AssocNode | AssocSplatNode] elements, Location location) -> void # # @return [KeywordHashNode] a new instance of KeywordHashNode # - # source://prism//lib/prism/node.rb#12287 + # source://prism//lib/prism/node.rb#11595 sig do params( source: Prism::Source, @@ -19466,36 +20355,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#11683 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12296 + # source://prism//lib/prism/node.rb#11604 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12301 + # source://prism//lib/prism/node.rb#11609 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12311 + # source://prism//lib/prism/node.rb#11619 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12306 + # source://prism//lib/prism/node.rb#11614 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?elements: Array[AssocNode | AssocSplatNode], ?location: Location) -> KeywordHashNode # - # source://prism//lib/prism/node.rb#12316 + # source://prism//lib/prism/node.rb#11624 sig do params( flags: Integer, @@ -19508,36 +20397,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#11609 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, elements: Array[AssocNode | AssocSplatNode], location: Location } # - # source://prism//lib/prism/node.rb#12324 + # source://prism//lib/prism/node.rb#11632 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader elements: Array[AssocNode | AssocSplatNode] # - # source://prism//lib/prism/node.rb#12333 + # source://prism//lib/prism/node.rb#11641 sig { returns(T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)]) } def elements; end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#11649 + 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#11644 sig { returns(T::Boolean) } def symbol_keys?; end @@ -19556,7 +20445,7 @@ class Prism::KeywordHashNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#12363 + # source://prism//lib/prism/node.rb#11667 sig { override.returns(Symbol) } def type; end @@ -19564,7 +20453,7 @@ class Prism::KeywordHashNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#12329 + # source://prism//lib/prism/node.rb#11637 sig { returns(Integer) } def flags; end @@ -19576,19 +20465,19 @@ class Prism::KeywordHashNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#12373 + # source://prism//lib/prism/node.rb#11677 def type; end end end # Flags for keyword hash nodes. # -# source://prism//lib/prism/node.rb#20397 +# source://prism//lib/prism/node.rb#19265 module Prism::KeywordHashNodeFlags; end # a keyword hash which only has `AssocNode` elements all with symbol keys, which means the elements can be treated as keyword arguments # -# source://prism//lib/prism/node.rb#20399 +# source://prism//lib/prism/node.rb#19267 Prism::KeywordHashNodeFlags::SYMBOL_KEYS = T.let(T.unsafe(nil), Integer) # Represents a keyword rest parameter to a method, block, or lambda definition. @@ -19597,13 +20486,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#11696 class Prism::KeywordRestParameterNode < ::Prism::Node # def initialize: (Integer flags, Symbol? name, Location? name_loc, Location operator_loc, Location location) -> void # # @return [KeywordRestParameterNode] a new instance of KeywordRestParameterNode # - # source://prism//lib/prism/node.rb#12394 + # source://prism//lib/prism/node.rb#11698 sig do params( source: Prism::Source, @@ -19619,36 +20508,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#11813 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12405 + # source://prism//lib/prism/node.rb#11709 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12410 + # source://prism//lib/prism/node.rb#11714 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12420 + # source://prism//lib/prism/node.rb#11724 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12415 + # source://prism//lib/prism/node.rb#11719 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location, ?location: Location) -> KeywordRestParameterNode # - # source://prism//lib/prism/node.rb#12425 + # source://prism//lib/prism/node.rb#11729 sig do params( flags: Integer, @@ -19663,46 +20552,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#11714 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#12433 + # source://prism//lib/prism/node.rb#11737 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#11779 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol? # - # source://prism//lib/prism/node.rb#12442 + # source://prism//lib/prism/node.rb#11746 sig { returns(T.nilable(Symbol)) } def name; end # attr_reader name_loc: Location? # - # source://prism//lib/prism/node.rb#12445 + # source://prism//lib/prism/node.rb#11749 sig { returns(T.nilable(Prism::Location)) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#12470 + # source://prism//lib/prism/node.rb#11774 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#12458 + # source://prism//lib/prism/node.rb#11762 sig { returns(Prism::Location) } def operator_loc; end @@ -19710,7 +20599,7 @@ class Prism::KeywordRestParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12465 + # source://prism//lib/prism/node.rb#11769 sig { returns(T::Boolean) } def repeated_parameter?; end @@ -19729,7 +20618,7 @@ class Prism::KeywordRestParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#12503 + # source://prism//lib/prism/node.rb#11797 sig { override.returns(Symbol) } def type; end @@ -19737,7 +20626,7 @@ class Prism::KeywordRestParameterNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#12438 + # source://prism//lib/prism/node.rb#11742 sig { returns(Integer) } def flags; end @@ -19749,7 +20638,7 @@ class Prism::KeywordRestParameterNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#12513 + # source://prism//lib/prism/node.rb#11807 def type; end end end @@ -19759,13 +20648,13 @@ end # ->(value) { value * 2 } # ^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#12532 +# source://prism//lib/prism/node.rb#11826 class Prism::LambdaNode < ::Prism::Node # def initialize: (Array[Symbol] locals, Location operator_loc, Location opening_loc, Location closing_loc, Prism::node? parameters, Prism::node? body, Location location) -> void # # @return [LambdaNode] a new instance of LambdaNode # - # source://prism//lib/prism/node.rb#12534 + # source://prism//lib/prism/node.rb#11828 sig do params( source: Prism::Source, @@ -19783,54 +20672,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#11956 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12547 + # source://prism//lib/prism/node.rb#11841 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: Prism::node? # - # source://prism//lib/prism/node.rb#12610 + # source://prism//lib/prism/node.rb#11904 sig { returns(T.nilable(Prism::Node)) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12552 + # source://prism//lib/prism/node.rb#11846 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#12623 + # source://prism//lib/prism/node.rb#11917 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#12600 + # source://prism//lib/prism/node.rb#11894 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12565 + # source://prism//lib/prism/node.rb#11859 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12557 + # source://prism//lib/prism/node.rb#11851 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?locals: Array[Symbol], ?operator_loc: Location, ?opening_loc: Location, ?closing_loc: Location, ?parameters: Prism::node?, ?body: Prism::node?, ?location: Location) -> LambdaNode # - # source://prism//lib/prism/node.rb#12570 + # source://prism//lib/prism/node.rb#11864 sig do params( locals: T::Array[Symbol], @@ -19847,58 +20736,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#11846 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], operator_loc: Location, opening_loc: Location, closing_loc: Location, parameters: Prism::node?, body: Prism::node?, location: Location } # - # source://prism//lib/prism/node.rb#12578 + # source://prism//lib/prism/node.rb#11872 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#11922 + 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#11877 sig { returns(T::Array[Symbol]) } def locals; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#12618 + # source://prism//lib/prism/node.rb#11912 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#12593 + # source://prism//lib/prism/node.rb#11887 sig { returns(Prism::Location) } def opening_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#12613 + # source://prism//lib/prism/node.rb#11907 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#12586 + # source://prism//lib/prism/node.rb#11880 sig { returns(Prism::Location) } def operator_loc; end # attr_reader parameters: Prism::node? # - # source://prism//lib/prism/node.rb#12607 + # source://prism//lib/prism/node.rb#11901 sig { returns(T.nilable(Prism::Node)) } def parameters; end @@ -19917,7 +20806,7 @@ class Prism::LambdaNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#12663 + # source://prism//lib/prism/node.rb#11940 sig { override.returns(Symbol) } def type; end @@ -19929,7 +20818,7 @@ class Prism::LambdaNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#12673 + # source://prism//lib/prism/node.rb#11950 def type; end end end @@ -20185,13 +21074,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#593 class Prism::LexResult < ::Prism::Result # Create a new lex result object with the given values. # # @return [LexResult] a new instance of LexResult # - # source://prism//lib/prism/parse_result.rb#520 + # source://prism//lib/prism/parse_result.rb#598 sig do params( value: T::Array[T.untyped], @@ -20207,13 +21096,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#604 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # The list of tokens that were parsed from the source code. # - # source://prism//lib/prism/parse_result.rb#517 + # source://prism//lib/prism/parse_result.rb#595 sig { returns(T::Array[T.untyped]) } def value; end end @@ -20245,13 +21134,13 @@ end # target &&= value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#12695 +# source://prism//lib/prism/node.rb#11972 class Prism::LocalVariableAndWriteNode < ::Prism::Node # def initialize: (Location name_loc, Location operator_loc, Prism::node value, Symbol name, Integer depth, Location location) -> void # # @return [LocalVariableAndWriteNode] a new instance of LocalVariableAndWriteNode # - # source://prism//lib/prism/node.rb#12697 + # source://prism//lib/prism/node.rb#11974 sig do params( source: Prism::Source, @@ -20268,36 +21157,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#12081 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12709 + # source://prism//lib/prism/node.rb#11986 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12714 + # source://prism//lib/prism/node.rb#11991 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12724 + # source://prism//lib/prism/node.rb#12001 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12719 + # source://prism//lib/prism/node.rb#11996 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?depth: Integer, ?location: Location) -> LocalVariableAndWriteNode # - # source://prism//lib/prism/node.rb#12729 + # source://prism//lib/prism/node.rb#12006 sig do params( name_loc: Prism::Location, @@ -20313,19 +21202,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#11991 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name_loc: Location, operator_loc: Location, value: Prism::node, name: Symbol, depth: Integer, location: Location } # - # source://prism//lib/prism/node.rb#12737 + # source://prism//lib/prism/node.rb#12014 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader depth: Integer # - # source://prism//lib/prism/node.rb#12762 + # source://prism//lib/prism/node.rb#12039 sig { returns(Integer) } def depth; end @@ -20335,33 +21224,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#12047 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#12759 + # source://prism//lib/prism/node.rb#12036 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#12742 + # source://prism//lib/prism/node.rb#12019 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#12765 + # source://prism//lib/prism/node.rb#12042 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#12749 + # source://prism//lib/prism/node.rb#12026 sig { returns(Prism::Location) } def operator_loc; end @@ -20380,13 +21269,13 @@ class Prism::LocalVariableAndWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#12795 + # source://prism//lib/prism/node.rb#12065 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#12756 + # source://prism//lib/prism/node.rb#12033 sig { returns(Prism::Node) } def value; end @@ -20398,7 +21287,7 @@ class Prism::LocalVariableAndWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#12805 + # source://prism//lib/prism/node.rb#12075 def type; end end end @@ -20408,13 +21297,13 @@ end # target += value # ^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#12825 +# source://prism//lib/prism/node.rb#12095 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 # # @return [LocalVariableOperatorWriteNode] a new instance of LocalVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#12827 + # source://prism//lib/prism/node.rb#12097 sig do params( source: Prism::Source, @@ -20432,36 +21321,36 @@ class Prism::LocalVariableOperatorWriteNode < ::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#12941 + # source://prism//lib/prism/node.rb#12203 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12840 + # source://prism//lib/prism/node.rb#12110 sig { 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#12115 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12855 + # source://prism//lib/prism/node.rb#12125 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12850 + # source://prism//lib/prism/node.rb#12120 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 + # source://prism//lib/prism/node.rb#12130 sig do params( name_loc: Prism::Location, @@ -20478,19 +21367,19 @@ class Prism::LocalVariableOperatorWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12845 + # source://prism//lib/prism/node.rb#12115 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name_loc: Location, operator_loc: Location, value: Prism::node, name: Symbol, operator: Symbol, depth: Integer, location: Location } # - # source://prism//lib/prism/node.rb#12868 + # source://prism//lib/prism/node.rb#12138 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader depth: Integer # - # source://prism//lib/prism/node.rb#12896 + # source://prism//lib/prism/node.rb#12166 sig { returns(Integer) } def depth; end @@ -20500,33 +21389,33 @@ class Prism::LocalVariableOperatorWriteNode < ::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#12899 - sig { params(inspector: T.untyped).returns(String) } - def inspect(inspector = T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#12169 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#12890 + # source://prism//lib/prism/node.rb#12160 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#12873 + # source://prism//lib/prism/node.rb#12143 sig { returns(Prism::Location) } def name_loc; end # attr_reader operator: Symbol # - # source://prism//lib/prism/node.rb#12893 + # source://prism//lib/prism/node.rb#12163 sig { returns(Symbol) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#12880 + # source://prism//lib/prism/node.rb#12150 sig { returns(Prism::Location) } def operator_loc; end @@ -20545,13 +21434,13 @@ class Prism::LocalVariableOperatorWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#12925 + # source://prism//lib/prism/node.rb#12187 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#12887 + # source://prism//lib/prism/node.rb#12157 sig { returns(Prism::Node) } def value; end @@ -20563,7 +21452,7 @@ class Prism::LocalVariableOperatorWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#12935 + # source://prism//lib/prism/node.rb#12197 def type; end end end @@ -20573,13 +21462,13 @@ end # target ||= value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#12956 +# source://prism//lib/prism/node.rb#12218 class Prism::LocalVariableOrWriteNode < ::Prism::Node # def initialize: (Location name_loc, Location operator_loc, Prism::node value, Symbol name, Integer depth, Location location) -> void # # @return [LocalVariableOrWriteNode] a new instance of LocalVariableOrWriteNode # - # source://prism//lib/prism/node.rb#12958 + # source://prism//lib/prism/node.rb#12220 sig do params( source: Prism::Source, @@ -20596,36 +21485,36 @@ class Prism::LocalVariableOrWriteNode < ::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#13072 + # source://prism//lib/prism/node.rb#12327 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12970 + # source://prism//lib/prism/node.rb#12232 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12975 + # source://prism//lib/prism/node.rb#12237 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12985 + # source://prism//lib/prism/node.rb#12247 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12980 + # source://prism//lib/prism/node.rb#12242 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?depth: Integer, ?location: Location) -> LocalVariableOrWriteNode # - # source://prism//lib/prism/node.rb#12990 + # source://prism//lib/prism/node.rb#12252 sig do params( name_loc: Prism::Location, @@ -20641,19 +21530,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#12237 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name_loc: Location, operator_loc: Location, value: Prism::node, name: Symbol, depth: Integer, location: Location } # - # source://prism//lib/prism/node.rb#12998 + # source://prism//lib/prism/node.rb#12260 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader depth: Integer # - # source://prism//lib/prism/node.rb#13023 + # source://prism//lib/prism/node.rb#12285 sig { returns(Integer) } def depth; end @@ -20663,33 +21552,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#12293 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#13020 + # source://prism//lib/prism/node.rb#12282 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#13003 + # source://prism//lib/prism/node.rb#12265 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#13026 + # source://prism//lib/prism/node.rb#12288 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#13010 + # source://prism//lib/prism/node.rb#12272 sig { returns(Prism::Location) } def operator_loc; end @@ -20708,13 +21597,13 @@ class Prism::LocalVariableOrWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#13056 + # source://prism//lib/prism/node.rb#12311 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#13017 + # source://prism//lib/prism/node.rb#12279 sig { returns(Prism::Node) } def value; end @@ -20726,7 +21615,7 @@ class Prism::LocalVariableOrWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#13066 + # source://prism//lib/prism/node.rb#12321 def type; end end end @@ -20736,62 +21625,62 @@ end # foo # ^^^ # -# source://prism//lib/prism/node.rb#13086 +# source://prism//lib/prism/node.rb#12341 class Prism::LocalVariableReadNode < ::Prism::Node # def initialize: (Symbol name, Integer depth, Location location) -> void # # @return [LocalVariableReadNode] a new instance of LocalVariableReadNode # - # source://prism//lib/prism/node.rb#13088 + # source://prism//lib/prism/node.rb#12343 sig { params(source: Prism::Source, name: Symbol, depth: Integer, location: Prism::Location).void } def initialize(source, name, depth, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#13191 + # source://prism//lib/prism/node.rb#12443 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13097 + # source://prism//lib/prism/node.rb#12352 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13102 + # source://prism//lib/prism/node.rb#12357 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13112 + # source://prism//lib/prism/node.rb#12367 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13107 + # source://prism//lib/prism/node.rb#12362 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?depth: Integer, ?location: Location) -> LocalVariableReadNode # - # source://prism//lib/prism/node.rb#13117 + # source://prism//lib/prism/node.rb#12372 sig { params(name: Symbol, depth: Integer, location: Prism::Location).returns(Prism::LocalVariableReadNode) } def copy(name: T.unsafe(nil), depth: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13102 + # source://prism//lib/prism/node.rb#12357 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, depth: Integer, location: Location } # - # source://prism//lib/prism/node.rb#13125 + # source://prism//lib/prism/node.rb#12380 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -20803,18 +21692,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#12406 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#12409 + sig { override.returns(String) } + def inspect; end # The name of the local variable, which is an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). # @@ -20830,7 +21719,7 @@ class Prism::LocalVariableReadNode < ::Prism::Node # # it # name `:0it` # - # source://prism//lib/prism/node.rb#13142 + # source://prism//lib/prism/node.rb#12397 sig { returns(Symbol) } def name; end @@ -20849,7 +21738,7 @@ class Prism::LocalVariableReadNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#13175 + # source://prism//lib/prism/node.rb#12427 sig { override.returns(Symbol) } def type; end @@ -20861,7 +21750,7 @@ class Prism::LocalVariableReadNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#13185 + # source://prism//lib/prism/node.rb#12437 def type; end end end @@ -20871,83 +21760,83 @@ end # foo, bar = baz # ^^^ ^^^ # -# source://prism//lib/prism/node.rb#13202 +# source://prism//lib/prism/node.rb#12454 class Prism::LocalVariableTargetNode < ::Prism::Node # def initialize: (Symbol name, Integer depth, Location location) -> void # # @return [LocalVariableTargetNode] a new instance of LocalVariableTargetNode # - # source://prism//lib/prism/node.rb#13204 + # source://prism//lib/prism/node.rb#12456 sig { params(source: Prism::Source, name: Symbol, depth: Integer, location: Prism::Location).void } def initialize(source, name, depth, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#13289 + # source://prism//lib/prism/node.rb#12538 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13213 + # source://prism//lib/prism/node.rb#12465 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13218 + # source://prism//lib/prism/node.rb#12470 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13228 + # source://prism//lib/prism/node.rb#12480 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13223 + # source://prism//lib/prism/node.rb#12475 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?depth: Integer, ?location: Location) -> LocalVariableTargetNode # - # source://prism//lib/prism/node.rb#13233 + # source://prism//lib/prism/node.rb#12485 sig { params(name: Symbol, depth: Integer, location: Prism::Location).returns(Prism::LocalVariableTargetNode) } def copy(name: T.unsafe(nil), depth: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13218 + # source://prism//lib/prism/node.rb#12470 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, depth: Integer, location: Location } # - # source://prism//lib/prism/node.rb#13241 + # source://prism//lib/prism/node.rb#12493 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader depth: Integer # - # source://prism//lib/prism/node.rb#13249 + # source://prism//lib/prism/node.rb#12501 sig { returns(Integer) } def depth; end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#12504 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#13246 + # source://prism//lib/prism/node.rb#12498 sig { returns(Symbol) } def name; end @@ -20966,7 +21855,7 @@ class Prism::LocalVariableTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#13273 + # source://prism//lib/prism/node.rb#12522 sig { override.returns(Symbol) } def type; end @@ -20978,7 +21867,7 @@ class Prism::LocalVariableTargetNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#13283 + # source://prism//lib/prism/node.rb#12532 def type; end end end @@ -20988,13 +21877,13 @@ end # foo = 1 # ^^^^^^^ # -# source://prism//lib/prism/node.rb#13300 +# source://prism//lib/prism/node.rb#12549 class Prism::LocalVariableWriteNode < ::Prism::Node # def initialize: (Symbol name, Integer depth, Location name_loc, Prism::node value, Location operator_loc, Location location) -> void # # @return [LocalVariableWriteNode] a new instance of LocalVariableWriteNode # - # source://prism//lib/prism/node.rb#13302 + # source://prism//lib/prism/node.rb#12551 sig do params( source: Prism::Source, @@ -21011,36 +21900,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#12684 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13314 + # source://prism//lib/prism/node.rb#12563 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13319 + # source://prism//lib/prism/node.rb#12568 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13329 + # source://prism//lib/prism/node.rb#12578 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13324 + # source://prism//lib/prism/node.rb#12573 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?name: Symbol, ?depth: Integer, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location, ?location: Location) -> LocalVariableWriteNode # - # source://prism//lib/prism/node.rb#13334 + # source://prism//lib/prism/node.rb#12583 sig do params( name: Symbol, @@ -21056,13 +21945,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#12568 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, depth: Integer, name_loc: Location, value: Prism::node, operator_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#13342 + # source://prism//lib/prism/node.rb#12591 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -21074,18 +21963,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#12609 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#12650 + sig { override.returns(String) } + def inspect; end # The name of the local variable, which is an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). # @@ -21093,7 +21982,7 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # # abc = 123 # name `:abc` # - # source://prism//lib/prism/node.rb#13351 + # source://prism//lib/prism/node.rb#12600 sig { returns(Symbol) } def name; end @@ -21102,13 +21991,13 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # foo = :bar # ^^^ # - # source://prism//lib/prism/node.rb#13366 + # source://prism//lib/prism/node.rb#12615 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#13396 + # source://prism//lib/prism/node.rb#12645 sig { returns(String) } def operator; end @@ -21117,7 +22006,7 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # x = :y # ^ # - # source://prism//lib/prism/node.rb#13389 + # source://prism//lib/prism/node.rb#12638 sig { returns(Prism::Location) } def operator_loc; end @@ -21136,7 +22025,7 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#13426 + # source://prism//lib/prism/node.rb#12668 sig { override.returns(Symbol) } def type; end @@ -21152,7 +22041,7 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # # foo = foo # - # source://prism//lib/prism/node.rb#13383 + # source://prism//lib/prism/node.rb#12632 sig { returns(Prism::Node) } def value; end @@ -21164,104 +22053,112 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#13436 + # source://prism//lib/prism/node.rb#12678 def type; end end end # This represents a location in the source. # -# source://prism//lib/prism/parse_result.rb#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 +22166,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 +22285,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#19271 module Prism::LoopFlags; end # a loop after a begin statement, so the body is executed first before the condition # -# source://prism//lib/prism/node.rb#20405 +# source://prism//lib/prism/node.rb#19273 Prism::LoopFlags::BEGIN_MODIFIER = T.let(T.unsafe(nil), Integer) # This represents a magic comment that was encountered during parsing. # -# source://prism//lib/prism/parse_result.rb#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 +22354,7 @@ end # if /foo/i then end # ^^^^^^ # -# source://prism//lib/prism/node.rb#13456 +# source://prism//lib/prism/node.rb#12698 class Prism::MatchLastLineNode < ::Prism::Node include ::Prism::RegularExpressionOptions @@ -21452,7 +22362,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#12700 sig do params( source: Prism::Source, @@ -21469,12 +22379,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#12877 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13470 + # source://prism//lib/prism/node.rb#12712 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -21482,55 +22392,55 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#13556 + # source://prism//lib/prism/node.rb#12798 sig { returns(T::Boolean) } def ascii_8bit?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13475 + # source://prism//lib/prism/node.rb#12717 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#13596 + # source://prism//lib/prism/node.rb#12838 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#13521 + # source://prism//lib/prism/node.rb#12763 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13485 + # source://prism//lib/prism/node.rb#12727 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13480 + # source://prism//lib/prism/node.rb#12722 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def content: () -> String # - # source://prism//lib/prism/node.rb#13591 + # source://prism//lib/prism/node.rb#12833 sig { returns(String) } def content; end # attr_reader content_loc: Location # - # source://prism//lib/prism/node.rb#13514 + # source://prism//lib/prism/node.rb#12756 sig { returns(Prism::Location) } def content_loc; end # def copy: (?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String, ?location: Location) -> MatchLastLineNode # - # source://prism//lib/prism/node.rb#13490 + # source://prism//lib/prism/node.rb#12732 sig do params( flags: Integer, @@ -21546,13 +22456,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#12717 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location } # - # source://prism//lib/prism/node.rb#13498 + # source://prism//lib/prism/node.rb#12740 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -21560,7 +22470,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#13551 + # source://prism//lib/prism/node.rb#12793 sig { returns(T::Boolean) } def euc_jp?; end @@ -21568,7 +22478,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#13536 + # source://prism//lib/prism/node.rb#12778 sig { returns(T::Boolean) } def extended?; end @@ -21579,7 +22489,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#13576 + # source://prism//lib/prism/node.rb#12818 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -21587,7 +22497,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#13581 + # source://prism//lib/prism/node.rb#12823 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end @@ -21595,7 +22505,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#13571 + # source://prism//lib/prism/node.rb#12813 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -21603,21 +22513,21 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#13531 + # source://prism//lib/prism/node.rb#12773 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#12843 + 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#12783 sig { returns(T::Boolean) } def multi_line?; end @@ -21625,19 +22535,19 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#13546 + # source://prism//lib/prism/node.rb#12788 sig { returns(T::Boolean) } def once?; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#13586 + # source://prism//lib/prism/node.rb#12828 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#13507 + # source://prism//lib/prism/node.rb#12749 sig { returns(Prism::Location) } def opening_loc; end @@ -21659,13 +22569,13 @@ class Prism::MatchLastLineNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#13626 + # source://prism//lib/prism/node.rb#12861 sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#13528 + # source://prism//lib/prism/node.rb#12770 sig { returns(String) } def unescaped; end @@ -21673,7 +22583,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#13566 + # source://prism//lib/prism/node.rb#12808 sig { returns(T::Boolean) } def utf_8?; end @@ -21681,7 +22591,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#13561 + # source://prism//lib/prism/node.rb#12803 sig { returns(T::Boolean) } def windows_31j?; end @@ -21689,7 +22599,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#13503 + # source://prism//lib/prism/node.rb#12745 sig { returns(Integer) } def flags; end @@ -21701,7 +22611,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#13636 + # source://prism//lib/prism/node.rb#12871 def type; end end end @@ -21711,13 +22621,13 @@ end # foo in bar # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#13656 +# source://prism//lib/prism/node.rb#12891 class Prism::MatchPredicateNode < ::Prism::Node # def initialize: (Prism::node value, Prism::node pattern, Location operator_loc, Location location) -> void # # @return [MatchPredicateNode] a new instance of MatchPredicateNode # - # source://prism//lib/prism/node.rb#13658 + # source://prism//lib/prism/node.rb#12893 sig do params( source: Prism::Source, @@ -21732,36 +22642,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#12988 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13668 + # source://prism//lib/prism/node.rb#12903 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13673 + # source://prism//lib/prism/node.rb#12908 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13683 + # source://prism//lib/prism/node.rb#12918 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13678 + # source://prism//lib/prism/node.rb#12913 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?value: Prism::node, ?pattern: Prism::node, ?operator_loc: Location, ?location: Location) -> MatchPredicateNode # - # source://prism//lib/prism/node.rb#13688 + # source://prism//lib/prism/node.rb#12923 sig do params( value: Prism::Node, @@ -21775,40 +22685,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#12908 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::node, pattern: Prism::node, operator_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#13696 + # source://prism//lib/prism/node.rb#12931 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#12954 + sig { override.returns(String) } + def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#13714 + # source://prism//lib/prism/node.rb#12949 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#13707 + # source://prism//lib/prism/node.rb#12942 sig { returns(Prism::Location) } def operator_loc; end # attr_reader pattern: Prism::node # - # source://prism//lib/prism/node.rb#13704 + # source://prism//lib/prism/node.rb#12939 sig { returns(Prism::Node) } def pattern; end @@ -21827,13 +22737,13 @@ class Prism::MatchPredicateNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#13743 + # source://prism//lib/prism/node.rb#12972 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#13701 + # source://prism//lib/prism/node.rb#12936 sig { returns(Prism::Node) } def value; end @@ -21845,7 +22755,7 @@ class Prism::MatchPredicateNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#13753 + # source://prism//lib/prism/node.rb#12982 def type; end end end @@ -21855,13 +22765,13 @@ end # foo => bar # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#13771 +# source://prism//lib/prism/node.rb#13000 class Prism::MatchRequiredNode < ::Prism::Node # def initialize: (Prism::node value, Prism::node pattern, Location operator_loc, Location location) -> void # # @return [MatchRequiredNode] a new instance of MatchRequiredNode # - # source://prism//lib/prism/node.rb#13773 + # source://prism//lib/prism/node.rb#13002 sig do params( source: Prism::Source, @@ -21876,36 +22786,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#13097 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13783 + # source://prism//lib/prism/node.rb#13012 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13788 + # source://prism//lib/prism/node.rb#13017 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13798 + # source://prism//lib/prism/node.rb#13027 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13793 + # source://prism//lib/prism/node.rb#13022 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?value: Prism::node, ?pattern: Prism::node, ?operator_loc: Location, ?location: Location) -> MatchRequiredNode # - # source://prism//lib/prism/node.rb#13803 + # source://prism//lib/prism/node.rb#13032 sig do params( value: Prism::Node, @@ -21919,40 +22829,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#13017 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::node, pattern: Prism::node, operator_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#13811 + # source://prism//lib/prism/node.rb#13040 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#13063 + sig { override.returns(String) } + def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#13829 + # source://prism//lib/prism/node.rb#13058 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#13822 + # source://prism//lib/prism/node.rb#13051 sig { returns(Prism::Location) } def operator_loc; end # attr_reader pattern: Prism::node # - # source://prism//lib/prism/node.rb#13819 + # source://prism//lib/prism/node.rb#13048 sig { returns(Prism::Node) } def pattern; end @@ -21971,13 +22881,13 @@ class Prism::MatchRequiredNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#13858 + # source://prism//lib/prism/node.rb#13081 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#13816 + # source://prism//lib/prism/node.rb#13045 sig { returns(Prism::Node) } def value; end @@ -21989,7 +22899,7 @@ class Prism::MatchRequiredNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#13868 + # source://prism//lib/prism/node.rb#13091 def type; end end end @@ -21999,13 +22909,13 @@ end # /(?bar)/ =~ baz # ^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#13886 +# source://prism//lib/prism/node.rb#13109 class Prism::MatchWriteNode < ::Prism::Node # def initialize: (CallNode call, Array[LocalVariableTargetNode] targets, Location location) -> void # # @return [MatchWriteNode] a new instance of MatchWriteNode # - # source://prism//lib/prism/node.rb#13888 + # source://prism//lib/prism/node.rb#13111 sig do params( source: Prism::Source, @@ -22019,42 +22929,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#13193 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13897 + # source://prism//lib/prism/node.rb#13120 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader call: CallNode # - # source://prism//lib/prism/node.rb#13930 + # source://prism//lib/prism/node.rb#13153 sig { returns(Prism::CallNode) } def call; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13902 + # source://prism//lib/prism/node.rb#13125 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13912 + # source://prism//lib/prism/node.rb#13135 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13907 + # source://prism//lib/prism/node.rb#13130 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?call: CallNode, ?targets: Array[LocalVariableTargetNode], ?location: Location) -> MatchWriteNode # - # source://prism//lib/prism/node.rb#13917 + # source://prism//lib/prism/node.rb#13140 sig do params( call: Prism::CallNode, @@ -22067,28 +22977,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#13125 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { call: CallNode, targets: Array[LocalVariableTargetNode], location: Location } # - # source://prism//lib/prism/node.rb#13925 + # source://prism//lib/prism/node.rb#13148 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#13159 + 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#13156 sig { returns(T::Array[Prism::LocalVariableTargetNode]) } def targets; end @@ -22107,7 +23017,7 @@ class Prism::MatchWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#13958 + # source://prism//lib/prism/node.rb#13177 sig { override.returns(Symbol) } def type; end @@ -22119,80 +23029,80 @@ class Prism::MatchWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#13968 + # source://prism//lib/prism/node.rb#13187 def type; end end end # Represents a node that is missing from the source and results in a syntax error. # -# source://prism//lib/prism/node.rb#13983 +# source://prism//lib/prism/node.rb#13202 class Prism::MissingNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [MissingNode] a new instance of MissingNode # - # source://prism//lib/prism/node.rb#13985 + # source://prism//lib/prism/node.rb#13204 sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#14060 + # source://prism//lib/prism/node.rb#13278 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13992 + # source://prism//lib/prism/node.rb#13211 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13997 + # source://prism//lib/prism/node.rb#13216 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14007 + # source://prism//lib/prism/node.rb#13226 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14002 + # source://prism//lib/prism/node.rb#13221 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?location: Location) -> MissingNode # - # source://prism//lib/prism/node.rb#14012 + # source://prism//lib/prism/node.rb#13231 sig { params(location: Prism::Location).returns(Prism::MissingNode) } def copy(location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13997 + # source://prism//lib/prism/node.rb#13216 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } # - # source://prism//lib/prism/node.rb#14020 + # source://prism//lib/prism/node.rb#13239 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#13244 + sig { override.returns(String) } + def inspect; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by @@ -22209,7 +23119,7 @@ class Prism::MissingNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#14044 + # source://prism//lib/prism/node.rb#13262 sig { override.returns(Symbol) } def type; end @@ -22221,7 +23131,7 @@ class Prism::MissingNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#14054 + # source://prism//lib/prism/node.rb#13272 def type; end end end @@ -22231,13 +23141,13 @@ end # module Foo end # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#14069 +# source://prism//lib/prism/node.rb#13287 class Prism::ModuleNode < ::Prism::Node # def initialize: (Array[Symbol] locals, Location module_keyword_loc, Prism::node constant_path, Prism::node? body, Location end_keyword_loc, Symbol name, Location location) -> void # # @return [ModuleNode] a new instance of ModuleNode # - # source://prism//lib/prism/node.rb#14071 + # source://prism//lib/prism/node.rb#13289 sig do params( source: Prism::Source, @@ -22255,48 +23165,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#13408 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14084 + # source://prism//lib/prism/node.rb#13302 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: Prism::node? # - # source://prism//lib/prism/node.rb#14133 + # source://prism//lib/prism/node.rb#13351 sig { returns(T.nilable(Prism::Node)) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14089 + # source://prism//lib/prism/node.rb#13307 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14102 + # source://prism//lib/prism/node.rb#13320 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14094 + # source://prism//lib/prism/node.rb#13312 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader constant_path: Prism::node # - # source://prism//lib/prism/node.rb#14130 + # source://prism//lib/prism/node.rb#13348 sig { returns(Prism::Node) } def constant_path; end # def copy: (?locals: Array[Symbol], ?module_keyword_loc: Location, ?constant_path: Prism::node, ?body: Prism::node?, ?end_keyword_loc: Location, ?name: Symbol, ?location: Location) -> ModuleNode # - # source://prism//lib/prism/node.rb#14107 + # source://prism//lib/prism/node.rb#13325 sig do params( locals: T::Array[Symbol], @@ -22313,58 +23223,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#13307 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], module_keyword_loc: Location, constant_path: Prism::node, body: Prism::node?, end_keyword_loc: Location, name: Symbol, location: Location } # - # source://prism//lib/prism/node.rb#14115 + # source://prism//lib/prism/node.rb#13333 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def end_keyword: () -> String # - # source://prism//lib/prism/node.rb#14151 + # source://prism//lib/prism/node.rb#13369 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#14136 + # source://prism//lib/prism/node.rb#13354 sig { returns(Prism::Location) } def end_keyword_loc; end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#13374 + 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#13338 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#13364 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#13341 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#13361 sig { returns(Symbol) } def name; end @@ -22383,7 +23293,7 @@ class Prism::ModuleNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#14187 + # source://prism//lib/prism/node.rb#13392 sig { override.returns(Symbol) } def type; end @@ -22395,7 +23305,7 @@ class Prism::ModuleNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#14197 + # source://prism//lib/prism/node.rb#13402 def type; end end end @@ -22405,13 +23315,13 @@ end # a, (b, c) = 1, 2, 3 # ^^^^^^ # -# source://prism//lib/prism/node.rb#14219 +# source://prism//lib/prism/node.rb#13424 class Prism::MultiTargetNode < ::Prism::Node # def initialize: (Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode] lefts, Prism::node? rest, Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode] rights, Location? lparen_loc, Location? rparen_loc, Location location) -> void # # @return [MultiTargetNode] a new instance of MultiTargetNode # - # source://prism//lib/prism/node.rb#14221 + # source://prism//lib/prism/node.rb#13426 sig do params( source: Prism::Source, @@ -22428,36 +23338,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#13554 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14233 + # source://prism//lib/prism/node.rb#13438 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14238 + # source://prism//lib/prism/node.rb#13443 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14252 + # source://prism//lib/prism/node.rb#13457 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14243 + # source://prism//lib/prism/node.rb#13448 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], ?rest: Prism::node?, ?rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode], ?lparen_loc: Location?, ?rparen_loc: Location?, ?location: Location) -> MultiTargetNode # - # source://prism//lib/prism/node.rb#14257 + # source://prism//lib/prism/node.rb#13462 sig do params( lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], @@ -22473,28 +23383,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#13443 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], rest: Prism::node?, rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode], lparen_loc: Location?, rparen_loc: Location?, location: Location } # - # source://prism//lib/prism/node.rb#14265 + # source://prism//lib/prism/node.rb#13470 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#13520 + sig { override.returns(String) } + def inspect; end # attr_reader lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode] # - # source://prism//lib/prism/node.rb#14270 + # source://prism//lib/prism/node.rb#13475 sig do returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)]) end @@ -22502,25 +23412,25 @@ class Prism::MultiTargetNode < ::Prism::Node # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#14305 + # source://prism//lib/prism/node.rb#13510 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#14279 + # source://prism//lib/prism/node.rb#13484 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # attr_reader rest: Prism::node? # - # source://prism//lib/prism/node.rb#14273 + # source://prism//lib/prism/node.rb#13478 sig { returns(T.nilable(Prism::Node)) } def rest; end # attr_reader rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode] # - # source://prism//lib/prism/node.rb#14276 + # source://prism//lib/prism/node.rb#13481 sig do returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode)]) end @@ -22528,13 +23438,13 @@ class Prism::MultiTargetNode < ::Prism::Node # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#14310 + # source://prism//lib/prism/node.rb#13515 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#14292 + # source://prism//lib/prism/node.rb#13497 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end @@ -22553,7 +23463,7 @@ class Prism::MultiTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#14344 + # source://prism//lib/prism/node.rb#13538 sig { override.returns(Symbol) } def type; end @@ -22565,7 +23475,7 @@ class Prism::MultiTargetNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#14354 + # source://prism//lib/prism/node.rb#13548 def type; end end end @@ -22575,13 +23485,13 @@ end # a, b, c = 1, 2, 3 # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#14376 +# source://prism//lib/prism/node.rb#13570 class Prism::MultiWriteNode < ::Prism::Node # def initialize: (Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode] lefts, Prism::node? rest, Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode] rights, Location? lparen_loc, Location? rparen_loc, Location operator_loc, Prism::node value, Location location) -> void # # @return [MultiWriteNode] a new instance of MultiWriteNode # - # source://prism//lib/prism/node.rb#14378 + # source://prism//lib/prism/node.rb#13572 sig do params( source: Prism::Source, @@ -22600,36 +23510,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#13718 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14392 + # source://prism//lib/prism/node.rb#13586 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14397 + # source://prism//lib/prism/node.rb#13591 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14412 + # source://prism//lib/prism/node.rb#13606 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14402 + # source://prism//lib/prism/node.rb#13596 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode], ?rest: Prism::node?, ?rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode], ?lparen_loc: Location?, ?rparen_loc: Location?, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> MultiWriteNode # - # source://prism//lib/prism/node.rb#14417 + # source://prism//lib/prism/node.rb#13611 sig do params( lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode)], @@ -22647,28 +23557,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#13591 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode], rest: Prism::node?, rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode], lparen_loc: Location?, rparen_loc: Location?, operator_loc: Location, value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#14425 + # source://prism//lib/prism/node.rb#13619 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#13684 + sig { override.returns(String) } + def inspect; end # attr_reader lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode] # - # source://prism//lib/prism/node.rb#14430 + # source://prism//lib/prism/node.rb#13624 sig do returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode)]) end @@ -22676,37 +23586,37 @@ class Prism::MultiWriteNode < ::Prism::Node # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#14475 + # source://prism//lib/prism/node.rb#13669 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#14439 + # source://prism//lib/prism/node.rb#13633 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#14485 + # source://prism//lib/prism/node.rb#13679 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#14465 + # source://prism//lib/prism/node.rb#13659 sig { returns(Prism::Location) } def operator_loc; end # attr_reader rest: Prism::node? # - # source://prism//lib/prism/node.rb#14433 + # source://prism//lib/prism/node.rb#13627 sig { returns(T.nilable(Prism::Node)) } def rest; end # attr_reader rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode] # - # source://prism//lib/prism/node.rb#14436 + # source://prism//lib/prism/node.rb#13630 sig do returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode)]) end @@ -22714,13 +23624,13 @@ class Prism::MultiWriteNode < ::Prism::Node # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#14480 + # source://prism//lib/prism/node.rb#13674 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#14452 + # source://prism//lib/prism/node.rb#13646 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end @@ -22739,13 +23649,13 @@ class Prism::MultiWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#14522 + # source://prism//lib/prism/node.rb#13702 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#14472 + # source://prism//lib/prism/node.rb#13666 sig { returns(Prism::Node) } def value; end @@ -22757,7 +23667,7 @@ class Prism::MultiWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#14532 + # source://prism//lib/prism/node.rb#13712 def type; end end end @@ -23517,8 +24427,6 @@ class Prism::MutationCompiler < ::Prism::Compiler # # source://prism//lib/prism/mutation_compiler.rb#760 def visit_yield_node(node); end - - Result = type_member end # Represents the use of the `next` keyword. @@ -23526,13 +24434,13 @@ end # next 1 # ^^^^^^ # -# source://prism//lib/prism/node.rb#14556 +# source://prism//lib/prism/node.rb#13736 class Prism::NextNode < ::Prism::Node # def initialize: (ArgumentsNode? arguments, Location keyword_loc, Location location) -> void # # @return [NextNode] a new instance of NextNode # - # source://prism//lib/prism/node.rb#14558 + # source://prism//lib/prism/node.rb#13738 sig do params( source: Prism::Source, @@ -23546,42 +24454,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#13831 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14567 + # source://prism//lib/prism/node.rb#13747 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#14602 + # source://prism//lib/prism/node.rb#13782 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14572 + # source://prism//lib/prism/node.rb#13752 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14584 + # source://prism//lib/prism/node.rb#13764 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14577 + # source://prism//lib/prism/node.rb#13757 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?arguments: ArgumentsNode?, ?keyword_loc: Location, ?location: Location) -> NextNode # - # source://prism//lib/prism/node.rb#14589 + # source://prism//lib/prism/node.rb#13769 sig do params( arguments: T.nilable(Prism::ArgumentsNode), @@ -23594,34 +24502,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#13752 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { arguments: ArgumentsNode?, keyword_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#14597 + # source://prism//lib/prism/node.rb#13777 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#13797 + sig { override.returns(String) } + def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#14612 + # source://prism//lib/prism/node.rb#13792 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#14605 + # source://prism//lib/prism/node.rb#13785 sig { returns(Prism::Location) } def keyword_loc; end @@ -23640,7 +24548,7 @@ class Prism::NextNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#14643 + # source://prism//lib/prism/node.rb#13815 sig { override.returns(Symbol) } def type; end @@ -23652,7 +24560,7 @@ class Prism::NextNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#14653 + # source://prism//lib/prism/node.rb#13825 def type; end end end @@ -23662,73 +24570,73 @@ end # nil # ^^^ # -# source://prism//lib/prism/node.rb#14670 +# source://prism//lib/prism/node.rb#13842 class Prism::NilNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [NilNode] a new instance of NilNode # - # source://prism//lib/prism/node.rb#14672 + # source://prism//lib/prism/node.rb#13844 sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#14747 + # source://prism//lib/prism/node.rb#13918 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14679 + # source://prism//lib/prism/node.rb#13851 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14684 + # source://prism//lib/prism/node.rb#13856 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14694 + # source://prism//lib/prism/node.rb#13866 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14689 + # source://prism//lib/prism/node.rb#13861 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?location: Location) -> NilNode # - # source://prism//lib/prism/node.rb#14699 + # source://prism//lib/prism/node.rb#13871 sig { params(location: Prism::Location).returns(Prism::NilNode) } def copy(location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14684 + # source://prism//lib/prism/node.rb#13856 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } # - # source://prism//lib/prism/node.rb#14707 + # source://prism//lib/prism/node.rb#13879 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#13884 + sig { override.returns(String) } + def inspect; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by @@ -23745,7 +24653,7 @@ class Prism::NilNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#14731 + # source://prism//lib/prism/node.rb#13902 sig { override.returns(Symbol) } def type; end @@ -23757,7 +24665,7 @@ class Prism::NilNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#14741 + # source://prism//lib/prism/node.rb#13912 def type; end end end @@ -23768,13 +24676,13 @@ end # ^^^^^ # end # -# source://prism//lib/prism/node.rb#14757 +# source://prism//lib/prism/node.rb#13928 class Prism::NoKeywordsParameterNode < ::Prism::Node # def initialize: (Location operator_loc, Location keyword_loc, Location location) -> void # # @return [NoKeywordsParameterNode] a new instance of NoKeywordsParameterNode # - # source://prism//lib/prism/node.rb#14759 + # source://prism//lib/prism/node.rb#13930 sig do params( source: Prism::Source, @@ -23788,36 +24696,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#14030 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14768 + # source://prism//lib/prism/node.rb#13939 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14773 + # source://prism//lib/prism/node.rb#13944 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14783 + # source://prism//lib/prism/node.rb#13954 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14778 + # source://prism//lib/prism/node.rb#13949 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?operator_loc: Location, ?keyword_loc: Location, ?location: Location) -> NoKeywordsParameterNode # - # source://prism//lib/prism/node.rb#14788 + # source://prism//lib/prism/node.rb#13959 sig do params( operator_loc: Prism::Location, @@ -23830,46 +24738,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#13944 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { operator_loc: Location, keyword_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#14796 + # source://prism//lib/prism/node.rb#13967 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#13996 + sig { override.returns(String) } + def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#14820 + # source://prism//lib/prism/node.rb#13991 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#14808 + # source://prism//lib/prism/node.rb#13979 sig { returns(Prism::Location) } def keyword_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#14815 + # source://prism//lib/prism/node.rb#13986 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#14801 + # source://prism//lib/prism/node.rb#13972 sig { returns(Prism::Location) } def operator_loc; end @@ -23888,7 +24796,7 @@ class Prism::NoKeywordsParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#14846 + # source://prism//lib/prism/node.rb#14014 sig { override.returns(Symbol) } def type; end @@ -23900,7 +24808,7 @@ class Prism::NoKeywordsParameterNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#14856 + # source://prism//lib/prism/node.rb#14024 def type; end end end @@ -23916,7 +24824,7 @@ class Prism::Node # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#90 + # source://prism//lib/prism/node.rb#143 sig { abstract.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -23925,7 +24833,7 @@ class Prism::Node # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#96 + # source://prism//lib/prism/node.rb#149 sig { abstract.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end @@ -23934,7 +24842,7 @@ class Prism::Node # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#110 + # source://prism//lib/prism/node.rb#163 sig { abstract.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end @@ -23943,7 +24851,7 @@ class Prism::Node # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#104 + # source://prism//lib/prism/node.rb#157 sig { abstract.returns(T::Array[Prism::Node]) } def compact_child_nodes; end @@ -23952,7 +24860,7 @@ class Prism::Node # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#96 + # source://prism//lib/prism/node.rb#149 sig { abstract.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -23970,9 +24878,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#174 + sig { abstract.returns(String) } + def inspect; end # A Location instance that represents the location of this node in the # source. @@ -23989,19 +24897,41 @@ class Prism::Node # 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#74 sig { params(q: T.untyped).void } def pretty_print(q); end + # Returns all of the lines of the source code associated with this node. + # An alias for source_lines, used to mimic the API from + # RubyVM::AbstractSyntaxTree to make it easier to migrate. + # + # source://prism//lib/prism/node.rb#52 + sig { returns(T::Array[String]) } + def script_lines; end + # source://prism//lib/prism/node.rb#43 def set_newline_flag(newline_marked); end # Slice the location of the node from the source. # - # source://prism//lib/prism/node.rb#52 + # source://prism//lib/prism/node.rb#61 sig { returns(String) } def slice; end + # Slice the location of the node from the source, starting at the beginning + # of the line that the location starts on, ending at the end of the line + # that the location ends on. + # + # source://prism//lib/prism/node.rb#68 + sig { returns(String) } + def slice_lines; end + + # Returns all of the lines of the source code associated with this node. + # + # source://prism//lib/prism/node.rb#52 + sig { returns(T::Array[String]) } + def source_lines; end + # The start offset of the node in the source. This method is effectively a # delegate method to the location object. # @@ -24011,16 +24941,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#82 sig { returns(String) } def to_dot; end + # Returns a list of nodes that are descendants of this node that contain the + # given line and column. This is useful for locating a node that is selected + # based on the line and column of the source code. + # + # Important to note is that the column given to this method should be in + # bytes, as opposed to characters or code units. + # + # source://prism//lib/prism/node.rb#93 + sig { params(line: Integer, column: Integer).returns(T::Array[Prism::Node]) } + def tunnel(line, column); end + # Returns a symbol symbolizing the type of node that this represents. This # is particularly useful for case statements and array comparisons. # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#116 + # source://prism//lib/prism/node.rb#169 sig { abstract.returns(Symbol) } def type; end @@ -24039,148 +24980,94 @@ class Prism::Node # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#74 + # source://prism//lib/prism/node.rb#127 def fields; end # Returns the type of the node as a symbol. # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#126 + # source://prism//lib/prism/node.rb#179 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#14041 class Prism::NumberedParametersNode < ::Prism::Node # def initialize: (Integer maximum, Location location) -> void # # @return [NumberedParametersNode] a new instance of NumberedParametersNode # - # source://prism//lib/prism/node.rb#14875 + # source://prism//lib/prism/node.rb#14043 sig { params(source: Prism::Source, maximum: Integer, location: Prism::Location).void } def initialize(source, maximum, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#14955 + # source://prism//lib/prism/node.rb#14121 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14883 + # source://prism//lib/prism/node.rb#14051 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14888 + # source://prism//lib/prism/node.rb#14056 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14898 + # source://prism//lib/prism/node.rb#14066 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14893 + # source://prism//lib/prism/node.rb#14061 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?maximum: Integer, ?location: Location) -> NumberedParametersNode # - # source://prism//lib/prism/node.rb#14903 + # source://prism//lib/prism/node.rb#14071 sig { params(maximum: Integer, location: Prism::Location).returns(Prism::NumberedParametersNode) } def copy(maximum: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14888 + # source://prism//lib/prism/node.rb#14056 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { maximum: Integer, location: Location } # - # source://prism//lib/prism/node.rb#14911 + # source://prism//lib/prism/node.rb#14079 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#14087 + sig { override.returns(String) } + def inspect; end # attr_reader maximum: Integer # - # source://prism//lib/prism/node.rb#14916 + # source://prism//lib/prism/node.rb#14084 sig { returns(Integer) } def maximum; end @@ -24199,7 +25086,7 @@ class Prism::NumberedParametersNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#14939 + # source://prism//lib/prism/node.rb#14105 sig { override.returns(Symbol) } def type; end @@ -24211,7 +25098,7 @@ class Prism::NumberedParametersNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#14949 + # source://prism//lib/prism/node.rb#14115 def type; end end end @@ -24221,73 +25108,73 @@ end # $1 # ^^ # -# source://prism//lib/prism/node.rb#14965 +# source://prism//lib/prism/node.rb#14131 class Prism::NumberedReferenceReadNode < ::Prism::Node # def initialize: (Integer number, Location location) -> void # # @return [NumberedReferenceReadNode] a new instance of NumberedReferenceReadNode # - # source://prism//lib/prism/node.rb#14967 + # source://prism//lib/prism/node.rb#14133 sig { params(source: Prism::Source, number: Integer, location: Prism::Location).void } def initialize(source, number, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#15053 + # source://prism//lib/prism/node.rb#14217 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14975 + # source://prism//lib/prism/node.rb#14141 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14980 + # source://prism//lib/prism/node.rb#14146 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14990 + # source://prism//lib/prism/node.rb#14156 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14985 + # source://prism//lib/prism/node.rb#14151 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?number: Integer, ?location: Location) -> NumberedReferenceReadNode # - # source://prism//lib/prism/node.rb#14995 + # source://prism//lib/prism/node.rb#14161 sig { params(number: Integer, location: Prism::Location).returns(Prism::NumberedReferenceReadNode) } def copy(number: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14980 + # source://prism//lib/prism/node.rb#14146 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { number: Integer, location: Location } # - # source://prism//lib/prism/node.rb#15003 + # source://prism//lib/prism/node.rb#14169 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#14183 + sig { override.returns(String) } + def inspect; end # The (1-indexed, from the left) number of the capture group. Numbered references that are too large result in this value being `0`. # @@ -24297,7 +25184,7 @@ class Prism::NumberedReferenceReadNode < ::Prism::Node # # $4294967296 # number `0` # - # source://prism//lib/prism/node.rb#15014 + # source://prism//lib/prism/node.rb#14180 sig { returns(Integer) } def number; end @@ -24316,7 +25203,7 @@ class Prism::NumberedReferenceReadNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#15037 + # source://prism//lib/prism/node.rb#14201 sig { override.returns(Symbol) } def type; end @@ -24328,7 +25215,7 @@ class Prism::NumberedReferenceReadNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#15047 + # source://prism//lib/prism/node.rb#14211 def type; end end end @@ -24339,13 +25226,13 @@ end # ^^^^ # end # -# source://prism//lib/prism/node.rb#15064 +# source://prism//lib/prism/node.rb#14228 class Prism::OptionalKeywordParameterNode < ::Prism::Node # def initialize: (Integer flags, Symbol name, Location name_loc, Prism::node value, Location location) -> void # # @return [OptionalKeywordParameterNode] a new instance of OptionalKeywordParameterNode # - # source://prism//lib/prism/node.rb#15066 + # source://prism//lib/prism/node.rb#14230 sig do params( source: Prism::Source, @@ -24361,36 +25248,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#14330 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15077 + # source://prism//lib/prism/node.rb#14241 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15082 + # source://prism//lib/prism/node.rb#14246 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15092 + # source://prism//lib/prism/node.rb#14256 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15087 + # source://prism//lib/prism/node.rb#14251 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?location: Location) -> OptionalKeywordParameterNode # - # source://prism//lib/prism/node.rb#15097 + # source://prism//lib/prism/node.rb#14261 sig do params( flags: Integer, @@ -24405,34 +25292,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#14246 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, name_loc: Location, value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#15105 + # source://prism//lib/prism/node.rb#14269 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#14296 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#15114 + # source://prism//lib/prism/node.rb#14278 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#15117 + # source://prism//lib/prism/node.rb#14281 sig { returns(Prism::Location) } def name_loc; end @@ -24440,7 +25327,7 @@ class Prism::OptionalKeywordParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15127 + # source://prism//lib/prism/node.rb#14291 sig { returns(T::Boolean) } def repeated_parameter?; end @@ -24459,13 +25346,13 @@ class Prism::OptionalKeywordParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#15157 + # source://prism//lib/prism/node.rb#14314 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#15124 + # source://prism//lib/prism/node.rb#14288 sig { returns(Prism::Node) } def value; end @@ -24473,7 +25360,7 @@ class Prism::OptionalKeywordParameterNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#15110 + # source://prism//lib/prism/node.rb#14274 sig { returns(Integer) } def flags; end @@ -24485,7 +25372,7 @@ class Prism::OptionalKeywordParameterNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#15167 + # source://prism//lib/prism/node.rb#14324 def type; end end end @@ -24496,13 +25383,13 @@ end # ^^^^^ # end # -# source://prism//lib/prism/node.rb#15187 +# source://prism//lib/prism/node.rb#14344 class Prism::OptionalParameterNode < ::Prism::Node # def initialize: (Integer flags, Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void # # @return [OptionalParameterNode] a new instance of OptionalParameterNode # - # source://prism//lib/prism/node.rb#15189 + # source://prism//lib/prism/node.rb#14346 sig do params( source: Prism::Source, @@ -24519,36 +25406,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#14459 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15201 + # source://prism//lib/prism/node.rb#14358 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15206 + # source://prism//lib/prism/node.rb#14363 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15216 + # source://prism//lib/prism/node.rb#14373 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15211 + # source://prism//lib/prism/node.rb#14368 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> OptionalParameterNode # - # source://prism//lib/prism/node.rb#15221 + # source://prism//lib/prism/node.rb#14378 sig do params( flags: Integer, @@ -24564,46 +25451,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#14363 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#15229 + # source://prism//lib/prism/node.rb#14386 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#14425 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#15238 + # source://prism//lib/prism/node.rb#14395 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#15241 + # source://prism//lib/prism/node.rb#14398 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#15263 + # source://prism//lib/prism/node.rb#14420 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#15248 + # source://prism//lib/prism/node.rb#14405 sig { returns(Prism::Location) } def operator_loc; end @@ -24611,7 +25498,7 @@ class Prism::OptionalParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15258 + # source://prism//lib/prism/node.rb#14415 sig { returns(T::Boolean) } def repeated_parameter?; end @@ -24630,13 +25517,13 @@ class Prism::OptionalParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#15294 + # source://prism//lib/prism/node.rb#14443 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#15255 + # source://prism//lib/prism/node.rb#14412 sig { returns(Prism::Node) } def value; end @@ -24644,7 +25531,7 @@ class Prism::OptionalParameterNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#15234 + # source://prism//lib/prism/node.rb#14391 sig { returns(Integer) } def flags; end @@ -24656,7 +25543,7 @@ class Prism::OptionalParameterNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#15304 + # source://prism//lib/prism/node.rb#14453 def type; end end end @@ -24666,13 +25553,13 @@ end # left or right # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#15324 +# source://prism//lib/prism/node.rb#14473 class Prism::OrNode < ::Prism::Node # def initialize: (Prism::node left, Prism::node right, Location operator_loc, Location location) -> void # # @return [OrNode] a new instance of OrNode # - # source://prism//lib/prism/node.rb#15326 + # source://prism//lib/prism/node.rb#14475 sig do params( source: Prism::Source, @@ -24687,36 +25574,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#14585 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15336 + # source://prism//lib/prism/node.rb#14485 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15341 + # source://prism//lib/prism/node.rb#14490 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15351 + # source://prism//lib/prism/node.rb#14500 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15346 + # source://prism//lib/prism/node.rb#14495 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?left: Prism::node, ?right: Prism::node, ?operator_loc: Location, ?location: Location) -> OrNode # - # source://prism//lib/prism/node.rb#15356 + # source://prism//lib/prism/node.rb#14505 sig do params( left: Prism::Node, @@ -24730,24 +25617,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#14490 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { left: Prism::node, right: Prism::node, operator_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#15364 + # source://prism//lib/prism/node.rb#14513 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#14551 + sig { override.returns(String) } + def inspect; end # Represents the left side of the expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). # @@ -24757,13 +25644,13 @@ class Prism::OrNode < ::Prism::Node # 1 || 2 # ^ # - # source://prism//lib/prism/node.rb#15375 + # source://prism//lib/prism/node.rb#14524 sig { returns(Prism::Node) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#15397 + # source://prism//lib/prism/node.rb#14546 sig { returns(String) } def operator; end @@ -24772,7 +25659,7 @@ class Prism::OrNode < ::Prism::Node # left or right # ^^ # - # source://prism//lib/prism/node.rb#15390 + # source://prism//lib/prism/node.rb#14539 sig { returns(Prism::Location) } def operator_loc; end @@ -24784,7 +25671,7 @@ class Prism::OrNode < ::Prism::Node # 1 or 2 # ^ # - # source://prism//lib/prism/node.rb#15384 + # source://prism//lib/prism/node.rb#14533 sig { returns(Prism::Node) } def right; end @@ -24803,7 +25690,7 @@ class Prism::OrNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#15426 + # source://prism//lib/prism/node.rb#14569 sig { override.returns(Symbol) } def type; end @@ -24815,7 +25702,7 @@ class Prism::OrNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#15436 + # source://prism//lib/prism/node.rb#14579 def type; end end end @@ -25064,12 +25951,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#19277 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#19279 Prism::ParameterFlags::REPEATED_PARAMETER = T.let(T.unsafe(nil), Integer) # Represents the list of parameters on a method, block, or lambda definition. @@ -25078,13 +25965,13 @@ Prism::ParameterFlags::REPEATED_PARAMETER = T.let(T.unsafe(nil), Integer) # ^^^^^^^ # end # -# source://prism//lib/prism/node.rb#15455 +# source://prism//lib/prism/node.rb#14598 class Prism::ParametersNode < ::Prism::Node # def initialize: (Array[RequiredParameterNode | MultiTargetNode] requireds, Array[OptionalParameterNode] optionals, RestParameterNode | ImplicitRestNode | nil rest, Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode] 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#14600 sig do params( source: Prism::Source, @@ -25103,42 +25990,42 @@ 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#14710 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15471 + # source://prism//lib/prism/node.rb#14614 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader block: BlockParameterNode? # - # source://prism//lib/prism/node.rb#15530 + # source://prism//lib/prism/node.rb#14673 sig { returns(T.nilable(Prism::BlockParameterNode)) } def block; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15476 + # source://prism//lib/prism/node.rb#14619 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15494 + # source://prism//lib/prism/node.rb#14637 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15481 + # source://prism//lib/prism/node.rb#14624 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?requireds: Array[RequiredParameterNode | MultiTargetNode], ?optionals: Array[OptionalParameterNode], ?rest: RestParameterNode | ImplicitRestNode | nil, ?posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode], ?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#14642 sig do params( requireds: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)], @@ -25156,28 +26043,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#14619 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { requireds: Array[RequiredParameterNode | MultiTargetNode], optionals: Array[OptionalParameterNode], rest: RestParameterNode | ImplicitRestNode | nil, posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode], 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#14650 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#14676 + 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#14670 sig do returns(T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode))) end @@ -25185,19 +26072,19 @@ class Prism::ParametersNode < ::Prism::Node # attr_reader keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode] # - # source://prism//lib/prism/node.rb#15524 + # source://prism//lib/prism/node.rb#14667 sig { returns(T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)]) } def keywords; end # attr_reader optionals: Array[OptionalParameterNode] # - # source://prism//lib/prism/node.rb#15515 + # source://prism//lib/prism/node.rb#14658 sig { returns(T::Array[Prism::OptionalParameterNode]) } def optionals; end # attr_reader posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode] # - # source://prism//lib/prism/node.rb#15521 + # source://prism//lib/prism/node.rb#14664 sig do returns(T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode)]) end @@ -25205,19 +26092,19 @@ class Prism::ParametersNode < ::Prism::Node # attr_reader requireds: Array[RequiredParameterNode | MultiTargetNode] # - # source://prism//lib/prism/node.rb#15512 + # source://prism//lib/prism/node.rb#14655 sig { returns(T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)]) } def requireds; end # attr_reader rest: RestParameterNode | ImplicitRestNode | nil # - # source://prism//lib/prism/node.rb#15518 + # source://prism//lib/prism/node.rb#14661 sig { returns(T.nilable(T.any(Prism::RestParameterNode, Prism::ImplicitRestNode))) } def rest; end # Mirrors the Method#parameters method. # - # source://prism//lib/prism/node_ext.rb#210 + # source://prism//lib/prism/node_ext.rb#239 sig { returns(T::Array[T.any([Symbol, Symbol], [Symbol])]) } def signature; end @@ -25236,7 +26123,7 @@ class Prism::ParametersNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#15574 + # source://prism//lib/prism/node.rb#14694 sig { override.returns(Symbol) } def type; end @@ -25248,7 +26135,7 @@ class Prism::ParametersNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#15584 + # source://prism//lib/prism/node.rb#14704 def type; end end end @@ -25258,13 +26145,13 @@ end # (10 + 34) # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#15610 +# source://prism//lib/prism/node.rb#14730 class Prism::ParenthesesNode < ::Prism::Node # def initialize: (Prism::node? body, Location opening_loc, Location closing_loc, Location location) -> void # # @return [ParenthesesNode] a new instance of ParenthesesNode # - # source://prism//lib/prism/node.rb#15612 + # source://prism//lib/prism/node.rb#14732 sig do params( source: Prism::Source, @@ -25279,54 +26166,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#14842 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15622 + # source://prism//lib/prism/node.rb#14742 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: Prism::node? # - # source://prism//lib/prism/node.rb#15661 + # source://prism//lib/prism/node.rb#14781 sig { returns(T.nilable(Prism::Node)) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15631 + # source://prism//lib/prism/node.rb#14751 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#15683 + # source://prism//lib/prism/node.rb#14803 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#15671 + # source://prism//lib/prism/node.rb#14791 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15643 + # source://prism//lib/prism/node.rb#14763 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15636 + # source://prism//lib/prism/node.rb#14756 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?body: Prism::node?, ?opening_loc: Location, ?closing_loc: Location, ?location: Location) -> ParenthesesNode # - # source://prism//lib/prism/node.rb#15648 + # source://prism//lib/prism/node.rb#14768 sig do params( body: T.nilable(Prism::Node), @@ -25340,38 +26227,38 @@ 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#14751 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { body: Prism::node?, opening_loc: Location, closing_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#15656 + # source://prism//lib/prism/node.rb#14776 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#14808 + sig { override.returns(String) } + def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#15678 + # source://prism//lib/prism/node.rb#14798 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#15664 + # source://prism//lib/prism/node.rb#14784 sig { returns(Prism::Location) } def opening_loc; end - # source://prism//lib/prism/node.rb#15626 + # source://prism//lib/prism/node.rb#14746 def set_newline_flag(newline_marked); end # Sometimes you want to check an instance of a node against a list of @@ -25389,7 +26276,7 @@ class Prism::ParenthesesNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#15715 + # source://prism//lib/prism/node.rb#14826 sig { override.returns(Symbol) } def type; end @@ -25401,70 +26288,70 @@ class Prism::ParenthesesNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#15725 + # source://prism//lib/prism/node.rb#14836 def type; end end end # This represents an error that was encountered during parsing. # -# source://prism//lib/prism/parse_result.rb#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#610 class Prism::ParseLexResult < ::Prism::Result # Create a new parse lex result object with the given values. # # @return [ParseLexResult] a new instance of ParseLexResult # - # source://prism//lib/prism/parse_result.rb#538 + # source://prism//lib/prism/parse_result.rb#616 sig do params( value: [Prism::ProgramNode, T::Array[T.untyped]], @@ -25480,27 +26367,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#622 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # A tuple of the syntax tree and the list of tokens that were parsed from # the source code. # - # source://prism//lib/prism/parse_result.rb#535 + # source://prism//lib/prism/parse_result.rb#613 sig { returns([Prism::ProgramNode, T::Array[T.untyped]]) } def value; end end # This is a result specific to the `parse` and `parse_file` methods. # -# source://prism//lib/prism/parse_result.rb#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#581 sig do params( value: Prism::ProgramNode, @@ -25521,7 +26408,7 @@ class Prism::ParseResult < ::Prism::Result # Implement the hash pattern matching interface for ParseResult. # - # source://prism//lib/prism/parse_result.rb#509 + # source://prism//lib/prism/parse_result.rb#587 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -25532,7 +26419,7 @@ class Prism::ParseResult < ::Prism::Result # 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#578 sig { returns(Prism::ProgramNode) } def value; end end @@ -25697,50 +26584,50 @@ 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 +26721,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 +26734,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 +26747,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 +26798,13 @@ end # foo in ^(bar) # ^^^^^^ # -# source://prism//lib/prism/node.rb#15743 +# source://prism//lib/prism/node.rb#14854 class Prism::PinnedExpressionNode < ::Prism::Node # def initialize: (Prism::node expression, Location operator_loc, Location lparen_loc, Location rparen_loc, Location location) -> void # # @return [PinnedExpressionNode] a new instance of PinnedExpressionNode # - # source://prism//lib/prism/node.rb#15745 + # source://prism//lib/prism/node.rb#14856 sig do params( source: Prism::Source, @@ -25928,36 +26820,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#14973 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15756 + # source://prism//lib/prism/node.rb#14867 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15761 + # source://prism//lib/prism/node.rb#14872 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15771 + # source://prism//lib/prism/node.rb#14882 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15766 + # source://prism//lib/prism/node.rb#14877 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?expression: Prism::node, ?operator_loc: Location, ?lparen_loc: Location, ?rparen_loc: Location, ?location: Location) -> PinnedExpressionNode # - # source://prism//lib/prism/node.rb#15776 + # source://prism//lib/prism/node.rb#14887 sig do params( expression: Prism::Node, @@ -25972,64 +26864,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#14872 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { expression: Prism::node, operator_loc: Location, lparen_loc: Location, rparen_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#15784 + # source://prism//lib/prism/node.rb#14895 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader expression: Prism::node # - # source://prism//lib/prism/node.rb#15789 + # source://prism//lib/prism/node.rb#14900 sig { returns(Prism::Node) } def expression; end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#14939 + sig { override.returns(String) } + def inspect; end # def lparen: () -> String # - # source://prism//lib/prism/node.rb#15818 + # source://prism//lib/prism/node.rb#14929 sig { returns(String) } def lparen; end # attr_reader lparen_loc: Location # - # source://prism//lib/prism/node.rb#15799 + # source://prism//lib/prism/node.rb#14910 sig { returns(Prism::Location) } def lparen_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#15813 + # source://prism//lib/prism/node.rb#14924 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#15792 + # source://prism//lib/prism/node.rb#14903 sig { returns(Prism::Location) } def operator_loc; end # def rparen: () -> String # - # source://prism//lib/prism/node.rb#15823 + # source://prism//lib/prism/node.rb#14934 sig { returns(String) } def rparen; end # attr_reader rparen_loc: Location # - # source://prism//lib/prism/node.rb#15806 + # source://prism//lib/prism/node.rb#14917 sig { returns(Prism::Location) } def rparen_loc; end @@ -26048,7 +26940,7 @@ class Prism::PinnedExpressionNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#15852 + # source://prism//lib/prism/node.rb#14957 sig { override.returns(Symbol) } def type; end @@ -26060,7 +26952,7 @@ class Prism::PinnedExpressionNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#15862 + # source://prism//lib/prism/node.rb#14967 def type; end end end @@ -26070,13 +26962,13 @@ end # foo in ^bar # ^^^^ # -# source://prism//lib/prism/node.rb#15881 +# source://prism//lib/prism/node.rb#14986 class Prism::PinnedVariableNode < ::Prism::Node # def initialize: (Prism::node variable, Location operator_loc, Location location) -> void # # @return [PinnedVariableNode] a new instance of PinnedVariableNode # - # source://prism//lib/prism/node.rb#15883 + # source://prism//lib/prism/node.rb#14988 sig do params( source: Prism::Source, @@ -26090,36 +26982,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#15079 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15892 + # source://prism//lib/prism/node.rb#14997 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15897 + # source://prism//lib/prism/node.rb#15002 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15907 + # source://prism//lib/prism/node.rb#15012 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15902 + # source://prism//lib/prism/node.rb#15007 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?variable: Prism::node, ?operator_loc: Location, ?location: Location) -> PinnedVariableNode # - # source://prism//lib/prism/node.rb#15912 + # source://prism//lib/prism/node.rb#15017 sig do params( variable: Prism::Node, @@ -26132,34 +27024,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#15002 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { variable: Prism::node, operator_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#15920 + # source://prism//lib/prism/node.rb#15025 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#15045 + sig { override.returns(String) } + def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#15935 + # source://prism//lib/prism/node.rb#15040 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#15928 + # source://prism//lib/prism/node.rb#15033 sig { returns(Prism::Location) } def operator_loc; end @@ -26178,13 +27070,13 @@ class Prism::PinnedVariableNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#15962 + # source://prism//lib/prism/node.rb#15063 sig { override.returns(Symbol) } def type; end # attr_reader variable: Prism::node # - # source://prism//lib/prism/node.rb#15925 + # source://prism//lib/prism/node.rb#15030 sig { returns(Prism::Node) } def variable; end @@ -26196,7 +27088,7 @@ class Prism::PinnedVariableNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#15972 + # source://prism//lib/prism/node.rb#15073 def type; end end end @@ -26206,13 +27098,13 @@ end # END { foo } # ^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#15989 +# source://prism//lib/prism/node.rb#15090 class Prism::PostExecutionNode < ::Prism::Node # def initialize: (StatementsNode? statements, Location keyword_loc, Location opening_loc, Location closing_loc, Location location) -> void # # @return [PostExecutionNode] a new instance of PostExecutionNode # - # source://prism//lib/prism/node.rb#15991 + # source://prism//lib/prism/node.rb#15092 sig do params( source: Prism::Source, @@ -26228,48 +27120,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#15211 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16002 + # source://prism//lib/prism/node.rb#15103 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16007 + # source://prism//lib/prism/node.rb#15108 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#16071 + # source://prism//lib/prism/node.rb#15172 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#16054 + # source://prism//lib/prism/node.rb#15155 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16019 + # source://prism//lib/prism/node.rb#15120 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16012 + # source://prism//lib/prism/node.rb#15113 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?statements: StatementsNode?, ?keyword_loc: Location, ?opening_loc: Location, ?closing_loc: Location, ?location: Location) -> PostExecutionNode # - # source://prism//lib/prism/node.rb#16024 + # source://prism//lib/prism/node.rb#15125 sig do params( statements: T.nilable(Prism::StatementsNode), @@ -26284,52 +27176,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#15108 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#16032 + # source://prism//lib/prism/node.rb#15133 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#15177 + sig { override.returns(String) } + def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#16061 + # source://prism//lib/prism/node.rb#15162 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#16040 + # source://prism//lib/prism/node.rb#15141 sig { returns(Prism::Location) } def keyword_loc; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#16066 + # source://prism//lib/prism/node.rb#15167 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#16047 + # source://prism//lib/prism/node.rb#15148 sig { returns(Prism::Location) } def opening_loc; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#16037 + # source://prism//lib/prism/node.rb#15138 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -26348,7 +27240,7 @@ class Prism::PostExecutionNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#16104 + # source://prism//lib/prism/node.rb#15195 sig { override.returns(Symbol) } def type; end @@ -26360,7 +27252,7 @@ class Prism::PostExecutionNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#16114 + # source://prism//lib/prism/node.rb#15205 def type; end end end @@ -26370,13 +27262,13 @@ end # BEGIN { foo } # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#16133 +# source://prism//lib/prism/node.rb#15224 class Prism::PreExecutionNode < ::Prism::Node # def initialize: (StatementsNode? statements, Location keyword_loc, Location opening_loc, Location closing_loc, Location location) -> void # # @return [PreExecutionNode] a new instance of PreExecutionNode # - # source://prism//lib/prism/node.rb#16135 + # source://prism//lib/prism/node.rb#15226 sig do params( source: Prism::Source, @@ -26392,48 +27284,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#15345 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16146 + # source://prism//lib/prism/node.rb#15237 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16151 + # source://prism//lib/prism/node.rb#15242 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#16215 + # source://prism//lib/prism/node.rb#15306 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#16198 + # source://prism//lib/prism/node.rb#15289 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16163 + # source://prism//lib/prism/node.rb#15254 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16156 + # source://prism//lib/prism/node.rb#15247 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?statements: StatementsNode?, ?keyword_loc: Location, ?opening_loc: Location, ?closing_loc: Location, ?location: Location) -> PreExecutionNode # - # source://prism//lib/prism/node.rb#16168 + # source://prism//lib/prism/node.rb#15259 sig do params( statements: T.nilable(Prism::StatementsNode), @@ -26448,52 +27340,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#15242 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#16176 + # source://prism//lib/prism/node.rb#15267 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#15311 + sig { override.returns(String) } + def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#16205 + # source://prism//lib/prism/node.rb#15296 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#16184 + # source://prism//lib/prism/node.rb#15275 sig { returns(Prism::Location) } def keyword_loc; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#16210 + # source://prism//lib/prism/node.rb#15301 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#16191 + # source://prism//lib/prism/node.rb#15282 sig { returns(Prism::Location) } def opening_loc; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#16181 + # source://prism//lib/prism/node.rb#15272 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -26512,7 +27404,7 @@ class Prism::PreExecutionNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#16248 + # source://prism//lib/prism/node.rb#15329 sig { override.returns(Symbol) } def type; end @@ -26524,20 +27416,20 @@ class Prism::PreExecutionNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#16258 + # source://prism//lib/prism/node.rb#15339 def type; end end end # The top level node of any parse tree. # -# source://prism//lib/prism/node.rb#16274 +# source://prism//lib/prism/node.rb#15355 class Prism::ProgramNode < ::Prism::Node # def initialize: (Array[Symbol] locals, StatementsNode statements, Location location) -> void # # @return [ProgramNode] a new instance of ProgramNode # - # source://prism//lib/prism/node.rb#16276 + # source://prism//lib/prism/node.rb#15357 sig do params( source: Prism::Source, @@ -26551,36 +27443,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#15439 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16285 + # source://prism//lib/prism/node.rb#15366 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16290 + # source://prism//lib/prism/node.rb#15371 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16300 + # source://prism//lib/prism/node.rb#15381 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16295 + # source://prism//lib/prism/node.rb#15376 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?locals: Array[Symbol], ?statements: StatementsNode, ?location: Location) -> ProgramNode # - # source://prism//lib/prism/node.rb#16305 + # source://prism//lib/prism/node.rb#15386 sig do params( locals: T::Array[Symbol], @@ -26593,34 +27485,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#15371 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], statements: StatementsNode, location: Location } # - # source://prism//lib/prism/node.rb#16313 + # source://prism//lib/prism/node.rb#15394 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#15405 + 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#15399 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#15402 sig { returns(Prism::StatementsNode) } def statements; end @@ -26639,7 +27531,7 @@ class Prism::ProgramNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#16346 + # source://prism//lib/prism/node.rb#15423 sig { override.returns(Symbol) } def type; end @@ -26651,19 +27543,19 @@ class Prism::ProgramNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#16356 + # source://prism//lib/prism/node.rb#15433 def type; end end end # Flags for range and flip-flop nodes. # -# source://prism//lib/prism/node.rb#20415 +# source://prism//lib/prism/node.rb#19283 module Prism::RangeFlags; end # ... operator # -# source://prism//lib/prism/node.rb#20417 +# source://prism//lib/prism/node.rb#19285 Prism::RangeFlags::EXCLUDE_END = T.let(T.unsafe(nil), Integer) # Represents the use of the `..` or `...` operators. @@ -26674,13 +27566,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#15454 class Prism::RangeNode < ::Prism::Node # def initialize: (Integer flags, Prism::node? left, Prism::node? right, Location operator_loc, Location location) -> void # # @return [RangeNode] a new instance of RangeNode # - # source://prism//lib/prism/node.rb#16379 + # source://prism//lib/prism/node.rb#15456 sig do params( source: Prism::Source, @@ -26696,36 +27588,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#15577 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16390 + # source://prism//lib/prism/node.rb#15467 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16395 + # source://prism//lib/prism/node.rb#15472 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16408 + # source://prism//lib/prism/node.rb#15485 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16400 + # source://prism//lib/prism/node.rb#15477 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?left: Prism::node?, ?right: Prism::node?, ?operator_loc: Location, ?location: Location) -> RangeNode # - # source://prism//lib/prism/node.rb#16413 + # source://prism//lib/prism/node.rb#15490 sig do params( flags: Integer, @@ -26740,13 +27632,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#15472 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, left: Prism::node?, right: Prism::node?, operator_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#16421 + # source://prism//lib/prism/node.rb#15498 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -26754,18 +27646,18 @@ class Prism::RangeNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16456 + # source://prism//lib/prism/node.rb#15533 sig { returns(T::Boolean) } def exclude_end?; end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#15543 + sig { override.returns(String) } + def inspect; end # The left-hand side of the range, if present. It can be either `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). # @@ -26775,19 +27667,19 @@ class Prism::RangeNode < ::Prism::Node # hello...goodbye # ^^^^^ # - # source://prism//lib/prism/node.rb#16436 + # source://prism//lib/prism/node.rb#15513 sig { returns(T.nilable(Prism::Node)) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#16461 + # source://prism//lib/prism/node.rb#15538 sig { returns(String) } def operator; end # The location of the `..` or `...` operator. # - # source://prism//lib/prism/node.rb#16449 + # source://prism//lib/prism/node.rb#15526 sig { returns(Prism::Location) } def operator_loc; end @@ -26800,7 +27692,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#15523 sig { returns(T.nilable(Prism::Node)) } def right; end @@ -26819,7 +27711,7 @@ class Prism::RangeNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#16500 + # source://prism//lib/prism/node.rb#15561 sig { override.returns(Symbol) } def type; end @@ -26827,7 +27719,7 @@ class Prism::RangeNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#16426 + # source://prism//lib/prism/node.rb#15503 sig { returns(Integer) } def flags; end @@ -26839,7 +27731,7 @@ class Prism::RangeNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#16510 + # source://prism//lib/prism/node.rb#15571 def type; end end end @@ -26849,77 +27741,77 @@ end # 1.0r # ^^^^ # -# source://prism//lib/prism/node.rb#16529 +# source://prism//lib/prism/node.rb#15590 class Prism::RationalNode < ::Prism::Node # def initialize: (Prism::node numeric, Location location) -> void # # @return [RationalNode] a new instance of RationalNode # - # source://prism//lib/prism/node.rb#16531 + # source://prism//lib/prism/node.rb#15592 sig { params(source: Prism::Source, numeric: Prism::Node, location: Prism::Location).void } def initialize(source, numeric, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#16612 + # source://prism//lib/prism/node.rb#15670 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16539 + # source://prism//lib/prism/node.rb#15600 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16544 + # source://prism//lib/prism/node.rb#15605 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16554 + # source://prism//lib/prism/node.rb#15615 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16549 + # source://prism//lib/prism/node.rb#15610 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?numeric: Prism::node, ?location: Location) -> RationalNode # - # source://prism//lib/prism/node.rb#16559 + # source://prism//lib/prism/node.rb#15620 sig { params(numeric: Prism::Node, location: Prism::Location).returns(Prism::RationalNode) } def copy(numeric: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16544 + # source://prism//lib/prism/node.rb#15605 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { numeric: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#16567 + # source://prism//lib/prism/node.rb#15628 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(NodeInspector inspector) -> String + # 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#15636 + sig { override.returns(String) } + def inspect; end # attr_reader numeric: Prism::node # - # source://prism//lib/prism/node.rb#16572 + # source://prism//lib/prism/node.rb#15633 sig { returns(Prism::Node) } def numeric; end @@ -26938,7 +27830,7 @@ class Prism::RationalNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#16596 + # source://prism//lib/prism/node.rb#15654 sig { override.returns(Symbol) } def type; end @@ -26956,7 +27848,7 @@ class Prism::RationalNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#16606 + # source://prism//lib/prism/node.rb#15664 def type; end end end @@ -26966,73 +27858,73 @@ end # redo # ^^^^ # -# source://prism//lib/prism/node.rb#16622 +# source://prism//lib/prism/node.rb#15680 class Prism::RedoNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [RedoNode] a new instance of RedoNode # - # source://prism//lib/prism/node.rb#16624 + # source://prism//lib/prism/node.rb#15682 sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#16699 + # source://prism//lib/prism/node.rb#15756 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16631 + # source://prism//lib/prism/node.rb#15689 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16636 + # source://prism//lib/prism/node.rb#15694 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16646 + # source://prism//lib/prism/node.rb#15704 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16641 + # source://prism//lib/prism/node.rb#15699 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?location: Location) -> RedoNode # - # source://prism//lib/prism/node.rb#16651 + # source://prism//lib/prism/node.rb#15709 sig { params(location: Prism::Location).returns(Prism::RedoNode) } def copy(location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16636 + # source://prism//lib/prism/node.rb#15694 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } # - # source://prism//lib/prism/node.rb#16659 + # source://prism//lib/prism/node.rb#15717 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#15722 + sig { override.returns(String) } + def inspect; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by @@ -27049,7 +27941,7 @@ class Prism::RedoNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#16683 + # source://prism//lib/prism/node.rb#15740 sig { override.returns(Symbol) } def type; end @@ -27061,7 +27953,7 @@ class Prism::RedoNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#16693 + # source://prism//lib/prism/node.rb#15750 def type; end end end @@ -27198,62 +28090,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#19289 module Prism::RegularExpressionFlags; end # n - forces the ASCII-8BIT encoding # -# source://prism//lib/prism/node.rb#20438 +# source://prism//lib/prism/node.rb#19306 Prism::RegularExpressionFlags::ASCII_8BIT = T.let(T.unsafe(nil), Integer) # e - forces the EUC-JP encoding # -# source://prism//lib/prism/node.rb#20435 +# source://prism//lib/prism/node.rb#19303 Prism::RegularExpressionFlags::EUC_JP = T.let(T.unsafe(nil), Integer) # x - ignores whitespace and allows comments in regular expressions # -# source://prism//lib/prism/node.rb#20426 +# source://prism//lib/prism/node.rb#19294 Prism::RegularExpressionFlags::EXTENDED = T.let(T.unsafe(nil), Integer) # internal bytes forced the encoding to binary # -# source://prism//lib/prism/node.rb#20450 +# source://prism//lib/prism/node.rb#19318 Prism::RegularExpressionFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer) # internal bytes forced the encoding to US-ASCII # -# source://prism//lib/prism/node.rb#20453 +# source://prism//lib/prism/node.rb#19321 Prism::RegularExpressionFlags::FORCED_US_ASCII_ENCODING = T.let(T.unsafe(nil), Integer) # internal bytes forced the encoding to UTF-8 # -# source://prism//lib/prism/node.rb#20447 +# source://prism//lib/prism/node.rb#19315 Prism::RegularExpressionFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # i - ignores the case of characters when matching # -# source://prism//lib/prism/node.rb#20423 +# source://prism//lib/prism/node.rb#19291 Prism::RegularExpressionFlags::IGNORE_CASE = T.let(T.unsafe(nil), Integer) # m - allows $ to match the end of lines within strings # -# source://prism//lib/prism/node.rb#20429 +# source://prism//lib/prism/node.rb#19297 Prism::RegularExpressionFlags::MULTI_LINE = T.let(T.unsafe(nil), Integer) # o - only interpolates values into the regular expression once # -# source://prism//lib/prism/node.rb#20432 +# source://prism//lib/prism/node.rb#19300 Prism::RegularExpressionFlags::ONCE = T.let(T.unsafe(nil), Integer) # u - forces the UTF-8 encoding # -# source://prism//lib/prism/node.rb#20444 +# source://prism//lib/prism/node.rb#19312 Prism::RegularExpressionFlags::UTF_8 = T.let(T.unsafe(nil), Integer) # s - forces the Windows-31J encoding # -# source://prism//lib/prism/node.rb#20441 +# source://prism//lib/prism/node.rb#19309 Prism::RegularExpressionFlags::WINDOWS_31J = T.let(T.unsafe(nil), Integer) # Represents a regular expression literal with no interpolation. @@ -27261,7 +28153,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#15765 class Prism::RegularExpressionNode < ::Prism::Node include ::Prism::RegularExpressionOptions @@ -27269,7 +28161,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#15767 sig do params( source: Prism::Source, @@ -27286,12 +28178,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#15944 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16722 + # source://prism//lib/prism/node.rb#15779 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -27299,55 +28191,55 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16808 + # source://prism//lib/prism/node.rb#15865 sig { returns(T::Boolean) } def ascii_8bit?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16727 + # source://prism//lib/prism/node.rb#15784 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#16848 + # source://prism//lib/prism/node.rb#15905 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#16773 + # source://prism//lib/prism/node.rb#15830 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16737 + # source://prism//lib/prism/node.rb#15794 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16732 + # source://prism//lib/prism/node.rb#15789 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def content: () -> String # - # source://prism//lib/prism/node.rb#16843 + # source://prism//lib/prism/node.rb#15900 sig { returns(String) } def content; end # attr_reader content_loc: Location # - # source://prism//lib/prism/node.rb#16766 + # source://prism//lib/prism/node.rb#15823 sig { returns(Prism::Location) } def content_loc; end # def copy: (?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String, ?location: Location) -> RegularExpressionNode # - # source://prism//lib/prism/node.rb#16742 + # source://prism//lib/prism/node.rb#15799 sig do params( flags: Integer, @@ -27363,13 +28255,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#15784 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location } # - # source://prism//lib/prism/node.rb#16750 + # source://prism//lib/prism/node.rb#15807 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -27377,7 +28269,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16803 + # source://prism//lib/prism/node.rb#15860 sig { returns(T::Boolean) } def euc_jp?; end @@ -27385,7 +28277,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16788 + # source://prism//lib/prism/node.rb#15845 sig { returns(T::Boolean) } def extended?; end @@ -27396,7 +28288,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16828 + # source://prism//lib/prism/node.rb#15885 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -27404,7 +28296,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16833 + # source://prism//lib/prism/node.rb#15890 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end @@ -27412,7 +28304,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16823 + # source://prism//lib/prism/node.rb#15880 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -27420,21 +28312,21 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16783 + # source://prism//lib/prism/node.rb#15840 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#15910 + 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#15850 sig { returns(T::Boolean) } def multi_line?; end @@ -27442,19 +28334,19 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16798 + # source://prism//lib/prism/node.rb#15855 sig { returns(T::Boolean) } def once?; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#16838 + # source://prism//lib/prism/node.rb#15895 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#16759 + # source://prism//lib/prism/node.rb#15816 sig { returns(Prism::Location) } def opening_loc; end @@ -27476,13 +28368,13 @@ class Prism::RegularExpressionNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#16878 + # source://prism//lib/prism/node.rb#15928 sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#16780 + # source://prism//lib/prism/node.rb#15837 sig { returns(String) } def unescaped; end @@ -27490,7 +28382,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16818 + # source://prism//lib/prism/node.rb#15875 sig { returns(T::Boolean) } def utf_8?; end @@ -27498,7 +28390,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16813 + # source://prism//lib/prism/node.rb#15870 sig { returns(T::Boolean) } def windows_31j?; end @@ -27506,7 +28398,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#16755 + # source://prism//lib/prism/node.rb#15812 sig { returns(Integer) } def flags; end @@ -27518,7 +28410,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#16888 + # source://prism//lib/prism/node.rb#15938 def type; end end end @@ -27538,13 +28430,13 @@ end # ^^ # end # -# source://prism//lib/prism/node.rb#16909 +# source://prism//lib/prism/node.rb#15959 class Prism::RequiredKeywordParameterNode < ::Prism::Node # def initialize: (Integer flags, Symbol name, Location name_loc, Location location) -> void # # @return [RequiredKeywordParameterNode] a new instance of RequiredKeywordParameterNode # - # source://prism//lib/prism/node.rb#16911 + # source://prism//lib/prism/node.rb#15961 sig do params( source: Prism::Source, @@ -27559,36 +28451,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#16057 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16921 + # source://prism//lib/prism/node.rb#15971 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16926 + # source://prism//lib/prism/node.rb#15976 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16936 + # source://prism//lib/prism/node.rb#15986 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16931 + # source://prism//lib/prism/node.rb#15981 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?name: Symbol, ?name_loc: Location, ?location: Location) -> RequiredKeywordParameterNode # - # source://prism//lib/prism/node.rb#16941 + # source://prism//lib/prism/node.rb#15991 sig do params( flags: Integer, @@ -27602,34 +28494,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#15976 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, name_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#16949 + # source://prism//lib/prism/node.rb#15999 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#16023 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#16958 + # source://prism//lib/prism/node.rb#16008 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#16961 + # source://prism//lib/prism/node.rb#16011 sig { returns(Prism::Location) } def name_loc; end @@ -27637,7 +28529,7 @@ class Prism::RequiredKeywordParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16968 + # source://prism//lib/prism/node.rb#16018 sig { returns(T::Boolean) } def repeated_parameter?; end @@ -27656,7 +28548,7 @@ class Prism::RequiredKeywordParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#16996 + # source://prism//lib/prism/node.rb#16041 sig { override.returns(Symbol) } def type; end @@ -27664,7 +28556,7 @@ class Prism::RequiredKeywordParameterNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#16954 + # source://prism//lib/prism/node.rb#16004 sig { returns(Integer) } def flags; end @@ -27676,7 +28568,7 @@ class Prism::RequiredKeywordParameterNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#17006 + # source://prism//lib/prism/node.rb#16051 def type; end end end @@ -27687,77 +28579,77 @@ end # ^ # end # -# source://prism//lib/prism/node.rb#17025 +# source://prism//lib/prism/node.rb#16070 class Prism::RequiredParameterNode < ::Prism::Node # def initialize: (Integer flags, Symbol name, Location location) -> void # # @return [RequiredParameterNode] a new instance of RequiredParameterNode # - # source://prism//lib/prism/node.rb#17027 + # source://prism//lib/prism/node.rb#16072 sig { params(source: Prism::Source, flags: Integer, name: Symbol, location: Prism::Location).void } def initialize(source, flags, name, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#17119 + # source://prism//lib/prism/node.rb#16160 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17036 + # source://prism//lib/prism/node.rb#16081 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17041 + # source://prism//lib/prism/node.rb#16086 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17051 + # source://prism//lib/prism/node.rb#16096 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17046 + # source://prism//lib/prism/node.rb#16091 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?name: Symbol, ?location: Location) -> RequiredParameterNode # - # source://prism//lib/prism/node.rb#17056 + # source://prism//lib/prism/node.rb#16101 sig { params(flags: Integer, name: Symbol, location: Prism::Location).returns(Prism::RequiredParameterNode) } def copy(flags: T.unsafe(nil), name: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17041 + # source://prism//lib/prism/node.rb#16086 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, location: Location } # - # source://prism//lib/prism/node.rb#17064 + # source://prism//lib/prism/node.rb#16109 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#16126 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#17073 + # source://prism//lib/prism/node.rb#16118 sig { returns(Symbol) } def name; end @@ -27765,7 +28657,7 @@ class Prism::RequiredParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#17076 + # source://prism//lib/prism/node.rb#16121 sig { returns(T::Boolean) } def repeated_parameter?; end @@ -27784,7 +28676,7 @@ class Prism::RequiredParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#17103 + # source://prism//lib/prism/node.rb#16144 sig { override.returns(Symbol) } def type; end @@ -27792,7 +28684,7 @@ class Prism::RequiredParameterNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#17069 + # source://prism//lib/prism/node.rb#16114 sig { returns(Integer) } def flags; end @@ -27804,7 +28696,7 @@ class Prism::RequiredParameterNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#17113 + # source://prism//lib/prism/node.rb#16154 def type; end end end @@ -27814,13 +28706,13 @@ end # foo rescue nil # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#17130 +# source://prism//lib/prism/node.rb#16171 class Prism::RescueModifierNode < ::Prism::Node # def initialize: (Prism::node expression, Location keyword_loc, Prism::node rescue_expression, Location location) -> void # # @return [RescueModifierNode] a new instance of RescueModifierNode # - # source://prism//lib/prism/node.rb#17132 + # source://prism//lib/prism/node.rb#16173 sig do params( source: Prism::Source, @@ -27835,36 +28727,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#16272 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17142 + # source://prism//lib/prism/node.rb#16183 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17151 + # source://prism//lib/prism/node.rb#16192 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17161 + # source://prism//lib/prism/node.rb#16202 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17156 + # source://prism//lib/prism/node.rb#16197 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?expression: Prism::node, ?keyword_loc: Location, ?rescue_expression: Prism::node, ?location: Location) -> RescueModifierNode # - # source://prism//lib/prism/node.rb#17166 + # source://prism//lib/prism/node.rb#16207 sig do params( expression: Prism::Node, @@ -27878,50 +28770,50 @@ 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#16192 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { expression: Prism::node, keyword_loc: Location, rescue_expression: Prism::node, location: Location } # - # source://prism//lib/prism/node.rb#17174 + # source://prism//lib/prism/node.rb#16215 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader expression: Prism::node # - # source://prism//lib/prism/node.rb#17179 + # source://prism//lib/prism/node.rb#16220 sig { returns(Prism::Node) } def expression; end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#16238 + sig { override.returns(String) } + def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#17192 + # source://prism//lib/prism/node.rb#16233 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#17182 + # source://prism//lib/prism/node.rb#16223 sig { returns(Prism::Location) } def keyword_loc; end # attr_reader rescue_expression: Prism::node # - # source://prism//lib/prism/node.rb#17189 + # source://prism//lib/prism/node.rb#16230 sig { returns(Prism::Node) } def rescue_expression; end - # source://prism//lib/prism/node.rb#17146 + # source://prism//lib/prism/node.rb#16187 def set_newline_flag(newline_marked); end # Sometimes you want to check an instance of a node against a list of @@ -27939,7 +28831,7 @@ class Prism::RescueModifierNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#17221 + # source://prism//lib/prism/node.rb#16256 sig { override.returns(Symbol) } def type; end @@ -27951,7 +28843,7 @@ class Prism::RescueModifierNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#17231 + # source://prism//lib/prism/node.rb#16266 def type; end end end @@ -27966,13 +28858,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#16289 class Prism::RescueNode < ::Prism::Node # def initialize: (Location keyword_loc, Array[Prism::node] exceptions, Location? operator_loc, Prism::node? reference, StatementsNode? statements, RescueNode? consequent, Location location) -> void # # @return [RescueNode] a new instance of RescueNode # - # source://prism//lib/prism/node.rb#17256 + # source://prism//lib/prism/node.rb#16291 sig do params( source: Prism::Source, @@ -27990,42 +28882,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#16418 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17269 + # source://prism//lib/prism/node.rb#16304 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17274 + # source://prism//lib/prism/node.rb#16309 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17289 + # source://prism//lib/prism/node.rb#16324 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17279 + # source://prism//lib/prism/node.rb#16314 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader consequent: RescueNode? # - # source://prism//lib/prism/node.rb#17336 + # source://prism//lib/prism/node.rb#16371 sig { returns(T.nilable(Prism::RescueNode)) } def consequent; end # def copy: (?keyword_loc: Location, ?exceptions: Array[Prism::node], ?operator_loc: Location?, ?reference: Prism::node?, ?statements: StatementsNode?, ?consequent: RescueNode?, ?location: Location) -> RescueNode # - # source://prism//lib/prism/node.rb#17294 + # source://prism//lib/prism/node.rb#16329 sig do params( keyword_loc: Prism::Location, @@ -28042,64 +28934,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#16309 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, exceptions: Array[Prism::node], operator_loc: Location?, reference: Prism::node?, statements: StatementsNode?, consequent: RescueNode?, location: Location } # - # source://prism//lib/prism/node.rb#17302 + # source://prism//lib/prism/node.rb#16337 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader exceptions: Array[Prism::node] # - # source://prism//lib/prism/node.rb#17314 + # source://prism//lib/prism/node.rb#16349 sig { returns(T::Array[Prism::Node]) } def exceptions; end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#16384 + sig { override.returns(String) } + def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#17339 + # source://prism//lib/prism/node.rb#16374 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#17307 + # source://prism//lib/prism/node.rb#16342 sig { returns(Prism::Location) } def keyword_loc; end # def operator: () -> String? # - # source://prism//lib/prism/node.rb#17344 + # source://prism//lib/prism/node.rb#16379 sig { returns(T.nilable(String)) } def operator; end # attr_reader operator_loc: Location? # - # source://prism//lib/prism/node.rb#17317 + # source://prism//lib/prism/node.rb#16352 sig { returns(T.nilable(Prism::Location)) } def operator_loc; end # attr_reader reference: Prism::node? # - # source://prism//lib/prism/node.rb#17330 + # source://prism//lib/prism/node.rb#16365 sig { returns(T.nilable(Prism::Node)) } def reference; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#17333 + # source://prism//lib/prism/node.rb#16368 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -28118,7 +29010,7 @@ class Prism::RescueNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#17389 + # source://prism//lib/prism/node.rb#16402 sig { override.returns(Symbol) } def type; end @@ -28130,7 +29022,7 @@ class Prism::RescueNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#17399 + # source://prism//lib/prism/node.rb#16412 def type; end end end @@ -28141,13 +29033,13 @@ end # ^^ # end # -# source://prism//lib/prism/node.rb#17422 +# source://prism//lib/prism/node.rb#16435 class Prism::RestParameterNode < ::Prism::Node # def initialize: (Integer flags, Symbol? name, Location? name_loc, Location operator_loc, Location location) -> void # # @return [RestParameterNode] a new instance of RestParameterNode # - # source://prism//lib/prism/node.rb#17424 + # source://prism//lib/prism/node.rb#16437 sig do params( source: Prism::Source, @@ -28163,36 +29055,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#16552 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17435 + # source://prism//lib/prism/node.rb#16448 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17440 + # source://prism//lib/prism/node.rb#16453 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17450 + # source://prism//lib/prism/node.rb#16463 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17445 + # source://prism//lib/prism/node.rb#16458 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location, ?location: Location) -> RestParameterNode # - # source://prism//lib/prism/node.rb#17455 + # source://prism//lib/prism/node.rb#16468 sig do params( flags: Integer, @@ -28207,46 +29099,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#16453 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#17463 + # source://prism//lib/prism/node.rb#16476 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#16518 + sig { override.returns(String) } + def inspect; end # attr_reader name: Symbol? # - # source://prism//lib/prism/node.rb#17472 + # source://prism//lib/prism/node.rb#16485 sig { returns(T.nilable(Symbol)) } def name; end # attr_reader name_loc: Location? # - # source://prism//lib/prism/node.rb#17475 + # source://prism//lib/prism/node.rb#16488 sig { returns(T.nilable(Prism::Location)) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#17500 + # source://prism//lib/prism/node.rb#16513 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#17488 + # source://prism//lib/prism/node.rb#16501 sig { returns(Prism::Location) } def operator_loc; end @@ -28254,7 +29146,7 @@ class Prism::RestParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#17495 + # source://prism//lib/prism/node.rb#16508 sig { returns(T::Boolean) } def repeated_parameter?; end @@ -28273,7 +29165,7 @@ class Prism::RestParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#17533 + # source://prism//lib/prism/node.rb#16536 sig { override.returns(Symbol) } def type; end @@ -28281,7 +29173,7 @@ class Prism::RestParameterNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#17468 + # source://prism//lib/prism/node.rb#16481 sig { returns(Integer) } def flags; end @@ -28293,7 +29185,7 @@ class Prism::RestParameterNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#17543 + # source://prism//lib/prism/node.rb#16546 def type; end end end @@ -28302,13 +29194,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 +29215,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 +29223,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 +29250,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 +29271,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 +29287,73 @@ end # retry # ^^^^^ # -# source://prism//lib/prism/node.rb#17562 +# source://prism//lib/prism/node.rb#16565 class Prism::RetryNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [RetryNode] a new instance of RetryNode # - # source://prism//lib/prism/node.rb#17564 + # source://prism//lib/prism/node.rb#16567 sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#17639 + # source://prism//lib/prism/node.rb#16641 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17571 + # source://prism//lib/prism/node.rb#16574 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17576 + # source://prism//lib/prism/node.rb#16579 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17586 + # source://prism//lib/prism/node.rb#16589 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17581 + # source://prism//lib/prism/node.rb#16584 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?location: Location) -> RetryNode # - # source://prism//lib/prism/node.rb#17591 + # source://prism//lib/prism/node.rb#16594 sig { params(location: Prism::Location).returns(Prism::RetryNode) } def copy(location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17576 + # source://prism//lib/prism/node.rb#16579 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } # - # source://prism//lib/prism/node.rb#17599 + # source://prism//lib/prism/node.rb#16602 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#16607 + sig { override.returns(String) } + def inspect; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by @@ -28478,7 +29370,7 @@ class Prism::RetryNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#17623 + # source://prism//lib/prism/node.rb#16625 sig { override.returns(Symbol) } def type; end @@ -28490,7 +29382,7 @@ class Prism::RetryNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#17633 + # source://prism//lib/prism/node.rb#16635 def type; end end end @@ -28500,105 +29392,115 @@ end # return 1 # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#17648 +# source://prism//lib/prism/node.rb#16650 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#16652 sig do params( source: Prism::Source, + flags: Integer, keyword_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), location: Prism::Location ).void end - def initialize(source, 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#16755 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17659 + # source://prism//lib/prism/node.rb#16662 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#17701 + # source://prism//lib/prism/node.rb#16708 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17664 + # source://prism//lib/prism/node.rb#16667 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17676 + # source://prism//lib/prism/node.rb#16679 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17669 + # source://prism//lib/prism/node.rb#16672 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#16684 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#16667 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#16692 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#16721 + sig { override.returns(String) } + def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#17704 + # source://prism//lib/prism/node.rb#16716 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#17694 + # source://prism//lib/prism/node.rb#16701 sig { returns(Prism::Location) } def keyword_loc; end + # def redundant?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16711 + sig { returns(T::Boolean) } + def redundant?; end + # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a @@ -28614,10 +29516,18 @@ class Prism::ReturnNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#17735 + # source://prism//lib/prism/node.rb#16739 sig { override.returns(Symbol) } def type; end + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#16697 + sig { returns(Integer) } + def flags; end + class << self # Similar to #type, this method returns a symbol that you can use for # splitting on the type of the node without having to do a long === chain. @@ -28626,83 +29536,93 @@ class Prism::ReturnNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#17745 + # source://prism//lib/prism/node.rb#16749 def type; end end end +# Flags for return nodes. +# +# source://prism//lib/prism/node.rb#19325 +module Prism::ReturnNodeFlags; end + +# a return statement that is redundant because it is the last statement in a method +# +# source://prism//lib/prism/node.rb#19327 +Prism::ReturnNodeFlags::REDUNDANT = T.let(T.unsafe(nil), Integer) + # Represents the `self` keyword. # # self # ^^^^ # -# source://prism//lib/prism/node.rb#17762 +# source://prism//lib/prism/node.rb#16767 class Prism::SelfNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [SelfNode] a new instance of SelfNode # - # source://prism//lib/prism/node.rb#17764 + # source://prism//lib/prism/node.rb#16769 sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#17839 + # source://prism//lib/prism/node.rb#16843 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17771 + # source://prism//lib/prism/node.rb#16776 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17776 + # source://prism//lib/prism/node.rb#16781 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17786 + # source://prism//lib/prism/node.rb#16791 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17781 + # source://prism//lib/prism/node.rb#16786 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?location: Location) -> SelfNode # - # source://prism//lib/prism/node.rb#17791 + # source://prism//lib/prism/node.rb#16796 sig { params(location: Prism::Location).returns(Prism::SelfNode) } def copy(location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17776 + # source://prism//lib/prism/node.rb#16781 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } # - # source://prism//lib/prism/node.rb#17799 + # source://prism//lib/prism/node.rb#16804 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#16809 + sig { override.returns(String) } + def inspect; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by @@ -28719,7 +29639,7 @@ class Prism::SelfNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#17823 + # source://prism//lib/prism/node.rb#16827 sig { override.returns(Symbol) } def type; end @@ -28731,7 +29651,7 @@ class Prism::SelfNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#17833 + # source://prism//lib/prism/node.rb#16837 def type; end end end @@ -28798,22 +29718,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#423 def load_metadata; end - # source://prism//lib/prism/serialize.rb#450 + # source://prism//lib/prism/serialize.rb#457 def load_nodes; end - # source://prism//lib/prism/serialize.rb#464 + # source://prism//lib/prism/serialize.rb#471 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#432 def load_tokens; end - # source://prism//lib/prism/serialize.rb#438 + # source://prism//lib/prism/serialize.rb#445 def load_tokens_result; end # Returns the value of attribute serialized. @@ -28833,61 +29753,61 @@ class Prism::Serialize::Loader private - # source://prism//lib/prism/serialize.rb#550 + # source://prism//lib/prism/serialize.rb#557 def load_constant(index); end - # source://prism//lib/prism/serialize.rb#503 + # source://prism//lib/prism/serialize.rb#510 def load_double; end - # source://prism//lib/prism/serialize.rb#518 + # source://prism//lib/prism/serialize.rb#525 def load_embedded_string; end - # source://prism//lib/prism/serialize.rb#580 + # source://prism//lib/prism/serialize.rb#587 def load_error_level; end - # source://prism//lib/prism/serialize.rb#492 + # source://prism//lib/prism/serialize.rb#499 def load_integer; end - # source://prism//lib/prism/serialize.rb#534 + # source://prism//lib/prism/serialize.rb#541 def load_location; end - # source://prism//lib/prism/serialize.rb#538 + # source://prism//lib/prism/serialize.rb#545 def load_location_object; end - # source://prism//lib/prism/serialize.rb#609 + # source://prism//lib/prism/serialize.rb#616 def load_node; end - # source://prism//lib/prism/serialize.rb#575 + # source://prism//lib/prism/serialize.rb#582 def load_optional_constant; end - # source://prism//lib/prism/serialize.rb#542 + # source://prism//lib/prism/serialize.rb#549 def load_optional_location; end - # source://prism//lib/prism/serialize.rb#546 + # source://prism//lib/prism/serialize.rb#553 def load_optional_location_object; end - # source://prism//lib/prism/serialize.rb#511 + # source://prism//lib/prism/serialize.rb#518 def load_optional_node; end - # source://prism//lib/prism/serialize.rb#571 + # source://prism//lib/prism/serialize.rb#578 def load_required_constant; end - # source://prism//lib/prism/serialize.rb#522 + # source://prism//lib/prism/serialize.rb#529 def load_string; end - # source://prism//lib/prism/serialize.rb#507 + # source://prism//lib/prism/serialize.rb#514 def load_uint32; end - # source://prism//lib/prism/serialize.rb#487 + # source://prism//lib/prism/serialize.rb#494 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#480 def load_varuint; end - # source://prism//lib/prism/serialize.rb#595 + # source://prism//lib/prism/serialize.rb#602 def load_warning_level; end end @@ -28919,7 +29839,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#1840 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 +29847,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#16853 class Prism::ShareableConstantNode < ::Prism::Node # def initialize: (Integer flags, ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode write, Location location) -> void # # @return [ShareableConstantNode] a new instance of ShareableConstantNode # - # source://prism//lib/prism/node.rb#17851 + # source://prism//lib/prism/node.rb#16855 sig do params( source: Prism::Source, @@ -28947,36 +29867,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#16953 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17860 + # source://prism//lib/prism/node.rb#16864 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17865 + # source://prism//lib/prism/node.rb#16869 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17875 + # source://prism//lib/prism/node.rb#16879 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17870 + # source://prism//lib/prism/node.rb#16874 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?write: ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode, ?location: Location) -> ShareableConstantNode # - # source://prism//lib/prism/node.rb#17880 + # source://prism//lib/prism/node.rb#16884 sig do params( flags: Integer, @@ -28989,13 +29909,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#16869 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, write: ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode, location: Location } # - # source://prism//lib/prism/node.rb#17888 + # source://prism//lib/prism/node.rb#16892 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -29003,7 +29923,7 @@ class Prism::ShareableConstantNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#17910 + # source://prism//lib/prism/node.rb#16914 sig { returns(T::Boolean) } def experimental_copy?; end @@ -29011,24 +29931,24 @@ class Prism::ShareableConstantNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#17905 + # source://prism//lib/prism/node.rb#16909 sig { returns(T::Boolean) } def experimental_everything?; end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#16919 + 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#16904 sig { returns(T::Boolean) } def literal?; end @@ -29047,13 +29967,13 @@ class Prism::ShareableConstantNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#17938 + # source://prism//lib/prism/node.rb#16937 sig { override.returns(Symbol) } def type; end # The constant write that should be modified with the shareability state. # - # source://prism//lib/prism/node.rb#17897 + # source://prism//lib/prism/node.rb#16901 sig do returns(T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode)) end @@ -29063,7 +29983,7 @@ class Prism::ShareableConstantNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#17893 + # source://prism//lib/prism/node.rb#16897 sig { returns(Integer) } def flags; end @@ -29075,29 +29995,29 @@ class Prism::ShareableConstantNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#17948 + # source://prism//lib/prism/node.rb#16947 def type; end end end # Flags for shareable constant nodes. # -# source://prism//lib/prism/node.rb#20457 +# source://prism//lib/prism/node.rb#19331 module Prism::ShareableConstantNodeFlags; end # constant writes that should be modified with shareable constant value experimental copy # -# source://prism//lib/prism/node.rb#20465 +# source://prism//lib/prism/node.rb#19339 Prism::ShareableConstantNodeFlags::EXPERIMENTAL_COPY = T.let(T.unsafe(nil), Integer) # constant writes that should be modified with shareable constant value experimental everything # -# source://prism//lib/prism/node.rb#20462 +# source://prism//lib/prism/node.rb#19336 Prism::ShareableConstantNodeFlags::EXPERIMENTAL_EVERYTHING = T.let(T.unsafe(nil), Integer) # constant writes that should be modified with shareable constant value literal # -# source://prism//lib/prism/node.rb#20459 +# source://prism//lib/prism/node.rb#19333 Prism::ShareableConstantNodeFlags::LITERAL = T.let(T.unsafe(nil), Integer) # Represents a singleton class declaration involving the `class` keyword. @@ -29105,13 +30025,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#16964 class Prism::SingletonClassNode < ::Prism::Node # def initialize: (Array[Symbol] locals, Location class_keyword_loc, Location operator_loc, Prism::node expression, Prism::node? body, Location end_keyword_loc, Location location) -> void # # @return [SingletonClassNode] a new instance of SingletonClassNode # - # source://prism//lib/prism/node.rb#17967 + # source://prism//lib/prism/node.rb#16966 sig do params( source: Prism::Source, @@ -29129,54 +30049,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#17094 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17980 + # source://prism//lib/prism/node.rb#16979 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: Prism::node? # - # source://prism//lib/prism/node.rb#18036 + # source://prism//lib/prism/node.rb#17035 sig { returns(T.nilable(Prism::Node)) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17985 + # source://prism//lib/prism/node.rb#16984 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def class_keyword: () -> String # - # source://prism//lib/prism/node.rb#18046 + # source://prism//lib/prism/node.rb#17045 sig { returns(String) } def class_keyword; end # attr_reader class_keyword_loc: Location # - # source://prism//lib/prism/node.rb#18019 + # source://prism//lib/prism/node.rb#17018 sig { returns(Prism::Location) } def class_keyword_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17998 + # source://prism//lib/prism/node.rb#16997 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17990 + # source://prism//lib/prism/node.rb#16989 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?locals: Array[Symbol], ?class_keyword_loc: Location, ?operator_loc: Location, ?expression: Prism::node, ?body: Prism::node?, ?end_keyword_loc: Location, ?location: Location) -> SingletonClassNode # - # source://prism//lib/prism/node.rb#18003 + # source://prism//lib/prism/node.rb#17002 sig do params( locals: T::Array[Symbol], @@ -29193,58 +30113,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#16984 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], class_keyword_loc: Location, operator_loc: Location, expression: Prism::node, body: Prism::node?, end_keyword_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#18011 + # source://prism//lib/prism/node.rb#17010 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def end_keyword: () -> String # - # source://prism//lib/prism/node.rb#18056 + # source://prism//lib/prism/node.rb#17055 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#18039 + # source://prism//lib/prism/node.rb#17038 sig { returns(Prism::Location) } def end_keyword_loc; end # attr_reader expression: Prism::node # - # source://prism//lib/prism/node.rb#18033 + # source://prism//lib/prism/node.rb#17032 sig { returns(Prism::Node) } def expression; end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#17060 + 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#17015 sig { returns(T::Array[Symbol]) } def locals; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#18051 + # source://prism//lib/prism/node.rb#17050 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#18026 + # source://prism//lib/prism/node.rb#17025 sig { returns(Prism::Location) } def operator_loc; end @@ -29263,7 +30183,7 @@ class Prism::SingletonClassNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#18092 + # source://prism//lib/prism/node.rb#17078 sig { override.returns(Symbol) } def type; end @@ -29275,7 +30195,7 @@ class Prism::SingletonClassNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#18102 + # source://prism//lib/prism/node.rb#17088 def type; end end end @@ -29290,26 +30210,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 +30240,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[Integer]) } + 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 +30313,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 +30332,73 @@ end # __ENCODING__ # ^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#18124 +# source://prism//lib/prism/node.rb#17110 class Prism::SourceEncodingNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [SourceEncodingNode] a new instance of SourceEncodingNode # - # source://prism//lib/prism/node.rb#18126 + # source://prism//lib/prism/node.rb#17112 sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#18201 + # source://prism//lib/prism/node.rb#17186 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18133 + # source://prism//lib/prism/node.rb#17119 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18138 + # source://prism//lib/prism/node.rb#17124 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18148 + # source://prism//lib/prism/node.rb#17134 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18143 + # source://prism//lib/prism/node.rb#17129 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?location: Location) -> SourceEncodingNode # - # source://prism//lib/prism/node.rb#18153 + # source://prism//lib/prism/node.rb#17139 sig { params(location: Prism::Location).returns(Prism::SourceEncodingNode) } def copy(location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18138 + # source://prism//lib/prism/node.rb#17124 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } # - # source://prism//lib/prism/node.rb#18161 + # source://prism//lib/prism/node.rb#17147 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#17152 + sig { override.returns(String) } + def inspect; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by @@ -29473,7 +30415,7 @@ class Prism::SourceEncodingNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#18185 + # source://prism//lib/prism/node.rb#17170 sig { override.returns(Symbol) } def type; end @@ -29485,7 +30427,7 @@ class Prism::SourceEncodingNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#18195 + # source://prism//lib/prism/node.rb#17180 def type; end end end @@ -29495,62 +30437,62 @@ end # __FILE__ # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#18210 +# source://prism//lib/prism/node.rb#17195 class Prism::SourceFileNode < ::Prism::Node # def initialize: (Integer flags, String filepath, Location location) -> void # # @return [SourceFileNode] a new instance of SourceFileNode # - # source://prism//lib/prism/node.rb#18212 + # source://prism//lib/prism/node.rb#17197 sig { params(source: Prism::Source, flags: Integer, filepath: String, location: Prism::Location).void } def initialize(source, flags, filepath, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#18319 + # source://prism//lib/prism/node.rb#17300 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18221 + # source://prism//lib/prism/node.rb#17206 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18226 + # source://prism//lib/prism/node.rb#17211 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18236 + # source://prism//lib/prism/node.rb#17221 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18231 + # source://prism//lib/prism/node.rb#17216 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?filepath: String, ?location: Location) -> SourceFileNode # - # source://prism//lib/prism/node.rb#18241 + # source://prism//lib/prism/node.rb#17226 sig { params(flags: Integer, filepath: String, location: Prism::Location).returns(Prism::SourceFileNode) } def copy(flags: T.unsafe(nil), filepath: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18226 + # source://prism//lib/prism/node.rb#17211 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, filepath: String, location: Location } # - # source://prism//lib/prism/node.rb#18249 + # source://prism//lib/prism/node.rb#17234 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -29559,7 +30501,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#17243 sig { returns(String) } def filepath; end @@ -29567,7 +30509,7 @@ class Prism::SourceFileNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#18266 + # source://prism//lib/prism/node.rb#17251 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -29575,7 +30517,7 @@ class Prism::SourceFileNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#18261 + # source://prism//lib/prism/node.rb#17246 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -29583,21 +30525,21 @@ class Prism::SourceFileNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#18271 + # source://prism//lib/prism/node.rb#17256 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#17266 + 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#17261 sig { returns(T::Boolean) } def mutable?; end @@ -29616,7 +30558,7 @@ class Prism::SourceFileNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#18303 + # source://prism//lib/prism/node.rb#17284 sig { override.returns(Symbol) } def type; end @@ -29624,7 +30566,7 @@ class Prism::SourceFileNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#18254 + # source://prism//lib/prism/node.rb#17239 sig { returns(Integer) } def flags; end @@ -29636,7 +30578,7 @@ class Prism::SourceFileNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#18313 + # source://prism//lib/prism/node.rb#17294 def type; end end end @@ -29646,73 +30588,73 @@ end # __LINE__ # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#18330 +# source://prism//lib/prism/node.rb#17311 class Prism::SourceLineNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [SourceLineNode] a new instance of SourceLineNode # - # source://prism//lib/prism/node.rb#18332 + # source://prism//lib/prism/node.rb#17313 sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#18407 + # source://prism//lib/prism/node.rb#17387 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18339 + # source://prism//lib/prism/node.rb#17320 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18344 + # source://prism//lib/prism/node.rb#17325 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18354 + # source://prism//lib/prism/node.rb#17335 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18349 + # source://prism//lib/prism/node.rb#17330 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?location: Location) -> SourceLineNode # - # source://prism//lib/prism/node.rb#18359 + # source://prism//lib/prism/node.rb#17340 sig { params(location: Prism::Location).returns(Prism::SourceLineNode) } def copy(location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18344 + # source://prism//lib/prism/node.rb#17325 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } # - # source://prism//lib/prism/node.rb#18367 + # source://prism//lib/prism/node.rb#17348 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#17353 + sig { override.returns(String) } + def inspect; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by @@ -29729,7 +30671,7 @@ class Prism::SourceLineNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#18391 + # source://prism//lib/prism/node.rb#17371 sig { override.returns(Symbol) } def type; end @@ -29741,7 +30683,7 @@ class Prism::SourceLineNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#18401 + # source://prism//lib/prism/node.rb#17381 def type; end end end @@ -29751,13 +30693,13 @@ end # [*a] # ^^ # -# source://prism//lib/prism/node.rb#18416 +# source://prism//lib/prism/node.rb#17396 class Prism::SplatNode < ::Prism::Node # def initialize: (Location operator_loc, Prism::node? expression, Location location) -> void # # @return [SplatNode] a new instance of SplatNode # - # source://prism//lib/prism/node.rb#18418 + # source://prism//lib/prism/node.rb#17398 sig do params( source: Prism::Source, @@ -29771,36 +30713,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#17491 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18427 + # source://prism//lib/prism/node.rb#17407 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18432 + # source://prism//lib/prism/node.rb#17412 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18444 + # source://prism//lib/prism/node.rb#17424 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18437 + # source://prism//lib/prism/node.rb#17417 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?operator_loc: Location, ?expression: Prism::node?, ?location: Location) -> SplatNode # - # source://prism//lib/prism/node.rb#18449 + # source://prism//lib/prism/node.rb#17429 sig do params( operator_loc: Prism::Location, @@ -29813,40 +30755,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#17412 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { operator_loc: Location, expression: Prism::node?, location: Location } # - # source://prism//lib/prism/node.rb#18457 + # source://prism//lib/prism/node.rb#17437 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader expression: Prism::node? # - # source://prism//lib/prism/node.rb#18469 + # source://prism//lib/prism/node.rb#17449 sig { returns(T.nilable(Prism::Node)) } def expression; end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#17457 + sig { override.returns(String) } + def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#18472 + # source://prism//lib/prism/node.rb#17452 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#18462 + # source://prism//lib/prism/node.rb#17442 sig { returns(Prism::Location) } def operator_loc; end @@ -29865,7 +30807,7 @@ class Prism::SplatNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#18503 + # source://prism//lib/prism/node.rb#17475 sig { override.returns(Symbol) } def type; end @@ -29877,7 +30819,7 @@ class Prism::SplatNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#18513 + # source://prism//lib/prism/node.rb#17485 def type; end end end @@ -29887,79 +30829,79 @@ end # foo; bar; baz # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#18530 +# source://prism//lib/prism/node.rb#17502 class Prism::StatementsNode < ::Prism::Node # def initialize: (Array[Prism::node] body, Location location) -> void # # @return [StatementsNode] a new instance of StatementsNode # - # source://prism//lib/prism/node.rb#18532 + # source://prism//lib/prism/node.rb#17504 sig { params(source: Prism::Source, body: T::Array[Prism::Node], location: Prism::Location).void } def initialize(source, body, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#18612 + # source://prism//lib/prism/node.rb#17582 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18540 + # source://prism//lib/prism/node.rb#17512 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: Array[Prism::node] # - # source://prism//lib/prism/node.rb#18573 + # source://prism//lib/prism/node.rb#17545 sig { returns(T::Array[Prism::Node]) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18545 + # source://prism//lib/prism/node.rb#17517 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18555 + # source://prism//lib/prism/node.rb#17527 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18550 + # source://prism//lib/prism/node.rb#17522 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?body: Array[Prism::node], ?location: Location) -> StatementsNode # - # source://prism//lib/prism/node.rb#18560 + # source://prism//lib/prism/node.rb#17532 sig { params(body: T::Array[Prism::Node], location: Prism::Location).returns(Prism::StatementsNode) } def copy(body: T.unsafe(nil), location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18545 + # source://prism//lib/prism/node.rb#17517 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { body: Array[Prism::node], location: Location } # - # source://prism//lib/prism/node.rb#18568 + # source://prism//lib/prism/node.rb#17540 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#17548 + sig { override.returns(String) } + def inspect; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by @@ -29976,7 +30918,7 @@ class Prism::StatementsNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#18596 + # source://prism//lib/prism/node.rb#17566 sig { override.returns(Symbol) } def type; end @@ -29988,30 +30930,30 @@ class Prism::StatementsNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#18606 + # source://prism//lib/prism/node.rb#17576 def type; end end end # Flags for string nodes. # -# source://prism//lib/prism/node.rb#20469 +# source://prism//lib/prism/node.rb#19343 module Prism::StringFlags; end # internal bytes forced the encoding to binary # -# source://prism//lib/prism/node.rb#20474 +# source://prism//lib/prism/node.rb#19348 Prism::StringFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer) # internal bytes forced the encoding to UTF-8 # -# source://prism//lib/prism/node.rb#20471 +# source://prism//lib/prism/node.rb#19345 Prism::StringFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/node.rb#20477 +# source://prism//lib/prism/node.rb#19351 Prism::StringFlags::FROZEN = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/node.rb#20480 +# source://prism//lib/prism/node.rb#19354 Prism::StringFlags::MUTABLE = T.let(T.unsafe(nil), Integer) # Represents a string literal, a string contained within a `%w` list, or plain string content within an interpolated string. @@ -30025,7 +30967,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#17599 class Prism::StringNode < ::Prism::Node include ::Prism::HeredocQuery @@ -30033,7 +30975,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#17601 sig do params( source: Prism::Source, @@ -30050,60 +30992,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#17755 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18643 + # source://prism//lib/prism/node.rb#17613 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18648 + # source://prism//lib/prism/node.rb#17618 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#18746 + # source://prism//lib/prism/node.rb#17716 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#18700 + # source://prism//lib/prism/node.rb#17670 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18658 + # source://prism//lib/prism/node.rb#17628 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18653 + # source://prism//lib/prism/node.rb#17623 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def content: () -> String # - # source://prism//lib/prism/node.rb#18741 + # source://prism//lib/prism/node.rb#17711 sig { returns(String) } def content; end # attr_reader content_loc: Location # - # source://prism//lib/prism/node.rb#18693 + # source://prism//lib/prism/node.rb#17663 sig { returns(Prism::Location) } def content_loc; end # def copy: (?flags: Integer, ?opening_loc: Location?, ?content_loc: Location, ?closing_loc: Location?, ?unescaped: String, ?location: Location) -> StringNode # - # source://prism//lib/prism/node.rb#18663 + # source://prism//lib/prism/node.rb#17633 sig do params( flags: Integer, @@ -30119,13 +31061,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#17618 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location?, content_loc: Location, closing_loc: Location?, unescaped: String, location: Location } # - # source://prism//lib/prism/node.rb#18671 + # source://prism//lib/prism/node.rb#17641 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -30136,7 +31078,7 @@ class Prism::StringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#18721 + # source://prism//lib/prism/node.rb#17691 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -30144,7 +31086,7 @@ class Prism::StringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#18716 + # source://prism//lib/prism/node.rb#17686 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -30152,36 +31094,36 @@ class Prism::StringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#18726 + # source://prism//lib/prism/node.rb#17696 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#17721 + 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#17701 sig { returns(T::Boolean) } def mutable?; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#18736 + # source://prism//lib/prism/node.rb#17706 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#18680 + # source://prism//lib/prism/node.rb#17650 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end @@ -30207,13 +31149,13 @@ class Prism::StringNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#18776 + # source://prism//lib/prism/node.rb#17739 sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#18713 + # source://prism//lib/prism/node.rb#17683 sig { returns(String) } def unescaped; end @@ -30221,7 +31163,7 @@ class Prism::StringNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#18676 + # source://prism//lib/prism/node.rb#17646 sig { returns(Integer) } def flags; end @@ -30233,7 +31175,7 @@ class Prism::StringNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#18786 + # source://prism//lib/prism/node.rb#17749 def type; end end end @@ -30246,13 +31188,13 @@ end # super foo, bar # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#18809 +# source://prism//lib/prism/node.rb#17772 class Prism::SuperNode < ::Prism::Node # def initialize: (Location keyword_loc, Location? lparen_loc, ArgumentsNode? arguments, Location? rparen_loc, Prism::node? block, Location location) -> void # # @return [SuperNode] a new instance of SuperNode # - # source://prism//lib/prism/node.rb#18811 + # source://prism//lib/prism/node.rb#17774 sig do params( source: Prism::Source, @@ -30269,48 +31211,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#17910 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18823 + # source://prism//lib/prism/node.rb#17786 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#18879 + # source://prism//lib/prism/node.rb#17842 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # attr_reader block: Prism::node? # - # source://prism//lib/prism/node.rb#18895 + # source://prism//lib/prism/node.rb#17858 sig { returns(T.nilable(Prism::Node)) } def block; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18828 + # source://prism//lib/prism/node.rb#17791 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18841 + # source://prism//lib/prism/node.rb#17804 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18833 + # source://prism//lib/prism/node.rb#17796 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?keyword_loc: Location, ?lparen_loc: Location?, ?arguments: ArgumentsNode?, ?rparen_loc: Location?, ?block: Prism::node?, ?location: Location) -> SuperNode # - # source://prism//lib/prism/node.rb#18846 + # source://prism//lib/prism/node.rb#17809 sig do params( keyword_loc: Prism::Location, @@ -30326,58 +31268,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#17791 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, block: Prism::node?, location: Location } # - # source://prism//lib/prism/node.rb#18854 + # source://prism//lib/prism/node.rb#17817 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#17876 + sig { override.returns(String) } + def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#18898 + # source://prism//lib/prism/node.rb#17861 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#18859 + # source://prism//lib/prism/node.rb#17822 sig { returns(Prism::Location) } def keyword_loc; end # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#18903 + # source://prism//lib/prism/node.rb#17866 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#18866 + # source://prism//lib/prism/node.rb#17829 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#18908 + # source://prism//lib/prism/node.rb#17871 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#18882 + # source://prism//lib/prism/node.rb#17845 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end @@ -30396,7 +31338,7 @@ class Prism::SuperNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#18947 + # source://prism//lib/prism/node.rb#17894 sig { override.returns(Symbol) } def type; end @@ -30408,29 +31350,29 @@ class Prism::SuperNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#18957 + # source://prism//lib/prism/node.rb#17904 def type; end end end # Flags for symbol nodes. # -# source://prism//lib/prism/node.rb#20484 +# source://prism//lib/prism/node.rb#19358 module Prism::SymbolFlags; end # internal bytes forced the encoding to binary # -# source://prism//lib/prism/node.rb#20489 +# source://prism//lib/prism/node.rb#19363 Prism::SymbolFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer) # internal bytes forced the encoding to US-ASCII # -# source://prism//lib/prism/node.rb#20492 +# source://prism//lib/prism/node.rb#19366 Prism::SymbolFlags::FORCED_US_ASCII_ENCODING = T.let(T.unsafe(nil), Integer) # internal bytes forced the encoding to UTF-8 # -# source://prism//lib/prism/node.rb#20486 +# source://prism//lib/prism/node.rb#19360 Prism::SymbolFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # Represents a symbol literal or a symbol contained within a `%i` list. @@ -30441,13 +31383,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#17927 class Prism::SymbolNode < ::Prism::Node # def initialize: (Integer flags, Location? opening_loc, Location? value_loc, Location? closing_loc, String unescaped, Location location) -> void # # @return [SymbolNode] a new instance of SymbolNode # - # source://prism//lib/prism/node.rb#18982 + # source://prism//lib/prism/node.rb#17929 sig do params( source: Prism::Source, @@ -30464,48 +31406,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#18084 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18994 + # source://prism//lib/prism/node.rb#17941 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18999 + # source://prism//lib/prism/node.rb#17946 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#19098 + # source://prism//lib/prism/node.rb#18045 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#19057 + # source://prism//lib/prism/node.rb#18004 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#19009 + # source://prism//lib/prism/node.rb#17956 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#19004 + # source://prism//lib/prism/node.rb#17951 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?opening_loc: Location?, ?value_loc: Location?, ?closing_loc: Location?, ?unescaped: String, ?location: Location) -> SymbolNode # - # source://prism//lib/prism/node.rb#19014 + # source://prism//lib/prism/node.rb#17961 sig do params( flags: Integer, @@ -30521,13 +31463,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#17946 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location?, value_loc: Location?, closing_loc: Location?, unescaped: String, location: Location } # - # source://prism//lib/prism/node.rb#19022 + # source://prism//lib/prism/node.rb#17969 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -30538,7 +31480,7 @@ class Prism::SymbolNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#19078 + # source://prism//lib/prism/node.rb#18025 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -30546,7 +31488,7 @@ class Prism::SymbolNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#19083 + # source://prism//lib/prism/node.rb#18030 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end @@ -30554,25 +31496,25 @@ class Prism::SymbolNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#19073 + # source://prism//lib/prism/node.rb#18020 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#18050 + sig { override.returns(String) } + def inspect; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#19088 + # source://prism//lib/prism/node.rb#18035 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#19031 + # source://prism//lib/prism/node.rb#17978 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end @@ -30591,25 +31533,25 @@ class Prism::SymbolNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#19128 + # source://prism//lib/prism/node.rb#18068 sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#19070 + # source://prism//lib/prism/node.rb#18017 sig { returns(String) } def unescaped; end # def value: () -> String? # - # source://prism//lib/prism/node.rb#19093 + # source://prism//lib/prism/node.rb#18040 sig { returns(T.nilable(String)) } def value; end # attr_reader value_loc: Location? # - # source://prism//lib/prism/node.rb#19044 + # source://prism//lib/prism/node.rb#17991 sig { returns(T.nilable(Prism::Location)) } def value_loc; end @@ -30617,7 +31559,7 @@ class Prism::SymbolNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#19027 + # source://prism//lib/prism/node.rb#17974 sig { returns(Integer) } def flags; end @@ -30629,56 +31571,56 @@ class Prism::SymbolNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#19138 + # source://prism//lib/prism/node.rb#18078 def type; end end end # This represents a token from the Ruby source. # -# source://prism//lib/prism/parse_result.rb#550 +# source://prism//lib/prism/parse_result.rb#628 class Prism::Token # Create a new token object with the given type, value, and location. # # @return [Token] a new instance of Token # - # source://prism//lib/prism/parse_result.rb#562 + # source://prism//lib/prism/parse_result.rb#640 sig { params(source: Prism::Source, type: Symbol, value: String, location: T.any(Integer, Prism::Location)).void } def initialize(source, type, value, location); end # Returns true if the given other token is equal to this token. # - # source://prism//lib/prism/parse_result.rb#597 + # source://prism//lib/prism/parse_result.rb#675 sig { params(other: T.untyped).returns(T::Boolean) } def ==(other); end # Implement the hash pattern matching interface for Token. # - # source://prism//lib/prism/parse_result.rb#570 + # source://prism//lib/prism/parse_result.rb#648 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # A Location object representing the location of this token in the source. # - # source://prism//lib/prism/parse_result.rb#575 + # source://prism//lib/prism/parse_result.rb#653 sig { returns(Prism::Location) } def location; end # Implement the pretty print interface for Token. # - # source://prism//lib/prism/parse_result.rb#582 + # source://prism//lib/prism/parse_result.rb#660 sig { params(q: T.untyped).void } def pretty_print(q); end # The type of token that this token is. # - # source://prism//lib/prism/parse_result.rb#556 + # source://prism//lib/prism/parse_result.rb#634 sig { returns(Symbol) } def type; end # A byteslice of the source that this token represents. # - # source://prism//lib/prism/parse_result.rb#559 + # source://prism//lib/prism/parse_result.rb#637 sig { returns(String) } def value; end @@ -30686,7 +31628,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#630 sig { returns(Prism::Source) } def source; end end @@ -30832,8 +31774,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. # @@ -32159,7 +33099,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. @@ -33131,25 +34071,25 @@ class Prism::Translation::Ripper < ::Prism::Compiler # :stopdoc: # - # source://prism//lib/prism/translation/ripper.rb#3383 + # source://prism//lib/prism/translation/ripper.rb#3387 def _dispatch_0; end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def _dispatch_1(_); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def _dispatch_2(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3386 + # source://prism//lib/prism/translation/ripper.rb#3390 def _dispatch_3(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3387 + # source://prism//lib/prism/translation/ripper.rb#3391 def _dispatch_4(_, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3388 + # source://prism//lib/prism/translation/ripper.rb#3392 def _dispatch_5(_, _, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3389 + # source://prism//lib/prism/translation/ripper.rb#3393 def _dispatch_7(_, _, _, _, _, _, _); end # This method is responsible for updating lineno and column information @@ -33158,7 +34098,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#3377 def bounds(location); end # Returns true if the given node is a command node. @@ -33170,7 +34110,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#3415 def compile_error(msg); end # This method is provided by the Ripper C extension. It is called when a @@ -33178,577 +34118,577 @@ 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#3430 def dedent_string(string, width); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_BEGIN(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_CHAR(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_END(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on___end__(_); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_alias(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_alias_error(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_aref(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_aref_field(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_arg_ambiguous(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_arg_paren(_); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_args_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_args_add_block(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_args_add_star(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3383 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_args_forward; end - # source://prism//lib/prism/translation/ripper.rb#3383 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_args_new; end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_array(_); end - # source://prism//lib/prism/translation/ripper.rb#3387 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_aryptn(_, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_assign(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_assign_error(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_assoc_new(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_assoc_splat(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_assoclist_from_args(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_backref(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_backtick(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_bare_assoc_hash(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_begin(_); end - # source://prism//lib/prism/translation/ripper.rb#3386 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_binary(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_block_var(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_blockarg(_); end - # source://prism//lib/prism/translation/ripper.rb#3387 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_bodystmt(_, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_brace_block(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_break(_); end - # source://prism//lib/prism/translation/ripper.rb#3386 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_call(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_case(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3386 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_class(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_class_name_error(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_comma(_); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_command(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3387 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_command_call(_, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_comment(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_const(_); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_const_path_field(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_const_path_ref(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_const_ref(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_cvar(_); end - # source://prism//lib/prism/translation/ripper.rb#3386 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_def(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_defined(_); end - # source://prism//lib/prism/translation/ripper.rb#3388 + # source://prism//lib/prism/translation/ripper.rb#3392 def on_defs(_, _, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_do_block(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_dot2(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_dot3(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_dyna_symbol(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_else(_); end - # source://prism//lib/prism/translation/ripper.rb#3386 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_elsif(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_embdoc(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_embdoc_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_embdoc_end(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_embexpr_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_embexpr_end(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_embvar(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_ensure(_); end - # source://prism//lib/prism/translation/ripper.rb#3383 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_excessed_comma; end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_fcall(_); end - # source://prism//lib/prism/translation/ripper.rb#3386 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_field(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_float(_); end - # source://prism//lib/prism/translation/ripper.rb#3387 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_fndptn(_, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3386 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_for(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_gvar(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_hash(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_heredoc_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_heredoc_dedent(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_heredoc_end(_); end - # source://prism//lib/prism/translation/ripper.rb#3386 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_hshptn(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_ident(_); end - # source://prism//lib/prism/translation/ripper.rb#3386 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_if(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_if_mod(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3386 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_ifop(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_ignored_nl(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_ignored_sp(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_imaginary(_); end - # source://prism//lib/prism/translation/ripper.rb#3386 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_in(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_int(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_ivar(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_kw(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_kwrest_param(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_label(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_label_end(_); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_lambda(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_lbrace(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_lbracket(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_lparen(_); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_magic_comment(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_massign(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_method_add_arg(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_method_add_block(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_mlhs_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_mlhs_add_post(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_mlhs_add_star(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3383 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_mlhs_new; end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_mlhs_paren(_); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_module(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_mrhs_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_mrhs_add_star(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3383 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_mrhs_new; end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_mrhs_new_from_args(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_next(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_nl(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_nokw_param(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_op(_); end - # source://prism//lib/prism/translation/ripper.rb#3386 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_opassign(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_operator_ambiguous(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_param_error(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3389 + # source://prism//lib/prism/translation/ripper.rb#3393 def on_params(_, _, _, _, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_paren(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_parse_error(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_period(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_program(_); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_qsymbols_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_qsymbols_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#3383 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_qsymbols_new; end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_qwords_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_qwords_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#3383 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_qwords_new; end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_rational(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_rbrace(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_rbracket(_); end - # source://prism//lib/prism/translation/ripper.rb#3383 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_redo; end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_regexp_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_regexp_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_regexp_end(_); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_regexp_literal(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3383 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_regexp_new; end - # source://prism//lib/prism/translation/ripper.rb#3387 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_rescue(_, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_rescue_mod(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_rest_param(_); end - # source://prism//lib/prism/translation/ripper.rb#3383 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_retry; end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_return(_); end - # source://prism//lib/prism/translation/ripper.rb#3383 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_return0; end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_rparen(_); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_sclass(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_semicolon(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_sp(_); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_stmts_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3383 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_stmts_new; end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_string_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_string_concat(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3383 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_string_content; end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_string_dvar(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_string_embexpr(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_string_literal(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_super(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_symbeg(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_symbol(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_symbol_literal(_); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_symbols_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_symbols_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#3383 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_symbols_new; end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_tlambda(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_tlambeg(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_top_const_field(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_top_const_ref(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_tstring_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_tstring_content(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_tstring_end(_); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_unary(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_undef(_); end - # source://prism//lib/prism/translation/ripper.rb#3386 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_unless(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_unless_mod(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_until(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_until_mod(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_var_alias(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_var_field(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_var_ref(_); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_vcall(_); end - # source://prism//lib/prism/translation/ripper.rb#3383 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_void_stmt; end - # source://prism//lib/prism/translation/ripper.rb#3386 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_when(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_while(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_while_mod(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_word_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3383 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_word_new; end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_words_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_words_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#3383 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_words_new; end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_words_sep(_); end - # source://prism//lib/prism/translation/ripper.rb#3385 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_xstring_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_xstring_literal(_); end - # source://prism//lib/prism/translation/ripper.rb#3383 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_xstring_new; end - # source://prism//lib/prism/translation/ripper.rb#3384 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_yield(_); end - # source://prism//lib/prism/translation/ripper.rb#3383 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_yield0; end - # source://prism//lib/prism/translation/ripper.rb#3383 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_zsuper; end # Lazily initialize the parse result. @@ -33760,7 +34700,7 @@ class Prism::Translation::Ripper < ::Prism::Compiler # # @return [Boolean] # - # source://prism//lib/prism/translation/ripper.rb#3278 + # source://prism//lib/prism/translation/ripper.rb#3282 def trailing_comma?(left, right); end # Visit one side of an alias global variable node. @@ -33832,7 +34772,7 @@ class Prism::Translation::Ripper < ::Prism::Compiler # 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#3321 def visit_number_node(node); end # Visit a pattern within a pattern match. This is used to bypass the @@ -33857,7 +34797,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#3294 def visit_token(token, allow_keywords = T.unsafe(nil)); end # Dispatch a words_sep event that contains the space between the elements @@ -33869,26 +34809,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#3339 def visit_write_value(node); end # Returns true if there is a semicolon between the two locations. # # @return [Boolean] # - # source://prism//lib/prism/translation/ripper.rb#3283 + # source://prism//lib/prism/translation/ripper.rb#3287 def void_stmt?(left, right, allow_newline); end # This method is called when weak warning is produced by the parser. # +fmt+ and +args+ is printf style. # - # source://prism//lib/prism/translation/ripper.rb#3402 + # source://prism//lib/prism/translation/ripper.rb#3406 def warn(fmt, *args); end # This method is called when strong warning is produced by the parser. # +fmt+ and +args+ is printf style. # - # source://prism//lib/prism/translation/ripper.rb#3407 + # source://prism//lib/prism/translation/ripper.rb#3411 def warning(fmt, *args); end class << self @@ -33970,8 +34910,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 +34954,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 @@ -34611,8 +35547,6 @@ end # # 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] } } - private # source://prism//lib/prism/translation/ripper/sexp.rb#92 @@ -34703,86 +35637,78 @@ class Prism::Translation::Ripper::SexpBuilderPP < ::Prism::Translation::Ripper:: def on_xstring_new; end end -class Prism::Translation::RipperCompiler < Prism::Compiler - Result = type_member -end - -class Prism::Translation::RubyParser::Compiler < Prism::Compiler - Result = type_member { { fixed: Sexp } } -end - # Represents the use of the literal `true` keyword. # # true # ^^^^ # -# source://prism//lib/prism/node.rb#19158 +# source://prism//lib/prism/node.rb#18098 class Prism::TrueNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [TrueNode] a new instance of TrueNode # - # source://prism//lib/prism/node.rb#19160 + # source://prism//lib/prism/node.rb#18100 sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#19235 + # source://prism//lib/prism/node.rb#18174 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#19167 + # source://prism//lib/prism/node.rb#18107 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#19172 + # source://prism//lib/prism/node.rb#18112 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#19182 + # source://prism//lib/prism/node.rb#18122 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#19177 + # source://prism//lib/prism/node.rb#18117 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?location: Location) -> TrueNode # - # source://prism//lib/prism/node.rb#19187 + # source://prism//lib/prism/node.rb#18127 sig { params(location: Prism::Location).returns(Prism::TrueNode) } def copy(location: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#19172 + # source://prism//lib/prism/node.rb#18112 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } # - # source://prism//lib/prism/node.rb#19195 + # source://prism//lib/prism/node.rb#18135 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#18140 + sig { override.returns(String) } + def inspect; end # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by @@ -34799,7 +35725,7 @@ class Prism::TrueNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#19219 + # source://prism//lib/prism/node.rb#18158 sig { override.returns(Symbol) } def type; end @@ -34811,7 +35737,7 @@ class Prism::TrueNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#19229 + # source://prism//lib/prism/node.rb#18168 def type; end end end @@ -34821,13 +35747,13 @@ end # undef :foo, :bar, :baz # ^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#19244 +# source://prism//lib/prism/node.rb#18183 class Prism::UndefNode < ::Prism::Node # def initialize: (Array[SymbolNode | InterpolatedSymbolNode] names, Location keyword_loc, Location location) -> void # # @return [UndefNode] a new instance of UndefNode # - # source://prism//lib/prism/node.rb#19246 + # source://prism//lib/prism/node.rb#18185 sig do params( source: Prism::Source, @@ -34841,36 +35767,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#18276 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#19255 + # source://prism//lib/prism/node.rb#18194 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#19260 + # source://prism//lib/prism/node.rb#18199 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#19270 + # source://prism//lib/prism/node.rb#18209 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#19265 + # source://prism//lib/prism/node.rb#18204 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?names: Array[SymbolNode | InterpolatedSymbolNode], ?keyword_loc: Location, ?location: Location) -> UndefNode # - # source://prism//lib/prism/node.rb#19275 + # source://prism//lib/prism/node.rb#18214 sig do params( names: T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)], @@ -34883,40 +35809,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#18199 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { names: Array[SymbolNode | InterpolatedSymbolNode], keyword_loc: Location, location: Location } # - # source://prism//lib/prism/node.rb#19283 + # source://prism//lib/prism/node.rb#18222 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#18242 + sig { override.returns(String) } + def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#19298 + # source://prism//lib/prism/node.rb#18237 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#19291 + # source://prism//lib/prism/node.rb#18230 sig { returns(Prism::Location) } def keyword_loc; end # attr_reader names: Array[SymbolNode | InterpolatedSymbolNode] # - # source://prism//lib/prism/node.rb#19288 + # source://prism//lib/prism/node.rb#18227 sig { returns(T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)]) } def names; end @@ -34935,7 +35861,7 @@ class Prism::UndefNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#19324 + # source://prism//lib/prism/node.rb#18260 sig { override.returns(Symbol) } def type; end @@ -34947,7 +35873,7 @@ class Prism::UndefNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#19334 + # source://prism//lib/prism/node.rb#18270 def type; end end end @@ -34960,13 +35886,13 @@ end # unless foo then bar end # ^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#19355 +# source://prism//lib/prism/node.rb#18291 class Prism::UnlessNode < ::Prism::Node # def initialize: (Location keyword_loc, Prism::node predicate, Location? then_keyword_loc, StatementsNode? statements, ElseNode? consequent, Location? end_keyword_loc, Location location) -> void # # @return [UnlessNode] a new instance of UnlessNode # - # source://prism//lib/prism/node.rb#19357 + # source://prism//lib/prism/node.rb#18293 sig do params( source: Prism::Source, @@ -34984,30 +35910,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#18461 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#19370 + # source://prism//lib/prism/node.rb#18306 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#19379 + # source://prism//lib/prism/node.rb#18315 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#19393 + # source://prism//lib/prism/node.rb#18329 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#19384 + # source://prism//lib/prism/node.rb#18320 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end @@ -35016,13 +35942,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#18393 sig { returns(T.nilable(Prism::ElseNode)) } def consequent; end # def copy: (?keyword_loc: Location, ?predicate: Prism::node, ?then_keyword_loc: Location?, ?statements: StatementsNode?, ?consequent: ElseNode?, ?end_keyword_loc: Location?, ?location: Location) -> UnlessNode # - # source://prism//lib/prism/node.rb#19398 + # source://prism//lib/prism/node.rb#18334 sig do params( keyword_loc: Prism::Location, @@ -35039,19 +35965,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#18315 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, predicate: Prism::node, then_keyword_loc: Location?, statements: StatementsNode?, consequent: ElseNode?, end_keyword_loc: Location?, location: Location } # - # source://prism//lib/prism/node.rb#19406 + # source://prism//lib/prism/node.rb#18342 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def end_keyword: () -> String? # - # source://prism//lib/prism/node.rb#19486 + # source://prism//lib/prism/node.rb#18422 sig { returns(T.nilable(String)) } def end_keyword; end @@ -35060,22 +35986,22 @@ class Prism::UnlessNode < ::Prism::Node # unless cond then bar end # ^^^ # - # source://prism//lib/prism/node.rb#19463 + # source://prism//lib/prism/node.rb#18399 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#18427 + sig { override.returns(String) } + def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#19476 + # source://prism//lib/prism/node.rb#18412 sig { returns(String) } def keyword; end @@ -35087,7 +36013,7 @@ class Prism::UnlessNode < ::Prism::Node # bar unless cond # ^^^^^^ # - # source://prism//lib/prism/node.rb#19417 + # source://prism//lib/prism/node.rb#18353 sig { returns(Prism::Location) } def keyword_loc; end @@ -35099,11 +36025,11 @@ class Prism::UnlessNode < ::Prism::Node # bar unless cond # ^^^^ # - # source://prism//lib/prism/node.rb#19430 + # source://prism//lib/prism/node.rb#18366 sig { returns(Prism::Node) } def predicate; end - # source://prism//lib/prism/node.rb#19374 + # source://prism//lib/prism/node.rb#18310 def set_newline_flag(newline_marked); end # The body of statements that will executed if the unless condition is @@ -35112,20 +36038,20 @@ class Prism::UnlessNode < ::Prism::Node # unless cond then bar end # ^^^ # - # source://prism//lib/prism/node.rb#19451 + # source://prism//lib/prism/node.rb#18387 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # def then_keyword: () -> String? # - # source://prism//lib/prism/node.rb#19481 + # source://prism//lib/prism/node.rb#18417 sig { returns(T.nilable(String)) } def then_keyword; end # The location of the `then` keyword, if present. # unless cond then bar end ^^^^ # - # source://prism//lib/prism/node.rb#19434 + # source://prism//lib/prism/node.rb#18370 sig { returns(T.nilable(Prism::Location)) } def then_keyword_loc; end @@ -35144,7 +36070,7 @@ class Prism::UnlessNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#19527 + # source://prism//lib/prism/node.rb#18445 sig { override.returns(Symbol) } def type; end @@ -35156,7 +36082,7 @@ class Prism::UnlessNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#19537 + # source://prism//lib/prism/node.rb#18455 def type; end end end @@ -35169,13 +36095,13 @@ end # until foo do bar end # ^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#19561 +# source://prism//lib/prism/node.rb#18479 class Prism::UntilNode < ::Prism::Node # def initialize: (Integer flags, Location keyword_loc, Location? closing_loc, Prism::node predicate, StatementsNode? statements, Location location) -> void # # @return [UntilNode] a new instance of UntilNode # - # source://prism//lib/prism/node.rb#19563 + # source://prism//lib/prism/node.rb#18481 sig do params( source: Prism::Source, @@ -35192,12 +36118,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#18612 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#19575 + # source://prism//lib/prism/node.rb#18493 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -35205,43 +36131,43 @@ class Prism::UntilNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#19645 + # source://prism//lib/prism/node.rb#18563 sig { returns(T::Boolean) } def begin_modifier?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#19584 + # source://prism//lib/prism/node.rb#18502 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#19655 + # source://prism//lib/prism/node.rb#18573 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#19626 + # source://prism//lib/prism/node.rb#18544 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#19597 + # source://prism//lib/prism/node.rb#18515 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#19589 + # source://prism//lib/prism/node.rb#18507 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?keyword_loc: Location, ?closing_loc: Location?, ?predicate: Prism::node, ?statements: StatementsNode?, ?location: Location) -> UntilNode # - # source://prism//lib/prism/node.rb#19602 + # source://prism//lib/prism/node.rb#18520 sig do params( flags: Integer, @@ -35257,49 +36183,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#18502 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, keyword_loc: Location, closing_loc: Location?, predicate: Prism::node, statements: StatementsNode?, location: Location } # - # source://prism//lib/prism/node.rb#19610 + # source://prism//lib/prism/node.rb#18528 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#18578 + sig { override.returns(String) } + def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#19650 + # source://prism//lib/prism/node.rb#18568 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#19619 + # source://prism//lib/prism/node.rb#18537 sig { returns(Prism::Location) } def keyword_loc; end # attr_reader predicate: Prism::node # - # source://prism//lib/prism/node.rb#19639 + # source://prism//lib/prism/node.rb#18557 sig { returns(Prism::Node) } def predicate; end - # source://prism//lib/prism/node.rb#19579 + # source://prism//lib/prism/node.rb#18497 def set_newline_flag(newline_marked); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#19642 + # source://prism//lib/prism/node.rb#18560 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -35318,7 +36244,7 @@ class Prism::UntilNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#19691 + # source://prism//lib/prism/node.rb#18596 sig { override.returns(Symbol) } def type; end @@ -35326,7 +36252,7 @@ class Prism::UntilNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#19615 + # source://prism//lib/prism/node.rb#18533 sig { returns(Integer) } def flags; end @@ -35338,7 +36264,7 @@ class Prism::UntilNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#19701 + # source://prism//lib/prism/node.rb#18606 def type; end end end @@ -36275,13 +37201,13 @@ end # ^^^^^^^^^ # end # -# source://prism//lib/prism/node.rb#19723 +# source://prism//lib/prism/node.rb#18628 class Prism::WhenNode < ::Prism::Node # def initialize: (Location keyword_loc, Array[Prism::node] conditions, Location? then_keyword_loc, StatementsNode? statements, Location location) -> void # # @return [WhenNode] a new instance of WhenNode # - # source://prism//lib/prism/node.rb#19725 + # source://prism//lib/prism/node.rb#18630 sig do params( source: Prism::Source, @@ -36297,42 +37223,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#18747 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#19736 + # source://prism//lib/prism/node.rb#18641 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#19741 + # source://prism//lib/prism/node.rb#18646 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#19754 + # source://prism//lib/prism/node.rb#18659 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#19746 + # source://prism//lib/prism/node.rb#18651 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader conditions: Array[Prism::node] # - # source://prism//lib/prism/node.rb#19779 + # source://prism//lib/prism/node.rb#18684 sig { returns(T::Array[Prism::Node]) } def conditions; end # def copy: (?keyword_loc: Location, ?conditions: Array[Prism::node], ?then_keyword_loc: Location?, ?statements: StatementsNode?, ?location: Location) -> WhenNode # - # source://prism//lib/prism/node.rb#19759 + # source://prism//lib/prism/node.rb#18664 sig do params( keyword_loc: Prism::Location, @@ -36347,52 +37273,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#18646 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, conditions: Array[Prism::node], then_keyword_loc: Location?, statements: StatementsNode?, location: Location } # - # source://prism//lib/prism/node.rb#19767 + # source://prism//lib/prism/node.rb#18672 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#18713 + sig { override.returns(String) } + def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#19798 + # source://prism//lib/prism/node.rb#18703 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#19772 + # source://prism//lib/prism/node.rb#18677 sig { returns(Prism::Location) } def keyword_loc; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#19795 + # source://prism//lib/prism/node.rb#18700 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # def then_keyword: () -> String? # - # source://prism//lib/prism/node.rb#19803 + # source://prism//lib/prism/node.rb#18708 sig { returns(T.nilable(String)) } def then_keyword; end # attr_reader then_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#19782 + # source://prism//lib/prism/node.rb#18687 sig { returns(T.nilable(Prism::Location)) } def then_keyword_loc; end @@ -36411,7 +37337,7 @@ class Prism::WhenNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#19836 + # source://prism//lib/prism/node.rb#18731 sig { override.returns(Symbol) } def type; end @@ -36423,7 +37349,7 @@ class Prism::WhenNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#19846 + # source://prism//lib/prism/node.rb#18741 def type; end end end @@ -36436,13 +37362,13 @@ end # while foo do bar end # ^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#19869 +# source://prism//lib/prism/node.rb#18764 class Prism::WhileNode < ::Prism::Node # def initialize: (Integer flags, Location keyword_loc, Location? closing_loc, Prism::node predicate, StatementsNode? statements, Location location) -> void # # @return [WhileNode] a new instance of WhileNode # - # source://prism//lib/prism/node.rb#19871 + # source://prism//lib/prism/node.rb#18766 sig do params( source: Prism::Source, @@ -36459,12 +37385,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#18897 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#19883 + # source://prism//lib/prism/node.rb#18778 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -36472,43 +37398,43 @@ class Prism::WhileNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#19953 + # source://prism//lib/prism/node.rb#18848 sig { returns(T::Boolean) } def begin_modifier?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#19892 + # source://prism//lib/prism/node.rb#18787 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#19963 + # source://prism//lib/prism/node.rb#18858 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#19934 + # source://prism//lib/prism/node.rb#18829 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#19905 + # source://prism//lib/prism/node.rb#18800 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#19897 + # source://prism//lib/prism/node.rb#18792 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?flags: Integer, ?keyword_loc: Location, ?closing_loc: Location?, ?predicate: Prism::node, ?statements: StatementsNode?, ?location: Location) -> WhileNode # - # source://prism//lib/prism/node.rb#19910 + # source://prism//lib/prism/node.rb#18805 sig do params( flags: Integer, @@ -36524,49 +37450,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#18787 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, keyword_loc: Location, closing_loc: Location?, predicate: Prism::node, statements: StatementsNode?, location: Location } # - # source://prism//lib/prism/node.rb#19918 + # source://prism//lib/prism/node.rb#18813 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#18863 + sig { override.returns(String) } + def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#19958 + # source://prism//lib/prism/node.rb#18853 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#19927 + # source://prism//lib/prism/node.rb#18822 sig { returns(Prism::Location) } def keyword_loc; end # attr_reader predicate: Prism::node # - # source://prism//lib/prism/node.rb#19947 + # source://prism//lib/prism/node.rb#18842 sig { returns(Prism::Node) } def predicate; end - # source://prism//lib/prism/node.rb#19887 + # source://prism//lib/prism/node.rb#18782 def set_newline_flag(newline_marked); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#19950 + # source://prism//lib/prism/node.rb#18845 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -36585,7 +37511,7 @@ class Prism::WhileNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#19999 + # source://prism//lib/prism/node.rb#18881 sig { override.returns(Symbol) } def type; end @@ -36593,7 +37519,7 @@ class Prism::WhileNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#19923 + # source://prism//lib/prism/node.rb#18818 sig { returns(Integer) } def flags; end @@ -36605,7 +37531,7 @@ class Prism::WhileNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#20009 + # source://prism//lib/prism/node.rb#18891 def type; end end end @@ -36615,7 +37541,7 @@ end # `foo` # ^^^^^ # -# source://prism//lib/prism/node.rb#20029 +# source://prism//lib/prism/node.rb#18911 class Prism::XStringNode < ::Prism::Node include ::Prism::HeredocQuery @@ -36623,7 +37549,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#18913 sig do params( source: Prism::Source, @@ -36640,60 +37566,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#19045 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#20043 + # source://prism//lib/prism/node.rb#18925 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#20048 + # source://prism//lib/prism/node.rb#18930 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#20124 + # source://prism//lib/prism/node.rb#19006 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#20094 + # source://prism//lib/prism/node.rb#18976 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#20058 + # source://prism//lib/prism/node.rb#18940 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#20053 + # source://prism//lib/prism/node.rb#18935 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def content: () -> String # - # source://prism//lib/prism/node.rb#20119 + # source://prism//lib/prism/node.rb#19001 sig { returns(String) } def content; end # attr_reader content_loc: Location # - # source://prism//lib/prism/node.rb#20087 + # source://prism//lib/prism/node.rb#18969 sig { returns(Prism::Location) } def content_loc; end # def copy: (?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String, ?location: Location) -> XStringNode # - # source://prism//lib/prism/node.rb#20063 + # source://prism//lib/prism/node.rb#18945 sig do params( flags: Integer, @@ -36709,13 +37635,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#18930 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location } # - # source://prism//lib/prism/node.rb#20071 + # source://prism//lib/prism/node.rb#18953 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -36726,7 +37652,7 @@ class Prism::XStringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#20109 + # source://prism//lib/prism/node.rb#18991 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -36734,28 +37660,28 @@ class Prism::XStringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#20104 + # source://prism//lib/prism/node.rb#18986 sig { returns(T::Boolean) } def forced_utf8_encoding?; end sig { returns(T::Boolean) } def heredoc?; end - # def inspect(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#19011 + sig { override.returns(String) } + def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#20114 + # source://prism//lib/prism/node.rb#18996 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#20080 + # source://prism//lib/prism/node.rb#18962 sig { returns(Prism::Location) } def opening_loc; end @@ -36781,13 +37707,13 @@ class Prism::XStringNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#20154 + # source://prism//lib/prism/node.rb#19029 sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#20101 + # source://prism//lib/prism/node.rb#18983 sig { returns(String) } def unescaped; end @@ -36795,7 +37721,7 @@ class Prism::XStringNode < ::Prism::Node # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#20076 + # source://prism//lib/prism/node.rb#18958 sig { returns(Integer) } def flags; end @@ -36807,7 +37733,7 @@ class Prism::XStringNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#20164 + # source://prism//lib/prism/node.rb#19039 def type; end end end @@ -36817,13 +37743,13 @@ end # yield 1 # ^^^^^^^ # -# source://prism//lib/prism/node.rb#20184 +# source://prism//lib/prism/node.rb#19059 class Prism::YieldNode < ::Prism::Node # def initialize: (Location keyword_loc, Location? lparen_loc, ArgumentsNode? arguments, Location? rparen_loc, Location location) -> void # # @return [YieldNode] a new instance of YieldNode # - # source://prism//lib/prism/node.rb#20186 + # source://prism//lib/prism/node.rb#19061 sig do params( source: Prism::Source, @@ -36839,42 +37765,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#19192 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#20197 + # source://prism//lib/prism/node.rb#19072 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#20252 + # source://prism//lib/prism/node.rb#19127 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#20202 + # source://prism//lib/prism/node.rb#19077 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#20214 + # source://prism//lib/prism/node.rb#19089 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#20207 + # source://prism//lib/prism/node.rb#19082 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?keyword_loc: Location, ?lparen_loc: Location?, ?arguments: ArgumentsNode?, ?rparen_loc: Location?, ?location: Location) -> YieldNode # - # source://prism//lib/prism/node.rb#20219 + # source://prism//lib/prism/node.rb#19094 sig do params( keyword_loc: Prism::Location, @@ -36889,58 +37815,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#19077 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, location: Location } # - # source://prism//lib/prism/node.rb#20227 + # source://prism//lib/prism/node.rb#19102 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end - # def inspect(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#19158 + sig { override.returns(String) } + def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#20268 + # source://prism//lib/prism/node.rb#19143 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#20232 + # source://prism//lib/prism/node.rb#19107 sig { returns(Prism::Location) } def keyword_loc; end # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#20273 + # source://prism//lib/prism/node.rb#19148 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#20239 + # source://prism//lib/prism/node.rb#19114 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#20278 + # source://prism//lib/prism/node.rb#19153 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#20255 + # source://prism//lib/prism/node.rb#19130 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end @@ -36959,7 +37885,7 @@ class Prism::YieldNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#20311 + # source://prism//lib/prism/node.rb#19176 sig { override.returns(Symbol) } def type; end @@ -36971,13 +37897,7 @@ class Prism::YieldNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#20321 + # source://prism//lib/prism/node.rb#19186 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/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 7e121a9772..8c13f7232d 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/test/expectations/document_highlight/full_name_highlight.exp.json b/test/expectations/document_highlight/full_name_highlight.exp.json index c134f48629..117e253a57 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 57efa4fc22..1b1cc1215f 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/requests/support/uri_test.rb b/test/requests/support/uri_test.rb index 190b812d46..8539eafc13 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/ruby_document_test.rb b/test/ruby_document_test.rb index d1460a4def..4a4dfa4c37 100644 --- a/test/ruby_document_test.rb +++ b/test/ruby_document_test.rb @@ -441,26 +441,19 @@ class Post < ActiveRecord::Base assert_equal("ActiveRecord", T.must(T.cast(parent, Prism::ConstantPathNode).child_nodes.first).location.slice) # Locate the `Base` class - found, parent = T.cast( + found, _parent = T.cast( document.locate_node({ line: 0, character: 27 }), - [Prism::ConstantReadNode, Prism::ConstantPathNode, T::Array[String]], + [Prism::ConstantPathNode, Prism::ClassNode, T::Array[String]], ) - 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) + assert_equal(:ActiveRecord, T.cast(found.parent, Prism::ConstantReadNode).name) + assert_equal(:Base, found.name) # Locate the `where` invocation - found, parent = T.cast( + 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) end def test_locate_returns_nesting From e28d03a12b787e0a5f0f3bc740b2195d7fb4879e Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Thu, 16 May 2024 15:19:55 -0400 Subject: [PATCH 105/189] Restore Windows platforms --- Gemfile.lock | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Gemfile.lock b/Gemfile.lock index 43f0026d7c..feeec3cfa5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -124,6 +124,8 @@ GEM PLATFORMS arm64-darwin + x64-mingw-ucrt + x64-mingw32 x86_64-darwin x86_64-linux From aa8362d3cb028d44f44a4856311ac175e8559dbd Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Thu, 16 May 2024 16:08:51 -0400 Subject: [PATCH 106/189] Restore missing Windows platforms --- Gemfile.lock | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Gemfile.lock b/Gemfile.lock index 6b97207e19..5bcb74eab0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -126,6 +126,8 @@ GEM PLATFORMS arm64-darwin + x64-mingw-ucrt + x64-mingw32 x86_64-darwin x86_64-linux From 34819b62558caa814be3a987d36a936f5658de55 Mon Sep 17 00:00:00 2001 From: Nithin Bekal Date: Thu, 16 May 2024 22:40:57 -0400 Subject: [PATCH 107/189] docs: Remove notes related to neovim 0.9 --- EDITORS.md | 47 ----------------------------------------------- 1 file changed, 47 deletions(-) diff --git a/EDITORS.md b/EDITORS.md index 0954774906..69ab9bf50e 100644 --- a/EDITORS.md +++ b/EDITORS.md @@ -63,53 +63,7 @@ mason_lspconfig.setup_handlers { ### Neovim Limitations -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. - ```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 - 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]) - 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) @@ -152,7 +106,6 @@ end require("lspconfig").ruby_lsp.setup({ on_attach = function(client, buffer) - setup_diagnostics(client, buffer) add_ruby_deps_command(client, buffer) end, }) From 70f7d59827d4e6c0c8c9ebb3aa85e0bdc07e25e2 Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Fri, 17 May 2024 09:33:40 -0400 Subject: [PATCH 108/189] Update to Prism v0.29.0 (#2066) --- Gemfile.lock | 4 +- ruby-lsp.gemspec | 2 +- .../{prism@0.28.0.rbi => prism@0.29.0.rbi} | 801 ++++++++++-------- 3 files changed, 445 insertions(+), 362 deletions(-) rename sorbet/rbi/gems/{prism@0.28.0.rbi => prism@0.29.0.rbi} (98%) diff --git a/Gemfile.lock b/Gemfile.lock index 81ac3a0928..93b8224c31 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ PATH specs: ruby-lsp (0.16.7) language_server-protocol (~> 3.17.0) - prism (>= 0.28.0, < 0.29) + prism (>= 0.29.0, < 0.30) sorbet-runtime (>= 0.5.10782) GEM @@ -45,7 +45,7 @@ GEM ast (~> 2.4.1) racc prettier_print (1.2.1) - prism (0.28.0) + prism (0.29.0) psych (5.1.2) stringio racc (1.7.3) diff --git a/ruby-lsp.gemspec b/ruby-lsp.gemspec index e685e1e863..21f6a0862e 100644 --- a/ruby-lsp.gemspec +++ b/ruby-lsp.gemspec @@ -19,7 +19,7 @@ Gem::Specification.new do |s| s.require_paths = ["lib"] s.add_dependency("language_server-protocol", "~> 3.17.0") - s.add_dependency("prism", ">= 0.28.0", "< 0.29") + s.add_dependency("prism", ">= 0.29.0", "< 0.30") s.add_dependency("sorbet-runtime", ">= 0.5.10782") s.required_ruby_version = ">= 3.0" diff --git a/sorbet/rbi/gems/prism@0.28.0.rbi b/sorbet/rbi/gems/prism@0.29.0.rbi similarity index 98% rename from sorbet/rbi/gems/prism@0.28.0.rbi rename to sorbet/rbi/gems/prism@0.29.0.rbi index 2757b1cde8..90098a6823 100644 --- a/sorbet/rbi/gems/prism@0.28.0.rbi +++ b/sorbet/rbi/gems/prism@0.29.0.rbi @@ -3208,6 +3208,20 @@ class Prism::CallNode < ::Prism::Node sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end + # When a call node has the attribute_write flag set, it means that the call + # is using the attribute write syntax. This is either a method call to []= + # or a method call to a method that ends with =. Either way, the = sign is + # present in the source. + # + # Prism returns the message_loc _without_ the = sign attached, because there + # can be any amount of space between the message and the = sign. However, + # sometimes you want the location of the full message including the inner + # space and the = sign. This method provides that. + # + # source://prism//lib/prism/node_ext.rb#299 + sig { returns(T.nilable(Prism::Location)) } + def full_message_loc; end + # def ignore_visibility?: () -> bool # # @return [Boolean] @@ -3355,7 +3369,7 @@ Prism::CallNodeFlags::VARIABLE_CALL = T.let(T.unsafe(nil), Integer) # # source://prism//lib/prism/node.rb#2718 class Prism::CallOperatorWriteNode < ::Prism::Node - # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location? message_loc, Symbol read_name, Symbol write_name, Symbol 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 # @@ -3369,13 +3383,13 @@ 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. @@ -3397,6 +3411,18 @@ class Prism::CallOperatorWriteNode < ::Prism::Node sig { returns(T::Boolean) } def attribute_write?; end + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#2811 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#2814 + sig { returns(Prism::Location) } + def binary_operator_loc; end + # def call_operator: () -> String? # # source://prism//lib/prism/node.rb#2844 @@ -3427,7 +3453,7 @@ class Prism::CallOperatorWriteNode < ::Prism::Node 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#2759 sig do @@ -3438,13 +3464,13 @@ 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] @@ -3453,7 +3479,7 @@ class Prism::CallOperatorWriteNode < ::Prism::Node 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#2767 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } @@ -3488,16 +3514,16 @@ class Prism::CallOperatorWriteNode < ::Prism::Node 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#2811 - sig { returns(Symbol) } + # source://prism//lib/prism/node_ext.rb#307 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#2814 - sig { returns(Prism::Location) } + # source://prism//lib/prism/node_ext.rb#314 def operator_loc; end # attr_reader read_name: Symbol @@ -4856,7 +4882,7 @@ end # # source://prism//lib/prism/node.rb#3911 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 # @@ -4866,13 +4892,13 @@ class Prism::ClassVariableOperatorWriteNode < ::Prism::Node 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. @@ -4886,6 +4912,18 @@ class Prism::ClassVariableOperatorWriteNode < ::Prism::Node sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#3978 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#3968 + sig { returns(Prism::Location) } + def binary_operator_loc; end + # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#3930 @@ -4904,20 +4942,20 @@ class Prism::ClassVariableOperatorWriteNode < ::Prism::Node 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#3945 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] @@ -4926,7 +4964,7 @@ class Prism::ClassVariableOperatorWriteNode < ::Prism::Node 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#3953 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } @@ -4956,16 +4994,16 @@ class Prism::ClassVariableOperatorWriteNode < ::Prism::Node 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#3978 - 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#3968 - sig { returns(Prism::Location) } + # source://prism//lib/prism/node_ext.rb#330 def operator_loc; end # Sometimes you want to check an instance of a node against a list of @@ -6692,7 +6730,7 @@ end # # source://prism//lib/prism/node.rb#4583 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 # @@ -6702,13 +6740,13 @@ class Prism::ConstantOperatorWriteNode < ::Prism::Node 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. @@ -6722,6 +6760,18 @@ class Prism::ConstantOperatorWriteNode < ::Prism::Node sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#4650 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#4640 + sig { returns(Prism::Location) } + def binary_operator_loc; end + # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#4602 @@ -6740,20 +6790,20 @@ class Prism::ConstantOperatorWriteNode < ::Prism::Node 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#4617 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] @@ -6762,7 +6812,7 @@ class Prism::ConstantOperatorWriteNode < ::Prism::Node 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#4625 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } @@ -6792,16 +6842,16 @@ class Prism::ConstantOperatorWriteNode < ::Prism::Node 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#4650 - 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#4640 - 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 @@ -7181,7 +7231,7 @@ class Prism::ConstantPathNode < ::Prism::Node # constant read or a missing node. To not cause a breaking change, we # continue to supply that API. # - # source://prism//lib/prism/node_ext.rb#170 + # source://prism//lib/prism/node_ext.rb#181 def child; end # def child_nodes: () -> Array[nil | Node] @@ -7252,14 +7302,14 @@ class Prism::ConstantPathNode < ::Prism::Node # Returns the full name of this constant path. For example: "Foo::Bar" # - # source://prism//lib/prism/node_ext.rb#163 + # source://prism//lib/prism/node_ext.rb#174 sig { returns(String) } def full_name; end # Returns the list of parts for the full name of this constant path. # For example: [:Foo, :Bar] # - # source://prism//lib/prism/node_ext.rb#141 + # source://prism//lib/prism/node_ext.rb#152 sig { returns(T::Array[Symbol]) } def full_name_parts; end @@ -7341,14 +7391,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#143 class Prism::ConstantPathNode::DynamicPartsInConstantPathError < ::StandardError; end # An error class raised when missing nodes are found while computing a # constant path's full name. For example: # Foo:: -> raises because the constant path is missing the last part # -# source://prism//lib/prism/node_ext.rb#137 +# source://prism//lib/prism/node_ext.rb#148 class Prism::ConstantPathNode::MissingNodesInConstantPathError < ::StandardError; end # Represents assigning to a constant path using an operator that isn't `=`. @@ -7358,7 +7408,7 @@ class Prism::ConstantPathNode::MissingNodesInConstantPathError < ::StandardError # # source://prism//lib/prism/node.rb#5069 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 # @@ -7367,13 +7417,13 @@ class Prism::ConstantPathOperatorWriteNode < ::Prism::Node 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. @@ -7387,6 +7437,18 @@ class Prism::ConstantPathOperatorWriteNode < ::Prism::Node sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#5128 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#5118 + sig { returns(Prism::Location) } + def binary_operator_loc; end + # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#5087 @@ -7405,19 +7467,19 @@ class Prism::ConstantPathOperatorWriteNode < ::Prism::Node 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#5102 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] @@ -7426,7 +7488,7 @@ class Prism::ConstantPathOperatorWriteNode < ::Prism::Node 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#5110 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } @@ -7441,16 +7503,16 @@ class Prism::ConstantPathOperatorWriteNode < ::Prism::Node 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#5128 - 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#5118 - sig { returns(Prism::Location) } + # source://prism//lib/prism/node_ext.rb#362 def operator_loc; end # attr_reader target: ConstantPathNode @@ -7681,7 +7743,7 @@ class Prism::ConstantPathTargetNode < ::Prism::Node # constant read or a missing node. To not cause a breaking change, we # continue to supply that API. # - # source://prism//lib/prism/node_ext.rb#212 + # source://prism//lib/prism/node_ext.rb#217 def child; end # def child_nodes: () -> Array[nil | Node] @@ -7746,14 +7808,14 @@ class Prism::ConstantPathTargetNode < ::Prism::Node # Returns the full name of this constant path. For example: "Foo::Bar" # - # source://prism//lib/prism/node_ext.rb#205 + # source://prism//lib/prism/node_ext.rb#210 sig { returns(String) } def full_name; end # Returns the list of parts for the full name of this constant path. # For example: [:Foo, :Bar] # - # source://prism//lib/prism/node_ext.rb#185 + # source://prism//lib/prism/node_ext.rb#190 sig { returns(T::Array[Symbol]) } def full_name_parts; end @@ -8044,14 +8106,14 @@ 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#118 sig { returns(String) } def full_name; end # Returns the list of parts for the full name of this constant. # For example: [:Foo] # - # source://prism//lib/prism/node_ext.rb#102 + # source://prism//lib/prism/node_ext.rb#113 sig { returns(T::Array[Symbol]) } def full_name_parts; end @@ -8172,14 +8234,14 @@ class Prism::ConstantTargetNode < ::Prism::Node # Returns the full name of this constant. For example: "Foo" # - # source://prism//lib/prism/node_ext.rb#232 + # source://prism//lib/prism/node_ext.rb#231 sig { returns(String) } def full_name; end # Returns the list of parts for the full name of this constant. # For example: [:Foo] # - # source://prism//lib/prism/node_ext.rb#227 + # source://prism//lib/prism/node_ext.rb#226 sig { returns(T::Array[Symbol]) } def full_name_parts; end @@ -8313,14 +8375,14 @@ 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#131 sig { returns(String) } def full_name; end # Returns the list of parts for the full name of this constant. # For example: [:Foo] # - # source://prism//lib/prism/node_ext.rb#115 + # source://prism//lib/prism/node_ext.rb#126 sig { returns(T::Array[Symbol]) } def full_name_parts; end @@ -8543,7 +8605,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 # @@ -8583,7 +8645,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 # @@ -8613,7 +8675,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 # @@ -8633,7 +8695,7 @@ module Prism::DSL # 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 # @@ -8743,7 +8805,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 # @@ -8808,7 +8870,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 # @@ -8828,7 +8890,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 # @@ -8908,7 +8970,7 @@ module Prism::DSL # 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 + 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 # @@ -14588,7 +14650,7 @@ end # # source://prism//lib/prism/node.rb#7713 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 # @@ -14598,13 +14660,13 @@ class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node 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. @@ -14618,6 +14680,18 @@ class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#7780 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#7770 + sig { returns(Prism::Location) } + def binary_operator_loc; end + # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#7732 @@ -14636,20 +14710,20 @@ class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node 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#7747 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] @@ -14658,7 +14732,7 @@ class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node 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#7755 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } @@ -14688,16 +14762,16 @@ class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node 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#7780 - 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#7770 - sig { returns(Prism::Location) } + # source://prism//lib/prism/node_ext.rb#378 def operator_loc; end # Sometimes you want to check an instance of a node against a list of @@ -15618,13 +15692,13 @@ class Prism::HashPatternNode < ::Prism::Node end end -# source://prism//lib/prism/node_ext.rb#35 +# source://prism//lib/prism/node_ext.rb#46 module Prism::HeredocQuery # Returns true if this node was represented as a heredoc in the source code. # # @return [Boolean] # - # source://prism//lib/prism/node_ext.rb#37 + # source://prism//lib/prism/node_ext.rb#48 def heredoc?; end end @@ -15974,7 +16048,7 @@ class Prism::ImaginaryNode < ::Prism::Node # 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#98 sig { returns(Complex) } def value; end @@ -16631,7 +16705,7 @@ end # # source://prism//lib/prism/node.rb#9376 class Prism::IndexOperatorWriteNode < ::Prism::Node - # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Prism::node? block, Symbol 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 # @@ -16646,13 +16720,13 @@ 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, + 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, operator, operator_loc, value, location); 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. @@ -16680,6 +16754,18 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node sig { returns(T::Boolean) } def attribute_write?; end + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#9473 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#9476 + sig { returns(Prism::Location) } + def binary_operator_loc; end + # attr_reader block: Prism::node? # # source://prism//lib/prism/node.rb#9470 @@ -16728,7 +16814,7 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node 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 + # def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: Prism::node?, ?binary_operator: Symbol, ?binary_operator_loc: Location, ?value: Prism::node, ?location: Location) -> IndexOperatorWriteNode # # source://prism//lib/prism/node.rb#9420 sig do @@ -16740,13 +16826,13 @@ 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, + 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), 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), 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] @@ -16755,7 +16841,7 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node 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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Prism::node?, binary_operator: Symbol, binary_operator_loc: Location, value: Prism::node, location: Location } # # source://prism//lib/prism/node.rb#9428 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } @@ -16790,16 +16876,16 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node sig { returns(Prism::Location) } def opening_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#9473 - 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#9476 - sig { returns(Prism::Location) } + # source://prism//lib/prism/node_ext.rb#394 def operator_loc; end # attr_reader receiver: Prism::node? @@ -18330,7 +18416,7 @@ end # # source://prism//lib/prism/node.rb#10056 class Prism::InstanceVariableOperatorWriteNode < ::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 [InstanceVariableOperatorWriteNode] a new instance of InstanceVariableOperatorWriteNode # @@ -18340,13 +18426,13 @@ class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node 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. @@ -18360,6 +18446,18 @@ class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#10123 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#10113 + sig { returns(Prism::Location) } + def binary_operator_loc; end + # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#10075 @@ -18378,20 +18476,20 @@ class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node 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) -> InstanceVariableOperatorWriteNode + # def copy: (?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol, ?location: Location) -> InstanceVariableOperatorWriteNode # # source://prism//lib/prism/node.rb#10090 sig do params( name: Symbol, name_loc: Prism::Location, - operator_loc: Prism::Location, + binary_operator_loc: Prism::Location, value: Prism::Node, - operator: Symbol, + binary_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 + 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] @@ -18400,7 +18498,7 @@ class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node 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#10098 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } @@ -18430,16 +18528,16 @@ class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node 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#10123 - sig { returns(Symbol) } + # source://prism//lib/prism/node_ext.rb#403 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#10113 - sig { returns(Prism::Location) } + # source://prism//lib/prism/node_ext.rb#410 def operator_loc; end # Sometimes you want to check an instance of a node against a list of @@ -21299,7 +21397,7 @@ end # # source://prism//lib/prism/node.rb#12095 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 # @@ -21308,15 +21406,15 @@ class Prism::LocalVariableOperatorWriteNode < ::Prism::Node params( source: Prism::Source, name_loc: Prism::Location, - operator_loc: Prism::Location, + binary_operator_loc: Prism::Location, value: Prism::Node, name: Symbol, - operator: Symbol, + binary_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, 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. @@ -21330,6 +21428,18 @@ class Prism::LocalVariableOperatorWriteNode < ::Prism::Node sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#12163 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#12150 + sig { returns(Prism::Location) } + def binary_operator_loc; end + # def child_nodes: () -> Array[nil | Node] # # source://prism//lib/prism/node.rb#12115 @@ -21348,21 +21458,21 @@ class Prism::LocalVariableOperatorWriteNode < ::Prism::Node 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 + # def copy: (?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?binary_operator: Symbol, ?depth: Integer, ?location: Location) -> LocalVariableOperatorWriteNode # # source://prism//lib/prism/node.rb#12130 sig do params( name_loc: Prism::Location, - operator_loc: Prism::Location, + binary_operator_loc: Prism::Location, value: Prism::Node, name: Symbol, - operator: Symbol, + binary_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 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] @@ -21371,7 +21481,7 @@ class Prism::LocalVariableOperatorWriteNode < ::Prism::Node 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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { name_loc: Location, binary_operator_loc: Location, value: Prism::node, name: Symbol, binary_operator: Symbol, depth: Integer, location: Location } # # source://prism//lib/prism/node.rb#12138 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } @@ -21407,16 +21517,16 @@ class Prism::LocalVariableOperatorWriteNode < ::Prism::Node 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#12163 - sig { returns(Symbol) } + # source://prism//lib/prism/node_ext.rb#419 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#12150 - sig { returns(Prism::Location) } + # 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 @@ -24864,6 +24974,9 @@ class Prism::Node 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. # @@ -25967,7 +26080,7 @@ Prism::ParameterFlags::REPEATED_PARAMETER = T.let(T.unsafe(nil), Integer) # # source://prism//lib/prism/node.rb#14598 class Prism::ParametersNode < ::Prism::Node - # def initialize: (Array[RequiredParameterNode | MultiTargetNode] requireds, Array[OptionalParameterNode] optionals, RestParameterNode | ImplicitRestNode | nil rest, Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode] 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 # @@ -25978,7 +26091,7 @@ class Prism::ParametersNode < ::Prism::Node 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), @@ -26023,7 +26136,7 @@ class Prism::ParametersNode < ::Prism::Node 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#14642 sig do @@ -26031,7 +26144,7 @@ class Prism::ParametersNode < ::Prism::Node 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), @@ -26047,7 +26160,7 @@ class Prism::ParametersNode < ::Prism::Node 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#14650 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } @@ -26082,11 +26195,11 @@ class Prism::ParametersNode < ::Prism::Node 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#14664 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 @@ -26104,7 +26217,7 @@ class Prism::ParametersNode < ::Prism::Node # Mirrors the Method#parameters method. # - # source://prism//lib/prism/node_ext.rb#239 + # source://prism//lib/prism/node_ext.rb#238 sig { returns(T::Array[T.any([Symbol, Symbol], [Symbol])]) } def signature; end @@ -27836,7 +27949,7 @@ class Prism::RationalNode < ::Prism::Node # 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#105 sig { returns(Rational) } def value; end @@ -28415,12 +28528,12 @@ class Prism::RegularExpressionNode < ::Prism::Node end end -# source://prism//lib/prism/node_ext.rb#6 +# source://prism//lib/prism/node_ext.rb#17 module Prism::RegularExpressionOptions # Returns a numeric value that represents the flags that were used to create # the regular expression. # - # source://prism//lib/prism/node_ext.rb#9 + # source://prism//lib/prism/node_ext.rb#20 def options; end end @@ -29718,22 +29831,22 @@ class Prism::Serialize::Loader # source://prism//lib/prism/serialize.rb#114 def load_line_offsets; end - # source://prism//lib/prism/serialize.rb#423 + # source://prism//lib/prism/serialize.rb#433 def load_metadata; end - # source://prism//lib/prism/serialize.rb#457 + # source://prism//lib/prism/serialize.rb#467 def load_nodes; end - # source://prism//lib/prism/serialize.rb#471 + # source://prism//lib/prism/serialize.rb#481 def load_result; end # source://prism//lib/prism/serialize.rb#110 def load_start_line; end - # source://prism//lib/prism/serialize.rb#432 + # source://prism//lib/prism/serialize.rb#442 def load_tokens; end - # source://prism//lib/prism/serialize.rb#445 + # source://prism//lib/prism/serialize.rb#455 def load_tokens_result; end # Returns the value of attribute serialized. @@ -29753,61 +29866,61 @@ class Prism::Serialize::Loader private - # source://prism//lib/prism/serialize.rb#557 + # source://prism//lib/prism/serialize.rb#567 def load_constant(index); end - # source://prism//lib/prism/serialize.rb#510 + # source://prism//lib/prism/serialize.rb#520 def load_double; end - # source://prism//lib/prism/serialize.rb#525 + # source://prism//lib/prism/serialize.rb#535 def load_embedded_string; end - # source://prism//lib/prism/serialize.rb#587 + # source://prism//lib/prism/serialize.rb#597 def load_error_level; end - # source://prism//lib/prism/serialize.rb#499 + # source://prism//lib/prism/serialize.rb#509 def load_integer; end - # source://prism//lib/prism/serialize.rb#541 + # source://prism//lib/prism/serialize.rb#551 def load_location; end - # source://prism//lib/prism/serialize.rb#545 + # source://prism//lib/prism/serialize.rb#555 def load_location_object; end - # source://prism//lib/prism/serialize.rb#616 + # source://prism//lib/prism/serialize.rb#626 def load_node; end - # source://prism//lib/prism/serialize.rb#582 + # source://prism//lib/prism/serialize.rb#592 def load_optional_constant; end - # source://prism//lib/prism/serialize.rb#549 + # source://prism//lib/prism/serialize.rb#559 def load_optional_location; end - # source://prism//lib/prism/serialize.rb#553 + # source://prism//lib/prism/serialize.rb#563 def load_optional_location_object; end - # source://prism//lib/prism/serialize.rb#518 + # source://prism//lib/prism/serialize.rb#528 def load_optional_node; end - # source://prism//lib/prism/serialize.rb#578 + # source://prism//lib/prism/serialize.rb#588 def load_required_constant; end - # source://prism//lib/prism/serialize.rb#529 + # source://prism//lib/prism/serialize.rb#539 def load_string; end - # source://prism//lib/prism/serialize.rb#514 + # source://prism//lib/prism/serialize.rb#524 def load_uint32; end - # source://prism//lib/prism/serialize.rb#494 + # source://prism//lib/prism/serialize.rb#504 def load_varsint; end # variable-length integer using https://en.wikipedia.org/wiki/LEB128 # This is also what protobuf uses: https://protobuf.dev/programming-guides/encoding/#varints # - # source://prism//lib/prism/serialize.rb#480 + # source://prism//lib/prism/serialize.rb#490 def load_varuint; end - # source://prism//lib/prism/serialize.rb#602 + # source://prism//lib/prism/serialize.rb#612 def load_warning_level; end end @@ -29839,7 +29952,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#1840 +# source://prism//lib/prism/serialize.rb#1850 Prism::Serialize::TOKEN_TYPES = T.let(T.unsafe(nil), Array) # This node wraps a constant write to indicate that when the value is written, it should have its shareability state modified. @@ -30280,7 +30393,7 @@ class Prism::Source # Returns the lines of the source code as an array of strings. # # source://prism//lib/prism/parse_result.rb#39 - sig { returns(T::Array[Integer]) } + sig { returns(T::Array[String]) } def lines; end # The list of newline byte offsets in the source code. @@ -31130,7 +31243,7 @@ class Prism::StringNode < ::Prism::Node # 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#66 sig { returns(Prism::InterpolatedStringNode) } def to_interpolated; end @@ -31928,12 +32041,10 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # source://prism//lib/prism/translation/parser/compiler.rb#233 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#338 def visit_call_and_write_node(node); end # foo @@ -31954,138 +32065,124 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # source://prism//lib/prism/translation/parser/compiler.rb#319 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#357 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#376 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#388 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#407 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#394 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#420 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#459 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#449 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#469 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#433 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#479 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#439 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#510 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#500 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#520 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#576 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#536 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#566 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#586 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#596 def visit_constant_path_target_node(node); end # Foo::Bar = 1 @@ -32094,19 +32191,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#556 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#485 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#530 def visit_constant_target_node(node); end # Foo = 1 @@ -32115,7 +32212,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#494 def visit_constant_write_node(node); end # def foo; end @@ -32124,7 +32221,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#605 def visit_def_node(node); end # defined? a @@ -32133,25 +32230,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#652 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#664 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#670 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#680 def visit_embedded_variable_node(node); end # begin; foo; ensure; bar; end @@ -32159,19 +32256,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#686 def visit_ensure_node(node); end # false # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#626 + # source://prism//lib/prism/translation/parser/compiler.rb#692 def visit_false_node(node); end # foo => [*, bar, *] # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#632 + # source://prism//lib/prism/translation/parser/compiler.rb#698 def visit_find_pattern_node(node); end # 0..5 @@ -32179,31 +32276,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#1494 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#710 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#716 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#734 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#740 def visit_forwarding_parameter_node(node); end # super @@ -32212,59 +32309,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#749 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#787 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#777 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#797 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#761 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#807 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#767 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#813 def visit_hash_node(node); end # foo => {} # ^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#745 + # source://prism//lib/prism/translation/parser/compiler.rb#823 def visit_hash_pattern_node(node); end # if foo then bar end @@ -32276,13 +32369,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#841 def visit_if_node(node); end # 1i # ^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#805 + # source://prism//lib/prism/translation/parser/compiler.rb#883 def visit_imaginary_node(node); end # { foo: } @@ -32290,7 +32383,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#889 def visit_implicit_node(node); end # foo { |bar,| } @@ -32298,80 +32391,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#895 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#901 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#945 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#927 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#963 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#981 def visit_index_target_node(node); end - # ^^^^^^^^^^^ # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#902 + # source://prism//lib/prism/translation/parser/compiler.rb#1018 def visit_instance_variable_and_write_node(node); end # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#902 + # source://prism//lib/prism/translation/parser/compiler.rb#1008 def visit_instance_variable_operator_write_node(node); end - # ^^^^^^^^^^^ # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#902 + # source://prism//lib/prism/translation/parser/compiler.rb#1028 def visit_instance_variable_or_write_node(node); end # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#886 + # source://prism//lib/prism/translation/parser/compiler.rb#992 def visit_instance_variable_read_node(node); end # @foo, = bar # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#920 + # source://prism//lib/prism/translation/parser/compiler.rb#1038 def visit_instance_variable_target_node(node); end # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#892 + # source://prism//lib/prism/translation/parser/compiler.rb#998 def visit_instance_variable_write_node(node); end # 1 # ^ # - # source://prism//lib/prism/translation/parser/compiler.rb#926 + # source://prism//lib/prism/translation/parser/compiler.rb#1044 def visit_integer_node(node); end # /foo #{bar}/ @@ -32379,43 +32466,43 @@ 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#1050 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#1050 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#1065 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#1128 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#1138 def visit_interpolated_x_string_node(node); end # -> { it } # ^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1035 + # source://prism//lib/prism/translation/parser/compiler.rb#1153 def visit_it_parameters_node(node); end # foo(bar: baz) # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1041 + # source://prism//lib/prism/translation/parser/compiler.rb#1159 def visit_keyword_hash_node(node); end # def foo(**bar); end @@ -32424,53 +32511,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#1168 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#1177 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#1236 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#1226 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#1246 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#1203 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#1256 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#1216 def visit_local_variable_write_node(node); end # /foo/ @@ -32478,50 +32561,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#1528 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#1266 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#1276 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#1286 def visit_match_write_node(node); end # A node that is missing from the syntax tree. This is only used in the # case of a syntax error. The parser gem doesn't have such a concept, so # we invent our own here. # - # source://prism//lib/prism/translation/parser/compiler.rb#1167 + # source://prism//lib/prism/translation/parser/compiler.rb#1297 def visit_missing_node(node); end # module Foo; end # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1173 + # source://prism//lib/prism/translation/parser/compiler.rb#1303 def visit_module_node(node); end # foo, bar = baz # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1184 + # source://prism//lib/prism/translation/parser/compiler.rb#1314 def visit_multi_target_node(node); end # foo, bar = baz # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1198 + # source://prism//lib/prism/translation/parser/compiler.rb#1328 def visit_multi_write_node(node); end # next @@ -32530,55 +32613,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#1349 def visit_next_node(node); end # nil # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1231 + # source://prism//lib/prism/translation/parser/compiler.rb#1361 def visit_nil_node(node); end # def foo(**nil); end # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1237 + # source://prism//lib/prism/translation/parser/compiler.rb#1367 def visit_no_keywords_parameter_node(node); end # -> { _1 + _2 } # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1247 + # source://prism//lib/prism/translation/parser/compiler.rb#1377 def visit_numbered_parameters_node(node); end # $1 # ^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1253 + # source://prism//lib/prism/translation/parser/compiler.rb#1383 def visit_numbered_reference_read_node(node); end # def foo(bar: baz); end # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1259 + # source://prism//lib/prism/translation/parser/compiler.rb#1389 def visit_optional_keyword_parameter_node(node); end # def foo(bar = 1); end # ^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1265 + # source://prism//lib/prism/translation/parser/compiler.rb#1395 def visit_optional_parameter_node(node); end # a or b # ^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1271 + # source://prism//lib/prism/translation/parser/compiler.rb#1401 def visit_or_node(node); end # def foo(bar, *baz); end # ^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1277 + # source://prism//lib/prism/translation/parser/compiler.rb#1407 def visit_parameters_node(node); end # () @@ -32587,76 +32670,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#1446 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#1456 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#1463 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#1468 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#1478 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#1488 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#1494 def visit_range_node(node); end # 1r # ^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1386 + # source://prism//lib/prism/translation/parser/compiler.rb#1516 def visit_rational_node(node); end # redo # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1392 + # source://prism//lib/prism/translation/parser/compiler.rb#1522 def visit_redo_node(node); end # /foo/ # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1398 + # source://prism//lib/prism/translation/parser/compiler.rb#1528 def visit_regular_expression_node(node); end # def foo(bar:); end # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1413 + # source://prism//lib/prism/translation/parser/compiler.rb#1543 def visit_required_keyword_parameter_node(node); end # def foo(bar); end # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1419 + # source://prism//lib/prism/translation/parser/compiler.rb#1549 def visit_required_parameter_node(node); end # foo rescue bar # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1425 + # source://prism//lib/prism/translation/parser/compiler.rb#1555 def visit_rescue_modifier_node(node); end # begin; rescue; end @@ -32664,7 +32747,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#1573 def visit_rescue_node(node); end # def foo(*bar); end @@ -32673,13 +32756,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#1582 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#1588 def visit_retry_node(node); end # return @@ -32688,42 +32771,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#1597 def visit_return_node(node); end # self # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1479 + # source://prism//lib/prism/translation/parser/compiler.rb#1609 def visit_self_node(node); end # A shareable constant. # - # source://prism//lib/prism/translation/parser/compiler.rb#1484 + # source://prism//lib/prism/translation/parser/compiler.rb#1614 def visit_shareable_constant_node(node); end # class << self; end # ^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1490 + # source://prism//lib/prism/translation/parser/compiler.rb#1620 def visit_singleton_class_node(node); end # __ENCODING__ # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1502 + # source://prism//lib/prism/translation/parser/compiler.rb#1632 def visit_source_encoding_node(node); end # __FILE__ # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1508 + # source://prism//lib/prism/translation/parser/compiler.rb#1638 def visit_source_file_node(node); end # __LINE__ # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1514 + # source://prism//lib/prism/translation/parser/compiler.rb#1644 def visit_source_line_node(node); end # foo(*bar) @@ -32735,42 +32818,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#1656 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#1669 def visit_statements_node(node); end # "foo" # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1545 + # source://prism//lib/prism/translation/parser/compiler.rb#1675 def visit_string_node(node); end # super(foo) # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1586 + # source://prism//lib/prism/translation/parser/compiler.rb#1716 def visit_super_node(node); end # :foo # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1609 + # source://prism//lib/prism/translation/parser/compiler.rb#1739 def visit_symbol_node(node); end # true # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1641 + # source://prism//lib/prism/translation/parser/compiler.rb#1771 def visit_true_node(node); end # undef foo # ^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1647 + # source://prism//lib/prism/translation/parser/compiler.rb#1777 def visit_undef_node(node); end # unless foo; bar end @@ -32779,7 +32862,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#1786 def visit_unless_node(node); end # until foo; bar end @@ -32788,13 +32871,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#1816 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#1838 def visit_when_node(node); end # while foo; bar end @@ -32803,13 +32886,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#1856 def visit_while_node(node); end # `foo` # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1748 + # source://prism//lib/prism/translation/parser/compiler.rb#1878 def visit_x_string_node(node); end # yield @@ -32818,7 +32901,7 @@ 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#1910 def visit_yield_node(node); end private @@ -32826,20 +32909,20 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # 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#1924 def copy_compiler(forwarding: T.unsafe(nil), in_destructure: T.unsafe(nil), in_pattern: T.unsafe(nil)); end # When *, **, &, or ... are used as an argument in a method call, we # check if they were allowed by the current context. To determine that # we build this lookup table. # - # source://prism//lib/prism/translation/parser/compiler.rb#1801 + # source://prism//lib/prism/translation/parser/compiler.rb#1931 def find_forwarding(node); end # Because we have mutated the AST to allow for newlines in the middle of # a rational, we need to manually handle the value here. # - # source://prism//lib/prism/translation/parser/compiler.rb#1815 + # source://prism//lib/prism/translation/parser/compiler.rb#1945 def imaginary_value(node); end # Negate the value of a numeric node. This is a special case where you @@ -32848,7 +32931,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#1954 def numeric_negate(message_loc, receiver); end # Blocks can have a special set of parameters that automatically expand @@ -32857,18 +32940,18 @@ 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#1966 def procarg0?(parameters); end # Because we have mutated the AST to allow for newlines in the middle of # a rational, we need to manually handle the value here. # - # source://prism//lib/prism/translation/parser/compiler.rb#1849 + # source://prism//lib/prism/translation/parser/compiler.rb#1979 def rational_value(node); end # Constructs a new source range from the given start and end offsets. # - # source://prism//lib/prism/translation/parser/compiler.rb#1863 + # source://prism//lib/prism/translation/parser/compiler.rb#1993 def srange(location); end # Constructs a new source range by finding the given tokens between the @@ -32878,37 +32961,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#2008 def srange_find(start_offset, end_offset, tokens); end # Constructs a new source range from the given start and end offsets. # - # source://prism//lib/prism/translation/parser/compiler.rb#1868 + # source://prism//lib/prism/translation/parser/compiler.rb#1998 def srange_offsets(start_offset, end_offset); end # Transform a location into a token that the parser gem expects. # - # source://prism//lib/prism/translation/parser/compiler.rb#1888 + # source://prism//lib/prism/translation/parser/compiler.rb#2018 def token(location); end # Visit a block node on a call. # - # source://prism//lib/prism/translation/parser/compiler.rb#1893 + # source://prism//lib/prism/translation/parser/compiler.rb#2023 def visit_block(call, block); end # Visit a heredoc that can be either a string or an xstring. # - # source://prism//lib/prism/translation/parser/compiler.rb#1927 + # source://prism//lib/prism/translation/parser/compiler.rb#2057 def visit_heredoc(node); end # Visit a numeric node and account for the optional sign. # - # source://prism//lib/prism/translation/parser/compiler.rb#1973 + # source://prism//lib/prism/translation/parser/compiler.rb#2103 def visit_numeric(node, value); end # Within the given block, track that we're within a pattern. # - # source://prism//lib/prism/translation/parser/compiler.rb#1985 + # source://prism//lib/prism/translation/parser/compiler.rb#2115 def within_pattern; end end @@ -32921,7 +33004,7 @@ 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#1990 Prism::Translation::Parser::Compiler::Range = Parser::Source::Range # source://prism//lib/prism/translation/parser.rb#12 @@ -37688,7 +37771,7 @@ class Prism::XStringNode < ::Prism::Node # 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#83 sig { returns(Prism::InterpolatedXStringNode) } def to_interpolated; end From 49fa2d7db0c6a1fa24aa4fa9d4c2f1d98fd0ef14 Mon Sep 17 00:00:00 2001 From: Thomas Marshall Date: Fri, 17 May 2024 15:28:05 +0100 Subject: [PATCH 109/189] Don't generate code lens for nested definitions (#2067) When testing a test framework or plugin, it's common to have test methods inside test methods [1]. This change ensures that the code lens is only generated for tests that will actually be run by the test runner, not for nested definitions. [1]: https://github.com/minitest/minitest/blob/f60c6f2e29082b404fb6933abb6a1813b2c09c5d/test/minitest/test_minitest_test.rb#L92-L94 --- lib/ruby_lsp/listeners/code_lens.rb | 11 ++++++++++ test/requests/code_lens_expectations_test.rb | 21 ++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/lib/ruby_lsp/listeners/code_lens.rb b/lib/ruby_lsp/listeners/code_lens.rb index bb4ce05a09..3f9cec9acc 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)) diff --git a/test/requests/code_lens_expectations_test.rb b/test/requests/code_lens_expectations_test.rb index c4688bbae2..f5b1389802 100644 --- a/test/requests/code_lens_expectations_test.rb +++ b/test/requests/code_lens_expectations_test.rb @@ -156,6 +156,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 From 01fcc59d729d261ff9e017f88740c5a8f4c3ee78 Mon Sep 17 00:00:00 2001 From: Nithin Bekal Date: Thu, 16 May 2024 22:50:02 -0400 Subject: [PATCH 110/189] docs: Add description for nvim ShowRubyDeps cmd --- EDITORS.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/EDITORS.md b/EDITORS.md index 69ab9bf50e..5625e214ef 100644 --- a/EDITORS.md +++ b/EDITORS.md @@ -63,8 +63,10 @@ mason_lspconfig.setup_handlers { ### Neovim Limitations +`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 --- 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", From e748537db22c4c5586979149810dbdae5d3601f3 Mon Sep 17 00:00:00 2001 From: Nithin Bekal Date: Thu, 16 May 2024 22:55:36 -0400 Subject: [PATCH 111/189] docs: format ShowRubyDeps code snippet --- EDITORS.md | 61 ++++++++++++++++++++++-------------------------------- 1 file changed, 25 insertions(+), 36 deletions(-) diff --git a/EDITORS.md b/EDITORS.md index 5625e214ef..92bb70c0ce 100644 --- a/EDITORS.md +++ b/EDITORS.md @@ -67,45 +67,34 @@ mason_lspconfig.setup_handlers { The following snippet adds `ShowRubyDeps` command to show dependencies in the quickfix list. ```lua --- 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.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}) end - require("lspconfig").ruby_lsp.setup({ on_attach = function(client, buffer) add_ruby_deps_command(client, buffer) From 40511e53b2ba49f51b239136de0e8d7385d97cff Mon Sep 17 00:00:00 2001 From: Nithin Bekal Date: Fri, 17 May 2024 10:07:08 -0400 Subject: [PATCH 112/189] docs: More cleanup of neovim docs --- EDITORS.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/EDITORS.md b/EDITORS.md index 92bb70c0ce..350a17e73a 100644 --- a/EDITORS.md +++ b/EDITORS.md @@ -28,6 +28,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,7 +63,7 @@ mason_lspconfig.setup_handlers { } ``` -### Neovim Limitations +### Additional setup (optional) `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. From d506ac43ea0512c6d19ca21b1a991dfa2d055ad6 Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Fri, 17 May 2024 14:14:23 -0400 Subject: [PATCH 113/189] Allow Code Lenses without a command (#2069) --- lib/ruby_lsp/requests/support/common.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ruby_lsp/requests/support/common.rb b/lib/ruby_lsp/requests/support/common.rb index 85a5598a78..3b5e5d4db2 100644 --- a/lib/ruby_lsp/requests/support/common.rb +++ b/lib/ruby_lsp/requests/support/common.rb @@ -50,12 +50,12 @@ def visible?(node, range) params( node: Prism::Node, title: String, - command_name: String, + command_name: T.nilable(String), arguments: T.nilable(T::Array[T.untyped]), data: T.nilable(T::Hash[T.untyped, T.untyped]), ).returns(Interface::CodeLens) end - def create_code_lens(node, title:, command_name:, arguments:, data:) + def create_code_lens(node, title:, command_name: nil, arguments: nil, data: nil) range = range_from_node(node) Interface::CodeLens.new( From 6c6418650a143aed0f0fac69effafd6980cfcfa4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 May 2024 02:05:39 +0000 Subject: [PATCH 114/189] Bump the minor-and-patch group with 3 updates Bumps the minor-and-patch group with 3 updates: [mocha](https://github.com/freerange/mocha), [sorbet-static-and-runtime](https://github.com/sorbet/sorbet) and [sorbet-runtime](https://github.com/sorbet/sorbet). Updates `mocha` from 2.2.0 to 2.3.0 - [Changelog](https://github.com/freerange/mocha/blob/main/RELEASE.md) - [Commits](https://github.com/freerange/mocha/compare/v2.2.0...v2.3.0) Updates `sorbet-static-and-runtime` from 0.5.11380 to 0.5.11385 - [Release notes](https://github.com/sorbet/sorbet/releases) - [Commits](https://github.com/sorbet/sorbet/commits) Updates `sorbet-runtime` from 0.5.11380 to 0.5.11385 - [Release notes](https://github.com/sorbet/sorbet/releases) - [Commits](https://github.com/sorbet/sorbet/commits) --- updated-dependencies: - dependency-name: mocha dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: sorbet-static-and-runtime dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: sorbet-runtime dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] --- Gemfile | 2 +- Gemfile.lock | 22 ++++++++++------------ 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/Gemfile b/Gemfile index 040aa2f719..2715bbe5d5 100644 --- a/Gemfile +++ b/Gemfile @@ -9,7 +9,7 @@ group :development do gem "debug", "~> 1.9", require: false gem "minitest-reporters", "~> 1.6" gem "minitest", "~> 5.23" - 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" diff --git a/Gemfile.lock b/Gemfile.lock index 93b8224c31..8b5e137b8a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -37,7 +37,7 @@ GEM 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) @@ -91,14 +91,14 @@ GEM simplecov_json_formatter (~> 0.1) simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) - sorbet (0.5.11380) - sorbet-static (= 0.5.11380) - sorbet-runtime (0.5.11380) - sorbet-static (0.5.11380-universal-darwin) - sorbet-static (0.5.11380-x86_64-linux) - sorbet-static-and-runtime (0.5.11380) - sorbet (= 0.5.11380) - sorbet-runtime (= 0.5.11380) + sorbet (0.5.11385) + sorbet-static (= 0.5.11385) + sorbet-runtime (0.5.11385) + sorbet-static (0.5.11385-universal-darwin) + sorbet-static (0.5.11385-x86_64-linux) + sorbet-static-and-runtime (0.5.11385) + sorbet (= 0.5.11385) + sorbet-runtime (= 0.5.11385) spoom (1.3.0) erubi (>= 1.10.0) prism (>= 0.19.0) @@ -126,8 +126,6 @@ GEM PLATFORMS arm64-darwin - x64-mingw-ucrt - x64-mingw32 x86_64-darwin x86_64-linux @@ -136,7 +134,7 @@ DEPENDENCIES debug (~> 1.9) minitest (~> 5.23) minitest-reporters (~> 1.6) - mocha (~> 2.2) + mocha (~> 2.3) psych (~> 5.1) rake (~> 13.2) rdoc! From fa42222f32313679a9b1ca3060f09ed6895fcb60 Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 20 May 2024 02:06:20 +0000 Subject: [PATCH 115/189] Update RBI files for gems 2024-05-20 [dependabot skip] --- .../rbi/gems/{mocha@2.2.0.rbi => mocha@2.3.0.rbi} | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) rename sorbet/rbi/gems/{mocha@2.2.0.rbi => mocha@2.3.0.rbi} (99%) 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 513b1ce565..9946b051ee 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 From c64416ff11a11426eeab747a6cd0c06ddf415a09 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 May 2024 02:52:03 +0000 Subject: [PATCH 116/189] Bump test/fixtures/prism from `1c8d08b` to `b6aa0f2` Bumps [test/fixtures/prism](https://github.com/ruby/prism) from `1c8d08b` to `b6aa0f2`. - [Release notes](https://github.com/ruby/prism/releases) - [Commits](https://github.com/ruby/prism/compare/1c8d08b79108b92cfdd1985a895c437bfbbb003a...b6aa0f22be2fddef68cb8c635d090591133e3260) --- updated-dependencies: - dependency-name: test/fixtures/prism dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- test/fixtures/prism | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/fixtures/prism b/test/fixtures/prism index 1c8d08b791..b6aa0f22be 160000 --- a/test/fixtures/prism +++ b/test/fixtures/prism @@ -1 +1 @@ -Subproject commit 1c8d08b79108b92cfdd1985a895c437bfbbb003a +Subproject commit b6aa0f22be2fddef68cb8c635d090591133e3260 From b027cfa0e478036313f3ecf1f623f807b13896d6 Mon Sep 17 00:00:00 2001 From: Earlopain <14981592+Earlopain@users.noreply.github.com> Date: Tue, 21 May 2024 16:08:11 +0200 Subject: [PATCH 117/189] Ignore `test/expectations/` for sorbet (#2075) A expecation currently does something like this: ```rb def method end ``` This makes it impossible to call `Object.method` while keeping sorbet happy. There is only one file that sorbet should know about in that folder, just move that somewhere else. Also fixes two RuboCop offenses in that file since it was previously ignored --- CONTRIBUTING.md | 4 ++-- sorbet/config | 1 + test/requests/code_action_resolve_expectations_test.rb | 2 +- test/requests/code_actions_expectations_test.rb | 2 +- test/requests/code_actions_formatting_test.rb | 2 +- test/requests/code_lens_expectations_test.rb | 2 +- test/requests/definition_expectations_test.rb | 2 +- test/requests/diagnostics_expectations_test.rb | 2 +- test/requests/document_highlight_expectations_test.rb | 2 +- test/requests/document_link_expectations_test.rb | 2 +- test/requests/document_symbol_expectations_test.rb | 2 +- test/requests/folding_ranges_expectations_test.rb | 2 +- test/requests/formatting_expectations_test.rb | 2 +- test/requests/hover_expectations_test.rb | 2 +- test/requests/inlay_hints_expectations_test.rb | 2 +- test/requests/selection_ranges_expectations_test.rb | 2 +- test/requests/semantic_highlighting_expectations_test.rb | 2 +- .../support}/expectations_test_runner.rb | 2 +- 18 files changed, 19 insertions(+), 18 deletions(-) rename test/{expectations => requests/support}/expectations_test_runner.rb (99%) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ad429afa2a..4a77640bb6 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/sorbet/config b/sorbet/config index aaf95280cd..733ffe1460 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/test/requests/code_action_resolve_expectations_test.rb b/test/requests/code_action_resolve_expectations_test.rb index 68accad139..531a77bddc 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 5600e70720..4cf9376b39 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 ca562df6a8..fea80ff8f5 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 f5b1389802..0868a21542 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" diff --git a/test/requests/definition_expectations_test.rb b/test/requests/definition_expectations_test.rb index 244ed3c17d..e3522e5f46 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" diff --git a/test/requests/diagnostics_expectations_test.rb b/test/requests/diagnostics_expectations_test.rb index 1b4c64cbbd..399fd18e23 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 f383beab89..7218e36adf 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 299502e8d4..c68b71db6e 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 b79cb0693a..709e098fd4 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 66dbfdb31b..354686637a 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 910a85f13f..9a59657c3b 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 c0baf1050a..3bdcc9d561 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" diff --git a/test/requests/inlay_hints_expectations_test.rb b/test/requests/inlay_hints_expectations_test.rb index e410c3bea0..eedfdc56bb 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/selection_ranges_expectations_test.rb b/test/requests/selection_ranges_expectations_test.rb index 8ead2d3df9..62061d69d0 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 d2fd9c43d2..d6bc51dded 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/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 6b78f48798..7b80978938 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 From 4d3509a92542a2ffa24dc3fa621d933a86e204ee Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 May 2024 13:36:50 -0400 Subject: [PATCH 118/189] Bump @shopify/eslint-plugin from 44.0.0 to 45.0.0 in /vscode (#2074) Bumps [@shopify/eslint-plugin](https://github.com/Shopify/web-configs/tree/HEAD/packages/eslint-plugin) from 44.0.0 to 45.0.0. - [Release notes](https://github.com/Shopify/web-configs/releases) - [Changelog](https://github.com/Shopify/web-configs/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/Shopify/web-configs/commits/@shopify/eslint-plugin@45.0.0/packages/eslint-plugin) --- updated-dependencies: - dependency-name: "@shopify/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- vscode/package.json | 2 +- vscode/yarn.lock | 558 ++++++++++++++++++++++++-------------------- 2 files changed, 308 insertions(+), 252 deletions(-) diff --git a/vscode/package.json b/vscode/package.json index 88fce6b454..d9222e3458 100644 --- a/vscode/package.json +++ b/vscode/package.json @@ -537,7 +537,7 @@ }, "devDependencies": { "@babel/core": "^7.24.5", - "@shopify/eslint-plugin": "^44.0.0", + "@shopify/eslint-plugin": "^45.0.0", "@shopify/prettier-config": "^1.1.2", "@types/glob": "^8.1.0", "@types/mocha": "^10.0.6", diff --git a/vscode/yarn.lock b/vscode/yarn.lock index ad5a043272..2f39ba74b5 100644 --- a/vscode/yarn.lock +++ b/vscode/yarn.lock @@ -458,7 +458,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 +606,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" @@ -688,11 +688,6 @@ "@types/minimatch" "^5.1.2" "@types/node" "*" -"@types/json-schema@^7.0.12", "@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" @@ -715,11 +710,6 @@ dependencies: undici-types "~5.26.4" -"@types/semver@^7.3.12", "@types/semver@^7.5.0": - 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,23 +727,6 @@ 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.9.0": version "7.9.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.9.0.tgz#093b96fc4e342226e65d5f18f9c87081e0b04a31" @@ -769,17 +742,6 @@ natural-compare "^1.4.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.9.0": version "7.9.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.9.0.tgz#fb3ba01b75e0e65cb78037a360961b00301f6c70" @@ -791,22 +753,6 @@ "@typescript-eslint/visitor-keys" "7.9.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== - dependencies: - "@typescript-eslint/types" "6.21.0" - "@typescript-eslint/visitor-keys" "6.21.0" - "@typescript-eslint/scope-manager@7.9.0": version "7.9.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.9.0.tgz#1dd3e63a4411db356a9d040e75864851b5f2619b" @@ -815,16 +761,6 @@ "@typescript-eslint/types" "7.9.0" "@typescript-eslint/visitor-keys" "7.9.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.9.0": version "7.9.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.9.0.tgz#f523262e1b66ca65540b7a65a1222db52e0a90c9" @@ -835,48 +771,11 @@ 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.9.0": version "7.9.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.9.0.tgz#b58e485e4bfba055659c7e683ad4f5f0821ae2ec" integrity sha512-oZQD9HEWQanl9UfsbGVcZ2cGaR0YT5476xfWE0oE5kQa2sNK2frxOlkeacLOTh9po4AlUT5rtkGyYM5kew0z5w== -"@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/typescript-estree@7.9.0": version "7.9.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.9.0.tgz#3395e27656060dc313a6b406c3a298b729685e07" @@ -891,20 +790,7 @@ 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== - 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.9.0": +"@typescript-eslint/utils@7.9.0", "@typescript-eslint/utils@^6.0.0 || ^7.0.0": version "7.9.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.9.0.tgz#1b96a34eefdca1c820cb1bbc2751d848b4540899" integrity sha512-5KVRQCzZajmT4Ep+NEgjXCvjuypVvYHUW7RHlXzNPuak2oWpVoD1jf5xCP0dPAuNIchjC7uQyvbdaSTFaLqSdA== @@ -914,36 +800,6 @@ "@typescript-eslint/types" "7.9.0" "@typescript-eslint/typescript-estree" "7.9.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/visitor-keys@7.9.0": version "7.9.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.9.0.tgz#82162656e339c3def02895f5c8546f6888d9b9ea" @@ -1121,6 +977,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" @@ -1142,7 +1010,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== @@ -1152,7 +1020,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== @@ -1554,6 +1432,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" @@ -1796,6 +1701,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" @@ -1813,7 +1770,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== @@ -1834,7 +1791,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== @@ -1903,10 +1887,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" @@ -1930,10 +1914,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" @@ -1953,7 +1937,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== @@ -1981,14 +1965,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== @@ -2022,7 +2006,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== @@ -2035,34 +2019,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== @@ -2072,7 +2058,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== @@ -2551,6 +2537,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" @@ -2619,7 +2612,7 @@ ieee754@^1.1.13: 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== @@ -2660,7 +2653,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== @@ -2725,6 +2718,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,7 +2773,7 @@ is-map@^2.0.1: 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== @@ -2813,7 +2813,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== @@ -3237,13 +3237,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" @@ -3418,7 +3411,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== @@ -3427,7 +3420,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== @@ -3447,13 +3440,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" @@ -3797,7 +3791,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== @@ -3836,7 +3830,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== @@ -3874,6 +3868,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" @@ -3943,7 +3947,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== @@ -3980,6 +3984,16 @@ 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@^4.0.1: version "4.1.0" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" @@ -4056,20 +4070,23 @@ 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.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.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" - get-intrinsic "^1.2.1" + 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" @@ -4080,6 +4097,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" @@ -4089,6 +4116,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" @@ -4098,6 +4134,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" @@ -4232,7 +4277,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== @@ -4247,23 +4292,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" @@ -4293,7 +4326,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== @@ -4302,7 +4335,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== @@ -4313,7 +4346,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== @@ -4337,6 +4370,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" @@ -4512,6 +4557,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" From 7d88ded5f851954313549e14604770ea92409312 Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Tue, 21 May 2024 13:37:42 -0400 Subject: [PATCH 119/189] Restore Windows platforms --- Gemfile.lock | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Gemfile.lock b/Gemfile.lock index 8b5e137b8a..23e1a059f9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -126,6 +126,8 @@ GEM PLATFORMS arm64-darwin + x64-mingw-ucrt + x64-mingw32 x86_64-darwin x86_64-linux From 95b23d92f6ea393b0df1a38cdb271465a8adc91a Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 22 May 2024 15:33:22 +0000 Subject: [PATCH 120/189] Bump version to v0.16.8 --- Gemfile.lock | 2 +- VERSION | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 23e1a059f9..5a8007b546 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -9,7 +9,7 @@ GIT PATH remote: . specs: - ruby-lsp (0.16.7) + ruby-lsp (0.16.8) language_server-protocol (~> 3.17.0) prism (>= 0.29.0, < 0.30) sorbet-runtime (>= 0.5.10782) diff --git a/VERSION b/VERSION index 427cda05dc..74aaa3f38c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.16.7 +0.16.8 From 5650d4b98a03cec6523995ebebaa0d58a62c9b68 Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Thu, 23 May 2024 08:50:58 -0400 Subject: [PATCH 121/189] Add link to Zed setup docs --- EDITORS.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/EDITORS.md b/EDITORS.md index 350a17e73a..aa6b3e9c38 100644 --- a/EDITORS.md +++ b/EDITORS.md @@ -130,6 +130,8 @@ Restart LSP or Sublime Text and `ruby-lsp` will automatically activate when open ## Zed (some limitations) +[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. From 85b9e29d24c4eaed986a140aead82e8a436d3aad Mon Sep 17 00:00:00 2001 From: Nate Matykiewicz Date: Thu, 23 May 2024 12:04:44 -0500 Subject: [PATCH 122/189] Prevent test suite from modifying contributors' Bundler settings (#2083) * Prevent test suite from modifying contributors' Bundler settings * Fix test --- lib/ruby_indexer/test/configuration_test.rb | 9 +++--- test/setup_bundler_test.rb | 33 ++++++++++----------- 2 files changed, 19 insertions(+), 23 deletions(-) diff --git a/lib/ruby_indexer/test/configuration_test.rb b/lib/ruby_indexer/test/configuration_test.rb index e7e774e6e1..05609f77ab 100644 --- a/lib/ruby_indexer/test/configuration_test.rb +++ b/lib/ruby_indexer/test/configuration_test.rb @@ -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/test/setup_bundler_test.rb b/test/setup_bundler_test.rb index 3daeae8be5..6b9a06fe13 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 From a68af437febc6c7588772d4e50ddf7a184e7b0e7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 May 2024 02:09:57 +0000 Subject: [PATCH 123/189] Bump test/fixtures/prism from `b6aa0f2` to `4f455dc` Bumps [test/fixtures/prism](https://github.com/ruby/prism) from `b6aa0f2` to `4f455dc`. - [Release notes](https://github.com/ruby/prism/releases) - [Commits](https://github.com/ruby/prism/compare/b6aa0f22be2fddef68cb8c635d090591133e3260...4f455dcdc6c78e41f3ed8905f4cc1cdff7765fbd) --- updated-dependencies: - dependency-name: test/fixtures/prism dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- test/fixtures/prism | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/fixtures/prism b/test/fixtures/prism index b6aa0f22be..4f455dcdc6 160000 --- a/test/fixtures/prism +++ b/test/fixtures/prism @@ -1 +1 @@ -Subproject commit b6aa0f22be2fddef68cb8c635d090591133e3260 +Subproject commit 4f455dcdc6c78e41f3ed8905f4cc1cdff7765fbd From a7f7f1ee312d286c8ba5720c4992e505cf0bce1a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 May 2024 02:35:32 +0000 Subject: [PATCH 124/189] Bump the minor-and-patch group with 4 updates Bumps the minor-and-patch group with 4 updates: [minitest](https://github.com/minitest/minitest), [rubocop](https://github.com/rubocop/rubocop), [sorbet-static-and-runtime](https://github.com/sorbet/sorbet) and [sorbet-runtime](https://github.com/sorbet/sorbet). Updates `minitest` from 5.23.0 to 5.23.1 - [Changelog](https://github.com/minitest/minitest/blob/master/History.rdoc) - [Commits](https://github.com/minitest/minitest/compare/v5.23.0...v5.23.1) Updates `rubocop` from 1.63.5 to 1.64.0 - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop/compare/v1.63.5...v1.64.0) Updates `sorbet-static-and-runtime` from 0.5.11385 to 0.5.11391 - [Release notes](https://github.com/sorbet/sorbet/releases) - [Commits](https://github.com/sorbet/sorbet/commits) Updates `sorbet-runtime` from 0.5.11385 to 0.5.11391 - [Release notes](https://github.com/sorbet/sorbet/releases) - [Commits](https://github.com/sorbet/sorbet/commits) --- updated-dependencies: - dependency-name: minitest dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: rubocop dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: sorbet-static-and-runtime dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: sorbet-runtime dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] --- Gemfile | 2 +- Gemfile.lock | 28 +++++++++++++--------------- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/Gemfile b/Gemfile index 2715bbe5d5..0d93de0907 100644 --- a/Gemfile +++ b/Gemfile @@ -18,7 +18,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 5a8007b546..16e2a2361d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -31,7 +31,7 @@ GEM reline (>= 0.4.2) json (2.7.2) language_server-protocol (3.17.0.3) - minitest (5.23.0) + minitest (5.23.1) minitest-reporters (1.6.1) ansi builder @@ -48,18 +48,18 @@ GEM prism (0.29.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.13) prism (>= 0.18.0, < 1.0.0) sorbet-runtime (>= 0.5.9204) - regexp_parser (2.9.1) + regexp_parser (2.9.2) reline (0.5.0) io-console (~> 0.5) rexml (3.2.8) strscan (>= 3.0.9) - rubocop (1.63.5) + rubocop (1.64.0) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) @@ -91,14 +91,14 @@ GEM simplecov_json_formatter (~> 0.1) simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) - sorbet (0.5.11385) - sorbet-static (= 0.5.11385) - sorbet-runtime (0.5.11385) - sorbet-static (0.5.11385-universal-darwin) - sorbet-static (0.5.11385-x86_64-linux) - sorbet-static-and-runtime (0.5.11385) - sorbet (= 0.5.11385) - sorbet-runtime (= 0.5.11385) + sorbet (0.5.11391) + sorbet-static (= 0.5.11391) + sorbet-runtime (0.5.11391) + sorbet-static (0.5.11391-universal-darwin) + sorbet-static (0.5.11391-x86_64-linux) + sorbet-static-and-runtime (0.5.11391) + sorbet (= 0.5.11391) + sorbet-runtime (= 0.5.11391) spoom (1.3.0) erubi (>= 1.10.0) prism (>= 0.19.0) @@ -126,8 +126,6 @@ GEM PLATFORMS arm64-darwin - x64-mingw-ucrt - x64-mingw32 x86_64-darwin x86_64-linux @@ -140,7 +138,7 @@ DEPENDENCIES 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) From 0e955352b693717b77ce4790614afd71dac380b6 Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 27 May 2024 02:36:33 +0000 Subject: [PATCH 125/189] Update RBI files for gems 2024-05-27 [dependabot skip] --- ...initest@5.23.0.rbi => minitest@5.23.1.rbi} | 0 .../gems/{racc@1.7.3.rbi => racc@1.8.0.rbi} | 66 +- ...rser@2.9.1.rbi => regexp_parser@2.9.2.rbi} | 4 +- ...{rubocop@1.63.5.rbi => rubocop@1.64.0.rbi} | 850 ++++++++++++------ 4 files changed, 593 insertions(+), 327 deletions(-) rename sorbet/rbi/gems/{minitest@5.23.0.rbi => minitest@5.23.1.rbi} (100%) rename sorbet/rbi/gems/{racc@1.7.3.rbi => racc@1.8.0.rbi} (70%) rename sorbet/rbi/gems/{regexp_parser@2.9.1.rbi => regexp_parser@2.9.2.rbi} (99%) rename sorbet/rbi/gems/{rubocop@1.63.5.rbi => rubocop@1.64.0.rbi} (98%) diff --git a/sorbet/rbi/gems/minitest@5.23.0.rbi b/sorbet/rbi/gems/minitest@5.23.1.rbi similarity index 100% rename from sorbet/rbi/gems/minitest@5.23.0.rbi rename to sorbet/rbi/gems/minitest@5.23.1.rbi 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 3e58f81190..0f0b979992 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/regexp_parser@2.9.1.rbi b/sorbet/rbi/gems/regexp_parser@2.9.2.rbi similarity index 99% rename from sorbet/rbi/gems/regexp_parser@2.9.1.rbi rename to sorbet/rbi/gems/regexp_parser@2.9.2.rbi index 34ad4f2a71..5253fea7d1 100644 --- a/sorbet/rbi/gems/regexp_parser@2.9.1.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/rubocop@1.63.5.rbi b/sorbet/rbi/gems/rubocop@1.64.0.rbi similarity index 98% rename from sorbet/rbi/gems/rubocop@1.63.5.rbi rename to sorbet/rbi/gems/rubocop@1.64.0.rbi index f5800e52c4..6af938aa23 100644 --- a/sorbet/rbi/gems/rubocop@1.63.5.rbi +++ b/sorbet/rbi/gems/rubocop@1.64.0.rbi @@ -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 @@ -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 @@ -5685,7 +5696,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 +5709,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 +6628,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 +6676,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 +6695,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 +6723,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 +6742,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 +8787,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 @@ -30627,6 +30643,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 +30705,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 # -# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#70 +# end +# +# 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 +31163,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 +31252,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 @@ -34864,34 +34927,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 +37998,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 +38073,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} +# +# # 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#113 +# 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 +38812,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 +38828,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 @@ -48331,6 +48430,63 @@ 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#48 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#69 + def allow_send?; end + + # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#73 + def offense_range(node); end + + # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#77 + def removal_argument_range(first_argument, second_argument); end +end + +# 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#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) @@ -49692,6 +49848,87 @@ 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 +# +# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#29 +class RuboCop::Cop::Style::SuperArguments < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#36 + def on_super(super_node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#52 + def arguments_identical?(def_args, super_args); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#107 + def block_arg_same?(def_arg, super_arg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#119 + def define_method?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#115 + def forward_arg_same?(def_arg, super_arg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#87 + def keyword_arg_same?(def_arg, super_arg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#97 + def keyword_rest_arg_same?(def_arg, super_arg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#70 + def positional_arg_same?(def_arg, super_arg); end + + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#77 + def positional_rest_arg_same(def_arg, super_arg); end + + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#125 + def preprocess_super_args(super_args); end +end + +# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#32 +RuboCop::Cop::Style::SuperArguments::DEF_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#34 +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. @@ -49954,8 +50191,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 } # -# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#123 +# # 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#140 class RuboCop::Cop::Style::SymbolProc < ::RuboCop::Cop::Base include ::RuboCop::Cop::CommentsHelp include ::RuboCop::Cop::RangeHelp @@ -49965,81 +50217,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. @@ -54677,16 +54935,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 @@ -54694,38 +54952,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 @@ -54733,12 +54991,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 @@ -54751,12 +55014,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 @@ -54829,43 +55092,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 @@ -55626,7 +55892,7 @@ module RuboCop::LSP # @return [void] # # source://rubocop//lib/rubocop/lsp.rb#25 - def disable; end + def disable(&block); end # Enable LSP. # @@ -55648,7 +55914,7 @@ module RuboCop::LSP # @return [void] # # source://rubocop//lib/rubocop/lsp.rb#25 - def disable; end + def disable(&block); end # Enable LSP. # @@ -55700,52 +55966,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#169 + # source://rubocop//lib/rubocop/lsp/routes.rb#167 def handle_method_missing(request); end - # source://rubocop//lib/rubocop/lsp/routes.rb#68 + # source://rubocop//lib/rubocop/lsp/routes.rb#64 def handle_shutdown(request); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#158 + # 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#207 + # source://rubocop//lib/rubocop/lsp/routes.rb#205 def diagnostic(file_uri, text); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#177 + # source://rubocop//lib/rubocop/lsp/routes.rb#175 def extract_initialization_options_from(request); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#187 + # 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#221 + # source://rubocop//lib/rubocop/lsp/routes.rb#219 def remove_file_protocol_from(uri); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#225 + # source://rubocop//lib/rubocop/lsp/routes.rb#223 def to_diagnostic(offense); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#237 + # source://rubocop//lib/rubocop/lsp/routes.rb#235 def to_range(location); end class << self From fee12175e9ab731f2bbec354315a432615d04f63 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 May 2024 03:04:31 +0000 Subject: [PATCH 126/189] Bump the minor-and-patch group in /vscode with 5 updates Bumps the minor-and-patch group in /vscode with 5 updates: | Package | From | To | | --- | --- | --- | | [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) | `7.24.5` | `7.24.6` | | [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) | `7.9.0` | `7.10.0` | | [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) | `7.9.0` | `7.10.0` | | [esbuild](https://github.com/evanw/esbuild) | `0.21.3` | `0.21.4` | | [glob](https://github.com/isaacs/node-glob) | `10.3.15` | `10.4.1` | Updates `@babel/core` from 7.24.5 to 7.24.6 - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.24.6/packages/babel-core) Updates `@typescript-eslint/eslint-plugin` from 7.9.0 to 7.10.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.10.0/packages/eslint-plugin) Updates `@typescript-eslint/parser` from 7.9.0 to 7.10.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.10.0/packages/parser) Updates `esbuild` from 0.21.3 to 0.21.4 - [Release notes](https://github.com/evanw/esbuild/releases) - [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md) - [Commits](https://github.com/evanw/esbuild/compare/v0.21.3...v0.21.4) Updates `glob` from 10.3.15 to 10.4.1 - [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md) - [Commits](https://github.com/isaacs/node-glob/compare/v10.3.15...v10.4.1) --- updated-dependencies: - dependency-name: "@babel/core" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: "@typescript-eslint/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: "@typescript-eslint/parser" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: esbuild dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: glob dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] --- vscode/package.json | 10 +- vscode/yarn.lock | 678 ++++++++++++++++++++++---------------------- 2 files changed, 341 insertions(+), 347 deletions(-) diff --git a/vscode/package.json b/vscode/package.json index d9222e3458..9ec162357b 100644 --- a/vscode/package.json +++ b/vscode/package.json @@ -536,7 +536,7 @@ "ws": ">= 7.4.6" }, "devDependencies": { - "@babel/core": "^7.24.5", + "@babel/core": "^7.24.6", "@shopify/eslint-plugin": "^45.0.0", "@shopify/prettier-config": "^1.1.2", "@types/glob": "^8.1.0", @@ -544,15 +544,15 @@ "@types/node": "20.x", "@types/sinon": "^17.0.3", "@types/vscode": "^1.68.0", - "@typescript-eslint/eslint-plugin": "^7.9.0", - "@typescript-eslint/parser": "^7.9.0", + "@typescript-eslint/eslint-plugin": "^7.10.0", + "@typescript-eslint/parser": "^7.10.0", "@vscode/test-electron": "^2.3.10", "@vscode/vsce": "^2.26.1", - "esbuild": "^0.21.3", + "esbuild": "^0.21.4", "eslint": "^8.57.0", "eslint-import-resolver-typescript": "^3.6.1", "eslint-plugin-prettier": "^5.1.3", - "glob": "^10.3.15", + "glob": "^10.4.1", "mocha": "^10.4.0", "ovsx": "^0.9.1", "prettier": "^3.2.5", diff --git a/vscode/yarn.lock b/vscode/yarn.lock index 2f39ba74b5..f475b3acec 100644 --- a/vscode/yarn.lock +++ b/vscode/yarn.lock @@ -128,34 +128,34 @@ 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.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.24.6.tgz#ab88da19344445c3d8889af2216606d3329f3ef2" + integrity sha512-ZJhac6FkEd1yhG2AHOmfcXG4ceoLltoCVJjN5XsWN9BifBQr+cHJbWi0h68HZuSORq+3WtJ2z0hwF2NG1b5kcA== dependencies: - "@babel/highlight" "^7.24.2" + "@babel/highlight" "^7.24.6" 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.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.24.6.tgz#b3600217688cabb26e25f8e467019e66d71b7ae2" + integrity sha512-aC2DGhBq5eEdyXWqrDInSqQjO0k8xtPRf5YylULqx8MCd6jBtzqfta/3ETMRpuKIc5hyswfO80ObyA1MvkCcUQ== -"@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.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.24.6.tgz#8650e0e4b03589ebe886c4e4a60398db0a7ec787" + integrity sha512-qAHSfAdVyFmIvl0VHELib8xar7ONuSHrE2hLnsaWkYNTI68dmi1x8GYDhJjMI/e7XWal9QBlZkwbOnkcw7Z8gQ== 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.6" + "@babel/generator" "^7.24.6" + "@babel/helper-compilation-targets" "^7.24.6" + "@babel/helper-module-transforms" "^7.24.6" + "@babel/helpers" "^7.24.6" + "@babel/parser" "^7.24.6" + "@babel/template" "^7.24.6" + "@babel/traverse" "^7.24.6" + "@babel/types" "^7.24.6" convert-source-map "^2.0.0" debug "^4.1.0" gensync "^1.0.0-beta.2" @@ -178,122 +178,116 @@ 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.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.24.6.tgz#dfac82a228582a9d30c959fe50ad28951d4737a7" + integrity sha512-S7m4eNa6YAPJRHmKsLHIDJhNAGNKoWNiWefz1MBbpnt8g9lvMDl1hir4P9bo/57bQEmuwEhnRU/AMWsD0G/Fbg== dependencies: - "@babel/types" "^7.24.5" + "@babel/types" "^7.24.6" "@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.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.6.tgz#4a51d681f7680043d38e212715e2a7b1ad29cb51" + integrity sha512-VZQ57UsDGlX/5fFA7GkVPplZhHsVc+vuErWgdOiysI9Ksnw0Pbbd6pnPiR/mmJyKHgyIW0c7KT32gmhiF+cirg== dependencies: - "@babel/compat-data" "^7.23.5" - "@babel/helper-validator-option" "^7.23.5" + "@babel/compat-data" "^7.24.6" + "@babel/helper-validator-option" "^7.24.6" 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.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.6.tgz#ac7ad5517821641550f6698dd5468f8cef78620d" + integrity sha512-Y50Cg3k0LKLMjxdPjIl40SdJgMB85iXn27Vk/qbHZCFx/o5XO3PSnpi675h1KEmmDb6OFArfd5SCQEQ5Q4H88g== -"@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.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.24.6.tgz#cebdd063386fdb95d511d84b117e51fc68fec0c8" + integrity sha512-xpeLqeeRkbxhnYimfr2PC+iA0Q7ljX/d1eZ9/inYbmfG2jpl8Lu3DyXvpOAnrS5kxkfOWJjioIMQsaMBXFI05w== dependencies: - "@babel/template" "^7.22.15" - "@babel/types" "^7.23.0" + "@babel/template" "^7.24.6" + "@babel/types" "^7.24.6" -"@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.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.6.tgz#8a7ece8c26756826b6ffcdd0e3cf65de275af7f9" + integrity sha512-SF/EMrC3OD7dSta1bLJIlrsVxwtd0UpjRJqLno6125epQMJ/kyFmpTT4pbvPbdQHzCHg+biQ7Syo8lnDtbR+uA== dependencies: - "@babel/types" "^7.22.5" + "@babel/types" "^7.24.6" -"@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.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.24.6.tgz#65e54ffceed6a268dc4ce11f0433b82cfff57852" + integrity sha512-a26dmxFJBF62rRO9mmpgrfTLsAuyHk4e1hKTUkD/fcMfynt8gvEKwQPQDVxWhca8dHoDck+55DFt42zV0QMw5g== dependencies: - "@babel/types" "^7.24.0" + "@babel/types" "^7.24.6" -"@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.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.24.6.tgz#22346ed9df44ce84dee850d7433c5b73fab1fe4e" + integrity sha512-Y/YMPm83mV2HJTbX1Qh2sjgjqcacvOlhbzdCCsSlblOKjSYmQqEbO6rUniWQyRo9ncyfjT8hnUjlG06RXDEmcA== 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.6" + "@babel/helper-module-imports" "^7.24.6" + "@babel/helper-simple-access" "^7.24.6" + "@babel/helper-split-export-declaration" "^7.24.6" + "@babel/helper-validator-identifier" "^7.24.6" -"@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.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.24.6.tgz#1d6e04d468bba4fc963b4906f6dac6286cfedff1" + integrity sha512-nZzcMMD4ZhmB35MOOzQuiGO5RzL6tJbsT37Zx8M5L/i9KSrukGXWTjLe1knIbb/RmxoJE9GON9soq0c0VEMM5g== dependencies: - "@babel/types" "^7.24.5" + "@babel/types" "^7.24.6" -"@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.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.6.tgz#e830068f7ba8861c53b7421c284da30ae656d7a3" + integrity sha512-CvLSkwXGWnYlF9+J3iZUvwgAxKiYzK3BWuo+mLzD/MDGOZDj7Gq8+hqaOkMxmJwmlv0iu86uH5fdADd9Hxkymw== dependencies: - "@babel/types" "^7.24.5" - -"@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/types" "^7.24.6" -"@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-string-parser@^7.24.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.24.6.tgz#28583c28b15f2a3339cfafafeaad42f9a0e828df" + integrity sha512-WdJjwMEkmBicq5T9fm/cHND3+UlFa2Yj8ALLgmoSQAJZysYbBjw+azChSGPN4DSPLXOcooGRvDwZWMcF/mLO2Q== -"@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-identifier@^7.24.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.6.tgz#08bb6612b11bdec78f3feed3db196da682454a5e" + integrity sha512-4yA7s865JHaqUdRbnaxarZREuPTHrjpDT+pXoAZ1yhyo6uFnIEpS8VMu16siFOHDpZNKYv5BObhsB//ycbICyw== -"@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/helper-validator-option@^7.24.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.24.6.tgz#59d8e81c40b7d9109ab7e74457393442177f460a" + integrity sha512-Jktc8KkF3zIkePb48QO+IapbXlSapOW9S+ogZZkcO6bABgYAxtZcjZ/O005111YLf+j4M84uEgwYoidDkXbCkQ== -"@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.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.24.6.tgz#cd124245299e494bd4e00edda0e4ea3545c2c176" + integrity sha512-V2PI+NqnyFu1i0GyTd/O/cTpxzQCYioSkUIRmgo7gFEHKKCg5w46+r/A6WeUR1+P3TeQ49dspGPNd/E3n9AnnA== dependencies: - "@babel/template" "^7.24.0" - "@babel/traverse" "^7.24.5" - "@babel/types" "^7.24.5" + "@babel/template" "^7.24.6" + "@babel/types" "^7.24.6" -"@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.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.6.tgz#6d610c1ebd2c6e061cade0153bf69b0590b7b3df" + integrity sha512-2YnuOp4HAk2BsBrJJvYCbItHx0zWscI1C3zgWkz+wDyD9I7GIVrfnLyrR4Y1VR+7p+chAEcrgRQYZAGIKMV7vQ== dependencies: - "@babel/helper-validator-identifier" "^7.22.20" + "@babel/helper-validator-identifier" "^7.24.6" 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.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.6.tgz#5e030f440c3c6c78d195528c3b688b101a365328" + integrity sha512-eNZXdfU35nJC2h24RznROuOpO94h6x8sg9ju0tT9biNtLZ2vuP8SduLqqV+/8+cebSLV9SJEAN5Z3zQbJG/M+Q== "@babel/runtime@^7.23.2": version "7.23.9" @@ -302,154 +296,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.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.24.6.tgz#048c347b2787a6072b24c723664c8d02b67a44f9" + integrity sha512-3vgazJlLwNXi9jhrR1ef8qiB65L1RK90+lEQwv4OxveHnqC3BfmnHdgySwRLzf6akhlOYenT+b7AfWq+a//AHw== + dependencies: + "@babel/code-frame" "^7.24.6" + "@babel/parser" "^7.24.6" + "@babel/types" "^7.24.6" + +"@babel/traverse@^7.24.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.24.6.tgz#0941ec50cdeaeacad0911eb67ae227a4f8424edc" + integrity sha512-OsNjaJwT9Zn8ozxcfoBc+RaHdj3gFmCmYoQLUII1o6ZrUwku0BMg80FoOTPx+Gi6XhcQxAYE4xyjPTo4SxEQqw== + dependencies: + "@babel/code-frame" "^7.24.6" + "@babel/generator" "^7.24.6" + "@babel/helper-environment-visitor" "^7.24.6" + "@babel/helper-function-name" "^7.24.6" + "@babel/helper-hoist-variables" "^7.24.6" + "@babel/helper-split-export-declaration" "^7.24.6" + "@babel/parser" "^7.24.6" + "@babel/types" "^7.24.6" 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.6": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.24.6.tgz#ba4e1f59870c10dc2fa95a274ac4feec23b21912" + integrity sha512-WaMsgi6Q8zMgMth93GvWPXkhAIEobfsIkLTacoVZoK1J0CevIPGYY2Vo5YvJGqyHqXM6P4ppOYGsIRU8MM9pFQ== dependencies: - "@babel/helper-string-parser" "^7.24.1" - "@babel/helper-validator-identifier" "^7.24.5" + "@babel/helper-string-parser" "^7.24.6" + "@babel/helper-validator-identifier" "^7.24.6" to-fast-properties "^2.0.0" -"@esbuild/aix-ppc64@0.21.3": - version "0.21.3" - resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.21.3.tgz#78d3e6dcd19c1cb91f3940143e86dad1094aee81" - integrity sha512-yTgnwQpFVYfvvo4SvRFB0SwrW8YjOxEoT7wfMT7Ol5v7v5LDNvSGo67aExmxOb87nQNeWPVvaGBNfQ7BXcrZ9w== - -"@esbuild/android-arm64@0.21.3": - version "0.21.3" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.21.3.tgz#5eea56c21d61734942e050840d881eb7bedc3993" - integrity sha512-c+ty9necz3zB1Y+d/N+mC6KVVkGUUOcm4ZmT5i/Fk5arOaY3i6CA3P5wo/7+XzV8cb4GrI/Zjp8NuOQ9Lfsosw== - -"@esbuild/android-arm@0.21.3": - version "0.21.3" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.21.3.tgz#7fda92e3231043c071ea6aa76c92accea86439fd" - integrity sha512-bviJOLMgurLJtF1/mAoJLxDZDL6oU5/ztMHnJQRejbJrSc9FFu0QoUoFhvi6qSKJEw9y5oGyvr9fuDtzJ30rNQ== - -"@esbuild/android-x64@0.21.3": - version "0.21.3" - resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.21.3.tgz#625d139bde81b81f54ff493b1381ca0f540200f3" - integrity sha512-JReHfYCRK3FVX4Ra+y5EBH1b9e16TV2OxrPAvzMsGeES0X2Ndm9ImQRI4Ket757vhc5XBOuGperw63upesclRw== - -"@esbuild/darwin-arm64@0.21.3": - version "0.21.3" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.21.3.tgz#fa25f38a43ff4c469589d1dc93448d534d7f313b" - integrity sha512-U3fuQ0xNiAkXOmQ6w5dKpEvXQRSpHOnbw7gEfHCRXPeTKW9sBzVck6C5Yneb8LfJm0l6le4NQfkNPnWMSlTFUQ== - -"@esbuild/darwin-x64@0.21.3": - version "0.21.3" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.21.3.tgz#2e450b8214f179a56b4559b2f107060e2b792c7e" - integrity sha512-3m1CEB7F07s19wmaMNI2KANLcnaqryJxO1fXHUV5j1rWn+wMxdUYoPyO2TnAbfRZdi7ADRwJClmOwgT13qlP3Q== - -"@esbuild/freebsd-arm64@0.21.3": - version "0.21.3" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.3.tgz#f6b29e07bce25c545f6f7bb031d3be6a6ea1dc50" - integrity sha512-fsNAAl5pU6wmKHq91cHWQT0Fz0vtyE1JauMzKotrwqIKAswwP5cpHUCxZNSTuA/JlqtScq20/5KZ+TxQdovU/g== - -"@esbuild/freebsd-x64@0.21.3": - version "0.21.3" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.21.3.tgz#1a5da2bf89f8d67102820d893d271a270ae55751" - integrity sha512-tci+UJ4zP5EGF4rp8XlZIdq1q1a/1h9XuronfxTMCNBslpCtmk97Q/5qqy1Mu4zIc0yswN/yP/BLX+NTUC1bXA== - -"@esbuild/linux-arm64@0.21.3": - version "0.21.3" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.21.3.tgz#355f6624c1ac6f5f68841a327ac90b98c679626c" - integrity sha512-vvG6R5g5ieB4eCJBQevyDMb31LMHthLpXTc2IGkFnPWS/GzIFDnaYFp558O+XybTmYrVjxnryru7QRleJvmZ6Q== - -"@esbuild/linux-arm@0.21.3": - version "0.21.3" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.21.3.tgz#872a476ca18a962a98700024c447a79279db1d45" - integrity sha512-f6kz2QpSuyHHg01cDawj0vkyMwuIvN62UAguQfnNVzbge2uWLhA7TCXOn83DT0ZvyJmBI943MItgTovUob36SQ== - -"@esbuild/linux-ia32@0.21.3": - version "0.21.3" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.21.3.tgz#da713eb80ff6c011ed01aa4deebb5fc758906046" - integrity sha512-HjCWhH7K96Na+66TacDLJmOI9R8iDWDDiqe17C7znGvvE4sW1ECt9ly0AJ3dJH62jHyVqW9xpxZEU1jKdt+29A== - -"@esbuild/linux-loong64@0.21.3": - version "0.21.3" - resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.21.3.tgz#a7c5dc9e961009018d23ec53a43baa8c03c5a1d5" - integrity sha512-BGpimEccmHBZRcAhdlRIxMp7x9PyJxUtj7apL2IuoG9VxvU/l/v1z015nFs7Si7tXUwEsvjc1rOJdZCn4QTU+Q== - -"@esbuild/linux-mips64el@0.21.3": - version "0.21.3" - resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.21.3.tgz#b97543f3d8655365729f3702ed07f6e41be5e48e" - integrity sha512-5rMOWkp7FQGtAH3QJddP4w3s47iT20hwftqdm7b+loe95o8JU8ro3qZbhgMRy0VuFU0DizymF1pBKkn3YHWtsw== - -"@esbuild/linux-ppc64@0.21.3": - version "0.21.3" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.21.3.tgz#23b9064d5bc0bf28a115a2f9cf69f3b01cdfe01c" - integrity sha512-h0zj1ldel89V5sjPLo5H1SyMzp4VrgN1tPkN29TmjvO1/r0MuMRwJxL8QY05SmfsZRs6TF0c/IDH3u7XYYmbAg== - -"@esbuild/linux-riscv64@0.21.3": - version "0.21.3" - resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.21.3.tgz#4f2536327f6d444c0573bd35bbd3a67897dbd5da" - integrity sha512-dkAKcTsTJ+CRX6bnO17qDJbLoW37npd5gSNtSzjYQr0svghLJYGYB0NF1SNcU1vDcjXLYS5pO4qOW4YbFama4A== - -"@esbuild/linux-s390x@0.21.3": - version "0.21.3" - resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.21.3.tgz#05e6f3a12a0dcd60672f25e8789a83cd3affa487" - integrity sha512-vnD1YUkovEdnZWEuMmy2X2JmzsHQqPpZElXx6dxENcIwTu+Cu5ERax6+Ke1QsE814Zf3c6rxCfwQdCTQ7tPuXA== - -"@esbuild/linux-x64@0.21.3": - version "0.21.3" - resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.21.3.tgz#994d347e7f530c33628e35e48ccde8f299adbcb6" - integrity sha512-IOXOIm9WaK7plL2gMhsWJd+l2bfrhfilv0uPTptoRoSb2p09RghhQQp9YY6ZJhk/kqmeRt6siRdMSLLwzuT0KQ== - -"@esbuild/netbsd-x64@0.21.3": - version "0.21.3" - resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.21.3.tgz#309d8c323632e9c70ee92cf5414fa65b5eb7e00e" - integrity sha512-uTgCwsvQ5+vCQnqM//EfDSuomo2LhdWhFPS8VL8xKf+PKTCrcT/2kPPoWMTs22aB63MLdGMJiE3f1PHvCDmUOw== - -"@esbuild/openbsd-x64@0.21.3": - version "0.21.3" - resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.21.3.tgz#28820f9431fe00f2b04aac57511754213ff060eb" - integrity sha512-vNAkR17Ub2MgEud2Wag/OE4HTSI6zlb291UYzHez/psiKarp0J8PKGDnAhMBcHFoOHMXHfExzmjMojJNbAStrQ== - -"@esbuild/sunos-x64@0.21.3": - version "0.21.3" - resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.21.3.tgz#a1f7f98b85bd221fe0f545d01abc0e6123ae60dc" - integrity sha512-W8H9jlGiSBomkgmouaRoTXo49j4w4Kfbl6I1bIdO/vT0+0u4f20ko3ELzV3hPI6XV6JNBVX+8BC+ajHkvffIJA== - -"@esbuild/win32-arm64@0.21.3": - version "0.21.3" - resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.21.3.tgz#c6c3c0b1a1dfc6327ef4db6aa4fb6efd9df531f7" - integrity sha512-EjEomwyLSCg8Ag3LDILIqYCZAq/y3diJ04PnqGRgq8/4O3VNlXyMd54j/saShaN4h5o5mivOjAzmU6C3X4v0xw== - -"@esbuild/win32-ia32@0.21.3": - version "0.21.3" - resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.21.3.tgz#471b8d2cad1bd6479eee5acf04bba2c0e4d37e24" - integrity sha512-WGiE/GgbsEwR33++5rzjiYsKyHywE8QSZPF7Rfx9EBfK3Qn3xyR6IjyCr5Uk38Kg8fG4/2phN7sXp4NPWd3fcw== - -"@esbuild/win32-x64@0.21.3": - version "0.21.3" - resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.21.3.tgz#899c03576c4c28c83228f0e64dfa10edae99c9a2" - integrity sha512-xRxC0jaJWDLYvcUvjQmHCJSfMrgmUuvsoXgDeU/wTorQ1ngDdUBuFtgY3W1Pc5sprGAvZBtWdJX7RPg/iZZUqA== +"@esbuild/aix-ppc64@0.21.4": + version "0.21.4" + resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.21.4.tgz#f83eb142df3ca7b49531c1ed680b81e484316508" + integrity sha512-Zrm+B33R4LWPLjDEVnEqt2+SLTATlru1q/xYKVn8oVTbiRBGmK2VIMoIYGJDGyftnGaC788IuzGFAlb7IQ0Y8A== + +"@esbuild/android-arm64@0.21.4": + version "0.21.4" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.21.4.tgz#dd328039daccd6033b2d1e536c054914bfc92287" + integrity sha512-fYFnz+ObClJ3dNiITySBUx+oNalYUT18/AryMxfovLkYWbutXsct3Wz2ZWAcGGppp+RVVX5FiXeLYGi97umisA== + +"@esbuild/android-arm@0.21.4": + version "0.21.4" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.21.4.tgz#76767a989720a97b206ea14c52af6e4589e48b0d" + integrity sha512-E7H/yTd8kGQfY4z9t3nRPk/hrhaCajfA3YSQSBrst8B+3uTcgsi8N+ZWYCaeIDsiVs6m65JPCaQN/DxBRclF3A== + +"@esbuild/android-x64@0.21.4": + version "0.21.4" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.21.4.tgz#14a8ae3c35702d882086efb5a8f8d7b0038d8d35" + integrity sha512-mDqmlge3hFbEPbCWxp4fM6hqq7aZfLEHZAKGP9viq9wMUBVQx202aDIfc3l+d2cKhUJM741VrCXEzRFhPDKH3Q== + +"@esbuild/darwin-arm64@0.21.4": + version "0.21.4" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.21.4.tgz#7e735046005e4c12e9139e0bdd1fa6a754430d57" + integrity sha512-72eaIrDZDSiWqpmCzVaBD58c8ea8cw/U0fq/PPOTqE3c53D0xVMRt2ooIABZ6/wj99Y+h4ksT/+I+srCDLU9TA== + +"@esbuild/darwin-x64@0.21.4": + version "0.21.4" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.21.4.tgz#db623553547a5fe3502a63aa88306e9023178482" + integrity sha512-uBsuwRMehGmw1JC7Vecu/upOjTsMhgahmDkWhGLWxIgUn2x/Y4tIwUZngsmVb6XyPSTXJYS4YiASKPcm9Zitag== + +"@esbuild/freebsd-arm64@0.21.4": + version "0.21.4" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.4.tgz#91cbad647c079bf932086fbd4749d7f563df67b8" + integrity sha512-8JfuSC6YMSAEIZIWNL3GtdUT5NhUA/CMUCpZdDRolUXNAXEE/Vbpe6qlGLpfThtY5NwXq8Hi4nJy4YfPh+TwAg== + +"@esbuild/freebsd-x64@0.21.4": + version "0.21.4" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.21.4.tgz#723299b9859ccbe5532fecbadba3ac33019ba8e8" + integrity sha512-8d9y9eQhxv4ef7JmXny7591P/PYsDFc4+STaxC1GBv0tMyCdyWfXu2jBuqRsyhY8uL2HU8uPyscgE2KxCY9imQ== + +"@esbuild/linux-arm64@0.21.4": + version "0.21.4" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.21.4.tgz#531743f861e1ef6e50b874d6c784cda37aa5e685" + integrity sha512-/GLD2orjNU50v9PcxNpYZi+y8dJ7e7/LhQukN3S4jNDXCKkyyiyAz9zDw3siZ7Eh1tRcnCHAo/WcqKMzmi4eMQ== + +"@esbuild/linux-arm@0.21.4": + version "0.21.4" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.21.4.tgz#1144b5654764960dd97d90ddf0893a9afc63ad91" + integrity sha512-2rqFFefpYmpMs+FWjkzSgXg5vViocqpq5a1PSRgT0AvSgxoXmGF17qfGAzKedg6wAwyM7UltrKVo9kxaJLMF/g== + +"@esbuild/linux-ia32@0.21.4": + version "0.21.4" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.21.4.tgz#c81b6f2ed3308d3b75ccefb5ac63bc4cf3a9d2e9" + integrity sha512-pNftBl7m/tFG3t2m/tSjuYeWIffzwAZT9m08+9DPLizxVOsUl8DdFzn9HvJrTQwe3wvJnwTdl92AonY36w/25g== + +"@esbuild/linux-loong64@0.21.4": + version "0.21.4" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.21.4.tgz#87b6af7cd0f2551653955fc2dc465b7f4464af0a" + integrity sha512-cSD2gzCK5LuVX+hszzXQzlWya6c7hilO71L9h4KHwqI4qeqZ57bAtkgcC2YioXjsbfAv4lPn3qe3b00Zt+jIfQ== + +"@esbuild/linux-mips64el@0.21.4": + version "0.21.4" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.21.4.tgz#fec73cd39490a0c45d052bef03e011a0ad366c06" + integrity sha512-qtzAd3BJh7UdbiXCrg6npWLYU0YpufsV9XlufKhMhYMJGJCdfX/G6+PNd0+v877X1JG5VmjBLUiFB0o8EUSicA== + +"@esbuild/linux-ppc64@0.21.4": + version "0.21.4" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.21.4.tgz#ea3b5e13b0fc8666bd4c6f7ea58bd1830f3e6e78" + integrity sha512-yB8AYzOTaL0D5+2a4xEy7OVvbcypvDR05MsB/VVPVA7nL4hc5w5Dyd/ddnayStDgJE59fAgNEOdLhBxjfx5+dg== + +"@esbuild/linux-riscv64@0.21.4": + version "0.21.4" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.21.4.tgz#80d406f653fc6b193edaeb55ac88d4ac22c8f155" + integrity sha512-Y5AgOuVzPjQdgU59ramLoqSSiXddu7F3F+LI5hYy/d1UHN7K5oLzYBDZe23QmQJ9PIVUXwOdKJ/jZahPdxzm9w== + +"@esbuild/linux-s390x@0.21.4": + version "0.21.4" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.21.4.tgz#9cbd26854b5b12cf22fb54c96cd1adffaf6ace6f" + integrity sha512-Iqc/l/FFwtt8FoTK9riYv9zQNms7B8u+vAI/rxKuN10HgQIXaPzKZc479lZ0x6+vKVQbu55GdpYpeNWzjOhgbA== + +"@esbuild/linux-x64@0.21.4": + version "0.21.4" + resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.21.4.tgz#44dfe1c5cad855362c830c604dba97fbb16fc114" + integrity sha512-Td9jv782UMAFsuLZINfUpoF5mZIbAj+jv1YVtE58rFtfvoKRiKSkRGQfHTgKamLVT/fO7203bHa3wU122V/Bdg== + +"@esbuild/netbsd-x64@0.21.4": + version "0.21.4" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.21.4.tgz#89b97d823e1cc4bf8c4e5dc8f76c8d6ceb1c87f3" + integrity sha512-Awn38oSXxsPMQxaV0Ipb7W/gxZtk5Tx3+W+rAPdZkyEhQ6968r9NvtkjhnhbEgWXYbgV+JEONJ6PcdBS+nlcpA== + +"@esbuild/openbsd-x64@0.21.4": + version "0.21.4" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.21.4.tgz#080715bb4981c326364320d7b56835608e2bd98d" + integrity sha512-IsUmQeCY0aU374R82fxIPu6vkOybWIMc3hVGZ3ChRwL9hA1TwY+tS0lgFWV5+F1+1ssuvvXt3HFqe8roCip8Hg== + +"@esbuild/sunos-x64@0.21.4": + version "0.21.4" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.21.4.tgz#8d838a8ac80e211536490108b72fb0091a811626" + integrity sha512-hsKhgZ4teLUaDA6FG/QIu2q0rI6I36tZVfM4DBZv3BG0mkMIdEnMbhc4xwLvLJSS22uWmaVkFkqWgIS0gPIm+A== + +"@esbuild/win32-arm64@0.21.4": + version "0.21.4" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.21.4.tgz#94afb4c2ac89b0f09791606d6d93fdab322f81c8" + integrity sha512-UUfMgMoXPoA/bvGUNfUBFLCh0gt9dxZYIx9W4rfJr7+hKe5jxxHmfOK8YSH4qsHLLN4Ck8JZ+v7Q5fIm1huErg== + +"@esbuild/win32-ia32@0.21.4": + version "0.21.4" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.21.4.tgz#822085cd52f2f1dd90eabb59346ffa779c0bab83" + integrity sha512-yIxbspZb5kGCAHWm8dexALQ9en1IYDfErzjSEq1KzXFniHv019VT3mNtTK7t8qdy4TwT6QYHI9sEZabONHg+aw== + +"@esbuild/win32-x64@0.21.4": + version "0.21.4" + resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.21.4.tgz#11ef0398f9abee161193461910a507ef0d4c0c32" + integrity sha512-sywLRD3UK/qRJt0oBwdpYLBibk7KiRfbswmWRDabuncQYSlf8aLEEUor/oP6KRz8KEG+HoiVLBhPRD5JWjS8Sg== "@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": version "4.4.0" @@ -727,62 +721,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@^7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.9.0.tgz#093b96fc4e342226e65d5f18f9c87081e0b04a31" - integrity sha512-6e+X0X3sFe/G/54aC3jt0txuMTURqLyekmEHViqyA2VnxhLMpvA6nqmcjIy+Cr9tLDHPssA74BP5Mx9HQIxBEA== +"@typescript-eslint/eslint-plugin@^7.10.0", "@typescript-eslint/eslint-plugin@^7.9.0": + version "7.10.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.10.0.tgz#07854a236f107bb45cbf4f62b89474cbea617f50" + integrity sha512-PzCr+a/KAef5ZawX7nbyNwBDtM1HdLIT53aSA2DDlxmxMngZ43O8SIePOeX8H5S+FHXeI6t97mTt/dDdzY4Fyw== dependencies: "@eslint-community/regexpp" "^4.10.0" - "@typescript-eslint/scope-manager" "7.9.0" - "@typescript-eslint/type-utils" "7.9.0" - "@typescript-eslint/utils" "7.9.0" - "@typescript-eslint/visitor-keys" "7.9.0" + "@typescript-eslint/scope-manager" "7.10.0" + "@typescript-eslint/type-utils" "7.10.0" + "@typescript-eslint/utils" "7.10.0" + "@typescript-eslint/visitor-keys" "7.10.0" graphemer "^1.4.0" ignore "^5.3.1" natural-compare "^1.4.0" ts-api-utils "^1.3.0" -"@typescript-eslint/parser@^7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.9.0.tgz#fb3ba01b75e0e65cb78037a360961b00301f6c70" - integrity sha512-qHMJfkL5qvgQB2aLvhUSXxbK7OLnDkwPzFalg458pxQgfxKDfT1ZDbHQM/I6mDIf/svlMkj21kzKuQ2ixJlatQ== +"@typescript-eslint/parser@^7.10.0", "@typescript-eslint/parser@^7.9.0": + version "7.10.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.10.0.tgz#e6ac1cba7bc0400a4459e7eb5b23115bd71accfb" + integrity sha512-2EjZMA0LUW5V5tGQiaa2Gys+nKdfrn2xiTIBLR4fxmPmVSvgPcKNW+AE/ln9k0A4zDUti0J/GZXMDupQoI+e1w== dependencies: - "@typescript-eslint/scope-manager" "7.9.0" - "@typescript-eslint/types" "7.9.0" - "@typescript-eslint/typescript-estree" "7.9.0" - "@typescript-eslint/visitor-keys" "7.9.0" + "@typescript-eslint/scope-manager" "7.10.0" + "@typescript-eslint/types" "7.10.0" + "@typescript-eslint/typescript-estree" "7.10.0" + "@typescript-eslint/visitor-keys" "7.10.0" debug "^4.3.4" -"@typescript-eslint/scope-manager@7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.9.0.tgz#1dd3e63a4411db356a9d040e75864851b5f2619b" - integrity sha512-ZwPK4DeCDxr3GJltRz5iZejPFAAr4Wk3+2WIBaj1L5PYK5RgxExu/Y68FFVclN0y6GGwH8q+KgKRCvaTmFBbgQ== +"@typescript-eslint/scope-manager@7.10.0": + version "7.10.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.10.0.tgz#054a27b1090199337a39cf755f83d9f2ce26546b" + integrity sha512-7L01/K8W/VGl7noe2mgH0K7BE29Sq6KAbVmxurj8GGaPDZXPr8EEQ2seOeAS+mEV9DnzxBQB6ax6qQQ5C6P4xg== dependencies: - "@typescript-eslint/types" "7.9.0" - "@typescript-eslint/visitor-keys" "7.9.0" + "@typescript-eslint/types" "7.10.0" + "@typescript-eslint/visitor-keys" "7.10.0" -"@typescript-eslint/type-utils@7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.9.0.tgz#f523262e1b66ca65540b7a65a1222db52e0a90c9" - integrity sha512-6Qy8dfut0PFrFRAZsGzuLoM4hre4gjzWJB6sUvdunCYZsYemTkzZNwF1rnGea326PHPT3zn5Lmg32M/xfJfByA== +"@typescript-eslint/type-utils@7.10.0": + version "7.10.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.10.0.tgz#8a75accce851d0a331aa9331268ef64e9b300270" + integrity sha512-D7tS4WDkJWrVkuzgm90qYw9RdgBcrWmbbRkrLA4d7Pg3w0ttVGDsvYGV19SH8gPR5L7OtcN5J1hTtyenO9xE9g== dependencies: - "@typescript-eslint/typescript-estree" "7.9.0" - "@typescript-eslint/utils" "7.9.0" + "@typescript-eslint/typescript-estree" "7.10.0" + "@typescript-eslint/utils" "7.10.0" debug "^4.3.4" ts-api-utils "^1.3.0" -"@typescript-eslint/types@7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.9.0.tgz#b58e485e4bfba055659c7e683ad4f5f0821ae2ec" - integrity sha512-oZQD9HEWQanl9UfsbGVcZ2cGaR0YT5476xfWE0oE5kQa2sNK2frxOlkeacLOTh9po4AlUT5rtkGyYM5kew0z5w== +"@typescript-eslint/types@7.10.0": + version "7.10.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.10.0.tgz#da92309c97932a3a033762fd5faa8b067de84e3b" + integrity sha512-7fNj+Ya35aNyhuqrA1E/VayQX9Elwr8NKZ4WueClR3KwJ7Xx9jcCdOrLW04h51de/+gNbyFMs+IDxh5xIwfbNg== -"@typescript-eslint/typescript-estree@7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.9.0.tgz#3395e27656060dc313a6b406c3a298b729685e07" - integrity sha512-zBCMCkrb2YjpKV3LA0ZJubtKCDxLttxfdGmwZvTqqWevUPN0FZvSI26FalGFFUZU/9YQK/A4xcQF9o/VVaCKAg== +"@typescript-eslint/typescript-estree@7.10.0": + version "7.10.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.10.0.tgz#6dcdc5de3149916a6a599fa89dde5c471b88b8bb" + integrity sha512-LXFnQJjL9XIcxeVfqmNj60YhatpRLt6UhdlFwAkjNc6jSUlK8zQOl1oktAP8PlWFzPQC1jny/8Bai3/HPuvN5g== dependencies: - "@typescript-eslint/types" "7.9.0" - "@typescript-eslint/visitor-keys" "7.9.0" + "@typescript-eslint/types" "7.10.0" + "@typescript-eslint/visitor-keys" "7.10.0" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" @@ -790,22 +784,22 @@ semver "^7.6.0" ts-api-utils "^1.3.0" -"@typescript-eslint/utils@7.9.0", "@typescript-eslint/utils@^6.0.0 || ^7.0.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.9.0.tgz#1b96a34eefdca1c820cb1bbc2751d848b4540899" - integrity sha512-5KVRQCzZajmT4Ep+NEgjXCvjuypVvYHUW7RHlXzNPuak2oWpVoD1jf5xCP0dPAuNIchjC7uQyvbdaSTFaLqSdA== +"@typescript-eslint/utils@7.10.0", "@typescript-eslint/utils@^6.0.0 || ^7.0.0": + version "7.10.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.10.0.tgz#8ee43e5608c9f439524eaaea8de5b358b15c51b3" + integrity sha512-olzif1Fuo8R8m/qKkzJqT7qwy16CzPRWBvERS0uvyc+DHd8AKbO4Jb7kpAvVzMmZm8TrHnI7hvjN4I05zow+tg== dependencies: "@eslint-community/eslint-utils" "^4.4.0" - "@typescript-eslint/scope-manager" "7.9.0" - "@typescript-eslint/types" "7.9.0" - "@typescript-eslint/typescript-estree" "7.9.0" + "@typescript-eslint/scope-manager" "7.10.0" + "@typescript-eslint/types" "7.10.0" + "@typescript-eslint/typescript-estree" "7.10.0" -"@typescript-eslint/visitor-keys@7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.9.0.tgz#82162656e339c3def02895f5c8546f6888d9b9ea" - integrity sha512-iESPx2TNLDNGQLyjKhUvIKprlP49XNEK+MvIf9nIO7ZZaZdbnfWKHnXAgufpxqfA0YryH8XToi4+CjBgVnFTSQ== +"@typescript-eslint/visitor-keys@7.10.0": + version "7.10.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.10.0.tgz#2af2e91e73a75dd6b70b4486c48ae9d38a485a78" + integrity sha512-9ntIVgsi6gg6FIq9xjEO4VQJvwOqA3jaBFQJ/6TK5AvEup2+cECI6Fh7QiBxmfMHXU0V0J4RyPeOU1VDNzl9cg== dependencies: - "@typescript-eslint/types" "7.9.0" + "@typescript-eslint/types" "7.10.0" eslint-visitor-keys "^3.4.3" "@ungap/structured-clone@^1.2.0": @@ -1843,34 +1837,34 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" -esbuild@^0.21.3: - version "0.21.3" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.21.3.tgz#cbb10b100c768b0cfb35d61d9e70324553437c38" - integrity sha512-Kgq0/ZsAPzKrbOjCQcjoSmPoWhlcVnGAUo7jvaLHoxW1Drto0KGkR1xBNg2Cp43b9ImvxmPEJZ9xkfcnqPsfBw== +esbuild@^0.21.4: + version "0.21.4" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.21.4.tgz#ceb501def8edb12a5bfd9c55f3a96db698edf022" + integrity sha512-sFMcNNrj+Q0ZDolrp5pDhH0nRPN9hLIM3fRPwgbLYJeSHHgnXSnbV3xYgSVuOeLWH9c73VwmEverVzupIv5xuA== optionalDependencies: - "@esbuild/aix-ppc64" "0.21.3" - "@esbuild/android-arm" "0.21.3" - "@esbuild/android-arm64" "0.21.3" - "@esbuild/android-x64" "0.21.3" - "@esbuild/darwin-arm64" "0.21.3" - "@esbuild/darwin-x64" "0.21.3" - "@esbuild/freebsd-arm64" "0.21.3" - "@esbuild/freebsd-x64" "0.21.3" - "@esbuild/linux-arm" "0.21.3" - "@esbuild/linux-arm64" "0.21.3" - "@esbuild/linux-ia32" "0.21.3" - "@esbuild/linux-loong64" "0.21.3" - "@esbuild/linux-mips64el" "0.21.3" - "@esbuild/linux-ppc64" "0.21.3" - "@esbuild/linux-riscv64" "0.21.3" - "@esbuild/linux-s390x" "0.21.3" - "@esbuild/linux-x64" "0.21.3" - "@esbuild/netbsd-x64" "0.21.3" - "@esbuild/openbsd-x64" "0.21.3" - "@esbuild/sunos-x64" "0.21.3" - "@esbuild/win32-arm64" "0.21.3" - "@esbuild/win32-ia32" "0.21.3" - "@esbuild/win32-x64" "0.21.3" + "@esbuild/aix-ppc64" "0.21.4" + "@esbuild/android-arm" "0.21.4" + "@esbuild/android-arm64" "0.21.4" + "@esbuild/android-x64" "0.21.4" + "@esbuild/darwin-arm64" "0.21.4" + "@esbuild/darwin-x64" "0.21.4" + "@esbuild/freebsd-arm64" "0.21.4" + "@esbuild/freebsd-x64" "0.21.4" + "@esbuild/linux-arm" "0.21.4" + "@esbuild/linux-arm64" "0.21.4" + "@esbuild/linux-ia32" "0.21.4" + "@esbuild/linux-loong64" "0.21.4" + "@esbuild/linux-mips64el" "0.21.4" + "@esbuild/linux-ppc64" "0.21.4" + "@esbuild/linux-riscv64" "0.21.4" + "@esbuild/linux-s390x" "0.21.4" + "@esbuild/linux-x64" "0.21.4" + "@esbuild/netbsd-x64" "0.21.4" + "@esbuild/openbsd-x64" "0.21.4" + "@esbuild/sunos-x64" "0.21.4" + "@esbuild/win32-arm64" "0.21.4" + "@esbuild/win32-ia32" "0.21.4" + "@esbuild/win32-x64" "0.21.4" escalade@^3.1.1: version "3.1.2" @@ -2420,16 +2414,16 @@ glob@8.1.0: minimatch "^5.0.1" once "^1.3.0" -glob@^10.3.15: - version "10.3.15" - resolved "https://registry.yarnpkg.com/glob/-/glob-10.3.15.tgz#e72bc61bc3038c90605f5dd48543dc67aaf3b50d" - integrity sha512-0c6RlJt1TICLyvJYIApxb8GsXoai0KUP7AxKKAtsYXdgJR1mGEUa7DgwShbdk1nly0PYoZj01xd4hzbq3fsjpw== +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.11.0" + 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" @@ -2899,10 +2893,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: @@ -3251,7 +3245,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== @@ -3263,10 +3257,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" @@ -3591,7 +3585,7 @@ 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.11.0: +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== From d658efff188ed9c82eeec173d17f3694cb4d0198 Mon Sep 17 00:00:00 2001 From: Zheng PiaoDan Date: Mon, 27 May 2024 21:46:01 +0800 Subject: [PATCH 127/189] Fix the hash keys of enabledFeatures (#2071) The enabledFeatures has symbolic keys when configured with hash, which need to be transformed to string keys to work. bug environment: - nvim v0.10.0 - ruby-lsp 0.16.6 --- lib/ruby_lsp/server.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ruby_lsp/server.rb b/lib/ruby_lsp/server.rb index 6c53c48255..b527238527 100644 --- a/lib/ruby_lsp/server.rb +++ b/lib/ruby_lsp/server.rb @@ -134,7 +134,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) From d3cc19bb66863a7602b6dcf873df43c4f972bdb5 Mon Sep 17 00:00:00 2001 From: Thomas Marshall Date: Mon, 27 May 2024 16:00:36 +0100 Subject: [PATCH 128/189] Fix auto indent after end (#2086) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix complex body indentation after end keyword This commit fixes the auto indentation after the `end` keyword when the body is more complex, such as when there are nested blocks. Previously the following code: ```ruby if foo if bar baz end end ``` …would have been indented like this: ```rb if foo if bar baz end end ``` Now it will be correctly indented like this: ```rb if foo if bar baz end end ``` It does so by indenting each line in the node location, instead of just the first one. * Fix extra indentation after end keyword This commit ensures auto-indentation after an `end` keyword does not add extra indentation if the body is already indented. Previously the following code: ```rb if foo bar end ``` …would have been indented like this: ```rb if foo bar end ``` Now it will be correctly indented like this: ```rb if foo bar end ``` It does so by finding the correct current indentation level, and skipping indentation if it already matches. --- lib/ruby_lsp/requests/on_type_formatting.rb | 9 ++-- test/requests/on_type_formatting_test.rb | 54 +++++++++++++++++++++ 2 files changed, 60 insertions(+), 3 deletions(-) diff --git a/lib/ruby_lsp/requests/on_type_formatting.rb b/lib/ruby_lsp/requests/on_type_formatting.rb index 9d6887e96d..20c70097cf 100644 --- a/lib/ruby_lsp/requests/on_type_formatting.rb +++ b/lib/ruby_lsp/requests/on_type_formatting.rb @@ -213,7 +213,7 @@ 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({ line: @position[:line], @@ -226,11 +226,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/test/requests/on_type_formatting_test.rb b/test/requests/on_type_formatting_test.rb index 12c7ecdabf..137e3d06a5 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( From 634972d17461c25e882df417bfbce5ba5fb60694 Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Mon, 27 May 2024 12:15:14 -0400 Subject: [PATCH 129/189] Remove unnecessary casts --- lib/ruby_indexer/lib/ruby_indexer/index.rb | 10 ++++------ test/fixtures/prism | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/ruby_indexer/lib/ruby_indexer/index.rb b/lib/ruby_indexer/lib/ruby_indexer/index.rb index 363a376a24..eaf23cb944 100644 --- a/lib/ruby_indexer/lib/ruby_indexer/index.rb +++ b/lib/ruby_indexer/lib/ruby_indexer/index.rb @@ -249,12 +249,10 @@ def resolve_method(method_name, 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], - ) + + method_entries.grep(Entry::Member).select do |entry| + entry.owner&.name == owner_name + end end private diff --git a/test/fixtures/prism b/test/fixtures/prism index 4f455dcdc6..b6aa0f22be 160000 --- a/test/fixtures/prism +++ b/test/fixtures/prism @@ -1 +1 @@ -Subproject commit 4f455dcdc6c78e41f3ed8905f4cc1cdff7765fbd +Subproject commit b6aa0f22be2fddef68cb8c635d090591133e3260 From 9f33d5a6445dd5e547f37717ea01200dfcb39d95 Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Mon, 27 May 2024 12:17:20 -0400 Subject: [PATCH 130/189] Restore Windows platforms --- Gemfile.lock | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Gemfile.lock b/Gemfile.lock index 16e2a2361d..1e08626c4b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -126,6 +126,8 @@ GEM PLATFORMS arm64-darwin + x64-mingw-ucrt + x64-mingw32 x86_64-darwin x86_64-linux From 58a85dc9efc8d14f371744da680ddddf6ac481f9 Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Mon, 27 May 2024 13:50:01 -0400 Subject: [PATCH 131/189] Ignore vscode log files (#2091) To prevent accidental committing of `vscode/yarn-error.log`. --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index a547fa5067..fcf9c2bcd9 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ vscode/dist vscode/node_modules vscode/.vscode-test/ vscode/*.vsix +vscode/*.log From 86b15cbb689d91974efdbc33f103e35d1ec6c666 Mon Sep 17 00:00:00 2001 From: OKURA Masafumi Date: Tue, 28 May 2024 03:01:27 +0900 Subject: [PATCH 132/189] Feat: Add Extract Method to CodeAction (#2056) --- lib/ruby_lsp/requests/code_action_resolve.rb | 71 +++++++++++++++++++ lib/ruby_lsp/requests/code_actions.rb | 22 +++++- lib/ruby_lsp/server.rb | 7 ++ .../code_action_resolve/call_chained.exp.json | 1 + .../call_nested_multiline_args.exp.json | 1 + .../def_extract_variable.exp.json | 1 + .../def_multiline_params.exp.json | 1 + .../extract_method.exp.json | 60 ++++++++++++++++ .../extract_variable_first_statement.exp.json | 1 + ...xtraction_with_empty_line_between.exp.json | 1 + .../oneline_block_extraction.exp.json | 1 + .../variable_extract.exp.json | 1 + .../code_actions/aref_field.exp.json | 17 +++++ test/fixtures/extract_method.rb | 5 ++ vscode/src/test/suite/client.test.ts | 1 + 15 files changed, 189 insertions(+), 2 deletions(-) create mode 100644 test/expectations/code_action_resolve/extract_method.exp.json create mode 100644 test/fixtures/extract_method.rb diff --git a/lib/ruby_lsp/requests/code_action_resolve.rb b/lib/ruby_lsp/requests/code_action_resolve.rb index 5d6c9b3102..5d9bbde621 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::VARIABLE_REFACTOR_CODE_ACTION_TITLE + refactor_variable + when CodeActions::METHOD_REFACTOR_CODE_ACTION_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) @@ -135,6 +149,63 @@ 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 + closest_def, _ = T.cast( + @document.locate(@document.tree, start_index, node_types: [Prism::DefNode]), + [T.nilable(Prism::DefNode), T.nilable(Prism::Node), T::Array[String]], + ) + return Error::InvalidTargetRange if closest_def.nil? + + closest_node_loc = closest_def.location.end_line + end_keyword_loc = closest_def.end_keyword_loc + return Error::InvalidTargetRange if end_keyword_loc.nil? + + character = end_keyword_loc.start_column + indentation = " " * character + target_range = { + start: { line: closest_node_loc, character: character }, + end: { line: closest_node_loc, character: character }, + } + + new_method_source = <<~RUBY + + #{indentation}def #{NEW_METHOD_NAME} + #{indentation} #{extracted_source} + #{indentation}end + + RUBY + + Interface::CodeAction.new( + title: CodeActions::METHOD_REFACTOR_CODE_ACTION_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 7ee995dfb3..a2a6835d23 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 + VARIABLE_REFACTOR_CODE_ACTION_TITLE = "Refactor: Extract Variable" + METHOD_REFACTOR_CODE_ACTION_TITLE = "Refactor: Extract Method" + class << self extend T::Sig @@ -52,7 +55,10 @@ 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) + unless @range.dig(:start) == @range.dig(:end) + code_actions << refactor_code_action(@range, @uri) + code_actions << extract_code_action(@range, @uri) + end code_actions end @@ -61,7 +67,19 @@ def perform 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", + title: VARIABLE_REFACTOR_CODE_ACTION_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 extract_code_action(range, uri) + Interface::CodeAction.new( + title: METHOD_REFACTOR_CODE_ACTION_TITLE, kind: Constant::CodeActionKind::REFACTOR_EXTRACT, data: { range: range, diff --git a/lib/ruby_lsp/server.rb b/lib/ruby_lsp/server.rb index b527238527..59e7f3a114 100644 --- a/lib/ruby_lsp/server.rb +++ b/lib/ruby_lsp/server.rb @@ -498,6 +498,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 diff --git a/test/expectations/code_action_resolve/call_chained.exp.json b/test/expectations/code_action_resolve/call_chained.exp.json index f05bfbab69..9a061639d4 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 837e39e3f9..430a84dd51 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 7272726b13..594179d68e 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 fcbec6bf90..19ba277969 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 0000000000..441b2f990a --- /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": 4, + "character": 2 + }, + "end": { + "line": 4, + "character": 2 + } + }, + "newText": "\n def new_method\n answer = 42\n end\n\n" + }, + { + "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 e26437094a..7056aa8b1f 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 9c146b1d93..a7264c3d31 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 951eb699a6..cb1867cb3c 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 82861f867e..010edc57e6 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 0e0c0ef3b5..77e89b68f3 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/fixtures/extract_method.rb b/test/fixtures/extract_method.rb new file mode 100644 index 0000000000..fadb3f9936 --- /dev/null +++ b/test/fixtures/extract_method.rb @@ -0,0 +1,5 @@ +class Foo + def some_method + answer = 42 + end +end diff --git a/vscode/src/test/suite/client.test.ts b/vscode/src/test/suite/client.test.ts index c0883c8522..3420b6b199 100644 --- a/vscode/src/test/suite/client.test.ts +++ b/vscode/src/test/suite/client.test.ts @@ -554,6 +554,7 @@ suite("Client", () => { "codeAction/resolve", { kind: "refactor.extract", + title: "Refactor: Extract Variable", data: { range: { start: { line: 1, character: 1 }, From 0d7b9588b66b187a6b7a6daf6eddc65723e841ce Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Mon, 27 May 2024 14:19:50 -0400 Subject: [PATCH 133/189] Handle constant paths with missing parts (#2053) --- lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb | 7 +++---- lib/ruby_lsp/requests/support/common.rb | 3 ++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb b/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb index c4fbf51cba..449712112a 100644 --- a/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb +++ b/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb @@ -373,10 +373,9 @@ def handle_module_operation(node, operation) if node.is_a?(Prism::ConstantReadNode) || node.is_a?(Prism::ConstantPathNode) node.full_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 + rescue Prism::ConstantPathNode::DynamicPartsInConstantPathError, + Prism::ConstantPathNode::MissingNodesInConstantPathError + # Do nothing end collection = operation == :included_modules ? owner.included_modules : owner.prepended_modules collection.concat(names) diff --git a/lib/ruby_lsp/requests/support/common.rb b/lib/ruby_lsp/requests/support/common.rb index 3b5e5d4db2..1bc4413639 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 From af2e55cf29750b29992da4b21ef918cea3445bca Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Mon, 27 May 2024 15:31:39 -0400 Subject: [PATCH 134/189] Update addons docs for global state (#2084) Co-authored-by: Andy Waite --- ADDONS.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ADDONS.md b/ADDONS.md index 219473cbab..510ad4d222 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 @@ -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 From ae6aed385df29a041d69cba4f2b1fcac7bb4deff Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Mon, 27 May 2024 15:44:38 -0400 Subject: [PATCH 135/189] Add link to feature list from editors docs (#2078) Add link to feature list --- EDITORS.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/EDITORS.md b/EDITORS.md index aa6b3e9c38..c710cbdfda 100644 --- a/EDITORS.md +++ b/EDITORS.md @@ -7,6 +7,9 @@ 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. + From 65752c45ac5f0539e21fee3c8509235e96898982 Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Mon, 27 May 2024 15:53:13 -0400 Subject: [PATCH 136/189] Expand addon error information for when addon activation fails (#2085) * Expand addon error information * Update lib/ruby_lsp/addon.rb Co-authored-by: Vinicius Stock * Lint --------- Co-authored-by: Andy Waite Co-authored-by: Vinicius Stock --- lib/ruby_lsp/addon.rb | 4 ++-- lib/ruby_lsp/server.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ruby_lsp/addon.rb b/lib/ruby_lsp/addon.rb index 598b9a6162..7eacef87f7 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 diff --git a/lib/ruby_lsp/server.rb b/lib/ruby_lsp/server.rb index 59e7f3a114..bc281c6465 100644 --- a/lib/ruby_lsp/server.rb +++ b/lib/ruby_lsp/server.rb @@ -104,7 +104,7 @@ def load_addons ), ) - $stderr.puts(errored_addons.map(&:backtraces).join("\n\n")) + $stderr.puts(errored_addons.map(&:errors_details).join("\n\n")) end end From 46bc6a4efc4c619cc6b7fdf7a1d60ef30fac8768 Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Tue, 28 May 2024 17:36:08 -0400 Subject: [PATCH 137/189] Support instance variables for definition, hover, completion and workspace symbols (#2042) * Index instance variables * Support go to definition for instance variables * Support hover for instance variables * Support completion for instance variables * Support instance variables in workspace symbol * Address PR feedback --- .../lib/ruby_indexer/declaration_listener.rb | 76 ++++++++++ lib/ruby_indexer/lib/ruby_indexer/entry.rb | 20 +++ .../test/instance_variables_test.rb | 131 ++++++++++++++++++ lib/ruby_lsp/listeners/completion.rb | 61 ++++++++ lib/ruby_lsp/listeners/definition.rb | 58 ++++++++ lib/ruby_lsp/listeners/hover.rb | 55 ++++++++ lib/ruby_lsp/requests/completion.rb | 26 ++-- lib/ruby_lsp/requests/completion_resolve.rb | 9 ++ lib/ruby_lsp/requests/definition.rb | 16 ++- lib/ruby_lsp/requests/workspace_symbol.rb | 2 + test/requests/completion_resolve_test.rb | 42 ++++++ test/requests/completion_test.rb | 62 +++++++++ test/requests/definition_expectations_test.rb | 36 +++++ test/requests/hover_expectations_test.rb | 35 +++++ 14 files changed, 617 insertions(+), 12 deletions(-) create mode 100644 lib/ruby_indexer/test/instance_variables_test.rb diff --git a/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb b/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb index 449712112a..8e22800d81 100644 --- a/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb +++ b/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb @@ -45,6 +45,11 @@ 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, ) end @@ -206,6 +211,7 @@ 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( @@ -233,6 +239,76 @@ def on_def_node_leave(node) @inside_def = false end + sig { params(node: Prism::InstanceVariableWriteNode).void } + def on_instance_variable_write_node_enter(node) + name = node.name.to_s + return if name == "@" + + @index << Entry::InstanceVariable.new( + name, + @file_path, + node.name_loc, + collect_comments(node), + @owner_stack.last, + ) + end + + sig { params(node: Prism::InstanceVariableAndWriteNode).void } + def on_instance_variable_and_write_node_enter(node) + name = node.name.to_s + return if name == "@" + + @index << Entry::InstanceVariable.new( + name, + @file_path, + node.name_loc, + collect_comments(node), + @owner_stack.last, + ) + end + + sig { params(node: Prism::InstanceVariableOperatorWriteNode).void } + def on_instance_variable_operator_write_node_enter(node) + name = node.name.to_s + return if name == "@" + + @index << Entry::InstanceVariable.new( + name, + @file_path, + node.name_loc, + collect_comments(node), + @owner_stack.last, + ) + end + + sig { params(node: Prism::InstanceVariableOrWriteNode).void } + def on_instance_variable_or_write_node_enter(node) + name = node.name.to_s + return if name == "@" + + @index << Entry::InstanceVariable.new( + name, + @file_path, + node.name_loc, + collect_comments(node), + @owner_stack.last, + ) + end + + sig { params(node: Prism::InstanceVariableTargetNode).void } + def on_instance_variable_target_node_enter(node) + name = node.name.to_s + return if name == "@" + + @index << Entry::InstanceVariable.new( + name, + @file_path, + node.location, + collect_comments(node), + @owner_stack.last, + ) + end + private sig { params(node: Prism::CallNode).void } diff --git a/lib/ruby_indexer/lib/ruby_indexer/entry.rb b/lib/ruby_indexer/lib/ruby_indexer/entry.rb index df1be9d081..ceaa369830 100644 --- a/lib/ruby_indexer/lib/ruby_indexer/entry.rb +++ b/lib/ruby_indexer/lib/ruby_indexer/entry.rb @@ -380,5 +380,25 @@ def initialize(target, unresolved_alias) @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 end end diff --git a/lib/ruby_indexer/test/instance_variables_test.rb b/lib/ruby_indexer/test/instance_variables_test.rb new file mode 100644 index 0000000000..e96005e450 --- /dev/null +++ b/lib/ruby_indexer/test/instance_variables_test.rb @@ -0,0 +1,131 @@ +# typed: true +# frozen_string_literal: true + +require_relative "test_case" + +module RubyIndexer + class InstanceVariableTest < TestCase + def test_instance_variable_write + index(<<~RUBY) + module Foo + class Bar + def initialize + # Hello + @a = 1 + end + end + end + RUBY + + assert_entry("@a", Entry::InstanceVariable, "/fake/path/foo.rb:4-6:4-8") + + entry = T.must(@index["@a"]&.first) + assert_equal("Foo::Bar", T.must(entry.owner).name) + end + + def test_instance_variable_and_write + index(<<~RUBY) + module Foo + class Bar + def initialize + # Hello + @a &&= value + end + end + end + RUBY + + assert_entry("@a", Entry::InstanceVariable, "/fake/path/foo.rb:4-6:4-8") + + entry = T.must(@index["@a"]&.first) + assert_equal("Foo::Bar", T.must(entry.owner).name) + end + + def test_instance_variable_operator_write + index(<<~RUBY) + module Foo + class Bar + def initialize + # Hello + @a += value + end + end + end + RUBY + + assert_entry("@a", Entry::InstanceVariable, "/fake/path/foo.rb:4-6:4-8") + + entry = T.must(@index["@a"]&.first) + assert_equal("Foo::Bar", T.must(entry.owner).name) + end + + def test_instance_variable_or_write + index(<<~RUBY) + module Foo + class Bar + def initialize + # Hello + @a ||= value + end + end + end + RUBY + + assert_entry("@a", Entry::InstanceVariable, "/fake/path/foo.rb:4-6:4-8") + + entry = T.must(@index["@a"]&.first) + assert_equal("Foo::Bar", T.must(entry.owner).name) + end + + def test_instance_variable_target + index(<<~RUBY) + module Foo + class Bar + def initialize + # Hello + @a, @b = [1, 2] + end + end + end + RUBY + + assert_entry("@a", Entry::InstanceVariable, "/fake/path/foo.rb:4-6:4-8") + assert_entry("@b", Entry::InstanceVariable, "/fake/path/foo.rb:4-10:4-12") + + entry = T.must(@index["@a"]&.first) + assert_equal("Foo::Bar", T.must(entry.owner).name) + + entry = T.must(@index["@b"]&.first) + assert_equal("Foo::Bar", T.must(entry.owner).name) + end + + def test_empty_name_instance_variables + index(<<~RUBY) + module Foo + class Bar + def initialize + @ = 123 + end + end + end + RUBY + + refute_entry("@") + end + + def test_class_instance_variables + index(<<~RUBY) + module Foo + class Bar + @a = 123 + end + end + RUBY + + assert_entry("@a", Entry::InstanceVariable, "/fake/path/foo.rb:2-4:2-6") + + entry = T.must(@index["@a"]&.first) + assert_equal("Foo::Bar", T.must(entry.owner).name) + end + end +end diff --git a/lib/ruby_lsp/listeners/completion.rb b/lib/ruby_lsp/listeners/completion.rb index 36108ec668..0d678b0f8d 100644 --- a/lib/ruby_lsp/listeners/completion.rb +++ b/lib/ruby_lsp/listeners/completion.rb @@ -30,6 +30,12 @@ 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 @@ -105,6 +111,36 @@ def on_call_node_enter(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 } @@ -153,6 +189,31 @@ def constant_path_completion(name, range) end end + sig { params(name: String, location: Prism::Location).void } + def handle_instance_variable_completion(name, location) + entries = T.cast(@index.prefix_search(name).flatten, T::Array[RubyIndexer::Entry::InstanceVariable]) + current_self = @nesting.join("::") + + variables = entries.select { |e| current_self == e.owner&.name } + variables.uniq!(&:name) + + variables.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 + end + sig { params(node: Prism::CallNode).void } def complete_require(node) arguments_node = node.arguments diff --git a/lib/ruby_lsp/listeners/definition.rb b/lib/ruby_lsp/listeners/definition.rb index 0757b5e2b8..dab51fb6a3 100644 --- a/lib/ruby_lsp/listeners/definition.rb +++ b/lib/ruby_lsp/listeners/definition.rb @@ -33,6 +33,12 @@ 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, ) end @@ -74,8 +80,60 @@ 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 = T.cast(@index[name], T.nilable(T::Array[RubyIndexer::Entry::InstanceVariable])) + return unless entries + + current_self = @nesting.join("::") + + entries.each do |entry| + next if current_self != entry.owner&.name + + 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 + end + sig { params(message: String, self_receiver: T::Boolean).void } def handle_method_definition(message, self_receiver) methods = if self_receiver diff --git a/lib/ruby_lsp/listeners/hover.rb b/lib/ruby_lsp/listeners/hover.rb index 7b5b102ce5..c580a8d98d 100644 --- a/lib/ruby_lsp/listeners/hover.rb +++ b/lib/ruby_lsp/listeners/hover.rb @@ -13,6 +13,12 @@ class Hover Prism::ConstantReadNode, Prism::ConstantWriteNode, Prism::ConstantPathNode, + Prism::InstanceVariableReadNode, + Prism::InstanceVariableAndWriteNode, + Prism::InstanceVariableOperatorWriteNode, + Prism::InstanceVariableOrWriteNode, + Prism::InstanceVariableTargetNode, + Prism::InstanceVariableWriteNode, ], T::Array[T.class_of(Prism::Node)], ) @@ -49,6 +55,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 @@ -101,8 +113,51 @@ def on_call_node_enter(node) 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 = T.cast(@index[name], T.nilable(T::Array[RubyIndexer::Entry::InstanceVariable])) + return unless entries + + current_self = @nesting.join("::") + owned_variables = entries.select { |e| current_self == e.owner&.name } + + categorized_markdown_from_index_entries(name, owned_variables).each do |category, content| + @response_builder.push(content, category: category) + end + end + sig { params(name: String, location: Prism::Location).void } def generate_hover(name, location) entries = @index.resolve(name, @nesting) diff --git a/lib/ruby_lsp/requests/completion.rb b/lib/ruby_lsp/requests/completion.rb index b00d33a699..61b649db9b 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, }, @@ -62,7 +63,17 @@ def initialize(document, global_state, position, typechecker_enabled, dispatcher matched, parent, nesting = 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, @@ -84,15 +95,10 @@ def initialize(document, global_state, position, typechecker_enabled, dispatcher 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 0a9b557480..d2538778bc 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 a24b84819c..bb16b00002 100644 --- a/lib/ruby_lsp/requests/definition.rb +++ b/lib/ruby_lsp/requests/definition.rb @@ -17,7 +17,8 @@ module Requests # - Modules # - Constants # - Require paths - # - Methods invoked on self only + # - Methods invoked on self only and on receivers where the type is unknown + # - Instance variables # # # Example # @@ -48,7 +49,18 @@ def initialize(document, global_state, position, dispatcher, typechecker_enabled target, parent, nesting = 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, + ], ) if target.is_a?(Prism::ConstantReadNode) && parent.is_a?(Prism::ConstantPathNode) diff --git a/lib/ruby_lsp/requests/workspace_symbol.rb b/lib/ruby_lsp/requests/workspace_symbol.rb index b3217a8df8..c30cf02ad8 100644 --- a/lib/ruby_lsp/requests/workspace_symbol.rb +++ b/lib/ruby_lsp/requests/workspace_symbol.rb @@ -79,6 +79,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/test/requests/completion_resolve_test.rb b/test/requests/completion_resolve_test.rb index af07d3ccdd..5545f85cf2 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 8b68b89c90..0c2338d8e4 100644 --- a/test/requests/completion_test.rb +++ b/test/requests/completion_test.rb @@ -840,6 +840,68 @@ 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_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 e3522e5f46..c03741fc37 100644 --- a/test/requests/definition_expectations_test.rb +++ b/test/requests/definition_expectations_test.rb @@ -486,6 +486,42 @@ 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 + private def create_definition_addon diff --git a/test/requests/hover_expectations_test.rb b/test/requests/hover_expectations_test.rb index 3bdcc9d561..9d5881e5eb 100644 --- a/test/requests/hover_expectations_test.rb +++ b/test/requests/hover_expectations_test.rb @@ -311,6 +311,41 @@ 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 + private def create_hover_addon From 410d58453a20089c131eed81a0d5485e0a6b65a7 Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Wed, 29 May 2024 09:47:02 -0400 Subject: [PATCH 138/189] Improve method extract target location (#2094) --- lib/ruby_lsp/requests/code_action_resolve.rb | 22 +++++----- lib/ruby_lsp/requests/code_actions.rb | 43 ++++++------------- .../extract_method.exp.json | 10 ++--- 3 files changed, 29 insertions(+), 46 deletions(-) diff --git a/lib/ruby_lsp/requests/code_action_resolve.rb b/lib/ruby_lsp/requests/code_action_resolve.rb index 5d9bbde621..7998519b2f 100644 --- a/lib/ruby_lsp/requests/code_action_resolve.rb +++ b/lib/ruby_lsp/requests/code_action_resolve.rb @@ -46,9 +46,9 @@ def initialize(document, code_action) sig { override.returns(T.any(Interface::CodeAction, Error)) } def perform case @code_action[:title] - when CodeActions::VARIABLE_REFACTOR_CODE_ACTION_TITLE + when CodeActions::EXTRACT_TO_VARIABLE_TITLE refactor_variable - when CodeActions::METHOD_REFACTOR_CODE_ACTION_TITLE + when CodeActions::EXTRACT_TO_METHOD_TITLE refactor_method else Error::UnknownCodeAction @@ -131,7 +131,7 @@ def refactor_variable end Interface::CodeAction.new( - title: "Refactor: Extract Variable", + title: CodeActions::EXTRACT_TO_VARIABLE_TITLE, edit: Interface::WorkspaceEdit.new( document_changes: [ Interface::TextDocumentEdit.new( @@ -168,27 +168,27 @@ def refactor_method ) return Error::InvalidTargetRange if closest_def.nil? - closest_node_loc = closest_def.location.end_line end_keyword_loc = closest_def.end_keyword_loc return Error::InvalidTargetRange if end_keyword_loc.nil? - character = end_keyword_loc.start_column - indentation = " " * character + end_line = end_keyword_loc.end_line - 1 + character = end_keyword_loc.end_column + indentation = " " * end_keyword_loc.start_column target_range = { - start: { line: closest_node_loc, character: character }, - end: { line: closest_node_loc, character: character }, + start: { line: end_line, character: character }, + end: { line: end_line, character: character }, } - new_method_source = <<~RUBY + new_method_source = <<~RUBY.chomp + #{indentation}def #{NEW_METHOD_NAME} #{indentation} #{extracted_source} #{indentation}end - RUBY Interface::CodeAction.new( - title: CodeActions::METHOD_REFACTOR_CODE_ACTION_TITLE, + title: CodeActions::EXTRACT_TO_METHOD_TITLE, edit: Interface::WorkspaceEdit.new( document_changes: [ Interface::TextDocumentEdit.new( diff --git a/lib/ruby_lsp/requests/code_actions.rb b/lib/ruby_lsp/requests/code_actions.rb index a2a6835d23..da6b83a71f 100644 --- a/lib/ruby_lsp/requests/code_actions.rb +++ b/lib/ruby_lsp/requests/code_actions.rb @@ -19,8 +19,8 @@ module Requests class CodeActions < Request extend T::Sig - VARIABLE_REFACTOR_CODE_ACTION_TITLE = "Refactor: Extract Variable" - METHOD_REFACTOR_CODE_ACTION_TITLE = "Refactor: Extract Method" + EXTRACT_TO_VARIABLE_TITLE = "Refactor: Extract Variable" + EXTRACT_TO_METHOD_TITLE = "Refactor: Extract Method" class << self extend T::Sig @@ -56,36 +56,19 @@ def perform # Only add refactor actions if there's a non empty selection in the editor unless @range.dig(:start) == @range.dig(:end) - code_actions << refactor_code_action(@range, @uri) - code_actions << extract_code_action(@range, @uri) + 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 - code_actions - end - - private - sig { params(range: T::Hash[Symbol, T.untyped], uri: URI::Generic).returns(Interface::CodeAction) } - def refactor_code_action(range, uri) - Interface::CodeAction.new( - title: VARIABLE_REFACTOR_CODE_ACTION_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 extract_code_action(range, uri) - Interface::CodeAction.new( - title: METHOD_REFACTOR_CODE_ACTION_TITLE, - kind: Constant::CodeActionKind::REFACTOR_EXTRACT, - data: { - range: range, - uri: uri.to_s, - }, - ) + code_actions end end end diff --git a/test/expectations/code_action_resolve/extract_method.exp.json b/test/expectations/code_action_resolve/extract_method.exp.json index 441b2f990a..20a48b2406 100644 --- a/test/expectations/code_action_resolve/extract_method.exp.json +++ b/test/expectations/code_action_resolve/extract_method.exp.json @@ -29,15 +29,15 @@ { "range": { "start": { - "line": 4, - "character": 2 + "line": 3, + "character": 5 }, "end": { - "line": 4, - "character": 2 + "line": 3, + "character": 5 } }, - "newText": "\n def new_method\n answer = 42\n end\n\n" + "newText": "\n\n def new_method\n answer = 42\n end" }, { "range": { From ab7b2695f1bf559a061eb638089db222e0a58ddd Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Wed, 29 May 2024 13:29:06 -0400 Subject: [PATCH 139/189] Disable highlightUntyped (#2100) --- .vscode/settings.json | 1 - 1 file changed, 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index cfc896113f..0e76c4d786 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -45,5 +45,4 @@ ] } ], - "sorbet.highlightUntyped": "everywhere-but-tests" } From 32666478d3d1293af6e40dd8510440c641b3428b Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Wed, 29 May 2024 14:10:21 -0400 Subject: [PATCH 140/189] Revert "Allow Code Lenses without a command" (#2102) Revert "Allow Code Lenses without a command (#2069)" This reverts commit d506ac43ea0512c6d19ca21b1a991dfa2d055ad6. --- lib/ruby_lsp/requests/support/common.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ruby_lsp/requests/support/common.rb b/lib/ruby_lsp/requests/support/common.rb index 1bc4413639..602bc3c53b 100644 --- a/lib/ruby_lsp/requests/support/common.rb +++ b/lib/ruby_lsp/requests/support/common.rb @@ -50,12 +50,12 @@ def visible?(node, range) params( node: Prism::Node, title: String, - command_name: T.nilable(String), + command_name: String, arguments: T.nilable(T::Array[T.untyped]), data: T.nilable(T::Hash[T.untyped, T.untyped]), ).returns(Interface::CodeLens) end - def create_code_lens(node, title:, command_name: nil, arguments: nil, data: nil) + def create_code_lens(node, title:, command_name:, arguments:, data:) range = range_from_node(node) Interface::CodeLens.new( From d993c5e9ddbeafee7183edd732b148f8d7e46b63 Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Wed, 29 May 2024 15:12:00 -0400 Subject: [PATCH 141/189] Improve client integration tests (#2033) * Ensure RubyInstaller is retrieving the right PATH * Improve integration tests to activate the current Ruby --- vscode/src/ruby/chruby.ts | 12 ++- vscode/src/ruby/rubyInstaller.ts | 7 ++ vscode/src/test/suite/client.test.ts | 130 +++++++++++++++++++++++---- 3 files changed, 131 insertions(+), 18 deletions(-) diff --git a/vscode/src/ruby/chruby.ts b/vscode/src/ruby/chruby.ts index 55763ee3f5..b2248401b4 100644 --- a/vscode/src/ruby/chruby.ts +++ b/vscode/src/ruby/chruby.ts @@ -43,6 +43,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 +60,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 +70,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)) { @@ -168,7 +176,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 }; } diff --git a/vscode/src/ruby/rubyInstaller.ts b/vscode/src/ruby/rubyInstaller.ts index aeb845d8aa..043e9bf23a 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/test/suite/client.test.ts b/vscode/src/test/suite/client.test.ts index 3420b6b199..a06a4bd9b2 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 { @@ -25,8 +27,42 @@ 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 +92,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 +162,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 +209,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 +222,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 () => { From fb8bb23957639a6383e61b2f6e382b4c96a616fb Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Wed, 29 May 2024 20:42:13 +0100 Subject: [PATCH 142/189] Mention editor names in the 'other editors' section (#2026) --- EDITORS.md | 1 + README.md | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/EDITORS.md b/EDITORS.md index c710cbdfda..a17741af37 100644 --- a/EDITORS.md +++ b/EDITORS.md @@ -17,6 +17,7 @@ new H2 header in this file containing the instructions. --> - [Emacs Eglot](#Emacs-Eglot) - [Neovim LSP](#Neovim-LSP) - [Sublime Text LSP](#sublime-text-lsp) +- [Zed](#zed-some-limitations) ## Emacs Eglot diff --git a/README.md b/README.md index 9bde229606..d403e2d291 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ editor. Do not install the `ruby-lsp` gem manually. ### 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 From 39ea0fe5c51a14a3a6d2f86fa084d282eb479fd0 Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Wed, 29 May 2024 16:57:56 -0400 Subject: [PATCH 143/189] Add RubyMine plugin to docs (#2077) Add RubyMine plugin --- EDITORS.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/EDITORS.md b/EDITORS.md index a17741af37..935bc8f411 100644 --- a/EDITORS.md +++ b/EDITORS.md @@ -17,7 +17,8 @@ new H2 header in this file containing the instructions. --> - [Emacs Eglot](#Emacs-Eglot) - [Neovim LSP](#Neovim-LSP) - [Sublime Text LSP](#sublime-text-lsp) -- [Zed](#zed-some-limitations) +- [Zed](#zed) +- [RubyMine](#RubyMine) ## Emacs Eglot @@ -132,7 +133,7 @@ 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 (some limitations) +## Zed [Setting up Ruby LSP](https://github.com/zed-industries/zed/blob/main/docs/src/languages/ruby.md#setting-up-ruby-lsp) @@ -140,6 +141,10 @@ Restart LSP or Sublime Text and `ruby-lsp` will automatically activate when open See https://github.com/zed-industries/zed/issues/4834 for discussion of the limitations. -## RubyMine (not yet supported) +## RubyMine -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. +You can use the Ruby LSP with RubyMine (or IntelliJ IDEA Ultimate) through the following plugin. + +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. + +[https://plugins.jetbrains.com/plugin/24413-ruby-lsp](Ruby LSP plugin) From 49e3dff8fc55465049f5b14239594d341ff12181 Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Thu, 30 May 2024 10:01:35 -0400 Subject: [PATCH 144/189] Set shell and env for ASDF activation (#2006) * Use vscode.env.shell when launching ASDF * Include current process env when launching ASDF * Pass process env when invoking ASDF --- vscode/src/ruby/asdf.ts | 57 +------------------------ vscode/src/test/suite/ruby/asdf.test.ts | 14 +++--- 2 files changed, 7 insertions(+), 64 deletions(-) diff --git a/vscode/src/ruby/asdf.ts b/vscode/src/ruby/asdf.ts index 8c83ed2769..08b1cea0a8 100644 --- a/vscode/src/ruby/asdf.ts +++ b/vscode/src/ruby/asdf.ts @@ -1,6 +1,5 @@ /* eslint-disable no-process-env */ -import path from "path"; import os from "os"; import * as vscode from "vscode"; @@ -15,7 +14,6 @@ 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)"; @@ -23,23 +21,13 @@ export class Asdf extends VersionManager { `. ${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, - }, + shell: vscode.env.shell, + env: process.env, }, ); 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,47 +35,6 @@ 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 { // Possible ASDF installation paths as described in https://asdf-vm.com/guide/getting-started.html#_3-install-asdf. diff --git a/vscode/src/test/suite/ruby/asdf.test.ts b/vscode/src/test/suite/ruby/asdf.test.ts index fb07b3f15e..600dd2a948 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,19 @@ 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(); }); }); From 9c83e17cb5b2e70a0b7a2dfd926e3c03d76657b7 Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Thu, 30 May 2024 10:02:55 -0400 Subject: [PATCH 145/189] Bump extension version to v0.7.0 --- vscode/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vscode/package.json b/vscode/package.json index 9ec162357b..f3189e1e45 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.0", "publisher": "Shopify", "repository": { "type": "git", From b8f17bf8bcc302eb27e2e48b5ccbf2ca0c87d219 Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Thu, 30 May 2024 17:06:49 +0100 Subject: [PATCH 146/189] Track method's visibility during indexing (#2093) * Track method visibility in the index This commit supports visibility tracking for methods in the index by: - Adding a visibility field to the Member entry, which is a superclass of Accessor, Method, and Alias. - In the DeclarationListener, create a nested stack structure to track the visibility of the current scope. * Use T::Enum to type visibility values * Simplify visibility stack implementation --- .../lib/ruby_indexer/declaration_listener.rb | 45 +++++++++++++++++-- lib/ruby_indexer/lib/ruby_indexer/entry.rb | 22 ++++++--- .../test/classes_and_modules_test.rb | 6 +-- lib/ruby_indexer/test/constant_test.rb | 16 +++---- lib/ruby_indexer/test/method_test.rb | 37 +++++++++++++++ lib/ruby_indexer/test/test_case.rb | 4 +- lib/ruby_lsp/listeners/completion.rb | 3 +- lib/ruby_lsp/listeners/definition.rb | 3 +- lib/ruby_lsp/listeners/hover.rb | 3 +- lib/ruby_lsp/requests/workspace_symbol.rb | 2 +- 10 files changed, 117 insertions(+), 24 deletions(-) diff --git a/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb b/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb index 8e22800d81..ab7cbed467 100644 --- a/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb +++ b/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb @@ -11,6 +11,7 @@ class DeclarationListener 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] @@ -35,6 +36,7 @@ def initialize(index, dispatcher, parse_result, file_path) :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, @@ -55,6 +57,7 @@ def initialize(index, dispatcher, parse_result, file_path) 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) @@ -82,10 +85,12 @@ 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) @@ -100,6 +105,7 @@ 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::MultiWriteNode).void } @@ -203,6 +209,25 @@ def on_call_node_enter(node) handle_module_operation(node, :included_modules) when :prepend handle_module_operation(node, :prepended_modules) + 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 @@ -220,6 +245,7 @@ def on_def_node_enter(node) node.location, comments, node.parameters, + current_visibility, @owner_stack.last, ) when Prism::SelfNode @@ -229,6 +255,7 @@ def on_def_node_enter(node) node.location, comments, node.parameters, + current_visibility, @owner_stack.last, ) end @@ -333,7 +360,7 @@ 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 do @@ -430,8 +457,15 @@ 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 + @index << Entry::Accessor.new(name, @file_path, loc, comments, current_visibility, @owner_stack.last) if reader + @index << Entry::Accessor.new( + "#{name}=", + @file_path, + loc, + comments, + current_visibility, + @owner_stack.last, + ) if writer end end @@ -456,5 +490,10 @@ def handle_module_operation(node, operation) collection = operation == :included_modules ? owner.included_modules : owner.prepended_modules collection.concat(names) end + + sig { returns(Entry::Visibility) } + def current_visibility + T.must(@visibility_stack.last) + end end end diff --git a/lib/ruby_indexer/lib/ruby_indexer/entry.rb b/lib/ruby_indexer/lib/ruby_indexer/entry.rb index ceaa369830..8fac069ed0 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) @@ -188,11 +196,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 @@ -227,11 +237,12 @@ class Method < Member location: T.any(Prism::Location, RubyIndexer::Location), comments: T::Array[String], parameters_node: T.nilable(Prism::ParametersNode), + 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) + def initialize(name, file_path, location, comments, parameters_node, visibility, owner) # rubocop:disable Metrics/ParameterLists + super(name, file_path, location, comments, visibility, owner) @parameters = T.let(list_params(parameters_node), T::Array[Parameter]) end @@ -377,6 +388,7 @@ 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 diff --git a/lib/ruby_indexer/test/classes_and_modules_test.rb b/lib/ruby_indexer/test/classes_and_modules_test.rb index d18cb1b02f..d76c25e17e 100644 --- a/lib/ruby_indexer/test/classes_and_modules_test.rb +++ b/lib/ruby_indexer/test/classes_and_modules_test.rb @@ -290,13 +290,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 diff --git a/lib/ruby_indexer/test/constant_test.rb b/lib/ruby_indexer/test/constant_test.rb index 44839ffa32..9c6e77915a 100644 --- a/lib/ruby_indexer/test/constant_test.rb +++ b/lib/ruby_indexer/test/constant_test.rb @@ -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/method_test.rb b/lib/ruby_indexer/test/method_test.rb index ff1245fa6e..4565bcb2aa 100644 --- a/lib/ruby_indexer/test/method_test.rb +++ b/lib/ruby_indexer/test/method_test.rb @@ -71,6 +71,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::InstanceMethod, "/fake/path/foo.rb:0-8:1-3", visibility: Entry::Visibility::PRIVATE) + assert_entry("bar", Entry::InstanceMethod, "/fake/path/foo.rb:3-0:3-12", visibility: Entry::Visibility::PUBLIC) + assert_entry("baz", Entry::InstanceMethod, "/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::InstanceMethod, "/fake/path/foo.rb:3-2:3-14", visibility: Entry::Visibility::PRIVATE) + assert_entry("bar", Entry::InstanceMethod, "/fake/path/foo.rb:6-4:6-16", visibility: Entry::Visibility::PUBLIC) + assert_entry("baz", Entry::InstanceMethod, "/fake/path/foo.rb:9-2:9-14", visibility: Entry::Visibility::PRIVATE) + end + def test_method_with_parameters index(<<~RUBY) class Foo diff --git a/lib/ruby_indexer/test/test_case.rb b/lib/ruby_indexer/test/test_case.rb index cf666cb4e8..61708495d1 100644 --- a/lib/ruby_indexer/test/test_case.rb +++ b/lib/ruby_indexer/test/test_case.rb @@ -15,7 +15,7 @@ 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_empty(entries, "Expected #{expected_name} to be indexed") @@ -28,6 +28,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) diff --git a/lib/ruby_lsp/listeners/completion.rb b/lib/ruby_lsp/listeners/completion.rb index 0d678b0f8d..70a54cf80a 100644 --- a/lib/ruby_lsp/listeners/completion.rb +++ b/lib/ruby_lsp/listeners/completion.rb @@ -174,7 +174,8 @@ def constant_path_completion(name, range) # 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}::") + next if first_entry.visibility == RubyIndexer::Entry::Visibility::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}" diff --git a/lib/ruby_lsp/listeners/definition.rb b/lib/ruby_lsp/listeners/definition.rb index dab51fb6a3..5fc1a551ac 100644 --- a/lib/ruby_lsp/listeners/definition.rb +++ b/lib/ruby_lsp/listeners/definition.rb @@ -211,7 +211,8 @@ def find_in_index(value) # 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.visibility == RubyIndexer::Entry::Visibility::PRIVATE && + first_entry.name != "#{@nesting.join("::")}::#{value}" entries.each do |entry| location = entry.location diff --git a/lib/ruby_lsp/listeners/hover.rb b/lib/ruby_lsp/listeners/hover.rb index c580a8d98d..f3c661b339 100644 --- a/lib/ruby_lsp/listeners/hover.rb +++ b/lib/ruby_lsp/listeners/hover.rb @@ -166,7 +166,8 @@ def generate_hover(name, location) # 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.visibility == RubyIndexer::Entry::Visibility::PRIVATE && + first_entry.name != "#{@nesting.join("::")}::#{name}" categorized_markdown_from_index_entries(name, entries).each do |category, content| @response_builder.push(content, category: category) diff --git a/lib/ruby_lsp/requests/workspace_symbol.rb b/lib/ruby_lsp/requests/workspace_symbol.rb index c30cf02ad8..e3f60a49f1 100644 --- a/lib/ruby_lsp/requests/workspace_symbol.rb +++ b/lib/ruby_lsp/requests/workspace_symbol.rb @@ -39,7 +39,7 @@ def perform next if @global_state.typechecker && not_in_dependencies?(file_path) # We should never show private symbols when searching the entire workspace - next if entry.visibility == :private + next if entry.visibility == RubyIndexer::Entry::Visibility::PRIVATE kind = kind_for_entry(entry) loc = entry.location From 5e29a6dd0ccaf9260d91b51c2f84c196e0219ae4 Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Thu, 30 May 2024 13:43:33 -0400 Subject: [PATCH 147/189] Fix duplicate LSP features appearing in multiroot workspaces (#2101) Fix duplicate LSP features --- vscode/src/client.ts | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/vscode/src/client.ts b/vscode/src/client.ts index d00668d32b..4cd8a73f41 100644 --- a/vscode/src/client.ts +++ b/vscode/src/client.ts @@ -91,6 +91,7 @@ function collectClientOptions( configuration: vscode.WorkspaceConfiguration, workspaceFolder: vscode.WorkspaceFolder, outputChannel: WorkspaceChannel, + ruby: Ruby, ): LanguageClientOptions { const pullOn: "change" | "save" | "both" = configuration.get("pullDiagnosticsOn")!; @@ -103,8 +104,27 @@ 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 = [ + { + language: "ruby", + pattern: `${fsPath}/**/*`, + }, + ]; + + if (ruby.env.GEM_PATH) { + const parts = ruby.env.GEM_PATH.split(path.delimiter); + + parts.forEach((gemPath) => { + documentSelector.push({ + language: "ruby", + pattern: `${gemPath}/**/*`, + }); + }); + } + return { - documentSelector: [{ language: "ruby" }], + documentSelector, workspaceFolder, diagnosticCollectionName: LSP_NAME, outputChannel, @@ -149,6 +169,7 @@ export default class Client extends LanguageClient implements ClientInterface { vscode.workspace.getConfiguration("rubyLsp"), workspaceFolder, outputChannel, + ruby, ), ); From 162fda279ac65cf4b53865e208e13523bea7507c Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Thu, 30 May 2024 14:12:58 -0400 Subject: [PATCH 148/189] Add ability to linearize ancestors (#2024) * Add ability to linearize ancestors * Use classes to represent includes, prepends and extends --- .../lib/ruby_indexer/declaration_listener.rb | 29 +- lib/ruby_indexer/lib/ruby_indexer/entry.rb | 56 ++- lib/ruby_indexer/lib/ruby_indexer/index.rb | 102 +++++ .../test/classes_and_modules_test.rb | 58 ++- lib/ruby_indexer/test/index_test.rb | 371 ++++++++++++++++++ 5 files changed, 592 insertions(+), 24 deletions(-) diff --git a/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb b/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb index ab7cbed467..fa503cdde9 100644 --- a/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb +++ b/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb @@ -68,8 +68,10 @@ def on_class_node_enter(node) superclass.slice end + nesting = name.start_with?("::") ? [name.delete_prefix("::")] : @stack + [name.delete_prefix("::")] + entry = Entry::Class.new( - fully_qualify_name(name), + nesting, @file_path, node.location, comments, @@ -94,7 +96,9 @@ def on_module_node_enter(node) 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 @@ -205,10 +209,8 @@ 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 :include, :prepend, :extend + handle_module_operation(node, message) when :public @visibility_stack.push(Entry::Visibility::PUBLIC) when :protected @@ -479,16 +481,21 @@ 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 - collection = operation == :included_modules ? owner.included_modules : owner.prepended_modules - collection.concat(names) end sig { returns(Entry::Visibility) } diff --git a/lib/ruby_indexer/lib/ruby_indexer/entry.rb b/lib/ruby_indexer/lib/ruby_indexer/entry.rb index 8fac069ed0..5012cfbf7f 100644 --- a/lib/ruby_indexer/lib/ruby_indexer/entry.rb +++ b/lib/ruby_indexer/lib/ruby_indexer/entry.rb @@ -62,6 +62,25 @@ 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 @@ -69,13 +88,35 @@ 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 end @@ -92,15 +133,16 @@ 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) + def initialize(nesting, file_path, location, comments, parent_class) + super(nesting, file_path, location, comments) + @parent_class = T.let(parent_class, T.nilable(String)) end end diff --git a/lib/ruby_indexer/lib/ruby_indexer/index.rb b/lib/ruby_indexer/lib/ruby_indexer/index.rb index eaf23cb944..13db72fdf2 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 } @@ -255,6 +259,104 @@ def resolve_method(method_name, receiver_name) end 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 + + 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 we don't have an entry for `name`, raise + entries = resolve(fully_qualified_name, []) + raise NonExistingNamespaceError, "No entry found for #{fully_qualified_name}" unless entries + + # 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 + private # Attempts to resolve an UnresolvedAlias into a resolved Alias. If the unresolved alias is pointing to a constant diff --git a/lib/ruby_indexer/test/classes_and_modules_test.rb b/lib/ruby_indexer/test/classes_and_modules_test.rb index d76c25e17e..5e6f7f17c8 100644 --- a/lib/ruby_indexer/test/classes_and_modules_test.rb +++ b/lib/ruby_indexer/test/classes_and_modules_test.rb @@ -369,13 +369,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 +415,59 @@ 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.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_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.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 end end diff --git a/lib/ruby_indexer/test/index_test.rb b/lib/ruby_indexer/test/index_test.rb index 6f759471af..d5ebfdd2e0 100644 --- a/lib/ruby_indexer/test/index_test.rb +++ b/lib/ruby_indexer/test/index_test.rb @@ -313,5 +313,376 @@ 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)) 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", + # "Object", + # "Kernel", + # "BasicObject", + ], + @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) + module Kernel + def Array(a); end + end + RUBY + + assert_raises(Index::NonExistingNamespaceError) do + @index.linearized_ancestors_of("Foo") + end + + assert_raises(Index::NonExistingNamespaceError) do + @index.linearized_ancestors_of("Array") + 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 end end From 436e2532a784535a0a20b771a4c66a9e25a5bbe0 Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Thu, 30 May 2024 14:13:08 -0400 Subject: [PATCH 149/189] Introduce RubyIndexer::Entry#private? (#2106) --- lib/ruby_indexer/lib/ruby_indexer/entry.rb | 5 +++++ lib/ruby_lsp/listeners/completion.rb | 3 +-- lib/ruby_lsp/listeners/definition.rb | 3 +-- lib/ruby_lsp/listeners/hover.rb | 3 +-- lib/ruby_lsp/requests/workspace_symbol.rb | 2 +- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/ruby_indexer/lib/ruby_indexer/entry.rb b/lib/ruby_indexer/lib/ruby_indexer/entry.rb index 5012cfbf7f..7a17649b91 100644 --- a/lib/ruby_indexer/lib/ruby_indexer/entry.rb +++ b/lib/ruby_indexer/lib/ruby_indexer/entry.rb @@ -57,6 +57,11 @@ 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) diff --git a/lib/ruby_lsp/listeners/completion.rb b/lib/ruby_lsp/listeners/completion.rb index 70a54cf80a..b62414e3e6 100644 --- a/lib/ruby_lsp/listeners/completion.rb +++ b/lib/ruby_lsp/listeners/completion.rb @@ -174,8 +174,7 @@ def constant_path_completion(name, range) # 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 == RubyIndexer::Entry::Visibility::PRIVATE && - !first_entry.name.start_with?("#{@nesting}::") + 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}" diff --git a/lib/ruby_lsp/listeners/definition.rb b/lib/ruby_lsp/listeners/definition.rb index 5fc1a551ac..27e50d4502 100644 --- a/lib/ruby_lsp/listeners/definition.rb +++ b/lib/ruby_lsp/listeners/definition.rb @@ -211,8 +211,7 @@ def find_in_index(value) # 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 == RubyIndexer::Entry::Visibility::PRIVATE && - first_entry.name != "#{@nesting.join("::")}::#{value}" + return if first_entry.private? && first_entry.name != "#{@nesting.join("::")}::#{value}" entries.each do |entry| location = entry.location diff --git a/lib/ruby_lsp/listeners/hover.rb b/lib/ruby_lsp/listeners/hover.rb index f3c661b339..abcefca61b 100644 --- a/lib/ruby_lsp/listeners/hover.rb +++ b/lib/ruby_lsp/listeners/hover.rb @@ -166,8 +166,7 @@ def generate_hover(name, location) # 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 == RubyIndexer::Entry::Visibility::PRIVATE && - first_entry.name != "#{@nesting.join("::")}::#{name}" + return if first_entry.private? && first_entry.name != "#{@nesting.join("::")}::#{name}" categorized_markdown_from_index_entries(name, entries).each do |category, content| @response_builder.push(content, category: category) diff --git a/lib/ruby_lsp/requests/workspace_symbol.rb b/lib/ruby_lsp/requests/workspace_symbol.rb index e3f60a49f1..3c78f57963 100644 --- a/lib/ruby_lsp/requests/workspace_symbol.rb +++ b/lib/ruby_lsp/requests/workspace_symbol.rb @@ -39,7 +39,7 @@ def perform next if @global_state.typechecker && not_in_dependencies?(file_path) # We should never show private symbols when searching the entire workspace - next if entry.visibility == RubyIndexer::Entry::Visibility::PRIVATE + next if entry.private? kind = kind_for_entry(entry) loc = entry.location From 2e0f7487c045f340b645b1045de423730110e43d Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Thu, 30 May 2024 14:16:14 -0400 Subject: [PATCH 150/189] Add test for Code Lens with Minitest (#2108) --- test/requests/code_lens_expectations_test.rb | 30 ++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/test/requests/code_lens_expectations_test.rb b/test/requests/code_lens_expectations_test.rb index 0868a21542..198f40936a 100644 --- a/test/requests/code_lens_expectations_test.rb +++ b/test/requests/code_lens_expectations_test.rb @@ -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 From 12c9d0002542503303449c6ff35b5a2f7ef57ebc Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Thu, 30 May 2024 14:21:49 -0400 Subject: [PATCH 151/189] Detect missing fixtures submodule (#2105) * Detect missing Prism fixtures submodule * Remove unnecessary extra check --- bin/test | 8 -------- lib/ruby_indexer/test/index_test.rb | 4 ++++ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/bin/test b/bin/test index c039b4e478..dfa37a0785 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/ruby_indexer/test/index_test.rb b/lib/ruby_indexer/test/index_test.rb index d5ebfdd2e0..55b45534da 100644 --- a/lib/ruby_indexer/test/index_test.rb +++ b/lib/ruby_indexer/test/index_test.rb @@ -299,6 +299,10 @@ def baz; end 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| From f159d4e83392943144801038c22fb97ccd4040ab Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Thu, 30 May 2024 14:37:54 -0400 Subject: [PATCH 152/189] Support inherited methods in definition, hover and completion (#2028) * Resolve inherited methods * Support inherited methods in definition, hover and completion --- lib/ruby_indexer/lib/ruby_indexer/index.rb | 18 +++++-- lib/ruby_indexer/test/index_test.rb | 49 +++++++++++++++++++ lib/ruby_lsp/listeners/completion.rb | 3 +- test/requests/completion_test.rb | 34 +++++++++++++ test/requests/definition_expectations_test.rb | 41 ++++++++++++++++ test/requests/hover_expectations_test.rb | 42 ++++++++++++++++ 6 files changed, 181 insertions(+), 6 deletions(-) diff --git a/lib/ruby_indexer/lib/ruby_indexer/index.rb b/lib/ruby_indexer/lib/ruby_indexer/index.rb index 13db72fdf2..77845e83f1 100644 --- a/lib/ruby_indexer/lib/ruby_indexer/index.rb +++ b/lib/ruby_indexer/lib/ruby_indexer/index.rb @@ -249,14 +249,22 @@ 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 + ancestors = linearized_ancestors_of(receiver_name.delete_prefix("::")) + return unless method_entries - owner_name = T.must(owner_entries.first).name + ancestors.each do |ancestor| + found = method_entries.select do |entry| + next unless entry.is_a?(Entry::Member) - method_entries.grep(Entry::Member).select do |entry| - entry.owner&.name == owner_name + 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 diff --git a/lib/ruby_indexer/test/index_test.rb b/lib/ruby_indexer/test/index_test.rb index 55b45534da..6aa5d049bc 100644 --- a/lib/ruby_indexer/test/index_test.rb +++ b/lib/ruby_indexer/test/index_test.rb @@ -688,5 +688,54 @@ module A 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 end end diff --git a/lib/ruby_lsp/listeners/completion.rb b/lib/ruby_lsp/listeners/completion.rb index b62414e3e6..ab9ef26d5f 100644 --- a/lib/ruby_lsp/listeners/completion.rb +++ b/lib/ruby_lsp/listeners/completion.rb @@ -265,9 +265,10 @@ def complete_self_receiver_method(node, name) return unless receiver_entries receiver = T.must(receiver_entries.first) + ancestors = @index.linearized_ancestors_of(receiver.name) @index.prefix_search(name).each do |entries| - entry = entries.find { |e| e.is_a?(RubyIndexer::Entry::Member) && e.owner&.name == receiver.name } + entry = entries.find { |e| e.is_a?(RubyIndexer::Entry::Member) && ancestors.any?(e.owner&.name) } next unless entry @response_builder << build_method_completion(T.cast(entry, RubyIndexer::Entry::Member), node) diff --git a/test/requests/completion_test.rb b/test/requests/completion_test.rb index 0c2338d8e4..5c94b47abc 100644 --- a/test/requests/completion_test.rb +++ b/test/requests/completion_test.rb @@ -612,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 diff --git a/test/requests/definition_expectations_test.rb b/test/requests/definition_expectations_test.rb index c03741fc37..c9a7151cfe 100644 --- a/test/requests/definition_expectations_test.rb +++ b/test/requests/definition_expectations_test.rb @@ -522,6 +522,47 @@ def baz 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 + private def create_definition_addon diff --git a/test/requests/hover_expectations_test.rb b/test/requests/hover_expectations_test.rb index 9d5881e5eb..1725dcd978 100644 --- a/test/requests/hover_expectations_test.rb +++ b/test/requests/hover_expectations_test.rb @@ -346,6 +346,48 @@ def baz 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 + private def create_hover_addon From 4b344bfc003650b7343e256083194ce480b0c367 Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Thu, 30 May 2024 15:38:49 -0400 Subject: [PATCH 153/189] Resolve inherited instance variables (#2098) * Add ability to resolve inherited instance variables * Support inherited instance variables in go to definition * Support inherited instance variables in hover * Support inherited instance variables in completion --- lib/ruby_indexer/lib/ruby_indexer/index.rb | 23 +++++++++++ lib/ruby_lsp/listeners/completion.rb | 10 ++--- lib/ruby_lsp/listeners/definition.rb | 8 ++-- lib/ruby_lsp/listeners/hover.rb | 9 ++--- test/requests/completion_test.rb | 35 +++++++++++++++++ test/requests/definition_expectations_test.rb | 38 +++++++++++++++++++ test/requests/hover_expectations_test.rb | 38 +++++++++++++++++++ 7 files changed, 144 insertions(+), 17 deletions(-) diff --git a/lib/ruby_indexer/lib/ruby_indexer/index.rb b/lib/ruby_indexer/lib/ruby_indexer/index.rb index 77845e83f1..2d2928e2f1 100644 --- a/lib/ruby_indexer/lib/ruby_indexer/index.rb +++ b/lib/ruby_indexer/lib/ruby_indexer/index.rb @@ -365,6 +365,29 @@ def linearized_ancestors_of(fully_qualified_name) 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])) + ancestors = linearized_ancestors_of(owner_name) + return unless entries && ancestors.any? + + 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.uniq(&:name) + variables.select! { |e| ancestors.any?(e.owner&.name) } + variables + end + private # Attempts to resolve an UnresolvedAlias into a resolved Alias. If the unresolved alias is pointing to a constant diff --git a/lib/ruby_lsp/listeners/completion.rb b/lib/ruby_lsp/listeners/completion.rb index ab9ef26d5f..4dfc5352ff 100644 --- a/lib/ruby_lsp/listeners/completion.rb +++ b/lib/ruby_lsp/listeners/completion.rb @@ -191,13 +191,7 @@ def constant_path_completion(name, range) sig { params(name: String, location: Prism::Location).void } def handle_instance_variable_completion(name, location) - entries = T.cast(@index.prefix_search(name).flatten, T::Array[RubyIndexer::Entry::InstanceVariable]) - current_self = @nesting.join("::") - - variables = entries.select { |e| current_self == e.owner&.name } - variables.uniq!(&:name) - - variables.each do |entry| + @index.instance_variable_completion_candidates(name, @nesting.join("::")).each do |entry| variable_name = entry.name @response_builder << Interface::CompletionItem.new( @@ -212,6 +206,8 @@ def handle_instance_variable_completion(name, location) }, ) 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(node: Prism::CallNode).void } diff --git a/lib/ruby_lsp/listeners/definition.rb b/lib/ruby_lsp/listeners/definition.rb index 27e50d4502..cf5aa7873d 100644 --- a/lib/ruby_lsp/listeners/definition.rb +++ b/lib/ruby_lsp/listeners/definition.rb @@ -114,14 +114,10 @@ def on_instance_variable_target_node_enter(node) sig { params(name: String).void } def handle_instance_variable_definition(name) - entries = T.cast(@index[name], T.nilable(T::Array[RubyIndexer::Entry::InstanceVariable])) + entries = @index.resolve_instance_variable(name, @nesting.join("::")) return unless entries - current_self = @nesting.join("::") - entries.each do |entry| - next if current_self != entry.owner&.name - location = entry.location @response_builder << Interface::Location.new( @@ -132,6 +128,8 @@ def handle_instance_variable_definition(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 sig { params(message: String, self_receiver: T::Boolean).void } diff --git a/lib/ruby_lsp/listeners/hover.rb b/lib/ruby_lsp/listeners/hover.rb index abcefca61b..23f9c038dd 100644 --- a/lib/ruby_lsp/listeners/hover.rb +++ b/lib/ruby_lsp/listeners/hover.rb @@ -147,15 +147,14 @@ def on_instance_variable_target_node_enter(node) sig { params(name: String).void } def handle_instance_variable_hover(name) - entries = T.cast(@index[name], T.nilable(T::Array[RubyIndexer::Entry::InstanceVariable])) + entries = @index.resolve_instance_variable(name, @nesting.join("::")) return unless entries - current_self = @nesting.join("::") - owned_variables = entries.select { |e| current_self == e.owner&.name } - - categorized_markdown_from_index_entries(name, owned_variables).each do |category, content| + 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 } diff --git a/test/requests/completion_test.rb b/test/requests/completion_test.rb index 5c94b47abc..2762279545 100644 --- a/test/requests/completion_test.rb +++ b/test/requests/completion_test.rb @@ -909,6 +909,41 @@ def baz 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 diff --git a/test/requests/definition_expectations_test.rb b/test/requests/definition_expectations_test.rb index c9a7151cfe..37f4c0c2d6 100644 --- a/test/requests/definition_expectations_test.rb +++ b/test/requests/definition_expectations_test.rb @@ -563,6 +563,44 @@ def method3 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/hover_expectations_test.rb b/test/requests/hover_expectations_test.rb index 1725dcd978..b43637e4e6 100644 --- a/test/requests/hover_expectations_test.rb +++ b/test/requests/hover_expectations_test.rb @@ -388,6 +388,44 @@ def method3 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 + private def create_hover_addon From 7ca216772a4b0270b5a7a010651f8905accc1bc2 Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Thu, 30 May 2024 16:02:05 -0400 Subject: [PATCH 154/189] Synchronize ancestor changes (#2032) --- lib/ruby_indexer/lib/ruby_indexer/entry.rb | 10 ++ lib/ruby_indexer/lib/ruby_indexer/index.rb | 30 ++++++ lib/ruby_indexer/test/index_test.rb | 104 +++++++++++++++++++++ lib/ruby_lsp/server.rb | 3 +- 4 files changed, 145 insertions(+), 2 deletions(-) diff --git a/lib/ruby_indexer/lib/ruby_indexer/entry.rb b/lib/ruby_indexer/lib/ruby_indexer/entry.rb index 7a17649b91..5a3ace7f3c 100644 --- a/lib/ruby_indexer/lib/ruby_indexer/entry.rb +++ b/lib/ruby_indexer/lib/ruby_indexer/entry.rb @@ -123,6 +123,11 @@ def mixin_operation_module_names 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 class Module < Namespace @@ -150,6 +155,11 @@ def initialize(nesting, file_path, location, comments, parent_class) @parent_class = T.let(parent_class, T.nilable(String)) end + + sig { override.returns(Integer) } + def ancestor_hash + [mixin_operation_module_names, @parent_class].hash + end end class Constant < Entry diff --git a/lib/ruby_indexer/lib/ruby_indexer/index.rb b/lib/ruby_indexer/lib/ruby_indexer/index.rb index 2d2928e2f1..aec7bb04db 100644 --- a/lib/ruby_indexer/lib/ruby_indexer/index.rb +++ b/lib/ruby_indexer/lib/ruby_indexer/index.rb @@ -388,6 +388,36 @@ def instance_variable_completion_candidates(name, owner_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 diff --git a/lib/ruby_indexer/test/index_test.rb b/lib/ruby_indexer/test/index_test.rb index 6aa5d049bc..ffcac974ef 100644 --- a/lib/ruby_indexer/test/index_test.rb +++ b/lib/ruby_indexer/test/index_test.rb @@ -737,5 +737,109 @@ def qux; end 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"], @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"], @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"], @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"], @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"], @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"], @index.linearized_ancestors_of("Bar")) + end + end + end end end diff --git a/lib/ruby_lsp/server.rb b/lib/ruby_lsp/server.rb index bc281c6465..ee2668aea4 100644 --- a/lib/ruby_lsp/server.rb +++ b/lib/ruby_lsp/server.rb @@ -626,8 +626,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 From 98752bc4851e0b7fef9d895f6b61ea0fe380df01 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 30 May 2024 16:07:12 -0400 Subject: [PATCH 155/189] Bump sinon from 17.0.2 to 18.0.0 in /vscode (#2064) Bumps [sinon](https://github.com/sinonjs/sinon) from 17.0.2 to 18.0.0. - [Release notes](https://github.com/sinonjs/sinon/releases) - [Changelog](https://github.com/sinonjs/sinon/blob/main/docs/changelog.md) - [Commits](https://github.com/sinonjs/sinon/compare/v17.0.2...v18.0.0) --- updated-dependencies: - dependency-name: sinon dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- vscode/package.json | 2 +- vscode/yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/vscode/package.json b/vscode/package.json index f3189e1e45..240d4c3423 100644 --- a/vscode/package.json +++ b/vscode/package.json @@ -557,7 +557,7 @@ "ovsx": "^0.9.1", "prettier": "^3.2.5", "typescript": "^5.4.5", - "sinon": "^17.0.2", + "sinon": "^18.0.0", "vscode-oniguruma": "^2.0.1", "vscode-textmate": "^9.0.0" }, diff --git a/vscode/yarn.lock b/vscode/yarn.lock index f475b3acec..28ee8a1741 100644 --- a/vscode/yarn.lock +++ b/vscode/yarn.lock @@ -3318,10 +3318,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.9: - 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" @@ -4007,16 +4007,16 @@ simple-get@^4.0.0: once "^1.3.1" simple-concat "^1.0.0" -sinon@^17.0.2: - version "17.0.2" - resolved "https://registry.yarnpkg.com/sinon/-/sinon-17.0.2.tgz#470894bcc2d24b01bad539722ea46da949892405" - integrity sha512-uihLiaB9FhzesElPDFZA7hDcNABzsVHwr3YfmM9sBllVwab3l0ltGlRV1XhpNfIacNDLGD1QRZNLs5nU5+hTuA== +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.1" "@sinonjs/fake-timers" "^11.2.2" "@sinonjs/samsam" "^8.0.0" diff "^5.2.0" - nise "^5.1.9" + nise "^6.0.0" supports-color "^7" slash@^3.0.0: From 30a9aef377d2db2da386922146f4ed1ec7d0c5dd Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Thu, 30 May 2024 16:07:38 -0400 Subject: [PATCH 156/189] Search for asdf.fish when the shell is fish (#2111) --- vscode/src/ruby/asdf.ts | 12 ++++-- vscode/src/test/suite/ruby/asdf.test.ts | 52 +++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 4 deletions(-) diff --git a/vscode/src/ruby/asdf.ts b/vscode/src/ruby/asdf.ts index 08b1cea0a8..e303f5af61 100644 --- a/vscode/src/ruby/asdf.ts +++ b/vscode/src/ruby/asdf.ts @@ -1,6 +1,7 @@ /* eslint-disable no-process-env */ import os from "os"; +import path from "path"; import * as vscode from "vscode"; @@ -37,6 +38,9 @@ export class Asdf extends VersionManager { // 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 @@ -44,8 +48,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", @@ -53,7 +57,7 @@ export class Asdf extends VersionManager { "opt", "asdf", "libexec", - "asdf.sh", + scriptName, ), vscode.Uri.joinPath( vscode.Uri.file("/"), @@ -62,7 +66,7 @@ export class Asdf extends VersionManager { "opt", "asdf", "libexec", - "asdf.sh", + scriptName, ), ]; diff --git a/vscode/src/test/suite/ruby/asdf.test.ts b/vscode/src/test/suite/ruby/asdf.test.ts index 600dd2a948..0eccc53c6e 100644 --- a/vscode/src/test/suite/ruby/asdf.test.ts +++ b/vscode/src/test/suite/ruby/asdf.test.ts @@ -65,4 +65,56 @@ suite("Asdf", () => { findInstallationStub.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(); + }); }); From a0979413e5f7ed90849e203905553a392ed762ba Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Thu, 30 May 2024 16:13:47 -0400 Subject: [PATCH 157/189] Add method completion API (#2044) --- lib/ruby_indexer/lib/ruby_indexer/index.rb | 10 ++++++++++ lib/ruby_lsp/listeners/completion.rb | 6 +----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/lib/ruby_indexer/lib/ruby_indexer/index.rb b/lib/ruby_indexer/lib/ruby_indexer/index.rb index aec7bb04db..a194b7c807 100644 --- a/lib/ruby_indexer/lib/ruby_indexer/index.rb +++ b/lib/ruby_indexer/lib/ruby_indexer/index.rb @@ -130,6 +130,16 @@ def fuzzy_search(query) results.flat_map(&:first) end + 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 + # 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 diff --git a/lib/ruby_lsp/listeners/completion.rb b/lib/ruby_lsp/listeners/completion.rb index 4dfc5352ff..7716fbdf6c 100644 --- a/lib/ruby_lsp/listeners/completion.rb +++ b/lib/ruby_lsp/listeners/completion.rb @@ -261,12 +261,8 @@ def complete_self_receiver_method(node, name) return unless receiver_entries receiver = T.must(receiver_entries.first) - ancestors = @index.linearized_ancestors_of(receiver.name) - - @index.prefix_search(name).each do |entries| - entry = entries.find { |e| e.is_a?(RubyIndexer::Entry::Member) && ancestors.any?(e.owner&.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 From f543ff07886451e22df204d5909c4466751ed5da Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Thu, 30 May 2024 16:25:32 -0400 Subject: [PATCH 158/189] Bump extension version to v0.7.1 --- vscode/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vscode/package.json b/vscode/package.json index 240d4c3423..dc882dee5d 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.7.0", + "version": "0.7.1", "publisher": "Shopify", "repository": { "type": "git", From 598ad7e478b10cee873325733774c6ac6550cad2 Mon Sep 17 00:00:00 2001 From: Adam Coffman Date: Thu, 30 May 2024 15:56:13 -0500 Subject: [PATCH 159/189] Fix broken anchor link in EDITOR doc (#2112) Fix broken anchor link --- EDITORS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EDITORS.md b/EDITORS.md index 935bc8f411..df3683a353 100644 --- a/EDITORS.md +++ b/EDITORS.md @@ -15,7 +15,7 @@ new H2 header in this file containing the instructions. --> - [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) - [Sublime Text LSP](#sublime-text-lsp) - [Zed](#zed) - [RubyMine](#RubyMine) From a5e04f7d43f94b89c8df5073232f5d1122cb0dd7 Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Thu, 30 May 2024 17:34:56 -0400 Subject: [PATCH 160/189] Avoid computing ancestors if no ivar is found (#2113) --- lib/ruby_indexer/lib/ruby_indexer/index.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ruby_indexer/lib/ruby_indexer/index.rb b/lib/ruby_indexer/lib/ruby_indexer/index.rb index a194b7c807..eedf2926a1 100644 --- a/lib/ruby_indexer/lib/ruby_indexer/index.rb +++ b/lib/ruby_indexer/lib/ruby_indexer/index.rb @@ -380,8 +380,10 @@ def linearized_ancestors_of(fully_qualified_name) 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 unless entries && ancestors.any? + return if ancestors.empty? entries.select { |e| ancestors.include?(e.owner&.name) } end From 0f1d535f139230e5f69558f216755941630d773b Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Fri, 31 May 2024 12:58:16 -0400 Subject: [PATCH 161/189] Introduce `NodeContext` for listeners (#2099) * Introduce TargetContext * Update tests * Update ADDONS docs * Fix types * Remove accidental comment * Cleanup * Update lib/ruby_lsp/listeners/completion.rb Co-authored-by: Vinicius Stock * Rename to NodeContext * Rename 'closest' to 'node' * Rename * Rename file * Lint * Fix naming * Explain --------- Co-authored-by: Vinicius Stock --- ADDONS.md | 8 ++-- lib/ruby_lsp/addon.rb | 12 +++--- lib/ruby_lsp/document.rb | 6 +-- lib/ruby_lsp/internal.rb | 1 + lib/ruby_lsp/listeners/completion.rb | 31 +++++++------- lib/ruby_lsp/listeners/definition.rb | 14 +++---- lib/ruby_lsp/listeners/hover.rb | 14 +++---- lib/ruby_lsp/listeners/signature_help.rb | 8 ++-- lib/ruby_lsp/node_context.rb | 23 +++++++++++ lib/ruby_lsp/requests/code_action_resolve.rb | 10 ++--- lib/ruby_lsp/requests/completion.rb | 8 ++-- lib/ruby_lsp/requests/definition.rb | 9 ++-- lib/ruby_lsp/requests/document_highlight.rb | 4 +- lib/ruby_lsp/requests/hover.rb | 11 +++-- lib/ruby_lsp/requests/on_type_formatting.rb | 3 +- lib/ruby_lsp/requests/signature_help.rb | 6 +-- test/ruby_document_test.rb | 43 ++++++++++---------- 17 files changed, 121 insertions(+), 90 deletions(-) create mode 100644 lib/ruby_lsp/node_context.rb diff --git a/ADDONS.md b/ADDONS.md index 510ad4d222..8fd9172fee 100644 --- a/ADDONS.md +++ b/ADDONS.md @@ -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) @@ -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/lib/ruby_lsp/addon.rb b/lib/ruby_lsp/addon.rb index 7eacef87f7..15987f7563 100644 --- a/lib/ruby_lsp/addon.rb +++ b/lib/ruby_lsp/addon.rb @@ -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 b8b18de6a7..92cbe4d62c 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,7 +121,7 @@ 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)]) @@ -170,7 +170,7 @@ def locate(node, char_position, node_types: []) end end - [closest, parent, nesting.map { |n| n.constant_path.location.slice }] + NodeContext.new(closest, parent, nesting.map { |n| n.constant_path.location.slice }) end sig { returns(T::Boolean) } diff --git a/lib/ruby_lsp/internal.rb b/lib/ruby_lsp/internal.rb index 7aa48b34fa..ec4aaf8dc0 100644 --- a/lib/ruby_lsp/internal.rb +++ b/lib/ruby_lsp/internal.rb @@ -29,6 +29,7 @@ require "ruby_lsp/server" 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/completion.rb b/lib/ruby_lsp/listeners/completion.rb index 7716fbdf6c..7703e15d16 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 @@ -47,7 +47,7 @@ def on_constant_read_node_enter(node) 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( @@ -161,20 +161,21 @@ def constant_path_completion(name, range) T.must(namespace).join("::") end - namespace_entries = @index.resolve(aliased_namespace, @nesting) + 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.private? && !first_entry.name.start_with?("#{@nesting}::") + 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}" @@ -191,7 +192,7 @@ def constant_path_completion(name, range) sig { params(name: String, location: Prism::Location).void } def handle_instance_variable_completion(name, location) - @index.instance_variable_completion_candidates(name, @nesting.join("::")).each do |entry| + @index.instance_variable_completion_candidates(name, @node_context.nesting.join("::")).each do |entry| variable_name = entry.name @response_builder << Interface::CompletionItem.new( @@ -257,7 +258,7 @@ 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.nesting.join("::")] return unless receiver_entries receiver = T.must(receiver_entries.first) @@ -351,13 +352,14 @@ def build_entry_completion(real_name, incomplete_name, range, entries, top_level # # Foo::B # --> completion inserts `Bar` instead of `Foo::Bar` # end - unless @nesting.join("::").start_with?(incomplete_name) - @nesting.each do |namespace| + nesting = @node_context.nesting + unless nesting.join("::").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 = "#{@nesting.join("::")}::#{shortened_name}" + conflict_name = "#{nesting.join("::")}::#{shortened_name}" break if real_name != conflict_name && @index[conflict_name] insertion_text = shortened_name @@ -399,8 +401,9 @@ def build_entry_completion(real_name, incomplete_name, range, 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 cf5aa7873d..76e2dbf1b5 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( @@ -114,7 +114,7 @@ def on_instance_variable_target_node_enter(node) sig { params(name: String).void } def handle_instance_variable_definition(name) - entries = @index.resolve_instance_variable(name, @nesting.join("::")) + entries = @index.resolve_instance_variable(name, @node_context.nesting.join("::")) return unless entries entries.each do |entry| @@ -135,7 +135,7 @@ def handle_instance_variable_definition(name) 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.nesting.join("::")) 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 @@ -203,13 +203,13 @@ def handle_require_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.private? && first_entry.name != "#{@nesting.join("::")}::#{value}" + return if first_entry.private? && first_entry.name != "#{@node_context.nesting.join("::")}::#{value}" entries.each do |entry| location = entry.location diff --git a/lib/ruby_lsp/listeners/hover.rb b/lib/ruby_lsp/listeners/hover.rb index 23f9c038dd..5205941301 100644 --- a/lib/ruby_lsp/listeners/hover.rb +++ b/lib/ruby_lsp/listeners/hover.rb @@ -36,17 +36,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( @@ -105,7 +105,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.nesting.join("::")) return unless methods categorized_markdown_from_index_entries(message, methods).each do |category, content| @@ -147,7 +147,7 @@ def on_instance_variable_target_node_enter(node) sig { params(name: String).void } def handle_instance_variable_hover(name) - entries = @index.resolve_instance_variable(name, @nesting.join("::")) + entries = @index.resolve_instance_variable(name, @node_context.nesting.join("::")) return unless entries categorized_markdown_from_index_entries(name, entries).each do |category, content| @@ -159,13 +159,13 @@ def handle_instance_variable_hover(name) 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.private? && first_entry.name != "#{@nesting.join("::")}::#{name}" + return if first_entry.private? && first_entry.name != "#{@node_context.nesting.join("::")}::#{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/signature_help.rb b/lib/ruby_lsp/listeners/signature_help.rb index 413a79f024..5ed3429d6c 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.nesting.join("::")) 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 0000000000..5d0092da37 --- /dev/null +++ b/lib/ruby_lsp/node_context.rb @@ -0,0 +1,23 @@ +# 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 + # and its namespace nesting. + class NodeContext + extend T::Sig + + sig { returns(T.nilable(Prism::Node)) } + attr_reader :node, :parent + + sig { returns(T::Array[String]) } + attr_reader :nesting + + sig { params(node: T.nilable(Prism::Node), parent: T.nilable(Prism::Node), nesting: T::Array[String]).void } + def initialize(node, parent, nesting) + @node = node + @parent = parent + @nesting = nesting + end + end +end diff --git a/lib/ruby_lsp/requests/code_action_resolve.rb b/lib/ruby_lsp/requests/code_action_resolve.rb index 7998519b2f..dd3b38bb1b 100644 --- a/lib/ruby_lsp/requests/code_action_resolve.rb +++ b/lib/ruby_lsp/requests/code_action_resolve.rb @@ -68,9 +68,11 @@ def refactor_variable 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 @@ -162,10 +164,8 @@ def refactor_method 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 - closest_def, _ = T.cast( - @document.locate(@document.tree, start_index, node_types: [Prism::DefNode]), - [T.nilable(Prism::DefNode), T.nilable(Prism::Node), T::Array[String]], - ) + 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 diff --git a/lib/ruby_lsp/requests/completion.rb b/lib/ruby_lsp/requests/completion.rb index 61b649db9b..c895820cff 100644 --- a/lib/ruby_lsp/requests/completion.rb +++ b/lib/ruby_lsp/requests/completion.rb @@ -60,7 +60,7 @@ 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: [ @@ -83,16 +83,18 @@ 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 = if parent.is_a?(Prism::ConstantPathNode) && matched.is_a?(Prism::ConstantReadNode) diff --git a/lib/ruby_lsp/requests/definition.rb b/lib/ruby_lsp/requests/definition.rb index bb16b00002..b917fbbb49 100644 --- a/lib/ruby_lsp/requests/definition.rb +++ b/lib/ruby_lsp/requests/definition.rb @@ -47,7 +47,7 @@ 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, @@ -63,6 +63,9 @@ def initialize(document, global_state, position, dispatcher, typechecker_enabled ], ) + 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 @@ -83,13 +86,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 bec32dc991..c8efafe681 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 e75f2f804a..23291f21bf 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 20c70097cf..0831388f82 100644 --- a/lib/ruby_lsp/requests/on_type_formatting.rb +++ b/lib/ruby_lsp/requests/on_type_formatting.rb @@ -215,10 +215,11 @@ def auto_indent_after_end_keyword current_line = @lines[@position[:line]] 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 diff --git a/lib/ruby_lsp/requests/signature_help.rb b/lib/ruby_lsp/requests/signature_help.rb index f453e6e035..3c36950df1 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/test/ruby_document_test.rb b/test/ruby_document_test.rb index 4a4dfa4c37..0eecd141c1 100644 --- a/test/ruby_document_test.rb +++ b/test/ruby_document_test.rb @@ -433,27 +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) + 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, + ) # Locate the `Base` class - found, _parent = T.cast( - document.locate_node({ line: 0, character: 27 }), - [Prism::ConstantPathNode, Prism::ClassNode, T::Array[String]], - ) + 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_equal("where", T.must(found.message_loc).slice) + 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 @@ -473,13 +471,13 @@ 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) - 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: 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_correct_nesting_when_specifying_target_classes @@ -493,9 +491,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 From 1f0f3c20359e2d6154da4e1d9fe20598fda5d419 Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Fri, 31 May 2024 13:13:57 -0400 Subject: [PATCH 162/189] Introduce NodeContext#fully_qualified_name (#2107) --- lib/ruby_lsp/listeners/completion.rb | 8 ++++---- lib/ruby_lsp/listeners/definition.rb | 6 +++--- lib/ruby_lsp/listeners/hover.rb | 6 +++--- lib/ruby_lsp/listeners/signature_help.rb | 2 +- lib/ruby_lsp/node_context.rb | 5 +++++ 5 files changed, 16 insertions(+), 11 deletions(-) diff --git a/lib/ruby_lsp/listeners/completion.rb b/lib/ruby_lsp/listeners/completion.rb index 7703e15d16..f8a22c8098 100644 --- a/lib/ruby_lsp/listeners/completion.rb +++ b/lib/ruby_lsp/listeners/completion.rb @@ -192,7 +192,7 @@ def constant_path_completion(name, range) sig { params(name: String, location: Prism::Location).void } def handle_instance_variable_completion(name, location) - @index.instance_variable_completion_candidates(name, @node_context.nesting.join("::")).each do |entry| + @index.instance_variable_completion_candidates(name, @node_context.fully_qualified_name).each do |entry| variable_name = entry.name @response_builder << Interface::CompletionItem.new( @@ -258,7 +258,7 @@ def complete_require_relative(node) sig { params(node: Prism::CallNode, name: String).void } def complete_self_receiver_method(node, name) - receiver_entries = @index[@node_context.nesting.join("::")] + receiver_entries = @index[@node_context.fully_qualified_name] return unless receiver_entries receiver = T.must(receiver_entries.first) @@ -353,13 +353,13 @@ def build_entry_completion(real_name, incomplete_name, range, entries, top_level # Foo::B # --> completion inserts `Bar` instead of `Foo::Bar` # end nesting = @node_context.nesting - unless nesting.join("::").start_with?(incomplete_name) + 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 = "#{nesting.join("::")}::#{shortened_name}" + conflict_name = "#{@node_context.fully_qualified_name}::#{shortened_name}" break if real_name != conflict_name && @index[conflict_name] insertion_text = shortened_name diff --git a/lib/ruby_lsp/listeners/definition.rb b/lib/ruby_lsp/listeners/definition.rb index 76e2dbf1b5..ff54c90824 100644 --- a/lib/ruby_lsp/listeners/definition.rb +++ b/lib/ruby_lsp/listeners/definition.rb @@ -114,7 +114,7 @@ def on_instance_variable_target_node_enter(node) sig { params(name: String).void } def handle_instance_variable_definition(name) - entries = @index.resolve_instance_variable(name, @node_context.nesting.join("::")) + entries = @index.resolve_instance_variable(name, @node_context.fully_qualified_name) return unless entries entries.each do |entry| @@ -135,7 +135,7 @@ def handle_instance_variable_definition(name) sig { params(message: String, self_receiver: T::Boolean).void } def handle_method_definition(message, self_receiver) methods = if self_receiver - @index.resolve_method(message, @node_context.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 @@ -209,7 +209,7 @@ def find_in_index(value) # 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.private? && first_entry.name != "#{@node_context.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/hover.rb b/lib/ruby_lsp/listeners/hover.rb index 5205941301..2a9f3cae9a 100644 --- a/lib/ruby_lsp/listeners/hover.rb +++ b/lib/ruby_lsp/listeners/hover.rb @@ -105,7 +105,7 @@ def on_call_node_enter(node) message = node.message return unless message - methods = @index.resolve_method(message, @node_context.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| @@ -147,7 +147,7 @@ def on_instance_variable_target_node_enter(node) sig { params(name: String).void } def handle_instance_variable_hover(name) - entries = @index.resolve_instance_variable(name, @node_context.nesting.join("::")) + 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| @@ -165,7 +165,7 @@ def generate_hover(name, location) # 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.private? && first_entry.name != "#{@node_context.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/signature_help.rb b/lib/ruby_lsp/listeners/signature_help.rb index 5ed3429d6c..ceada7bdfa 100644 --- a/lib/ruby_lsp/listeners/signature_help.rb +++ b/lib/ruby_lsp/listeners/signature_help.rb @@ -33,7 +33,7 @@ def on_call_node_enter(node) message = node.message return unless message - methods = @index.resolve_method(message, @node_context.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 index 5d0092da37..b0bb1ee5c3 100644 --- a/lib/ruby_lsp/node_context.rb +++ b/lib/ruby_lsp/node_context.rb @@ -19,5 +19,10 @@ def initialize(node, parent, nesting) @parent = parent @nesting = nesting end + + sig { returns(String) } + def fully_qualified_name + @fully_qualified_name ||= T.let(@nesting.join("::"), T.nilable(String)) + end end end From 97ce82ff001d78ba94ad0a93403ad539fffaad31 Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Fri, 31 May 2024 18:52:12 +0100 Subject: [PATCH 163/189] Bump version to v0.17.0 --- Gemfile.lock | 2 +- VERSION | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 1e08626c4b..40af99e4f1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -9,7 +9,7 @@ GIT PATH remote: . specs: - ruby-lsp (0.16.8) + ruby-lsp (0.17.0) language_server-protocol (~> 3.17.0) prism (>= 0.29.0, < 0.30) sorbet-runtime (>= 0.5.10782) diff --git a/VERSION b/VERSION index 74aaa3f38c..c5523bd09b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.16.8 +0.17.0 From 84f4b66f2801cb3eaf08e0ad4a4dcbfc2e0c052f Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 31 May 2024 18:12:02 +0000 Subject: [PATCH 164/189] Bump version to v0.17.1 --- Gemfile.lock | 2 +- VERSION | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 40af99e4f1..b6e366efbf 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -9,7 +9,7 @@ GIT PATH remote: . specs: - ruby-lsp (0.17.0) + ruby-lsp (0.17.1) language_server-protocol (~> 3.17.0) prism (>= 0.29.0, < 0.30) sorbet-runtime (>= 0.5.10782) diff --git a/VERSION b/VERSION index c5523bd09b..7cca7711a0 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.17.0 +0.17.1 From cad8b88e24789249c650843e83f746e14eda2715 Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Fri, 31 May 2024 21:57:18 +0100 Subject: [PATCH 165/189] Fully initialize global state in tests by calling apply_options (#2117) As stated in this comment: https://github.com/Shopify/ruby-lsp/pull/1926#issuecomment-2056908023 A global state is not fully initialized without `apply_options` being called, which the current `with_server` test helper does not do. This means that when tests are being run, detections around things like test library are not performed, which can yield unexpected results to developers, especially addon authors. This commit changes the `with_server` test helper to call `apply_options`. --- lib/ruby_lsp/test_helper.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ruby_lsp/test_helper.rb b/lib/ruby_lsp/test_helper.rb index ccf4287217..d9cb5beedb 100644 --- a/lib/ruby_lsp/test_helper.rb +++ b/lib/ruby_lsp/test_helper.rb @@ -21,6 +21,7 @@ def with_server(source = nil, uri = Kernel.URI("file:///fake.rb"), stub_no_typec &block) server = RubyLsp::Server.new(test_mode: true) server.global_state.stubs(:typechecker).returns(false) if stub_no_typechecker + server.global_state.apply_options({}) if source server.process_message({ From 6f75cd88df92c54d6e8477ec16f81802a121ac37 Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 31 May 2024 21:14:53 +0000 Subject: [PATCH 166/189] Bump version to v0.17.2 --- Gemfile.lock | 2 +- VERSION | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index b6e366efbf..e008392482 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -9,7 +9,7 @@ GIT PATH remote: . specs: - ruby-lsp (0.17.1) + ruby-lsp (0.17.2) language_server-protocol (~> 3.17.0) prism (>= 0.29.0, < 0.30) sorbet-runtime (>= 0.5.10782) diff --git a/VERSION b/VERSION index 7cca7711a0..c3d16c1646 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.17.1 +0.17.2 From 1b04db376741dc9e1bf0dc120cffc22bd2a6b39b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 02:11:49 +0000 Subject: [PATCH 167/189] Bump the minor-and-patch group with 3 updates Bumps the minor-and-patch group with 3 updates: [rubocop](https://github.com/rubocop/rubocop), [sorbet-static-and-runtime](https://github.com/sorbet/sorbet) and [sorbet-runtime](https://github.com/sorbet/sorbet). Updates `rubocop` from 1.64.0 to 1.64.1 - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop/compare/v1.64.0...v1.64.1) Updates `sorbet-static-and-runtime` from 0.5.11391 to 0.5.11406 - [Release notes](https://github.com/sorbet/sorbet/releases) - [Commits](https://github.com/sorbet/sorbet/commits) Updates `sorbet-runtime` from 0.5.11391 to 0.5.11406 - [Release notes](https://github.com/sorbet/sorbet/releases) - [Commits](https://github.com/sorbet/sorbet/commits) --- updated-dependencies: - dependency-name: rubocop dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: sorbet-static-and-runtime dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: sorbet-runtime dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index e008392482..c4410ededa 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -41,7 +41,7 @@ GEM 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) @@ -59,7 +59,7 @@ GEM io-console (~> 0.5) rexml (3.2.8) strscan (>= 3.0.9) - rubocop (1.64.0) + rubocop (1.64.1) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) @@ -91,14 +91,14 @@ GEM simplecov_json_formatter (~> 0.1) simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) - sorbet (0.5.11391) - sorbet-static (= 0.5.11391) - sorbet-runtime (0.5.11391) - sorbet-static (0.5.11391-universal-darwin) - sorbet-static (0.5.11391-x86_64-linux) - sorbet-static-and-runtime (0.5.11391) - sorbet (= 0.5.11391) - sorbet-runtime (= 0.5.11391) + 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) @@ -126,8 +126,6 @@ GEM PLATFORMS arm64-darwin - x64-mingw-ucrt - x64-mingw32 x86_64-darwin x86_64-linux From c1d7093aca096f033d9014800be73f1f34244983 Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 3 Jun 2024 02:17:50 +0000 Subject: [PATCH 168/189] Update RBI files for gems 2024-06-03 [dependabot skip] --- ...{parser@3.3.1.0.rbi => parser@3.3.2.0.rbi} | 0 ...{rubocop@1.64.0.rbi => rubocop@1.64.1.rbi} | 180 +++++++++++------- 2 files changed, 115 insertions(+), 65 deletions(-) rename sorbet/rbi/gems/{parser@3.3.1.0.rbi => parser@3.3.2.0.rbi} (100%) rename sorbet/rbi/gems/{rubocop@1.64.0.rbi => rubocop@1.64.1.rbi} (99%) 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/rubocop@1.64.0.rbi b/sorbet/rbi/gems/rubocop@1.64.1.rbi similarity index 99% rename from sorbet/rbi/gems/rubocop@1.64.0.rbi rename to sorbet/rbi/gems/rubocop@1.64.1.rbi index 6af938aa23..c81c2c7e60 100644 --- a/sorbet/rbi/gems/rubocop@1.64.0.rbi +++ b/sorbet/rbi/gems/rubocop@1.64.1.rbi @@ -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. @@ -5535,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 @@ -16266,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. @@ -19171,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#80 +# 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#78 RuboCop::Cop::Lint::ErbNewArguments::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Looks for uses of flip-flop operator @@ -34243,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 @@ -34254,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] @@ -46007,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 `\`: @@ -46057,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) @@ -48461,26 +48486,32 @@ RuboCop::Cop::Style::Send::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Style::SendWithLiteralMethodName < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#48 + # 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#69 + # 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#73 + # 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#77 + # 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) @@ -49872,61 +49903,80 @@ RuboCop::Cop::Style::StructInheritance::MSG = T.let(T.unsafe(nil), String) # super() # end # -# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#29 +# # 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#36 + # 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#52 - def arguments_identical?(def_args, super_args); end + # 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#107 - def block_arg_same?(def_arg, super_arg); end + # 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#119 + # 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#115 + # 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#87 + # 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#97 + # 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#70 + # 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#77 + # 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#125 + # 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#32 +# 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#34 +# 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. @@ -52292,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] From e9384513d8db5dd6cf2bca3c4a0b3801859e316b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 02:28:48 +0000 Subject: [PATCH 169/189] Bump the minor-and-patch group in /vscode with 5 updates Bumps the minor-and-patch group in /vscode with 5 updates: | Package | From | To | | --- | --- | --- | | [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `20.12.12` | `20.14.0` | | [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) | `7.10.0` | `7.11.0` | | [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) | `7.10.0` | `7.11.0` | | [@vscode/test-electron](https://github.com/Microsoft/vscode-test) | `2.3.10` | `2.4.0` | | [prettier](https://github.com/prettier/prettier) | `3.2.5` | `3.3.0` | Updates `@types/node` from 20.12.12 to 20.14.0 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Updates `@typescript-eslint/eslint-plugin` from 7.10.0 to 7.11.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.11.0/packages/eslint-plugin) Updates `@typescript-eslint/parser` from 7.10.0 to 7.11.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.11.0/packages/parser) Updates `@vscode/test-electron` from 2.3.10 to 2.4.0 - [Changelog](https://github.com/microsoft/vscode-test/blob/main/CHANGELOG.md) - [Commits](https://github.com/Microsoft/vscode-test/compare/v2.3.10...v2.4.0) Updates `prettier` from 3.2.5 to 3.3.0 - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/3.2.5...3.3.0) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: "@typescript-eslint/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: "@typescript-eslint/parser" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: "@vscode/test-electron" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: prettier dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] --- vscode/package.json | 8 +- vscode/yarn.lock | 289 ++++++++++++++++++++++++++++---------------- 2 files changed, 190 insertions(+), 107 deletions(-) diff --git a/vscode/package.json b/vscode/package.json index dc882dee5d..6307d916f3 100644 --- a/vscode/package.json +++ b/vscode/package.json @@ -544,9 +544,9 @@ "@types/node": "20.x", "@types/sinon": "^17.0.3", "@types/vscode": "^1.68.0", - "@typescript-eslint/eslint-plugin": "^7.10.0", - "@typescript-eslint/parser": "^7.10.0", - "@vscode/test-electron": "^2.3.10", + "@typescript-eslint/eslint-plugin": "^7.11.0", + "@typescript-eslint/parser": "^7.11.0", + "@vscode/test-electron": "^2.4.0", "@vscode/vsce": "^2.26.1", "esbuild": "^0.21.4", "eslint": "^8.57.0", @@ -555,7 +555,7 @@ "glob": "^10.4.1", "mocha": "^10.4.0", "ovsx": "^0.9.1", - "prettier": "^3.2.5", + "prettier": "^3.3.0", "typescript": "^5.4.5", "sinon": "^18.0.0", "vscode-oniguruma": "^2.0.1", diff --git a/vscode/yarn.lock b/vscode/yarn.lock index 28ee8a1741..81813dbb4f 100644 --- a/vscode/yarn.lock +++ b/vscode/yarn.lock @@ -669,11 +669,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" @@ -698,9 +693,9 @@ integrity sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg== "@types/node@*", "@types/node@20.x": - version "20.12.12" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.12.tgz#7cbecdf902085cec634fdb362172dfe12b8f2050" - integrity sha512-eWLDGF/FOSPtAvEqeRAQ4C8LSA7M1I7i0ky1I8U7kD1J5ITyW3AsRhQrKVoWf5pFKZ2kILsEGJhsI9r93PYnOw== + version "20.14.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.14.0.tgz#49ceec7b34f8621470cff44677fa9d461a477f17" + integrity sha512-5cHBxFGJx6L4s56Bubp4fglrEpmyJypsqI6RgzMfBHWUJQGWAAi8cWcgetEbZXHYXo9C2Fa4EEds/uSyS4cxmA== dependencies: undici-types "~5.26.4" @@ -721,62 +716,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@^7.10.0", "@typescript-eslint/eslint-plugin@^7.9.0": - version "7.10.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.10.0.tgz#07854a236f107bb45cbf4f62b89474cbea617f50" - integrity sha512-PzCr+a/KAef5ZawX7nbyNwBDtM1HdLIT53aSA2DDlxmxMngZ43O8SIePOeX8H5S+FHXeI6t97mTt/dDdzY4Fyw== +"@typescript-eslint/eslint-plugin@^7.11.0", "@typescript-eslint/eslint-plugin@^7.9.0": + version "7.11.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.11.0.tgz#f90f0914657ead08e1c75f66939c926edeab42dd" + integrity sha512-P+qEahbgeHW4JQ/87FuItjBj8O3MYv5gELDzr8QaQ7fsll1gSMTYb6j87MYyxwf3DtD7uGFB9ShwgmCJB5KmaQ== dependencies: "@eslint-community/regexpp" "^4.10.0" - "@typescript-eslint/scope-manager" "7.10.0" - "@typescript-eslint/type-utils" "7.10.0" - "@typescript-eslint/utils" "7.10.0" - "@typescript-eslint/visitor-keys" "7.10.0" + "@typescript-eslint/scope-manager" "7.11.0" + "@typescript-eslint/type-utils" "7.11.0" + "@typescript-eslint/utils" "7.11.0" + "@typescript-eslint/visitor-keys" "7.11.0" graphemer "^1.4.0" ignore "^5.3.1" natural-compare "^1.4.0" ts-api-utils "^1.3.0" -"@typescript-eslint/parser@^7.10.0", "@typescript-eslint/parser@^7.9.0": - version "7.10.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.10.0.tgz#e6ac1cba7bc0400a4459e7eb5b23115bd71accfb" - integrity sha512-2EjZMA0LUW5V5tGQiaa2Gys+nKdfrn2xiTIBLR4fxmPmVSvgPcKNW+AE/ln9k0A4zDUti0J/GZXMDupQoI+e1w== +"@typescript-eslint/parser@^7.11.0", "@typescript-eslint/parser@^7.9.0": + version "7.11.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.11.0.tgz#525ad8bee54a8f015f134edd241d91b84ab64839" + integrity sha512-yimw99teuaXVWsBcPO1Ais02kwJ1jmNA1KxE7ng0aT7ndr1pT1wqj0OJnsYVGKKlc4QJai86l/025L6z8CljOg== dependencies: - "@typescript-eslint/scope-manager" "7.10.0" - "@typescript-eslint/types" "7.10.0" - "@typescript-eslint/typescript-estree" "7.10.0" - "@typescript-eslint/visitor-keys" "7.10.0" + "@typescript-eslint/scope-manager" "7.11.0" + "@typescript-eslint/types" "7.11.0" + "@typescript-eslint/typescript-estree" "7.11.0" + "@typescript-eslint/visitor-keys" "7.11.0" debug "^4.3.4" -"@typescript-eslint/scope-manager@7.10.0": - version "7.10.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.10.0.tgz#054a27b1090199337a39cf755f83d9f2ce26546b" - integrity sha512-7L01/K8W/VGl7noe2mgH0K7BE29Sq6KAbVmxurj8GGaPDZXPr8EEQ2seOeAS+mEV9DnzxBQB6ax6qQQ5C6P4xg== +"@typescript-eslint/scope-manager@7.11.0": + version "7.11.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.11.0.tgz#cf5619b01de62a226a59add15a02bde457335d1d" + integrity sha512-27tGdVEiutD4POirLZX4YzT180vevUURJl4wJGmm6TrQoiYwuxTIY98PBp6L2oN+JQxzE0URvYlzJaBHIekXAw== dependencies: - "@typescript-eslint/types" "7.10.0" - "@typescript-eslint/visitor-keys" "7.10.0" + "@typescript-eslint/types" "7.11.0" + "@typescript-eslint/visitor-keys" "7.11.0" -"@typescript-eslint/type-utils@7.10.0": - version "7.10.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.10.0.tgz#8a75accce851d0a331aa9331268ef64e9b300270" - integrity sha512-D7tS4WDkJWrVkuzgm90qYw9RdgBcrWmbbRkrLA4d7Pg3w0ttVGDsvYGV19SH8gPR5L7OtcN5J1hTtyenO9xE9g== +"@typescript-eslint/type-utils@7.11.0": + version "7.11.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.11.0.tgz#ac216697d649084fedf4a910347b9642bd0ff099" + integrity sha512-WmppUEgYy+y1NTseNMJ6mCFxt03/7jTOy08bcg7bxJJdsM4nuhnchyBbE8vryveaJUf62noH7LodPSo5Z0WUCg== dependencies: - "@typescript-eslint/typescript-estree" "7.10.0" - "@typescript-eslint/utils" "7.10.0" + "@typescript-eslint/typescript-estree" "7.11.0" + "@typescript-eslint/utils" "7.11.0" debug "^4.3.4" ts-api-utils "^1.3.0" -"@typescript-eslint/types@7.10.0": - version "7.10.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.10.0.tgz#da92309c97932a3a033762fd5faa8b067de84e3b" - integrity sha512-7fNj+Ya35aNyhuqrA1E/VayQX9Elwr8NKZ4WueClR3KwJ7Xx9jcCdOrLW04h51de/+gNbyFMs+IDxh5xIwfbNg== +"@typescript-eslint/types@7.11.0": + version "7.11.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.11.0.tgz#5e9702a5e8b424b7fc690e338d359939257d6722" + integrity sha512-MPEsDRZTyCiXkD4vd3zywDCifi7tatc4K37KqTprCvaXptP7Xlpdw0NR2hRJTetG5TxbWDB79Ys4kLmHliEo/w== -"@typescript-eslint/typescript-estree@7.10.0": - version "7.10.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.10.0.tgz#6dcdc5de3149916a6a599fa89dde5c471b88b8bb" - integrity sha512-LXFnQJjL9XIcxeVfqmNj60YhatpRLt6UhdlFwAkjNc6jSUlK8zQOl1oktAP8PlWFzPQC1jny/8Bai3/HPuvN5g== +"@typescript-eslint/typescript-estree@7.11.0": + version "7.11.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.11.0.tgz#7cbc569bc7336c3a494ceaf8204fdee5d5dbb7fa" + integrity sha512-cxkhZ2C/iyi3/6U9EPc5y+a6csqHItndvN/CzbNXTNrsC3/ASoYQZEt9uMaEp+xFNjasqQyszp5TumAVKKvJeQ== dependencies: - "@typescript-eslint/types" "7.10.0" - "@typescript-eslint/visitor-keys" "7.10.0" + "@typescript-eslint/types" "7.11.0" + "@typescript-eslint/visitor-keys" "7.11.0" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" @@ -784,22 +779,22 @@ semver "^7.6.0" ts-api-utils "^1.3.0" -"@typescript-eslint/utils@7.10.0", "@typescript-eslint/utils@^6.0.0 || ^7.0.0": - version "7.10.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.10.0.tgz#8ee43e5608c9f439524eaaea8de5b358b15c51b3" - integrity sha512-olzif1Fuo8R8m/qKkzJqT7qwy16CzPRWBvERS0uvyc+DHd8AKbO4Jb7kpAvVzMmZm8TrHnI7hvjN4I05zow+tg== +"@typescript-eslint/utils@7.11.0", "@typescript-eslint/utils@^6.0.0 || ^7.0.0": + version "7.11.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.11.0.tgz#524f047f2209959424c3ef689b0d83b3bc09919c" + integrity sha512-xlAWwPleNRHwF37AhrZurOxA1wyXowW4PqVXZVUNCLjB48CqdPJoJWkrpH2nij9Q3Lb7rtWindtoXwxjxlKKCA== dependencies: "@eslint-community/eslint-utils" "^4.4.0" - "@typescript-eslint/scope-manager" "7.10.0" - "@typescript-eslint/types" "7.10.0" - "@typescript-eslint/typescript-estree" "7.10.0" + "@typescript-eslint/scope-manager" "7.11.0" + "@typescript-eslint/types" "7.11.0" + "@typescript-eslint/typescript-estree" "7.11.0" -"@typescript-eslint/visitor-keys@7.10.0": - version "7.10.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.10.0.tgz#2af2e91e73a75dd6b70b4486c48ae9d38a485a78" - integrity sha512-9ntIVgsi6gg6FIq9xjEO4VQJvwOqA3jaBFQJ/6TK5AvEup2+cECI6Fh7QiBxmfMHXU0V0J4RyPeOU1VDNzl9cg== +"@typescript-eslint/visitor-keys@7.11.0": + version "7.11.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.11.0.tgz#2c50cd292e67645eec05ac0830757071b4a4d597" + integrity sha512-7syYk4MzjxTEk0g/w3iqtgxnFQspDJfn6QKD36xMuuhTzjcxY7F8EmBLnALjVyaOF1/bVocu3bS/2/F7rXrveQ== dependencies: - "@typescript-eslint/types" "7.10.0" + "@typescript-eslint/types" "7.11.0" eslint-visitor-keys "^3.4.3" "@ungap/structured-clone@^1.2.0": @@ -807,15 +802,16 @@ 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.10": - version "2.3.10" - resolved "https://registry.yarnpkg.com/@vscode/test-electron/-/test-electron-2.3.10.tgz#c63e2437ec4d65ff56c7cfcb4dfceb0e883ef473" - integrity sha512-FxMqrvUm6a8S5tP4CymNJ40e6kD+wUTWTc6K32U629yrCCa+kl/rmpkC2gKpN4F4zjg1r+0Hnk9sl0+N2atsYA== +"@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@^2.25.0", "@vscode/vsce@^2.26.1": version "2.26.1" @@ -858,13 +854,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" @@ -1117,6 +1106,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" @@ -1177,6 +1175,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" @@ -1237,6 +1243,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" @@ -1305,6 +1316,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" @@ -1613,6 +1636,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" @@ -2568,16 +2596,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== @@ -2585,15 +2604,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== @@ -2601,7 +2612,7 @@ 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== @@ -2762,6 +2773,11 @@ 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" @@ -2840,6 +2856,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" @@ -3140,6 +3161,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" @@ -3219,6 +3248,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" @@ -3459,6 +3493,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" @@ -3480,6 +3521,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" @@ -3665,10 +3721,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.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.3.0.tgz#d173ea0524a691d4c0b1181752f2b46724328cdf" + integrity sha512-J9odKxERhCQ10OC2yb93583f6UnYutOeiV5i0zEDS7UGTdUt0u+y8erxl3lBKvwo/JHyyoEdXjwp4dke9oyZ/g== process-nextick-args@~2.0.0: version "2.0.1" @@ -3833,6 +3889,14 @@ resolve@^2.0.0-next.5: 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" @@ -3906,12 +3970,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" @@ -3988,6 +4050,11 @@ side-channel@^1.0.6: 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" @@ -4032,6 +4099,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" @@ -4064,6 +4138,15 @@ string-width@^5.0.1, string-width@^5.1.2: emoji-regex "^9.2.2" strip-ansi "^7.0.1" +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: + 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" @@ -4165,7 +4248,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== From 2560b9f2ccda21faadd7468ba7f5e8862eacb9ba Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 02:41:10 +0000 Subject: [PATCH 170/189] Bump test/fixtures/prism from `b6aa0f2` to `a4e164e` Bumps [test/fixtures/prism](https://github.com/ruby/prism) from `b6aa0f2` to `a4e164e`. - [Release notes](https://github.com/ruby/prism/releases) - [Commits](https://github.com/ruby/prism/compare/b6aa0f22be2fddef68cb8c635d090591133e3260...a4e164e22bf4d89701c112fbc4342f1ae41d7421) --- updated-dependencies: - dependency-name: test/fixtures/prism dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- test/fixtures/prism | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/fixtures/prism b/test/fixtures/prism index b6aa0f22be..a4e164e22b 160000 --- a/test/fixtures/prism +++ b/test/fixtures/prism @@ -1 +1 @@ -Subproject commit b6aa0f22be2fddef68cb8c635d090591133e3260 +Subproject commit a4e164e22bf4d89701c112fbc4342f1ae41d7421 From 057ee58240e179caa872a23dd7aa23883a4bc5d0 Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Mon, 3 Jun 2024 08:52:42 -0400 Subject: [PATCH 171/189] Restore Windows platforms --- Gemfile.lock | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Gemfile.lock b/Gemfile.lock index c4410ededa..f7ba4e438e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -126,6 +126,8 @@ GEM PLATFORMS arm64-darwin + x64-mingw-ucrt + x64-mingw32 x86_64-darwin x86_64-linux From 28978dc425b41af4ce6790cace50a3f0a5fa320c Mon Sep 17 00:00:00 2001 From: Earlopain <14981592+Earlopain@users.noreply.github.com> Date: Mon, 3 Jun 2024 22:06:02 +0200 Subject: [PATCH 172/189] Show doc urls for extension cops (#2076) RuboCop 1.64 added support for passing in a config, which will then construct the correct url for non-buildin departments that have `DocumentationBaseURL` set. --- .../requests/support/rubocop_diagnostic.rb | 29 +++-- .../requests/support/rubocop_formatter.rb | 6 +- .../requests/support/rubocop_runner.rb | 4 + .../rubocop_extension_cop.exp.json | 100 ++++++++++++++++++ test/fixtures/rubocop_extension_cop.rb | 8 ++ 5 files changed, 140 insertions(+), 7 deletions(-) create mode 100644 test/expectations/diagnostics/rubocop_extension_cop.exp.json create mode 100644 test/fixtures/rubocop_extension_cop.rb diff --git a/lib/ruby_lsp/requests/support/rubocop_diagnostic.rb b/lib/ruby_lsp/requests/support/rubocop_diagnostic.rb index 12a7a515e6..f5a81de270 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 } @@ -38,8 +48,8 @@ def to_lsp_code_actions 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( @@ -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 diff --git a/lib/ruby_lsp/requests/support/rubocop_formatter.rb b/lib/ruby_lsp/requests/support/rubocop_formatter.rb index d11355f6a4..62454c2f09 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 53001d3a1a..bdac24dab2 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/test/expectations/diagnostics/rubocop_extension_cop.exp.json b/test/expectations/diagnostics/rubocop_extension_cop.exp.json new file mode 100644 index 0000000000..8e0900cda6 --- /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/fixtures/rubocop_extension_cop.rb b/test/fixtures/rubocop_extension_cop.rb new file mode 100644 index 0000000000..fd23103f2e --- /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 From 4053fc633ea9e9b5d6e6c39296472899e41aa94f Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Tue, 4 Jun 2024 11:55:42 -0400 Subject: [PATCH 173/189] Better clarify multi-root workspace documentation (#2125) --- vscode/README.md | 113 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 104 insertions(+), 9 deletions(-) diff --git a/vscode/README.md b/vscode/README.md index 993bcc1015..9316a6c6cf 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 From 78fbf07a8c4c7ad54a35ac507b8f2dd39fcd6b98 Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Tue, 4 Jun 2024 13:27:28 -0400 Subject: [PATCH 174/189] Run labels check only after PR approval (#2123) --- .github/workflows/require_labels.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/require_labels.yml b/.github/workflows/require_labels.yml index bf115962c8..f09010a5d3 100644 --- a/.github/workflows/require_labels.yml +++ b/.github/workflows/require_labels.yml @@ -1,11 +1,12 @@ name: Pull Request Labels on: - pull_request: - types: [opened, synchronize, reopened, labeled, unlabeled] + pull_request_review: + types: [submitted] jobs: check-labels: + if: github.event.review.state == 'APPROVED' runs-on: ubuntu-latest env: GH_TOKEN: ${{ github.token }} From a652b670612be5898fc1786d555399ffd1e15a2c Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Tue, 4 Jun 2024 16:13:10 -0400 Subject: [PATCH 175/189] Ensure default gems are part of the document selector (#2127) * Ensure default gems are part of the document selector * Elaborate on test description Co-authored-by: Andy Waite --------- Co-authored-by: Andy Waite --- vscode/src/client.ts | 12 +++++++++++- vscode/src/test/suite/client.test.ts | 21 +++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/vscode/src/client.ts b/vscode/src/client.ts index 4cd8a73f41..2e18a5134e 100644 --- a/vscode/src/client.ts +++ b/vscode/src/client.ts @@ -112,13 +112,23 @@ function collectClientOptions( }, ]; + // 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}/**/*`, + pattern: `${gemPath.replace(/lib\/ruby\/gems\/(?=\d)/, "lib/ruby/")}/**/*`, }); }); } diff --git a/vscode/src/test/suite/client.test.ts b/vscode/src/test/suite/client.test.ts index a06a4bd9b2..f79df68898 100644 --- a/vscode/src/test/suite/client.test.ts +++ b/vscode/src/test/suite/client.test.ts @@ -21,6 +21,7 @@ import { TextEdit, SelectionRange, CodeAction, + TextDocumentFilter, } from "vscode-languageclient/node"; import { after, afterEach, before } from "mocha"; @@ -665,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\/\*\*\/\*/, + ); + }); }); From ef7cd561b00b4bc58851a400c13865b392cf5193 Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Tue, 4 Jun 2024 17:01:47 -0400 Subject: [PATCH 176/189] Fix duplicate nesting when targetting classes/modules (#2128) --- lib/ruby_lsp/document.rb | 13 +++++++++++++ test/ruby_document_test.rb | 18 ++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/lib/ruby_lsp/document.rb b/lib/ruby_lsp/document.rb index 92cbe4d62c..375740547e 100644 --- a/lib/ruby_lsp/document.rb +++ b/lib/ruby_lsp/document.rb @@ -170,6 +170,19 @@ def locate(node, char_position, node_types: []) end end + # 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.last + nesting.pop if last_level && last_level.constant_path == closest + end + NodeContext.new(closest, parent, nesting.map { |n| n.constant_path.location.slice }) end diff --git a/test/ruby_document_test.rb b/test/ruby_document_test.rb index 0eecd141c1..cadd4d41f4 100644 --- a/test/ruby_document_test.rb +++ b/test/ruby_document_test.rb @@ -593,6 +593,24 @@ 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 + private def assert_error_edit(actual, error_range) From 467e0d95cb7ef1cd1c237df05fa0275ddcb7c115 Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Wed, 5 Jun 2024 12:24:04 -0400 Subject: [PATCH 177/189] Handle unsaved files in main language server client (#2124) --- vscode/src/client.ts | 16 +++++++++++++++- vscode/src/rubyLsp.ts | 1 + vscode/src/workspace.ts | 4 ++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/vscode/src/client.ts b/vscode/src/client.ts index 2e18a5134e..d296860435 100644 --- a/vscode/src/client.ts +++ b/vscode/src/client.ts @@ -12,6 +12,7 @@ import { ExecutableOptions, ServerOptions, MessageSignature, + DocumentSelector, } from "vscode-languageclient/node"; import { LSP_NAME, ClientInterface } from "./common"; @@ -92,6 +93,7 @@ function collectClientOptions( workspaceFolder: vscode.WorkspaceFolder, outputChannel: WorkspaceChannel, ruby: Ruby, + isMainWorkspace: boolean, ): LanguageClientOptions { const pullOn: "change" | "save" | "both" = configuration.get("pullDiagnosticsOn")!; @@ -105,17 +107,27 @@ function collectClientOptions( const enabledFeatures = Object.keys(features).filter((key) => features[key]); const fsPath = workspaceFolder.uri.fsPath.replace(/\/$/, ""); - const documentSelector = [ + 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); @@ -171,6 +183,7 @@ export default class Client extends LanguageClient implements ClientInterface { createTestItems: (response: CodeLens[]) => void, workspaceFolder: vscode.WorkspaceFolder, outputChannel: WorkspaceChannel, + isMainWorkspace = false, ) { super( LSP_NAME, @@ -180,6 +193,7 @@ export default class Client extends LanguageClient implements ClientInterface { workspaceFolder, outputChannel, ruby, + isMainWorkspace, ), ); diff --git a/vscode/src/rubyLsp.ts b/vscode/src/rubyLsp.ts index d64fa5f5e8..38e3a9cc2d 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); diff --git a/vscode/src/workspace.ts b/vscode/src/workspace.ts index 458d351a09..9fe319b167 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); @@ -102,6 +105,7 @@ export class Workspace implements WorkspaceInterface { this.createTestItems, this.workspaceFolder, this.outputChannel, + this.isMainWorkspace, ); try { From 2dc2ea14203520f2061d70d3d0abec1650b56e10 Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Wed, 5 Jun 2024 12:32:39 -0400 Subject: [PATCH 178/189] Bump extension version to v0.7.2 --- vscode/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vscode/package.json b/vscode/package.json index 6307d916f3..24991aca36 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.7.1", + "version": "0.7.2", "publisher": "Shopify", "repository": { "type": "git", From 852b629f882a27fe0f51bbd380739503c68abbbf Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Wed, 5 Jun 2024 12:42:14 -0400 Subject: [PATCH 179/189] Exclude dependencies from workspace symbols (#2131) --- lib/ruby_lsp/requests/workspace_symbol.rb | 7 ++++--- lib/ruby_lsp/server.rb | 2 +- test/requests/workspace_symbol_test.rb | 24 ++--------------------- 3 files changed, 7 insertions(+), 26 deletions(-) diff --git a/lib/ruby_lsp/requests/workspace_symbol.rb b/lib/ruby_lsp/requests/workspace_symbol.rb index 3c78f57963..f0a198c110 100644 --- a/lib/ruby_lsp/requests/workspace_symbol.rb +++ b/lib/ruby_lsp/requests/workspace_symbol.rb @@ -33,10 +33,11 @@ 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.private? diff --git a/lib/ruby_lsp/server.rb b/lib/ruby_lsp/server.rb index ee2668aea4..858595ea36 100644 --- a/lib/ruby_lsp/server.rb +++ b/lib/ruby_lsp/server.rb @@ -175,7 +175,7 @@ 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.typechecker, signature_help_provider: signature_help_provider, ), serverInfo: { diff --git a/test/requests/workspace_symbol_test.rb b/test/requests/workspace_symbol_test.rb index 7553f83348..7bf1af521d 100644 --- a/test/requests/workspace_symbol_test.rb +++ b/test/requests/workspace_symbol_test.rb @@ -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 From 840277f3123a75151ef6bcc0fa44d7f3e0a82847 Mon Sep 17 00:00:00 2001 From: Andy Waite <13400+andyw8@users.noreply.github.com> Date: Wed, 5 Jun 2024 12:55:03 -0400 Subject: [PATCH 180/189] Add CallNode field to NodeContext --- lib/ruby_lsp/document.rb | 12 +++++- lib/ruby_lsp/listeners/definition.rb | 38 +++++++++-------- lib/ruby_lsp/listeners/hover.rb | 2 + lib/ruby_lsp/node_context.rb | 19 +++++++-- lib/ruby_lsp/requests/definition.rb | 5 +++ test/ruby_document_test.rb | 61 ++++++++++++++++++++++++++++ 6 files changed, 114 insertions(+), 23 deletions(-) diff --git a/lib/ruby_lsp/document.rb b/lib/ruby_lsp/document.rb index 375740547e..573175fb12 100644 --- a/lib/ruby_lsp/document.rb +++ b/lib/ruby_lsp/document.rb @@ -128,6 +128,7 @@ def locate(node, char_position, node_types: []) closest = node parent = T.let(nil, T.nilable(Prism::Node)) nesting = T.let([], T::Array[T.any(Prism::ClassNode, Prism::ModuleNode)]) + call_node = T.let(nil, T.nilable(Prism::CallNode)) until queue.empty? candidate = queue.shift @@ -159,6 +160,15 @@ def locate(node, char_position, node_types: []) nesting << 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 next if node_types.any? && node_types.none? { |type| candidate.class == type } @@ -183,7 +193,7 @@ def locate(node, char_position, node_types: []) nesting.pop if last_level && last_level.constant_path == closest end - NodeContext.new(closest, parent, nesting.map { |n| n.constant_path.location.slice }) + NodeContext.new(closest, parent, nesting.map { |n| n.constant_path.location.slice }, call_node) end sig { returns(T::Boolean) } diff --git a/lib/ruby_lsp/listeners/definition.rb b/lib/ruby_lsp/listeners/definition.rb index ff54c90824..8dbad2ec7e 100644 --- a/lib/ruby_lsp/listeners/definition.rb +++ b/lib/ruby_lsp/listeners/definition.rb @@ -39,18 +39,27 @@ def initialize(response_builder, global_state, uri, node_context, dispatcher, ty :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) - 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 } @@ -159,19 +168,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 @@ -186,7 +188,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)) diff --git a/lib/ruby_lsp/listeners/hover.rb b/lib/ruby_lsp/listeners/hover.rb index 2a9f3cae9a..7bd5ded9aa 100644 --- a/lib/ruby_lsp/listeners/hover.rb +++ b/lib/ruby_lsp/listeners/hover.rb @@ -19,6 +19,8 @@ class Hover Prism::InstanceVariableOrWriteNode, Prism::InstanceVariableTargetNode, Prism::InstanceVariableWriteNode, + Prism::SymbolNode, + Prism::StringNode, ], T::Array[T.class_of(Prism::Node)], ) diff --git a/lib/ruby_lsp/node_context.rb b/lib/ruby_lsp/node_context.rb index b0bb1ee5c3..a670418743 100644 --- a/lib/ruby_lsp/node_context.rb +++ b/lib/ruby_lsp/node_context.rb @@ -2,8 +2,8 @@ # frozen_string_literal: true module RubyLsp - # This class allows listeners to access contextual information about a node in the AST, such as its parent - # and its namespace nesting. + # 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 @@ -13,11 +13,22 @@ class NodeContext sig { returns(T::Array[String]) } attr_reader :nesting - sig { params(node: T.nilable(Prism::Node), parent: T.nilable(Prism::Node), nesting: T::Array[String]).void } - def initialize(node, parent, nesting) + sig { returns(T.nilable(Prism::CallNode)) } + attr_reader :call_node + + sig do + params( + node: T.nilable(Prism::Node), + parent: T.nilable(Prism::Node), + nesting: T::Array[String], + call_node: T.nilable(Prism::CallNode), + ).void + end + def initialize(node, parent, nesting, call_node) @node = node @parent = parent @nesting = nesting + @call_node = call_node end sig { returns(String) } diff --git a/lib/ruby_lsp/requests/definition.rb b/lib/ruby_lsp/requests/definition.rb index b917fbbb49..f30bd3bb70 100644 --- a/lib/ruby_lsp/requests/definition.rb +++ b/lib/ruby_lsp/requests/definition.rb @@ -60,6 +60,8 @@ def initialize(document, global_state, position, dispatcher, typechecker_enabled Prism::InstanceVariableOrWriteNode, Prism::InstanceVariableTargetNode, Prism::InstanceVariableWriteNode, + Prism::SymbolNode, + Prism::StringNode, ], ) @@ -79,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 diff --git a/test/ruby_document_test.rb b/test/ruby_document_test.rb index cadd4d41f4..82736382ac 100644 --- a/test/ruby_document_test.rb +++ b/test/ruby_document_test.rb @@ -480,6 +480,67 @@ def baz 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) + + 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 document = RubyLsp::RubyDocument.new(source: <<~RUBY, version: 1, uri: URI("file:///foo/bar.rb")) module Foo From b72ac025515fd4b05e4ef3dbef3ceef5a9b11d8c Mon Sep 17 00:00:00 2001 From: Niki Jiandani Date: Thu, 18 Apr 2024 10:45:11 -0400 Subject: [PATCH 181/189] Add support for method aliases Co-authored-by: Vinicius Stock --- .../lib/ruby_indexer/declaration_listener.rb | 54 +++++++++++++++++++ lib/ruby_indexer/lib/ruby_indexer/entry.rb | 28 ++++++++++ lib/ruby_indexer/test/method_test.rb | 20 +++++++ lib/ruby_indexer/test/test_case.rb | 1 + 4 files changed, 103 insertions(+) diff --git a/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb b/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb index fa503cdde9..459e5ab7b7 100644 --- a/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb +++ b/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb @@ -52,6 +52,7 @@ def initialize(index, dispatcher, parse_result, file_path) :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 @@ -209,6 +210,8 @@ def on_call_node_enter(node) handle_attribute(node, reader: false, writer: true) when :attr_accessor handle_attribute(node, reader: true, writer: true) + when :alias_method + handle_alias_method(node) when :include, :prepend, :extend handle_module_operation(node, message) when :public @@ -338,6 +341,20 @@ def on_instance_variable_target_node_enter(node) ) 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 << Entry::UnresolvedMethodAlias.new( + method_name, + node.old_name.slice, + @owner_stack.last, + @file_path, + node.new_name.location, + comments, + ) + end + private sig { params(node: Prism::CallNode).void } @@ -365,6 +382,43 @@ def handle_private_constant(node) 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 << Entry::UnresolvedMethodAlias.new( + new_name_value, + old_name_value, + @owner_stack.last, + @file_path, + new_name.location, + comments, + ) + end + sig do params( node: T.any( diff --git a/lib/ruby_indexer/lib/ruby_indexer/entry.rb b/lib/ruby_indexer/lib/ruby_indexer/entry.rb index 5a3ace7f3c..8ae271712b 100644 --- a/lib/ruby_indexer/lib/ruby_indexer/entry.rb +++ b/lib/ruby_indexer/lib/ruby_indexer/entry.rb @@ -469,5 +469,33 @@ def initialize(name, file_path, location, comments, owner) @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/test/method_test.rb b/lib/ruby_indexer/test/method_test.rb index 4565bcb2aa..852924cc95 100644 --- a/lib/ruby_indexer/test/method_test.rb +++ b/lib/ruby_indexer/test/method_test.rb @@ -378,5 +378,25 @@ def third; end entry = T.must(@index["third"]&.first) 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) + end end end diff --git a/lib/ruby_indexer/test/test_case.rb b/lib/ruby_indexer/test/test_case.rb index 61708495d1..aa4ee4ba26 100644 --- a/lib/ruby_indexer/test/test_case.rb +++ b/lib/ruby_indexer/test/test_case.rb @@ -17,6 +17,7 @@ def index(source) 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 From cc872ed5217fbae10aa9926cf9c45f489938c035 Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Thu, 6 Jun 2024 08:17:06 -0400 Subject: [PATCH 182/189] Fix test escaping on Windows (#2109) * Fix test escaping for Windows * Update expectations --- lib/ruby_lsp/listeners/code_lens.rb | 4 +- ...nitest_nested_classes_and_modules.exp.json | 58 +++++++++---------- .../code_lens/minitest_tests.exp.json | 46 +++++++-------- ...nitest_with_dynamic_constant_path.exp.json | 34 +++++------ .../code_lens/nested_minitest_tests.exp.json | 28 +++++---- test/requests/code_lens_expectations_test.rb | 2 +- 6 files changed, 82 insertions(+), 90 deletions(-) diff --git a/lib/ruby_lsp/listeners/code_lens.rb b/lib/ruby_lsp/listeners/code_lens.rb index 3f9cec9acc..fac7c120ca 100644 --- a/lib/ruby_lsp/listeners/code_lens.rb +++ b/lib/ruby_lsp/listeners/code_lens.rb @@ -236,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 @@ -245,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/test/expectations/code_lens/minitest_nested_classes_and_modules.exp.json b/test/expectations/code_lens/minitest_nested_classes_and_modules.exp.json index e97136bca8..2714b2d8e2 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 5922eca1bd..cf2d7e76aa 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 05e3856d81..41d85ac1be 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 0bd0a4ba78..00d7b1cc9b 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/requests/code_lens_expectations_test.rb b/test/requests/code_lens_expectations_test.rb index 198f40936a..7872348a72 100644 --- a/test/requests/code_lens_expectations_test.rb +++ b/test/requests/code_lens_expectations_test.rb @@ -47,7 +47,7 @@ def test_bar; end ) assert_equal("Run In Terminal", T.must(response[4]).command.title) assert_equal( - "bundle exec ruby -Itest /fake.rb --name FooTest\\#test_bar", + "bundle exec ruby -Itest /fake.rb --name FooTest#test_bar", T.must(response[4]).command.arguments[2], ) end From a3c7707d462991deeff6126a0c9d0a8903350ea8 Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Thu, 6 Jun 2024 10:57:14 -0400 Subject: [PATCH 183/189] Add link to VS Code extension README (#2138) --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index d403e2d291..571f22613f 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,8 @@ 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, which current includes Emacs, Neovim, Sublime Text, and Zed. From 385641dcd431a3ee46dbca83ff412b61b8b40493 Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Thu, 6 Jun 2024 15:00:57 -0400 Subject: [PATCH 184/189] Run label check when a label is added/removed (#2140) --- .github/workflows/require_labels.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/require_labels.yml b/.github/workflows/require_labels.yml index f09010a5d3..f20e1c41e6 100644 --- a/.github/workflows/require_labels.yml +++ b/.github/workflows/require_labels.yml @@ -3,6 +3,8 @@ name: Pull Request Labels on: pull_request_review: types: [submitted] + pull_request: + types: [labeled, unlabeled] jobs: check-labels: From 726225fe885da0930e1effb88fc0a603259e49cc Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Thu, 6 Jun 2024 15:49:18 -0400 Subject: [PATCH 185/189] Add Homebrew note for ASDF (#2141) --- VERSION_MANAGERS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/VERSION_MANAGERS.md b/VERSION_MANAGERS.md index 5cba1927d6..5aa07c6fe0 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 update asdf`. ## Chruby From 1a4f9ca5e18816a8557525910dfe6fcd5ead9227 Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Thu, 6 Jun 2024 16:41:09 -0400 Subject: [PATCH 186/189] Document custom gem installation directories (#2139) --- TROUBLESHOOTING.md | 44 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/TROUBLESHOOTING.md b/TROUBLESHOOTING.md index 83a1c789bd..fc2c9700de 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). From b7510fce44717e64f90c35549ddfd0a86af20854 Mon Sep 17 00:00:00 2001 From: Simon Brazell Date: Fri, 7 Jun 2024 23:42:44 +1000 Subject: [PATCH 187/189] Add `case` statement to VS Code snippets (#2129) * Add `case` statement to VScode snippets * Re-run checks * Change indents to spaces instead if tabs * Run `yarn run format` from the vscode folder --- vscode/snippets.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/vscode/snippets.json b/vscode/snippets.json index b890804e59..3b1f9e9a3e 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." } } From b97c5163de3822b5f574b785de4ecdad63030a2c Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Fri, 7 Jun 2024 11:40:00 -0400 Subject: [PATCH 188/189] Continue searching if directory is missing for omitted chruby patch version (#2143) --- vscode/src/ruby/chruby.ts | 21 ++++++++++++++---- vscode/src/test/suite/ruby/chruby.test.ts | 27 +++++++++++++++++++++++ 2 files changed, 44 insertions(+), 4 deletions(-) diff --git a/vscode/src/ruby/chruby.ts b/vscode/src/ruby/chruby.ts index b2248401b4..4d94c3e71a 100644 --- a/vscode/src/ruby/chruby.ts +++ b/vscode/src/ruby/chruby.ts @@ -19,8 +19,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( @@ -91,9 +91,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]) => @@ -132,6 +142,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`, + ); } } } diff --git a/vscode/src/test/suite/ruby/chruby.test.ts b/vscode/src/test/suite/ruby/chruby.test.ts index 80d7df5049..5b37d51d99 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); + }); }); From 53cf57aa5129a4fad42cafb7932c648c2c3a3442 Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Fri, 7 Jun 2024 12:03:22 -0400 Subject: [PATCH 189/189] Standardize version manager script execution (#2133) * Standardize version manager script execution * Bump extension version to v0.7.3 --- vscode/package.json | 2 +- vscode/src/ruby/asdf.ts | 9 +-------- vscode/src/ruby/chruby.ts | 4 +--- vscode/src/ruby/custom.ts | 7 +------ vscode/src/ruby/mise.ts | 7 +------ vscode/src/ruby/none.ts | 6 +----- vscode/src/ruby/rbenv.ts | 7 +------ vscode/src/ruby/rvm.ts | 8 +------- vscode/src/ruby/shadowenv.ts | 5 +---- vscode/src/ruby/versionManager.ts | 21 +++++++++++++++++++++ vscode/src/test/suite/ruby/custom.test.ts | 7 ++++++- vscode/src/test/suite/ruby/mise.test.ts | 14 ++++++++++++-- vscode/src/test/suite/ruby/none.test.ts | 7 ++++++- vscode/src/test/suite/ruby/rbenv.test.ts | 14 ++++++++++++-- vscode/src/test/suite/ruby/rvm.test.ts | 6 +++++- 15 files changed, 71 insertions(+), 53 deletions(-) diff --git a/vscode/package.json b/vscode/package.json index 24991aca36..8c8b0d1506 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.7.2", + "version": "0.7.3", "publisher": "Shopify", "repository": { "type": "git", diff --git a/vscode/src/ruby/asdf.ts b/vscode/src/ruby/asdf.ts index e303f5af61..86a3ae1e25 100644 --- a/vscode/src/ruby/asdf.ts +++ b/vscode/src/ruby/asdf.ts @@ -5,8 +5,6 @@ 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 @@ -18,13 +16,8 @@ export class Asdf 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( `. ${asdfUri.fsPath} && asdf exec ruby -W0 -rjson -e '${activationScript}'`, - { - cwd: this.bundleUri.fsPath, - shell: vscode.env.shell, - env: process.env, - }, ); const parsedResult = this.parseWithErrorHandling(result.stderr); diff --git a/vscode/src/ruby/chruby.ts b/vscode/src/ruby/chruby.ts index 4d94c3e71a..e36bed5d4f 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"; @@ -224,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 f81b420469..866cfea084 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 c9a142a0b6..c73e668dcf 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 729ec6b3e6..a2d0e3f14e 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 8b5ae160ab..82fc257973 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/rvm.ts b/vscode/src/ruby/rvm.ts index 220fd83988..a897176401 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 d9224aabf3..5038a7fa68 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 8a8d6b392a..719b176787 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/test/suite/ruby/custom.test.ts b/vscode/src/test/suite/ruby/custom.test.ts index 83935f14ff..8bafdf7db5 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 0283c0f8a9..273132e278 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 972413170a..416a58e1d1 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 51d4c0adee..91e29d36e6 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 b5a712a103..54f41a502f 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, + }, ), );