diff --git a/.ruby-version b/.ruby-version index a0891f5..fa7adc7 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.3.4 +3.3.5 diff --git a/Gemfile.lock b/Gemfile.lock index b58a8b2..aa16055 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -9,7 +9,7 @@ PATH GEM remote: https://rubygems.org/ specs: - activesupport (7.2.1) + activesupport (7.2.1.2) base64 bigdecimal concurrent-ruby (~> 1.0, >= 1.3.1) @@ -32,8 +32,9 @@ GEM connection_pool (2.4.1) docile (1.4.1) drb (2.2.1) - dry-core (1.0.1) + dry-core (1.0.2) concurrent-ruby (~> 1.0) + logger zeitwerk (~> 2.6) dry-inflector (1.1.0) dry-logic (1.5.0) @@ -48,7 +49,7 @@ GEM dry-logic (~> 1.4) zeitwerk (~> 2.6) erubi (1.13.0) - grape (2.1.3) + grape (2.2.0) activesupport (>= 6) dry-types (>= 1.1) mustermann-grape (~> 1.1.0) @@ -57,15 +58,15 @@ GEM grape-entity (1.0.1) activesupport (>= 3.0.0) multi_json (>= 1.3.2) - i18n (1.14.5) + i18n (1.14.6) concurrent-ruby (~> 1.0) io-console (0.7.2) - irb (1.14.0) + irb (1.14.1) rdoc (>= 4.0.0) reline (>= 0.4.2) - json (2.7.2) + json (2.7.4) language_server-protocol (3.17.0.3) - logger (1.6.0) + logger (1.6.1) minitest (5.25.1) minitest-reporters (1.7.1) ansi @@ -73,56 +74,53 @@ GEM minitest (>= 5.0) ruby-progressbar multi_json (1.15.0) - mustermann (3.0.2) + mustermann (3.0.3) ruby2_keywords (~> 0.0.1) mustermann-grape (1.1.0) mustermann (>= 1.0.0) netrc (0.11.0) parallel (1.26.3) - parser (3.3.4.2) + parser (3.3.5.0) ast (~> 2.4.1) racc - prism (0.30.0) + prism (1.2.0) psych (5.1.2) stringio racc (1.8.1) - rack (3.1.7) + rack (3.1.8) rainbow (3.1.1) rake (13.2.1) - rbi (0.1.14) - prism (>= 0.18.0, < 1.0.0) + rbi (0.2.1) + prism (~> 1.0) sorbet-runtime (>= 0.5.9204) rdoc (6.7.0) psych (>= 4.0.0) regexp_parser (2.9.2) - reline (0.5.9) + reline (0.5.10) io-console (~> 0.5) - rexml (3.3.6) - strscan - rubocop (1.65.1) + rubocop (1.67.0) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.4, < 3.0) - rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.31.1, < 2.0) + rubocop-ast (>= 1.32.2, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.32.1) + rubocop-ast (1.32.3) parser (>= 3.3.1.0) - rubocop-minitest (0.35.1) + rubocop-minitest (0.36.0) rubocop (>= 1.61, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) - rubocop-performance (1.21.1) + rubocop-performance (1.22.1) rubocop (>= 1.48.1, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) rubocop-rake (0.6.0) rubocop (~> 1.0) rubocop-shopify (2.15.1) rubocop (~> 1.51) - rubocop-sorbet (0.8.5) + rubocop-sorbet (0.8.6) rubocop (>= 1) ruby-progressbar (1.13.0) ruby2_keywords (0.0.5) @@ -131,42 +129,41 @@ GEM docile (~> 1.1) simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) - simplecov-html (0.12.3) + simplecov-html (0.13.1) simplecov_json_formatter (0.1.4) - sorbet (0.5.11547) - sorbet-static (= 0.5.11547) - sorbet-runtime (0.5.11547) - sorbet-static (0.5.11547-aarch64-linux) - sorbet-static (0.5.11547-universal-darwin) - sorbet-static (0.5.11547-x86_64-linux) - sorbet-static-and-runtime (0.5.11547) - sorbet (= 0.5.11547) - sorbet-runtime (= 0.5.11547) - spoom (1.4.2) + sorbet (0.5.11620) + sorbet-static (= 0.5.11620) + sorbet-runtime (0.5.11620) + sorbet-static (0.5.11620-aarch64-linux) + sorbet-static (0.5.11620-universal-darwin) + sorbet-static (0.5.11620-x86_64-linux) + sorbet-static-and-runtime (0.5.11620) + sorbet (= 0.5.11620) + sorbet-runtime (= 0.5.11620) + spoom (1.5.0) erubi (>= 1.10.0) prism (>= 0.28.0) sorbet-static-and-runtime (>= 0.5.10187) thor (>= 0.19.2) stringio (3.1.1) - strscan (3.1.0) - tapioca (0.16.1) + tapioca (0.16.3) bundler (>= 2.2.25) netrc (>= 0.11.0) parallel (>= 1.21.0) - rbi (>= 0.1.14, < 0.2) + rbi (~> 0.2) sorbet-static-and-runtime (>= 0.5.11087) spoom (>= 1.2.0) thor (>= 1.2.0) yard-sorbet - thor (1.3.1) + thor (1.3.2) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unicode-display_width (2.5.0) - yard (0.9.36) + unicode-display_width (2.6.0) + yard (0.9.37) yard-sorbet (0.9.0) sorbet-runtime yard - zeitwerk (2.6.17) + zeitwerk (2.7.1) PLATFORMS aarch64-linux @@ -192,4 +189,4 @@ DEPENDENCIES tapioca (>= 0.16.0) BUNDLED WITH - 2.5.17 + 2.5.22 diff --git a/sorbet/rbi/annotations/activesupport.rbi b/sorbet/rbi/annotations/activesupport.rbi index 716210d..881ddf5 100644 --- a/sorbet/rbi/annotations/activesupport.rbi +++ b/sorbet/rbi/annotations/activesupport.rbi @@ -287,6 +287,8 @@ class String sig { returns(TrueClass) } def acts_like_string?; end + # This is the subset of `#[]` sigs that have just 1 parameter. + # https://github.com/sorbet/sorbet/blob/40ad87b4dc7be23fa00c1369ac9f927053c68907/rbi/core/string.rbi#L270-L303 sig { params(position: Integer).returns(T.nilable(String)) } sig { params(position: T.any(T::Range[Integer], Regexp)).returns(T.nilable(String)) } sig { params(position: String).returns(T.nilable(String)) } diff --git a/sorbet/rbi/gems/activesupport@7.2.1.rbi b/sorbet/rbi/gems/activesupport@7.2.1.2.rbi similarity index 99% rename from sorbet/rbi/gems/activesupport@7.2.1.rbi rename to sorbet/rbi/gems/activesupport@7.2.1.2.rbi index 421f096..a9f658e 100644 --- a/sorbet/rbi/gems/activesupport@7.2.1.rbi +++ b/sorbet/rbi/gems/activesupport@7.2.1.2.rbi @@ -13994,7 +13994,7 @@ ActiveSupport::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) ActiveSupport::VERSION::MINOR = T.let(T.unsafe(nil), Integer) # source://activesupport//lib/active_support/gem_version.rb#13 -ActiveSupport::VERSION::PRE = T.let(T.unsafe(nil), T.untyped) +ActiveSupport::VERSION::PRE = T.let(T.unsafe(nil), String) # source://activesupport//lib/active_support/gem_version.rb#15 ActiveSupport::VERSION::STRING = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/dry-core@1.0.1.rbi b/sorbet/rbi/gems/dry-core@1.0.2.rbi similarity index 100% rename from sorbet/rbi/gems/dry-core@1.0.1.rbi rename to sorbet/rbi/gems/dry-core@1.0.2.rbi diff --git a/sorbet/rbi/gems/dry-inflector@1.1.0.rbi b/sorbet/rbi/gems/dry-inflector@1.1.0.rbi index c659528..5507a0e 100644 --- a/sorbet/rbi/gems/dry-inflector@1.1.0.rbi +++ b/sorbet/rbi/gems/dry-inflector@1.1.0.rbi @@ -8,7 +8,7 @@ # source://dry-inflector//lib/dry/inflector.rb#3 module Dry class << self - # source://dry-core/1.0.1/lib/dry/core.rb#52 + # source://dry-core/1.0.2/lib/dry/core.rb#52 def Equalizer(*keys, **options); end # source://dry-types/1.7.2/lib/dry/types.rb#253 diff --git a/sorbet/rbi/gems/dry-logic@1.5.0.rbi b/sorbet/rbi/gems/dry-logic@1.5.0.rbi index a7cbe8f..04410ac 100644 --- a/sorbet/rbi/gems/dry-logic@1.5.0.rbi +++ b/sorbet/rbi/gems/dry-logic@1.5.0.rbi @@ -8,7 +8,7 @@ # source://dry-logic//lib/dry/logic.rb#6 module Dry class << self - # source://dry-core/1.0.1/lib/dry/core.rb#52 + # source://dry-core/1.0.2/lib/dry/core.rb#52 def Equalizer(*keys, **options); end # source://dry-types/1.7.2/lib/dry/types.rb#253 diff --git a/sorbet/rbi/gems/dry-types@1.7.2.rbi b/sorbet/rbi/gems/dry-types@1.7.2.rbi index 27069f5..32f6a58 100644 --- a/sorbet/rbi/gems/dry-types@1.7.2.rbi +++ b/sorbet/rbi/gems/dry-types@1.7.2.rbi @@ -12,7 +12,7 @@ # source://dry-types//lib/dry/types/constraints.rb#3 module Dry class << self - # source://dry-core/1.0.1/lib/dry/core.rb#52 + # source://dry-core/1.0.2/lib/dry/core.rb#52 def Equalizer(*keys, **options); end # Export registered types as a module with constants @@ -147,7 +147,7 @@ module Dry::Types # @api public # - # source://dry-core/1.0.1/lib/dry/core/deprecations.rb#202 + # source://dry-core/1.0.2/lib/dry/core/deprecations.rb#202 def module(*args, &block); end # Register a new built-in type @@ -962,7 +962,7 @@ class Dry::Types::Compiler # source://dry-types//lib/dry/types/compiler.rb#52 def visit_rule(node); end - # source://dry-core/1.0.1/lib/dry/core/deprecations.rb#168 + # source://dry-core/1.0.2/lib/dry/core/deprecations.rb#168 def visit_safe(*args, &block); end # @api private @@ -1750,7 +1750,7 @@ class Dry::Types::Container include ::Dry::Core::Container::Mixin extend ::Dry::Core::Container::Configuration - # source://dry-core/1.0.1/lib/dry/core/container/mixin.rb#83 + # source://dry-core/1.0.2/lib/dry/core/container/mixin.rb#83 def config; end end @@ -3893,7 +3893,7 @@ module Dry::Types::Type # source://dry-types//lib/dry/types/type.rb#43 def call(input = T.unsafe(nil), &block); end - # source://dry-core/1.0.1/lib/dry/core/deprecations.rb#168 + # source://dry-core/1.0.2/lib/dry/core/deprecations.rb#168 def safe(*args, &block); end # Whether a value is a valid member of the type diff --git a/sorbet/rbi/gems/grape-entity@1.0.1.rbi b/sorbet/rbi/gems/grape-entity@1.0.1.rbi index 86622c6..0b18282 100644 --- a/sorbet/rbi/gems/grape-entity@1.0.1.rbi +++ b/sorbet/rbi/gems/grape-entity@1.0.1.rbi @@ -8,7 +8,7 @@ # source://grape-entity//lib/grape_entity/entity.rb#5 module Grape class << self - # source://grape/2.1.3/lib/grape.rb#61 + # source://grape/2.2.0/lib/grape.rb#61 def deprecator; end end end diff --git a/sorbet/rbi/gems/grape@2.1.3.rbi b/sorbet/rbi/gems/grape@2.2.0.rbi similarity index 94% rename from sorbet/rbi/gems/grape@2.1.3.rbi rename to sorbet/rbi/gems/grape@2.2.0.rbi index 818149f..9bc5f9c 100644 --- a/sorbet/rbi/gems/grape@2.1.3.rbi +++ b/sorbet/rbi/gems/grape@2.2.0.rbi @@ -395,21 +395,30 @@ Grape::API::NON_OVERRIDABLE = T.let(T.unsafe(nil), Array) # source://grape//lib/grape/content_types.rb#4 module Grape::ContentTypes - extend ::Grape::Util::Registrable + private + + # source://grape//lib/grape/content_types.rb#18 + def content_types_for(from_settings); end + + # source://grape//lib/grape/content_types.rb#22 + def mime_types_for(from_settings); end class << self - # source://grape//lib/grape/content_types.rb#21 + # source://grape//lib/grape/content_types.rb#18 def content_types_for(from_settings); end - # source://grape//lib/grape/content_types.rb#17 - def content_types_for_settings(settings); end + # source://grape//lib/grape/content_types.rb#22 + def mime_types_for(from_settings); end end end # Content types are listed in order of preference. # # source://grape//lib/grape/content_types.rb#8 -Grape::ContentTypes::CONTENT_TYPES = T.let(T.unsafe(nil), Hash) +Grape::ContentTypes::DEFAULTS = T.let(T.unsafe(nil), Hash) + +# source://grape//lib/grape/content_types.rb#16 +Grape::ContentTypes::MIME_TYPES = T.let(T.unsafe(nil), Hash) # source://grape//lib/grape/cookies.rb#4 class Grape::Cookies @@ -637,29 +646,29 @@ end # This module extends user defined helpers # to provide some API-specific functionality. # -# source://grape//lib/grape/dsl/helpers.rb#81 +# source://grape//lib/grape/dsl/helpers.rb#85 module Grape::DSL::Helpers::BaseHelper # Returns the value of attribute api. # - # source://grape//lib/grape/dsl/helpers.rb#82 + # source://grape//lib/grape/dsl/helpers.rb#86 def api; end # Sets the attribute api # # @param value the value to set the attribute api to. # - # source://grape//lib/grape/dsl/helpers.rb#82 + # source://grape//lib/grape/dsl/helpers.rb#86 def api=(_arg0); end - # source://grape//lib/grape/dsl/helpers.rb#89 + # source://grape//lib/grape/dsl/helpers.rb#93 def api_changed(new_api); end - # source://grape//lib/grape/dsl/helpers.rb#84 + # source://grape//lib/grape/dsl/helpers.rb#88 def params(name, &block); end protected - # source://grape//lib/grape/dsl/helpers.rb#96 + # source://grape//lib/grape/dsl/helpers.rb#100 def process_named_params; end end @@ -693,22 +702,22 @@ module Grape::DSL::Helpers::ClassMethods protected - # source://grape//lib/grape/dsl/helpers.rb#66 + # source://grape//lib/grape/dsl/helpers.rb#70 def define_boolean_in_mod(mod); end - # source://grape//lib/grape/dsl/helpers.rb#59 + # source://grape//lib/grape/dsl/helpers.rb#63 def include_all_in_scope; end - # source://grape//lib/grape/dsl/helpers.rb#47 + # source://grape//lib/grape/dsl/helpers.rb#49 def include_block(block); end # source://grape//lib/grape/dsl/helpers.rb#43 def include_new_modules(modules); end - # source://grape//lib/grape/dsl/helpers.rb#72 + # source://grape//lib/grape/dsl/helpers.rb#76 def inject_api_helpers_to_mod(mod, &block); end - # source://grape//lib/grape/dsl/helpers.rb#53 + # source://grape//lib/grape/dsl/helpers.rb#57 def make_inclusion(mod, &block); end end @@ -729,7 +738,7 @@ module Grape::DSL::InsideRoute # # GET /body # => "Body" # - # source://grape//lib/grape/dsl/inside_route.rb#278 + # source://grape//lib/grape/dsl/inside_route.rb#283 def body(value = T.unsafe(nil)); end # source://grape//lib/grape/dsl/inside_route.rb#158 @@ -737,10 +746,10 @@ module Grape::DSL::InsideRoute # Set response content-type # - # source://grape//lib/grape/dsl/inside_route.rb#248 + # source://grape//lib/grape/dsl/inside_route.rb#253 def content_type(val = T.unsafe(nil)); end - # source://grape//lib/grape/dsl/inside_route.rb#467 + # source://grape//lib/grape/dsl/inside_route.rb#472 def context; end # Set or get a cookie @@ -751,7 +760,7 @@ module Grape::DSL::InsideRoute # cookies[:more] = { value: '123', expires: Time.at(0) } # cookies.delete :more # - # source://grape//lib/grape/dsl/inside_route.rb#264 + # source://grape//lib/grape/dsl/inside_route.rb#269 def cookies; end # A filtering method that will return a hash @@ -780,13 +789,13 @@ module Grape::DSL::InsideRoute # @param options [Hash] # @return [Class] the located Entity class, or nil if none is found # - # source://grape//lib/grape/dsl/inside_route.rb#434 + # source://grape//lib/grape/dsl/inside_route.rb#439 def entity_class_for_obj(object, options); end # @return the representation of the given object as done through # the given entity_class. # - # source://grape//lib/grape/dsl/inside_route.rb#457 + # source://grape//lib/grape/dsl/inside_route.rb#462 def entity_representation_for(entity_class, object, options); end # End the request and display an error to the @@ -803,10 +812,10 @@ module Grape::DSL::InsideRoute # Deprecated method to send files to the client. Use `sendfile` or `stream` # - # source://grape//lib/grape/dsl/inside_route.rb#304 + # source://grape//lib/grape/dsl/inside_route.rb#309 def file(value = T.unsafe(nil)); end - # source://grape//lib/grape/dsl/inside_route.rb#463 + # source://grape//lib/grape/dsl/inside_route.rb#468 def http_version; end # Allows you to make use of Grape Entities by setting @@ -825,7 +834,7 @@ module Grape::DSL::InsideRoute # admin: current_user.admin? # end # - # source://grape//lib/grape/dsl/inside_route.rb#384 + # source://grape//lib/grape/dsl/inside_route.rb#389 def present(*args); end # Creates a Rack response based on the provided message, status, and headers. @@ -838,7 +847,7 @@ module Grape::DSL::InsideRoute # @param message [String] The content of the response. # @param status [Integer] The HTTP status code. # - # source://grape//lib/grape/dsl/inside_route.rb#188 + # source://grape//lib/grape/dsl/inside_route.rb#193 def rack_response(message, status = T.unsafe(nil), headers = T.unsafe(nil)); end # Redirect to a new url. @@ -848,7 +857,7 @@ module Grape::DSL::InsideRoute # :permanent, default false. # :body, default a short message including the URL. # - # source://grape//lib/grape/dsl/inside_route.rb#200 + # source://grape//lib/grape/dsl/inside_route.rb#205 def redirect(url, permanent: T.unsafe(nil), body: T.unsafe(nil), **_options); end # Allows you to explicitly return no content. @@ -861,7 +870,7 @@ module Grape::DSL::InsideRoute # # DELETE /12 # => 204 No Content, "" # - # source://grape//lib/grape/dsl/inside_route.rb#298 + # source://grape//lib/grape/dsl/inside_route.rb#303 def return_no_content; end # Returns route information for the current request. @@ -873,7 +882,7 @@ module Grape::DSL::InsideRoute # route.description # end # - # source://grape//lib/grape/dsl/inside_route.rb#422 + # source://grape//lib/grape/dsl/inside_route.rb#427 def route; end # Allows you to send a file to the client via sendfile. @@ -885,14 +894,14 @@ module Grape::DSL::InsideRoute # # GET /file # => "contents of file" # - # source://grape//lib/grape/dsl/inside_route.rb#325 + # source://grape//lib/grape/dsl/inside_route.rb#330 def sendfile(value = T.unsafe(nil)); end # Set or retrieve the HTTP status code. # # @param status [Integer] The HTTP Status Code to return for this request. # - # source://grape//lib/grape/dsl/inside_route.rb#220 + # source://grape//lib/grape/dsl/inside_route.rb#225 def status(status = T.unsafe(nil)); end # Allows you to define the response as a streamable object. @@ -911,7 +920,7 @@ module Grape::DSL::InsideRoute # # GET /stream # => "chunked contents of file" # - # source://grape//lib/grape/dsl/inside_route.rb#351 + # source://grape//lib/grape/dsl/inside_route.rb#356 def stream(value = T.unsafe(nil)); end # The API version as specified in the URL. @@ -1326,22 +1335,22 @@ module Grape::DSL::RequestResponse::ClassMethods # Specify additional content-types, e.g.: # content_type :xls, 'application/vnd.ms-excel' # - # source://grape//lib/grape/dsl/request_response.rb#66 + # source://grape//lib/grape/dsl/request_response.rb#62 def content_type(key, val); end # All available content types. # - # source://grape//lib/grape/dsl/request_response.rb#71 + # source://grape//lib/grape/dsl/request_response.rb#67 def content_types; end # Specify a default error formatter. # - # source://grape//lib/grape/dsl/request_response.rb#45 + # source://grape//lib/grape/dsl/request_response.rb#43 def default_error_formatter(new_formatter_name = T.unsafe(nil)); end # Specify the default status code for errors. # - # source://grape//lib/grape/dsl/request_response.rb#77 + # source://grape//lib/grape/dsl/request_response.rb#73 def default_error_status(new_status = T.unsafe(nil)); end # Specify the default format for the API's serializers. @@ -1350,23 +1359,25 @@ module Grape::DSL::RequestResponse::ClassMethods # source://grape//lib/grape/dsl/request_response.rb#13 def default_format(new_format = T.unsafe(nil)); end - # source://grape//lib/grape/dsl/request_response.rb#54 + # source://grape//lib/grape/dsl/request_response.rb#50 def error_formatter(format, options); end # Specify the format for the API's serializers. # May be `:json`, `:xml`, `:txt`, etc. # + # @raise [Grape::Exceptions::MissingMimeType] + # # source://grape//lib/grape/dsl/request_response.rb#19 def format(new_format = T.unsafe(nil)); end # Specify a custom formatter for a content-type. # - # source://grape//lib/grape/dsl/request_response.rb#35 + # source://grape//lib/grape/dsl/request_response.rb#33 def formatter(content_type, new_formatter); end # Specify a custom parser for a content-type. # - # source://grape//lib/grape/dsl/request_response.rb#40 + # source://grape//lib/grape/dsl/request_response.rb#38 def parser(content_type, new_parser); end # Allows you to specify a default representation entity for a @@ -1391,7 +1402,7 @@ module Grape::DSL::RequestResponse::ClassMethods # @param options [Hash] a customizable set of options # @raise [Grape::Exceptions::InvalidWithOptionForRepresent] # - # source://grape//lib/grape/dsl/request_response.rb#155 + # source://grape//lib/grape/dsl/request_response.rb#151 def represent(model_class, options); end # Allows you to rescue certain exceptions that occur to return @@ -1407,14 +1418,14 @@ module Grape::DSL::RequestResponse::ClassMethods # @overload rescue_from # @raise [ArgumentError] # - # source://grape//lib/grape/dsl/request_response.rb#101 + # source://grape//lib/grape/dsl/request_response.rb#97 def rescue_from(*args, &block); end private # @raise [ArgumentError] # - # source://grape//lib/grape/dsl/request_response.rb#163 + # source://grape//lib/grape/dsl/request_response.rb#159 def extract_with(options); end end @@ -1897,16 +1908,16 @@ class Grape::Endpoint # source://grape//lib/grape/endpoint.rb#12 def block=(_arg0); end - # source://grape//lib/grape/endpoint.rb#217 + # source://grape//lib/grape/endpoint.rb#218 def call(env); end - # source://grape//lib/grape/endpoint.rb#222 + # source://grape//lib/grape/endpoint.rb#223 def call!(env); end # Return the collection of endpoints within this endpoint. # This is the case when an Grape::API mounts another Grape::API. # - # source://grape//lib/grape/endpoint.rb#230 + # source://grape//lib/grape/endpoint.rb#231 def endpoints; end # Returns the value of attribute env. @@ -1916,7 +1927,7 @@ class Grape::Endpoint # @return [Boolean] # - # source://grape//lib/grape/endpoint.rb#234 + # source://grape//lib/grape/endpoint.rb#235 def equals?(endpoint); end # Returns the value of attribute headers. @@ -1930,10 +1941,17 @@ class Grape::Endpoint # source://grape//lib/grape/endpoint.rb#116 def inherit_settings(namespace_stackable); end - # source://grape//lib/grape/endpoint.rb#204 + # The purpose of this override is solely for stripping internals when an error occurs while calling + # an endpoint through an api. See https://github.com/ruby-grape/grape/issues/2398 + # Otherwise, it calls super. + # + # source://grape//lib/grape/endpoint.rb#242 + def inspect; end + + # source://grape//lib/grape/endpoint.rb#203 def map_routes; end - # source://grape//lib/grape/endpoint.rb#200 + # source://grape//lib/grape/endpoint.rb#199 def merge_route_options(**default); end # source://grape//lib/grape/endpoint.rb#129 @@ -1942,7 +1960,7 @@ class Grape::Endpoint # source://grape//lib/grape/endpoint.rb#147 def mount_in(router); end - # source://grape//lib/grape/endpoint.rb#213 + # source://grape//lib/grape/endpoint.rb#214 def namespace; end # Returns the value of attribute options. @@ -1965,7 +1983,7 @@ class Grape::Endpoint # source://grape//lib/grape/endpoint.rb#180 def prepare_default_route_attributes; end - # source://grape//lib/grape/endpoint.rb#208 + # source://grape//lib/grape/endpoint.rb#207 def prepare_path(path); end # source://grape//lib/grape/endpoint.rb#173 @@ -2007,56 +2025,53 @@ class Grape::Endpoint protected - # source://grape//lib/grape/endpoint.rb#383 + # source://grape//lib/grape/endpoint.rb#398 def after_validations; end - # source://grape//lib/grape/endpoint.rb#387 + # source://grape//lib/grape/endpoint.rb#402 def afters; end - # source://grape//lib/grape/endpoint.rb#379 + # source://grape//lib/grape/endpoint.rb#394 def before_validations; end - # source://grape//lib/grape/endpoint.rb#375 + # source://grape//lib/grape/endpoint.rb#390 def befores; end - # source://grape//lib/grape/endpoint.rb#328 + # source://grape//lib/grape/endpoint.rb#343 def execute; end - # source://grape//lib/grape/endpoint.rb#391 + # source://grape//lib/grape/endpoint.rb#406 def finallies; end - # source://grape//lib/grape/endpoint.rb#332 + # source://grape//lib/grape/endpoint.rb#347 def helpers; end - # source://grape//lib/grape/endpoint.rb#408 - def inspect; end - - # source://grape//lib/grape/endpoint.rb#336 + # source://grape//lib/grape/endpoint.rb#351 def lazy_initialize!; end # @return [Boolean] # - # source://grape//lib/grape/endpoint.rb#403 + # source://grape//lib/grape/endpoint.rb#418 def options?; end - # source://grape//lib/grape/endpoint.rb#240 + # source://grape//lib/grape/endpoint.rb#250 def run; end - # source://grape//lib/grape/endpoint.rb#367 + # source://grape//lib/grape/endpoint.rb#382 def run_filters(filters, type = T.unsafe(nil)); end - # source://grape//lib/grape/endpoint.rb#349 + # source://grape//lib/grape/endpoint.rb#364 def run_validators(validators, request); end - # source://grape//lib/grape/endpoint.rb#395 + # source://grape//lib/grape/endpoint.rb#410 def validations; end private - # source://grape//lib/grape/endpoint.rb#321 + # source://grape//lib/grape/endpoint.rb#334 def build_helpers; end - # source://grape//lib/grape/endpoint.rb#280 + # source://grape//lib/grape/endpoint.rb#290 def build_stack(helpers); end class << self @@ -2131,17 +2146,20 @@ Grape::Env::GRAPE_ROUTING_ARGS = T.let(T.unsafe(nil), String) # source://grape//lib/grape/error_formatter.rb#4 module Grape::ErrorFormatter - extend ::Grape::Util::Registrable + private - class << self - # source://grape//lib/grape/error_formatter.rb#8 - def builtin_formatters; end + # source://grape//lib/grape/error_formatter.rb#15 + def formatter_for(format, error_formatters = T.unsafe(nil), default_error_formatter = T.unsafe(nil)); end + + # source://grape//lib/grape/error_formatter.rb#19 + def select_formatter(error_formatters, format); end - # source://grape//lib/grape/error_formatter.rb#22 - def formatter_for(api_format, **options); end + class << self + # source://grape//lib/grape/error_formatter.rb#15 + def formatter_for(format, error_formatters = T.unsafe(nil), default_error_formatter = T.unsafe(nil)); end - # source://grape//lib/grape/error_formatter.rb#18 - def formatters(**options); end + # source://grape//lib/grape/error_formatter.rb#19 + def select_formatter(error_formatters, format); end end end @@ -2151,6 +2169,9 @@ module Grape::ErrorFormatter::Base def present(message, env); end end +# source://grape//lib/grape/error_formatter.rb#7 +Grape::ErrorFormatter::DEFAULTS = T.let(T.unsafe(nil), Hash) + # source://grape//lib/grape/error_formatter/json.rb#5 module Grape::ErrorFormatter::Json extend ::Grape::ErrorFormatter::Base @@ -2161,10 +2182,13 @@ module Grape::ErrorFormatter::Json private - # source://grape//lib/grape/error_formatter/json.rb#28 + # source://grape//lib/grape/error_formatter/json.rb#29 def ensure_utf8(message); end - # source://grape//lib/grape/error_formatter/json.rb#20 + # source://grape//lib/grape/error_formatter/json.rb#35 + def merge_rescue_options(result, backtrace, options, original_exception); end + + # source://grape//lib/grape/error_formatter/json.rb#19 def wrap_message(message); end end end @@ -2544,20 +2568,29 @@ end # source://grape//lib/grape/formatter.rb#4 module Grape::Formatter - extend ::Grape::Util::Registrable + private - class << self - # source://grape//lib/grape/formatter.rb#8 - def builtin_formatters; end + # source://grape//lib/grape/formatter.rb#17 + def formatter_for(api_format, formatters); end + + # source://grape//lib/grape/formatter.rb#21 + def select_formatter(formatters, api_format); end - # source://grape//lib/grape/formatter.rb#22 - def formatter_for(api_format, **options); end + class << self + # source://grape//lib/grape/formatter.rb#17 + def formatter_for(api_format, formatters); end - # source://grape//lib/grape/formatter.rb#18 - def formatters(**options); end + # source://grape//lib/grape/formatter.rb#21 + def select_formatter(formatters, api_format); end end end +# source://grape//lib/grape/formatter.rb#7 +Grape::Formatter::DEFAULTS = T.let(T.unsafe(nil), Hash) + +# source://grape//lib/grape/formatter.rb#15 +Grape::Formatter::DEFAULT_LAMBDA_FORMATTER = T.let(T.unsafe(nil), Proc) + # source://grape//lib/grape/formatter/json.rb#5 module Grape::Formatter::Json class << self @@ -2806,7 +2839,7 @@ class Grape::Middleware::Base # @param options [Hash] A hash of options, simply stored for use by subclasses. # @return [Base] a new instance of Base # - # source://grape//lib/grape/middleware/base.rb#16 + # source://grape//lib/grape/middleware/base.rb#15 def initialize(app, *options); end # Called after the application is called in the middleware lifecycle. @@ -2814,62 +2847,65 @@ class Grape::Middleware::Base # @abstract # @return [Response, nil] a Rack SPEC response or nil to call the application afterwards. # - # source://grape//lib/grape/middleware/base.rb#56 + # source://grape//lib/grape/middleware/base.rb#55 def after; end # Returns the value of attribute app. # - # source://grape//lib/grape/middleware/base.rb#8 + # source://grape//lib/grape/middleware/base.rb#9 def app; end # Called before the application is called in the middleware lifecycle. # # @abstract # - # source://grape//lib/grape/middleware/base.rb#51 + # source://grape//lib/grape/middleware/base.rb#50 def before; end - # source://grape//lib/grape/middleware/base.rb#26 + # source://grape//lib/grape/middleware/base.rb#25 def call(env); end - # source://grape//lib/grape/middleware/base.rb#30 + # source://grape//lib/grape/middleware/base.rb#29 def call!(env); end - # source://grape//lib/grape/middleware/base.rb#72 + # source://grape//lib/grape/middleware/base.rb#75 def content_type; end - # source://grape//lib/grape/middleware/base.rb#64 + # source://grape//lib/grape/middleware/base.rb#71 def content_type_for(format); end - # source://grape//lib/grape/middleware/base.rb#68 + # source://grape//lib/grape/middleware/base.rb#63 def content_types; end - # source://grape//lib/grape/middleware/base.rb#22 + # source://grape//lib/grape/middleware/base.rb#21 def default_options; end # Returns the value of attribute env. # - # source://grape//lib/grape/middleware/base.rb#8 + # source://grape//lib/grape/middleware/base.rb#9 def env; end - # source://grape//lib/grape/middleware/base.rb#76 + # source://grape//lib/grape/middleware/base.rb#67 def mime_types; end # Returns the value of attribute options. # - # source://grape//lib/grape/middleware/base.rb#8 + # source://grape//lib/grape/middleware/base.rb#9 def options; end - # source://grape//lib/grape/middleware/base.rb#58 + # source://grape//lib/grape/middleware/base.rb#57 def response; end private - # source://grape//lib/grape/middleware/base.rb#84 + # source://grape//lib/grape/middleware/base.rb#90 + def content_types_indifferent_access; end + + # source://grape//lib/grape/middleware/base.rb#81 def merge_headers(response); end end -# source://grape//lib/grape/middleware/base.rb#10 +# source://grape//lib/grape/middleware/base.rb#11 Grape::Middleware::Base::TEXT_HTML = T.let(T.unsafe(nil), String) # source://grape//lib/grape/middleware/error.rb#5 @@ -3137,14 +3173,14 @@ end module Grape::Middleware::Versioner private - # @param strategy [Symbol] :path, :header or :param + # @param strategy [Symbol] :path, :header, :accept_version_header or :param # @return a middleware class based on strategy # # source://grape//lib/grape/middleware/versioner.rb#18 def using(strategy); end class << self - # @param strategy [Symbol] :path, :header or :param + # @param strategy [Symbol] :path, :header, :accept_version_header or :param # @return a middleware class based on strategy # # source://grape//lib/grape/middleware/versioner.rb#18 @@ -3168,30 +3204,15 @@ end # # source://grape//lib/grape/middleware/versioner/accept_version_header.rb#19 class Grape::Middleware::Versioner::AcceptVersionHeader < ::Grape::Middleware::Base - # source://grape//lib/grape/middleware/versioner/accept_version_header.rb#20 + include ::Grape::Middleware::VersionerHelpers + + # source://grape//lib/grape/middleware/versioner/accept_version_header.rb#22 def before; end private - # By default those errors contain an `X-Cascade` header set to `pass`, which allows nesting and stacking - # of routes (see Grape::Router) for more information). To prevent - # this behavior, and not add the `X-Cascade` header, one can set the `:cascade` option to `false`. - # - # @return [Boolean] - # - # source://grape//lib/grape/middleware/versioner/accept_version_header.rb#49 - def cascade?; end - - # source://grape//lib/grape/middleware/versioner/accept_version_header.rb#57 - def error_headers; end - - # @return [Boolean] - # - # source://grape//lib/grape/middleware/versioner/accept_version_header.rb#42 - def strict?; end - - # source://grape//lib/grape/middleware/versioner/accept_version_header.rb#38 - def versions; end + # source://grape//lib/grape/middleware/versioner/accept_version_header.rb#34 + def not_acceptable!(message); end end # This middleware sets various version related rack environment variables @@ -3215,8 +3236,60 @@ end # # source://grape//lib/grape/middleware/versioner/header.rb#24 class Grape::Middleware::Versioner::Header < ::Grape::Middleware::Base - # source://grape//lib/grape/middleware/versioner/header.rb#25 + include ::Grape::Middleware::VersionerHelpers + + # source://grape//lib/grape/middleware/versioner/header.rb#27 def before; end + + private + + # source://grape//lib/grape/middleware/versioner/header.rb#57 + def accept_header; end + + # source://grape//lib/grape/middleware/versioner/header.rb#68 + def accept_header_check!; end + + # source://grape//lib/grape/middleware/versioner/header.rb#53 + def allowed_methods; end + + # source://grape//lib/grape/middleware/versioner/header.rb#115 + def available_media_types; end + + # source://grape//lib/grape/middleware/versioner/header.rb#96 + def fail!(grape_allowed_methods); end + + # @raise [Grape::Exceptions::InvalidAcceptHeader] + # + # source://grape//lib/grape/middleware/versioner/header.rb#88 + def invalid_accept_header!(message); end + + # @raise [Grape::Exceptions::InvalidVersionHeader] + # + # source://grape//lib/grape/middleware/versioner/header.rb#92 + def invalid_version_header!(message); end + + # source://grape//lib/grape/middleware/versioner/header.rb#41 + def match_best_quality_media_type!; end + + # source://grape//lib/grape/middleware/versioner/header.rb#80 + def q_values_mime_types; end + + # source://grape//lib/grape/middleware/versioner/header.rb#61 + def strict_header_checks!; end + + # source://grape//lib/grape/middleware/versioner/header.rb#103 + def vendor_not_found!(media_types); end + + # @return [Boolean] + # + # source://grape//lib/grape/middleware/versioner/header.rb#84 + def version_and_vendor?; end + + # source://grape//lib/grape/middleware/versioner/header.rb#74 + def version_and_vendor_check!; end + + # source://grape//lib/grape/middleware/versioner/header.rb#109 + def version_not_found!(media_types); end end # This middleware sets various version related rack environment variables @@ -3237,19 +3310,10 @@ end # # source://grape//lib/grape/middleware/versioner/param.rb#21 class Grape::Middleware::Versioner::Param < ::Grape::Middleware::Base - # source://grape//lib/grape/middleware/versioner/param.rb#30 - def before; end + include ::Grape::Middleware::VersionerHelpers - # source://grape//lib/grape/middleware/versioner/param.rb#22 - def default_options; end - - private - - # source://grape//lib/grape/middleware/versioner/param.rb#41 - def paramkey; end - - # source://grape//lib/grape/middleware/versioner/param.rb#45 - def version_options; end + # source://grape//lib/grape/middleware/versioner/param.rb#24 + def before; end end # This middleware sets various version related rack environment variables @@ -3267,26 +3331,70 @@ end # # source://grape//lib/grape/middleware/versioner/path.rb#19 class Grape::Middleware::Versioner::Path < ::Grape::Middleware::Base - # source://grape//lib/grape/middleware/versioner/path.rb#26 + include ::Grape::Middleware::VersionerHelpers + + # source://grape//lib/grape/middleware/versioner/path.rb#22 def before; end +end + +# source://grape//lib/grape/middleware/versioner_helpers.rb#5 +module Grape::Middleware::VersionerHelpers + # By default those errors contain an `X-Cascade` header set to `pass`, which allows nesting and stacking + # of routes (see Grape::Router) for more information). To prevent + # this behavior, and not add the `X-Cascade` header, one can set the `:cascade` option to `false`. + # + # @return [Boolean] + # + # source://grape//lib/grape/middleware/versioner_helpers.rb#50 + def cascade?; end - # source://grape//lib/grape/middleware/versioner/path.rb#20 + # source://grape//lib/grape/middleware/versioner_helpers.rb#9 def default_options; end - private + # source://grape//lib/grape/middleware/versioner_helpers.rb#62 + def error_headers; end - # source://grape//lib/grape/middleware/versioner/path.rb#52 + # source://grape//lib/grape/middleware/versioner_helpers.rb#31 def mount_path; end + # source://grape//lib/grape/middleware/versioner_helpers.rb#54 + def parameter_key; end + + # source://grape//lib/grape/middleware/versioner_helpers.rb#35 + def pattern; end + # @return [Boolean] # - # source://grape//lib/grape/middleware/versioner/path.rb#45 - def mounted_path?(path); end + # source://grape//lib/grape/middleware/versioner_helpers.rb#66 + def potential_version_match?(potential_version); end - # source://grape//lib/grape/middleware/versioner/path.rb#56 + # source://grape//lib/grape/middleware/versioner_helpers.rb#27 def prefix; end + + # @return [Boolean] + # + # source://grape//lib/grape/middleware/versioner_helpers.rb#43 + def strict?; end + + # source://grape//lib/grape/middleware/versioner_helpers.rb#58 + def vendor; end + + # source://grape//lib/grape/middleware/versioner_helpers.rb#70 + def version_not_found!; end + + # source://grape//lib/grape/middleware/versioner_helpers.rb#39 + def version_options; end + + # source://grape//lib/grape/middleware/versioner_helpers.rb#23 + def versions; end end +# source://grape//lib/grape/middleware/versioner_helpers.rb#7 +Grape::Middleware::VersionerHelpers::DEFAULT_PARAMETER = T.let(T.unsafe(nil), String) + +# source://grape//lib/grape/middleware/versioner_helpers.rb#6 +Grape::Middleware::VersionerHelpers::DEFAULT_PATTERN = T.let(T.unsafe(nil), Regexp) + # A container for endpoints or other namespaces, which allows for both # logical grouping of endpoints as well as sharing common configuration. # May also be referred to as group, segment, or resource. @@ -3341,20 +3449,20 @@ end # source://grape//lib/grape/parser.rb#4 module Grape::Parser - extend ::Grape::Util::Registrable - - class << self - # source://grape//lib/grape/parser.rb#8 - def builtin_parsers; end + private - # source://grape//lib/grape/parser.rb#20 - def parser_for(api_format, **options); end + # source://grape//lib/grape/parser.rb#13 + def parser_for(format, parsers = T.unsafe(nil)); end - # source://grape//lib/grape/parser.rb#16 - def parsers(**options); end + class << self + # source://grape//lib/grape/parser.rb#13 + def parser_for(format, parsers = T.unsafe(nil)); end end end +# source://grape//lib/grape/parser.rb#7 +Grape::Parser::DEFAULTS = T.let(T.unsafe(nil), Hash) + # source://grape//lib/grape/parser/json.rb#5 module Grape::Parser::Json class << self @@ -3479,7 +3587,7 @@ class Grape::Request < ::Rack::Request # source://grape//lib/grape/request.rb#14 def params; end - # source://rack/3.1.7/lib/rack/request.rb#67 + # source://rack/3.1.8/lib/rack/request.rb#67 def rack_params; end private @@ -3602,7 +3710,7 @@ class Grape::Router::BaseRoute # source://grape//lib/grape/router/base_route.rb#8 def index; end - # source://activesupport/7.2.1/lib/active_support/delegation.rb#187 + # source://activesupport/7.2.1.2/lib/active_support/delegation.rb#187 def method_missing(method, *_arg1, **_arg2, &_arg3); end # Returns the value of attribute options. @@ -3626,7 +3734,7 @@ class Grape::Router::BaseRoute private - # source://activesupport/7.2.1/lib/active_support/delegation.rb#179 + # source://activesupport/7.2.1.2/lib/active_support/delegation.rb#179 def respond_to_missing?(name, include_private = T.unsafe(nil)); end end @@ -3851,86 +3959,6 @@ class Grape::Types::InvalidValue < ::Grape::Validations::Types::InvalidValue; en # source://grape//lib/grape/http/headers.rb#0 module Grape::Util; end -# source://grape//lib/grape/util/accept_header_handler.rb#5 -class Grape::Util::AcceptHeaderHandler - # @return [AcceptHeaderHandler] a new instance of AcceptHeaderHandler - # - # source://grape//lib/grape/util/accept_header_handler.rb#8 - def initialize(accept_header:, versions:, **options); end - - # Returns the value of attribute accept_header. - # - # source://grape//lib/grape/util/accept_header_handler.rb#6 - def accept_header; end - - # Returns the value of attribute cascade. - # - # source://grape//lib/grape/util/accept_header_handler.rb#6 - def cascade; end - - # source://grape//lib/grape/util/accept_header_handler.rb#16 - def match_best_quality_media_type!(content_types: T.unsafe(nil), allowed_methods: T.unsafe(nil)); end - - # Returns the value of attribute strict. - # - # source://grape//lib/grape/util/accept_header_handler.rb#6 - def strict; end - - # Returns the value of attribute vendor. - # - # source://grape//lib/grape/util/accept_header_handler.rb#6 - def vendor; end - - # Returns the value of attribute versions. - # - # source://grape//lib/grape/util/accept_header_handler.rb#6 - def versions; end - - private - - # source://grape//lib/grape/util/accept_header_handler.rb#37 - def accept_header_check!; end - - # source://grape//lib/grape/util/accept_header_handler.rb#88 - def available_media_types(content_types); end - - # source://grape//lib/grape/util/accept_header_handler.rb#84 - def error_headers; end - - # source://grape//lib/grape/util/accept_header_handler.rb#65 - def fail!(grape_allowed_methods); end - - # @raise [Grape::Exceptions::InvalidAcceptHeader] - # - # source://grape//lib/grape/util/accept_header_handler.rb#57 - def invalid_accept_header!(message); end - - # @raise [Grape::Exceptions::InvalidVersionHeader] - # - # source://grape//lib/grape/util/accept_header_handler.rb#61 - def invalid_version_header!(message); end - - # source://grape//lib/grape/util/accept_header_handler.rb#49 - def q_values_mime_types; end - - # source://grape//lib/grape/util/accept_header_handler.rb#30 - def strict_header_checks!; end - - # source://grape//lib/grape/util/accept_header_handler.rb#72 - def vendor_not_found!(media_types); end - - # @return [Boolean] - # - # source://grape//lib/grape/util/accept_header_handler.rb#53 - def version_and_vendor?; end - - # source://grape//lib/grape/util/accept_header_handler.rb#43 - def version_and_vendor_check!; end - - # source://grape//lib/grape/util/accept_header_handler.rb#78 - def version_not_found!(media_types); end -end - # Base for classes which need to operate with own values kept # in the hash and inherited values kept in a Hash-like object. # @@ -4386,15 +4414,6 @@ end # source://grape//lib/grape/util/media_type.rb#10 Grape::Util::MediaType::VENDOR_VERSION_HEADER_REGEX = T.let(T.unsafe(nil), Regexp) -# source://grape//lib/grape/util/registrable.rb#5 -module Grape::Util::Registrable - # source://grape//lib/grape/util/registrable.rb#6 - def default_elements; end - - # source://grape//lib/grape/util/registrable.rb#10 - def register(format, element); end -end - # source://grape//lib/grape/util/reverse_stackable_values.rb#5 class Grape::Util::ReverseStackableValues < ::Grape::Util::StackableValues protected @@ -5968,12 +5987,12 @@ class Grape::Validations::Validators::LengthValidator < ::Grape::Validations::Va # source://grape//lib/grape/validations/validators/length_validator.rb#7 def initialize(attrs, options, required, scope, **opts); end - # source://grape//lib/grape/validations/validators/length_validator.rb#28 + # source://grape//lib/grape/validations/validators/length_validator.rb#33 def build_message; end - # @raise [ArgumentError] + # @raise [Grape::Exceptions::Validation] # - # source://grape//lib/grape/validations/validators/length_validator.rb#18 + # source://grape//lib/grape/validations/validators/length_validator.rb#23 def validate_param!(attr_name, params); end end diff --git a/sorbet/rbi/gems/i18n@1.14.5.rbi b/sorbet/rbi/gems/i18n@1.14.6.rbi similarity index 96% rename from sorbet/rbi/gems/i18n@1.14.5.rbi rename to sorbet/rbi/gems/i18n@1.14.6.rbi index e371e30..72a32f1 100644 --- a/sorbet/rbi/gems/i18n@1.14.5.rbi +++ b/sorbet/rbi/gems/i18n@1.14.6.rbi @@ -88,7 +88,7 @@ module I18n # source://i18n//lib/i18n/interpolate/ruby.rb#29 def interpolate_hash(string, values); end - # source://i18n//lib/i18n.rb#37 + # source://i18n//lib/i18n.rb#38 def new_double_nested_cache; end # @return [Boolean] @@ -101,10 +101,10 @@ module I18n # extra keys as I18n options, you should call I18n.reserve_key # before any I18n.translate (etc) calls are made. # - # source://i18n//lib/i18n.rb#45 + # source://i18n//lib/i18n.rb#46 def reserve_key(key); end - # source://i18n//lib/i18n.rb#50 + # source://i18n//lib/i18n.rb#51 def reserved_keys_pattern; end end end @@ -124,15 +124,15 @@ module I18n::Backend::Base # # @raise [NotImplementedError] # - # source://i18n//lib/i18n/backend/base.rb#96 + # source://i18n//lib/i18n/backend/base.rb#97 def available_locales; end - # source://i18n//lib/i18n/backend/base.rb#104 + # source://i18n//lib/i18n/backend/base.rb#105 def eager_load!; end # @return [Boolean] # - # source://i18n//lib/i18n/backend/base.rb#70 + # source://i18n//lib/i18n/backend/base.rb#71 def exists?(locale, key, options = T.unsafe(nil)); end # Accepts a list of paths to translation files. Loads translations from @@ -148,10 +148,10 @@ module I18n::Backend::Base # # @raise [ArgumentError] # - # source://i18n//lib/i18n/backend/base.rb#77 + # source://i18n//lib/i18n/backend/base.rb#78 def localize(locale, object, format = T.unsafe(nil), options = T.unsafe(nil)); end - # source://i18n//lib/i18n/backend/base.rb#100 + # source://i18n//lib/i18n/backend/base.rb#101 def reload!; end # This method receives a locale, a data hash and options for storing translations. @@ -175,7 +175,7 @@ module I18n::Backend::Base # ann: 'good', john: 'big' # #=> { people: { ann: "Ann is good", john: "John is big" } } # - # source://i18n//lib/i18n/backend/base.rb#209 + # source://i18n//lib/i18n/backend/base.rb#217 def deep_interpolate(locale, data, values = T.unsafe(nil)); end # Evaluates defaults. @@ -183,12 +183,12 @@ module I18n::Backend::Base # first translation that can be resolved. Otherwise it tries to resolve # the translation directly. # - # source://i18n//lib/i18n/backend/base.rb#127 + # source://i18n//lib/i18n/backend/base.rb#128 def default(locale, object, subject, options = T.unsafe(nil)); end # @return [Boolean] # - # source://i18n//lib/i18n/backend/base.rb#110 + # source://i18n//lib/i18n/backend/base.rb#111 def eager_loaded?; end # Interpolates values into a given subject. @@ -202,7 +202,7 @@ module I18n::Backend::Base # method interpolates ["yes, %{user}", ["maybe no, %{user}", "no, %{user}"]], :user => "bartuz" # # => ["yes, bartuz", ["maybe no, bartuz", "no, bartuz"]] # - # source://i18n//lib/i18n/backend/base.rb#193 + # source://i18n//lib/i18n/backend/base.rb#201 def interpolate(locale, subject, values = T.unsafe(nil)); end # Loads a single translations file by delegating to #load_rb or @@ -212,41 +212,41 @@ module I18n::Backend::Base # # @raise [UnknownFileType] # - # source://i18n//lib/i18n/backend/base.rb#232 + # source://i18n//lib/i18n/backend/base.rb#240 def load_file(filename); end # Loads a JSON translations file. The data must have locales as # toplevel keys. # - # source://i18n//lib/i18n/backend/base.rb#268 + # source://i18n//lib/i18n/backend/base.rb#276 def load_json(filename); end # Loads a plain Ruby translations file. eval'ing the file must yield # a Hash containing translation data with locales as toplevel keys. # - # source://i18n//lib/i18n/backend/base.rb#246 + # source://i18n//lib/i18n/backend/base.rb#254 def load_rb(filename); end # Loads a YAML translations file. The data must have locales as # toplevel keys. # - # source://i18n//lib/i18n/backend/base.rb#253 + # source://i18n//lib/i18n/backend/base.rb#261 def load_yaml(filename); end # Loads a YAML translations file. The data must have locales as # toplevel keys. # - # source://i18n//lib/i18n/backend/base.rb#253 + # source://i18n//lib/i18n/backend/base.rb#261 def load_yml(filename); end # The method which actually looks up for the translation in the store. # # @raise [NotImplementedError] # - # source://i18n//lib/i18n/backend/base.rb#115 + # source://i18n//lib/i18n/backend/base.rb#116 def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end - # source://i18n//lib/i18n/backend/base.rb#300 + # source://i18n//lib/i18n/backend/base.rb#308 def pluralization_key(entry, count); end # Picks a translation from a pluralized mnemonic subkey according to English @@ -260,7 +260,7 @@ module I18n::Backend::Base # # @raise [InvalidPluralizationData] # - # source://i18n//lib/i18n/backend/base.rb#174 + # source://i18n//lib/i18n/backend/base.rb#182 def pluralize(locale, entry, count); end # Resolves a translation. @@ -268,7 +268,7 @@ module I18n::Backend::Base # given options. If it is a Proc then it will be evaluated. All other # subjects will be returned directly. # - # source://i18n//lib/i18n/backend/base.rb#149 + # source://i18n//lib/i18n/backend/base.rb#150 def resolve(locale, object, subject, options = T.unsafe(nil)); end # Resolves a translation. @@ -276,15 +276,15 @@ module I18n::Backend::Base # given options. If it is a Proc then it will be evaluated. All other # subjects will be returned directly. # - # source://i18n//lib/i18n/backend/base.rb#149 + # source://i18n//lib/i18n/backend/base.rb#150 def resolve_entry(locale, object, subject, options = T.unsafe(nil)); end # @return [Boolean] # - # source://i18n//lib/i18n/backend/base.rb#119 + # source://i18n//lib/i18n/backend/base.rb#120 def subtrees?; end - # source://i18n//lib/i18n/backend/base.rb#281 + # source://i18n//lib/i18n/backend/base.rb#289 def translate_localization_format(locale, object, format, options); end end @@ -448,10 +448,10 @@ end module I18n::Backend::Fallbacks # @return [Boolean] # - # source://i18n//lib/i18n/backend/fallbacks.rb#94 + # source://i18n//lib/i18n/backend/fallbacks.rb#98 def exists?(locale, key, options = T.unsafe(nil)); end - # source://i18n//lib/i18n/backend/fallbacks.rb#85 + # source://i18n//lib/i18n/backend/fallbacks.rb#89 def extract_non_symbol_default!(options); end # source://i18n//lib/i18n/backend/fallbacks.rb#67 @@ -475,7 +475,7 @@ module I18n::Backend::Fallbacks # Overwrite on_fallback to add specified logic when the fallback succeeds. # - # source://i18n//lib/i18n/backend/fallbacks.rb#110 + # source://i18n//lib/i18n/backend/fallbacks.rb#114 def on_fallback(_original_locale, _fallback_locale, _key, _options); end end @@ -1061,14 +1061,14 @@ end # The implementation is provided by a Implementation module allowing to easily # extend Simple backend's behavior by including modules. E.g.: # -# module I18n::Backend::Pluralization -# def pluralize(*args) -# # extended pluralization logic -# super -# end -# end +# module I18n::Backend::Pluralization +# def pluralize(*args) +# # extended pluralization logic +# super +# end +# end # -# I18n::Backend::Simple.include(I18n::Backend::Pluralization) +# I18n::Backend::Simple.include(I18n::Backend::Pluralization) # # source://i18n//lib/i18n/backend/simple.rb#21 class I18n::Backend::Simple @@ -1193,69 +1193,69 @@ class I18n::Backend::Transliterator::ProcTransliterator def transliterate(string, replacement = T.unsafe(nil)); end end -# source://i18n//lib/i18n.rb#54 +# source://i18n//lib/i18n.rb#55 module I18n::Base - # source://i18n//lib/i18n.rb#69 + # source://i18n//lib/i18n.rb#70 def available_locales; end - # source://i18n//lib/i18n.rb#73 + # source://i18n//lib/i18n.rb#74 def available_locales=(value); end # @return [Boolean] # - # source://i18n//lib/i18n.rb#384 + # source://i18n//lib/i18n.rb#386 def available_locales_initialized?; end - # source://i18n//lib/i18n.rb#69 + # source://i18n//lib/i18n.rb#70 def backend; end - # source://i18n//lib/i18n.rb#73 + # source://i18n//lib/i18n.rb#74 def backend=(value); end # Gets I18n configuration object. # - # source://i18n//lib/i18n.rb#56 + # source://i18n//lib/i18n.rb#57 def config; end # Sets I18n configuration object. # - # source://i18n//lib/i18n.rb#61 + # source://i18n//lib/i18n.rb#62 def config=(value); end - # source://i18n//lib/i18n.rb#69 + # source://i18n//lib/i18n.rb#70 def default_locale; end - # source://i18n//lib/i18n.rb#73 + # source://i18n//lib/i18n.rb#74 def default_locale=(value); end - # source://i18n//lib/i18n.rb#69 + # source://i18n//lib/i18n.rb#70 def default_separator; end - # source://i18n//lib/i18n.rb#73 + # source://i18n//lib/i18n.rb#74 def default_separator=(value); end # Tells the backend to load translations now. Used in situations like the # Rails production environment. Backends can implement whatever strategy # is useful. # - # source://i18n//lib/i18n.rb#90 + # source://i18n//lib/i18n.rb#91 def eager_load!; end - # source://i18n//lib/i18n.rb#69 + # source://i18n//lib/i18n.rb#70 def enforce_available_locales; end # Raises an InvalidLocale exception when the passed locale is not available. # - # source://i18n//lib/i18n.rb#378 + # source://i18n//lib/i18n.rb#380 def enforce_available_locales!(locale); end - # source://i18n//lib/i18n.rb#73 + # source://i18n//lib/i18n.rb#74 def enforce_available_locales=(value); end - # source://i18n//lib/i18n.rb#69 + # source://i18n//lib/i18n.rb#70 def exception_handler; end - # source://i18n//lib/i18n.rb#73 + # source://i18n//lib/i18n.rb#74 def exception_handler=(value); end # Returns true if a translation exists for a given key, otherwise returns false. @@ -1263,7 +1263,7 @@ module I18n::Base # @raise [Disabled] # @return [Boolean] # - # source://i18n//lib/i18n.rb#264 + # source://i18n//lib/i18n.rb#265 def exists?(key, _locale = T.unsafe(nil), locale: T.unsafe(nil), **options); end # Returns an array of interpolation keys for the given translation key @@ -1288,26 +1288,26 @@ module I18n::Base # # @raise [I18n::ArgumentError] # - # source://i18n//lib/i18n.rb#253 + # source://i18n//lib/i18n.rb#254 def interpolation_keys(key, **options); end # Localizes certain objects, such as dates and numbers to local formatting. # # @raise [Disabled] # - # source://i18n//lib/i18n.rb#333 + # source://i18n//lib/i18n.rb#335 def l(object, locale: T.unsafe(nil), format: T.unsafe(nil), **options); end - # source://i18n//lib/i18n.rb#69 + # source://i18n//lib/i18n.rb#70 def load_path; end - # source://i18n//lib/i18n.rb#73 + # source://i18n//lib/i18n.rb#74 def load_path=(value); end - # source://i18n//lib/i18n.rb#69 + # source://i18n//lib/i18n.rb#70 def locale; end - # source://i18n//lib/i18n.rb#73 + # source://i18n//lib/i18n.rb#74 def locale=(value); end # Returns true when the passed locale, which can be either a String or a @@ -1315,28 +1315,28 @@ module I18n::Base # # @return [Boolean] # - # source://i18n//lib/i18n.rb#373 + # source://i18n//lib/i18n.rb#375 def locale_available?(locale); end # Localizes certain objects, such as dates and numbers to local formatting. # # @raise [Disabled] # - # source://i18n//lib/i18n.rb#333 + # source://i18n//lib/i18n.rb#335 def localize(object, locale: T.unsafe(nil), format: T.unsafe(nil), **options); end # Merges the given locale, key and scope into a single array of keys. # Splits keys that contain dots into multiple keys. Makes sure all # keys are Symbols. # - # source://i18n//lib/i18n.rb#361 + # source://i18n//lib/i18n.rb#363 def normalize_keys(locale, key, scope, separator = T.unsafe(nil)); end # Tells the backend to reload translations. Used in situations like the # Rails development environment. Backends can implement whatever strategy # is useful. # - # source://i18n//lib/i18n.rb#82 + # source://i18n//lib/i18n.rb#83 def reload!; end # Translates, pluralizes and interpolates a given key using a given locale, @@ -1409,7 +1409,7 @@ module I18n::Base # or default if no translations for :foo and :bar were found. # I18n.t :foo, :default => [:bar, 'default'] # - # *BULK LOOKUP* + # BULK LOOKUP # # This returns an array with the translations for :foo and :bar. # I18n.t [:foo, :bar] @@ -1428,7 +1428,7 @@ module I18n::Base # E.g. assuming the key :salutation resolves to: # lambda { |key, options| options[:gender] == 'm' ? "Mr. #{options[:name]}" : "Mrs. #{options[:name]}" } # - # Then I18n.t(:salutation, :gender => 'w', :name => 'Smith') will result in "Mrs. Smith". + # Then I18n.t(:salutation, :gender => 'w', :name => 'Smith') will result in "Mrs. Smith". # # Note that the string returned by lambda will go through string interpolation too, # so the following lambda would give the same result: @@ -1440,7 +1440,7 @@ module I18n::Base # always return the same translations/values per unique combination of argument # values. # - # *Ruby 2.7+ keyword arguments warning* + # Ruby 2.7+ keyword arguments warning # # This method uses keyword arguments. # There is a breaking change in ruby that produces warning with ruby 2.7 and won't work as expected with ruby 3.0 @@ -1457,13 +1457,13 @@ module I18n::Base # # @raise [Disabled] # - # source://i18n//lib/i18n.rb#210 + # source://i18n//lib/i18n.rb#211 def t(key = T.unsafe(nil), throw: T.unsafe(nil), raise: T.unsafe(nil), locale: T.unsafe(nil), **options); end # Wrapper for translate that adds :raise => true. With # this option, if no translation is found, it will raise I18n::MissingTranslationData # - # source://i18n//lib/i18n.rb#229 + # source://i18n//lib/i18n.rb#230 def t!(key, **options); end # Translates, pluralizes and interpolates a given key using a given locale, @@ -1536,7 +1536,7 @@ module I18n::Base # or default if no translations for :foo and :bar were found. # I18n.t :foo, :default => [:bar, 'default'] # - # *BULK LOOKUP* + # BULK LOOKUP # # This returns an array with the translations for :foo and :bar. # I18n.t [:foo, :bar] @@ -1555,7 +1555,7 @@ module I18n::Base # E.g. assuming the key :salutation resolves to: # lambda { |key, options| options[:gender] == 'm' ? "Mr. #{options[:name]}" : "Mrs. #{options[:name]}" } # - # Then I18n.t(:salutation, :gender => 'w', :name => 'Smith') will result in "Mrs. Smith". + # Then I18n.t(:salutation, :gender => 'w', :name => 'Smith') will result in "Mrs. Smith". # # Note that the string returned by lambda will go through string interpolation too, # so the following lambda would give the same result: @@ -1567,7 +1567,7 @@ module I18n::Base # always return the same translations/values per unique combination of argument # values. # - # *Ruby 2.7+ keyword arguments warning* + # Ruby 2.7+ keyword arguments warning # # This method uses keyword arguments. # There is a breaking change in ruby that produces warning with ruby 2.7 and won't work as expected with ruby 3.0 @@ -1584,13 +1584,13 @@ module I18n::Base # # @raise [Disabled] # - # source://i18n//lib/i18n.rb#210 + # source://i18n//lib/i18n.rb#211 def translate(key = T.unsafe(nil), throw: T.unsafe(nil), raise: T.unsafe(nil), locale: T.unsafe(nil), **options); end # Wrapper for translate that adds :raise => true. With # this option, if no translation is found, it will raise I18n::MissingTranslationData # - # source://i18n//lib/i18n.rb#229 + # source://i18n//lib/i18n.rb#230 def translate!(key, **options); end # Transliterates UTF-8 characters to ASCII. By default this method will @@ -1645,12 +1645,12 @@ module I18n::Base # I18n.transliterate("Jürgen", :locale => :en) # => "Jurgen" # I18n.transliterate("Jürgen", :locale => :de) # => "Juergen" # - # source://i18n//lib/i18n.rb#322 + # source://i18n//lib/i18n.rb#324 def transliterate(key, throw: T.unsafe(nil), raise: T.unsafe(nil), locale: T.unsafe(nil), replacement: T.unsafe(nil), **options); end # Executes block with given I18n.locale set. # - # source://i18n//lib/i18n.rb#344 + # source://i18n//lib/i18n.rb#346 def with_locale(tmp_locale = T.unsafe(nil)); end private @@ -1674,16 +1674,16 @@ module I18n::Base # I18n.exception_handler = I18nExceptionHandler.new # an object # I18n.exception_handler.call(exception, locale, key, options) # will be called like this # - # source://i18n//lib/i18n.rb#420 + # source://i18n//lib/i18n.rb#422 def handle_exception(handling, exception, locale, key, options); end - # source://i18n//lib/i18n.rb#462 + # source://i18n//lib/i18n.rb#464 def interpolation_keys_from_translation(translation); end - # source://i18n//lib/i18n.rb#438 + # source://i18n//lib/i18n.rb#440 def normalize_key(key, separator); end - # source://i18n//lib/i18n.rb#390 + # source://i18n//lib/i18n.rb#392 def translate_key(key, throw, raise, locale, backend, options); end end @@ -1845,7 +1845,7 @@ class I18n::Disabled < ::I18n::ArgumentError def initialize(method); end end -# source://i18n//lib/i18n.rb#35 +# source://i18n//lib/i18n.rb#36 I18n::EMPTY_HASH = T.let(T.unsafe(nil), Hash) # source://i18n//lib/i18n/exceptions.rb#6 diff --git a/sorbet/rbi/gems/json@2.7.2.rbi b/sorbet/rbi/gems/json@2.7.4.rbi similarity index 91% rename from sorbet/rbi/gems/json@2.7.2.rbi rename to sorbet/rbi/gems/json@2.7.4.rbi index 1558aa4..5fb5bd9 100644 --- a/sorbet/rbi/gems/json@2.7.2.rbi +++ b/sorbet/rbi/gems/json@2.7.4.rbi @@ -7,7 +7,7 @@ # Extends any Class to include _json_creatable?_ method. # -# source://json//lib/json/common.rb#690 +# source://json//lib/json/common.rb#721 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 @@ -16,7 +16,7 @@ class Class < ::Module # # @return [Boolean] # - # source://json//lib/json/common.rb#695 + # source://json//lib/json/common.rb#726 def json_creatable?; end end @@ -599,7 +599,7 @@ end # Without custom addition: "#" (String) # With custom addition: # (Foo) # -# source://json//lib/json/version.rb#2 +# source://json//lib/json/version.rb#3 module JSON private @@ -631,7 +631,7 @@ module JSON # Output: # {"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"} # - # source://json//lib/json/common.rb#615 + # source://json//lib/json/common.rb#625 def dump(obj, anIO = T.unsafe(nil), limit = T.unsafe(nil), kwargs = T.unsafe(nil)); end # :call-seq: @@ -648,13 +648,13 @@ module JSON # # Raises SystemStackError (stack level too deep): # JSON.fast_generate(a) # - # source://json//lib/json/common.rb#329 + # source://json//lib/json/common.rb#332 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#329 + # source://json//lib/json/common.rb#332 def fast_unparse(obj, opts = T.unsafe(nil)); end # :call-seq: @@ -693,7 +693,7 @@ module JSON # # Raises JSON::NestingError (nesting of 100 is too deep): # JSON.generate(a) # - # source://json//lib/json/common.rb#300 + # source://json//lib/json/common.rb#303 def generate(obj, opts = T.unsafe(nil)); end # :call-seq: @@ -824,7 +824,7 @@ module JSON # #"Admin", "password"=>"0wn3d"}>} # - # source://json//lib/json/common.rb#541 + # source://json//lib/json/common.rb#544 def load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end # :call-seq: @@ -835,7 +835,7 @@ module JSON # # See method #parse. # - # source://json//lib/json/common.rb#249 + # source://json//lib/json/common.rb#252 def load_file(filespec, opts = T.unsafe(nil)); end # :call-seq: @@ -846,10 +846,10 @@ module JSON # # See method #parse! # - # source://json//lib/json/common.rb#260 + # source://json//lib/json/common.rb#263 def load_file!(filespec, opts = T.unsafe(nil)); end - # source://json//lib/json/common.rb#643 + # source://json//lib/json/common.rb#669 def merge_dump_options(opts, strict: T.unsafe(nil)); end # :call-seq: @@ -900,7 +900,7 @@ module JSON # # Raises JSON::ParserError (783: unexpected token at ''): # JSON.parse('') # - # source://json//lib/json/common.rb#219 + # source://json//lib/json/common.rb#218 def parse(source, opts = T.unsafe(nil)); end # :call-seq: @@ -915,7 +915,7 @@ module JSON # which disables checking for nesting depth. # - Option +allow_nan+, if not provided, defaults to +true+. # - # source://json//lib/json/common.rb#234 + # source://json//lib/json/common.rb#237 def parse!(source, opts = T.unsafe(nil)); end # :call-seq: @@ -948,28 +948,28 @@ module JSON # } # } # - # source://json//lib/json/common.rb#374 + # source://json//lib/json/common.rb#377 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#374 + # source://json//lib/json/common.rb#377 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#559 + # source://json//lib/json/common.rb#570 def recurse_proc(result, &proc); end - # source://json//lib/json/common.rb#541 + # source://json//lib/json/common.rb#544 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#300 + # source://json//lib/json/common.rb#303 def unparse(obj, opts = T.unsafe(nil)); end class << self @@ -988,23 +988,23 @@ module JSON # source://json//lib/json/common.rb#22 def [](object, opts = T.unsafe(nil)); end - # source://json//lib/json/common.rb#85 + # source://json//lib/json/common.rb#90 def create_fast_state; end # Returns the current create identifier. # See also JSON.create_id=. # - # source://json//lib/json/common.rb#130 + # source://json//lib/json/common.rb#129 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#124 + # source://json//lib/json/common.rb#123 def create_id=(new_value); end - # source://json//lib/json/common.rb#95 + # source://json//lib/json/common.rb#100 def create_pretty_state; end # Return the constant located at _path_. The format of _path_ has to be @@ -1012,7 +1012,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#46 + # source://json//lib/json/common.rb#51 def deep_const_get(path); end # :call-seq: @@ -1043,23 +1043,23 @@ module JSON # Output: # {"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"} # - # source://json//lib/json/common.rb#615 + # source://json//lib/json/common.rb#625 def dump(obj, anIO = T.unsafe(nil), limit = T.unsafe(nil), kwargs = T.unsafe(nil)); end # Sets or returns the default options for the JSON.dump method. # Initially: # opts = JSON.dump_default_options - # opts # => {:max_nesting=>false, :allow_nan=>true, :script_safe=>false} + # opts # => {:max_nesting=>false, :allow_nan=>true} # - # source://json//lib/json/common.rb#580 + # source://json//lib/json/common.rb#591 def dump_default_options; end # Sets or returns the default options for the JSON.dump method. # Initially: # opts = JSON.dump_default_options - # opts # => {:max_nesting=>false, :allow_nan=>true, :script_safe=>false} + # opts # => {:max_nesting=>false, :allow_nan=>true} # - # source://json//lib/json/common.rb#580 + # source://json//lib/json/common.rb#591 def dump_default_options=(_arg0); end # :call-seq: @@ -1076,13 +1076,13 @@ module JSON # # Raises SystemStackError (stack level too deep): # JSON.fast_generate(a) # - # source://json//lib/json/common.rb#329 + # source://json//lib/json/common.rb#332 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#329 + # source://json//lib/json/common.rb#332 def fast_unparse(obj, opts = T.unsafe(nil)); end # :call-seq: @@ -1121,24 +1121,24 @@ module JSON # # Raises JSON::NestingError (nesting of 100 is too deep): # JSON.generate(a) # - # source://json//lib/json/common.rb#300 + # source://json//lib/json/common.rb#303 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#107 + # source://json//lib/json/common.rb#112 def generator; end # Set the module _generator_ to be used by JSON. # - # source://json//lib/json/common.rb#62 + # source://json//lib/json/common.rb#67 def generator=(generator); end # Encodes string using String.encode. # - # source://json//lib/json/common.rb#639 + # source://json//lib/json/common.rb#665 def iconv(to, from, string); end # :call-seq: @@ -1269,7 +1269,7 @@ module JSON # #"Admin", "password"=>"0wn3d"}>} # - # source://json//lib/json/common.rb#541 + # source://json//lib/json/common.rb#544 def load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end # Sets or returns default options for the JSON.load method. @@ -1277,7 +1277,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#404 + # source://json//lib/json/common.rb#407 def load_default_options; end # Sets or returns default options for the JSON.load method. @@ -1285,7 +1285,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#404 + # source://json//lib/json/common.rb#407 def load_default_options=(_arg0); end # :call-seq: @@ -1296,7 +1296,7 @@ module JSON # # See method #parse. # - # source://json//lib/json/common.rb#249 + # source://json//lib/json/common.rb#252 def load_file(filespec, opts = T.unsafe(nil)); end # :call-seq: @@ -1307,7 +1307,7 @@ module JSON # # See method #parse! # - # source://json//lib/json/common.rb#260 + # source://json//lib/json/common.rb#263 def load_file!(filespec, opts = T.unsafe(nil)); end # :call-seq: @@ -1358,7 +1358,7 @@ module JSON # # Raises JSON::ParserError (783: unexpected token at ''): # JSON.parse('') # - # source://json//lib/json/common.rb#219 + # source://json//lib/json/common.rb#218 def parse(source, opts = T.unsafe(nil)); end # :call-seq: @@ -1373,19 +1373,19 @@ module JSON # which disables checking for nesting depth. # - Option +allow_nan+, if not provided, defaults to +true+. # - # source://json//lib/json/common.rb#234 + # source://json//lib/json/common.rb#237 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#33 + # source://json//lib/json/common.rb#38 def parser; end # Set the JSON parser class _parser_ to be used by JSON. # - # source://json//lib/json/common.rb#36 + # source://json//lib/json/common.rb#41 def parser=(parser); end # :call-seq: @@ -1418,56 +1418,123 @@ module JSON # } # } # - # source://json//lib/json/common.rb#374 + # source://json//lib/json/common.rb#377 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#374 + # source://json//lib/json/common.rb#377 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#559 + # source://json//lib/json/common.rb#570 def recurse_proc(result, &proc); end - # source://json//lib/json/common.rb#541 + # source://json//lib/json/common.rb#544 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#112 + # source://json//lib/json/common.rb#117 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#112 + # source://json//lib/json/common.rb#117 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#300 + # source://json//lib/json/common.rb#303 def unparse(obj, opts = T.unsafe(nil)); end private - # source://json//lib/json/common.rb#643 + # source://json//lib/json/common.rb#669 def merge_dump_options(opts, strict: T.unsafe(nil)); end end end -# source://json//lib/json/common.rb#118 -JSON::CREATE_ID_TLS_KEY = T.let(T.unsafe(nil), String) +# source://json//lib/json/ext/generator/state.rb#6 +class JSON::Ext::Generator::State + # call-seq: new(opts = {}) + # + # Instantiates a new State object, configured by _opts_. + # + # _opts_ can have the following keys: + # + # * *indent*: a string used to indent levels (default: ''), + # * *space*: a string that is put after, a : or , delimiter (default: ''), + # * *space_before*: a string that is put before a : pair delimiter (default: ''), + # * *object_nl*: a string that is put at the end of a JSON object (default: ''), + # * *array_nl*: a string that is put at the end of a JSON array (default: ''), + # * *allow_nan*: true if NaN, Infinity, and -Infinity should be + # generated, otherwise an exception is thrown, if these values are + # encountered. This options defaults to false. + # * *ascii_only*: true if only ASCII characters should be generated. This + # option defaults to false. + # * *buffer_initial_length*: sets the initial length of the generator's + # internal buffer. + # + # @return [State] a new instance of State + # + # source://json//lib/json/ext/generator/state.rb#25 + def initialize(opts = T.unsafe(nil)); end + + # call-seq: [](name) + # + # Returns the value returned by method +name+. + # + # source://json//lib/json/ext/generator/state.rb#113 + def [](name); end + + # call-seq: []=(name, value) + # + # Sets the attribute name to value. + # + # source://json//lib/json/ext/generator/state.rb#125 + def []=(name, value); end -# source://json//lib/json/common.rb#115 -JSON::DEFAULT_CREATE_ID = T.let(T.unsafe(nil), String) + # call-seq: configure(opts) + # + # Configure this State instance with the Hash _opts_, and return + # itself. + # + # source://json//lib/json/ext/generator/state.rb#35 + def configure(opts); end + + # call-seq: configure(opts) + # + # Configure this State instance with the Hash _opts_, and return + # itself. + # + # source://json//lib/json/ext/generator/state.rb#35 + def merge(opts); end + + # call-seq: to_h + # + # Returns the configuration instance variables as a hash, that can be + # passed to the configure method. + # + # source://json//lib/json/ext/generator/state.rb#84 + def to_h; end + + # call-seq: to_h + # + # Returns the configuration instance variables as a hash, that can be + # passed to the configure method. + # + # source://json//lib/json/ext/generator/state.rb#84 + def to_hash; end +end # source://json//lib/json/generic_object.rb#9 class JSON::GenericObject < ::OpenStruct @@ -1512,10 +1579,10 @@ end # The base exception for JSON errors. # -# source://json//lib/json/common.rb#141 +# source://json//lib/json/common.rb#140 class JSON::JSONError < ::StandardError class << self - # source://json//lib/json/common.rb#142 + # source://json//lib/json/common.rb#141 def wrap(exception); end end end @@ -1523,18 +1590,18 @@ end # source://json//lib/json/common.rb#7 JSON::NOT_SET = T.let(T.unsafe(nil), Object) -# source://json//lib/json/common.rb#39 +# source://json//lib/json/common.rb#44 JSON::Parser = JSON::Ext::Parser -# source://json//lib/json/common.rb#77 +# source://json//lib/json/common.rb#82 JSON::State = JSON::Ext::Generator::State # For backwards compatibility # -# source://json//lib/json/common.rb#163 +# source://json//lib/json/common.rb#162 JSON::UnparserError = JSON::GeneratorError -# source://json//lib/json/common.rb#653 +# source://json//lib/json/common.rb#679 module Kernel private @@ -1545,18 +1612,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#680 + # source://json//lib/json/common.rb#706 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#658 + # source://json//lib/json/common.rb#684 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#667 + # source://json//lib/json/common.rb#693 def jj(*objs); end end diff --git a/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi b/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi index a0375c0..5f91e74 100644 --- a/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +++ b/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi @@ -5,14234 +5,5 @@ # Please instead update this file by running `bin/tapioca gem language_server-protocol`. -# source://language_server-protocol//lib/language_server/protocol/version.rb#1 -module LanguageServer; end - -# source://language_server-protocol//lib/language_server/protocol/version.rb#2 -module LanguageServer::Protocol; end - -# source://language_server-protocol//lib/language_server/protocol/constant.rb#3 -module LanguageServer::Protocol::Constant; end - -# The kind of a code action. -# -# Kinds are a hierarchical list of identifiers separated by `.`, -# e.g. `"refactor.extract.function"`. -# -# The set of kinds is open and client needs to announce the kinds it supports -# to the server during initialization. -# A set of predefined code action kinds. -# -# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#14 -module LanguageServer::Protocol::Constant::CodeActionKind; end - -# Empty kind. -# -# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#18 -LanguageServer::Protocol::Constant::CodeActionKind::EMPTY = T.let(T.unsafe(nil), String) - -# Base kind for quickfix actions: 'quickfix'. -# -# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#22 -LanguageServer::Protocol::Constant::CodeActionKind::QUICK_FIX = T.let(T.unsafe(nil), String) - -# Base kind for refactoring actions: 'refactor'. -# -# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#26 -LanguageServer::Protocol::Constant::CodeActionKind::REFACTOR = T.let(T.unsafe(nil), String) - -# Base kind for refactoring extraction actions: 'refactor.extract'. -# -# Example extract actions: -# -# - Extract method -# - Extract function -# - Extract variable -# - Extract interface from class -# - ... -# -# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#38 -LanguageServer::Protocol::Constant::CodeActionKind::REFACTOR_EXTRACT = T.let(T.unsafe(nil), String) - -# Base kind for refactoring inline actions: 'refactor.inline'. -# -# Example inline actions: -# -# - Inline function -# - Inline variable -# - Inline constant -# - ... -# -# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#49 -LanguageServer::Protocol::Constant::CodeActionKind::REFACTOR_INLINE = T.let(T.unsafe(nil), String) - -# Base kind for refactoring rewrite actions: 'refactor.rewrite'. -# -# Example rewrite actions: -# -# - Convert JavaScript function to class -# - Add or remove parameter -# - Encapsulate field -# - Make method static -# - Move method to base class -# - ... -# -# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#62 -LanguageServer::Protocol::Constant::CodeActionKind::REFACTOR_REWRITE = T.let(T.unsafe(nil), String) - -# Base kind for source actions: `source`. -# -# Source code actions apply to the entire file. -# -# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#68 -LanguageServer::Protocol::Constant::CodeActionKind::SOURCE = T.let(T.unsafe(nil), String) - -# Base kind for a 'fix all' source action: `source.fixAll`. -# -# 'Fix all' actions automatically fix errors that have a clear fix that -# do not require user input. They should not suppress errors or perform -# unsafe fixes such as generating new types or classes. -# -# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#81 -LanguageServer::Protocol::Constant::CodeActionKind::SOURCE_FIX_ALL = T.let(T.unsafe(nil), String) - -# Base kind for an organize imports source action: -# `source.organizeImports`. -# -# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#73 -LanguageServer::Protocol::Constant::CodeActionKind::SOURCE_ORGANIZE_IMPORTS = T.let(T.unsafe(nil), String) - -# The reason why code actions were requested. -# -# source://language_server-protocol//lib/language_server/protocol/constant/code_action_trigger_kind.rb#7 -module LanguageServer::Protocol::Constant::CodeActionTriggerKind; end - -# Code actions were requested automatically. -# -# This typically happens when current selection in a file changes, but can -# also be triggered when file content changes. -# -# source://language_server-protocol//lib/language_server/protocol/constant/code_action_trigger_kind.rb#18 -LanguageServer::Protocol::Constant::CodeActionTriggerKind::AUTOMATIC = T.let(T.unsafe(nil), Integer) - -# Code actions were explicitly requested by the user or by an extension. -# -# source://language_server-protocol//lib/language_server/protocol/constant/code_action_trigger_kind.rb#11 -LanguageServer::Protocol::Constant::CodeActionTriggerKind::INVOKED = T.let(T.unsafe(nil), Integer) - -# The kind of a completion entry. -# -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#7 -module LanguageServer::Protocol::Constant::CompletionItemKind; end - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#14 -LanguageServer::Protocol::Constant::CompletionItemKind::CLASS = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#23 -LanguageServer::Protocol::Constant::CompletionItemKind::COLOR = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#28 -LanguageServer::Protocol::Constant::CompletionItemKind::CONSTANT = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#11 -LanguageServer::Protocol::Constant::CompletionItemKind::CONSTRUCTOR = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#20 -LanguageServer::Protocol::Constant::CompletionItemKind::ENUM = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#27 -LanguageServer::Protocol::Constant::CompletionItemKind::ENUM_MEMBER = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#30 -LanguageServer::Protocol::Constant::CompletionItemKind::EVENT = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#12 -LanguageServer::Protocol::Constant::CompletionItemKind::FIELD = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#24 -LanguageServer::Protocol::Constant::CompletionItemKind::FILE = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#26 -LanguageServer::Protocol::Constant::CompletionItemKind::FOLDER = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#10 -LanguageServer::Protocol::Constant::CompletionItemKind::FUNCTION = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#15 -LanguageServer::Protocol::Constant::CompletionItemKind::INTERFACE = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#21 -LanguageServer::Protocol::Constant::CompletionItemKind::KEYWORD = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#9 -LanguageServer::Protocol::Constant::CompletionItemKind::METHOD = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#16 -LanguageServer::Protocol::Constant::CompletionItemKind::MODULE = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#31 -LanguageServer::Protocol::Constant::CompletionItemKind::OPERATOR = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#17 -LanguageServer::Protocol::Constant::CompletionItemKind::PROPERTY = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#25 -LanguageServer::Protocol::Constant::CompletionItemKind::REFERENCE = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#22 -LanguageServer::Protocol::Constant::CompletionItemKind::SNIPPET = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#29 -LanguageServer::Protocol::Constant::CompletionItemKind::STRUCT = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#8 -LanguageServer::Protocol::Constant::CompletionItemKind::TEXT = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#32 -LanguageServer::Protocol::Constant::CompletionItemKind::TYPE_PARAMETER = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#18 -LanguageServer::Protocol::Constant::CompletionItemKind::UNIT = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#19 -LanguageServer::Protocol::Constant::CompletionItemKind::VALUE = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#13 -LanguageServer::Protocol::Constant::CompletionItemKind::VARIABLE = T.let(T.unsafe(nil), Integer) - -# Completion item tags are extra annotations that tweak the rendering of a -# completion item. -# -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_tag.rb#8 -module LanguageServer::Protocol::Constant::CompletionItemTag; end - -# Render a completion as obsolete, usually using a strike-out. -# -# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_tag.rb#12 -LanguageServer::Protocol::Constant::CompletionItemTag::DEPRECATED = T.let(T.unsafe(nil), Integer) - -# How a completion was triggered -# -# source://language_server-protocol//lib/language_server/protocol/constant/completion_trigger_kind.rb#7 -module LanguageServer::Protocol::Constant::CompletionTriggerKind; end - -# Completion was triggered by typing an identifier (24x7 code -# complete), manual invocation (e.g Ctrl+Space) or via API. -# -# source://language_server-protocol//lib/language_server/protocol/constant/completion_trigger_kind.rb#12 -LanguageServer::Protocol::Constant::CompletionTriggerKind::INVOKED = T.let(T.unsafe(nil), Integer) - -# Completion was triggered by a trigger character specified by -# the `triggerCharacters` properties of the -# `CompletionRegistrationOptions`. -# -# source://language_server-protocol//lib/language_server/protocol/constant/completion_trigger_kind.rb#18 -LanguageServer::Protocol::Constant::CompletionTriggerKind::TRIGGER_CHARACTER = T.let(T.unsafe(nil), Integer) - -# Completion was re-triggered as the current completion list is incomplete. -# -# source://language_server-protocol//lib/language_server/protocol/constant/completion_trigger_kind.rb#22 -LanguageServer::Protocol::Constant::CompletionTriggerKind::TRIGGER_FOR_INCOMPLETE_COMPLETIONS = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_severity.rb#4 -module LanguageServer::Protocol::Constant::DiagnosticSeverity; end - -# Reports an error. -# -# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_severity.rb#8 -LanguageServer::Protocol::Constant::DiagnosticSeverity::ERROR = T.let(T.unsafe(nil), Integer) - -# Reports a hint. -# -# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_severity.rb#20 -LanguageServer::Protocol::Constant::DiagnosticSeverity::HINT = T.let(T.unsafe(nil), Integer) - -# Reports an information. -# -# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_severity.rb#16 -LanguageServer::Protocol::Constant::DiagnosticSeverity::INFORMATION = T.let(T.unsafe(nil), Integer) - -# Reports a warning. -# -# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_severity.rb#12 -LanguageServer::Protocol::Constant::DiagnosticSeverity::WARNING = T.let(T.unsafe(nil), Integer) - -# The diagnostic tags. -# -# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_tag.rb#7 -module LanguageServer::Protocol::Constant::DiagnosticTag; end - -# Deprecated or obsolete code. -# -# Clients are allowed to rendered diagnostics with this tag strike through. -# -# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_tag.rb#20 -LanguageServer::Protocol::Constant::DiagnosticTag::DEPRECATED = T.let(T.unsafe(nil), Integer) - -# Unused or unnecessary code. -# -# Clients are allowed to render diagnostics with this tag faded out -# instead of having an error squiggle. -# -# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_tag.rb#14 -LanguageServer::Protocol::Constant::DiagnosticTag::UNNECESSARY = T.let(T.unsafe(nil), Integer) - -# The document diagnostic report kinds. -# -# source://language_server-protocol//lib/language_server/protocol/constant/document_diagnostic_report_kind.rb#7 -module LanguageServer::Protocol::Constant::DocumentDiagnosticReportKind; end - -# A diagnostic report with a full -# set of problems. -# -# source://language_server-protocol//lib/language_server/protocol/constant/document_diagnostic_report_kind.rb#12 -LanguageServer::Protocol::Constant::DocumentDiagnosticReportKind::FULL = T.let(T.unsafe(nil), String) - -# A report indicating that the last -# returned report is still accurate. -# -# source://language_server-protocol//lib/language_server/protocol/constant/document_diagnostic_report_kind.rb#17 -LanguageServer::Protocol::Constant::DocumentDiagnosticReportKind::UNCHANGED = T.let(T.unsafe(nil), String) - -# A document highlight kind. -# -# source://language_server-protocol//lib/language_server/protocol/constant/document_highlight_kind.rb#7 -module LanguageServer::Protocol::Constant::DocumentHighlightKind; end - -# Read-access of a symbol, like reading a variable. -# -# source://language_server-protocol//lib/language_server/protocol/constant/document_highlight_kind.rb#15 -LanguageServer::Protocol::Constant::DocumentHighlightKind::READ = T.let(T.unsafe(nil), Integer) - -# A textual occurrence. -# -# source://language_server-protocol//lib/language_server/protocol/constant/document_highlight_kind.rb#11 -LanguageServer::Protocol::Constant::DocumentHighlightKind::TEXT = T.let(T.unsafe(nil), Integer) - -# Write-access of a symbol, like writing to a variable. -# -# source://language_server-protocol//lib/language_server/protocol/constant/document_highlight_kind.rb#19 -LanguageServer::Protocol::Constant::DocumentHighlightKind::WRITE = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#4 -module LanguageServer::Protocol::Constant::ErrorCodes; end - -# The server detected that the content of a document got -# modified outside normal conditions. A server should -# NOT send this error code if it detects a content change -# in it unprocessed messages. The result even computed -# on an older state might still be useful for the client. -# -# If a client decides that a result is not of any use anymore -# the client should cancel the request. -# -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#59 -LanguageServer::Protocol::Constant::ErrorCodes::CONTENT_MODIFIED = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#9 -LanguageServer::Protocol::Constant::ErrorCodes::INTERNAL_ERROR = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#8 -LanguageServer::Protocol::Constant::ErrorCodes::INVALID_PARAMS = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#6 -LanguageServer::Protocol::Constant::ErrorCodes::INVALID_REQUEST = T.let(T.unsafe(nil), Integer) - -# This is the end range of JSON-RPC reserved error codes. -# It doesn't denote a real error code. -# -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#29 -LanguageServer::Protocol::Constant::ErrorCodes::JSONRPC_RESERVED_ERROR_RANGE_END = T.let(T.unsafe(nil), Integer) - -# This is the start range of JSON-RPC reserved error codes. -# It doesn't denote a real error code. No LSP error codes should -# be defined between the start and end range. For backwards -# compatibility the `ServerNotInitialized` and the `UnknownErrorCode` -# are left in the range. -# -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#17 -LanguageServer::Protocol::Constant::ErrorCodes::JSONRPC_RESERVED_ERROR_RANGE_START = T.let(T.unsafe(nil), Integer) - -# This is the end range of LSP reserved error codes. -# It doesn't denote a real error code. -# -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#69 -LanguageServer::Protocol::Constant::ErrorCodes::LSP_RESERVED_ERROR_RANGE_END = T.let(T.unsafe(nil), Integer) - -# This is the start range of LSP reserved error codes. -# It doesn't denote a real error code. -# -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#35 -LanguageServer::Protocol::Constant::ErrorCodes::LSP_RESERVED_ERROR_RANGE_START = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#7 -LanguageServer::Protocol::Constant::ErrorCodes::METHOD_NOT_FOUND = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#5 -LanguageServer::Protocol::Constant::ErrorCodes::PARSE_ERROR = T.let(T.unsafe(nil), Integer) - -# The client has canceled a request and a server as detected -# the cancel. -# -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#64 -LanguageServer::Protocol::Constant::ErrorCodes::REQUEST_CANCELLED = T.let(T.unsafe(nil), Integer) - -# A request failed but it was syntactically correct, e.g the -# method name was known and the parameters were valid. The error -# message should contain human readable information about why -# the request failed. -# -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#42 -LanguageServer::Protocol::Constant::ErrorCodes::REQUEST_FAILED = T.let(T.unsafe(nil), Integer) - -# The server cancelled the request. This error code should -# only be used for requests that explicitly support being -# server cancellable. -# -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#48 -LanguageServer::Protocol::Constant::ErrorCodes::SERVER_CANCELLED = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#30 -LanguageServer::Protocol::Constant::ErrorCodes::SERVER_ERROR_END = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#18 -LanguageServer::Protocol::Constant::ErrorCodes::SERVER_ERROR_START = T.let(T.unsafe(nil), Integer) - -# Error code indicating that a server received a notification or -# request before the server has received the `initialize` request. -# -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#23 -LanguageServer::Protocol::Constant::ErrorCodes::SERVER_NOT_INITIALIZED = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#24 -LanguageServer::Protocol::Constant::ErrorCodes::UNKNOWN_ERROR_CODE = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/failure_handling_kind.rb#4 -module LanguageServer::Protocol::Constant::FailureHandlingKind; end - -# Applying the workspace change is simply aborted if one of the changes -# provided fails. All operations executed before the failing operation -# stay executed. -# -# source://language_server-protocol//lib/language_server/protocol/constant/failure_handling_kind.rb#10 -LanguageServer::Protocol::Constant::FailureHandlingKind::ABORT = T.let(T.unsafe(nil), String) - -# If the workspace edit contains only textual file changes they are -# executed transactional. If resource changes (create, rename or delete -# file) are part of the change the failure handling strategy is abort. -# -# source://language_server-protocol//lib/language_server/protocol/constant/failure_handling_kind.rb#21 -LanguageServer::Protocol::Constant::FailureHandlingKind::TEXT_ONLY_TRANSACTIONAL = T.let(T.unsafe(nil), String) - -# All operations are executed transactional. That means they either all -# succeed or no changes at all are applied to the workspace. -# -# source://language_server-protocol//lib/language_server/protocol/constant/failure_handling_kind.rb#15 -LanguageServer::Protocol::Constant::FailureHandlingKind::TRANSACTIONAL = T.let(T.unsafe(nil), String) - -# The client tries to undo the operations already executed. But there is no -# guarantee that this is succeeding. -# -# source://language_server-protocol//lib/language_server/protocol/constant/failure_handling_kind.rb#26 -LanguageServer::Protocol::Constant::FailureHandlingKind::UNDO = T.let(T.unsafe(nil), String) - -# The file event type. -# -# source://language_server-protocol//lib/language_server/protocol/constant/file_change_type.rb#7 -module LanguageServer::Protocol::Constant::FileChangeType; end - -# The file got changed. -# -# source://language_server-protocol//lib/language_server/protocol/constant/file_change_type.rb#15 -LanguageServer::Protocol::Constant::FileChangeType::CHANGED = T.let(T.unsafe(nil), Integer) - -# The file got created. -# -# source://language_server-protocol//lib/language_server/protocol/constant/file_change_type.rb#11 -LanguageServer::Protocol::Constant::FileChangeType::CREATED = T.let(T.unsafe(nil), Integer) - -# The file got deleted. -# -# source://language_server-protocol//lib/language_server/protocol/constant/file_change_type.rb#19 -LanguageServer::Protocol::Constant::FileChangeType::DELETED = T.let(T.unsafe(nil), Integer) - -# A pattern kind describing if a glob pattern matches a file a folder or -# both. -# -# source://language_server-protocol//lib/language_server/protocol/constant/file_operation_pattern_kind.rb#8 -module LanguageServer::Protocol::Constant::FileOperationPatternKind; end - -# The pattern matches a file only. -# -# source://language_server-protocol//lib/language_server/protocol/constant/file_operation_pattern_kind.rb#12 -LanguageServer::Protocol::Constant::FileOperationPatternKind::FILE = T.let(T.unsafe(nil), String) - -# The pattern matches a folder only. -# -# source://language_server-protocol//lib/language_server/protocol/constant/file_operation_pattern_kind.rb#16 -LanguageServer::Protocol::Constant::FileOperationPatternKind::FOLDER = T.let(T.unsafe(nil), String) - -# A set of predefined range kinds. -# The type is a string since the value set is extensible -# -# source://language_server-protocol//lib/language_server/protocol/constant/folding_range_kind.rb#8 -module LanguageServer::Protocol::Constant::FoldingRangeKind; end - -# Folding range for a comment -# -# source://language_server-protocol//lib/language_server/protocol/constant/folding_range_kind.rb#12 -LanguageServer::Protocol::Constant::FoldingRangeKind::COMMENT = T.let(T.unsafe(nil), String) - -# Folding range for imports or includes -# -# source://language_server-protocol//lib/language_server/protocol/constant/folding_range_kind.rb#16 -LanguageServer::Protocol::Constant::FoldingRangeKind::IMPORTS = T.let(T.unsafe(nil), String) - -# Folding range for a region (e.g. `#region`) -# -# source://language_server-protocol//lib/language_server/protocol/constant/folding_range_kind.rb#20 -LanguageServer::Protocol::Constant::FoldingRangeKind::REGION = T.let(T.unsafe(nil), String) - -# Known error codes for an `InitializeErrorCodes`; -# -# source://language_server-protocol//lib/language_server/protocol/constant/initialize_error_codes.rb#7 -module LanguageServer::Protocol::Constant::InitializeErrorCodes; end - -# If the protocol version provided by the client can't be handled by -# the server. -# -# source://language_server-protocol//lib/language_server/protocol/constant/initialize_error_codes.rb#12 -LanguageServer::Protocol::Constant::InitializeErrorCodes::UNKNOWN_PROTOCOL_VERSION = T.let(T.unsafe(nil), Integer) - -# Inlay hint kinds. -# -# source://language_server-protocol//lib/language_server/protocol/constant/inlay_hint_kind.rb#7 -module LanguageServer::Protocol::Constant::InlayHintKind; end - -# An inlay hint that is for a parameter. -# -# source://language_server-protocol//lib/language_server/protocol/constant/inlay_hint_kind.rb#15 -LanguageServer::Protocol::Constant::InlayHintKind::PARAMETER = T.let(T.unsafe(nil), Integer) - -# An inlay hint that for a type annotation. -# -# source://language_server-protocol//lib/language_server/protocol/constant/inlay_hint_kind.rb#11 -LanguageServer::Protocol::Constant::InlayHintKind::TYPE = T.let(T.unsafe(nil), Integer) - -# Defines whether the insert text in a completion item should be interpreted as -# plain text or a snippet. -# -# source://language_server-protocol//lib/language_server/protocol/constant/insert_text_format.rb#8 -module LanguageServer::Protocol::Constant::InsertTextFormat; end - -# The primary text to be inserted is treated as a plain string. -# -# source://language_server-protocol//lib/language_server/protocol/constant/insert_text_format.rb#12 -LanguageServer::Protocol::Constant::InsertTextFormat::PLAIN_TEXT = T.let(T.unsafe(nil), Integer) - -# The primary text to be inserted is treated as a snippet. -# -# A snippet can define tab stops and placeholders with `$1`, `$2` -# and `${3:foo}`. `$0` defines the final tab stop, it defaults to -# the end of the snippet. Placeholders with equal identifiers are linked, -# that is typing in one will update others too. -# -# source://language_server-protocol//lib/language_server/protocol/constant/insert_text_format.rb#21 -LanguageServer::Protocol::Constant::InsertTextFormat::SNIPPET = T.let(T.unsafe(nil), Integer) - -# How whitespace and indentation is handled during completion -# item insertion. -# -# source://language_server-protocol//lib/language_server/protocol/constant/insert_text_mode.rb#8 -module LanguageServer::Protocol::Constant::InsertTextMode; end - -# The editor adjusts leading whitespace of new lines so that -# they match the indentation up to the cursor of the line for -# which the item is accepted. -# -# Consider a line like this: <2tabs><3tabs>foo. Accepting a -# multi line completion item is indented using 2 tabs and all -# following lines inserted will be indented using 2 tabs as well. -# -# source://language_server-protocol//lib/language_server/protocol/constant/insert_text_mode.rb#26 -LanguageServer::Protocol::Constant::InsertTextMode::ADJUST_INDENTATION = T.let(T.unsafe(nil), Integer) - -# The insertion or replace strings is taken as it is. If the -# value is multi line the lines below the cursor will be -# inserted using the indentation defined in the string value. -# The client will not apply any kind of adjustments to the -# string. -# -# source://language_server-protocol//lib/language_server/protocol/constant/insert_text_mode.rb#16 -LanguageServer::Protocol::Constant::InsertTextMode::AS_IS = T.let(T.unsafe(nil), Integer) - -# Describes the content type that a client supports in various -# result literals like `Hover`, `ParameterInfo` or `CompletionItem`. -# -# Please note that `MarkupKinds` must not start with a `$`. This kinds -# are reserved for internal usage. -# -# source://language_server-protocol//lib/language_server/protocol/constant/markup_kind.rb#11 -module LanguageServer::Protocol::Constant::MarkupKind; end - -# Markdown is supported as a content format -# -# source://language_server-protocol//lib/language_server/protocol/constant/markup_kind.rb#19 -LanguageServer::Protocol::Constant::MarkupKind::MARKDOWN = T.let(T.unsafe(nil), String) - -# Plain text is supported as a content format -# -# source://language_server-protocol//lib/language_server/protocol/constant/markup_kind.rb#15 -LanguageServer::Protocol::Constant::MarkupKind::PLAIN_TEXT = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/message_type.rb#4 -module LanguageServer::Protocol::Constant::MessageType; end - -# An error message. -# -# source://language_server-protocol//lib/language_server/protocol/constant/message_type.rb#8 -LanguageServer::Protocol::Constant::MessageType::ERROR = T.let(T.unsafe(nil), Integer) - -# An information message. -# -# source://language_server-protocol//lib/language_server/protocol/constant/message_type.rb#16 -LanguageServer::Protocol::Constant::MessageType::INFO = T.let(T.unsafe(nil), Integer) - -# A log message. -# -# source://language_server-protocol//lib/language_server/protocol/constant/message_type.rb#20 -LanguageServer::Protocol::Constant::MessageType::LOG = T.let(T.unsafe(nil), Integer) - -# A warning message. -# -# source://language_server-protocol//lib/language_server/protocol/constant/message_type.rb#12 -LanguageServer::Protocol::Constant::MessageType::WARNING = T.let(T.unsafe(nil), Integer) - -# The moniker kind. -# -# source://language_server-protocol//lib/language_server/protocol/constant/moniker_kind.rb#7 -module LanguageServer::Protocol::Constant::MonikerKind; end - -# The moniker represents a symbol that is exported from a project -# -# source://language_server-protocol//lib/language_server/protocol/constant/moniker_kind.rb#15 -LanguageServer::Protocol::Constant::MonikerKind::EXPORT = T.let(T.unsafe(nil), String) - -# The moniker represent a symbol that is imported into a project -# -# source://language_server-protocol//lib/language_server/protocol/constant/moniker_kind.rb#11 -LanguageServer::Protocol::Constant::MonikerKind::IMPORT = T.let(T.unsafe(nil), String) - -# The moniker represents a symbol that is local to a project (e.g. a local -# variable of a function, a class not visible outside the project, ...) -# -# source://language_server-protocol//lib/language_server/protocol/constant/moniker_kind.rb#20 -LanguageServer::Protocol::Constant::MonikerKind::LOCAL = T.let(T.unsafe(nil), String) - -# A notebook cell kind. -# -# source://language_server-protocol//lib/language_server/protocol/constant/notebook_cell_kind.rb#7 -module LanguageServer::Protocol::Constant::NotebookCellKind; end - -# A code-cell is source code. -# -# source://language_server-protocol//lib/language_server/protocol/constant/notebook_cell_kind.rb#15 -LanguageServer::Protocol::Constant::NotebookCellKind::CODE = T.let(T.unsafe(nil), Integer) - -# A markup-cell is formatted source that is used for display. -# -# source://language_server-protocol//lib/language_server/protocol/constant/notebook_cell_kind.rb#11 -LanguageServer::Protocol::Constant::NotebookCellKind::MARKUP = T.let(T.unsafe(nil), Integer) - -# A type indicating how positions are encoded, -# specifically what column offsets mean. -# A set of predefined position encoding kinds. -# -# source://language_server-protocol//lib/language_server/protocol/constant/position_encoding_kind.rb#9 -module LanguageServer::Protocol::Constant::PositionEncodingKind; end - -# Character offsets count UTF-16 code units. -# -# This is the default and must always be supported -# by servers -# -# source://language_server-protocol//lib/language_server/protocol/constant/position_encoding_kind.rb#20 -LanguageServer::Protocol::Constant::PositionEncodingKind::UTF16 = T.let(T.unsafe(nil), String) - -# Character offsets count UTF-32 code units. -# -# Implementation note: these are the same as Unicode code points, -# so this `PositionEncodingKind` may also be used for an -# encoding-agnostic representation of character offsets. -# -# source://language_server-protocol//lib/language_server/protocol/constant/position_encoding_kind.rb#28 -LanguageServer::Protocol::Constant::PositionEncodingKind::UTF32 = T.let(T.unsafe(nil), String) - -# Character offsets count UTF-8 code units (e.g bytes). -# -# source://language_server-protocol//lib/language_server/protocol/constant/position_encoding_kind.rb#13 -LanguageServer::Protocol::Constant::PositionEncodingKind::UTF8 = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/prepare_support_default_behavior.rb#4 -module LanguageServer::Protocol::Constant::PrepareSupportDefaultBehavior; end - -# The client's default behavior is to select the identifier -# according to the language's syntax rule. -# -# source://language_server-protocol//lib/language_server/protocol/constant/prepare_support_default_behavior.rb#9 -LanguageServer::Protocol::Constant::PrepareSupportDefaultBehavior::IDENTIFIER = T.let(T.unsafe(nil), Integer) - -# The kind of resource operations supported by the client. -# -# source://language_server-protocol//lib/language_server/protocol/constant/resource_operation_kind.rb#7 -module LanguageServer::Protocol::Constant::ResourceOperationKind; end - -# Supports creating new files and folders. -# -# source://language_server-protocol//lib/language_server/protocol/constant/resource_operation_kind.rb#11 -LanguageServer::Protocol::Constant::ResourceOperationKind::CREATE = T.let(T.unsafe(nil), String) - -# Supports deleting existing files and folders. -# -# source://language_server-protocol//lib/language_server/protocol/constant/resource_operation_kind.rb#19 -LanguageServer::Protocol::Constant::ResourceOperationKind::DELETE = T.let(T.unsafe(nil), String) - -# Supports renaming existing files and folders. -# -# source://language_server-protocol//lib/language_server/protocol/constant/resource_operation_kind.rb#15 -LanguageServer::Protocol::Constant::ResourceOperationKind::RENAME = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#4 -module LanguageServer::Protocol::Constant::SemanticTokenModifiers; end - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#10 -LanguageServer::Protocol::Constant::SemanticTokenModifiers::ABSTRACT = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#11 -LanguageServer::Protocol::Constant::SemanticTokenModifiers::ASYNC = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#5 -LanguageServer::Protocol::Constant::SemanticTokenModifiers::DECLARATION = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#14 -LanguageServer::Protocol::Constant::SemanticTokenModifiers::DEFAULT_LIBRARY = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#6 -LanguageServer::Protocol::Constant::SemanticTokenModifiers::DEFINITION = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#9 -LanguageServer::Protocol::Constant::SemanticTokenModifiers::DEPRECATED = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#13 -LanguageServer::Protocol::Constant::SemanticTokenModifiers::DOCUMENTATION = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#12 -LanguageServer::Protocol::Constant::SemanticTokenModifiers::MODIFICATION = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#7 -LanguageServer::Protocol::Constant::SemanticTokenModifiers::READONLY = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#8 -LanguageServer::Protocol::Constant::SemanticTokenModifiers::STATIC = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#4 -module LanguageServer::Protocol::Constant::SemanticTokenTypes; end - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#11 -LanguageServer::Protocol::Constant::SemanticTokenTypes::CLASS = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#26 -LanguageServer::Protocol::Constant::SemanticTokenTypes::COMMENT = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#31 -LanguageServer::Protocol::Constant::SemanticTokenTypes::DECORATOR = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#12 -LanguageServer::Protocol::Constant::SemanticTokenTypes::ENUM = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#19 -LanguageServer::Protocol::Constant::SemanticTokenTypes::ENUM_MEMBER = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#20 -LanguageServer::Protocol::Constant::SemanticTokenTypes::EVENT = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#21 -LanguageServer::Protocol::Constant::SemanticTokenTypes::FUNCTION = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#13 -LanguageServer::Protocol::Constant::SemanticTokenTypes::INTERFACE = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#24 -LanguageServer::Protocol::Constant::SemanticTokenTypes::KEYWORD = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#23 -LanguageServer::Protocol::Constant::SemanticTokenTypes::MACRO = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#22 -LanguageServer::Protocol::Constant::SemanticTokenTypes::METHOD = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#25 -LanguageServer::Protocol::Constant::SemanticTokenTypes::MODIFIER = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#5 -LanguageServer::Protocol::Constant::SemanticTokenTypes::NAMESPACE = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#28 -LanguageServer::Protocol::Constant::SemanticTokenTypes::NUMBER = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#30 -LanguageServer::Protocol::Constant::SemanticTokenTypes::OPERATOR = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#16 -LanguageServer::Protocol::Constant::SemanticTokenTypes::PARAMETER = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#18 -LanguageServer::Protocol::Constant::SemanticTokenTypes::PROPERTY = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#29 -LanguageServer::Protocol::Constant::SemanticTokenTypes::REGEXP = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#27 -LanguageServer::Protocol::Constant::SemanticTokenTypes::STRING = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#14 -LanguageServer::Protocol::Constant::SemanticTokenTypes::STRUCT = T.let(T.unsafe(nil), String) - -# Represents a generic type. Acts as a fallback for types which -# can't be mapped to a specific type like class or enum. -# -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#10 -LanguageServer::Protocol::Constant::SemanticTokenTypes::TYPE = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#15 -LanguageServer::Protocol::Constant::SemanticTokenTypes::TYPE_PARAMETER = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#17 -LanguageServer::Protocol::Constant::SemanticTokenTypes::VARIABLE = T.let(T.unsafe(nil), String) - -# How a signature help was triggered. -# -# source://language_server-protocol//lib/language_server/protocol/constant/signature_help_trigger_kind.rb#7 -module LanguageServer::Protocol::Constant::SignatureHelpTriggerKind; end - -# Signature help was triggered by the cursor moving or by the document -# content changing. -# -# source://language_server-protocol//lib/language_server/protocol/constant/signature_help_trigger_kind.rb#20 -LanguageServer::Protocol::Constant::SignatureHelpTriggerKind::CONTENT_CHANGE = T.let(T.unsafe(nil), Integer) - -# Signature help was invoked manually by the user or by a command. -# -# source://language_server-protocol//lib/language_server/protocol/constant/signature_help_trigger_kind.rb#11 -LanguageServer::Protocol::Constant::SignatureHelpTriggerKind::INVOKED = T.let(T.unsafe(nil), Integer) - -# Signature help was triggered by a trigger character. -# -# source://language_server-protocol//lib/language_server/protocol/constant/signature_help_trigger_kind.rb#15 -LanguageServer::Protocol::Constant::SignatureHelpTriggerKind::TRIGGER_CHARACTER = T.let(T.unsafe(nil), Integer) - -# A symbol kind. -# -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#7 -module LanguageServer::Protocol::Constant::SymbolKind; end - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#25 -LanguageServer::Protocol::Constant::SymbolKind::ARRAY = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#24 -LanguageServer::Protocol::Constant::SymbolKind::BOOLEAN = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#12 -LanguageServer::Protocol::Constant::SymbolKind::CLASS = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#21 -LanguageServer::Protocol::Constant::SymbolKind::CONSTANT = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#16 -LanguageServer::Protocol::Constant::SymbolKind::CONSTRUCTOR = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#17 -LanguageServer::Protocol::Constant::SymbolKind::ENUM = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#29 -LanguageServer::Protocol::Constant::SymbolKind::ENUM_MEMBER = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#31 -LanguageServer::Protocol::Constant::SymbolKind::EVENT = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#15 -LanguageServer::Protocol::Constant::SymbolKind::FIELD = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#8 -LanguageServer::Protocol::Constant::SymbolKind::FILE = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#19 -LanguageServer::Protocol::Constant::SymbolKind::FUNCTION = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#18 -LanguageServer::Protocol::Constant::SymbolKind::INTERFACE = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#27 -LanguageServer::Protocol::Constant::SymbolKind::KEY = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#13 -LanguageServer::Protocol::Constant::SymbolKind::METHOD = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#9 -LanguageServer::Protocol::Constant::SymbolKind::MODULE = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#10 -LanguageServer::Protocol::Constant::SymbolKind::NAMESPACE = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#28 -LanguageServer::Protocol::Constant::SymbolKind::NULL = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#23 -LanguageServer::Protocol::Constant::SymbolKind::NUMBER = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#26 -LanguageServer::Protocol::Constant::SymbolKind::OBJECT = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#32 -LanguageServer::Protocol::Constant::SymbolKind::OPERATOR = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#11 -LanguageServer::Protocol::Constant::SymbolKind::PACKAGE = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#14 -LanguageServer::Protocol::Constant::SymbolKind::PROPERTY = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#22 -LanguageServer::Protocol::Constant::SymbolKind::STRING = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#30 -LanguageServer::Protocol::Constant::SymbolKind::STRUCT = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#33 -LanguageServer::Protocol::Constant::SymbolKind::TYPE_PARAMETER = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#20 -LanguageServer::Protocol::Constant::SymbolKind::VARIABLE = T.let(T.unsafe(nil), Integer) - -# Symbol tags are extra annotations that tweak the rendering of a symbol. -# -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_tag.rb#7 -module LanguageServer::Protocol::Constant::SymbolTag; end - -# Render a symbol as obsolete, usually using a strike-out. -# -# source://language_server-protocol//lib/language_server/protocol/constant/symbol_tag.rb#11 -LanguageServer::Protocol::Constant::SymbolTag::DEPRECATED = T.let(T.unsafe(nil), Integer) - -# Represents reasons why a text document is saved. -# -# source://language_server-protocol//lib/language_server/protocol/constant/text_document_save_reason.rb#7 -module LanguageServer::Protocol::Constant::TextDocumentSaveReason; end - -# Automatic after a delay. -# -# source://language_server-protocol//lib/language_server/protocol/constant/text_document_save_reason.rb#16 -LanguageServer::Protocol::Constant::TextDocumentSaveReason::AFTER_DELAY = T.let(T.unsafe(nil), Integer) - -# When the editor lost focus. -# -# source://language_server-protocol//lib/language_server/protocol/constant/text_document_save_reason.rb#20 -LanguageServer::Protocol::Constant::TextDocumentSaveReason::FOCUS_OUT = T.let(T.unsafe(nil), Integer) - -# Manually triggered, e.g. by the user pressing save, by starting -# debugging, or by an API call. -# -# source://language_server-protocol//lib/language_server/protocol/constant/text_document_save_reason.rb#12 -LanguageServer::Protocol::Constant::TextDocumentSaveReason::MANUAL = T.let(T.unsafe(nil), Integer) - -# Defines how the host (editor) should sync document changes to the language -# server. -# -# source://language_server-protocol//lib/language_server/protocol/constant/text_document_sync_kind.rb#8 -module LanguageServer::Protocol::Constant::TextDocumentSyncKind; end - -# Documents are synced by always sending the full content -# of the document. -# -# source://language_server-protocol//lib/language_server/protocol/constant/text_document_sync_kind.rb#17 -LanguageServer::Protocol::Constant::TextDocumentSyncKind::FULL = T.let(T.unsafe(nil), Integer) - -# Documents are synced by sending the full content on open. -# After that only incremental updates to the document are -# sent. -# -# source://language_server-protocol//lib/language_server/protocol/constant/text_document_sync_kind.rb#23 -LanguageServer::Protocol::Constant::TextDocumentSyncKind::INCREMENTAL = T.let(T.unsafe(nil), Integer) - -# Documents should not be synced at all. -# -# source://language_server-protocol//lib/language_server/protocol/constant/text_document_sync_kind.rb#12 -LanguageServer::Protocol::Constant::TextDocumentSyncKind::NONE = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/constant/token_format.rb#4 -module LanguageServer::Protocol::Constant::TokenFormat; end - -# source://language_server-protocol//lib/language_server/protocol/constant/token_format.rb#5 -LanguageServer::Protocol::Constant::TokenFormat::RELATIVE = T.let(T.unsafe(nil), String) - -# Moniker uniqueness level to define scope of the moniker. -# -# source://language_server-protocol//lib/language_server/protocol/constant/uniqueness_level.rb#7 -module LanguageServer::Protocol::Constant::UniquenessLevel; end - -# The moniker is only unique inside a document -# -# source://language_server-protocol//lib/language_server/protocol/constant/uniqueness_level.rb#11 -LanguageServer::Protocol::Constant::UniquenessLevel::DOCUMENT = T.let(T.unsafe(nil), String) - -# The moniker is globally unique -# -# source://language_server-protocol//lib/language_server/protocol/constant/uniqueness_level.rb#27 -LanguageServer::Protocol::Constant::UniquenessLevel::GLOBAL = T.let(T.unsafe(nil), String) - -# The moniker is unique inside the group to which a project belongs -# -# source://language_server-protocol//lib/language_server/protocol/constant/uniqueness_level.rb#19 -LanguageServer::Protocol::Constant::UniquenessLevel::GROUP = T.let(T.unsafe(nil), String) - -# The moniker is unique inside a project for which a dump got created -# -# source://language_server-protocol//lib/language_server/protocol/constant/uniqueness_level.rb#15 -LanguageServer::Protocol::Constant::UniquenessLevel::PROJECT = T.let(T.unsafe(nil), String) - -# The moniker is unique inside the moniker scheme. -# -# source://language_server-protocol//lib/language_server/protocol/constant/uniqueness_level.rb#23 -LanguageServer::Protocol::Constant::UniquenessLevel::SCHEME = T.let(T.unsafe(nil), String) - -# source://language_server-protocol//lib/language_server/protocol/constant/watch_kind.rb#4 -module LanguageServer::Protocol::Constant::WatchKind; end - -# Interested in change events -# -# source://language_server-protocol//lib/language_server/protocol/constant/watch_kind.rb#12 -LanguageServer::Protocol::Constant::WatchKind::CHANGE = T.let(T.unsafe(nil), Integer) - -# Interested in create events. -# -# source://language_server-protocol//lib/language_server/protocol/constant/watch_kind.rb#8 -LanguageServer::Protocol::Constant::WatchKind::CREATE = T.let(T.unsafe(nil), Integer) - -# Interested in delete events -# -# source://language_server-protocol//lib/language_server/protocol/constant/watch_kind.rb#16 -LanguageServer::Protocol::Constant::WatchKind::DELETE = T.let(T.unsafe(nil), Integer) - -# source://language_server-protocol//lib/language_server/protocol/interface.rb#3 -module LanguageServer::Protocol::Interface; end - -# A special text edit with an additional change annotation. -# -# source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#7 -class LanguageServer::Protocol::Interface::AnnotatedTextEdit - # @return [AnnotatedTextEdit] a new instance of AnnotatedTextEdit - # - # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#8 - def initialize(range:, new_text:, annotation_id:); end - - # The actual annotation identifier. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#40 - def annotation_id; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#44 - def attributes; end - - # The string to be inserted. For delete operations use an - # empty string. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#32 - def new_text; end - - # The range of the text document to be manipulated. To insert - # text into a document create a range where start === end. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#23 - def range; end - - # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#46 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#50 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#4 -class LanguageServer::Protocol::Interface::ApplyWorkspaceEditParams - # @return [ApplyWorkspaceEditParams] a new instance of ApplyWorkspaceEditParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#5 - def initialize(edit:, label: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#32 - def attributes; end - - # The edits to apply. - # - # @return [WorkspaceEdit] - # - # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#28 - def edit; end - - # An optional label of the workspace edit. This label is - # presented in the user interface for example on an undo - # stack to undo the workspace edit. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#20 - def label; end - - # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#34 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#38 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#4 -class LanguageServer::Protocol::Interface::ApplyWorkspaceEditResult - # @return [ApplyWorkspaceEditResult] a new instance of ApplyWorkspaceEditResult - # - # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#5 - def initialize(applied:, failure_reason: T.unsafe(nil), failed_change: T.unsafe(nil)); end - - # Indicates whether the edit was applied or not. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#19 - def applied; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#44 - def attributes; end - - # Depending on the client's failure handling strategy `failedChange` - # might contain the index of the change that failed. This property is - # only available if the client signals a `failureHandling` strategy - # in its client capabilities. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#40 - def failed_change; end - - # An optional textual description for why the edit was not applied. - # This may be used by the server for diagnostic logging or to provide - # a suitable error for a request that triggered the edit. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#29 - def failure_reason; end - - # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#46 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#50 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::CallHierarchyClientCapabilities - # @return [CallHierarchyClientCapabilities] a new instance of CallHierarchyClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb#24 - def attributes; end - - # Whether implementation supports dynamic registration. If this is set to - # `true` the client supports the new `(TextDocumentRegistrationOptions & - # StaticRegistrationOptions)` return value for the corresponding server - # capability as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb#20 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb#30 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#4 -class LanguageServer::Protocol::Interface::CallHierarchyIncomingCall - # @return [CallHierarchyIncomingCall] a new instance of CallHierarchyIncomingCall - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#5 - def initialize(from:, from_ranges:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#31 - def attributes; end - - # The item that makes the call. - # - # @return [CallHierarchyItem] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#18 - def from; end - - # The ranges at which the calls appear. This is relative to the caller - # denoted by [`this.from`](#CallHierarchyIncomingCall.from). - # - # @return [Range[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#27 - def from_ranges; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#33 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#37 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#4 -class LanguageServer::Protocol::Interface::CallHierarchyIncomingCallsParams - # @return [CallHierarchyIncomingCallsParams] a new instance of CallHierarchyIncomingCallsParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#5 - def initialize(item:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#37 - def attributes; end - - # @return [CallHierarchyItem] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#33 - def item; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#28 - def partial_result_token; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#39 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#43 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#19 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#4 -class LanguageServer::Protocol::Interface::CallHierarchyItem - # @return [CallHierarchyItem] a new instance of CallHierarchyItem - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#5 - def initialize(name:, kind:, uri:, range:, selection_range:, tags: T.unsafe(nil), detail: T.unsafe(nil), data: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#88 - def attributes; end - - # A data entry field that is preserved between a call hierarchy prepare and - # incoming calls or outgoing calls requests. - # - # @return [unknown] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#84 - def data; end - - # More detail for this item, e.g. the signature of a function. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#48 - def detail; end - - # The kind of this item. - # - # @return [SymbolKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#32 - def kind; end - - # The name of this item. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#24 - def name; end - - # The range enclosing this symbol not including leading/trailing whitespace - # but everything else, e.g. comments and code. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#65 - def range; end - - # The range that should be selected and revealed when this symbol is being - # picked, e.g. the name of a function. Must be contained by the - # [`range`](#CallHierarchyItem.range). - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#75 - def selection_range; end - - # Tags for this item. - # - # @return [1[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#40 - def tags; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#90 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#94 - def to_json(*args); end - - # The resource identifier of this item. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#56 - def uri; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_options.rb#4 -class LanguageServer::Protocol::Interface::CallHierarchyOptions - # @return [CallHierarchyOptions] a new instance of CallHierarchyOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#4 -class LanguageServer::Protocol::Interface::CallHierarchyOutgoingCall - # @return [CallHierarchyOutgoingCall] a new instance of CallHierarchyOutgoingCall - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#5 - def initialize(to:, from_ranges:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#31 - def attributes; end - - # The range at which this item is called. This is the range relative to - # the caller, e.g the item passed to `callHierarchy/outgoingCalls` request. - # - # @return [Range[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#27 - def from_ranges; end - - # The item that is called. - # - # @return [CallHierarchyItem] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#18 - def to; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#33 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#37 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#4 -class LanguageServer::Protocol::Interface::CallHierarchyOutgoingCallsParams - # @return [CallHierarchyOutgoingCallsParams] a new instance of CallHierarchyOutgoingCallsParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#5 - def initialize(item:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#37 - def attributes; end - - # @return [CallHierarchyItem] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#33 - def item; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#28 - def partial_result_token; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#39 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#43 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#19 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#4 -class LanguageServer::Protocol::Interface::CallHierarchyPrepareParams - # @return [CallHierarchyPrepareParams] a new instance of CallHierarchyPrepareParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#5 - def initialize(text_document:, position:, work_done_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#39 - def attributes; end - - # The position inside the text document. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#27 - def position; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#19 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#41 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#45 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#35 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#4 -class LanguageServer::Protocol::Interface::CallHierarchyRegistrationOptions - # @return [CallHierarchyRegistrationOptions] a new instance of CallHierarchyRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#38 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#20 - def document_selector; end - - # The id used to register the request. The id can be used to deregister - # the request again. See also Registration#id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#34 - def id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#40 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#44 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#25 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/cancel_params.rb#4 -class LanguageServer::Protocol::Interface::CancelParams - # @return [CancelParams] a new instance of CancelParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/cancel_params.rb#5 - def initialize(id:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/cancel_params.rb#21 - def attributes; end - - # The request id to cancel. - # - # @return [string | number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/cancel_params.rb#17 - def id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/cancel_params.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/cancel_params.rb#27 - def to_json(*args); end -end - -# Additional information that describes document changes. -# -# source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#7 -class LanguageServer::Protocol::Interface::ChangeAnnotation - # @return [ChangeAnnotation] a new instance of ChangeAnnotation - # - # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#8 - def initialize(label:, needs_confirmation: T.unsafe(nil), description: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#45 - def attributes; end - - # A human-readable string which is rendered less prominent in - # the user interface. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#41 - def description; end - - # A human-readable string describing the actual change. The string - # is rendered prominent in the user interface. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#23 - def label; end - - # A flag which indicates that user confirmation is needed - # before applying the change. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#32 - def needs_confirmation; end - - # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#47 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#51 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::ClientCapabilities - # @return [ClientCapabilities] a new instance of ClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#5 - def initialize(workspace: T.unsafe(nil), text_document: T.unsafe(nil), notebook_document: T.unsafe(nil), window: T.unsafe(nil), general: T.unsafe(nil), experimental: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#66 - def attributes; end - - # Experimental client capabilities. - # - # @return [LSPAny] - # - # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#62 - def experimental; end - - # General client capabilities. - # - # @return [{ staleRequestSupport?: { cancel: boolean; retryOnContentModified: string[]; }; regularExpressions?: RegularExpressionsClientCapabilities; markdown?: any; positionEncodings?: string[]; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#54 - def general; end - - # Capabilities specific to the notebook document support. - # - # @return [NotebookDocumentClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#38 - def notebook_document; end - - # Text document specific client capabilities. - # - # @return [TextDocumentClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#30 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#68 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#72 - def to_json(*args); end - - # Window specific client capabilities. - # - # @return [{ workDoneProgress?: boolean; showMessage?: ShowMessageRequestClientCapabilities; showDocument?: ShowDocumentClientCapabilities; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#46 - def window; end - - # Workspace specific client capabilities. - # - # @return [{ applyEdit?: boolean; workspaceEdit?: WorkspaceEditClientCapabilities; didChangeConfiguration?: DidChangeConfigurationClientCapabilities; ... 10 more ...; diagnostics?: DiagnosticWorkspaceClientCapabilities; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#22 - def workspace; end -end - -# A code action represents a change that can be performed in code, e.g. to fix -# a problem or to refactor code. -# -# A CodeAction must set either `edit` and/or a `command`. If both are supplied, -# the `edit` is applied first, then the `command` is executed. -# -# source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#11 -class LanguageServer::Protocol::Interface::CodeAction - # @return [CodeAction] a new instance of CodeAction - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#12 - def initialize(title:, kind: T.unsafe(nil), diagnostics: T.unsafe(nil), is_preferred: T.unsafe(nil), disabled: T.unsafe(nil), edit: T.unsafe(nil), command: T.unsafe(nil), data: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#115 - def attributes; end - - # A command this code action executes. If a code action - # provides an edit and a command, first the edit is - # executed and then the command. - # - # @return [Command] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#102 - def command; end - - # A data entry field that is preserved on a code action between - # a `textDocument/codeAction` and a `codeAction/resolve` request. - # - # @return [LSPAny] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#111 - def data; end - - # The diagnostics that this code action resolves. - # - # @return [Diagnostic[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#49 - def diagnostics; end - - # Marks that the code action cannot currently be applied. - # - # Clients should follow the following guidelines regarding disabled code - # actions: - # - # - Disabled code actions are not shown in automatic lightbulbs code - # action menus. - # - # - Disabled actions are shown as faded out in the code action menu when - # the user request a more specific type of code action, such as - # refactorings. - # - # - If the user has a keybinding that auto applies a code action and only - # a disabled code actions are returned, the client should show the user - # an error message with `reason` in the editor. - # - # @return [{ reason: string; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#84 - def disabled; end - - # The workspace edit this code action performs. - # - # @return [WorkspaceEdit] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#92 - def edit; end - - # Marks this as a preferred action. Preferred actions are used by the - # `auto fix` command and can be targeted by keybindings. - # - # A quick fix should be marked preferred if it properly addresses the - # underlying error. A refactoring should be marked preferred if it is the - # most reasonable choice of actions to take. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#62 - def is_preferred; end - - # The kind of the code action. - # - # Used to filter code actions. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#41 - def kind; end - - # A short, human-readable, title for this code action. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#31 - def title; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#117 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#121 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::CodeActionClientCapabilities - # @return [CodeActionClientCapabilities] a new instance of CodeActionClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil), code_action_literal_support: T.unsafe(nil), is_preferred_support: T.unsafe(nil), disabled_support: T.unsafe(nil), data_support: T.unsafe(nil), resolve_support: T.unsafe(nil), honors_change_annotations: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#83 - def attributes; end - - # The client supports code action literals as a valid - # response of the `textDocument/codeAction` request. - # - # @return [{ codeActionKind: { valueSet: string[]; }; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#32 - def code_action_literal_support; end - - # Whether code action supports the `data` property which is - # preserved between a `textDocument/codeAction` and a - # `codeAction/resolve` request. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#58 - def data_support; end - - # Whether code action supports the `disabled` property. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#48 - def disabled_support; end - - # Whether code action supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#23 - def dynamic_registration; end - - # Whether the client honors the change annotations in - # text edits and resource operations returned via the - # `CodeAction#edit` property by for example presenting - # the workspace edit in the user interface and asking - # for confirmation. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#79 - def honors_change_annotations; end - - # Whether code action supports the `isPreferred` property. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#40 - def is_preferred_support; end - - # Whether the client supports resolving additional code action - # properties via a separate `codeAction/resolve` request. - # - # @return [{ properties: string[]; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#67 - def resolve_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#85 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#89 - def to_json(*args); end -end - -# Contains additional diagnostic information about the context in which -# a code action is run. -# -# source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#8 -class LanguageServer::Protocol::Interface::CodeActionContext - # @return [CodeActionContext] a new instance of CodeActionContext - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#9 - def initialize(diagnostics:, only: T.unsafe(nil), trigger_kind: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#51 - def attributes; end - - # An array of diagnostics known on the client side overlapping the range - # provided to the `textDocument/codeAction` request. They are provided so - # that the server knows which errors are currently presented to the user - # for the given range. There is no guarantee that these accurately reflect - # the error state of the resource. The primary parameter - # to compute code actions is the provided range. - # - # @return [Diagnostic[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#28 - def diagnostics; end - - # Requested kind of actions to return. - # - # Actions not of this kind are filtered out by the client before being - # shown. So servers can omit computing them. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#39 - def only; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#53 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#57 - def to_json(*args); end - - # The reason why code actions were requested. - # - # @return [CodeActionTriggerKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#47 - def trigger_kind; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#4 -class LanguageServer::Protocol::Interface::CodeActionOptions - # @return [CodeActionOptions] a new instance of CodeActionOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil), code_action_kinds: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#40 - def attributes; end - - # CodeActionKinds that this server may return. - # - # The list of kinds may be generic, such as `CodeActionKind.Refactor`, - # or the server may list out every specific kind they provide. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#27 - def code_action_kinds; end - - # The server provides support to resolve additional - # information for a code action. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#36 - def resolve_provider; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#42 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#46 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#16 - def work_done_progress; end -end - -# Params for the CodeActionRequest -# -# source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#7 -class LanguageServer::Protocol::Interface::CodeActionParams - # @return [CodeActionParams] a new instance of CodeActionParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#8 - def initialize(text_document:, range:, context:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#61 - def attributes; end - - # Context carrying additional information. - # - # @return [CodeActionContext] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#57 - def context; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#33 - def partial_result_token; end - - # The range for which the command was invoked. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#49 - def range; end - - # The document in which the command was invoked. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#41 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#63 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#67 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#24 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#4 -class LanguageServer::Protocol::Interface::CodeActionRegistrationOptions - # @return [CodeActionRegistrationOptions] a new instance of CodeActionRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), code_action_kinds: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#50 - def attributes; end - - # CodeActionKinds that this server may return. - # - # The list of kinds may be generic, such as `CodeActionKind.Refactor`, - # or the server may list out every specific kind they provide. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#37 - def code_action_kinds; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#21 - def document_selector; end - - # The server provides support to resolve additional - # information for a code action. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#46 - def resolve_provider; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#52 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#56 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#26 - def work_done_progress; end -end - -# Structure to capture a description for an error code. -# -# source://language_server-protocol//lib/language_server/protocol/interface/code_description.rb#7 -class LanguageServer::Protocol::Interface::CodeDescription - # @return [CodeDescription] a new instance of CodeDescription - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_description.rb#8 - def initialize(href:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_description.rb#24 - def attributes; end - - # An URI to open with more information about the diagnostic error. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_description.rb#20 - def href; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_description.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_description.rb#30 - def to_json(*args); end -end - -# A code lens represents a command that should be shown along with -# source text, like the number of references, a way to run tests, etc. -# -# A code lens is _unresolved_ when no command is associated to it. For -# performance reasons the creation of a code lens and resolving should be done -# in two stages. -# -# source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#12 -class LanguageServer::Protocol::Interface::CodeLens - # @return [CodeLens] a new instance of CodeLens - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#13 - def initialize(range:, command: T.unsafe(nil), data: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#49 - def attributes; end - - # The command this code lens represents. - # - # @return [Command] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#36 - def command; end - - # A data entry field that is preserved on a code lens item between - # a code lens and a code lens resolve request. - # - # @return [LSPAny] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#45 - def data; end - - # The range in which this code lens is valid. Should only span a single - # line. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#28 - def range; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#51 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#55 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/code_lens_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::CodeLensClientCapabilities - # @return [CodeLensClientCapabilities] a new instance of CodeLensClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_client_capabilities.rb#21 - def attributes; end - - # Whether code lens supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_client_capabilities.rb#17 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_client_capabilities.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_client_capabilities.rb#27 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#4 -class LanguageServer::Protocol::Interface::CodeLensOptions - # @return [CodeLensOptions] a new instance of CodeLensOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#27 - def attributes; end - - # Code lens has a resolve provider as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#23 - def resolve_provider; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#29 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#33 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#15 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#4 -class LanguageServer::Protocol::Interface::CodeLensParams - # @return [CodeLensParams] a new instance of CodeLensParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#5 - def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#40 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#28 - def partial_result_token; end - - # The document to request code lens for. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#36 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#42 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#46 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#19 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#4 -class LanguageServer::Protocol::Interface::CodeLensRegistrationOptions - # @return [CodeLensRegistrationOptions] a new instance of CodeLensRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#37 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#20 - def document_selector; end - - # Code lens has a resolve provider as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#33 - def resolve_provider; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#39 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#43 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#25 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::CodeLensWorkspaceClientCapabilities - # @return [CodeLensWorkspaceClientCapabilities] a new instance of CodeLensWorkspaceClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb#5 - def initialize(refresh_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb#27 - def attributes; end - - # Whether the client implementation supports a refresh request sent from the - # server to the client. - # - # Note that this event is global and will force the client to refresh all - # code lenses currently shown. It should be used with absolute care and is - # useful for situation where a server for example detect a project wide - # change that requires such a calculation. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb#23 - def refresh_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb#29 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb#33 - def to_json(*args); end -end - -# Represents a color in RGBA space. -# -# source://language_server-protocol//lib/language_server/protocol/interface/color.rb#7 -class LanguageServer::Protocol::Interface::Color - # @return [Color] a new instance of Color - # - # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#8 - def initialize(red:, green:, blue:, alpha:); end - - # The alpha component of this color in the range [0-1]. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#47 - def alpha; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#51 - def attributes; end - - # The blue component of this color in the range [0-1]. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#39 - def blue; end - - # The green component of this color in the range [0-1]. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#31 - def green; end - - # The red component of this color in the range [0-1]. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#23 - def red; end - - # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#53 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#57 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#4 -class LanguageServer::Protocol::Interface::ColorInformation - # @return [ColorInformation] a new instance of ColorInformation - # - # source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#5 - def initialize(range:, color:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#30 - def attributes; end - - # The actual color value for this color range. - # - # @return [Color] - # - # source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#26 - def color; end - - # The range in the document where this color appears. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#18 - def range; end - - # source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#36 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#4 -class LanguageServer::Protocol::Interface::ColorPresentation - # @return [ColorPresentation] a new instance of ColorPresentation - # - # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#5 - def initialize(label:, text_edit: T.unsafe(nil), additional_text_edits: T.unsafe(nil)); end - - # An optional array of additional [text edits](#TextEdit) that are applied - # when selecting this color presentation. Edits must not overlap with the - # main [edit](#ColorPresentation.textEdit) nor with themselves. - # - # @return [TextEdit[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#41 - def additional_text_edits; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#45 - def attributes; end - - # The label of this color presentation. It will be shown on the color - # picker header. By default this is also the text that is inserted when - # selecting this color presentation. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#21 - def label; end - - # An [edit](#TextEdit) which is applied to a document when selecting - # this presentation for the color. When `falsy` the - # [label](#ColorPresentation.label) is used. - # - # @return [TextEdit] - # - # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#31 - def text_edit; end - - # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#47 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#51 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#4 -class LanguageServer::Protocol::Interface::ColorPresentationParams - # @return [ColorPresentationParams] a new instance of ColorPresentationParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#5 - def initialize(text_document:, color:, range:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#58 - def attributes; end - - # The color information to request presentations for. - # - # @return [Color] - # - # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#46 - def color; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#30 - def partial_result_token; end - - # The range where the color would be inserted. Serves as a context. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#54 - def range; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#38 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#60 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#64 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#21 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/command.rb#4 -class LanguageServer::Protocol::Interface::Command - # @return [Command] a new instance of Command - # - # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#5 - def initialize(title:, command:, arguments: T.unsafe(nil)); end - - # Arguments that the command handler should be - # invoked with. - # - # @return [LSPAny[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#36 - def arguments; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#40 - def attributes; end - - # The identifier of the actual command handler. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#27 - def command; end - - # Title of the command, like `save`. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#19 - def title; end - - # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#42 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#46 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::CompletionClientCapabilities - # @return [CompletionClientCapabilities] a new instance of CompletionClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil), completion_item: T.unsafe(nil), completion_item_kind: T.unsafe(nil), context_support: T.unsafe(nil), insert_text_mode: T.unsafe(nil), completion_list: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#67 - def attributes; end - - # The client supports the following `CompletionItem` specific - # capabilities. - # - # @return [{ snippetSupport?: boolean; commitCharactersSupport?: boolean; documentationFormat?: MarkupKind[]; deprecatedSupport?: boolean; preselectSupport?: boolean; tagSupport?: { valueSet: 1[]; }; insertReplaceSupport?: boolean; resolveSupport?: { ...; }; insertTextModeSupport?: { ...; }; labelDetailsSupport?: boolean; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#31 - def completion_item; end - - # @return [{ valueSet?: CompletionItemKind[]; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#36 - def completion_item_kind; end - - # The client supports the following `CompletionList` specific - # capabilities. - # - # @return [{ itemDefaults?: string[]; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#63 - def completion_list; end - - # The client supports to send additional context information for a - # `textDocument/completion` request. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#45 - def context_support; end - - # Whether completion supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#22 - def dynamic_registration; end - - # The client's default when the completion item doesn't provide a - # `insertTextMode` property. - # - # @return [InsertTextMode] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#54 - def insert_text_mode; end - - # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#69 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#73 - def to_json(*args); end -end - -# Contains additional information about the context in which a completion -# request is triggered. -# -# source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#8 -class LanguageServer::Protocol::Interface::CompletionContext - # @return [CompletionContext] a new instance of CompletionContext - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#9 - def initialize(trigger_kind:, trigger_character: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#36 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#38 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#42 - def to_json(*args); end - - # The trigger character (a single character) that has trigger code - # complete. Is undefined if - # `triggerKind !== CompletionTriggerKind.TriggerCharacter` - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#32 - def trigger_character; end - - # How the completion was triggered. - # - # @return [CompletionTriggerKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#22 - def trigger_kind; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#4 -class LanguageServer::Protocol::Interface::CompletionItem - # @return [CompletionItem] a new instance of CompletionItem - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#5 - def initialize(label:, label_details: T.unsafe(nil), kind: T.unsafe(nil), tags: T.unsafe(nil), detail: T.unsafe(nil), documentation: T.unsafe(nil), deprecated: T.unsafe(nil), preselect: T.unsafe(nil), sort_text: T.unsafe(nil), filter_text: T.unsafe(nil), insert_text: T.unsafe(nil), insert_text_format: T.unsafe(nil), insert_text_mode: T.unsafe(nil), text_edit: T.unsafe(nil), text_edit_text: T.unsafe(nil), additional_text_edits: T.unsafe(nil), commit_characters: T.unsafe(nil), command: T.unsafe(nil), data: T.unsafe(nil)); end - - # An optional array of additional text edits that are applied when - # selecting this completion. Edits must not overlap (including the same - # insert position) with the main edit nor with themselves. - # - # Additional text edits should be used to change text unrelated to the - # current cursor position (for example adding an import statement at the - # top of the file if the completion item will insert an unqualified type). - # - # @return [TextEdit[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#221 - def additional_text_edits; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#255 - def attributes; end - - # An optional command that is executed *after* inserting this completion. - # *Note* that additional modifications to the current document should be - # described with the additionalTextEdits-property. - # - # @return [Command] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#242 - def command; end - - # An optional set of characters that when pressed while this completion is - # active will accept it first and then type that character. *Note* that all - # commit characters should have `length=1` and that superfluous characters - # will be ignored. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#232 - def commit_characters; end - - # A data entry field that is preserved on a completion item between - # a completion and a completion resolve request. - # - # @return [LSPAny] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#251 - def data; end - - # Indicates if this item is deprecated. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#92 - def deprecated; end - - # A human-readable string with additional information - # about this item, like type or symbol information. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#76 - def detail; end - - # A human-readable string that represents a doc-comment. - # - # @return [string | MarkupContent] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#84 - def documentation; end - - # A string that should be used when filtering a set of - # completion items. When `falsy` the label is used as the - # filter text for this item. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#124 - def filter_text; end - - # A string that should be inserted into a document when selecting - # this completion. When `falsy` the label is used as the insert text - # for this item. - # - # The `insertText` is subject to interpretation by the client side. - # Some tools might not take the string literally. For example - # VS Code when code complete is requested in this example - # `con` and a completion item with an `insertText` of - # `console` is provided it will only insert `sole`. Therefore it is - # recommended to use `textEdit` instead since it avoids additional client - # side interpretation. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#142 - def insert_text; end - - # The format of the insert text. The format applies to both the - # `insertText` property and the `newText` property of a provided - # `textEdit`. If omitted defaults to `InsertTextFormat.PlainText`. - # - # Please note that the insertTextFormat doesn't apply to - # `additionalTextEdits`. - # - # @return [InsertTextFormat] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#155 - def insert_text_format; end - - # How whitespace and indentation is handled during completion - # item insertion. If not provided the client's default value depends on - # the `textDocument.completion.insertTextMode` client capability. - # - # @return [InsertTextMode] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#165 - def insert_text_mode; end - - # The kind of this completion item. Based of the kind - # an icon is chosen by the editor. The standardized set - # of available values is defined in `CompletionItemKind`. - # - # @return [CompletionItemKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#59 - def kind; end - - # The label of this completion item. - # - # The label property is also by default the text that - # is inserted when selecting this completion. - # - # If label details are provided the label itself should - # be an unqualified name of the completion item. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#41 - def label; end - - # Additional details for the label - # - # @return [CompletionItemLabelDetails] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#49 - def label_details; end - - # Select this item when showing. - # - # *Note* that only one completion item can be selected and that the - # tool / client decides which item that is. The rule is that the *first* - # item of those that match best is selected. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#104 - def preselect; end - - # A string that should be used when comparing this item - # with other items. When `falsy` the label is used - # as the sort text for this item. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#114 - def sort_text; end - - # Tags for this completion item. - # - # @return [1[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#67 - def tags; end - - # An edit which is applied to a document when selecting this completion. - # When an edit is provided the value of `insertText` is ignored. - # - # *Note:* The range of the edit must be a single line range and it must - # contain the position at which completion has been requested. - # - # Most editors support two different operations when accepting a completion - # item. One is to insert a completion text and the other is to replace an - # existing text with a completion text. Since this can usually not be - # predetermined by a server it can report both ranges. Clients need to - # signal support for `InsertReplaceEdit`s via the - # `textDocument.completion.completionItem.insertReplaceSupport` client - # capability property. - # - # *Note 1:* The text edit's range as well as both ranges from an insert - # replace edit must be a [single line] and they must contain the position - # at which completion has been requested. - # *Note 2:* If an `InsertReplaceEdit` is returned the edit's insert range - # must be a prefix of the edit's replace range, that means it must be - # contained and starting at the same position. - # - # @return [TextEdit | InsertReplaceEdit] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#192 - def text_edit; end - - # The edit text used if the completion item is part of a CompletionList and - # CompletionList defines an item default for the text edit range. - # - # Clients will only honor this property if they opt into completion list - # item defaults using the capability `completionList.itemDefaults`. - # - # If not provided and a list's default range is provided the label - # property is used as a text. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#207 - def text_edit_text; end - - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#257 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#261 - def to_json(*args); end -end - -# Additional details for a completion item label. -# -# source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#7 -class LanguageServer::Protocol::Interface::CompletionItemLabelDetails - # @return [CompletionItemLabelDetails] a new instance of CompletionItemLabelDetails - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#8 - def initialize(detail: T.unsafe(nil), description: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#37 - def attributes; end - - # An optional string which is rendered less prominently after - # {@link CompletionItemLabelDetails.detail}. Should be used for fully qualified - # names or file path. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#33 - def description; end - - # An optional string which is rendered less prominently directly after - # {@link CompletionItem.label label}, without any spacing. Should be - # used for function signatures or type annotations. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#23 - def detail; end - - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#39 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#43 - def to_json(*args); end -end - -# Represents a collection of [completion items](#CompletionItem) to be -# presented in the editor. -# -# source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#8 -class LanguageServer::Protocol::Interface::CompletionList - # @return [CompletionList] a new instance of CompletionList - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#9 - def initialize(is_incomplete:, items:, item_defaults: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#57 - def attributes; end - - # This list is not complete. Further typing should result in recomputing - # this list. - # - # Recomputed lists have all their items replaced (not appended) in the - # incomplete completion sessions. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#27 - def is_incomplete; end - - # In many cases the items of an actual completion result share the same - # value for properties like `commitCharacters` or the range of a text - # edit. A completion list can therefore define item defaults which will - # be used if a completion item itself doesn't specify the value. - # - # If a completion list specifies a default value and a completion item - # also specifies a corresponding value the one from the item is used. - # - # Servers are only allowed to return default values if the client - # signals support for this via the `completionList.itemDefaults` - # capability. - # - # @return [{ commitCharacters?: string[]; editRange?: Range | { insert: Range; replace: Range; }; insertTextFormat?: InsertTextFormat; insertTextMode?: InsertTextMode; data?: LSPAny; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#45 - def item_defaults; end - - # The completion items. - # - # @return [CompletionItem[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#53 - def items; end - - # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#59 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#63 - def to_json(*args); end -end - -# Completion options. -# -# source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#7 -class LanguageServer::Protocol::Interface::CompletionOptions - # @return [CompletionOptions] a new instance of CompletionOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#8 - def initialize(work_done_progress: T.unsafe(nil), trigger_characters: T.unsafe(nil), all_commit_characters: T.unsafe(nil), resolve_provider: T.unsafe(nil), completion_item: T.unsafe(nil)); end - - # The list of all possible characters that commit a completion. This field - # can be used if clients don't support individual commit characters per - # completion item. See client capability - # `completion.completionItem.commitCharactersSupport`. - # - # If a server provides both `allCommitCharacters` and commit characters on - # an individual completion item the ones on the completion item win. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#53 - def all_commit_characters; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#75 - def attributes; end - - # The server supports the following `CompletionItem` specific - # capabilities. - # - # @return [{ labelDetailsSupport?: boolean; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#71 - def completion_item; end - - # The server provides support to resolve additional - # information for a completion item. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#62 - def resolve_provider; end - - # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#77 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#81 - def to_json(*args); end - - # The additional characters, beyond the defaults provided by the client (typically - # [a-zA-Z]), that should automatically trigger a completion request. For example - # `.` in JavaScript represents the beginning of an object property or method and is - # thus a good candidate for triggering a completion request. - # - # Most tools trigger a completion request automatically without explicitly - # requesting it using a keyboard shortcut (e.g. Ctrl+Space). Typically they - # do so when the user starts to type an identifier. For example if the user - # types `c` in a JavaScript file code complete will automatically pop up - # present `console` besides others as a completion item. Characters that - # make up identifiers don't need to be listed here. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#39 - def trigger_characters; end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#21 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#4 -class LanguageServer::Protocol::Interface::CompletionParams - # @return [CompletionParams] a new instance of CompletionParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#5 - def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil), context: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#60 - def attributes; end - - # The completion context. This is only available if the client specifies - # to send this using the client capability - # `completion.contextSupport === true` - # - # @return [CompletionContext] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#56 - def context; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#46 - def partial_result_token; end - - # The position inside the text document. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#29 - def position; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#21 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#62 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#66 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#37 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#4 -class LanguageServer::Protocol::Interface::CompletionRegistrationOptions - # @return [CompletionRegistrationOptions] a new instance of CompletionRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), trigger_characters: T.unsafe(nil), all_commit_characters: T.unsafe(nil), resolve_provider: T.unsafe(nil), completion_item: T.unsafe(nil)); end - - # The list of all possible characters that commit a completion. This field - # can be used if clients don't support individual commit characters per - # completion item. See client capability - # `completion.completionItem.commitCharactersSupport`. - # - # If a server provides both `allCommitCharacters` and commit characters on - # an individual completion item the ones on the completion item win. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#60 - def all_commit_characters; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#82 - def attributes; end - - # The server supports the following `CompletionItem` specific - # capabilities. - # - # @return [{ labelDetailsSupport?: boolean; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#78 - def completion_item; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#23 - def document_selector; end - - # The server provides support to resolve additional - # information for a completion item. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#69 - def resolve_provider; end - - # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#84 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#88 - def to_json(*args); end - - # The additional characters, beyond the defaults provided by the client (typically - # [a-zA-Z]), that should automatically trigger a completion request. For example - # `.` in JavaScript represents the beginning of an object property or method and is - # thus a good candidate for triggering a completion request. - # - # Most tools trigger a completion request automatically without explicitly - # requesting it using a keyboard shortcut (e.g. Ctrl+Space). Typically they - # do so when the user starts to type an identifier. For example if the user - # types `c` in a JavaScript file code complete will automatically pop up - # present `console` besides others as a completion item. Characters that - # make up identifiers don't need to be listed here. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#46 - def trigger_characters; end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#28 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#4 -class LanguageServer::Protocol::Interface::ConfigurationItem - # @return [ConfigurationItem] a new instance of ConfigurationItem - # - # source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#5 - def initialize(scope_uri: T.unsafe(nil), section: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#30 - def attributes; end - - # The scope to get the configuration section for. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#18 - def scope_uri; end - - # The configuration section asked for. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#26 - def section; end - - # source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#36 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/configuration_params.rb#4 -class LanguageServer::Protocol::Interface::ConfigurationParams - # @return [ConfigurationParams] a new instance of ConfigurationParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/configuration_params.rb#5 - def initialize(items:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/configuration_params.rb#18 - def attributes; end - - # @return [ConfigurationItem[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/configuration_params.rb#14 - def items; end - - # source://language_server-protocol//lib/language_server/protocol/interface/configuration_params.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/configuration_params.rb#24 - def to_json(*args); end -end - -# Create file operation -# -# source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#7 -class LanguageServer::Protocol::Interface::CreateFile - # @return [CreateFile] a new instance of CreateFile - # - # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#8 - def initialize(kind:, uri:, options: T.unsafe(nil), annotation_id: T.unsafe(nil)); end - - # An optional annotation identifier describing the operation. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#47 - def annotation_id; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#51 - def attributes; end - - # A create - # - # @return ["create"] - # - # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#23 - def kind; end - - # Additional options - # - # @return [CreateFileOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#39 - def options; end - - # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#53 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#57 - def to_json(*args); end - - # The resource to create. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#31 - def uri; end -end - -# Options to create a file. -# -# source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#7 -class LanguageServer::Protocol::Interface::CreateFileOptions - # @return [CreateFileOptions] a new instance of CreateFileOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#8 - def initialize(overwrite: T.unsafe(nil), ignore_if_exists: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#33 - def attributes; end - - # Ignore if exists. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#29 - def ignore_if_exists; end - - # Overwrite existing file. Overwrite wins over `ignoreIfExists` - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#21 - def overwrite; end - - # source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#35 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#39 - def to_json(*args); end -end - -# The parameters sent in notifications/requests for user-initiated creation -# of files. -# -# source://language_server-protocol//lib/language_server/protocol/interface/create_files_params.rb#8 -class LanguageServer::Protocol::Interface::CreateFilesParams - # @return [CreateFilesParams] a new instance of CreateFilesParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/create_files_params.rb#9 - def initialize(files:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/create_files_params.rb#25 - def attributes; end - - # An array of all files/folders created in this operation. - # - # @return [FileCreate[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/create_files_params.rb#21 - def files; end - - # source://language_server-protocol//lib/language_server/protocol/interface/create_files_params.rb#27 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/create_files_params.rb#31 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::DeclarationClientCapabilities - # @return [DeclarationClientCapabilities] a new instance of DeclarationClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil), link_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#32 - def attributes; end - - # Whether declaration supports dynamic registration. If this is set to - # `true` the client supports the new `DeclarationRegistrationOptions` - # return value for the corresponding server capability as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#20 - def dynamic_registration; end - - # The client supports additional metadata in the form of declaration links. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#28 - def link_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#34 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#38 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/declaration_options.rb#4 -class LanguageServer::Protocol::Interface::DeclarationOptions - # @return [DeclarationOptions] a new instance of DeclarationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#4 -class LanguageServer::Protocol::Interface::DeclarationParams - # @return [DeclarationParams] a new instance of DeclarationParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#5 - def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#49 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#45 - def partial_result_token; end - - # The position inside the text document. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#28 - def position; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#20 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#51 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#55 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#36 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#4 -class LanguageServer::Protocol::Interface::DeclarationRegistrationOptions - # @return [DeclarationRegistrationOptions] a new instance of DeclarationRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#38 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#25 - def document_selector; end - - # The id used to register the request. The id can be used to deregister - # the request again. See also Registration#id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#34 - def id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#40 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#44 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#16 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::DefinitionClientCapabilities - # @return [DefinitionClientCapabilities] a new instance of DefinitionClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil), link_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#30 - def attributes; end - - # Whether definition supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#18 - def dynamic_registration; end - - # The client supports additional metadata in the form of definition links. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#26 - def link_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#36 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/definition_options.rb#4 -class LanguageServer::Protocol::Interface::DefinitionOptions - # @return [DefinitionOptions] a new instance of DefinitionOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/definition_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/definition_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#4 -class LanguageServer::Protocol::Interface::DefinitionParams - # @return [DefinitionParams] a new instance of DefinitionParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#5 - def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#49 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#45 - def partial_result_token; end - - # The position inside the text document. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#28 - def position; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#20 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#51 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#55 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#36 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#4 -class LanguageServer::Protocol::Interface::DefinitionRegistrationOptions - # @return [DefinitionRegistrationOptions] a new instance of DefinitionRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#28 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#19 - def document_selector; end - - # source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#30 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#34 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#24 - def work_done_progress; end -end - -# Delete file operation -# -# source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#7 -class LanguageServer::Protocol::Interface::DeleteFile - # @return [DeleteFile] a new instance of DeleteFile - # - # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#8 - def initialize(kind:, uri:, options: T.unsafe(nil), annotation_id: T.unsafe(nil)); end - - # An optional annotation identifier describing the operation. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#47 - def annotation_id; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#51 - def attributes; end - - # A delete - # - # @return ["delete"] - # - # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#23 - def kind; end - - # Delete options. - # - # @return [DeleteFileOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#39 - def options; end - - # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#53 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#57 - def to_json(*args); end - - # The file to delete. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#31 - def uri; end -end - -# Delete file options -# -# source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#7 -class LanguageServer::Protocol::Interface::DeleteFileOptions - # @return [DeleteFileOptions] a new instance of DeleteFileOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#8 - def initialize(recursive: T.unsafe(nil), ignore_if_not_exists: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#33 - def attributes; end - - # Ignore the operation if the file doesn't exist. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#29 - def ignore_if_not_exists; end - - # Delete the content recursively if a folder is denoted. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#21 - def recursive; end - - # source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#35 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#39 - def to_json(*args); end -end - -# The parameters sent in notifications/requests for user-initiated deletes -# of files. -# -# source://language_server-protocol//lib/language_server/protocol/interface/delete_files_params.rb#8 -class LanguageServer::Protocol::Interface::DeleteFilesParams - # @return [DeleteFilesParams] a new instance of DeleteFilesParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/delete_files_params.rb#9 - def initialize(files:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/delete_files_params.rb#25 - def attributes; end - - # An array of all files/folders deleted in this operation. - # - # @return [FileDelete[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/delete_files_params.rb#21 - def files; end - - # source://language_server-protocol//lib/language_server/protocol/interface/delete_files_params.rb#27 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/delete_files_params.rb#31 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#4 -class LanguageServer::Protocol::Interface::Diagnostic - # @return [Diagnostic] a new instance of Diagnostic - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#5 - def initialize(range:, message:, severity: T.unsafe(nil), code: T.unsafe(nil), code_description: T.unsafe(nil), source: T.unsafe(nil), tags: T.unsafe(nil), related_information: T.unsafe(nil), data: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#98 - def attributes; end - - # The diagnostic's code, which might appear in the user interface. - # - # @return [string | number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#42 - def code; end - - # An optional property to describe the error code. - # - # @return [CodeDescription] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#50 - def code_description; end - - # A data entry field that is preserved between a - # `textDocument/publishDiagnostics` notification and - # `textDocument/codeAction` request. - # - # @return [unknown] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#94 - def data; end - - # The diagnostic's message. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#67 - def message; end - - # The range at which the message applies. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#25 - def range; end - - # An array of related diagnostic information, e.g. when symbol-names within - # a scope collide all definitions can be marked via this property. - # - # @return [DiagnosticRelatedInformation[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#84 - def related_information; end - - # The diagnostic's severity. Can be omitted. If omitted it is up to the - # client to interpret diagnostics as error, warning, info or hint. - # - # @return [DiagnosticSeverity] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#34 - def severity; end - - # A human-readable string describing the source of this - # diagnostic, e.g. 'typescript' or 'super lint'. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#59 - def source; end - - # Additional metadata about the diagnostic. - # - # @return [DiagnosticTag[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#75 - def tags; end - - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#100 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#104 - def to_json(*args); end -end - -# Client capabilities specific to diagnostic pull requests. -# -# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#7 -class LanguageServer::Protocol::Interface::DiagnosticClientCapabilities - # @return [DiagnosticClientCapabilities] a new instance of DiagnosticClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#8 - def initialize(dynamic_registration: T.unsafe(nil), related_document_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#37 - def attributes; end - - # Whether implementation supports dynamic registration. If this is set to - # `true` the client supports the new - # `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` - # return value for the corresponding server capability as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#24 - def dynamic_registration; end - - # Whether the clients supports related documents for document diagnostic - # pulls. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#33 - def related_document_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#39 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#43 - def to_json(*args); end -end - -# Diagnostic options. -# -# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#7 -class LanguageServer::Protocol::Interface::DiagnosticOptions - # @return [DiagnosticOptions] a new instance of DiagnosticOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#8 - def initialize(inter_file_dependencies:, workspace_diagnostics:, work_done_progress: T.unsafe(nil), identifier: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#52 - def attributes; end - - # An optional identifier under which the diagnostics are - # managed by the client. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#29 - def identifier; end - - # Whether the language has inter file dependencies meaning that - # editing code in one file can result in a different diagnostic - # set in another file. Inter file dependencies are common for - # most programming languages and typically uncommon for linters. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#40 - def inter_file_dependencies; end - - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#54 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#58 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#20 - def work_done_progress; end - - # The server provides support for workspace diagnostics as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#48 - def workspace_diagnostics; end -end - -# Diagnostic registration options. -# -# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#7 -class LanguageServer::Protocol::Interface::DiagnosticRegistrationOptions - # @return [DiagnosticRegistrationOptions] a new instance of DiagnosticRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#8 - def initialize(document_selector:, inter_file_dependencies:, workspace_diagnostics:, work_done_progress: T.unsafe(nil), identifier: T.unsafe(nil), id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#72 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#26 - def document_selector; end - - # The id used to register the request. The id can be used to deregister - # the request again. See also Registration#id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#68 - def id; end - - # An optional identifier under which the diagnostics are - # managed by the client. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#40 - def identifier; end - - # Whether the language has inter file dependencies meaning that - # editing code in one file can result in a different diagnostic - # set in another file. Inter file dependencies are common for - # most programming languages and typically uncommon for linters. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#51 - def inter_file_dependencies; end - - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#74 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#78 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#31 - def work_done_progress; end - - # The server provides support for workspace diagnostics as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#59 - def workspace_diagnostics; end -end - -# Represents a related message and source code location for a diagnostic. -# This should be used to point to code locations that cause or are related to -# a diagnostics, e.g when duplicating a symbol in a scope. -# -# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#9 -class LanguageServer::Protocol::Interface::DiagnosticRelatedInformation - # @return [DiagnosticRelatedInformation] a new instance of DiagnosticRelatedInformation - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#10 - def initialize(location:, message:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#35 - def attributes; end - - # The location of this related diagnostic information. - # - # @return [Location] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#23 - def location; end - - # The message of this related diagnostic information. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#31 - def message; end - - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#37 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#41 - def to_json(*args); end -end - -# Cancellation data returned from a diagnostic request. -# -# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_server_cancellation_data.rb#7 -class LanguageServer::Protocol::Interface::DiagnosticServerCancellationData - # @return [DiagnosticServerCancellationData] a new instance of DiagnosticServerCancellationData - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_server_cancellation_data.rb#8 - def initialize(retrigger_request:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_server_cancellation_data.rb#21 - def attributes; end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_server_cancellation_data.rb#17 - def retrigger_request; end - - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_server_cancellation_data.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_server_cancellation_data.rb#27 - def to_json(*args); end -end - -# Workspace client capabilities specific to diagnostic pull requests. -# -# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_workspace_client_capabilities.rb#7 -class LanguageServer::Protocol::Interface::DiagnosticWorkspaceClientCapabilities - # @return [DiagnosticWorkspaceClientCapabilities] a new instance of DiagnosticWorkspaceClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_workspace_client_capabilities.rb#8 - def initialize(refresh_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_workspace_client_capabilities.rb#30 - def attributes; end - - # Whether the client implementation supports a refresh request sent from - # the server to the client. - # - # Note that this event is global and will force the client to refresh all - # pulled diagnostics currently shown. It should be used with absolute care - # and is useful for situation where a server for example detects a project - # wide change that requires such a calculation. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_workspace_client_capabilities.rb#26 - def refresh_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_workspace_client_capabilities.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_workspace_client_capabilities.rb#36 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::DidChangeConfigurationClientCapabilities - # @return [DidChangeConfigurationClientCapabilities] a new instance of DidChangeConfigurationClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_client_capabilities.rb#21 - def attributes; end - - # Did change configuration notification supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_client_capabilities.rb#17 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_client_capabilities.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_client_capabilities.rb#27 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_params.rb#4 -class LanguageServer::Protocol::Interface::DidChangeConfigurationParams - # @return [DidChangeConfigurationParams] a new instance of DidChangeConfigurationParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_params.rb#5 - def initialize(settings:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_params.rb#21 - def attributes; end - - # The actual changed settings - # - # @return [LSPAny] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_params.rb#17 - def settings; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_params.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_params.rb#27 - def to_json(*args); end -end - -# The params sent in a change notebook document notification. -# -# source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#7 -class LanguageServer::Protocol::Interface::DidChangeNotebookDocumentParams - # @return [DidChangeNotebookDocumentParams] a new instance of DidChangeNotebookDocumentParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#8 - def initialize(notebook_document:, change:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#44 - def attributes; end - - # The actual changes to the notebook document. - # - # The change describes single state change to the notebook document. - # So it moves a notebook document, its cells and its cell text document - # contents from state S to S'. - # - # To mirror the content of a notebook using change events use the - # following approach: - # - start with the same initial content - # - apply the 'notebookDocument/didChange' notifications in the order - # you receive them. - # - # @return [NotebookDocumentChangeEvent] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#40 - def change; end - - # The notebook document that did change. The version number points - # to the version after all provided changes have been applied. - # - # @return [VersionedNotebookDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#22 - def notebook_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#46 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#50 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#4 -class LanguageServer::Protocol::Interface::DidChangeTextDocumentParams - # @return [DidChangeTextDocumentParams] a new instance of DidChangeTextDocumentParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#5 - def initialize(text_document:, content_changes:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#44 - def attributes; end - - # The actual content changes. The content changes describe single state - # changes to the document. So if there are two content changes c1 (at - # array index 0) and c2 (at array index 1) for a document in state S then - # c1 moves the document from S to S' and c2 from S' to S''. So c1 is - # computed on the state S and c2 is computed on the state S'. - # - # To mirror the content of a document using change events use the following - # approach: - # - start with the same initial content - # - apply the 'textDocument/didChange' notifications in the order you - # receive them. - # - apply the `TextDocumentContentChangeEvent`s in a single notification - # in the order you receive them. - # - # @return [TextDocumentContentChangeEvent[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#40 - def content_changes; end - - # The document that did change. The version number points - # to the version after all provided content changes have - # been applied. - # - # @return [VersionedTextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#20 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#46 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#50 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::DidChangeWatchedFilesClientCapabilities - # @return [DidChangeWatchedFilesClientCapabilities] a new instance of DidChangeWatchedFilesClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil), relative_pattern_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#33 - def attributes; end - - # Did change watched files notification supports dynamic registration. - # Please note that the current protocol doesn't support static - # configuration for file changes from the server side. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#20 - def dynamic_registration; end - - # Whether the client has support for relative patterns - # or not. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#29 - def relative_pattern_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#35 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#39 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_params.rb#4 -class LanguageServer::Protocol::Interface::DidChangeWatchedFilesParams - # @return [DidChangeWatchedFilesParams] a new instance of DidChangeWatchedFilesParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_params.rb#5 - def initialize(changes:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_params.rb#21 - def attributes; end - - # The actual file events. - # - # @return [FileEvent[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_params.rb#17 - def changes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_params.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_params.rb#27 - def to_json(*args); end -end - -# Describe options to be used when registering for file system change events. -# -# source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb#7 -class LanguageServer::Protocol::Interface::DidChangeWatchedFilesRegistrationOptions - # @return [DidChangeWatchedFilesRegistrationOptions] a new instance of DidChangeWatchedFilesRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb#8 - def initialize(watchers:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb#24 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb#30 - def to_json(*args); end - - # The watchers to register. - # - # @return [FileSystemWatcher[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb#20 - def watchers; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/did_change_workspace_folders_params.rb#4 -class LanguageServer::Protocol::Interface::DidChangeWorkspaceFoldersParams - # @return [DidChangeWorkspaceFoldersParams] a new instance of DidChangeWorkspaceFoldersParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_workspace_folders_params.rb#5 - def initialize(event:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_workspace_folders_params.rb#21 - def attributes; end - - # The actual workspace folder change event. - # - # @return [WorkspaceFoldersChangeEvent] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_workspace_folders_params.rb#17 - def event; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_workspace_folders_params.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_change_workspace_folders_params.rb#27 - def to_json(*args); end -end - -# The params sent in a close notebook document notification. -# -# source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#7 -class LanguageServer::Protocol::Interface::DidCloseNotebookDocumentParams - # @return [DidCloseNotebookDocumentParams] a new instance of DidCloseNotebookDocumentParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#8 - def initialize(notebook_document:, cell_text_documents:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#34 - def attributes; end - - # The text documents that represent the content - # of a notebook cell that got closed. - # - # @return [TextDocumentIdentifier[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#30 - def cell_text_documents; end - - # The notebook document that got closed. - # - # @return [NotebookDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#21 - def notebook_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#36 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#40 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/did_close_text_document_params.rb#4 -class LanguageServer::Protocol::Interface::DidCloseTextDocumentParams - # @return [DidCloseTextDocumentParams] a new instance of DidCloseTextDocumentParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_close_text_document_params.rb#5 - def initialize(text_document:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_close_text_document_params.rb#21 - def attributes; end - - # The document that was closed. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_close_text_document_params.rb#17 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_close_text_document_params.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_close_text_document_params.rb#27 - def to_json(*args); end -end - -# The params sent in an open notebook document notification. -# -# source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#7 -class LanguageServer::Protocol::Interface::DidOpenNotebookDocumentParams - # @return [DidOpenNotebookDocumentParams] a new instance of DidOpenNotebookDocumentParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#8 - def initialize(notebook_document:, cell_text_documents:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#34 - def attributes; end - - # The text documents that represent the content - # of a notebook cell. - # - # @return [TextDocumentItem[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#30 - def cell_text_documents; end - - # The notebook document that got opened. - # - # @return [NotebookDocument] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#21 - def notebook_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#36 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#40 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/did_open_text_document_params.rb#4 -class LanguageServer::Protocol::Interface::DidOpenTextDocumentParams - # @return [DidOpenTextDocumentParams] a new instance of DidOpenTextDocumentParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_open_text_document_params.rb#5 - def initialize(text_document:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_open_text_document_params.rb#21 - def attributes; end - - # The document that was opened. - # - # @return [TextDocumentItem] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_open_text_document_params.rb#17 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_open_text_document_params.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_open_text_document_params.rb#27 - def to_json(*args); end -end - -# The params sent in a save notebook document notification. -# -# source://language_server-protocol//lib/language_server/protocol/interface/did_save_notebook_document_params.rb#7 -class LanguageServer::Protocol::Interface::DidSaveNotebookDocumentParams - # @return [DidSaveNotebookDocumentParams] a new instance of DidSaveNotebookDocumentParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_save_notebook_document_params.rb#8 - def initialize(notebook_document:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_save_notebook_document_params.rb#24 - def attributes; end - - # The notebook document that got saved. - # - # @return [NotebookDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_save_notebook_document_params.rb#20 - def notebook_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_save_notebook_document_params.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_save_notebook_document_params.rb#30 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#4 -class LanguageServer::Protocol::Interface::DidSaveTextDocumentParams - # @return [DidSaveTextDocumentParams] a new instance of DidSaveTextDocumentParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#5 - def initialize(text_document:, text: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#31 - def attributes; end - - # Optional the content when saved. Depends on the includeText value - # when the save notification was requested. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#27 - def text; end - - # The document that was saved. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#18 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#33 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#37 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_color_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::DocumentColorClientCapabilities - # @return [DocumentColorClientCapabilities] a new instance of DocumentColorClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_client_capabilities.rb#21 - def attributes; end - - # Whether document color supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_client_capabilities.rb#17 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_client_capabilities.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_client_capabilities.rb#27 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_color_options.rb#4 -class LanguageServer::Protocol::Interface::DocumentColorOptions - # @return [DocumentColorOptions] a new instance of DocumentColorOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#4 -class LanguageServer::Protocol::Interface::DocumentColorParams - # @return [DocumentColorParams] a new instance of DocumentColorParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#5 - def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#40 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#28 - def partial_result_token; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#36 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#42 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#46 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#19 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#4 -class LanguageServer::Protocol::Interface::DocumentColorRegistrationOptions - # @return [DocumentColorRegistrationOptions] a new instance of DocumentColorRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#5 - def initialize(document_selector:, id: T.unsafe(nil), work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#38 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#20 - def document_selector; end - - # The id used to register the request. The id can be used to deregister - # the request again. See also Registration#id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#29 - def id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#40 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#44 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#34 - def work_done_progress; end -end - -# Parameters of the document diagnostic request. -# -# source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#7 -class LanguageServer::Protocol::Interface::DocumentDiagnosticParams - # @return [DocumentDiagnosticParams] a new instance of DocumentDiagnosticParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#8 - def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil), identifier: T.unsafe(nil), previous_result_id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#61 - def attributes; end - - # The additional identifier provided during registration. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#49 - def identifier; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#33 - def partial_result_token; end - - # The result id of a previous response if provided. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#57 - def previous_result_id; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#41 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#63 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#67 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#24 - def work_done_token; end -end - -# A partial result for a document diagnostic report. -# -# source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_report_partial_result.rb#7 -class LanguageServer::Protocol::Interface::DocumentDiagnosticReportPartialResult - # @return [DocumentDiagnosticReportPartialResult] a new instance of DocumentDiagnosticReportPartialResult - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_report_partial_result.rb#8 - def initialize(related_documents:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_report_partial_result.rb#21 - def attributes; end - - # @return [{ [uri: string]: FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_report_partial_result.rb#17 - def related_documents; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_report_partial_result.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_report_partial_result.rb#27 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#4 -class LanguageServer::Protocol::Interface::DocumentFilter - # @return [DocumentFilter] a new instance of DocumentFilter - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#5 - def initialize(language: T.unsafe(nil), scheme: T.unsafe(nil), pattern: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#51 - def attributes; end - - # A language id, like `typescript`. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#19 - def language; end - - # A glob pattern, like `*.{ts,js}`. - # - # Glob patterns can have the following syntax: - # - `*` to match one or more characters in a path segment - # - `?` to match on one character in a path segment - # - `**` to match any number of path segments, including none - # - `{}` to group sub patterns into an OR expression. (e.g. `**​/*.{ts,js}` - # matches all TypeScript and JavaScript files) - # - `[]` to declare a range of characters to match in a path segment - # (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …) - # - `[!...]` to negate a range of characters to match in a path segment - # (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but - # not `example.0`) - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#47 - def pattern; end - - # A Uri [scheme](#Uri.scheme), like `file` or `untitled`. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#27 - def scheme; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#53 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#57 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::DocumentFormattingClientCapabilities - # @return [DocumentFormattingClientCapabilities] a new instance of DocumentFormattingClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_client_capabilities.rb#21 - def attributes; end - - # Whether formatting supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_client_capabilities.rb#17 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_client_capabilities.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_client_capabilities.rb#27 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_options.rb#4 -class LanguageServer::Protocol::Interface::DocumentFormattingOptions - # @return [DocumentFormattingOptions] a new instance of DocumentFormattingOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#4 -class LanguageServer::Protocol::Interface::DocumentFormattingParams - # @return [DocumentFormattingParams] a new instance of DocumentFormattingParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#5 - def initialize(text_document:, options:, work_done_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#39 - def attributes; end - - # The format options. - # - # @return [FormattingOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#35 - def options; end - - # The document to format. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#27 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#41 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#45 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#19 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#4 -class LanguageServer::Protocol::Interface::DocumentFormattingRegistrationOptions - # @return [DocumentFormattingRegistrationOptions] a new instance of DocumentFormattingRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#28 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#19 - def document_selector; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#30 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#34 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#24 - def work_done_progress; end -end - -# A document highlight is a range inside a text document which deserves -# special attention. Usually a document highlight is visualized by changing -# the background color of its range. -# -# source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#9 -class LanguageServer::Protocol::Interface::DocumentHighlight - # @return [DocumentHighlight] a new instance of DocumentHighlight - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#10 - def initialize(range:, kind: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#35 - def attributes; end - - # The highlight kind, default is DocumentHighlightKind.Text. - # - # @return [DocumentHighlightKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#31 - def kind; end - - # The range this highlight applies to. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#23 - def range; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#37 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#41 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::DocumentHighlightClientCapabilities - # @return [DocumentHighlightClientCapabilities] a new instance of DocumentHighlightClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_client_capabilities.rb#21 - def attributes; end - - # Whether document highlight supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_client_capabilities.rb#17 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_client_capabilities.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_client_capabilities.rb#27 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_options.rb#4 -class LanguageServer::Protocol::Interface::DocumentHighlightOptions - # @return [DocumentHighlightOptions] a new instance of DocumentHighlightOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#4 -class LanguageServer::Protocol::Interface::DocumentHighlightParams - # @return [DocumentHighlightParams] a new instance of DocumentHighlightParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#5 - def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#49 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#45 - def partial_result_token; end - - # The position inside the text document. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#28 - def position; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#20 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#51 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#55 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#36 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#4 -class LanguageServer::Protocol::Interface::DocumentHighlightRegistrationOptions - # @return [DocumentHighlightRegistrationOptions] a new instance of DocumentHighlightRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#28 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#19 - def document_selector; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#30 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#34 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#24 - def work_done_progress; end -end - -# A document link is a range in a text document that links to an internal or -# external resource, like another text document or a web site. -# -# source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#8 -class LanguageServer::Protocol::Interface::DocumentLink - # @return [DocumentLink] a new instance of DocumentLink - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#9 - def initialize(range:, target: T.unsafe(nil), tooltip: T.unsafe(nil), data: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#58 - def attributes; end - - # A data entry field that is preserved on a document link between a - # DocumentLinkRequest and a DocumentLinkResolveRequest. - # - # @return [LSPAny] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#54 - def data; end - - # The range this link applies to. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#24 - def range; end - - # The uri this link points to. If missing a resolve request is sent later. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#32 - def target; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#60 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#64 - def to_json(*args); end - - # The tooltip text when you hover over this link. - # - # If a tooltip is provided, is will be displayed in a string that includes - # instructions on how to trigger the link, such as `{0} (ctrl + click)`. - # The specific instructions vary depending on OS, user settings, and - # localization. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#45 - def tooltip; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::DocumentLinkClientCapabilities - # @return [DocumentLinkClientCapabilities] a new instance of DocumentLinkClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil), tooltip_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#30 - def attributes; end - - # Whether document link supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#18 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#36 - def to_json(*args); end - - # Whether the client supports the `tooltip` property on `DocumentLink`. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#26 - def tooltip_support; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#4 -class LanguageServer::Protocol::Interface::DocumentLinkOptions - # @return [DocumentLinkOptions] a new instance of DocumentLinkOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#27 - def attributes; end - - # Document links have a resolve provider as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#23 - def resolve_provider; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#29 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#33 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#15 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#4 -class LanguageServer::Protocol::Interface::DocumentLinkParams - # @return [DocumentLinkParams] a new instance of DocumentLinkParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#5 - def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#40 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#28 - def partial_result_token; end - - # The document to provide document links for. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#36 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#42 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#46 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#19 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#4 -class LanguageServer::Protocol::Interface::DocumentLinkRegistrationOptions - # @return [DocumentLinkRegistrationOptions] a new instance of DocumentLinkRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#37 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#20 - def document_selector; end - - # Document links have a resolve provider as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#33 - def resolve_provider; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#39 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#43 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#25 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::DocumentOnTypeFormattingClientCapabilities - # @return [DocumentOnTypeFormattingClientCapabilities] a new instance of DocumentOnTypeFormattingClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb#21 - def attributes; end - - # Whether on type formatting supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb#17 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb#27 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#4 -class LanguageServer::Protocol::Interface::DocumentOnTypeFormattingOptions - # @return [DocumentOnTypeFormattingOptions] a new instance of DocumentOnTypeFormattingOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#5 - def initialize(first_trigger_character:, more_trigger_character: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#30 - def attributes; end - - # A character on which formatting should be triggered, like `{`. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#18 - def first_trigger_character; end - - # More trigger characters. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#26 - def more_trigger_character; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#36 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#4 -class LanguageServer::Protocol::Interface::DocumentOnTypeFormattingParams - # @return [DocumentOnTypeFormattingParams] a new instance of DocumentOnTypeFormattingParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#5 - def initialize(text_document:, position:, ch:, options:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#53 - def attributes; end - - # The character that has been typed that triggered the formatting - # on type request. That is not necessarily the last character that - # got inserted into the document since the client could auto insert - # characters as well (e.g. like automatic brace completion). - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#41 - def ch; end - - # The formatting options. - # - # @return [FormattingOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#49 - def options; end - - # The position around which the on type formatting should happen. - # This is not necessarily the exact position where the character denoted - # by the property `ch` got typed. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#30 - def position; end - - # The document to format. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#20 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#55 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#59 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#4 -class LanguageServer::Protocol::Interface::DocumentOnTypeFormattingRegistrationOptions - # @return [DocumentOnTypeFormattingRegistrationOptions] a new instance of DocumentOnTypeFormattingRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#5 - def initialize(document_selector:, first_trigger_character:, more_trigger_character: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#40 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#20 - def document_selector; end - - # A character on which formatting should be triggered, like `{`. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#28 - def first_trigger_character; end - - # More trigger characters. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#36 - def more_trigger_character; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#42 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#46 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::DocumentRangeFormattingClientCapabilities - # @return [DocumentRangeFormattingClientCapabilities] a new instance of DocumentRangeFormattingClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_client_capabilities.rb#21 - def attributes; end - - # Whether formatting supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_client_capabilities.rb#17 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_client_capabilities.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_client_capabilities.rb#27 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_options.rb#4 -class LanguageServer::Protocol::Interface::DocumentRangeFormattingOptions - # @return [DocumentRangeFormattingOptions] a new instance of DocumentRangeFormattingOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#4 -class LanguageServer::Protocol::Interface::DocumentRangeFormattingParams - # @return [DocumentRangeFormattingParams] a new instance of DocumentRangeFormattingParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#5 - def initialize(text_document:, range:, options:, work_done_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#48 - def attributes; end - - # The format options - # - # @return [FormattingOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#44 - def options; end - - # The range to format - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#36 - def range; end - - # The document to format. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#28 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#50 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#54 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#20 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#4 -class LanguageServer::Protocol::Interface::DocumentRangeFormattingRegistrationOptions - # @return [DocumentRangeFormattingRegistrationOptions] a new instance of DocumentRangeFormattingRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#28 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#19 - def document_selector; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#30 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#34 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#24 - def work_done_progress; end -end - -# Represents programming constructs like variables, classes, interfaces etc. -# that appear in a document. Document symbols can be hierarchical and they -# have two ranges: one that encloses its definition and one that points to its -# most interesting range, e.g. the range of an identifier. -# -# source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#10 -class LanguageServer::Protocol::Interface::DocumentSymbol - # @return [DocumentSymbol] a new instance of DocumentSymbol - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#11 - def initialize(name:, kind:, range:, selection_range:, detail: T.unsafe(nil), tags: T.unsafe(nil), deprecated: T.unsafe(nil), children: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#96 - def attributes; end - - # Children of this symbol, e.g. properties of a class. - # - # @return [DocumentSymbol[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#92 - def children; end - - # Indicates if this symbol is deprecated. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#64 - def deprecated; end - - # More detail for this symbol, e.g the signature of a function. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#40 - def detail; end - - # The kind of this symbol. - # - # @return [SymbolKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#48 - def kind; end - - # The name of this symbol. Will be displayed in the user interface and - # therefore must not be an empty string or a string only consisting of - # white spaces. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#32 - def name; end - - # The range enclosing this symbol not including leading/trailing whitespace - # but everything else like comments. This information is typically used to - # determine if the clients cursor is inside the symbol to reveal in the - # symbol in the UI. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#75 - def range; end - - # The range that should be selected and revealed when this symbol is being - # picked, e.g. the name of a function. Must be contained by the `range`. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#84 - def selection_range; end - - # Tags for this document symbol. - # - # @return [1[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#56 - def tags; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#98 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#102 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::DocumentSymbolClientCapabilities - # @return [DocumentSymbolClientCapabilities] a new instance of DocumentSymbolClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil), symbol_kind: T.unsafe(nil), hierarchical_document_symbol_support: T.unsafe(nil), tag_support: T.unsafe(nil), label_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#61 - def attributes; end - - # Whether document symbol supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#21 - def dynamic_registration; end - - # The client supports hierarchical document symbols. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#38 - def hierarchical_document_symbol_support; end - - # The client supports an additional label presented in the UI when - # registering a document symbol provider. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#57 - def label_support; end - - # Specific capabilities for the `SymbolKind` in the - # `textDocument/documentSymbol` request. - # - # @return [{ valueSet?: SymbolKind[]; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#30 - def symbol_kind; end - - # The client supports tags on `SymbolInformation`. Tags are supported on - # `DocumentSymbol` if `hierarchicalDocumentSymbolSupport` is set to true. - # Clients supporting tags have to handle unknown tags gracefully. - # - # @return [{ valueSet: 1[]; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#48 - def tag_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#63 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#67 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#4 -class LanguageServer::Protocol::Interface::DocumentSymbolOptions - # @return [DocumentSymbolOptions] a new instance of DocumentSymbolOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil), label: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#28 - def attributes; end - - # A human-readable string that is shown when multiple outlines trees - # are shown for the same document. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#24 - def label; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#30 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#34 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#15 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#4 -class LanguageServer::Protocol::Interface::DocumentSymbolParams - # @return [DocumentSymbolParams] a new instance of DocumentSymbolParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#5 - def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#40 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#28 - def partial_result_token; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#36 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#42 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#46 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#19 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#4 -class LanguageServer::Protocol::Interface::DocumentSymbolRegistrationOptions - # @return [DocumentSymbolRegistrationOptions] a new instance of DocumentSymbolRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), label: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#38 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#20 - def document_selector; end - - # A human-readable string that is shown when multiple outlines trees - # are shown for the same document. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#34 - def label; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#40 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#44 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#25 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/execute_command_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::ExecuteCommandClientCapabilities - # @return [ExecuteCommandClientCapabilities] a new instance of ExecuteCommandClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_client_capabilities.rb#21 - def attributes; end - - # Execute command supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_client_capabilities.rb#17 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_client_capabilities.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_client_capabilities.rb#27 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#4 -class LanguageServer::Protocol::Interface::ExecuteCommandOptions - # @return [ExecuteCommandOptions] a new instance of ExecuteCommandOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#5 - def initialize(commands:, work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#27 - def attributes; end - - # The commands to be executed on the server - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#23 - def commands; end - - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#29 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#33 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#15 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#4 -class LanguageServer::Protocol::Interface::ExecuteCommandParams - # @return [ExecuteCommandParams] a new instance of ExecuteCommandParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#5 - def initialize(command:, work_done_token: T.unsafe(nil), arguments: T.unsafe(nil)); end - - # Arguments that the command should be invoked with. - # - # @return [LSPAny[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#35 - def arguments; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#39 - def attributes; end - - # The identifier of the actual command handler. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#27 - def command; end - - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#41 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#45 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#19 - def work_done_token; end -end - -# Execute command registration options. -# -# source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#7 -class LanguageServer::Protocol::Interface::ExecuteCommandRegistrationOptions - # @return [ExecuteCommandRegistrationOptions] a new instance of ExecuteCommandRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#8 - def initialize(commands:, work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#30 - def attributes; end - - # The commands to be executed on the server - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#26 - def commands; end - - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#36 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#18 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#4 -class LanguageServer::Protocol::Interface::ExecutionSummary - # @return [ExecutionSummary] a new instance of ExecutionSummary - # - # source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#5 - def initialize(execution_order:, success: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#33 - def attributes; end - - # A strict monotonically increasing value - # indicating the execution order of a cell - # inside a notebook. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#20 - def execution_order; end - - # Whether the execution was successful or - # not if known by the client. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#29 - def success; end - - # source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#35 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#39 - def to_json(*args); end -end - -# Represents information on a file/folder create. -# -# source://language_server-protocol//lib/language_server/protocol/interface/file_create.rb#7 -class LanguageServer::Protocol::Interface::FileCreate - # @return [FileCreate] a new instance of FileCreate - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_create.rb#8 - def initialize(uri:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_create.rb#24 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_create.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_create.rb#30 - def to_json(*args); end - - # A file:// URI for the location of the file/folder being created. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_create.rb#20 - def uri; end -end - -# Represents information on a file/folder delete. -# -# source://language_server-protocol//lib/language_server/protocol/interface/file_delete.rb#7 -class LanguageServer::Protocol::Interface::FileDelete - # @return [FileDelete] a new instance of FileDelete - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_delete.rb#8 - def initialize(uri:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_delete.rb#24 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_delete.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_delete.rb#30 - def to_json(*args); end - - # A file:// URI for the location of the file/folder being deleted. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_delete.rb#20 - def uri; end -end - -# An event describing a file change. -# -# source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#7 -class LanguageServer::Protocol::Interface::FileEvent - # @return [FileEvent] a new instance of FileEvent - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#8 - def initialize(uri:, type:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#33 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#35 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#39 - def to_json(*args); end - - # The change type. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#29 - def type; end - - # The file's URI. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#21 - def uri; end -end - -# A filter to describe in which file operation requests or notifications -# the server is interested in. -# -# source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#8 -class LanguageServer::Protocol::Interface::FileOperationFilter - # @return [FileOperationFilter] a new instance of FileOperationFilter - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#9 - def initialize(pattern:, scheme: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#34 - def attributes; end - - # The actual file operation pattern. - # - # @return [FileOperationPattern] - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#30 - def pattern; end - - # A Uri like `file` or `untitled`. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#22 - def scheme; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#36 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#40 - def to_json(*args); end -end - -# A pattern to describe in which file operation requests or notifications -# the server is interested in. -# -# source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#8 -class LanguageServer::Protocol::Interface::FileOperationPattern - # @return [FileOperationPattern] a new instance of FileOperationPattern - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#9 - def initialize(glob:, matches: T.unsafe(nil), options: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#55 - def attributes; end - - # The glob pattern to match. Glob patterns can have the following syntax: - # - `*` to match one or more characters in a path segment - # - `?` to match on one character in a path segment - # - `**` to match any number of path segments, including none - # - `{}` to group sub patterns into an OR expression. (e.g. `**​/*.{ts,js}` - # matches all TypeScript and JavaScript files) - # - `[]` to declare a range of characters to match in a path segment - # (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …) - # - `[!...]` to negate a range of characters to match in a path segment - # (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but - # not `example.0`) - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#33 - def glob; end - - # Whether to match files or folders with this pattern. - # - # Matches both if undefined. - # - # @return [FileOperationPatternKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#43 - def matches; end - - # Additional options used during matching. - # - # @return [FileOperationPatternOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#51 - def options; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#57 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#61 - def to_json(*args); end -end - -# Matching options for the file operation pattern. -# -# source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern_options.rb#7 -class LanguageServer::Protocol::Interface::FileOperationPatternOptions - # @return [FileOperationPatternOptions] a new instance of FileOperationPatternOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern_options.rb#8 - def initialize(ignore_case: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern_options.rb#24 - def attributes; end - - # The pattern should be matched ignoring casing. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern_options.rb#20 - def ignore_case; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern_options.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern_options.rb#30 - def to_json(*args); end -end - -# The options to register for file operations. -# -# source://language_server-protocol//lib/language_server/protocol/interface/file_operation_registration_options.rb#7 -class LanguageServer::Protocol::Interface::FileOperationRegistrationOptions - # @return [FileOperationRegistrationOptions] a new instance of FileOperationRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_registration_options.rb#8 - def initialize(filters:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_registration_options.rb#24 - def attributes; end - - # The actual filters. - # - # @return [FileOperationFilter[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_registration_options.rb#20 - def filters; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_registration_options.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_registration_options.rb#30 - def to_json(*args); end -end - -# Represents information on a file/folder rename. -# -# source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#7 -class LanguageServer::Protocol::Interface::FileRename - # @return [FileRename] a new instance of FileRename - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#8 - def initialize(old_uri:, new_uri:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#33 - def attributes; end - - # A file:// URI for the new location of the file/folder being renamed. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#29 - def new_uri; end - - # A file:// URI for the original location of the file/folder being renamed. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#21 - def old_uri; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#35 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#39 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#4 -class LanguageServer::Protocol::Interface::FileSystemWatcher - # @return [FileSystemWatcher] a new instance of FileSystemWatcher - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#5 - def initialize(glob_pattern:, kind: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#33 - def attributes; end - - # The glob pattern to watch. See {@link GlobPattern glob pattern} - # for more detail. - # - # @return [GlobPattern] - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#19 - def glob_pattern; end - - # The kind of events of interest. If omitted it defaults - # to WatchKind.Create | WatchKind.Change | WatchKind.Delete - # which is 7. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#29 - def kind; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#35 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#39 - def to_json(*args); end -end - -# Represents a folding range. To be valid, start and end line must be bigger -# than zero and smaller than the number of lines in the document. Clients -# are free to ignore invalid ranges. -# -# source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#9 -class LanguageServer::Protocol::Interface::FoldingRange - # @return [FoldingRange] a new instance of FoldingRange - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#10 - def initialize(start_line:, end_line:, start_character: T.unsafe(nil), end_character: T.unsafe(nil), kind: T.unsafe(nil), collapsed_text: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#82 - def attributes; end - - # The text that the client should show when the specified range is - # collapsed. If not defined or not supported by the client, a default - # will be chosen by the client. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#78 - def collapsed_text; end - - # The zero-based character offset before the folded range ends. If not - # defined, defaults to the length of the end line. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#57 - def end_character; end - - # The zero-based end line of the range to fold. The folded area ends with - # the line's last character. To be valid, the end must be zero or larger - # and smaller than the number of lines in the document. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#48 - def end_line; end - - # Describes the kind of the folding range such as `comment` or `region`. - # The kind is used to categorize folding ranges and used by commands like - # 'Fold all comments'. See [FoldingRangeKind](#FoldingRangeKind) for an - # enumeration of standardized kinds. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#68 - def kind; end - - # The zero-based character offset from where the folded range starts. If - # not defined, defaults to the length of the start line. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#38 - def start_character; end - - # The zero-based start line of the range to fold. The folded area starts - # after the line's last character. To be valid, the end must be zero or - # larger and smaller than the number of lines in the document. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#29 - def start_line; end - - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#84 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#88 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::FoldingRangeClientCapabilities - # @return [FoldingRangeClientCapabilities] a new instance of FoldingRangeClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil), range_limit: T.unsafe(nil), line_folding_only: T.unsafe(nil), folding_range_kind: T.unsafe(nil), folding_range: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#64 - def attributes; end - - # Whether implementation supports dynamic registration for folding range - # providers. If this is set to `true` the client supports the new - # `FoldingRangeRegistrationOptions` return value for the corresponding - # server capability as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#24 - def dynamic_registration; end - - # Specific options for the folding range. - # - # @return [{ collapsedText?: boolean; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#60 - def folding_range; end - - # Specific options for the folding range kind. - # - # @return [{ valueSet?: string[]; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#52 - def folding_range_kind; end - - # If set, the client signals that it only supports folding complete lines. - # If set, client will ignore specified `startCharacter` and `endCharacter` - # properties in a FoldingRange. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#44 - def line_folding_only; end - - # The maximum number of folding ranges that the client prefers to receive - # per document. The value serves as a hint, servers are free to follow the - # limit. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#34 - def range_limit; end - - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#66 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#70 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/folding_range_options.rb#4 -class LanguageServer::Protocol::Interface::FoldingRangeOptions - # @return [FoldingRangeOptions] a new instance of FoldingRangeOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#4 -class LanguageServer::Protocol::Interface::FoldingRangeParams - # @return [FoldingRangeParams] a new instance of FoldingRangeParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#5 - def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#40 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#28 - def partial_result_token; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#36 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#42 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#46 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#19 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#4 -class LanguageServer::Protocol::Interface::FoldingRangeRegistrationOptions - # @return [FoldingRangeRegistrationOptions] a new instance of FoldingRangeRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#38 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#20 - def document_selector; end - - # The id used to register the request. The id can be used to deregister - # the request again. See also Registration#id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#34 - def id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#40 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#44 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#25 - def work_done_progress; end -end - -# Value-object describing what options formatting should use. -# -# source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#7 -class LanguageServer::Protocol::Interface::FormattingOptions - # @return [FormattingOptions] a new instance of FormattingOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#8 - def initialize(tab_size:, insert_spaces:, trim_trailing_whitespace: T.unsafe(nil), insert_final_newline: T.unsafe(nil), trim_final_newlines: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#60 - def attributes; end - - # Insert a newline character at the end of the file if one does not exist. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#48 - def insert_final_newline; end - - # Prefer spaces over tabs. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#32 - def insert_spaces; end - - # Size of a tab in spaces. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#24 - def tab_size; end - - # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#62 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#66 - def to_json(*args); end - - # Trim all newlines after the final newline at the end of the file. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#56 - def trim_final_newlines; end - - # Trim trailing whitespace on a line. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#40 - def trim_trailing_whitespace; end -end - -# A diagnostic report with a full set of problems. -# -# source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#7 -class LanguageServer::Protocol::Interface::FullDocumentDiagnosticReport - # @return [FullDocumentDiagnosticReport] a new instance of FullDocumentDiagnosticReport - # - # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#8 - def initialize(kind:, items:, result_id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#44 - def attributes; end - - # The actual items. - # - # @return [Diagnostic[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#40 - def items; end - - # A full document diagnostic report. - # - # @return [any] - # - # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#22 - def kind; end - - # An optional result id. If provided it will - # be sent on the next diagnostic request for the - # same document. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#32 - def result_id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#46 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#50 - def to_json(*args); end -end - -# The result of a hover request. -# -# source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#7 -class LanguageServer::Protocol::Interface::Hover - # @return [Hover] a new instance of Hover - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#8 - def initialize(contents:, range: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#34 - def attributes; end - - # The hover's content - # - # @return [MarkupContent | MarkedString | MarkedString[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#21 - def contents; end - - # An optional range is a range inside a text document - # that is used to visualize a hover, e.g. by changing the background color. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#30 - def range; end - - # source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#36 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#40 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::HoverClientCapabilities - # @return [HoverClientCapabilities] a new instance of HoverClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil), content_format: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#32 - def attributes; end - - # Client supports the follow content formats if the content - # property refers to a `literal of type MarkupContent`. - # The order describes the preferred format of the client. - # - # @return [MarkupKind[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#28 - def content_format; end - - # Whether hover supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#18 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#34 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#38 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/hover_options.rb#4 -class LanguageServer::Protocol::Interface::HoverOptions - # @return [HoverOptions] a new instance of HoverOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/hover_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/hover_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#4 -class LanguageServer::Protocol::Interface::HoverParams - # @return [HoverParams] a new instance of HoverParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#5 - def initialize(text_document:, position:, work_done_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#39 - def attributes; end - - # The position inside the text document. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#27 - def position; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#19 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#41 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#45 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#35 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#4 -class LanguageServer::Protocol::Interface::HoverRegistrationOptions - # @return [HoverRegistrationOptions] a new instance of HoverRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#28 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#19 - def document_selector; end - - # source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#30 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#34 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#24 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/hover_result.rb#4 -class LanguageServer::Protocol::Interface::HoverResult - # @return [HoverResult] a new instance of HoverResult - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_result.rb#5 - def initialize(value:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_result.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/hover_result.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/hover_result.rb#24 - def to_json(*args); end - - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/hover_result.rb#14 - def value; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::ImplementationClientCapabilities - # @return [ImplementationClientCapabilities] a new instance of ImplementationClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil), link_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#32 - def attributes; end - - # Whether implementation supports dynamic registration. If this is set to - # `true` the client supports the new `ImplementationRegistrationOptions` - # return value for the corresponding server capability as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#20 - def dynamic_registration; end - - # The client supports additional metadata in the form of definition links. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#28 - def link_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#34 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#38 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/implementation_options.rb#4 -class LanguageServer::Protocol::Interface::ImplementationOptions - # @return [ImplementationOptions] a new instance of ImplementationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#4 -class LanguageServer::Protocol::Interface::ImplementationParams - # @return [ImplementationParams] a new instance of ImplementationParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#5 - def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#49 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#45 - def partial_result_token; end - - # The position inside the text document. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#28 - def position; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#20 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#51 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#55 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#36 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#4 -class LanguageServer::Protocol::Interface::ImplementationRegistrationOptions - # @return [ImplementationRegistrationOptions] a new instance of ImplementationRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#38 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#20 - def document_selector; end - - # The id used to register the request. The id can be used to deregister - # the request again. See also Registration#id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#34 - def id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#40 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#44 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#25 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/initialize_error.rb#4 -class LanguageServer::Protocol::Interface::InitializeError - # @return [InitializeError] a new instance of InitializeError - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_error.rb#5 - def initialize(retry:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_error.rb#24 - def attributes; end - - # Indicates whether the client execute the following retry logic: - # (1) show the message provided by the ResponseError to the user - # (2) user selects retry or cancel - # (3) if user selected retry the initialize method is sent again. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_error.rb#20 - def retry; end - - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_error.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_error.rb#30 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#4 -class LanguageServer::Protocol::Interface::InitializeParams - # @return [InitializeParams] a new instance of InitializeParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#5 - def initialize(process_id:, root_uri:, capabilities:, work_done_token: T.unsafe(nil), client_info: T.unsafe(nil), locale: T.unsafe(nil), root_path: T.unsafe(nil), initialization_options: T.unsafe(nil), trace: T.unsafe(nil), workspace_folders: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#116 - def attributes; end - - # The capabilities provided by the client (editor or tool) - # - # @return [ClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#93 - def capabilities; end - - # Information about the client - # - # @return [{ name: string; version?: string; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#45 - def client_info; end - - # User provided initialization options. - # - # @return [LSPAny] - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#85 - def initialization_options; end - - # The locale the client is currently showing the user interface - # in. This must not necessarily be the locale of the operating - # system. - # - # Uses IETF language tags as the value's syntax - # (See https://en.wikipedia.org/wiki/IETF_language_tag) - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#58 - def locale; end - - # The process Id of the parent process that started the server. Is null if - # the process has not been started by another process. If the parent - # process is not alive then the server should exit (see exit notification) - # its process. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#37 - def process_id; end - - # The rootPath of the workspace. Is null - # if no folder is open. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#67 - def root_path; end - - # The rootUri of the workspace. Is null if no - # folder is open. If both `rootPath` and `rootUri` are set - # `rootUri` wins. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#77 - def root_uri; end - - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#118 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#122 - def to_json(*args); end - - # The initial trace setting. If omitted trace is disabled ('off'). - # - # @return [TraceValue] - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#101 - def trace; end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#26 - def work_done_token; end - - # The workspace folders configured in the client when the server starts. - # This property is only available if the client supports workspace folders. - # It can be `null` if the client supports workspace folders but none are - # configured. - # - # @return [WorkspaceFolder[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#112 - def workspace_folders; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#4 -class LanguageServer::Protocol::Interface::InitializeResult - # @return [InitializeResult] a new instance of InitializeResult - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#5 - def initialize(capabilities:, server_info: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#30 - def attributes; end - - # The capabilities the language server provides. - # - # @return [ServerCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#18 - def capabilities; end - - # Information about the server. - # - # @return [{ name: string; version?: string; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#26 - def server_info; end - - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#36 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/initialized_params.rb#4 -class LanguageServer::Protocol::Interface::InitializedParams - # @return [InitializedParams] a new instance of InitializedParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialized_params.rb#5 - def initialize; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/initialized_params.rb#12 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/initialized_params.rb#14 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/initialized_params.rb#18 - def to_json(*args); end -end - -# Inlay hint information. -# -# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#7 -class LanguageServer::Protocol::Interface::InlayHint - # @return [InlayHint] a new instance of InlayHint - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#8 - def initialize(position:, label:, kind: T.unsafe(nil), text_edits: T.unsafe(nil), tooltip: T.unsafe(nil), padding_left: T.unsafe(nil), padding_right: T.unsafe(nil), data: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#110 - def attributes; end - - # A data entry field that is preserved on an inlay hint between - # a `textDocument/inlayHint` and a `inlayHint/resolve` request. - # - # @return [LSPAny] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#106 - def data; end - - # The kind of this hint. Can be omitted in which case the client - # should fall back to a reasonable default. - # - # @return [InlayHintKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#47 - def kind; end - - # The label of this hint. A human readable string or an array of - # InlayHintLabelPart label parts. - # - # *Note* that neither the string nor the label part can be empty. - # - # @return [string | InlayHintLabelPart[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#38 - def label; end - - # Render padding before the hint. - # - # Note: Padding should use the editor's background color, not the - # background color of the hint itself. That means padding can be used - # to visually align/separate an inlay hint. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#85 - def padding_left; end - - # Render padding after the hint. - # - # Note: Padding should use the editor's background color, not the - # background color of the hint itself. That means padding can be used - # to visually align/separate an inlay hint. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#97 - def padding_right; end - - # The position of this hint. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#27 - def position; end - - # Optional text edits that are performed when accepting this inlay hint. - # - # *Note* that edits are expected to change the document so that the inlay - # hint (or its nearest variant) is now part of the document and the inlay - # hint itself is now obsolete. - # - # Depending on the client capability `inlayHint.resolveSupport` clients - # might resolve this property late using the resolve request. - # - # @return [TextEdit[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#62 - def text_edits; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#112 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#116 - def to_json(*args); end - - # The tooltip text when you hover over this item. - # - # Depending on the client capability `inlayHint.resolveSupport` clients - # might resolve this property late using the resolve request. - # - # @return [string | MarkupContent] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#73 - def tooltip; end -end - -# Inlay hint client capabilities. -# -# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#7 -class LanguageServer::Protocol::Interface::InlayHintClientCapabilities - # @return [InlayHintClientCapabilities] a new instance of InlayHintClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#8 - def initialize(dynamic_registration: T.unsafe(nil), resolve_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#34 - def attributes; end - - # Whether inlay hints support dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#21 - def dynamic_registration; end - - # Indicates which properties a client can resolve lazily on an inlay - # hint. - # - # @return [{ properties: string[]; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#30 - def resolve_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#36 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#40 - def to_json(*args); end -end - -# An inlay hint label part allows for interactive and composite labels -# of inlay hints. -# -# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#8 -class LanguageServer::Protocol::Interface::InlayHintLabelPart - # @return [InlayHintLabelPart] a new instance of InlayHintLabelPart - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#9 - def initialize(value:, tooltip: T.unsafe(nil), location: T.unsafe(nil), command: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#67 - def attributes; end - - # An optional command for this label part. - # - # Depending on the client capability `inlayHint.resolveSupport` clients - # might resolve this property late using the resolve request. - # - # @return [Command] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#63 - def command; end - - # An optional source code location that represents this - # label part. - # - # The editor will use this location for the hover and for code navigation - # features: This part will become a clickable link that resolves to the - # definition of the symbol at the given location (not necessarily the - # location itself), it shows the hover that shows at the given location, - # and it shows a context menu with further code navigation commands. - # - # Depending on the client capability `inlayHint.resolveSupport` clients - # might resolve this property late using the resolve request. - # - # @return [Location] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#52 - def location; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#69 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#73 - def to_json(*args); end - - # The tooltip text when you hover over this label part. Depending on - # the client capability `inlayHint.resolveSupport` clients might resolve - # this property late using the resolve request. - # - # @return [string | MarkupContent] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#34 - def tooltip; end - - # The value of this label part. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#24 - def value; end -end - -# Inlay hint options used during static registration. -# -# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#7 -class LanguageServer::Protocol::Interface::InlayHintOptions - # @return [InlayHintOptions] a new instance of InlayHintOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#8 - def initialize(work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#31 - def attributes; end - - # The server provides support to resolve additional - # information for an inlay hint item. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#27 - def resolve_provider; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#33 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#37 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#18 - def work_done_progress; end -end - -# A parameter literal used in inlay hint requests. -# -# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#7 -class LanguageServer::Protocol::Interface::InlayHintParams - # @return [InlayHintParams] a new instance of InlayHintParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#8 - def initialize(text_document:, range:, work_done_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#42 - def attributes; end - - # The visible document range for which inlay hints should be computed. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#38 - def range; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#30 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#44 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#48 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#22 - def work_done_token; end -end - -# Inlay hint options used during static or dynamic registration. -# -# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#7 -class LanguageServer::Protocol::Interface::InlayHintRegistrationOptions - # @return [InlayHintRegistrationOptions] a new instance of InlayHintRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#8 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil), id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#51 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#38 - def document_selector; end - - # The id used to register the request. The id can be used to deregister - # the request again. See also Registration#id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#47 - def id; end - - # The server provides support to resolve additional - # information for an inlay hint item. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#29 - def resolve_provider; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#53 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#57 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#20 - def work_done_progress; end -end - -# Client workspace capabilities specific to inlay hints. -# -# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb#7 -class LanguageServer::Protocol::Interface::InlayHintWorkspaceClientCapabilities - # @return [InlayHintWorkspaceClientCapabilities] a new instance of InlayHintWorkspaceClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb#8 - def initialize(refresh_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb#30 - def attributes; end - - # Whether the client implementation supports a refresh request sent from - # the server to the client. - # - # Note that this event is global and will force the client to refresh all - # inlay hints currently shown. It should be used with absolute care and - # is useful for situation where a server for example detects a project wide - # change that requires such a calculation. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb#26 - def refresh_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb#36 - def to_json(*args); end -end - -# Client capabilities specific to inline values. -# -# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_client_capabilities.rb#7 -class LanguageServer::Protocol::Interface::InlineValueClientCapabilities - # @return [InlineValueClientCapabilities] a new instance of InlineValueClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_client_capabilities.rb#8 - def initialize(dynamic_registration: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_client_capabilities.rb#25 - def attributes; end - - # Whether implementation supports dynamic registration for inline - # value providers. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_client_capabilities.rb#21 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_client_capabilities.rb#27 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_client_capabilities.rb#31 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#4 -class LanguageServer::Protocol::Interface::InlineValueContext - # @return [InlineValueContext] a new instance of InlineValueContext - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#5 - def initialize(frame_id:, stopped_location:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#32 - def attributes; end - - # The stack frame (as a DAP Id) where the execution has stopped. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#18 - def frame_id; end - - # The document range where execution has stopped. - # Typically the end position of the range denotes the line where the - # inline values are shown. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#28 - def stopped_location; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#34 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#38 - def to_json(*args); end -end - -# Provide an inline value through an expression evaluation. -# -# If only a range is specified, the expression will be extracted from the -# underlying document. -# -# An optional expression can be used to override the extracted expression. -# -# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#12 -class LanguageServer::Protocol::Interface::InlineValueEvaluatableExpression - # @return [InlineValueEvaluatableExpression] a new instance of InlineValueEvaluatableExpression - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#13 - def initialize(range:, expression: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#40 - def attributes; end - - # If specified the expression overrides the extracted expression. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#36 - def expression; end - - # The document range for which the inline value applies. - # The range is used to extract the evaluatable expression from the - # underlying document. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#28 - def range; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#42 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#46 - def to_json(*args); end -end - -# Inline value options used during static registration. -# -# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_options.rb#7 -class LanguageServer::Protocol::Interface::InlineValueOptions - # @return [InlineValueOptions] a new instance of InlineValueOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_options.rb#8 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_options.rb#21 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_options.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_options.rb#27 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_options.rb#17 - def work_done_progress; end -end - -# A parameter literal used in inline value requests. -# -# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#7 -class LanguageServer::Protocol::Interface::InlineValueParams - # @return [InlineValueParams] a new instance of InlineValueParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#8 - def initialize(text_document:, range:, context:, work_done_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#52 - def attributes; end - - # Additional information about the context in which inline values were - # requested. - # - # @return [InlineValueContext] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#48 - def context; end - - # The document range for which inline values should be computed. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#39 - def range; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#31 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#54 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#58 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#23 - def work_done_token; end -end - -# Inline value options used during static or dynamic registration. -# -# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#7 -class LanguageServer::Protocol::Interface::InlineValueRegistrationOptions - # @return [InlineValueRegistrationOptions] a new instance of InlineValueRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#8 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#41 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#28 - def document_selector; end - - # The id used to register the request. The id can be used to deregister - # the request again. See also Registration#id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#37 - def id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#43 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#47 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#19 - def work_done_progress; end -end - -# Provide inline value as text. -# -# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#7 -class LanguageServer::Protocol::Interface::InlineValueText - # @return [InlineValueText] a new instance of InlineValueText - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#8 - def initialize(range:, text:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#33 - def attributes; end - - # The document range for which the inline value applies. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#21 - def range; end - - # The text of the inline value. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#29 - def text; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#35 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#39 - def to_json(*args); end -end - -# Provide inline value through a variable lookup. -# -# If only a range is specified, the variable name will be extracted from -# the underlying document. -# -# An optional variable name can be used to override the extracted name. -# -# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#12 -class LanguageServer::Protocol::Interface::InlineValueVariableLookup - # @return [InlineValueVariableLookup] a new instance of InlineValueVariableLookup - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#13 - def initialize(range:, case_sensitive_lookup:, variable_name: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#49 - def attributes; end - - # How to perform the lookup. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#45 - def case_sensitive_lookup; end - - # The document range for which the inline value applies. - # The range is used to extract the variable name from the underlying - # document. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#29 - def range; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#51 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#55 - def to_json(*args); end - - # If specified the name of the variable to look up. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#37 - def variable_name; end -end - -# Client workspace capabilities specific to inline values. -# -# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_workspace_client_capabilities.rb#7 -class LanguageServer::Protocol::Interface::InlineValueWorkspaceClientCapabilities - # @return [InlineValueWorkspaceClientCapabilities] a new instance of InlineValueWorkspaceClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_workspace_client_capabilities.rb#8 - def initialize(refresh_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_workspace_client_capabilities.rb#30 - def attributes; end - - # Whether the client implementation supports a refresh request sent from - # the server to the client. - # - # Note that this event is global and will force the client to refresh all - # inline values currently shown. It should be used with absolute care and - # is useful for situation where a server for example detect a project wide - # change that requires such a calculation. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_workspace_client_capabilities.rb#26 - def refresh_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_workspace_client_capabilities.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_workspace_client_capabilities.rb#36 - def to_json(*args); end -end - -# A special text edit to provide an insert and a replace operation. -# -# source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#7 -class LanguageServer::Protocol::Interface::InsertReplaceEdit - # @return [InsertReplaceEdit] a new instance of InsertReplaceEdit - # - # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#8 - def initialize(new_text:, insert:, replace:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#42 - def attributes; end - - # The range if the insert is requested - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#30 - def insert; end - - # The string to be inserted. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#22 - def new_text; end - - # The range if the replace is requested. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#38 - def replace; end - - # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#44 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#48 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::LinkedEditingRangeClientCapabilities - # @return [LinkedEditingRangeClientCapabilities] a new instance of LinkedEditingRangeClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb#24 - def attributes; end - - # Whether the implementation supports dynamic registration. - # If this is set to `true` the client supports the new - # `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` - # return value for the corresponding server capability as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb#20 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb#30 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_options.rb#4 -class LanguageServer::Protocol::Interface::LinkedEditingRangeOptions - # @return [LinkedEditingRangeOptions] a new instance of LinkedEditingRangeOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#4 -class LanguageServer::Protocol::Interface::LinkedEditingRangeParams - # @return [LinkedEditingRangeParams] a new instance of LinkedEditingRangeParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#5 - def initialize(text_document:, position:, work_done_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#39 - def attributes; end - - # The position inside the text document. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#27 - def position; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#19 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#41 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#45 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#35 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#4 -class LanguageServer::Protocol::Interface::LinkedEditingRangeRegistrationOptions - # @return [LinkedEditingRangeRegistrationOptions] a new instance of LinkedEditingRangeRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#38 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#20 - def document_selector; end - - # The id used to register the request. The id can be used to deregister - # the request again. See also Registration#id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#34 - def id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#40 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#44 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#25 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#4 -class LanguageServer::Protocol::Interface::LinkedEditingRanges - # @return [LinkedEditingRanges] a new instance of LinkedEditingRanges - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#5 - def initialize(ranges:, word_pattern: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#34 - def attributes; end - - # A list of ranges that can be renamed together. The ranges must have - # identical length and contain identical text content. The ranges cannot - # overlap. - # - # @return [Range[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#20 - def ranges; end - - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#36 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#40 - def to_json(*args); end - - # An optional word pattern (regular expression) that describes valid - # contents for the given ranges. If no pattern is provided, the client - # configuration's word pattern will be used. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#30 - def word_pattern; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/location.rb#4 -class LanguageServer::Protocol::Interface::Location - # @return [Location] a new instance of Location - # - # source://language_server-protocol//lib/language_server/protocol/interface/location.rb#5 - def initialize(uri:, range:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/location.rb#24 - def attributes; end - - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/location.rb#20 - def range; end - - # source://language_server-protocol//lib/language_server/protocol/interface/location.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/location.rb#30 - def to_json(*args); end - - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/location.rb#15 - def uri; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#4 -class LanguageServer::Protocol::Interface::LocationLink - # @return [LocationLink] a new instance of LocationLink - # - # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#5 - def initialize(target_uri:, target_range:, target_selection_range:, origin_selection_range: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#56 - def attributes; end - - # Span of the origin of this link. - # - # Used as the underlined span for mouse interaction. Defaults to the word - # range at the mouse position. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#23 - def origin_selection_range; end - - # The full target range of this link. If the target for example is a symbol - # then target range is the range enclosing this symbol not including - # leading/trailing whitespace but everything else like comments. This - # information is typically used to highlight the range in the editor. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#42 - def target_range; end - - # The range that should be selected and revealed when this link is being - # followed, e.g the name of a function. Must be contained by the - # `targetRange`. See also `DocumentSymbol#range` - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#52 - def target_selection_range; end - - # The target resource identifier of this link. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#31 - def target_uri; end - - # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#58 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#62 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#4 -class LanguageServer::Protocol::Interface::LogMessageParams - # @return [LogMessageParams] a new instance of LogMessageParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#5 - def initialize(type:, message:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#30 - def attributes; end - - # The actual message - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#26 - def message; end - - # source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#36 - def to_json(*args); end - - # The message type. See {@link MessageType} - # - # @return [MessageType] - # - # source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#18 - def type; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#4 -class LanguageServer::Protocol::Interface::LogTraceParams - # @return [LogTraceParams] a new instance of LogTraceParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#5 - def initialize(message:, verbose: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#31 - def attributes; end - - # The message to be logged. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#18 - def message; end - - # source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#33 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#37 - def to_json(*args); end - - # Additional information that can be computed if the `trace` configuration - # is set to `'verbose'` - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#27 - def verbose; end -end - -# A `MarkupContent` literal represents a string value which content is -# interpreted base on its kind flag. Currently the protocol supports -# `plaintext` and `markdown` as markup kinds. -# -# If the kind is `markdown` then the value can contain fenced code blocks like -# in GitHub issues. -# -# Here is an example how such a string can be constructed using -# JavaScript / TypeScript: -# ```typescript -# let markdown: MarkdownContent = { -# kind: MarkupKind.Markdown, -# value: [ -# '# Header', -# 'Some text', -# '```typescript', -# 'someCode();', -# '```' -# ].join('\n') -# }; -# ``` -# -# *Please Note* that clients might sanitize the return markdown. A client could -# decide to remove HTML from the markdown to avoid script execution. -# -# source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#30 -class LanguageServer::Protocol::Interface::MarkupContent - # @return [MarkupContent] a new instance of MarkupContent - # - # source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#31 - def initialize(kind:, value:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#56 - def attributes; end - - # The type of the Markup - # - # @return [MarkupKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#44 - def kind; end - - # source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#58 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#62 - def to_json(*args); end - - # The content itself - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#52 - def value; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/message.rb#4 -class LanguageServer::Protocol::Interface::Message - # @return [Message] a new instance of Message - # - # source://language_server-protocol//lib/language_server/protocol/interface/message.rb#5 - def initialize(jsonrpc:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/message.rb#18 - def attributes; end - - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/message.rb#14 - def jsonrpc; end - - # source://language_server-protocol//lib/language_server/protocol/interface/message.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/message.rb#24 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/message_action_item.rb#4 -class LanguageServer::Protocol::Interface::MessageActionItem - # @return [MessageActionItem] a new instance of MessageActionItem - # - # source://language_server-protocol//lib/language_server/protocol/interface/message_action_item.rb#5 - def initialize(title:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/message_action_item.rb#21 - def attributes; end - - # A short title like 'Retry', 'Open Log' etc. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/message_action_item.rb#17 - def title; end - - # source://language_server-protocol//lib/language_server/protocol/interface/message_action_item.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/message_action_item.rb#27 - def to_json(*args); end -end - -# Moniker definition to match LSIF 0.5 moniker definition. -# -# source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#7 -class LanguageServer::Protocol::Interface::Moniker - # @return [Moniker] a new instance of Moniker - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#8 - def initialize(scheme:, identifier:, unique:, kind: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#52 - def attributes; end - - # The identifier of the moniker. The value is opaque in LSIF however - # schema owners are allowed to define the structure if they want. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#32 - def identifier; end - - # The moniker kind if known. - # - # @return [MonikerKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#48 - def kind; end - - # The scheme of the moniker. For example tsc or .Net - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#23 - def scheme; end - - # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#54 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#58 - def to_json(*args); end - - # The scope in which the moniker is unique - # - # @return [UniquenessLevel] - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#40 - def unique; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/moniker_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::MonikerClientCapabilities - # @return [MonikerClientCapabilities] a new instance of MonikerClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_client_capabilities.rb#24 - def attributes; end - - # Whether implementation supports dynamic registration. If this is set to - # `true` the client supports the new `(TextDocumentRegistrationOptions & - # StaticRegistrationOptions)` return value for the corresponding server - # capability as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_client_capabilities.rb#20 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_client_capabilities.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_client_capabilities.rb#30 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/moniker_options.rb#4 -class LanguageServer::Protocol::Interface::MonikerOptions - # @return [MonikerOptions] a new instance of MonikerOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#4 -class LanguageServer::Protocol::Interface::MonikerParams - # @return [MonikerParams] a new instance of MonikerParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#5 - def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#49 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#45 - def partial_result_token; end - - # The position inside the text document. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#28 - def position; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#20 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#51 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#55 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#36 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#4 -class LanguageServer::Protocol::Interface::MonikerRegistrationOptions - # @return [MonikerRegistrationOptions] a new instance of MonikerRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#28 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#19 - def document_selector; end - - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#30 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#34 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#24 - def work_done_progress; end -end - -# A notebook cell. -# -# A cell's document URI must be unique across ALL notebook -# cells and can therefore be used to uniquely identify a -# notebook cell or the cell's text document. -# -# source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#11 -class LanguageServer::Protocol::Interface::NotebookCell - # @return [NotebookCell] a new instance of NotebookCell - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#12 - def initialize(kind:, document:, metadata: T.unsafe(nil), execution_summary: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#57 - def attributes; end - - # The URI of the cell's text document - # content. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#36 - def document; end - - # Additional execution summary information - # if supported by the client. - # - # @return [ExecutionSummary] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#53 - def execution_summary; end - - # The cell's kind - # - # @return [any] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#27 - def kind; end - - # Additional metadata stored with the cell. - # - # @return [LSPObject] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#44 - def metadata; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#59 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#63 - def to_json(*args); end -end - -# A change describing how to move a `NotebookCell` -# array from state S to S'. -# -# source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#8 -class LanguageServer::Protocol::Interface::NotebookCellArrayChange - # @return [NotebookCellArrayChange] a new instance of NotebookCellArrayChange - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#9 - def initialize(start:, delete_count:, cells: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#43 - def attributes; end - - # The new cells, if any - # - # @return [NotebookCell[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#39 - def cells; end - - # The deleted cells - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#31 - def delete_count; end - - # The start offset of the cell that changed. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#23 - def start; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#45 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#49 - def to_json(*args); end -end - -# A notebook cell text document filter denotes a cell text -# document by different properties. -# -# source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#8 -class LanguageServer::Protocol::Interface::NotebookCellTextDocumentFilter - # @return [NotebookCellTextDocumentFilter] a new instance of NotebookCellTextDocumentFilter - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#9 - def initialize(notebook:, language: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#40 - def attributes; end - - # A language id like `python`. - # - # Will be matched against the language id of the - # notebook cell document. '*' matches every language. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#36 - def language; end - - # A filter that matches against the notebook - # containing the notebook cell. If a string - # value is provided it matches against the - # notebook type. '*' matches every notebook. - # - # @return [string | NotebookDocumentFilter] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#25 - def notebook; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#42 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#46 - def to_json(*args); end -end - -# A notebook document. -# -# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#7 -class LanguageServer::Protocol::Interface::NotebookDocument - # @return [NotebookDocument] a new instance of NotebookDocument - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#8 - def initialize(uri:, notebook_type:, version:, cells:, metadata: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#62 - def attributes; end - - # The cells of a notebook. - # - # @return [NotebookCell[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#58 - def cells; end - - # Additional metadata stored with the notebook - # document. - # - # @return [LSPObject] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#50 - def metadata; end - - # The type of the notebook. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#32 - def notebook_type; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#64 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#68 - def to_json(*args); end - - # The notebook document's URI. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#24 - def uri; end - - # The version number of this document (it will increase after each - # change, including undo/redo). - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#41 - def version; end -end - -# A change event for a notebook document. -# -# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#7 -class LanguageServer::Protocol::Interface::NotebookDocumentChangeEvent - # @return [NotebookDocumentChangeEvent] a new instance of NotebookDocumentChangeEvent - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#8 - def initialize(metadata: T.unsafe(nil), cells: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#33 - def attributes; end - - # Changes to cells - # - # @return [{ structure?: { array: NotebookCellArrayChange; didOpen?: TextDocumentItem[]; didClose?: TextDocumentIdentifier[]; }; data?: NotebookCell[]; textContent?: { ...; }[]; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#29 - def cells; end - - # The changed meta data if any. - # - # @return [LSPObject] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#21 - def metadata; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#35 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#39 - def to_json(*args); end -end - -# Capabilities specific to the notebook document support. -# -# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_client_capabilities.rb#7 -class LanguageServer::Protocol::Interface::NotebookDocumentClientCapabilities - # @return [NotebookDocumentClientCapabilities] a new instance of NotebookDocumentClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_client_capabilities.rb#8 - def initialize(synchronization:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_client_capabilities.rb#24 - def attributes; end - - # Capabilities specific to notebook document synchronization - # - # @return [NotebookDocumentSyncClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_client_capabilities.rb#20 - def synchronization; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_client_capabilities.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_client_capabilities.rb#30 - def to_json(*args); end -end - -# A notebook document filter denotes a notebook document by -# different properties. -# -# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#8 -class LanguageServer::Protocol::Interface::NotebookDocumentFilter - # @return [NotebookDocumentFilter] a new instance of NotebookDocumentFilter - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#9 - def initialize(notebook_type: T.unsafe(nil), scheme: T.unsafe(nil), pattern: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#67 - def attributes; end - - # The type of the enclosing notebook. - # - # --- OR --- - # - # The type of the enclosing notebook. - # - # --- OR --- - # - # The type of the enclosing notebook. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#31 - def notebook_type; end - - # A glob pattern. - # - # --- OR --- - # - # A glob pattern. - # - # --- OR --- - # - # A glob pattern. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#63 - def pattern; end - - # A Uri [scheme](#Uri.scheme), like `file` or `untitled`. - # - # --- OR --- - # - # A Uri [scheme](#Uri.scheme), like `file` or `untitled`. - # - # --- OR --- - # - # A Uri [scheme](#Uri.scheme), like `file` or `untitled`. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#47 - def scheme; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#69 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#73 - def to_json(*args); end -end - -# A literal to identify a notebook document in the client. -# -# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_identifier.rb#7 -class LanguageServer::Protocol::Interface::NotebookDocumentIdentifier - # @return [NotebookDocumentIdentifier] a new instance of NotebookDocumentIdentifier - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_identifier.rb#8 - def initialize(uri:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_identifier.rb#24 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_identifier.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_identifier.rb#30 - def to_json(*args); end - - # The notebook document's URI. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_identifier.rb#20 - def uri; end -end - -# Notebook specific client capabilities. -# -# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#7 -class LanguageServer::Protocol::Interface::NotebookDocumentSyncClientCapabilities - # @return [NotebookDocumentSyncClientCapabilities] a new instance of NotebookDocumentSyncClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#8 - def initialize(dynamic_registration: T.unsafe(nil), execution_summary_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#36 - def attributes; end - - # Whether implementation supports dynamic registration. If this is - # set to `true` the client supports the new - # `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` - # return value for the corresponding server capability as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#24 - def dynamic_registration; end - - # The client supports sending execution summary data per cell. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#32 - def execution_summary_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#38 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#42 - def to_json(*args); end -end - -# Options specific to a notebook plus its cells -# to be synced to the server. -# -# If a selector provides a notebook document -# filter but no cell selector all cells of a -# matching notebook document will be synced. -# -# If a selector provides no notebook document -# filter but only a cell selector all notebook -# documents that contain at least one matching -# cell will be synced. -# -# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#17 -class LanguageServer::Protocol::Interface::NotebookDocumentSyncOptions - # @return [NotebookDocumentSyncOptions] a new instance of NotebookDocumentSyncOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#18 - def initialize(notebook_selector:, save: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#44 - def attributes; end - - # The notebooks to be synced - # - # @return [({ notebook: string | NotebookDocumentFilter; cells?: { language: string; }[]; } | { notebook?: string | NotebookDocumentFilter; cells: { ...; }[]; })[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#31 - def notebook_selector; end - - # Whether save notification should be forwarded to - # the server. Will only be honored if mode === `notebook`. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#40 - def save; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#46 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#50 - def to_json(*args); end -end - -# Registration options specific to a notebook. -# -# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#7 -class LanguageServer::Protocol::Interface::NotebookDocumentSyncRegistrationOptions - # @return [NotebookDocumentSyncRegistrationOptions] a new instance of NotebookDocumentSyncRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#8 - def initialize(notebook_selector:, save: T.unsafe(nil), id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#44 - def attributes; end - - # The id used to register the request. The id can be used to deregister - # the request again. See also Registration#id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#40 - def id; end - - # The notebooks to be synced - # - # @return [({ notebook: string | NotebookDocumentFilter; cells?: { language: string; }[]; } | { notebook?: string | NotebookDocumentFilter; cells: { ...; }[]; })[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#22 - def notebook_selector; end - - # Whether save notification should be forwarded to - # the server. Will only be honored if mode === `notebook`. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#31 - def save; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#46 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#50 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#4 -class LanguageServer::Protocol::Interface::NotificationMessage - # @return [NotificationMessage] a new instance of NotificationMessage - # - # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#5 - def initialize(jsonrpc:, method:, params: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#36 - def attributes; end - - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#16 - def jsonrpc; end - - # The method to be invoked. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#24 - def method; end - - # The notification's params. - # - # @return [any] - # - # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#32 - def params; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#38 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#42 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#4 -class LanguageServer::Protocol::Interface::OptionalVersionedTextDocumentIdentifier - # @return [OptionalVersionedTextDocumentIdentifier] a new instance of OptionalVersionedTextDocumentIdentifier - # - # source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#5 - def initialize(uri:, version:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#38 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#40 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#44 - def to_json(*args); end - - # The text document's URI. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#18 - def uri; end - - # The version number of this document. If an optional versioned text document - # identifier is sent from the server to the client and the file is not - # open in the editor (the server has not received an open notification - # before) the server can send `null` to indicate that the version is - # known and the content on disk is the master (as specified with document - # content ownership). - # - # The version number of a document will increase after each change, - # including undo/redo. The number doesn't need to be consecutive. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#34 - def version; end -end - -# Represents a parameter of a callable-signature. A parameter can -# have a label and a doc-comment. -# -# source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#8 -class LanguageServer::Protocol::Interface::ParameterInformation - # @return [ParameterInformation] a new instance of ParameterInformation - # - # source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#9 - def initialize(label:, documentation: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#44 - def attributes; end - - # The human-readable doc-comment of this parameter. Will be shown - # in the UI but can be omitted. - # - # @return [string | MarkupContent] - # - # source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#40 - def documentation; end - - # The label of this parameter information. - # - # Either a string or an inclusive start and exclusive end offsets within - # its containing signature label. (see SignatureInformation.label). The - # offsets are based on a UTF-16 string representation as `Position` and - # `Range` does. - # - # *Note*: a label of type string should be a substring of its containing - # signature label. Its intended use case is to highlight the parameter - # label part in the `SignatureInformation.label`. - # - # @return [string | [number, number]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#31 - def label; end - - # source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#46 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#50 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/partial_result_params.rb#4 -class LanguageServer::Protocol::Interface::PartialResultParams - # @return [PartialResultParams] a new instance of PartialResultParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/partial_result_params.rb#5 - def initialize(partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/partial_result_params.rb#22 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/partial_result_params.rb#18 - def partial_result_token; end - - # source://language_server-protocol//lib/language_server/protocol/interface/partial_result_params.rb#24 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/partial_result_params.rb#28 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/position.rb#4 -class LanguageServer::Protocol::Interface::Position - # @return [Position] a new instance of Position - # - # source://language_server-protocol//lib/language_server/protocol/interface/position.rb#5 - def initialize(line:, character:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/position.rb#34 - def attributes; end - - # Character offset on a line in a document (zero-based). The meaning of this - # offset is determined by the negotiated `PositionEncodingKind`. - # - # If the character value is greater than the line length it defaults back - # to the line length. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/position.rb#30 - def character; end - - # Line position in a document (zero-based). - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/position.rb#18 - def line; end - - # source://language_server-protocol//lib/language_server/protocol/interface/position.rb#36 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/position.rb#40 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#4 -class LanguageServer::Protocol::Interface::PrepareRenameParams - # @return [PrepareRenameParams] a new instance of PrepareRenameParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#5 - def initialize(text_document:, position:, work_done_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#39 - def attributes; end - - # The position inside the text document. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#27 - def position; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#19 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#41 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#45 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#35 - def work_done_token; end -end - -# A previous result id in a workspace pull request. -# -# source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#7 -class LanguageServer::Protocol::Interface::PreviousResultId - # @return [PreviousResultId] a new instance of PreviousResultId - # - # source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#8 - def initialize(uri:, value:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#34 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#36 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#40 - def to_json(*args); end - - # The URI for which the client knows a - # result id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#22 - def uri; end - - # The value of the previous result id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#30 - def value; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#4 -class LanguageServer::Protocol::Interface::ProgressParams - # @return [ProgressParams] a new instance of ProgressParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#5 - def initialize(token:, value:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#30 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#36 - def to_json(*args); end - - # The progress token provided by the client or server. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#18 - def token; end - - # The progress data. - # - # @return [T] - # - # source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#26 - def value; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::PublishDiagnosticsClientCapabilities - # @return [PublishDiagnosticsClientCapabilities] a new instance of PublishDiagnosticsClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#5 - def initialize(related_information: T.unsafe(nil), tag_support: T.unsafe(nil), version_support: T.unsafe(nil), code_description_support: T.unsafe(nil), data_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#61 - def attributes; end - - # Client supports a codeDescription property - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#47 - def code_description_support; end - - # Whether code action supports the `data` property which is - # preserved between a `textDocument/publishDiagnostics` and - # `textDocument/codeAction` request. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#57 - def data_support; end - - # Whether the clients accepts diagnostics with related information. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#21 - def related_information; end - - # Client supports the tag property to provide meta data about a diagnostic. - # Clients supporting tags have to handle unknown tags gracefully. - # - # @return [{ valueSet: DiagnosticTag[]; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#30 - def tag_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#63 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#67 - def to_json(*args); end - - # Whether the client interprets the version property of the - # `textDocument/publishDiagnostics` notification's parameter. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#39 - def version_support; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#4 -class LanguageServer::Protocol::Interface::PublishDiagnosticsParams - # @return [PublishDiagnosticsParams] a new instance of PublishDiagnosticsParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#5 - def initialize(uri:, diagnostics:, version: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#40 - def attributes; end - - # An array of diagnostic information items. - # - # @return [Diagnostic[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#36 - def diagnostics; end - - # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#42 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#46 - def to_json(*args); end - - # The URI for which diagnostic information is reported. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#19 - def uri; end - - # Optional the version number of the document the diagnostics are published - # for. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#28 - def version; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/range.rb#4 -class LanguageServer::Protocol::Interface::Range - # @return [Range] a new instance of Range - # - # source://language_server-protocol//lib/language_server/protocol/interface/range.rb#5 - def initialize(start:, end:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/range.rb#30 - def attributes; end - - # The range's end position. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/range.rb#26 - def end; end - - # The range's start position. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/range.rb#18 - def start; end - - # source://language_server-protocol//lib/language_server/protocol/interface/range.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/range.rb#36 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/reference_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::ReferenceClientCapabilities - # @return [ReferenceClientCapabilities] a new instance of ReferenceClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_client_capabilities.rb#21 - def attributes; end - - # Whether references supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_client_capabilities.rb#17 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/reference_client_capabilities.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/reference_client_capabilities.rb#27 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/reference_context.rb#4 -class LanguageServer::Protocol::Interface::ReferenceContext - # @return [ReferenceContext] a new instance of ReferenceContext - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_context.rb#5 - def initialize(include_declaration:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_context.rb#21 - def attributes; end - - # Include the declaration of the current symbol. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_context.rb#17 - def include_declaration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/reference_context.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/reference_context.rb#27 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/reference_options.rb#4 -class LanguageServer::Protocol::Interface::ReferenceOptions - # @return [ReferenceOptions] a new instance of ReferenceOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/reference_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/reference_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#4 -class LanguageServer::Protocol::Interface::ReferenceParams - # @return [ReferenceParams] a new instance of ReferenceParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#5 - def initialize(text_document:, position:, context:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#55 - def attributes; end - - # @return [ReferenceContext] - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#51 - def context; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#46 - def partial_result_token; end - - # The position inside the text document. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#29 - def position; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#21 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#57 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#61 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#37 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#4 -class LanguageServer::Protocol::Interface::ReferenceRegistrationOptions - # @return [ReferenceRegistrationOptions] a new instance of ReferenceRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#28 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#19 - def document_selector; end - - # source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#30 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#34 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#24 - def work_done_progress; end -end - -# General parameters to register for a capability. -# -# source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#7 -class LanguageServer::Protocol::Interface::Registration - # @return [Registration] a new instance of Registration - # - # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#8 - def initialize(id:, method:, register_options: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#43 - def attributes; end - - # The id used to register the request. The id can be used to deregister - # the request again. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#23 - def id; end - - # The method / capability to register for. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#31 - def method; end - - # Options necessary for the registration. - # - # @return [LSPAny] - # - # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#39 - def register_options; end - - # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#45 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#49 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/registration_params.rb#4 -class LanguageServer::Protocol::Interface::RegistrationParams - # @return [RegistrationParams] a new instance of RegistrationParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/registration_params.rb#5 - def initialize(registrations:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/registration_params.rb#18 - def attributes; end - - # @return [Registration[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/registration_params.rb#14 - def registrations; end - - # source://language_server-protocol//lib/language_server/protocol/interface/registration_params.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/registration_params.rb#24 - def to_json(*args); end -end - -# Client capabilities specific to regular expressions. -# -# source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#7 -class LanguageServer::Protocol::Interface::RegularExpressionsClientCapabilities - # @return [RegularExpressionsClientCapabilities] a new instance of RegularExpressionsClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#8 - def initialize(engine:, version: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#33 - def attributes; end - - # The engine's name. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#21 - def engine; end - - # source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#35 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#39 - def to_json(*args); end - - # The engine's version. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#29 - def version; end -end - -# A full diagnostic report with a set of related documents. -# -# source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#7 -class LanguageServer::Protocol::Interface::RelatedFullDocumentDiagnosticReport - # @return [RelatedFullDocumentDiagnosticReport] a new instance of RelatedFullDocumentDiagnosticReport - # - # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#8 - def initialize(kind:, items:, result_id: T.unsafe(nil), related_documents: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#57 - def attributes; end - - # The actual items. - # - # @return [Diagnostic[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#41 - def items; end - - # A full document diagnostic report. - # - # @return [any] - # - # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#23 - def kind; end - - # Diagnostics of related documents. This information is useful - # in programming languages where code in a file A can generate - # diagnostics in a file B which A depends on. An example of - # such a language is C/C++ where marco definitions in a file - # a.cpp and result in errors in a header file b.hpp. - # - # @return [{ [uri: string]: FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#53 - def related_documents; end - - # An optional result id. If provided it will - # be sent on the next diagnostic request for the - # same document. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#33 - def result_id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#59 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#63 - def to_json(*args); end -end - -# An unchanged diagnostic report with a set of related documents. -# -# source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#7 -class LanguageServer::Protocol::Interface::RelatedUnchangedDocumentDiagnosticReport - # @return [RelatedUnchangedDocumentDiagnosticReport] a new instance of RelatedUnchangedDocumentDiagnosticReport - # - # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#8 - def initialize(kind:, result_id:, related_documents: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#50 - def attributes; end - - # A document diagnostic report indicating - # no changes to the last result. A server can - # only return `unchanged` if result ids are - # provided. - # - # @return [any] - # - # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#25 - def kind; end - - # Diagnostics of related documents. This information is useful - # in programming languages where code in a file A can generate - # diagnostics in a file B which A depends on. An example of - # such a language is C/C++ where marco definitions in a file - # a.cpp and result in errors in a header file b.hpp. - # - # @return [{ [uri: string]: FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#46 - def related_documents; end - - # A result id which will be sent on the next - # diagnostic request for the same document. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#34 - def result_id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#52 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#56 - def to_json(*args); end -end - -# A relative pattern is a helper to construct glob patterns that are matched -# relatively to a base URI. The common value for a `baseUri` is a workspace -# folder root, but it can be another absolute URI as well. -# -# source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#9 -class LanguageServer::Protocol::Interface::RelativePattern - # @return [RelativePattern] a new instance of RelativePattern - # - # source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#10 - def initialize(base_uri:, pattern:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#36 - def attributes; end - - # A workspace folder or a base URI to which this pattern will be matched - # against relatively. - # - # @return [string | WorkspaceFolder] - # - # source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#24 - def base_uri; end - - # The actual glob pattern; - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#32 - def pattern; end - - # source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#38 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#42 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::RenameClientCapabilities - # @return [RenameClientCapabilities] a new instance of RenameClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil), prepare_support: T.unsafe(nil), prepare_support_default_behavior: T.unsafe(nil), honors_change_annotations: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#57 - def attributes; end - - # Whether rename supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#20 - def dynamic_registration; end - - # Whether the client honors the change annotations in - # text edits and resource operations returned via the - # rename request's workspace edit by for example presenting - # the workspace edit in the user interface and asking - # for confirmation. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#53 - def honors_change_annotations; end - - # Client supports testing for validity of rename operations - # before execution. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#29 - def prepare_support; end - - # Client supports the default behavior result - # (`{ defaultBehavior: boolean }`). - # - # The value indicates the default behavior used by the - # client. - # - # @return [1] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#41 - def prepare_support_default_behavior; end - - # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#59 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#63 - def to_json(*args); end -end - -# Rename file operation -# -# source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#7 -class LanguageServer::Protocol::Interface::RenameFile - # @return [RenameFile] a new instance of RenameFile - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#8 - def initialize(kind:, old_uri:, new_uri:, options: T.unsafe(nil), annotation_id: T.unsafe(nil)); end - - # An optional annotation identifier describing the operation. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#56 - def annotation_id; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#60 - def attributes; end - - # A rename - # - # @return ["rename"] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#24 - def kind; end - - # The new location. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#40 - def new_uri; end - - # The old (existing) location. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#32 - def old_uri; end - - # Rename options. - # - # @return [RenameFileOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#48 - def options; end - - # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#62 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#66 - def to_json(*args); end -end - -# Rename file options -# -# source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#7 -class LanguageServer::Protocol::Interface::RenameFileOptions - # @return [RenameFileOptions] a new instance of RenameFileOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#8 - def initialize(overwrite: T.unsafe(nil), ignore_if_exists: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#33 - def attributes; end - - # Ignores if target exists. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#29 - def ignore_if_exists; end - - # Overwrite target if existing. Overwrite wins over `ignoreIfExists` - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#21 - def overwrite; end - - # source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#35 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#39 - def to_json(*args); end -end - -# The parameters sent in notifications/requests for user-initiated renames -# of files. -# -# source://language_server-protocol//lib/language_server/protocol/interface/rename_files_params.rb#8 -class LanguageServer::Protocol::Interface::RenameFilesParams - # @return [RenameFilesParams] a new instance of RenameFilesParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_files_params.rb#9 - def initialize(files:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_files_params.rb#26 - def attributes; end - - # An array of all files/folders renamed in this operation. When a folder - # is renamed, only the folder will be included, and not its children. - # - # @return [FileRename[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_files_params.rb#22 - def files; end - - # source://language_server-protocol//lib/language_server/protocol/interface/rename_files_params.rb#28 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/rename_files_params.rb#32 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#4 -class LanguageServer::Protocol::Interface::RenameOptions - # @return [RenameOptions] a new instance of RenameOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil), prepare_provider: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#27 - def attributes; end - - # Renames should be checked and tested before being executed. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#23 - def prepare_provider; end - - # source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#29 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#33 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#15 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#4 -class LanguageServer::Protocol::Interface::RenameParams - # @return [RenameParams] a new instance of RenameParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#5 - def initialize(text_document:, position:, new_name:, work_done_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#50 - def attributes; end - - # The new name of the symbol. If the given name is not valid the - # request must return a [ResponseError](#ResponseError) with an - # appropriate message set. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#46 - def new_name; end - - # The position inside the text document. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#28 - def position; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#20 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#52 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#56 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#36 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#4 -class LanguageServer::Protocol::Interface::RenameRegistrationOptions - # @return [RenameRegistrationOptions] a new instance of RenameRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), prepare_provider: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#37 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#20 - def document_selector; end - - # Renames should be checked and tested before being executed. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#33 - def prepare_provider; end - - # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#39 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#43 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#25 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#4 -class LanguageServer::Protocol::Interface::RequestMessage - # @return [RequestMessage] a new instance of RequestMessage - # - # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#5 - def initialize(jsonrpc:, id:, method:, params: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#45 - def attributes; end - - # The request id. - # - # @return [string | number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#25 - def id; end - - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#17 - def jsonrpc; end - - # The method to be invoked. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#33 - def method; end - - # The method's params. - # - # @return [any] - # - # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#41 - def params; end - - # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#47 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#51 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#4 -class LanguageServer::Protocol::Interface::ResponseError - # @return [ResponseError] a new instance of ResponseError - # - # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#5 - def initialize(code:, message:, data: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#40 - def attributes; end - - # A number indicating the error type that occurred. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#19 - def code; end - - # A primitive or structured value that contains additional - # information about the error. Can be omitted. - # - # @return [any] - # - # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#36 - def data; end - - # A string providing a short description of the error. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#27 - def message; end - - # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#42 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#46 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#4 -class LanguageServer::Protocol::Interface::ResponseMessage - # @return [ResponseMessage] a new instance of ResponseMessage - # - # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#5 - def initialize(jsonrpc:, id:, result: T.unsafe(nil), error: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#46 - def attributes; end - - # The error object in case a request fails. - # - # @return [ResponseError] - # - # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#42 - def error; end - - # The request id. - # - # @return [string | number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#25 - def id; end - - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#17 - def jsonrpc; end - - # The result of a request. This member is REQUIRED on success. - # This member MUST NOT exist if there was an error invoking the method. - # - # @return [string | number | boolean | object] - # - # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#34 - def result; end - - # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#48 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#52 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/save_options.rb#4 -class LanguageServer::Protocol::Interface::SaveOptions - # @return [SaveOptions] a new instance of SaveOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/save_options.rb#5 - def initialize(include_text: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/save_options.rb#21 - def attributes; end - - # The client is supposed to include the content on save. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/save_options.rb#17 - def include_text; end - - # source://language_server-protocol//lib/language_server/protocol/interface/save_options.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/save_options.rb#27 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#4 -class LanguageServer::Protocol::Interface::SelectionRange - # @return [SelectionRange] a new instance of SelectionRange - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#5 - def initialize(range:, parent: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#31 - def attributes; end - - # The parent selection range containing this range. Therefore - # `parent.range` must contain `this.range`. - # - # @return [SelectionRange] - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#27 - def parent; end - - # The [range](#Range) of this selection range. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#18 - def range; end - - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#33 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#37 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/selection_range_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::SelectionRangeClientCapabilities - # @return [SelectionRangeClientCapabilities] a new instance of SelectionRangeClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_client_capabilities.rb#24 - def attributes; end - - # Whether implementation supports dynamic registration for selection range - # providers. If this is set to `true` the client supports the new - # `SelectionRangeRegistrationOptions` return value for the corresponding - # server capability as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_client_capabilities.rb#20 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_client_capabilities.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_client_capabilities.rb#30 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/selection_range_options.rb#4 -class LanguageServer::Protocol::Interface::SelectionRangeOptions - # @return [SelectionRangeOptions] a new instance of SelectionRangeOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#4 -class LanguageServer::Protocol::Interface::SelectionRangeParams - # @return [SelectionRangeParams] a new instance of SelectionRangeParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#5 - def initialize(text_document:, positions:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#49 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#29 - def partial_result_token; end - - # The positions inside the text document. - # - # @return [Position[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#45 - def positions; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#37 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#51 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#55 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#20 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#4 -class LanguageServer::Protocol::Interface::SelectionRangeRegistrationOptions - # @return [SelectionRangeRegistrationOptions] a new instance of SelectionRangeRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#38 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#25 - def document_selector; end - - # The id used to register the request. The id can be used to deregister - # the request again. See also Registration#id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#34 - def id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#40 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#44 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#16 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#4 -class LanguageServer::Protocol::Interface::SemanticTokens - # @return [SemanticTokens] a new instance of SemanticTokens - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#5 - def initialize(data:, result_id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#33 - def attributes; end - - # The actual tokens. - # - # @return [number[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#29 - def data; end - - # An optional result id. If provided and clients support delta updating - # the client will include the result id in the next semantic token request. - # A server can then instead of computing all semantic tokens again simply - # send a delta. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#21 - def result_id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#35 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#39 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::SemanticTokensClientCapabilities - # @return [SemanticTokensClientCapabilities] a new instance of SemanticTokensClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#5 - def initialize(requests:, token_types:, token_modifiers:, formats:, dynamic_registration: T.unsafe(nil), overlapping_token_support: T.unsafe(nil), multiline_token_support: T.unsafe(nil), server_cancel_support: T.unsafe(nil), augments_syntax_tokens: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#113 - def attributes; end - - # Whether the client uses semantic tokens to augment existing - # syntax tokens. If set to `true` client side created syntax - # tokens and semantic tokens are both used for colorization. If - # set to `false` the client only uses the returned semantic tokens - # for colorization. - # - # If the value is `undefined` then the client behavior is not - # specified. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#109 - def augments_syntax_tokens; end - - # Whether implementation supports dynamic registration. If this is set to - # `true` the client supports the new `(TextDocumentRegistrationOptions & - # StaticRegistrationOptions)` return value for the corresponding server - # capability as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#28 - def dynamic_registration; end - - # The formats the clients supports. - # - # @return ["relative"[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#67 - def formats; end - - # Whether the client supports tokens that can span multiple lines. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#83 - def multiline_token_support; end - - # Whether the client supports tokens that can overlap each other. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#75 - def overlapping_token_support; end - - # Which requests the client supports and might send to the server - # depending on the server's capability. Please note that clients might not - # show semantic tokens or degrade some of the user experience if a range - # or full request is advertised by the client but not provided by the - # server. If for example the client capability `requests.full` and - # `request.range` are both set to true but the server only provides a - # range provider the client might not render a minimap correctly or might - # even decide to not show any semantic tokens at all. - # - # @return [{ range?: boolean | {}; full?: boolean | { delta?: boolean; }; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#43 - def requests; end - - # Whether the client allows the server to actively cancel a - # semantic token request, e.g. supports returning - # ErrorCodes.ServerCancelled. If a server does the client - # needs to retrigger the request. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#94 - def server_cancel_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#115 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#119 - def to_json(*args); end - - # The token modifiers that the client supports. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#59 - def token_modifiers; end - - # The token types that the client supports. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#51 - def token_types; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#4 -class LanguageServer::Protocol::Interface::SemanticTokensDelta - # @return [SemanticTokensDelta] a new instance of SemanticTokensDelta - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#5 - def initialize(edits:, result_id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#28 - def attributes; end - - # The semantic token edits to transform a previous result into a new - # result. - # - # @return [SemanticTokensEdit[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#24 - def edits; end - - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#15 - def result_id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#30 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#34 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#4 -class LanguageServer::Protocol::Interface::SemanticTokensDeltaParams - # @return [SemanticTokensDeltaParams] a new instance of SemanticTokensDeltaParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#5 - def initialize(text_document:, previous_result_id:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#50 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#29 - def partial_result_token; end - - # The result id of a previous response. The result Id can either point to - # a full response or a delta response depending on what was received last. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#46 - def previous_result_id; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#37 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#52 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#56 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#20 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb#4 -class LanguageServer::Protocol::Interface::SemanticTokensDeltaPartialResult - # @return [SemanticTokensDeltaPartialResult] a new instance of SemanticTokensDeltaPartialResult - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb#5 - def initialize(edits:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb#18 - def attributes; end - - # @return [SemanticTokensEdit[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb#14 - def edits; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb#24 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#4 -class LanguageServer::Protocol::Interface::SemanticTokensEdit - # @return [SemanticTokensEdit] a new instance of SemanticTokensEdit - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#5 - def initialize(start:, delete_count:, data: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#39 - def attributes; end - - # The elements to insert. - # - # @return [number[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#35 - def data; end - - # The count of elements to remove. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#27 - def delete_count; end - - # The start offset of the edit. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#19 - def start; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#41 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#45 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#4 -class LanguageServer::Protocol::Interface::SemanticTokensLegend - # @return [SemanticTokensLegend] a new instance of SemanticTokensLegend - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#5 - def initialize(token_types:, token_modifiers:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#30 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#36 - def to_json(*args); end - - # The token modifiers a server uses. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#26 - def token_modifiers; end - - # The token types a server uses. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#18 - def token_types; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#4 -class LanguageServer::Protocol::Interface::SemanticTokensOptions - # @return [SemanticTokensOptions] a new instance of SemanticTokensOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#5 - def initialize(legend:, work_done_progress: T.unsafe(nil), range: T.unsafe(nil), full: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#46 - def attributes; end - - # Server supports providing semantic tokens for a full document. - # - # @return [boolean | { delta?: boolean; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#42 - def full; end - - # The legend used by the server - # - # @return [SemanticTokensLegend] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#25 - def legend; end - - # Server supports providing semantic tokens for a specific range - # of a document. - # - # @return [boolean | {}] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#34 - def range; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#48 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#52 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#17 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#4 -class LanguageServer::Protocol::Interface::SemanticTokensParams - # @return [SemanticTokensParams] a new instance of SemanticTokensParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#5 - def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#40 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#28 - def partial_result_token; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#36 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#42 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#46 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#19 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_partial_result.rb#4 -class LanguageServer::Protocol::Interface::SemanticTokensPartialResult - # @return [SemanticTokensPartialResult] a new instance of SemanticTokensPartialResult - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_partial_result.rb#5 - def initialize(data:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_partial_result.rb#18 - def attributes; end - - # @return [number[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_partial_result.rb#14 - def data; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_partial_result.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_partial_result.rb#24 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#4 -class LanguageServer::Protocol::Interface::SemanticTokensRangeParams - # @return [SemanticTokensRangeParams] a new instance of SemanticTokensRangeParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#5 - def initialize(text_document:, range:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#49 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#29 - def partial_result_token; end - - # The range the semantic tokens are requested for. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#45 - def range; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#37 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#51 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#55 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#20 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#4 -class LanguageServer::Protocol::Interface::SemanticTokensRegistrationOptions - # @return [SemanticTokensRegistrationOptions] a new instance of SemanticTokensRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#5 - def initialize(document_selector:, legend:, work_done_progress: T.unsafe(nil), range: T.unsafe(nil), full: T.unsafe(nil), id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#66 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#23 - def document_selector; end - - # Server supports providing semantic tokens for a full document. - # - # @return [boolean | { delta?: boolean; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#53 - def full; end - - # The id used to register the request. The id can be used to deregister - # the request again. See also Registration#id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#62 - def id; end - - # The legend used by the server - # - # @return [SemanticTokensLegend] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#36 - def legend; end - - # Server supports providing semantic tokens for a specific range - # of a document. - # - # @return [boolean | {}] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#45 - def range; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#68 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#72 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#28 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::SemanticTokensWorkspaceClientCapabilities - # @return [SemanticTokensWorkspaceClientCapabilities] a new instance of SemanticTokensWorkspaceClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb#5 - def initialize(refresh_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb#27 - def attributes; end - - # Whether the client implementation supports a refresh request sent from - # the server to the client. - # - # Note that this event is global and will force the client to refresh all - # semantic tokens currently shown. It should be used with absolute care - # and is useful for situation where a server for example detect a project - # wide change that requires such a calculation. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb#23 - def refresh_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb#29 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb#33 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#4 -class LanguageServer::Protocol::Interface::ServerCapabilities - # @return [ServerCapabilities] a new instance of ServerCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#5 - def initialize(position_encoding: T.unsafe(nil), text_document_sync: T.unsafe(nil), notebook_document_sync: T.unsafe(nil), completion_provider: T.unsafe(nil), hover_provider: T.unsafe(nil), signature_help_provider: T.unsafe(nil), declaration_provider: T.unsafe(nil), definition_provider: T.unsafe(nil), type_definition_provider: T.unsafe(nil), implementation_provider: T.unsafe(nil), references_provider: T.unsafe(nil), document_highlight_provider: T.unsafe(nil), document_symbol_provider: T.unsafe(nil), code_action_provider: T.unsafe(nil), code_lens_provider: T.unsafe(nil), document_link_provider: T.unsafe(nil), color_provider: T.unsafe(nil), document_formatting_provider: T.unsafe(nil), document_range_formatting_provider: T.unsafe(nil), document_on_type_formatting_provider: T.unsafe(nil), rename_provider: T.unsafe(nil), folding_range_provider: T.unsafe(nil), execute_command_provider: T.unsafe(nil), selection_range_provider: T.unsafe(nil), linked_editing_range_provider: T.unsafe(nil), call_hierarchy_provider: T.unsafe(nil), semantic_tokens_provider: T.unsafe(nil), moniker_provider: T.unsafe(nil), type_hierarchy_provider: T.unsafe(nil), inline_value_provider: T.unsafe(nil), inlay_hint_provider: T.unsafe(nil), diagnostic_provider: T.unsafe(nil), workspace_symbol_provider: T.unsafe(nil), workspace: T.unsafe(nil), experimental: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#340 - def attributes; end - - # The server provides call hierarchy support. - # - # @return [boolean | CallHierarchyOptions | CallHierarchyRegistrationOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#264 - def call_hierarchy_provider; end - - # The server provides code actions. The `CodeActionOptions` return type is - # only valid if the client signals code action literal support via the - # property `textDocument.codeAction.codeActionLiteralSupport`. - # - # @return [boolean | CodeActionOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#166 - def code_action_provider; end - - # The server provides code lens. - # - # @return [CodeLensOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#174 - def code_lens_provider; end - - # The server provides color provider support. - # - # @return [boolean | DocumentColorOptions | DocumentColorRegistrationOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#190 - def color_provider; end - - # The server provides completion support. - # - # @return [CompletionOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#84 - def completion_provider; end - - # The server provides go to declaration support. - # - # @return [boolean | DeclarationOptions | DeclarationRegistrationOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#108 - def declaration_provider; end - - # The server provides goto definition support. - # - # @return [boolean | DefinitionOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#116 - def definition_provider; end - - # The server has support for pull model diagnostics. - # - # @return [DiagnosticOptions | DiagnosticRegistrationOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#312 - def diagnostic_provider; end - - # The server provides document formatting. - # - # @return [boolean | DocumentFormattingOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#198 - def document_formatting_provider; end - - # The server provides document highlight support. - # - # @return [boolean | DocumentHighlightOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#148 - def document_highlight_provider; end - - # The server provides document link support. - # - # @return [DocumentLinkOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#182 - def document_link_provider; end - - # The server provides document formatting on typing. - # - # @return [DocumentOnTypeFormattingOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#214 - def document_on_type_formatting_provider; end - - # The server provides document range formatting. - # - # @return [boolean | DocumentRangeFormattingOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#206 - def document_range_formatting_provider; end - - # The server provides document symbol support. - # - # @return [boolean | DocumentSymbolOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#156 - def document_symbol_provider; end - - # The server provides execute command support. - # - # @return [ExecuteCommandOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#240 - def execute_command_provider; end - - # Experimental server capabilities. - # - # @return [LSPAny] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#336 - def experimental; end - - # The server provides folding provider support. - # - # @return [boolean | FoldingRangeOptions | FoldingRangeRegistrationOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#232 - def folding_range_provider; end - - # The server provides hover support. - # - # @return [boolean | HoverOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#92 - def hover_provider; end - - # The server provides goto implementation support. - # - # @return [boolean | ImplementationOptions | ImplementationRegistrationOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#132 - def implementation_provider; end - - # The server provides inlay hints. - # - # @return [boolean | InlayHintOptions | InlayHintRegistrationOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#304 - def inlay_hint_provider; end - - # The server provides inline values. - # - # @return [boolean | InlineValueOptions | InlineValueRegistrationOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#296 - def inline_value_provider; end - - # The server provides linked editing range support. - # - # @return [boolean | LinkedEditingRangeOptions | LinkedEditingRangeRegistrationOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#256 - def linked_editing_range_provider; end - - # Whether server provides moniker support. - # - # @return [boolean | MonikerOptions | MonikerRegistrationOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#280 - def moniker_provider; end - - # Defines how notebook documents are synced. - # - # @return [NotebookDocumentSyncOptions | NotebookDocumentSyncRegistrationOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#76 - def notebook_document_sync; end - - # The position encoding the server picked from the encodings offered - # by the client via the client capability `general.positionEncodings`. - # - # If the client didn't provide any position encodings the only valid - # value that a server can return is 'utf-16'. - # - # If omitted it defaults to 'utf-16'. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#57 - def position_encoding; end - - # The server provides find references support. - # - # @return [boolean | ReferenceOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#140 - def references_provider; end - - # The server provides rename support. RenameOptions may only be - # specified if the client states that it supports - # `prepareSupport` in its initial `initialize` request. - # - # @return [boolean | RenameOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#224 - def rename_provider; end - - # The server provides selection range support. - # - # @return [boolean | SelectionRangeOptions | SelectionRangeRegistrationOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#248 - def selection_range_provider; end - - # The server provides semantic tokens support. - # - # @return [SemanticTokensOptions | SemanticTokensRegistrationOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#272 - def semantic_tokens_provider; end - - # The server provides signature help support. - # - # @return [SignatureHelpOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#100 - def signature_help_provider; end - - # Defines how text documents are synced. Is either a detailed structure - # defining each notification or for backwards compatibility the - # TextDocumentSyncKind number. If omitted it defaults to - # `TextDocumentSyncKind.None`. - # - # @return [TextDocumentSyncOptions | TextDocumentSyncKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#68 - def text_document_sync; end - - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#342 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#346 - def to_json(*args); end - - # The server provides goto type definition support. - # - # @return [boolean | TypeDefinitionOptions | TypeDefinitionRegistrationOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#124 - def type_definition_provider; end - - # The server provides type hierarchy support. - # - # @return [boolean | TypeHierarchyOptions | TypeHierarchyRegistrationOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#288 - def type_hierarchy_provider; end - - # Workspace specific server capabilities - # - # @return [{ workspaceFolders?: WorkspaceFoldersServerCapabilities; fileOperations?: { didCreate?: FileOperationRegistrationOptions; ... 4 more ...; willDelete?: FileOperationRegistrationOptions; }; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#328 - def workspace; end - - # The server provides workspace symbol support. - # - # @return [boolean | WorkspaceSymbolOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#320 - def workspace_symbol_provider; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/set_trace_params.rb#4 -class LanguageServer::Protocol::Interface::SetTraceParams - # @return [SetTraceParams] a new instance of SetTraceParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/set_trace_params.rb#5 - def initialize(value:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/set_trace_params.rb#21 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/set_trace_params.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/set_trace_params.rb#27 - def to_json(*args); end - - # The new value that should be assigned to the trace setting. - # - # @return [TraceValue] - # - # source://language_server-protocol//lib/language_server/protocol/interface/set_trace_params.rb#17 - def value; end -end - -# Client capabilities for the show document request. -# -# source://language_server-protocol//lib/language_server/protocol/interface/show_document_client_capabilities.rb#7 -class LanguageServer::Protocol::Interface::ShowDocumentClientCapabilities - # @return [ShowDocumentClientCapabilities] a new instance of ShowDocumentClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_client_capabilities.rb#8 - def initialize(support:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_client_capabilities.rb#25 - def attributes; end - - # The client has support for the show document - # request. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_client_capabilities.rb#21 - def support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_client_capabilities.rb#27 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_client_capabilities.rb#31 - def to_json(*args); end -end - -# Params to show a resource. -# -# source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#7 -class LanguageServer::Protocol::Interface::ShowDocumentParams - # @return [ShowDocumentParams] a new instance of ShowDocumentParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#8 - def initialize(uri:, external: T.unsafe(nil), take_focus: T.unsafe(nil), selection: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#59 - def attributes; end - - # Indicates to show the resource in an external program. - # To show, for example, `https://code.visualstudio.com/` - # in the default WEB browser set `external` to `true`. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#33 - def external; end - - # An optional selection range if the document is a text - # document. Clients might ignore the property if an - # external program is started or the file is not a text - # file. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#55 - def selection; end - - # An optional property to indicate whether the editor - # showing the document should take focus or not. - # Clients might ignore this property if an external - # program is started. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#44 - def take_focus; end - - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#61 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#65 - def to_json(*args); end - - # The uri to show. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#23 - def uri; end -end - -# The result of an show document request. -# -# source://language_server-protocol//lib/language_server/protocol/interface/show_document_result.rb#7 -class LanguageServer::Protocol::Interface::ShowDocumentResult - # @return [ShowDocumentResult] a new instance of ShowDocumentResult - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_result.rb#8 - def initialize(success:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_result.rb#24 - def attributes; end - - # A boolean indicating if the show was successful. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_result.rb#20 - def success; end - - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_result.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/show_document_result.rb#30 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#4 -class LanguageServer::Protocol::Interface::ShowMessageParams - # @return [ShowMessageParams] a new instance of ShowMessageParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#5 - def initialize(type:, message:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#30 - def attributes; end - - # The actual message. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#26 - def message; end - - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#36 - def to_json(*args); end - - # The message type. See {@link MessageType}. - # - # @return [MessageType] - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#18 - def type; end -end - -# Show message request client capabilities -# -# source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_client_capabilities.rb#7 -class LanguageServer::Protocol::Interface::ShowMessageRequestClientCapabilities - # @return [ShowMessageRequestClientCapabilities] a new instance of ShowMessageRequestClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_client_capabilities.rb#8 - def initialize(message_action_item: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_client_capabilities.rb#24 - def attributes; end - - # Capabilities specific to the `MessageActionItem` type. - # - # @return [{ additionalPropertiesSupport?: boolean; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_client_capabilities.rb#20 - def message_action_item; end - - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_client_capabilities.rb#26 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_client_capabilities.rb#30 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#4 -class LanguageServer::Protocol::Interface::ShowMessageRequestParams - # @return [ShowMessageRequestParams] a new instance of ShowMessageRequestParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#5 - def initialize(type:, message:, actions: T.unsafe(nil)); end - - # The message action items to present. - # - # @return [MessageActionItem[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#35 - def actions; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#39 - def attributes; end - - # The actual message - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#27 - def message; end - - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#41 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#45 - def to_json(*args); end - - # The message type. See {@link MessageType} - # - # @return [MessageType] - # - # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#19 - def type; end -end - -# Signature help represents the signature of something -# callable. There can be multiple signature but only one -# active and only one active parameter. -# -# source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#9 -class LanguageServer::Protocol::Interface::SignatureHelp - # @return [SignatureHelp] a new instance of SignatureHelp - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#10 - def initialize(signatures:, active_signature: T.unsafe(nil), active_parameter: T.unsafe(nil)); end - - # The active parameter of the active signature. If omitted or the value - # lies outside the range of `signatures[activeSignature].parameters` - # defaults to 0 if the active signature has parameters. If - # the active signature has no parameters it is ignored. - # In future version of the protocol this property might become - # mandatory to better express the active parameter if the - # active signature does have any. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#55 - def active_parameter; end - - # The active signature. If omitted or the value lies outside the - # range of `signatures` the value defaults to zero or is ignore if - # the `SignatureHelp` as no signatures. - # - # Whenever possible implementors should make an active decision about - # the active signature and shouldn't rely on a default value. - # - # In future version of the protocol this property might become - # mandatory to better express this. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#41 - def active_signature; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#59 - def attributes; end - - # One or more signatures. If no signatures are available the signature help - # request should return `null`. - # - # @return [SignatureInformation[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#25 - def signatures; end - - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#61 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#65 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::SignatureHelpClientCapabilities - # @return [SignatureHelpClientCapabilities] a new instance of SignatureHelpClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil), signature_information: T.unsafe(nil), context_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#43 - def attributes; end - - # The client supports to send additional context information for a - # `textDocument/signatureHelp` request. A client that opts into - # contextSupport will also support the `retriggerCharacters` on - # `SignatureHelpOptions`. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#39 - def context_support; end - - # Whether signature help supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#19 - def dynamic_registration; end - - # The client supports the following `SignatureInformation` - # specific properties. - # - # @return [{ documentationFormat?: MarkupKind[]; parameterInformation?: { labelOffsetSupport?: boolean; }; activeParameterSupport?: boolean; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#28 - def signature_information; end - - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#45 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#49 - def to_json(*args); end -end - -# Additional information about the context in which a signature help request -# was triggered. -# -# source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#8 -class LanguageServer::Protocol::Interface::SignatureHelpContext - # @return [SignatureHelpContext] a new instance of SignatureHelpContext - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#9 - def initialize(trigger_kind:, is_retrigger:, trigger_character: T.unsafe(nil), active_signature_help: T.unsafe(nil)); end - - # The currently active `SignatureHelp`. - # - # The `activeSignatureHelp` has its `SignatureHelp.activeSignature` field - # updated based on the user navigating through available signatures. - # - # @return [SignatureHelp] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#58 - def active_signature_help; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#62 - def attributes; end - - # `true` if signature help was already showing when it was triggered. - # - # Retriggers occur when the signature help is already active and can be - # caused by actions such as typing a trigger character, a cursor move, or - # document content changes. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#47 - def is_retrigger; end - - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#64 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#68 - def to_json(*args); end - - # Character that caused signature help to be triggered. - # - # This is undefined when triggerKind !== - # SignatureHelpTriggerKind.TriggerCharacter - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#35 - def trigger_character; end - - # Action that caused signature help to be triggered. - # - # @return [SignatureHelpTriggerKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#24 - def trigger_kind; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#4 -class LanguageServer::Protocol::Interface::SignatureHelpOptions - # @return [SignatureHelpOptions] a new instance of SignatureHelpOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil), trigger_characters: T.unsafe(nil), retrigger_characters: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#41 - def attributes; end - - # List of characters that re-trigger signature help. - # - # These trigger characters are only active when signature help is already - # showing. All trigger characters are also counted as re-trigger - # characters. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#37 - def retrigger_characters; end - - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#43 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#47 - def to_json(*args); end - - # The characters that trigger signature help - # automatically. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#25 - def trigger_characters; end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#16 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#4 -class LanguageServer::Protocol::Interface::SignatureHelpParams - # @return [SignatureHelpParams] a new instance of SignatureHelpParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#5 - def initialize(text_document:, position:, work_done_token: T.unsafe(nil), context: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#50 - def attributes; end - - # The signature help context. This is only available if the client - # specifies to send this using the client capability - # `textDocument.signatureHelp.contextSupport === true` - # - # @return [SignatureHelpContext] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#46 - def context; end - - # The position inside the text document. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#28 - def position; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#20 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#52 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#56 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#36 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#4 -class LanguageServer::Protocol::Interface::SignatureHelpRegistrationOptions - # @return [SignatureHelpRegistrationOptions] a new instance of SignatureHelpRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), trigger_characters: T.unsafe(nil), retrigger_characters: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#51 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#21 - def document_selector; end - - # List of characters that re-trigger signature help. - # - # These trigger characters are only active when signature help is already - # showing. All trigger characters are also counted as re-trigger - # characters. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#47 - def retrigger_characters; end - - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#53 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#57 - def to_json(*args); end - - # The characters that trigger signature help - # automatically. - # - # @return [string[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#35 - def trigger_characters; end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#26 - def work_done_progress; end -end - -# Represents the signature of something callable. A signature -# can have a label, like a function-name, a doc-comment, and -# a set of parameters. -# -# source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#9 -class LanguageServer::Protocol::Interface::SignatureInformation - # @return [SignatureInformation] a new instance of SignatureInformation - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#10 - def initialize(label:, documentation: T.unsafe(nil), parameters: T.unsafe(nil), active_parameter: T.unsafe(nil)); end - - # The index of the active parameter. - # - # If provided, this is used in place of `SignatureHelp.activeParameter`. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#53 - def active_parameter; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#57 - def attributes; end - - # The human-readable doc-comment of this signature. Will be shown - # in the UI but can be omitted. - # - # @return [string | MarkupContent] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#35 - def documentation; end - - # The label of this signature. Will be shown in - # the UI. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#26 - def label; end - - # The parameters of this signature. - # - # @return [ParameterInformation[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#43 - def parameters; end - - # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#59 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#63 - def to_json(*args); end -end - -# Static registration options to be returned in the initialize request. -# -# source://language_server-protocol//lib/language_server/protocol/interface/static_registration_options.rb#7 -class LanguageServer::Protocol::Interface::StaticRegistrationOptions - # @return [StaticRegistrationOptions] a new instance of StaticRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/static_registration_options.rb#8 - def initialize(id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/static_registration_options.rb#25 - def attributes; end - - # The id used to register the request. The id can be used to deregister - # the request again. See also Registration#id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/static_registration_options.rb#21 - def id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/static_registration_options.rb#27 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/static_registration_options.rb#31 - def to_json(*args); end -end - -# Represents information about programming constructs like variables, classes, -# interfaces etc. -# -# source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#8 -class LanguageServer::Protocol::Interface::SymbolInformation - # @return [SymbolInformation] a new instance of SymbolInformation - # - # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#9 - def initialize(name:, kind:, location:, tags: T.unsafe(nil), deprecated: T.unsafe(nil), container_name: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#81 - def attributes; end - - # The name of the symbol containing this symbol. This information is for - # user interface purposes (e.g. to render a qualifier in the user interface - # if necessary). It can't be used to re-infer a hierarchy for the document - # symbols. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#77 - def container_name; end - - # Indicates if this symbol is deprecated. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#50 - def deprecated; end - - # The kind of this symbol. - # - # @return [SymbolKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#34 - def kind; end - - # The location of this symbol. The location's range is used by a tool - # to reveal the location in the editor. If the symbol is selected in the - # tool the range's start information is used to position the cursor. So - # the range usually spans more then the actual symbol's name and does - # normally include things like visibility modifiers. - # - # The range doesn't have to denote a node range in the sense of an abstract - # syntax tree. It can therefore not be used to re-construct a hierarchy of - # the symbols. - # - # @return [Location] - # - # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#66 - def location; end - - # The name of this symbol. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#26 - def name; end - - # Tags for this symbol. - # - # @return [1[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#42 - def tags; end - - # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#83 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#87 - def to_json(*args); end -end - -# Describe options to be used when registering for text document change events. -# -# source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#7 -class LanguageServer::Protocol::Interface::TextDocumentChangeRegistrationOptions - # @return [TextDocumentChangeRegistrationOptions] a new instance of TextDocumentChangeRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#8 - def initialize(document_selector:, sync_kind:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#35 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#22 - def document_selector; end - - # How documents are synced to the server. See TextDocumentSyncKind.Full - # and TextDocumentSyncKind.Incremental. - # - # @return [TextDocumentSyncKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#31 - def sync_kind; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#37 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#41 - def to_json(*args); end -end - -# Text document specific client capabilities. -# -# source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#7 -class LanguageServer::Protocol::Interface::TextDocumentClientCapabilities - # @return [TextDocumentClientCapabilities] a new instance of TextDocumentClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#8 - def initialize(synchronization: T.unsafe(nil), completion: T.unsafe(nil), hover: T.unsafe(nil), signature_help: T.unsafe(nil), declaration: T.unsafe(nil), definition: T.unsafe(nil), type_definition: T.unsafe(nil), implementation: T.unsafe(nil), references: T.unsafe(nil), document_highlight: T.unsafe(nil), document_symbol: T.unsafe(nil), code_action: T.unsafe(nil), code_lens: T.unsafe(nil), document_link: T.unsafe(nil), color_provider: T.unsafe(nil), formatting: T.unsafe(nil), range_formatting: T.unsafe(nil), on_type_formatting: T.unsafe(nil), rename: T.unsafe(nil), publish_diagnostics: T.unsafe(nil), folding_range: T.unsafe(nil), selection_range: T.unsafe(nil), linked_editing_range: T.unsafe(nil), call_hierarchy: T.unsafe(nil), semantic_tokens: T.unsafe(nil), moniker: T.unsafe(nil), type_hierarchy: T.unsafe(nil), inline_value: T.unsafe(nil), inlay_hint: T.unsafe(nil), diagnostic: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#285 - def attributes; end - - # Capabilities specific to the various call hierarchy requests. - # - # @return [CallHierarchyClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#233 - def call_hierarchy; end - - # Capabilities specific to the `textDocument/codeAction` request. - # - # @return [CodeActionClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#134 - def code_action; end - - # Capabilities specific to the `textDocument/codeLens` request. - # - # @return [CodeLensClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#142 - def code_lens; end - - # Capabilities specific to the `textDocument/documentColor` and the - # `textDocument/colorPresentation` request. - # - # @return [DocumentColorClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#159 - def color_provider; end - - # Capabilities specific to the `textDocument/completion` request. - # - # @return [CompletionClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#54 - def completion; end - - # Capabilities specific to the `textDocument/declaration` request. - # - # @return [DeclarationClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#78 - def declaration; end - - # Capabilities specific to the `textDocument/definition` request. - # - # @return [DefinitionClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#86 - def definition; end - - # Capabilities specific to the diagnostic pull model. - # - # @return [DiagnosticClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#281 - def diagnostic; end - - # Capabilities specific to the `textDocument/documentHighlight` request. - # - # @return [DocumentHighlightClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#118 - def document_highlight; end - - # Capabilities specific to the `textDocument/documentLink` request. - # - # @return [DocumentLinkClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#150 - def document_link; end - - # Capabilities specific to the `textDocument/documentSymbol` request. - # - # @return [DocumentSymbolClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#126 - def document_symbol; end - - # Capabilities specific to the `textDocument/foldingRange` request. - # - # @return [FoldingRangeClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#209 - def folding_range; end - - # Capabilities specific to the `textDocument/formatting` request. - # - # @return [DocumentFormattingClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#167 - def formatting; end - - # Capabilities specific to the `textDocument/hover` request. - # - # @return [HoverClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#62 - def hover; end - - # Capabilities specific to the `textDocument/implementation` request. - # - # @return [ImplementationClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#102 - def implementation; end - - # Capabilities specific to the `textDocument/inlayHint` request. - # - # @return [InlayHintClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#273 - def inlay_hint; end - - # Capabilities specific to the `textDocument/inlineValue` request. - # - # @return [InlineValueClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#265 - def inline_value; end - - # Capabilities specific to the `textDocument/linkedEditingRange` request. - # - # @return [LinkedEditingRangeClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#225 - def linked_editing_range; end - - # Capabilities specific to the `textDocument/moniker` request. - # - # @return [MonikerClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#249 - def moniker; end - - # request. - # Capabilities specific to the `textDocument/onTypeFormatting` request. - # - # @return [DocumentOnTypeFormattingClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#184 - def on_type_formatting; end - - # Capabilities specific to the `textDocument/publishDiagnostics` - # notification. - # - # @return [PublishDiagnosticsClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#201 - def publish_diagnostics; end - - # Capabilities specific to the `textDocument/rangeFormatting` request. - # - # @return [DocumentRangeFormattingClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#175 - def range_formatting; end - - # Capabilities specific to the `textDocument/references` request. - # - # @return [ReferenceClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#110 - def references; end - - # Capabilities specific to the `textDocument/rename` request. - # - # @return [RenameClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#192 - def rename; end - - # Capabilities specific to the `textDocument/selectionRange` request. - # - # @return [SelectionRangeClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#217 - def selection_range; end - - # Capabilities specific to the various semantic token requests. - # - # @return [SemanticTokensClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#241 - def semantic_tokens; end - - # Capabilities specific to the `textDocument/signatureHelp` request. - # - # @return [SignatureHelpClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#70 - def signature_help; end - - # @return [TextDocumentSyncClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#46 - def synchronization; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#287 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#291 - def to_json(*args); end - - # Capabilities specific to the `textDocument/typeDefinition` request. - # - # @return [TypeDefinitionClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#94 - def type_definition; end - - # Capabilities specific to the various type hierarchy requests. - # - # @return [TypeHierarchyClientCapabilities] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#257 - def type_hierarchy; end -end - -# An event describing a change to a text document. If only a text is provided -# it is considered to be the full content of the document. -# -# source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#8 -class LanguageServer::Protocol::Interface::TextDocumentContentChangeEvent - # @return [TextDocumentContentChangeEvent] a new instance of TextDocumentContentChangeEvent - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#9 - def initialize(text:, range: T.unsafe(nil), range_length: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#47 - def attributes; end - - # The range of the document that changed. - # - # @return [Range, nil] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#23 - def range; end - - # The optional length of the range that got replaced. - # - # @return [number, nil] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#31 - def range_length; end - - # The new text for the provided range. - # - # --- OR --- - # - # The new text of the whole document. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#43 - def text; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#49 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#53 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#4 -class LanguageServer::Protocol::Interface::TextDocumentEdit - # @return [TextDocumentEdit] a new instance of TextDocumentEdit - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#5 - def initialize(text_document:, edits:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#30 - def attributes; end - - # The edits to be applied. - # - # @return [(TextEdit | AnnotatedTextEdit)[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#26 - def edits; end - - # The text document to change. - # - # @return [OptionalVersionedTextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#18 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#36 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/text_document_identifier.rb#4 -class LanguageServer::Protocol::Interface::TextDocumentIdentifier - # @return [TextDocumentIdentifier] a new instance of TextDocumentIdentifier - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_identifier.rb#5 - def initialize(uri:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_identifier.rb#21 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_identifier.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_identifier.rb#27 - def to_json(*args); end - - # The text document's URI. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_identifier.rb#17 - def uri; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#4 -class LanguageServer::Protocol::Interface::TextDocumentItem - # @return [TextDocumentItem] a new instance of TextDocumentItem - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#5 - def initialize(uri:, language_id:, version:, text:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#49 - def attributes; end - - # The text document's language identifier. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#28 - def language_id; end - - # The content of the opened text document. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#45 - def text; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#51 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#55 - def to_json(*args); end - - # The text document's URI. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#20 - def uri; end - - # The version number of this document (it will increase after each - # change, including undo/redo). - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#37 - def version; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#4 -class LanguageServer::Protocol::Interface::TextDocumentPositionParams - # @return [TextDocumentPositionParams] a new instance of TextDocumentPositionParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#5 - def initialize(text_document:, position:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#30 - def attributes; end - - # The position inside the text document. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#26 - def position; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#18 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#32 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#36 - def to_json(*args); end -end - -# General text document registration options. -# -# source://language_server-protocol//lib/language_server/protocol/interface/text_document_registration_options.rb#7 -class LanguageServer::Protocol::Interface::TextDocumentRegistrationOptions - # @return [TextDocumentRegistrationOptions] a new instance of TextDocumentRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_registration_options.rb#8 - def initialize(document_selector:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_registration_options.rb#25 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_registration_options.rb#21 - def document_selector; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_registration_options.rb#27 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_registration_options.rb#31 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#4 -class LanguageServer::Protocol::Interface::TextDocumentSaveRegistrationOptions - # @return [TextDocumentSaveRegistrationOptions] a new instance of TextDocumentSaveRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#5 - def initialize(document_selector:, include_text: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#31 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#19 - def document_selector; end - - # The client is supposed to include the content on save. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#27 - def include_text; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#33 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#37 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::TextDocumentSyncClientCapabilities - # @return [TextDocumentSyncClientCapabilities] a new instance of TextDocumentSyncClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil), will_save: T.unsafe(nil), will_save_wait_until: T.unsafe(nil), did_save: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#50 - def attributes; end - - # The client supports did save notifications. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#46 - def did_save; end - - # Whether text document synchronization supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#20 - def dynamic_registration; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#52 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#56 - def to_json(*args); end - - # The client supports sending will save notifications. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#28 - def will_save; end - - # The client supports sending a will save request and - # waits for a response providing text edits which will - # be applied to the document before it is saved. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#38 - def will_save_wait_until; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#4 -class LanguageServer::Protocol::Interface::TextDocumentSyncOptions - # @return [TextDocumentSyncOptions] a new instance of TextDocumentSyncOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#5 - def initialize(open_close: T.unsafe(nil), change: T.unsafe(nil), will_save: T.unsafe(nil), will_save_wait_until: T.unsafe(nil), save: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#66 - def attributes; end - - # Change notifications are sent to the server. See - # TextDocumentSyncKind.None, TextDocumentSyncKind.Full and - # TextDocumentSyncKind.Incremental. If omitted it defaults to - # TextDocumentSyncKind.None. - # - # @return [TextDocumentSyncKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#35 - def change; end - - # Open and close notifications are sent to the server. If omitted open - # close notifications should not be sent. - # Open and close notifications are sent to the server. If omitted open - # close notification should not be sent. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#24 - def open_close; end - - # If present save notifications are sent to the server. If omitted the - # notification should not be sent. - # - # @return [boolean | SaveOptions] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#62 - def save; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#68 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#72 - def to_json(*args); end - - # If present will save notifications are sent to the server. If omitted - # the notification should not be sent. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#44 - def will_save; end - - # If present will save wait until requests are sent to the server. If - # omitted the request should not be sent. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#53 - def will_save_wait_until; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#4 -class LanguageServer::Protocol::Interface::TextEdit - # @return [TextEdit] a new instance of TextEdit - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#5 - def initialize(range:, new_text:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#32 - def attributes; end - - # The string to be inserted. For delete operations use an - # empty string. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#28 - def new_text; end - - # The range of the text document to be manipulated. To insert - # text into a document create a range where start === end. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#19 - def range; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#34 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#38 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::TypeDefinitionClientCapabilities - # @return [TypeDefinitionClientCapabilities] a new instance of TypeDefinitionClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil), link_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#32 - def attributes; end - - # Whether implementation supports dynamic registration. If this is set to - # `true` the client supports the new `TypeDefinitionRegistrationOptions` - # return value for the corresponding server capability as well. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#20 - def dynamic_registration; end - - # The client supports additional metadata in the form of definition links. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#28 - def link_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#34 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#38 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/type_definition_options.rb#4 -class LanguageServer::Protocol::Interface::TypeDefinitionOptions - # @return [TypeDefinitionOptions] a new instance of TypeDefinitionOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#4 -class LanguageServer::Protocol::Interface::TypeDefinitionParams - # @return [TypeDefinitionParams] a new instance of TypeDefinitionParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#5 - def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#49 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#45 - def partial_result_token; end - - # The position inside the text document. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#28 - def position; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#20 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#51 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#55 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#36 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#4 -class LanguageServer::Protocol::Interface::TypeDefinitionRegistrationOptions - # @return [TypeDefinitionRegistrationOptions] a new instance of TypeDefinitionRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#38 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#20 - def document_selector; end - - # The id used to register the request. The id can be used to deregister - # the request again. See also Registration#id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#34 - def id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#40 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#44 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#25 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#4 -class LanguageServer::Protocol::Interface::TypeHierarchyItem - # @return [TypeHierarchyItem] a new instance of TypeHierarchyItem - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#5 - def initialize(name:, kind:, uri:, range:, selection_range:, tags: T.unsafe(nil), detail: T.unsafe(nil), data: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#90 - def attributes; end - - # A data entry field that is preserved between a type hierarchy prepare and - # supertypes or subtypes requests. It could also be used to identify the - # type hierarchy in the server, helping improve the performance on - # resolving supertypes and subtypes. - # - # @return [LSPAny] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#86 - def data; end - - # More detail for this item, e.g. the signature of a function. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#48 - def detail; end - - # The kind of this item. - # - # @return [SymbolKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#32 - def kind; end - - # The name of this item. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#24 - def name; end - - # The range enclosing this symbol not including leading/trailing whitespace - # but everything else, e.g. comments and code. - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#65 - def range; end - - # The range that should be selected and revealed when this symbol is being - # picked, e.g. the name of a function. Must be contained by the - # [`range`](#TypeHierarchyItem.range). - # - # @return [Range] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#75 - def selection_range; end - - # Tags for this item. - # - # @return [1[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#40 - def tags; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#92 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#96 - def to_json(*args); end - - # The resource identifier of this item. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#56 - def uri; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_options.rb#4 -class LanguageServer::Protocol::Interface::TypeHierarchyOptions - # @return [TypeHierarchyOptions] a new instance of TypeHierarchyOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#4 -class LanguageServer::Protocol::Interface::TypeHierarchyPrepareParams - # @return [TypeHierarchyPrepareParams] a new instance of TypeHierarchyPrepareParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#5 - def initialize(text_document:, position:, work_done_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#39 - def attributes; end - - # The position inside the text document. - # - # @return [Position] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#27 - def position; end - - # The text document. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#19 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#41 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#45 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#35 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#4 -class LanguageServer::Protocol::Interface::TypeHierarchyRegistrationOptions - # @return [TypeHierarchyRegistrationOptions] a new instance of TypeHierarchyRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#5 - def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#38 - def attributes; end - - # A document selector to identify the scope of the registration. If set to - # null the document selector provided on the client side will be used. - # - # @return [DocumentSelector] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#20 - def document_selector; end - - # The id used to register the request. The id can be used to deregister - # the request again. See also Registration#id. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#34 - def id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#40 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#44 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#25 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#4 -class LanguageServer::Protocol::Interface::TypeHierarchySubtypesParams - # @return [TypeHierarchySubtypesParams] a new instance of TypeHierarchySubtypesParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#5 - def initialize(item:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#37 - def attributes; end - - # @return [TypeHierarchyItem] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#33 - def item; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#28 - def partial_result_token; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#39 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#43 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#19 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#4 -class LanguageServer::Protocol::Interface::TypeHierarchySupertypesParams - # @return [TypeHierarchySupertypesParams] a new instance of TypeHierarchySupertypesParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#5 - def initialize(item:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#37 - def attributes; end - - # @return [TypeHierarchyItem] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#33 - def item; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#28 - def partial_result_token; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#39 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#43 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#19 - def work_done_token; end -end - -# A diagnostic report indicating that the last returned -# report is still accurate. -# -# source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#8 -class LanguageServer::Protocol::Interface::UnchangedDocumentDiagnosticReport - # @return [UnchangedDocumentDiagnosticReport] a new instance of UnchangedDocumentDiagnosticReport - # - # source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#9 - def initialize(kind:, result_id:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#38 - def attributes; end - - # A document diagnostic report indicating - # no changes to the last result. A server can - # only return `unchanged` if result ids are - # provided. - # - # @return [any] - # - # source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#25 - def kind; end - - # A result id which will be sent on the next - # diagnostic request for the same document. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#34 - def result_id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#40 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#44 - def to_json(*args); end -end - -# General parameters to unregister a capability. -# -# source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#7 -class LanguageServer::Protocol::Interface::Unregistration - # @return [Unregistration] a new instance of Unregistration - # - # source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#8 - def initialize(id:, method:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#34 - def attributes; end - - # The id used to unregister the request or notification. Usually an id - # provided during the register request. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#22 - def id; end - - # The method / capability to unregister for. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#30 - def method; end - - # source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#36 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#40 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/unregistration_params.rb#4 -class LanguageServer::Protocol::Interface::UnregistrationParams - # @return [UnregistrationParams] a new instance of UnregistrationParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/unregistration_params.rb#5 - def initialize(unregisterations:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/unregistration_params.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/unregistration_params.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/unregistration_params.rb#24 - def to_json(*args); end - - # @return [Unregistration[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/unregistration_params.rb#14 - def unregisterations; end -end - -# A versioned notebook document identifier. -# -# source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#7 -class LanguageServer::Protocol::Interface::VersionedNotebookDocumentIdentifier - # @return [VersionedNotebookDocumentIdentifier] a new instance of VersionedNotebookDocumentIdentifier - # - # source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#8 - def initialize(version:, uri:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#33 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#35 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#39 - def to_json(*args); end - - # The notebook document's URI. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#29 - def uri; end - - # The version number of this notebook document. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#21 - def version; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#4 -class LanguageServer::Protocol::Interface::VersionedTextDocumentIdentifier - # @return [VersionedTextDocumentIdentifier] a new instance of VersionedTextDocumentIdentifier - # - # source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#5 - def initialize(uri:, version:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#33 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#35 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#39 - def to_json(*args); end - - # The text document's URI. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#18 - def uri; end - - # The version number of this document. - # - # The version number of a document will increase after each change, - # including undo/redo. The number doesn't need to be consecutive. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#29 - def version; end -end - -# The parameters send in a will save text document notification. -# -# source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#7 -class LanguageServer::Protocol::Interface::WillSaveTextDocumentParams - # @return [WillSaveTextDocumentParams] a new instance of WillSaveTextDocumentParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#8 - def initialize(text_document:, reason:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#33 - def attributes; end - - # The 'TextDocumentSaveReason'. - # - # @return [TextDocumentSaveReason] - # - # source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#29 - def reason; end - - # The document that will be saved. - # - # @return [TextDocumentIdentifier] - # - # source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#21 - def text_document; end - - # source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#35 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#39 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#4 -class LanguageServer::Protocol::Interface::WorkDoneProgressBegin - # @return [WorkDoneProgressBegin] a new instance of WorkDoneProgressBegin - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#5 - def initialize(kind:, title:, cancellable: T.unsafe(nil), message: T.unsafe(nil), percentage: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#68 - def attributes; end - - # Controls if a cancel button should show to allow the user to cancel the - # long running operation. Clients that don't support cancellation are - # allowed to ignore the setting. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#39 - def cancellable; end - - # @return ["begin"] - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#18 - def kind; end - - # Optional, more detailed associated progress message. Contains - # complementary information to the `title`. - # - # Examples: "3/25 files", "project/src/module2", "node_modules/some_dep". - # If unset, the previous progress message (if any) is still valid. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#51 - def message; end - - # Optional progress percentage to display (value 100 is considered 100%). - # If not provided infinite progress is assumed and clients are allowed - # to ignore the `percentage` value in subsequent in report notifications. - # - # The value should be steadily rising. Clients are free to ignore values - # that are not following this rule. The value range is [0, 100] - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#64 - def percentage; end - - # Mandatory title of the progress operation. Used to briefly inform about - # the kind of operation being performed. - # - # Examples: "Indexing" or "Linking dependencies". - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#29 - def title; end - - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#70 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#74 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_cancel_params.rb#4 -class LanguageServer::Protocol::Interface::WorkDoneProgressCancelParams - # @return [WorkDoneProgressCancelParams] a new instance of WorkDoneProgressCancelParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_cancel_params.rb#5 - def initialize(token:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_cancel_params.rb#21 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_cancel_params.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_cancel_params.rb#27 - def to_json(*args); end - - # The token to be used to report progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_cancel_params.rb#17 - def token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_create_params.rb#4 -class LanguageServer::Protocol::Interface::WorkDoneProgressCreateParams - # @return [WorkDoneProgressCreateParams] a new instance of WorkDoneProgressCreateParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_create_params.rb#5 - def initialize(token:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_create_params.rb#21 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_create_params.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_create_params.rb#27 - def to_json(*args); end - - # The token to be used to report progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_create_params.rb#17 - def token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#4 -class LanguageServer::Protocol::Interface::WorkDoneProgressEnd - # @return [WorkDoneProgressEnd] a new instance of WorkDoneProgressEnd - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#5 - def initialize(kind:, message: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#28 - def attributes; end - - # @return ["end"] - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#15 - def kind; end - - # Optional, a final message indicating to for example indicate the outcome - # of the operation. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#24 - def message; end - - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#30 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#34 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_options.rb#4 -class LanguageServer::Protocol::Interface::WorkDoneProgressOptions - # @return [WorkDoneProgressOptions] a new instance of WorkDoneProgressOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_options.rb#18 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_options.rb#20 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_options.rb#24 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_options.rb#14 - def work_done_progress; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_params.rb#4 -class LanguageServer::Protocol::Interface::WorkDoneProgressParams - # @return [WorkDoneProgressParams] a new instance of WorkDoneProgressParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_params.rb#5 - def initialize(work_done_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_params.rb#21 - def attributes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_params.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_params.rb#27 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_params.rb#17 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#4 -class LanguageServer::Protocol::Interface::WorkDoneProgressReport - # @return [WorkDoneProgressReport] a new instance of WorkDoneProgressReport - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#5 - def initialize(kind:, cancellable: T.unsafe(nil), message: T.unsafe(nil), percentage: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#58 - def attributes; end - - # Controls enablement state of a cancel button. This property is only valid - # if a cancel button got requested in the `WorkDoneProgressBegin` payload. - # - # Clients that don't support cancellation or don't support control the - # button's enablement state are allowed to ignore the setting. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#29 - def cancellable; end - - # @return ["report"] - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#17 - def kind; end - - # Optional, more detailed associated progress message. Contains - # complementary information to the `title`. - # - # Examples: "3/25 files", "project/src/module2", "node_modules/some_dep". - # If unset, the previous progress message (if any) is still valid. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#41 - def message; end - - # Optional progress percentage to display (value 100 is considered 100%). - # If not provided infinite progress is assumed and clients are allowed - # to ignore the `percentage` value in subsequent in report notifications. - # - # The value should be steadily rising. Clients are free to ignore values - # that are not following this rule. The value range is [0, 100] - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#54 - def percentage; end - - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#60 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#64 - def to_json(*args); end -end - -# Parameters of the workspace diagnostic request. -# -# source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#7 -class LanguageServer::Protocol::Interface::WorkspaceDiagnosticParams - # @return [WorkspaceDiagnosticParams] a new instance of WorkspaceDiagnosticParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#8 - def initialize(previous_result_ids:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil), identifier: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#53 - def attributes; end - - # The additional identifier provided during registration. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#40 - def identifier; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#32 - def partial_result_token; end - - # The currently known diagnostic reports with their - # previous result ids. - # - # @return [PreviousResultId[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#49 - def previous_result_ids; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#55 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#59 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#23 - def work_done_token; end -end - -# A workspace diagnostic report. -# -# source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report.rb#7 -class LanguageServer::Protocol::Interface::WorkspaceDiagnosticReport - # @return [WorkspaceDiagnosticReport] a new instance of WorkspaceDiagnosticReport - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report.rb#8 - def initialize(items:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report.rb#21 - def attributes; end - - # @return [WorkspaceDocumentDiagnosticReport[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report.rb#17 - def items; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report.rb#27 - def to_json(*args); end -end - -# A partial result for a workspace diagnostic report. -# -# source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report_partial_result.rb#7 -class LanguageServer::Protocol::Interface::WorkspaceDiagnosticReportPartialResult - # @return [WorkspaceDiagnosticReportPartialResult] a new instance of WorkspaceDiagnosticReportPartialResult - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report_partial_result.rb#8 - def initialize(items:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report_partial_result.rb#21 - def attributes; end - - # @return [WorkspaceDocumentDiagnosticReport[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report_partial_result.rb#17 - def items; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report_partial_result.rb#23 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report_partial_result.rb#27 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#4 -class LanguageServer::Protocol::Interface::WorkspaceEdit - # @return [WorkspaceEdit] a new instance of WorkspaceEdit - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#5 - def initialize(changes: T.unsafe(nil), document_changes: T.unsafe(nil), change_annotations: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#56 - def attributes; end - - # A map of change annotations that can be referenced in - # `AnnotatedTextEdit`s or create, rename and delete file / folder - # operations. - # - # Whether clients honor this property depends on the client capability - # `workspace.changeAnnotationSupport`. - # - # @return [{ [id: string]: ChangeAnnotation; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#52 - def change_annotations; end - - # Holds changes to existing resources. - # - # @return [{}] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#19 - def changes; end - - # Depending on the client capability - # `workspace.workspaceEdit.resourceOperations` document changes are either - # an array of `TextDocumentEdit`s to express changes to n different text - # documents where each text document edit addresses a specific version of - # a text document. Or it can contain above `TextDocumentEdit`s mixed with - # create, rename and delete file / folder operations. - # - # Whether a client supports versioned document edits is expressed via - # `workspace.workspaceEdit.documentChanges` client capability. - # - # If a client neither supports `documentChanges` nor - # `workspace.workspaceEdit.resourceOperations` then only plain `TextEdit`s - # using the `changes` property are supported. - # - # @return [TextDocumentEdit[] | (TextDocumentEdit | CreateFile | RenameFile | DeleteFile)[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#39 - def document_changes; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#58 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#62 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::WorkspaceEditClientCapabilities - # @return [WorkspaceEditClientCapabilities] a new instance of WorkspaceEditClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#5 - def initialize(document_changes: T.unsafe(nil), resource_operations: T.unsafe(nil), failure_handling: T.unsafe(nil), normalizes_line_endings: T.unsafe(nil), change_annotation_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#63 - def attributes; end - - # Whether the client in general supports change annotations on text edits, - # create file, rename file and delete file changes. - # - # @return [{ groupsOnLabel?: boolean; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#59 - def change_annotation_support; end - - # The client supports versioned document changes in `WorkspaceEdit`s - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#21 - def document_changes; end - - # The failure handling strategy of a client if applying the workspace edit - # fails. - # - # @return [FailureHandlingKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#39 - def failure_handling; end - - # Whether the client normalizes line endings to the client specific - # setting. - # If set to `true` the client will normalize line ending characters - # in a workspace edit to the client specific new line character(s). - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#50 - def normalizes_line_endings; end - - # The resource operations the client supports. Clients should at least - # support 'create', 'rename' and 'delete' files and folders. - # - # @return [ResourceOperationKind[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#30 - def resource_operations; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#65 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#69 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#4 -class LanguageServer::Protocol::Interface::WorkspaceFolder - # @return [WorkspaceFolder] a new instance of WorkspaceFolder - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#5 - def initialize(uri:, name:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#31 - def attributes; end - - # The name of the workspace folder. Used to refer to this - # workspace folder in the user interface. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#27 - def name; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#33 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#37 - def to_json(*args); end - - # The associated URI for this workspace folder. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#18 - def uri; end -end - -# The workspace folder change event. -# -# source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#7 -class LanguageServer::Protocol::Interface::WorkspaceFoldersChangeEvent - # @return [WorkspaceFoldersChangeEvent] a new instance of WorkspaceFoldersChangeEvent - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#8 - def initialize(added:, removed:); end - - # The array of added workspace folders - # - # @return [WorkspaceFolder[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#21 - def added; end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#33 - def attributes; end - - # The array of the removed workspace folders - # - # @return [WorkspaceFolder[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#29 - def removed; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#35 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#39 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#4 -class LanguageServer::Protocol::Interface::WorkspaceFoldersServerCapabilities - # @return [WorkspaceFoldersServerCapabilities] a new instance of WorkspaceFoldersServerCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#5 - def initialize(supported: T.unsafe(nil), change_notifications: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#36 - def attributes; end - - # Whether the server wants to receive workspace folder - # change notifications. - # - # If a string is provided, the string is treated as an ID - # under which the notification is registered on the client - # side. The ID can be used to unregister for these events - # using the `client/unregisterCapability` request. - # - # @return [string | boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#32 - def change_notifications; end - - # The server has support for workspace folders - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#18 - def supported; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#38 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#42 - def to_json(*args); end -end - -# A full document diagnostic report for a workspace diagnostic result. -# -# source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#7 -class LanguageServer::Protocol::Interface::WorkspaceFullDocumentDiagnosticReport - # @return [WorkspaceFullDocumentDiagnosticReport] a new instance of WorkspaceFullDocumentDiagnosticReport - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#8 - def initialize(kind:, items:, uri:, version:, result_id: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#63 - def attributes; end - - # The actual items. - # - # @return [Diagnostic[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#42 - def items; end - - # A full document diagnostic report. - # - # @return [any] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#24 - def kind; end - - # An optional result id. If provided it will - # be sent on the next diagnostic request for the - # same document. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#34 - def result_id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#65 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#69 - def to_json(*args); end - - # The URI for which diagnostic information is reported. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#50 - def uri; end - - # The version number for which the diagnostics are reported. - # If the document is not marked as open `null` can be provided. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#59 - def version; end -end - -# A special workspace symbol that supports locations without a range -# -# source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#7 -class LanguageServer::Protocol::Interface::WorkspaceSymbol - # @return [WorkspaceSymbol] a new instance of WorkspaceSymbol - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#8 - def initialize(name:, kind:, location:, tags: T.unsafe(nil), container_name: T.unsafe(nil), data: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#77 - def attributes; end - - # The name of the symbol containing this symbol. This information is for - # user interface purposes (e.g. to render a qualifier in the user interface - # if necessary). It can't be used to re-infer a hierarchy for the document - # symbols. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#52 - def container_name; end - - # A data entry field that is preserved on a workspace symbol between a - # workspace symbol request and a workspace symbol resolve request. - # - # @return [LSPAny] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#73 - def data; end - - # The kind of this symbol. - # - # @return [SymbolKind] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#33 - def kind; end - - # The location of this symbol. Whether a server is allowed to - # return a location without a range depends on the client - # capability `workspace.symbol.resolveSupport`. - # - # See also `SymbolInformation.location`. - # - # @return [Location | { uri: string; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#64 - def location; end - - # The name of this symbol. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#25 - def name; end - - # Tags for this completion item. - # - # @return [1[]] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#41 - def tags; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#79 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#83 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#4 -class LanguageServer::Protocol::Interface::WorkspaceSymbolClientCapabilities - # @return [WorkspaceSymbolClientCapabilities] a new instance of WorkspaceSymbolClientCapabilities - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#5 - def initialize(dynamic_registration: T.unsafe(nil), symbol_kind: T.unsafe(nil), tag_support: T.unsafe(nil), resolve_support: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#52 - def attributes; end - - # Symbol request supports dynamic registration. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#20 - def dynamic_registration; end - - # The client support partial workspace symbols. The client will send the - # request `workspaceSymbol/resolve` to the server to resolve additional - # properties. - # - # @return [{ properties: string[]; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#48 - def resolve_support; end - - # Specific capabilities for the `SymbolKind` in the `workspace/symbol` - # request. - # - # @return [{ valueSet?: SymbolKind[]; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#29 - def symbol_kind; end - - # The client supports tags on `SymbolInformation` and `WorkspaceSymbol`. - # Clients supporting tags have to handle unknown tags gracefully. - # - # @return [{ valueSet: 1[]; }] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#38 - def tag_support; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#54 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#58 - def to_json(*args); end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#4 -class LanguageServer::Protocol::Interface::WorkspaceSymbolOptions - # @return [WorkspaceSymbolOptions] a new instance of WorkspaceSymbolOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#28 - def attributes; end - - # The server provides support to resolve additional - # information for a workspace symbol. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#24 - def resolve_provider; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#30 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#34 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#15 - def work_done_progress; end -end - -# The parameters of a Workspace Symbol Request. -# -# source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#7 -class LanguageServer::Protocol::Interface::WorkspaceSymbolParams - # @return [WorkspaceSymbolParams] a new instance of WorkspaceSymbolParams - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#8 - def initialize(query:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#44 - def attributes; end - - # An optional token that a server can use to report partial results (e.g. - # streaming) to the client. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#31 - def partial_result_token; end - - # A query string to filter symbols by. Clients may send an empty - # string here to request all symbols. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#40 - def query; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#46 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#50 - def to_json(*args); end - - # An optional token that a server can use to report work done progress. - # - # @return [ProgressToken] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#22 - def work_done_token; end -end - -# source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#4 -class LanguageServer::Protocol::Interface::WorkspaceSymbolRegistrationOptions - # @return [WorkspaceSymbolRegistrationOptions] a new instance of WorkspaceSymbolRegistrationOptions - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#5 - def initialize(work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#28 - def attributes; end - - # The server provides support to resolve additional - # information for a workspace symbol. - # - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#24 - def resolve_provider; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#30 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#34 - def to_json(*args); end - - # @return [boolean] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#15 - def work_done_progress; end -end - -# An unchanged document diagnostic report for a workspace diagnostic result. -# -# source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#7 -class LanguageServer::Protocol::Interface::WorkspaceUnchangedDocumentDiagnosticReport - # @return [WorkspaceUnchangedDocumentDiagnosticReport] a new instance of WorkspaceUnchangedDocumentDiagnosticReport - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#8 - def initialize(kind:, result_id:, uri:, version:); end - - # Returns the value of attribute attributes. - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#56 - def attributes; end - - # A document diagnostic report indicating - # no changes to the last result. A server can - # only return `unchanged` if result ids are - # provided. - # - # @return [any] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#26 - def kind; end - - # A result id which will be sent on the next - # diagnostic request for the same document. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#35 - def result_id; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#58 - def to_hash; end - - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#62 - def to_json(*args); end - - # The URI for which diagnostic information is reported. - # - # @return [string] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#43 - def uri; end - - # The version number for which the diagnostics are reported. - # If the document is not marked as open `null` can be provided. - # - # @return [number] - # - # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#52 - def version; end -end - -# source://language_server-protocol//lib/language_server/protocol/transport/io/reader.rb#7 -module LanguageServer::Protocol::Transport; end - -# source://language_server-protocol//lib/language_server/protocol/transport/io/reader.rb#8 -module LanguageServer::Protocol::Transport::Io; end - -# source://language_server-protocol//lib/language_server/protocol/transport/io/reader.rb#9 -class LanguageServer::Protocol::Transport::Io::Reader - # @return [Reader] a new instance of Reader - # - # source://language_server-protocol//lib/language_server/protocol/transport/io/reader.rb#10 - def initialize(io); end - - # source://language_server-protocol//lib/language_server/protocol/transport/io/reader.rb#15 - def read(&block); end - - private - - # Returns the value of attribute io. - # - # source://language_server-protocol//lib/language_server/protocol/transport/io/reader.rb#26 - def io; end -end - -# source://language_server-protocol//lib/language_server/protocol/transport/io/writer.rb#5 -class LanguageServer::Protocol::Transport::Io::Writer - # @return [Writer] a new instance of Writer - # - # source://language_server-protocol//lib/language_server/protocol/transport/io/writer.rb#8 - def initialize(io); end - - # Returns the value of attribute io. - # - # source://language_server-protocol//lib/language_server/protocol/transport/io/writer.rb#6 - def io; end - - # source://language_server-protocol//lib/language_server/protocol/transport/io/writer.rb#13 - def write(response); end -end - -# source://language_server-protocol//lib/language_server/protocol/transport/stdio/reader.rb#4 -module LanguageServer::Protocol::Transport::Stdio; end - -# source://language_server-protocol//lib/language_server/protocol/transport/stdio/reader.rb#5 -class LanguageServer::Protocol::Transport::Stdio::Reader < ::LanguageServer::Protocol::Transport::Io::Reader - # @return [Reader] a new instance of Reader - # - # source://language_server-protocol//lib/language_server/protocol/transport/stdio/reader.rb#6 - def initialize; end -end - -# source://language_server-protocol//lib/language_server/protocol/transport/stdio/writer.rb#5 -class LanguageServer::Protocol::Transport::Stdio::Writer < ::LanguageServer::Protocol::Transport::Io::Writer - # @return [Writer] a new instance of Writer - # - # source://language_server-protocol//lib/language_server/protocol/transport/stdio/writer.rb#6 - def initialize; end -end - -# source://language_server-protocol//lib/language_server/protocol/version.rb#3 -LanguageServer::Protocol::VERSION = T.let(T.unsafe(nil), String) +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/logger@1.6.0.rbi b/sorbet/rbi/gems/logger@1.6.1.rbi similarity index 94% rename from sorbet/rbi/gems/logger@1.6.0.rbi rename to sorbet/rbi/gems/logger@1.6.1.rbi index 0723d96..4e9ceac 100644 --- a/sorbet/rbi/gems/logger@1.6.0.rbi +++ b/sorbet/rbi/gems/logger@1.6.1.rbi @@ -400,11 +400,14 @@ class Logger # - +shift_period_suffix+: sets the format for the filename suffix # for periodic log file rotation; default is '%Y%m%d'. # See {Periodic Rotation}[rdoc-ref:Logger@Periodic+Rotation]. + # - +reraise_write_errors+: An array of exception classes, which will + # be reraised if there is an error when writing to the log device. + # The default is to swallow all exceptions raised. # # @return [Logger] a new instance of Logger # - # source://logger//lib/logger.rb#578 - def initialize(logdev, shift_age = T.unsafe(nil), shift_size = T.unsafe(nil), level: T.unsafe(nil), progname: T.unsafe(nil), formatter: T.unsafe(nil), datetime_format: T.unsafe(nil), binmode: T.unsafe(nil), shift_period_suffix: T.unsafe(nil)); end + # source://logger//lib/logger.rb#581 + def initialize(logdev, shift_age = T.unsafe(nil), shift_size = T.unsafe(nil), level: T.unsafe(nil), progname: T.unsafe(nil), formatter: T.unsafe(nil), datetime_format: T.unsafe(nil), binmode: T.unsafe(nil), shift_period_suffix: T.unsafe(nil), reraise_write_errors: T.unsafe(nil)); end # Writes the given +msg+ to the log with no formatting; # returns the number of characters written, @@ -417,7 +420,7 @@ class Logger # # My message. # - # source://logger//lib/logger.rb#684 + # source://logger//lib/logger.rb#689 def <<(msg); end # Creates a log entry, which may or may not be written to the log, @@ -447,7 +450,7 @@ class Logger # - #fatal. # - #unknown. # - # source://logger//lib/logger.rb#651 + # source://logger//lib/logger.rb#656 def add(severity, message = T.unsafe(nil), progname = T.unsafe(nil)); end # Closes the logger; returns +nil+: @@ -458,7 +461,7 @@ class Logger # # Related: Logger#reopen. # - # source://logger//lib/logger.rb#731 + # source://logger//lib/logger.rb#736 def close; end # Returns the date-time format; see #datetime_format=. @@ -479,7 +482,7 @@ class Logger # Equivalent to calling #add with severity Logger::DEBUG. # - # source://logger//lib/logger.rb#690 + # source://logger//lib/logger.rb#695 def debug(progname = T.unsafe(nil), &block); end # Sets the log level to Logger::DEBUG. @@ -499,7 +502,7 @@ class Logger # Equivalent to calling #add with severity Logger::ERROR. # - # source://logger//lib/logger.rb#708 + # source://logger//lib/logger.rb#713 def error(progname = T.unsafe(nil), &block); end # Sets the log level to Logger::ERROR. @@ -519,7 +522,7 @@ class Logger # Equivalent to calling #add with severity Logger::FATAL. # - # source://logger//lib/logger.rb#714 + # source://logger//lib/logger.rb#719 def fatal(progname = T.unsafe(nil), &block); end # Sets the log level to Logger::FATAL. @@ -607,7 +610,7 @@ class Logger # Equivalent to calling #add with severity Logger::INFO. # - # source://logger//lib/logger.rb#696 + # source://logger//lib/logger.rb#701 def info(progname = T.unsafe(nil), &block); end # Sets the log level to Logger::INFO. @@ -672,7 +675,7 @@ class Logger # - #fatal. # - #unknown. # - # source://logger//lib/logger.rb#651 + # source://logger//lib/logger.rb#656 def log(severity, message = T.unsafe(nil), progname = T.unsafe(nil)); end # Program name to include in log messages. @@ -708,7 +711,7 @@ class Logger # # "E, [2022-05-12T14:21:27.596726 #22428] ERROR -- : one\n", # # "E, [2022-05-12T14:23:05.847241 #22428] ERROR -- : three\n"] # - # source://logger//lib/logger.rb#619 + # source://logger//lib/logger.rb#624 def reopen(logdev = T.unsafe(nil)); end # Logging severity threshold (e.g. Logger::INFO). @@ -733,12 +736,12 @@ class Logger # Equivalent to calling #add with severity Logger::UNKNOWN. # - # source://logger//lib/logger.rb#720 + # source://logger//lib/logger.rb#725 def unknown(progname = T.unsafe(nil), &block); end # Equivalent to calling #add with severity Logger::WARN. # - # source://logger//lib/logger.rb#702 + # source://logger//lib/logger.rb#707 def warn(progname = T.unsafe(nil), &block); end # Sets the log level to Logger::WARN. @@ -767,11 +770,16 @@ class Logger private - # source://logger//lib/logger.rb#744 + # source://logger//lib/logger.rb#754 def format_message(severity, datetime, progname, msg); end - # source://logger//lib/logger.rb#740 + # source://logger//lib/logger.rb#745 def format_severity(severity); end + + # Guarantee the existence of this ivar even when subclasses don't call the superclass constructor. + # + # source://logger//lib/logger.rb#750 + def level_override; end end # Default formatter for log messages. @@ -823,9 +831,9 @@ class Logger::LogDevice # @return [LogDevice] a new instance of LogDevice # # source://logger//lib/logger/log_device.rb#14 - def initialize(log = T.unsafe(nil), shift_age: T.unsafe(nil), shift_size: T.unsafe(nil), shift_period_suffix: T.unsafe(nil), binmode: T.unsafe(nil)); end + def initialize(log = T.unsafe(nil), shift_age: T.unsafe(nil), shift_size: T.unsafe(nil), shift_period_suffix: T.unsafe(nil), binmode: T.unsafe(nil), reraise_write_errors: T.unsafe(nil)); end - # source://logger//lib/logger/log_device.rb#52 + # source://logger//lib/logger/log_device.rb#59 def close; end # Returns the value of attribute dev. @@ -838,36 +846,36 @@ class Logger::LogDevice # source://logger//lib/logger/log_device.rb#11 def filename; end - # source://logger//lib/logger/log_device.rb#62 + # source://logger//lib/logger/log_device.rb#69 def reopen(log = T.unsafe(nil)); end - # source://logger//lib/logger/log_device.rb#31 + # source://logger//lib/logger/log_device.rb#32 def write(message); end private - # source://logger//lib/logger/log_device.rb#119 + # source://logger//lib/logger/log_device.rb#126 def add_log_header(file); end - # source://logger//lib/logger/log_device.rb#125 + # source://logger//lib/logger/log_device.rb#132 def check_shift_log; end - # source://logger//lib/logger/log_device.rb#103 + # source://logger//lib/logger/log_device.rb#110 def create_logfile(filename); end - # source://logger//lib/logger/log_device.rb#145 + # source://logger//lib/logger/log_device.rb#152 def lock_shift_log; end - # source://logger//lib/logger/log_device.rb#95 + # source://logger//lib/logger/log_device.rb#102 def open_logfile(filename); end - # source://logger//lib/logger/log_device.rb#79 + # source://logger//lib/logger/log_device.rb#86 def set_dev(log); end - # source://logger//lib/logger/log_device.rb#176 + # source://logger//lib/logger/log_device.rb#183 def shift_log_age; end - # source://logger//lib/logger/log_device.rb#188 + # source://logger//lib/logger/log_device.rb#195 def shift_log_period(period_end); end end @@ -895,7 +903,7 @@ Logger::Period::SiD = T.let(T.unsafe(nil), Integer) # \Severity label for logging (max 5 chars). # -# source://logger//lib/logger.rb#738 +# source://logger//lib/logger.rb#743 Logger::SEV_LABEL = T.let(T.unsafe(nil), Array) # Logging severity. diff --git a/sorbet/rbi/gems/mustermann-grape@1.1.0.rbi b/sorbet/rbi/gems/mustermann-grape@1.1.0.rbi index 2df1890..0d0defc 100644 --- a/sorbet/rbi/gems/mustermann-grape@1.1.0.rbi +++ b/sorbet/rbi/gems/mustermann-grape@1.1.0.rbi @@ -8,22 +8,22 @@ # source://mustermann-grape//lib/mustermann/grape.rb#6 module Mustermann class << self - # source://mustermann/3.0.2/lib/mustermann.rb#89 + # source://mustermann/3.0.3/lib/mustermann.rb#89 def [](name); end - # source://mustermann/3.0.2/lib/mustermann.rb#120 + # source://mustermann/3.0.3/lib/mustermann.rb#120 def extend_object(object); end - # source://mustermann/3.0.2/lib/mustermann.rb#62 + # source://mustermann/3.0.3/lib/mustermann.rb#62 def new(*input, type: T.unsafe(nil), operator: T.unsafe(nil), **options); end - # source://mustermann/3.0.2/lib/mustermann.rb#115 + # source://mustermann/3.0.3/lib/mustermann.rb#115 def normalized_type(type); end - # source://mustermann/3.0.2/lib/mustermann.rb#110 + # source://mustermann/3.0.3/lib/mustermann.rb#110 def register(name, type); end - # source://mustermann/3.0.2/lib/mustermann.rb#101 + # source://mustermann/3.0.3/lib/mustermann.rb#101 def try_require(path); end end end diff --git a/sorbet/rbi/gems/mustermann@3.0.2.rbi b/sorbet/rbi/gems/mustermann@3.0.3.rbi similarity index 97% rename from sorbet/rbi/gems/mustermann@3.0.2.rbi rename to sorbet/rbi/gems/mustermann@3.0.3.rbi index 65f14aa..1bbf12e 100644 --- a/sorbet/rbi/gems/mustermann@3.0.2.rbi +++ b/sorbet/rbi/gems/mustermann@3.0.3.rbi @@ -112,7 +112,7 @@ end # source://mustermann//lib/mustermann/ast/boundaries.rb#0 class Mustermann::AST::Boundaries::NodeTranslator < ::Mustermann::AST::Translator::NodeTranslator class << self - # source://mustermann//lib/mustermann/ast/translator.rb#59 + # source://mustermann//lib/mustermann/ast/translator.rb#62 def translator; end end end @@ -134,7 +134,7 @@ class Mustermann::AST::Compiler < ::Mustermann::AST::Translator # source://mustermann//lib/mustermann/ast/compiler.rb#126 def encoded(char, uri_decode: T.unsafe(nil), space_matches_plus: T.unsafe(nil), **options); end - # source://mustermann//lib/mustermann/ast/translator.rb#67 + # source://mustermann//lib/mustermann/ast/translator.rb#70 def error_class; end class << self @@ -190,7 +190,7 @@ end # source://mustermann//lib/mustermann/ast/compiler.rb#0 class Mustermann::AST::Compiler::NodeTranslator < ::Mustermann::AST::Translator::NodeTranslator class << self - # source://mustermann//lib/mustermann/ast/translator.rb#59 + # source://mustermann//lib/mustermann/ast/translator.rb#62 def translator; end end end @@ -239,7 +239,7 @@ class Mustermann::AST::Expander < ::Mustermann::AST::Translator # source://mustermann//lib/mustermann/ast/expander.rb#141 def add_to(list, result); end - # source://mustermann//lib/mustermann/ast/translator.rb#67 + # source://mustermann//lib/mustermann/ast/translator.rb#70 def error_class; end # helper method for raising an error for unexpandable values @@ -299,7 +299,7 @@ end # source://mustermann//lib/mustermann/ast/expander.rb#0 class Mustermann::AST::Expander::NodeTranslator < ::Mustermann::AST::Translator::NodeTranslator class << self - # source://mustermann//lib/mustermann/ast/translator.rb#59 + # source://mustermann//lib/mustermann/ast/translator.rb#62 def translator; end end end @@ -617,7 +617,7 @@ end # source://mustermann//lib/mustermann/ast/param_scanner.rb#0 class Mustermann::AST::ParamScanner::NodeTranslator < ::Mustermann::AST::Translator::NodeTranslator class << self - # source://mustermann//lib/mustermann/ast/translator.rb#59 + # source://mustermann//lib/mustermann/ast/translator.rb#62 def translator; end end end @@ -961,7 +961,7 @@ end # source://mustermann//lib/mustermann/ast/template_generator.rb#0 class Mustermann::AST::TemplateGenerator::NodeTranslator < ::Mustermann::AST::Translator::NodeTranslator class << self - # source://mustermann//lib/mustermann/ast/translator.rb#59 + # source://mustermann//lib/mustermann/ast/translator.rb#62 def translator; end end end @@ -1091,7 +1091,7 @@ end # source://mustermann//lib/mustermann/ast/transformer.rb#0 class Mustermann::AST::Transformer::NodeTranslator < ::Mustermann::AST::Translator::NodeTranslator class << self - # source://mustermann//lib/mustermann/ast/translator.rb#59 + # source://mustermann//lib/mustermann/ast/translator.rb#62 def translator; end end end @@ -1114,20 +1114,20 @@ class Mustermann::AST::Translator # @raise [error_class] # @return decorator encapsulating translation # - # source://mustermann//lib/mustermann/ast/translator.rb#105 + # source://mustermann//lib/mustermann/ast/translator.rb#108 def decorator_for(node); end - # source://mustermann//lib/mustermann/ast/translator.rb#67 + # source://mustermann//lib/mustermann/ast/translator.rb#70 def error_class; end # @return [String] escaped character # - # source://mustermann//lib/mustermann/ast/translator.rb#121 + # source://mustermann//lib/mustermann/ast/translator.rb#124 def escape(char, parser: T.unsafe(nil), escape: T.unsafe(nil), also_escape: T.unsafe(nil)); end # Start the translation dance for a (sub)tree. # - # source://mustermann//lib/mustermann/ast/translator.rb#113 + # source://mustermann//lib/mustermann/ast/translator.rb#116 def translate(node, *args, **_arg2, &block); end class << self @@ -1146,40 +1146,40 @@ class Mustermann::AST::Translator # ast = Mustermann.new('/:name').to_ast # translator.translate(ast) # => [:root, :separator, :capture] # - # source://mustermann//lib/mustermann/ast/translator.rb#95 + # source://mustermann//lib/mustermann/ast/translator.rb#98 def create(&block); end # maps types to translations # - # source://mustermann//lib/mustermann/ast/translator.rb#51 + # source://mustermann//lib/mustermann/ast/translator.rb#54 def dispatch_table; end # some magic sauce so {NodeTranslator}s know whom to talk to for {#register} # - # source://mustermann//lib/mustermann/ast/translator.rb#57 + # source://mustermann//lib/mustermann/ast/translator.rb#60 def inherited(subclass); end # DSL-ish method for specifying the exception class to use. # - # source://mustermann//lib/mustermann/ast/translator.rb#66 + # source://mustermann//lib/mustermann/ast/translator.rb#69 def raises(error); end # DSL method for defining single method translations. # - # source://mustermann//lib/mustermann/ast/translator.rb#72 + # source://mustermann//lib/mustermann/ast/translator.rb#75 def translate(*types, &block); end end end # Encapsulates a single node translation # -# source://mustermann//lib/mustermann/ast/translator.rb#16 +# source://mustermann//lib/mustermann/ast/translator.rb#19 class Mustermann::AST::Translator::NodeTranslator # @param node [Mustermann::AST::Node, Object] # @param translator [Mustermann::AST::Translator] # @return [NodeTranslator] a new instance of NodeTranslator # - # source://mustermann//lib/mustermann/ast/translator.rb#30 + # source://mustermann//lib/mustermann/ast/translator.rb#33 def initialize(node, translator); end # source://delegate/0.3.1/delegate.rb#402 @@ -1187,22 +1187,25 @@ class Mustermann::AST::Translator::NodeTranslator # shorthand for translating a nested object # - # source://mustermann//lib/mustermann/ast/translator.rb#40 + # source://mustermann//lib/mustermann/ast/translator.rb#43 def t(*args, **_arg1, &block); end # Returns the value of attribute translator. # - # source://mustermann//lib/mustermann/ast/translator.rb#36 + # source://mustermann//lib/mustermann/ast/translator.rb#39 def translator; end class << self # @param types [Array] list of types to register for. # - # source://mustermann//lib/mustermann/ast/translator.rb#19 + # source://mustermann//lib/mustermann/ast/translator.rb#22 def register(*types); end end end +# source://mustermann//lib/mustermann/ast/translator.rb#15 +Mustermann::AST::Translator::URI_PARSER = T.let(T.unsafe(nil), URI::RFC2396_Parser) + # Checks the AST for certain validations, like correct capture names. # # Internally a poor man's visitor (abusing translator to not have to implement a visitor). @@ -1234,7 +1237,7 @@ end # source://mustermann//lib/mustermann/ast/validation.rb#0 class Mustermann::AST::Validation::NodeTranslator < ::Mustermann::AST::Translator::NodeTranslator class << self - # source://mustermann//lib/mustermann/ast/translator.rb#59 + # source://mustermann//lib/mustermann/ast/translator.rb#62 def translator; end end end diff --git a/sorbet/rbi/gems/parser@3.3.4.2.rbi b/sorbet/rbi/gems/parser@3.3.5.0.rbi similarity index 100% rename from sorbet/rbi/gems/parser@3.3.4.2.rbi rename to sorbet/rbi/gems/parser@3.3.5.0.rbi diff --git a/sorbet/rbi/gems/prism@0.30.0.rbi b/sorbet/rbi/gems/prism@1.2.0.rbi similarity index 61% rename from sorbet/rbi/gems/prism@0.30.0.rbi rename to sorbet/rbi/gems/prism@1.2.0.rbi index 9aec9c3..c6c606d 100644 --- a/sorbet/rbi/gems/prism@0.30.0.rbi +++ b/sorbet/rbi/gems/prism@1.2.0.rbi @@ -7,6 +7,11 @@ # typed: strict +# =begin +# This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/rbi/prism/dsl.rbi.erb +# if you are looking to modify the template +# =end # =begin # This file is generated by the templates/template.rb script and should not be # modified manually. See templates/rbi/prism/node.rbi.erb @@ -132,28 +137,44 @@ 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. +# cannot be applied to sources that include multibyte characters. +# +# In the extremely rare case that a source includes multi-byte characters but +# is marked as binary because of a magic encoding comment and it cannot be +# eagerly converted to UTF-8, this class will be used as well. This is because +# at that point we will treat everything as single-byte characters. # -# source://prism//lib/prism/parse_result.rb#126 +# source://prism//lib/prism/parse_result.rb#236 class Prism::ASCIISource < ::Prism::Source # Return the column number in characters for the given byte offset. # - # source://prism//lib/prism/parse_result.rb#133 + # source://prism//lib/prism/parse_result.rb#243 sig { params(byte_offset: Integer).returns(Integer) } def character_column(byte_offset); end # Return the character offset for the given byte offset. # - # source://prism//lib/prism/parse_result.rb#128 + # source://prism//lib/prism/parse_result.rb#238 sig { params(byte_offset: Integer).returns(Integer) } def character_offset(byte_offset); end + # Returns a cache that is the identity function in order to maintain the + # same interface. We can do this because code units are always equivalent to + # byte offsets for ASCII-only sources. + # + # source://prism//lib/prism/parse_result.rb#260 + sig do + params( + encoding: Encoding + ).returns(T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer))) + end + def code_units_cache(encoding); end + # Specialized version of `code_units_column` that does not depend on # `code_units_offset`, which is a more expensive operation. This is - # essentialy the same as `Prism::Source#column`. + # essentially the same as `Prism::Source#column`. # - # source://prism//lib/prism/parse_result.rb#150 + # source://prism//lib/prism/parse_result.rb#267 sig { params(byte_offset: Integer, encoding: Encoding).returns(Integer) } def code_units_column(byte_offset, encoding); end @@ -164,7 +185,7 @@ class Prism::ASCIISource < ::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#143 + # source://prism//lib/prism/parse_result.rb#253 sig { params(byte_offset: Integer, encoding: Encoding).returns(Integer) } def code_units_offset(byte_offset, encoding); end end @@ -174,77 +195,81 @@ end # alias $foo $bar # ^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#176 +# source://prism//lib/prism/node.rb#227 class Prism::AliasGlobalVariableNode < ::Prism::Node - # def initialize: (Prism::node new_name, Prism::node old_name, Location keyword_loc, Location location) -> void + # Initialize a new AliasGlobalVariableNode node. # # @return [AliasGlobalVariableNode] a new instance of AliasGlobalVariableNode # - # source://prism//lib/prism/node.rb#178 + # source://prism//lib/prism/node.rb#229 sig do params( source: Prism::Source, - new_name: Prism::Node, - old_name: Prism::Node, - keyword_loc: Prism::Location, - location: Prism::Location + node_id: Integer, + location: Prism::Location, + flags: Integer, + new_name: T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode), + old_name: T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::SymbolNode, Prism::MissingNode), + keyword_loc: Prism::Location ).void end - def initialize(source, new_name, old_name, keyword_loc, location); end + def initialize(source, node_id, location, flags, new_name, old_name, keyword_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#281 + # source://prism//lib/prism/node.rb#316 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#187 + # source://prism//lib/prism/node.rb#240 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#192 + # source://prism//lib/prism/node.rb#245 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#202 + # source://prism//lib/prism/node.rb#255 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#197 + # source://prism//lib/prism/node.rb#250 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?new_name: GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode, ?old_name: GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | SymbolNode | MissingNode, ?keyword_loc: Location) -> AliasGlobalVariableNode # - # source://prism//lib/prism/node.rb#207 + # source://prism//lib/prism/node.rb#260 sig do params( - new_name: Prism::Node, - old_name: Prism::Node, - keyword_loc: Prism::Location, - location: Prism::Location + node_id: Integer, + location: Prism::Location, + flags: Integer, + new_name: T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode), + old_name: T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::SymbolNode, Prism::MissingNode), + keyword_loc: Prism::Location ).returns(Prism::AliasGlobalVariableNode) end - def copy(new_name: T.unsafe(nil), old_name: T.unsafe(nil), keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), new_name: T.unsafe(nil), old_name: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#192 + # source://prism//lib/prism/node.rb#245 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { new_name: Prism::node, old_name: Prism::node, keyword_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, new_name: GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode, old_name: GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | SymbolNode | MissingNode, keyword_loc: Location } # - # source://prism//lib/prism/node.rb#215 + # source://prism//lib/prism/node.rb#268 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -253,13 +278,13 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#247 + # source://prism//lib/prism/node.rb#300 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#242 + # source://prism//lib/prism/node.rb#295 sig { returns(String) } def keyword; end @@ -268,56 +293,40 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # alias $foo $bar # ^^^^^ # - # source://prism//lib/prism/node.rb#235 + # source://prism//lib/prism/node.rb#288 sig { returns(Prism::Location) } def keyword_loc; end - # Represents the new name of the global variable that can be used after aliasing. This can be either a global variable, a back reference, or a numbered reference. + # Represents the new name of the global variable that can be used after aliasing. # # alias $foo $bar # ^^^^ # - # source://prism//lib/prism/node.rb#223 - sig { returns(Prism::Node) } + # source://prism//lib/prism/node.rb#276 + sig { returns(T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)) } def new_name; end - # Represents the old name of the global variable that could be used before aliasing. This can be either a global variable, a back reference, or a numbered reference. + # Represents the old name of the global variable that can be used before aliasing. # # alias $foo $bar # ^^^^ # - # source://prism//lib/prism/node.rb#229 - sig { returns(Prism::Node) } + # source://prism//lib/prism/node.rb#282 + sig do + returns(T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::SymbolNode, Prism::MissingNode)) + end def old_name; end - # 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. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#265 + # source://prism//lib/prism/node.rb#305 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#275 + # source://prism//lib/prism/node.rb#310 def type; end end end @@ -327,77 +336,81 @@ end # alias foo bar # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#293 +# source://prism//lib/prism/node.rb#328 class Prism::AliasMethodNode < ::Prism::Node - # def initialize: (Prism::node new_name, Prism::node old_name, Location keyword_loc, Location location) -> void + # Initialize a new AliasMethodNode node. # # @return [AliasMethodNode] a new instance of AliasMethodNode # - # source://prism//lib/prism/node.rb#295 + # source://prism//lib/prism/node.rb#330 sig do params( source: Prism::Source, - new_name: Prism::Node, - old_name: Prism::Node, - keyword_loc: Prism::Location, - location: Prism::Location + node_id: Integer, + location: Prism::Location, + flags: Integer, + new_name: T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode), + old_name: T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode, Prism::GlobalVariableReadNode, Prism::MissingNode), + keyword_loc: Prism::Location ).void end - def initialize(source, new_name, old_name, keyword_loc, location); end + def initialize(source, node_id, location, flags, new_name, old_name, keyword_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#389 + # source://prism//lib/prism/node.rb#426 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#304 + # source://prism//lib/prism/node.rb#341 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#309 + # source://prism//lib/prism/node.rb#346 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#319 + # source://prism//lib/prism/node.rb#356 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#314 + # source://prism//lib/prism/node.rb#351 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?new_name: SymbolNode | InterpolatedSymbolNode, ?old_name: SymbolNode | InterpolatedSymbolNode | GlobalVariableReadNode | MissingNode, ?keyword_loc: Location) -> AliasMethodNode # - # source://prism//lib/prism/node.rb#324 + # source://prism//lib/prism/node.rb#361 sig do params( - new_name: Prism::Node, - old_name: Prism::Node, - keyword_loc: Prism::Location, - location: Prism::Location + node_id: Integer, + location: Prism::Location, + flags: Integer, + new_name: T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode), + old_name: T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode, Prism::GlobalVariableReadNode, Prism::MissingNode), + keyword_loc: Prism::Location ).returns(Prism::AliasMethodNode) end - def copy(new_name: T.unsafe(nil), old_name: T.unsafe(nil), keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), new_name: T.unsafe(nil), old_name: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#309 + # source://prism//lib/prism/node.rb#346 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { new_name: Prism::node, old_name: Prism::node, keyword_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, new_name: SymbolNode | InterpolatedSymbolNode, old_name: SymbolNode | InterpolatedSymbolNode | GlobalVariableReadNode | MissingNode, keyword_loc: Location } # - # source://prism//lib/prism/node.rb#332 + # source://prism//lib/prism/node.rb#369 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -406,62 +419,64 @@ class Prism::AliasMethodNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#355 + # source://prism//lib/prism/node.rb#410 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#350 + # source://prism//lib/prism/node.rb#405 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#343 + # source://prism//lib/prism/node.rb#398 sig { returns(Prism::Location) } def keyword_loc; end - # attr_reader new_name: Prism::node + # Represents the new name of the method that will be aliased. # - # source://prism//lib/prism/node.rb#337 - sig { returns(Prism::Node) } + # alias foo bar + # ^^^ + # + # alias :foo :bar + # ^^^^ + # + # alias :"#{foo}" :"#{bar}" + # ^^^^^^^^^ + # + # source://prism//lib/prism/node.rb#383 + sig { returns(T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)) } def new_name; end - # attr_reader old_name: Prism::node + # Represents the old name of the method that will be aliased. # - # source://prism//lib/prism/node.rb#340 - sig { returns(Prism::Node) } - def old_name; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # alias foo bar + # ^^^ # - # 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. + # alias :foo :bar + # ^^^^ # - # def type: () -> Symbol + # alias :"#{foo}" :"#{bar}" + # ^^^^^^^^^ # - # source://prism//lib/prism/node.rb#373 + # source://prism//lib/prism/node.rb#395 + sig do + returns(T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode, Prism::GlobalVariableReadNode, Prism::MissingNode)) + end + def old_name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#415 sig { override.returns(Symbol) } def type; end class << self - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#383 + # source://prism//lib/prism/node.rb#420 def type; end end end @@ -471,77 +486,81 @@ end # foo => bar | baz # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#401 +# source://prism//lib/prism/node.rb#438 class Prism::AlternationPatternNode < ::Prism::Node - # def initialize: (Prism::node left, Prism::node right, Location operator_loc, Location location) -> void + # Initialize a new AlternationPatternNode node. # # @return [AlternationPatternNode] a new instance of AlternationPatternNode # - # source://prism//lib/prism/node.rb#403 + # source://prism//lib/prism/node.rb#440 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, left: Prism::Node, right: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).void end - def initialize(source, left, right, operator_loc, location); end + def initialize(source, node_id, location, flags, left, right, operator_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#497 + # source://prism//lib/prism/node.rb#527 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#412 + # source://prism//lib/prism/node.rb#451 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#417 + # source://prism//lib/prism/node.rb#456 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#427 + # source://prism//lib/prism/node.rb#466 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#422 + # source://prism//lib/prism/node.rb#461 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node, ?right: Prism::node, ?operator_loc: Location) -> AlternationPatternNode # - # source://prism//lib/prism/node.rb#432 + # source://prism//lib/prism/node.rb#471 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, left: Prism::Node, right: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: 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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#417 + # source://prism//lib/prism/node.rb#456 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { left: Prism::node, right: Prism::node, operator_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node, right: Prism::node, operator_loc: Location } # - # source://prism//lib/prism/node.rb#440 + # source://prism//lib/prism/node.rb#479 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -550,62 +569,53 @@ class Prism::AlternationPatternNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#463 + # source://prism//lib/prism/node.rb#511 sig { override.returns(String) } def inspect; end - # attr_reader left: Prism::node + # Represents the left side of the expression. # - # source://prism//lib/prism/node.rb#445 + # foo => bar | baz + # ^^^ + # + # source://prism//lib/prism/node.rb#487 sig { returns(Prism::Node) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#458 + # source://prism//lib/prism/node.rb#506 sig { returns(String) } def operator; end - # attr_reader operator_loc: Location + # Represents the alternation operator location. # - # source://prism//lib/prism/node.rb#451 + # foo => bar | baz + # ^ + # + # source://prism//lib/prism/node.rb#499 sig { returns(Prism::Location) } def operator_loc; end - # attr_reader right: Prism::node + # Represents the right side of the expression. + # + # foo => bar | baz + # ^^^ # - # source://prism//lib/prism/node.rb#448 + # source://prism//lib/prism/node.rb#493 sig { returns(Prism::Node) } def right; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#481 + # source://prism//lib/prism/node.rb#516 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#491 + # source://prism//lib/prism/node.rb#521 def type; end end end @@ -615,77 +625,81 @@ end # left and right # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#509 +# source://prism//lib/prism/node.rb#539 class Prism::AndNode < ::Prism::Node - # def initialize: (Prism::node left, Prism::node right, Location operator_loc, Location location) -> void + # Initialize a new AndNode node. # # @return [AndNode] a new instance of AndNode # - # source://prism//lib/prism/node.rb#511 + # source://prism//lib/prism/node.rb#541 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, left: Prism::Node, right: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).void end - def initialize(source, left, right, operator_loc, location); end + def initialize(source, node_id, location, flags, left, right, operator_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#620 + # source://prism//lib/prism/node.rb#634 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#520 + # source://prism//lib/prism/node.rb#552 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#525 + # source://prism//lib/prism/node.rb#557 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#535 + # source://prism//lib/prism/node.rb#567 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#530 + # source://prism//lib/prism/node.rb#562 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node, ?right: Prism::node, ?operator_loc: Location) -> AndNode # - # source://prism//lib/prism/node.rb#540 + # source://prism//lib/prism/node.rb#572 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, left: Prism::Node, right: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: 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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#525 + # source://prism//lib/prism/node.rb#557 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { left: Prism::node, right: Prism::node, operator_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node, right: Prism::node, operator_loc: Location } # - # source://prism//lib/prism/node.rb#548 + # source://prism//lib/prism/node.rb#580 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -694,7 +708,7 @@ class Prism::AndNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#586 + # source://prism//lib/prism/node.rb#618 sig { override.returns(String) } def inspect; end @@ -706,13 +720,13 @@ class Prism::AndNode < ::Prism::Node # 1 && 2 # ^ # - # source://prism//lib/prism/node.rb#559 + # source://prism//lib/prism/node.rb#591 sig { returns(Prism::Node) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#581 + # source://prism//lib/prism/node.rb#613 sig { returns(String) } def operator; end @@ -721,11 +735,11 @@ class Prism::AndNode < ::Prism::Node # left and right # ^^^ # - # source://prism//lib/prism/node.rb#574 + # source://prism//lib/prism/node.rb#606 sig { returns(Prism::Location) } def operator_loc; end - # Represents the right side of the expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # Represents the right side of the expression. # # left && right # ^^^^^ @@ -733,38 +747,20 @@ class Prism::AndNode < ::Prism::Node # 1 and 2 # ^ # - # source://prism//lib/prism/node.rb#568 + # source://prism//lib/prism/node.rb#600 sig { returns(Prism::Node) } def right; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#604 + # source://prism//lib/prism/node.rb#623 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#614 + # source://prism//lib/prism/node.rb#628 def type; end end end @@ -774,64 +770,73 @@ end # return foo, bar, baz # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#632 +# source://prism//lib/prism/node.rb#646 class Prism::ArgumentsNode < ::Prism::Node - # def initialize: (Integer flags, Array[Prism::node] arguments, Location location) -> void + # Initialize a new ArgumentsNode node. # # @return [ArgumentsNode] a new instance of ArgumentsNode # - # source://prism//lib/prism/node.rb#634 + # source://prism//lib/prism/node.rb#648 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, - arguments: T::Array[Prism::Node], - location: Prism::Location + arguments: T::Array[Prism::Node] ).void end - def initialize(source, flags, arguments, location); end + def initialize(source, node_id, location, flags, arguments); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#726 + # source://prism//lib/prism/node.rb#734 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#642 + # source://prism//lib/prism/node.rb#657 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: Array[Prism::node] # - # source://prism//lib/prism/node.rb#679 + # source://prism//lib/prism/node.rb#715 sig { returns(T::Array[Prism::Node]) } def arguments; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#647 + # source://prism//lib/prism/node.rb#662 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#657 + # source://prism//lib/prism/node.rb#672 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#652 + # source://prism//lib/prism/node.rb#667 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end + # def contains_forwarding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#690 + sig { returns(T::Boolean) } + def contains_forwarding?; end + # def contains_keyword_splat?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#687 + # source://prism//lib/prism/node.rb#700 sig { returns(T::Boolean) } def contains_keyword_splat?; end @@ -839,32 +844,49 @@ class Prism::ArgumentsNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#682 + # source://prism//lib/prism/node.rb#695 sig { returns(T::Boolean) } def contains_keywords?; end - # def copy: (?flags: Integer, ?arguments: Array[Prism::node], ?location: Location) -> ArgumentsNode + # def contains_multiple_splats?: () -> bool # - # source://prism//lib/prism/node.rb#662 + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#710 + sig { returns(T::Boolean) } + def contains_multiple_splats?; end + + # def contains_splat?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#705 + sig { returns(T::Boolean) } + def contains_splat?; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?arguments: Array[Prism::node]) -> ArgumentsNode + # + # source://prism//lib/prism/node.rb#677 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, - arguments: T::Array[Prism::Node], - location: Prism::Location + arguments: T::Array[Prism::Node] ).returns(Prism::ArgumentsNode) end - def copy(flags: T.unsafe(nil), arguments: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), arguments: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#647 + # source://prism//lib/prism/node.rb#662 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, arguments: Array[Prism::node], location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, arguments: Array[Prism::node] } # - # source://prism//lib/prism/node.rb#670 + # source://prism//lib/prism/node.rb#685 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -873,110 +895,100 @@ class Prism::ArgumentsNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#692 + # source://prism//lib/prism/node.rb#718 sig { override.returns(String) } def inspect; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#710 + # source://prism//lib/prism/node.rb#723 sig { override.returns(Symbol) } def type; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#675 - 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#720 + # source://prism//lib/prism/node.rb#728 def type; end end end # Flags for arguments nodes. # -# source://prism//lib/prism/node.rb#19127 +# source://prism//lib/prism/node.rb#16684 module Prism::ArgumentsNodeFlags; end -# if arguments contain keywords +# if the arguments contain forwarding # -# source://prism//lib/prism/node.rb#19129 +# source://prism//lib/prism/node.rb#16686 +Prism::ArgumentsNodeFlags::CONTAINS_FORWARDING = T.let(T.unsafe(nil), Integer) + +# if the arguments contain keywords +# +# source://prism//lib/prism/node.rb#16689 Prism::ArgumentsNodeFlags::CONTAINS_KEYWORDS = T.let(T.unsafe(nil), Integer) -# if arguments contain keyword splat +# if the arguments contain a keyword splat # -# source://prism//lib/prism/node.rb#19132 +# source://prism//lib/prism/node.rb#16692 Prism::ArgumentsNodeFlags::CONTAINS_KEYWORD_SPLAT = T.let(T.unsafe(nil), Integer) +# if the arguments contain multiple splats +# +# source://prism//lib/prism/node.rb#16698 +Prism::ArgumentsNodeFlags::CONTAINS_MULTIPLE_SPLATS = T.let(T.unsafe(nil), Integer) + +# if the arguments contain a splat +# +# source://prism//lib/prism/node.rb#16695 +Prism::ArgumentsNodeFlags::CONTAINS_SPLAT = T.let(T.unsafe(nil), Integer) + # Represents an array literal. This can be a regular array using brackets or a special array using % like %w or %i. # # [1, 2, 3] # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#738 +# source://prism//lib/prism/node.rb#746 class Prism::ArrayNode < ::Prism::Node - # def initialize: (Integer flags, Array[Prism::node] elements, Location? opening_loc, Location? closing_loc, Location location) -> void + # Initialize a new ArrayNode node. # # @return [ArrayNode] a new instance of ArrayNode # - # source://prism//lib/prism/node.rb#740 + # source://prism//lib/prism/node.rb#748 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, elements: T::Array[Prism::Node], opening_loc: T.nilable(Prism::Location), - closing_loc: T.nilable(Prism::Location), - location: Prism::Location + closing_loc: T.nilable(Prism::Location) ).void end - def initialize(source, flags, elements, opening_loc, closing_loc, location); end + def initialize(source, node_id, location, flags, elements, opening_loc, closing_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#875 + # source://prism//lib/prism/node.rb#862 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#750 + # source://prism//lib/prism/node.rb#759 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#755 + # source://prism//lib/prism/node.rb#764 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#836 + # source://prism//lib/prism/node.rb#841 sig { returns(T.nilable(String)) } def closing; end @@ -987,19 +999,19 @@ class Prism::ArrayNode < ::Prism::Node # %I(apple orange banana) # ")" # foo = 1, 2, 3 # nil # - # source://prism//lib/prism/node.rb#813 + # source://prism//lib/prism/node.rb#823 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#765 + # source://prism//lib/prism/node.rb#774 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#760 + # source://prism//lib/prism/node.rb#769 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end @@ -1007,40 +1019,41 @@ class Prism::ArrayNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#826 + # source://prism//lib/prism/node.rb#792 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?elements: Array[Prism::node], ?opening_loc: Location?, ?closing_loc: Location?) -> ArrayNode # - # source://prism//lib/prism/node.rb#770 + # source://prism//lib/prism/node.rb#779 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, elements: T::Array[Prism::Node], opening_loc: T.nilable(Prism::Location), - closing_loc: T.nilable(Prism::Location), - location: Prism::Location + closing_loc: T.nilable(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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), elements: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#755 + # source://prism//lib/prism/node.rb#764 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, elements: Array[Prism::node], opening_loc: Location?, closing_loc: Location?, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, elements: Array[Prism::node], opening_loc: Location?, closing_loc: Location? } # - # source://prism//lib/prism/node.rb#778 + # source://prism//lib/prism/node.rb#787 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # Represent the list of zero or more [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression) within the array. # - # source://prism//lib/prism/node.rb#787 + # source://prism//lib/prism/node.rb#797 sig { returns(T::Array[Prism::Node]) } def elements; end @@ -1049,13 +1062,13 @@ class Prism::ArrayNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#841 + # source://prism//lib/prism/node.rb#846 sig { override.returns(String) } def inspect; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#831 + # source://prism//lib/prism/node.rb#836 sig { returns(T.nilable(String)) } def opening; end @@ -1066,58 +1079,32 @@ class Prism::ArrayNode < ::Prism::Node # %I(apple orange banana) # "%I(" # foo = 1, 2, 3 # nil # - # source://prism//lib/prism/node.rb#795 + # source://prism//lib/prism/node.rb#805 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#859 + # source://prism//lib/prism/node.rb#851 sig { override.returns(Symbol) } def type; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#783 - 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#869 + # source://prism//lib/prism/node.rb#856 def type; end end end # Flags for array nodes. # -# source://prism//lib/prism/node.rb#19136 +# source://prism//lib/prism/node.rb#16702 module Prism::ArrayNodeFlags; end # if array contains splat nodes # -# source://prism//lib/prism/node.rb#19138 +# source://prism//lib/prism/node.rb#16704 Prism::ArrayNodeFlags::CONTAINS_SPLAT = T.let(T.unsafe(nil), Integer) # Represents an array pattern in pattern matching. @@ -1137,101 +1124,105 @@ Prism::ArrayNodeFlags::CONTAINS_SPLAT = T.let(T.unsafe(nil), Integer) # foo in Bar[1, 2, 3] # ^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#901 +# source://prism//lib/prism/node.rb#888 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 + # Initialize a new ArrayPatternNode node. # # @return [ArrayPatternNode] a new instance of ArrayPatternNode # - # source://prism//lib/prism/node.rb#903 + # source://prism//lib/prism/node.rb#890 sig do params( source: Prism::Source, - constant: T.nilable(Prism::Node), + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), requireds: T::Array[Prism::Node], rest: T.nilable(Prism::Node), posts: T::Array[Prism::Node], opening_loc: T.nilable(Prism::Location), - closing_loc: T.nilable(Prism::Location), - location: Prism::Location + closing_loc: T.nilable(Prism::Location) ).void end - def initialize(source, constant, requireds, rest, posts, opening_loc, closing_loc, location); end + def initialize(source, node_id, location, flags, constant, requireds, rest, posts, opening_loc, closing_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#1035 + # source://prism//lib/prism/node.rb#1006 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#915 + # source://prism//lib/prism/node.rb#904 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#920 + # source://prism//lib/prism/node.rb#909 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#996 + # source://prism//lib/prism/node.rb#985 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#978 + # source://prism//lib/prism/node.rb#967 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#935 + # source://prism//lib/prism/node.rb#924 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#925 + # source://prism//lib/prism/node.rb#914 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # attr_reader constant: Prism::node? + # attr_reader constant: ConstantReadNode | ConstantPathNode | nil # - # source://prism//lib/prism/node.rb#953 - sig { returns(T.nilable(Prism::Node)) } + # source://prism//lib/prism/node.rb#942 + sig { returns(T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode))) } 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant: ConstantReadNode | ConstantPathNode | nil, ?requireds: Array[Prism::node], ?rest: Prism::node?, ?posts: Array[Prism::node], ?opening_loc: Location?, ?closing_loc: Location?) -> ArrayPatternNode # - # source://prism//lib/prism/node.rb#940 + # source://prism//lib/prism/node.rb#929 sig do params( - constant: T.nilable(Prism::Node), + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), requireds: T::Array[Prism::Node], rest: T.nilable(Prism::Node), posts: T::Array[Prism::Node], opening_loc: T.nilable(Prism::Location), - closing_loc: T.nilable(Prism::Location), - location: Prism::Location + closing_loc: T.nilable(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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), constant: T.unsafe(nil), requireds: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#920 + # source://prism//lib/prism/node.rb#909 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { constant: Prism::node?, requireds: Array[Prism::node], rest: Prism::node?, posts: Array[Prism::node], opening_loc: Location?, closing_loc: Location?, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant: ConstantReadNode | ConstantPathNode | nil, requireds: Array[Prism::node], rest: Prism::node?, posts: Array[Prism::node], opening_loc: Location?, closing_loc: Location? } # - # source://prism//lib/prism/node.rb#948 + # source://prism//lib/prism/node.rb#937 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -1240,68 +1231,50 @@ class Prism::ArrayPatternNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#1001 + # source://prism//lib/prism/node.rb#990 sig { override.returns(String) } def inspect; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#991 + # source://prism//lib/prism/node.rb#980 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#965 + # source://prism//lib/prism/node.rb#954 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader posts: Array[Prism::node] # - # source://prism//lib/prism/node.rb#962 + # source://prism//lib/prism/node.rb#951 sig { returns(T::Array[Prism::Node]) } def posts; end # attr_reader requireds: Array[Prism::node] # - # source://prism//lib/prism/node.rb#956 + # source://prism//lib/prism/node.rb#945 sig { returns(T::Array[Prism::Node]) } def requireds; end # attr_reader rest: Prism::node? # - # source://prism//lib/prism/node.rb#959 + # source://prism//lib/prism/node.rb#948 sig { returns(T.nilable(Prism::Node)) } def rest; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#1019 + # source://prism//lib/prism/node.rb#995 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#1029 + # source://prism//lib/prism/node.rb#1000 def type; end end end @@ -1311,77 +1284,81 @@ end # { a => b } # ^^^^^^ # -# source://prism//lib/prism/node.rb#1052 +# source://prism//lib/prism/node.rb#1023 class Prism::AssocNode < ::Prism::Node - # def initialize: (Prism::node key, Prism::node value, Location? operator_loc, Location location) -> void + # Initialize a new AssocNode node. # # @return [AssocNode] a new instance of AssocNode # - # source://prism//lib/prism/node.rb#1054 + # source://prism//lib/prism/node.rb#1025 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, key: Prism::Node, value: Prism::Node, - operator_loc: T.nilable(Prism::Location), - location: Prism::Location + operator_loc: T.nilable(Prism::Location) ).void end - def initialize(source, key, value, operator_loc, location); end + def initialize(source, node_id, location, flags, key, value, operator_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#1172 + # source://prism//lib/prism/node.rb#1127 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1063 + # source://prism//lib/prism/node.rb#1036 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1068 + # source://prism//lib/prism/node.rb#1041 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1078 + # source://prism//lib/prism/node.rb#1051 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1073 + # source://prism//lib/prism/node.rb#1046 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?key: Prism::node, ?value: Prism::node, ?operator_loc: Location?) -> AssocNode # - # source://prism//lib/prism/node.rb#1083 + # source://prism//lib/prism/node.rb#1056 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, key: Prism::Node, value: Prism::Node, - operator_loc: T.nilable(Prism::Location), - location: Prism::Location + operator_loc: T.nilable(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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), key: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1068 + # source://prism//lib/prism/node.rb#1041 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { key: Prism::node, value: Prism::node, operator_loc: Location?, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, key: Prism::node, value: Prism::node, operator_loc: Location? } # - # source://prism//lib/prism/node.rb#1091 + # source://prism//lib/prism/node.rb#1064 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -1390,7 +1367,7 @@ class Prism::AssocNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#1138 + # source://prism//lib/prism/node.rb#1111 sig { override.returns(String) } def inspect; end @@ -1405,13 +1382,13 @@ class Prism::AssocNode < ::Prism::Node # { def a; end => 1 } # ^^^^^^^^^^ # - # source://prism//lib/prism/node.rb#1105 + # source://prism//lib/prism/node.rb#1078 sig { returns(Prism::Node) } def key; end # def operator: () -> String? # - # source://prism//lib/prism/node.rb#1133 + # source://prism//lib/prism/node.rb#1106 sig { returns(T.nilable(String)) } def operator; end @@ -1420,26 +1397,13 @@ class Prism::AssocNode < ::Prism::Node # { foo => bar } # ^^ # - # source://prism//lib/prism/node.rb#1120 + # source://prism//lib/prism/node.rb#1093 sig { returns(T.nilable(Prism::Location)) } def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#1156 + # source://prism//lib/prism/node.rb#1116 sig { override.returns(Symbol) } def type; end @@ -1451,19 +1415,14 @@ class Prism::AssocNode < ::Prism::Node # { x: 1 } # ^ # - # source://prism//lib/prism/node.rb#1114 + # source://prism//lib/prism/node.rb#1087 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1166 + # source://prism//lib/prism/node.rb#1121 def type; end end end @@ -1473,75 +1432,79 @@ end # { **foo } # ^^^^^ # -# source://prism//lib/prism/node.rb#1184 +# source://prism//lib/prism/node.rb#1139 class Prism::AssocSplatNode < ::Prism::Node - # def initialize: (Prism::node? value, Location operator_loc, Location location) -> void + # Initialize a new AssocSplatNode node. # # @return [AssocSplatNode] a new instance of AssocSplatNode # - # source://prism//lib/prism/node.rb#1186 + # source://prism//lib/prism/node.rb#1141 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, value: T.nilable(Prism::Node), - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).void end - def initialize(source, value, operator_loc, location); end + def initialize(source, node_id, location, flags, value, operator_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#1284 + # source://prism//lib/prism/node.rb#1223 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1194 + # source://prism//lib/prism/node.rb#1151 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1199 + # source://prism//lib/prism/node.rb#1156 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1211 + # source://prism//lib/prism/node.rb#1168 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1204 + # source://prism//lib/prism/node.rb#1161 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?value: Prism::node?, ?operator_loc: Location, ?location: Location) -> AssocSplatNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Prism::node?, ?operator_loc: Location) -> AssocSplatNode # - # source://prism//lib/prism/node.rb#1216 + # source://prism//lib/prism/node.rb#1173 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, value: T.nilable(Prism::Node), - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).returns(Prism::AssocSplatNode) end - def copy(value: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1199 + # source://prism//lib/prism/node.rb#1156 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::node?, operator_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node?, operator_loc: Location } # - # source://prism//lib/prism/node.rb#1224 + # source://prism//lib/prism/node.rb#1181 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -1550,13 +1513,13 @@ class Prism::AssocSplatNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#1250 + # source://prism//lib/prism/node.rb#1207 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#1245 + # source://prism//lib/prism/node.rb#1202 sig { returns(String) } def operator; end @@ -1565,26 +1528,13 @@ class Prism::AssocSplatNode < ::Prism::Node # { **x } # ^^ # - # source://prism//lib/prism/node.rb#1238 + # source://prism//lib/prism/node.rb#1195 sig { returns(Prism::Location) } def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1268 + # source://prism//lib/prism/node.rb#1212 sig { override.returns(Symbol) } def type; end @@ -1593,19 +1543,14 @@ class Prism::AssocSplatNode < ::Prism::Node # { **foo } # ^^^ # - # source://prism//lib/prism/node.rb#1232 + # source://prism//lib/prism/node.rb#1189 sig { returns(T.nilable(Prism::Node)) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#1278 + # source://prism//lib/prism/node.rb#1217 def type; end end end @@ -1620,62 +1565,69 @@ Prism::BACKEND = T.let(T.unsafe(nil), Symbol) # $' # ^^ # -# source://prism//lib/prism/node.rb#1295 +# source://prism//lib/prism/node.rb#1234 class Prism::BackReferenceReadNode < ::Prism::Node - # def initialize: (Symbol name, Location location) -> void + # Initialize a new BackReferenceReadNode node. # # @return [BackReferenceReadNode] a new instance of BackReferenceReadNode # - # source://prism//lib/prism/node.rb#1297 - sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } - def initialize(source, name, location); end + # source://prism//lib/prism/node.rb#1236 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } + def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#1378 + # source://prism//lib/prism/node.rb#1301 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1304 + # source://prism//lib/prism/node.rb#1245 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1309 + # source://prism//lib/prism/node.rb#1250 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1319 + # source://prism//lib/prism/node.rb#1260 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1314 + # source://prism//lib/prism/node.rb#1255 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?location: Location) -> BackReferenceReadNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> BackReferenceReadNode # - # source://prism//lib/prism/node.rb#1324 - sig { params(name: Symbol, location: Prism::Location).returns(Prism::BackReferenceReadNode) } - def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#1265 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::BackReferenceReadNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1309 + # source://prism//lib/prism/node.rb#1250 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#1332 + # source://prism//lib/prism/node.rb#1273 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -1684,7 +1636,7 @@ class Prism::BackReferenceReadNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#1344 + # source://prism//lib/prism/node.rb#1285 sig { override.returns(String) } def inspect; end @@ -1694,38 +1646,20 @@ class Prism::BackReferenceReadNode < ::Prism::Node # # $+ # name `:$+` # - # source://prism//lib/prism/node.rb#1341 + # source://prism//lib/prism/node.rb#1282 sig { returns(Symbol) } def name; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#1362 + # source://prism//lib/prism/node.rb#1290 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#1372 + # source://prism//lib/prism/node.rb#1295 def type; end end end @@ -1764,119 +1698,123 @@ end # end # ^^^^^ # -# source://prism//lib/prism/node.rb#1390 +# source://prism//lib/prism/node.rb#1313 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 + # Initialize a new BeginNode node. # # @return [BeginNode] a new instance of BeginNode # - # source://prism//lib/prism/node.rb#1392 + # source://prism//lib/prism/node.rb#1315 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, begin_keyword_loc: T.nilable(Prism::Location), statements: T.nilable(Prism::StatementsNode), rescue_clause: T.nilable(Prism::RescueNode), else_clause: T.nilable(Prism::ElseNode), ensure_clause: T.nilable(Prism::EnsureNode), - end_keyword_loc: T.nilable(Prism::Location), - location: Prism::Location + end_keyword_loc: T.nilable(Prism::Location) ).void end - def initialize(source, begin_keyword_loc, statements, rescue_clause, else_clause, ensure_clause, end_keyword_loc, location); end + def initialize(source, node_id, location, flags, begin_keyword_loc, statements, rescue_clause, else_clause, ensure_clause, end_keyword_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#1524 + # source://prism//lib/prism/node.rb#1431 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1404 + # source://prism//lib/prism/node.rb#1329 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def begin_keyword: () -> String? # - # source://prism//lib/prism/node.rb#1480 + # source://prism//lib/prism/node.rb#1405 sig { returns(T.nilable(String)) } def begin_keyword; end # attr_reader begin_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#1442 + # source://prism//lib/prism/node.rb#1367 sig { returns(T.nilable(Prism::Location)) } def begin_keyword_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1409 + # source://prism//lib/prism/node.rb#1334 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1424 + # source://prism//lib/prism/node.rb#1349 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1414 + # source://prism//lib/prism/node.rb#1339 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?begin_keyword_loc: Location?, ?statements: StatementsNode?, ?rescue_clause: RescueNode?, ?else_clause: ElseNode?, ?ensure_clause: EnsureNode?, ?end_keyword_loc: Location?) -> BeginNode # - # source://prism//lib/prism/node.rb#1429 + # source://prism//lib/prism/node.rb#1354 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, begin_keyword_loc: T.nilable(Prism::Location), statements: T.nilable(Prism::StatementsNode), rescue_clause: T.nilable(Prism::RescueNode), else_clause: T.nilable(Prism::ElseNode), ensure_clause: T.nilable(Prism::EnsureNode), - end_keyword_loc: T.nilable(Prism::Location), - location: Prism::Location + end_keyword_loc: T.nilable(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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), begin_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), rescue_clause: T.unsafe(nil), else_clause: T.unsafe(nil), ensure_clause: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1409 + # source://prism//lib/prism/node.rb#1334 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { begin_keyword_loc: Location?, statements: StatementsNode?, rescue_clause: RescueNode?, else_clause: ElseNode?, ensure_clause: EnsureNode?, end_keyword_loc: Location?, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, begin_keyword_loc: Location?, statements: StatementsNode?, rescue_clause: RescueNode?, else_clause: ElseNode?, ensure_clause: EnsureNode?, end_keyword_loc: Location? } # - # source://prism//lib/prism/node.rb#1437 + # source://prism//lib/prism/node.rb#1362 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader else_clause: ElseNode? # - # source://prism//lib/prism/node.rb#1461 + # source://prism//lib/prism/node.rb#1386 sig { returns(T.nilable(Prism::ElseNode)) } def else_clause; end # def end_keyword: () -> String? # - # source://prism//lib/prism/node.rb#1485 + # source://prism//lib/prism/node.rb#1410 sig { returns(T.nilable(String)) } def end_keyword; end # attr_reader end_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#1467 + # source://prism//lib/prism/node.rb#1392 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end # attr_reader ensure_clause: EnsureNode? # - # source://prism//lib/prism/node.rb#1464 + # source://prism//lib/prism/node.rb#1389 sig { returns(T.nilable(Prism::EnsureNode)) } def ensure_clause; end @@ -1885,137 +1823,123 @@ class Prism::BeginNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#1490 + # source://prism//lib/prism/node.rb#1415 sig { override.returns(String) } def inspect; end # source://prism//lib/prism/parse_result/newlines.rb#79 - def newline!(lines); end + def newline_flag!(lines); end # attr_reader rescue_clause: RescueNode? # - # source://prism//lib/prism/node.rb#1458 + # source://prism//lib/prism/node.rb#1383 sig { returns(T.nilable(Prism::RescueNode)) } def rescue_clause; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#1455 + # source://prism//lib/prism/node.rb#1380 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#1508 + # source://prism//lib/prism/node.rb#1420 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#1518 + # source://prism//lib/prism/node.rb#1425 def type; end end end -# Represents block method arguments. +# Represents a block argument using `&`. # # bar(&args) # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#1539 +# source://prism//lib/prism/node.rb#1446 class Prism::BlockArgumentNode < ::Prism::Node - # def initialize: (Prism::node? expression, Location operator_loc, Location location) -> void + # Initialize a new BlockArgumentNode node. # # @return [BlockArgumentNode] a new instance of BlockArgumentNode # - # source://prism//lib/prism/node.rb#1541 + # source://prism//lib/prism/node.rb#1448 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, expression: T.nilable(Prism::Node), - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).void end - def initialize(source, expression, operator_loc, location); end + def initialize(source, node_id, location, flags, expression, operator_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#1633 + # source://prism//lib/prism/node.rb#1524 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1549 + # source://prism//lib/prism/node.rb#1458 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1554 + # source://prism//lib/prism/node.rb#1463 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1566 + # source://prism//lib/prism/node.rb#1475 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1559 + # source://prism//lib/prism/node.rb#1468 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?expression: Prism::node?, ?operator_loc: Location, ?location: Location) -> BlockArgumentNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?expression: Prism::node?, ?operator_loc: Location) -> BlockArgumentNode # - # source://prism//lib/prism/node.rb#1571 + # source://prism//lib/prism/node.rb#1480 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, expression: T.nilable(Prism::Node), - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).returns(Prism::BlockArgumentNode) end - def copy(expression: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), expression: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1554 + # source://prism//lib/prism/node.rb#1463 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { expression: Prism::node?, operator_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, expression: Prism::node?, operator_loc: Location } # - # source://prism//lib/prism/node.rb#1579 + # source://prism//lib/prism/node.rb#1488 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader expression: Prism::node? # - # source://prism//lib/prism/node.rb#1584 + # source://prism//lib/prism/node.rb#1493 sig { returns(T.nilable(Prism::Node)) } def expression; end @@ -2024,50 +1948,32 @@ class Prism::BlockArgumentNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#1599 + # source://prism//lib/prism/node.rb#1508 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#1594 + # source://prism//lib/prism/node.rb#1503 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#1587 + # source://prism//lib/prism/node.rb#1496 sig { returns(Prism::Location) } def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#1617 + # source://prism//lib/prism/node.rb#1513 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1627 + # source://prism//lib/prism/node.rb#1518 def type; end end end @@ -2077,62 +1983,69 @@ end # a { |; b| } # ^ # -# source://prism//lib/prism/node.rb#1644 +# source://prism//lib/prism/node.rb#1535 class Prism::BlockLocalVariableNode < ::Prism::Node - # def initialize: (Integer flags, Symbol name, Location location) -> void + # Initialize a new BlockLocalVariableNode node. # # @return [BlockLocalVariableNode] a new instance of BlockLocalVariableNode # - # source://prism//lib/prism/node.rb#1646 - sig { params(source: Prism::Source, flags: Integer, name: Symbol, location: Prism::Location).void } - def initialize(source, flags, name, location); end + # source://prism//lib/prism/node.rb#1537 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } + def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#1733 + # source://prism//lib/prism/node.rb#1603 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1654 + # source://prism//lib/prism/node.rb#1546 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1659 + # source://prism//lib/prism/node.rb#1551 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1669 + # source://prism//lib/prism/node.rb#1561 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1664 + # source://prism//lib/prism/node.rb#1556 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?flags: Integer, ?name: Symbol, ?location: Location) -> BlockLocalVariableNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> BlockLocalVariableNode # - # source://prism//lib/prism/node.rb#1674 - sig { params(flags: Integer, name: Symbol, location: Prism::Location).returns(Prism::BlockLocalVariableNode) } - def copy(flags: T.unsafe(nil), name: T.unsafe(nil), location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#1566 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::BlockLocalVariableNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1659 + # source://prism//lib/prism/node.rb#1551 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#1682 + # source://prism//lib/prism/node.rb#1574 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -2141,13 +2054,13 @@ class Prism::BlockLocalVariableNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#1699 + # source://prism//lib/prism/node.rb#1587 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#1691 + # source://prism//lib/prism/node.rb#1584 sig { returns(Symbol) } def name; end @@ -2155,46 +2068,20 @@ class Prism::BlockLocalVariableNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#1694 + # source://prism//lib/prism/node.rb#1579 sig { returns(T::Boolean) } def repeated_parameter?; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#1717 + # source://prism//lib/prism/node.rb#1592 sig { override.returns(Symbol) } def type; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#1687 - 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1727 + # source://prism//lib/prism/node.rb#1597 def type; end end end @@ -2204,99 +2091,103 @@ end # [1, 2, 3].each { |i| puts x } # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#1744 +# source://prism//lib/prism/node.rb#1614 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 + # Initialize a new BlockNode node. # # @return [BlockNode] a new instance of BlockNode # - # source://prism//lib/prism/node.rb#1746 + # source://prism//lib/prism/node.rb#1616 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, locals: T::Array[Symbol], - parameters: T.nilable(Prism::Node), - body: T.nilable(Prism::Node), + parameters: T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), opening_loc: Prism::Location, - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: Prism::Location ).void end - def initialize(source, locals, parameters, body, opening_loc, closing_loc, location); end + def initialize(source, node_id, location, flags, locals, parameters, body, opening_loc, closing_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#1860 + # source://prism//lib/prism/node.rb#1714 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1757 + # source://prism//lib/prism/node.rb#1629 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # attr_reader body: Prism::node? + # attr_reader body: StatementsNode | BeginNode | nil # - # source://prism//lib/prism/node.rb#1799 - sig { returns(T.nilable(Prism::Node)) } + # source://prism//lib/prism/node.rb#1671 + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1762 + # source://prism//lib/prism/node.rb#1634 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#1821 + # source://prism//lib/prism/node.rb#1693 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#1809 + # source://prism//lib/prism/node.rb#1681 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1775 + # source://prism//lib/prism/node.rb#1647 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1767 + # source://prism//lib/prism/node.rb#1639 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil, ?body: StatementsNode | BeginNode | nil, ?opening_loc: Location, ?closing_loc: Location) -> BlockNode # - # source://prism//lib/prism/node.rb#1780 + # source://prism//lib/prism/node.rb#1652 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, locals: T::Array[Symbol], - parameters: T.nilable(Prism::Node), - body: T.nilable(Prism::Node), + parameters: T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), opening_loc: Prism::Location, - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: 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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1762 + # source://prism//lib/prism/node.rb#1634 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], parameters: Prism::node?, body: Prism::node?, opening_loc: Location, closing_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil, body: StatementsNode | BeginNode | nil, opening_loc: Location, closing_loc: Location } # - # source://prism//lib/prism/node.rb#1788 + # source://prism//lib/prism/node.rb#1660 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -2305,145 +2196,129 @@ class Prism::BlockNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#1826 + # source://prism//lib/prism/node.rb#1698 sig { override.returns(String) } def inspect; end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#1793 + # source://prism//lib/prism/node.rb#1665 sig { returns(T::Array[Symbol]) } def locals; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#1816 + # source://prism//lib/prism/node.rb#1688 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#1802 + # source://prism//lib/prism/node.rb#1674 sig { returns(Prism::Location) } def opening_loc; end - # attr_reader parameters: Prism::node? + # attr_reader parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil # - # source://prism//lib/prism/node.rb#1796 - sig { returns(T.nilable(Prism::Node)) } + # source://prism//lib/prism/node.rb#1668 + sig { returns(T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode))) } def parameters; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#1844 + # source://prism//lib/prism/node.rb#1703 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1854 + # source://prism//lib/prism/node.rb#1708 def type; end end end -# Represents a block parameter to a method, block, or lambda definition. +# Represents a block parameter of a method, block, or lambda definition. # # def a(&b) # ^^ # end # -# source://prism//lib/prism/node.rb#1876 +# source://prism//lib/prism/node.rb#1730 class Prism::BlockParameterNode < ::Prism::Node - # def initialize: (Integer flags, Symbol? name, Location? name_loc, Location operator_loc, Location location) -> void + # Initialize a new BlockParameterNode node. # # @return [BlockParameterNode] a new instance of BlockParameterNode # - # source://prism//lib/prism/node.rb#1878 + # source://prism//lib/prism/node.rb#1732 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, name: T.nilable(Symbol), name_loc: T.nilable(Prism::Location), - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).void end - def initialize(source, flags, name, name_loc, operator_loc, location); end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#1992 + # source://prism//lib/prism/node.rb#1825 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1888 + # source://prism//lib/prism/node.rb#1743 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1893 + # source://prism//lib/prism/node.rb#1748 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1903 + # source://prism//lib/prism/node.rb#1758 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#1898 + # source://prism//lib/prism/node.rb#1753 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location) -> BlockParameterNode # - # source://prism//lib/prism/node.rb#1908 + # source://prism//lib/prism/node.rb#1763 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, name: T.nilable(Symbol), name_loc: T.nilable(Prism::Location), - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: 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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1893 + # source://prism//lib/prism/node.rb#1748 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol?, name_loc: Location?, operator_loc: Location } # - # source://prism//lib/prism/node.rb#1916 + # source://prism//lib/prism/node.rb#1771 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -2452,31 +2327,31 @@ class Prism::BlockParameterNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#1958 + # source://prism//lib/prism/node.rb#1809 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol? # - # source://prism//lib/prism/node.rb#1925 + # source://prism//lib/prism/node.rb#1781 sig { returns(T.nilable(Symbol)) } def name; end # attr_reader name_loc: Location? # - # source://prism//lib/prism/node.rb#1928 + # source://prism//lib/prism/node.rb#1784 sig { returns(T.nilable(Prism::Location)) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#1953 + # source://prism//lib/prism/node.rb#1804 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#1941 + # source://prism//lib/prism/node.rb#1797 sig { returns(Prism::Location) } def operator_loc; end @@ -2484,46 +2359,20 @@ class Prism::BlockParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#1948 + # source://prism//lib/prism/node.rb#1776 sig { returns(T::Boolean) } def repeated_parameter?; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#1976 + # source://prism//lib/prism/node.rb#1814 sig { override.returns(Symbol) } def type; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#1921 - 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#1986 + # source://prism//lib/prism/node.rb#1819 def type; end end end @@ -2537,91 +2386,95 @@ end # ^^^^^^^^^^^^^^^^^ # end # -# source://prism//lib/prism/node.rb#2009 +# source://prism//lib/prism/node.rb#1842 class Prism::BlockParametersNode < ::Prism::Node - # def initialize: (ParametersNode? parameters, Array[BlockLocalVariableNode] locals, Location? opening_loc, Location? closing_loc, Location location) -> void + # Initialize a new BlockParametersNode node. # # @return [BlockParametersNode] a new instance of BlockParametersNode # - # source://prism//lib/prism/node.rb#2011 + # source://prism//lib/prism/node.rb#1844 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, parameters: T.nilable(Prism::ParametersNode), locals: T::Array[Prism::BlockLocalVariableNode], opening_loc: T.nilable(Prism::Location), - closing_loc: T.nilable(Prism::Location), - location: Prism::Location + closing_loc: T.nilable(Prism::Location) ).void end - def initialize(source, parameters, locals, opening_loc, closing_loc, location); end + def initialize(source, node_id, location, flags, parameters, locals, opening_loc, closing_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#2133 + # source://prism//lib/prism/node.rb#1950 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2021 + # source://prism//lib/prism/node.rb#1856 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2026 + # source://prism//lib/prism/node.rb#1861 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#2094 + # source://prism//lib/prism/node.rb#1929 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#2076 + # source://prism//lib/prism/node.rb#1911 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#2039 + # source://prism//lib/prism/node.rb#1874 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#2031 + # source://prism//lib/prism/node.rb#1866 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?parameters: ParametersNode?, ?locals: Array[BlockLocalVariableNode], ?opening_loc: Location?, ?closing_loc: Location?) -> BlockParametersNode # - # source://prism//lib/prism/node.rb#2044 + # source://prism//lib/prism/node.rb#1879 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, parameters: T.nilable(Prism::ParametersNode), locals: T::Array[Prism::BlockLocalVariableNode], opening_loc: T.nilable(Prism::Location), - closing_loc: T.nilable(Prism::Location), - location: Prism::Location + closing_loc: T.nilable(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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), parameters: T.unsafe(nil), locals: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2026 + # source://prism//lib/prism/node.rb#1861 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { parameters: ParametersNode?, locals: Array[BlockLocalVariableNode], opening_loc: Location?, closing_loc: Location?, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, parameters: ParametersNode?, locals: Array[BlockLocalVariableNode], opening_loc: Location?, closing_loc: Location? } # - # source://prism//lib/prism/node.rb#2052 + # source://prism//lib/prism/node.rb#1887 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -2630,62 +2483,44 @@ class Prism::BlockParametersNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#2099 + # source://prism//lib/prism/node.rb#1934 sig { override.returns(String) } def inspect; end # attr_reader locals: Array[BlockLocalVariableNode] # - # source://prism//lib/prism/node.rb#2060 + # source://prism//lib/prism/node.rb#1895 sig { returns(T::Array[Prism::BlockLocalVariableNode]) } def locals; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#2089 + # source://prism//lib/prism/node.rb#1924 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#2063 + # source://prism//lib/prism/node.rb#1898 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader parameters: ParametersNode? # - # source://prism//lib/prism/node.rb#2057 + # source://prism//lib/prism/node.rb#1892 sig { returns(T.nilable(Prism::ParametersNode)) } def parameters; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#2117 + # source://prism//lib/prism/node.rb#1939 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#2127 + # source://prism//lib/prism/node.rb#1944 def type; end end end @@ -2695,32 +2530,34 @@ end # break foo # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#2147 +# source://prism//lib/prism/node.rb#1964 class Prism::BreakNode < ::Prism::Node - # def initialize: (ArgumentsNode? arguments, Location keyword_loc, Location location) -> void + # Initialize a new BreakNode node. # # @return [BreakNode] a new instance of BreakNode # - # source://prism//lib/prism/node.rb#2149 + # source://prism//lib/prism/node.rb#1966 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, arguments: T.nilable(Prism::ArgumentsNode), - keyword_loc: Prism::Location, - location: Prism::Location + keyword_loc: Prism::Location ).void end - def initialize(source, arguments, keyword_loc, location); end + def initialize(source, node_id, location, flags, arguments, keyword_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#2247 + # source://prism//lib/prism/node.rb#2048 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2157 + # source://prism//lib/prism/node.rb#1976 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -2729,50 +2566,52 @@ class Prism::BreakNode < ::Prism::Node # break foo # ^^^ # - # source://prism//lib/prism/node.rb#2195 + # source://prism//lib/prism/node.rb#2014 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2162 + # source://prism//lib/prism/node.rb#1981 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#2174 + # source://prism//lib/prism/node.rb#1993 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#2167 + # source://prism//lib/prism/node.rb#1986 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?arguments: ArgumentsNode?, ?keyword_loc: Location, ?location: Location) -> BreakNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?arguments: ArgumentsNode?, ?keyword_loc: Location) -> BreakNode # - # source://prism//lib/prism/node.rb#2179 + # source://prism//lib/prism/node.rb#1998 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, arguments: T.nilable(Prism::ArgumentsNode), - keyword_loc: Prism::Location, - location: Prism::Location + keyword_loc: Prism::Location ).returns(Prism::BreakNode) end - def copy(arguments: T.unsafe(nil), keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), arguments: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2162 + # source://prism//lib/prism/node.rb#1981 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { arguments: ArgumentsNode?, keyword_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, arguments: ArgumentsNode?, keyword_loc: Location } # - # source://prism//lib/prism/node.rb#2187 + # source://prism//lib/prism/node.rb#2006 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -2781,13 +2620,13 @@ class Prism::BreakNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#2213 + # source://prism//lib/prism/node.rb#2032 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#2208 + # source://prism//lib/prism/node.rb#2027 sig { returns(String) } def keyword; end @@ -2796,38 +2635,20 @@ class Prism::BreakNode < ::Prism::Node # break foo # ^^^^^ # - # source://prism//lib/prism/node.rb#2201 + # source://prism//lib/prism/node.rb#2020 sig { returns(Prism::Location) } def keyword_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#2231 + # source://prism//lib/prism/node.rb#2037 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#2241 + # source://prism//lib/prism/node.rb#2042 def type; end end end @@ -2837,16 +2658,18 @@ end # foo.bar &&= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#2258 +# source://prism//lib/prism/node.rb#2059 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 + # Initialize a new CallAndWriteNode node. # # @return [CallAndWriteNode] a new instance of CallAndWriteNode # - # source://prism//lib/prism/node.rb#2260 + # source://prism//lib/prism/node.rb#2061 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), @@ -2854,21 +2677,20 @@ class Prism::CallAndWriteNode < ::Prism::Node read_name: Symbol, write_name: Symbol, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, location); end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#2428 + # source://prism//lib/prism/node.rb#2208 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2274 + # source://prism//lib/prism/node.rb#2076 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -2876,45 +2698,47 @@ class Prism::CallAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2369 + # source://prism//lib/prism/node.rb#2122 sig { returns(T::Boolean) } def attribute_write?; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#2379 + # source://prism//lib/prism/node.rb#2177 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#2317 + # source://prism//lib/prism/node.rb#2135 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2279 + # source://prism//lib/prism/node.rb#2081 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#2292 + # source://prism//lib/prism/node.rb#2094 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#2284 + # source://prism//lib/prism/node.rb#2086 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?operator_loc: Location, ?value: Prism::node) -> CallAndWriteNode # - # source://prism//lib/prism/node.rb#2297 + # source://prism//lib/prism/node.rb#2099 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), @@ -2922,22 +2746,21 @@ class Prism::CallAndWriteNode < ::Prism::Node read_name: Symbol, write_name: Symbol, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), message_loc: T.unsafe(nil), read_name: T.unsafe(nil), write_name: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2279 + # source://prism//lib/prism/node.rb#2081 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { 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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#2305 + # source://prism//lib/prism/node.rb#2107 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -2948,49 +2771,49 @@ class Prism::CallAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2374 + # source://prism//lib/prism/node.rb#2127 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#2394 + # source://prism//lib/prism/node.rb#2192 sig { override.returns(String) } def inspect; end # def message: () -> String? # - # source://prism//lib/prism/node.rb#2384 + # source://prism//lib/prism/node.rb#2182 sig { returns(T.nilable(String)) } def message; end # attr_reader message_loc: Location? # - # source://prism//lib/prism/node.rb#2330 + # source://prism//lib/prism/node.rb#2148 sig { returns(T.nilable(Prism::Location)) } def message_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#2389 + # source://prism//lib/prism/node.rb#2187 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#2349 + # source://prism//lib/prism/node.rb#2167 sig { returns(Prism::Location) } def operator_loc; end # attr_reader read_name: Symbol # - # source://prism//lib/prism/node.rb#2343 + # source://prism//lib/prism/node.rb#2161 sig { returns(Symbol) } def read_name; end # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#2314 + # source://prism//lib/prism/node.rb#2132 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -2998,32 +2821,19 @@ class Prism::CallAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2359 + # source://prism//lib/prism/node.rb#2112 sig { returns(T::Boolean) } def safe_navigation?; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#2412 + # source://prism//lib/prism/node.rb#2197 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#2356 + # source://prism//lib/prism/node.rb#2174 sig { returns(Prism::Node) } def value; end @@ -3031,33 +2841,20 @@ class Prism::CallAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2364 + # source://prism//lib/prism/node.rb#2117 sig { returns(T::Boolean) } def variable_call?; end # attr_reader write_name: Symbol # - # source://prism//lib/prism/node.rb#2346 + # source://prism//lib/prism/node.rb#2164 sig { returns(Symbol) } def write_name; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#2310 - 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#2422 + # source://prism//lib/prism/node.rb#2202 def type; end end end @@ -3082,16 +2879,18 @@ end # foo&.bar # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#2460 +# source://prism//lib/prism/node.rb#2240 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 + # Initialize a new CallNode node. # # @return [CallNode] a new instance of CallNode # - # source://prism//lib/prism/node.rb#2462 + # source://prism//lib/prism/node.rb#2242 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), @@ -3100,27 +2899,26 @@ class Prism::CallNode < ::Prism::Node 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 + block: T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) ).void end - def initialize(source, flags, receiver, call_operator_loc, name, message_loc, opening_loc, arguments, closing_loc, block, location); end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, name, message_loc, opening_loc, arguments, closing_loc, block); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#2665 + # source://prism//lib/prism/node.rb#2424 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2477 + # source://prism//lib/prism/node.rb#2258 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#2572 + # source://prism//lib/prism/node.rb#2369 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end @@ -3128,63 +2926,65 @@ class Prism::CallNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2601 + # source://prism//lib/prism/node.rb#2305 sig { returns(T::Boolean) } def attribute_write?; end - # attr_reader block: Prism::node? + # attr_reader block: BlockNode | BlockArgumentNode | nil # - # source://prism//lib/prism/node.rb#2588 - sig { returns(T.nilable(Prism::Node)) } + # source://prism//lib/prism/node.rb#2385 + sig { returns(T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode))) } def block; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#2611 + # source://prism//lib/prism/node.rb#2388 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#2530 + # source://prism//lib/prism/node.rb#2327 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2482 + # source://prism//lib/prism/node.rb#2263 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#2626 + # source://prism//lib/prism/node.rb#2403 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#2575 + # source://prism//lib/prism/node.rb#2372 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#2496 + # source://prism//lib/prism/node.rb#2277 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#2487 + # source://prism//lib/prism/node.rb#2268 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?name: Symbol, ?message_loc: Location?, ?opening_loc: Location?, ?arguments: ArgumentsNode?, ?closing_loc: Location?, ?block: BlockNode | BlockArgumentNode | nil) -> CallNode # - # source://prism//lib/prism/node.rb#2501 + # source://prism//lib/prism/node.rb#2282 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), @@ -3193,22 +2993,21 @@ class Prism::CallNode < ::Prism::Node 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 + block: T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) ).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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), name: T.unsafe(nil), message_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2482 + # source://prism//lib/prism/node.rb#2263 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { 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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, name: Symbol, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, block: BlockNode | BlockArgumentNode | nil } # - # source://prism//lib/prism/node.rb#2509 + # source://prism//lib/prism/node.rb#2290 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -3225,7 +3024,7 @@ class Prism::CallNode < ::Prism::Node # sometimes you want the location of the full message including the inner # space and the = sign. This method provides that. # - # source://prism//lib/prism/node_ext.rb#315 + # source://prism//lib/prism/node_ext.rb#331 sig { returns(T.nilable(Prism::Location)) } def full_message_loc; end @@ -3233,43 +3032,43 @@ class Prism::CallNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2606 + # source://prism//lib/prism/node.rb#2310 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#2631 + # source://prism//lib/prism/node.rb#2408 sig { override.returns(String) } def inspect; end # def message: () -> String? # - # source://prism//lib/prism/node.rb#2616 + # source://prism//lib/prism/node.rb#2393 sig { returns(T.nilable(String)) } def message; end # attr_reader message_loc: Location? # - # source://prism//lib/prism/node.rb#2546 + # source://prism//lib/prism/node.rb#2343 sig { returns(T.nilable(Prism::Location)) } def message_loc; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#2543 + # source://prism//lib/prism/node.rb#2340 sig { returns(Symbol) } def name; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#2621 + # source://prism//lib/prism/node.rb#2398 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#2559 + # source://prism//lib/prism/node.rb#2356 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end @@ -3284,7 +3083,7 @@ class Prism::CallNode < ::Prism::Node # foo + bar # ^^^ # - # source://prism//lib/prism/node.rb#2527 + # source://prism//lib/prism/node.rb#2324 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -3292,26 +3091,13 @@ class Prism::CallNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2591 + # source://prism//lib/prism/node.rb#2295 sig { returns(T::Boolean) } def safe_navigation?; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#2649 + # source://prism//lib/prism/node.rb#2413 sig { override.returns(Symbol) } def type; end @@ -3319,54 +3105,41 @@ class Prism::CallNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2596 + # source://prism//lib/prism/node.rb#2300 sig { returns(T::Boolean) } def variable_call?; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#2514 - 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#2659 + # source://prism//lib/prism/node.rb#2418 def type; end end end # Flags for call nodes. # -# source://prism//lib/prism/node.rb#19142 +# source://prism//lib/prism/node.rb#16708 module Prism::CallNodeFlags; end # a call that is an attribute write, so the value being written should be returned # -# source://prism//lib/prism/node.rb#19150 +# source://prism//lib/prism/node.rb#16716 Prism::CallNodeFlags::ATTRIBUTE_WRITE = T.let(T.unsafe(nil), Integer) # a call that ignores method visibility # -# source://prism//lib/prism/node.rb#19153 +# source://prism//lib/prism/node.rb#16719 Prism::CallNodeFlags::IGNORE_VISIBILITY = T.let(T.unsafe(nil), Integer) # &. operator # -# source://prism//lib/prism/node.rb#19144 +# source://prism//lib/prism/node.rb#16710 Prism::CallNodeFlags::SAFE_NAVIGATION = T.let(T.unsafe(nil), Integer) # a call that could have been a local variable # -# source://prism//lib/prism/node.rb#19147 +# source://prism//lib/prism/node.rb#16713 Prism::CallNodeFlags::VARIABLE_CALL = T.let(T.unsafe(nil), Integer) # Represents the use of an assignment operator on a call. @@ -3374,16 +3147,18 @@ Prism::CallNodeFlags::VARIABLE_CALL = T.let(T.unsafe(nil), Integer) # foo.bar += baz # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#2683 +# source://prism//lib/prism/node.rb#2442 class Prism::CallOperatorWriteNode < ::Prism::Node - # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location? message_loc, Symbol read_name, Symbol write_name, Symbol binary_operator, Location binary_operator_loc, Prism::node value, Location location) -> void + # Initialize a new CallOperatorWriteNode node. # # @return [CallOperatorWriteNode] a new instance of CallOperatorWriteNode # - # source://prism//lib/prism/node.rb#2685 + # source://prism//lib/prism/node.rb#2444 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), @@ -3392,21 +3167,20 @@ class Prism::CallOperatorWriteNode < ::Prism::Node write_name: Symbol, binary_operator: Symbol, binary_operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, flags, receiver, call_operator_loc, message_loc, read_name, write_name, binary_operator, binary_operator_loc, value, location); end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, message_loc, read_name, write_name, binary_operator, binary_operator_loc, value); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#2852 + # source://prism//lib/prism/node.rb#2590 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2700 + # source://prism//lib/prism/node.rb#2460 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -3414,57 +3188,59 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2798 + # source://prism//lib/prism/node.rb#2506 sig { returns(T::Boolean) } def attribute_write?; end # attr_reader binary_operator: Symbol # - # source://prism//lib/prism/node.rb#2775 + # source://prism//lib/prism/node.rb#2551 sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # - # source://prism//lib/prism/node.rb#2778 + # source://prism//lib/prism/node.rb#2554 sig { returns(Prism::Location) } def binary_operator_loc; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#2808 + # source://prism//lib/prism/node.rb#2564 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#2743 + # source://prism//lib/prism/node.rb#2519 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2705 + # source://prism//lib/prism/node.rb#2465 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#2718 + # source://prism//lib/prism/node.rb#2478 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#2710 + # source://prism//lib/prism/node.rb#2470 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?binary_operator: Symbol, ?binary_operator_loc: Location, ?value: Prism::node, ?location: Location) -> CallOperatorWriteNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?binary_operator: Symbol, ?binary_operator_loc: Location, ?value: Prism::node) -> CallOperatorWriteNode # - # source://prism//lib/prism/node.rb#2723 + # source://prism//lib/prism/node.rb#2483 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), @@ -3473,22 +3249,21 @@ class Prism::CallOperatorWriteNode < ::Prism::Node write_name: Symbol, binary_operator: Symbol, binary_operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).returns(Prism::CallOperatorWriteNode) end - def copy(flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), message_loc: T.unsafe(nil), read_name: T.unsafe(nil), write_name: T.unsafe(nil), binary_operator: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), message_loc: T.unsafe(nil), read_name: T.unsafe(nil), write_name: T.unsafe(nil), binary_operator: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2705 + # source://prism//lib/prism/node.rb#2465 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { 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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, binary_operator: Symbol, binary_operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#2731 + # source://prism//lib/prism/node.rb#2491 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -3499,49 +3274,49 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2803 + # source://prism//lib/prism/node.rb#2511 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#2818 + # source://prism//lib/prism/node.rb#2574 sig { override.returns(String) } def inspect; end # def message: () -> String? # - # source://prism//lib/prism/node.rb#2813 + # source://prism//lib/prism/node.rb#2569 sig { returns(T.nilable(String)) } def message; end # attr_reader message_loc: Location? # - # source://prism//lib/prism/node.rb#2756 + # source://prism//lib/prism/node.rb#2532 sig { returns(T.nilable(Prism::Location)) } def message_loc; end # Returns the binary operator used to modify the receiver. This method is # deprecated in favor of #binary_operator. # - # source://prism//lib/prism/node_ext.rb#323 + # source://prism//lib/prism/node_ext.rb#339 def operator; end # Returns the location of the binary operator used to modify the receiver. # This method is deprecated in favor of #binary_operator_loc. # - # source://prism//lib/prism/node_ext.rb#330 + # source://prism//lib/prism/node_ext.rb#346 def operator_loc; end # attr_reader read_name: Symbol # - # source://prism//lib/prism/node.rb#2769 + # source://prism//lib/prism/node.rb#2545 sig { returns(Symbol) } def read_name; end # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#2740 + # source://prism//lib/prism/node.rb#2516 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -3549,32 +3324,19 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2788 + # source://prism//lib/prism/node.rb#2496 sig { returns(T::Boolean) } def safe_navigation?; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#2836 + # source://prism//lib/prism/node.rb#2579 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#2785 + # source://prism//lib/prism/node.rb#2561 sig { returns(Prism::Node) } def value; end @@ -3582,33 +3344,20 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2793 + # source://prism//lib/prism/node.rb#2501 sig { returns(T::Boolean) } def variable_call?; end # attr_reader write_name: Symbol # - # source://prism//lib/prism/node.rb#2772 + # source://prism//lib/prism/node.rb#2548 sig { returns(Symbol) } def write_name; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#2736 - 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#2846 + # source://prism//lib/prism/node.rb#2584 def type; end end end @@ -3618,16 +3367,18 @@ end # foo.bar ||= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#2870 +# source://prism//lib/prism/node.rb#2608 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 + # Initialize a new CallOrWriteNode node. # # @return [CallOrWriteNode] a new instance of CallOrWriteNode # - # source://prism//lib/prism/node.rb#2872 + # source://prism//lib/prism/node.rb#2610 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), @@ -3635,21 +3386,20 @@ class Prism::CallOrWriteNode < ::Prism::Node read_name: Symbol, write_name: Symbol, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, location); end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#3040 + # source://prism//lib/prism/node.rb#2757 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2886 + # source://prism//lib/prism/node.rb#2625 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -3657,45 +3407,47 @@ class Prism::CallOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2981 + # source://prism//lib/prism/node.rb#2671 sig { returns(T::Boolean) } def attribute_write?; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#2991 + # source://prism//lib/prism/node.rb#2726 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#2929 + # source://prism//lib/prism/node.rb#2684 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2891 + # source://prism//lib/prism/node.rb#2630 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#2904 + # source://prism//lib/prism/node.rb#2643 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#2896 + # source://prism//lib/prism/node.rb#2635 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?operator_loc: Location, ?value: Prism::node) -> CallOrWriteNode # - # source://prism//lib/prism/node.rb#2909 + # source://prism//lib/prism/node.rb#2648 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), @@ -3703,22 +3455,21 @@ class Prism::CallOrWriteNode < ::Prism::Node read_name: Symbol, write_name: Symbol, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), message_loc: T.unsafe(nil), read_name: T.unsafe(nil), write_name: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2891 + # source://prism//lib/prism/node.rb#2630 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { 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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#2917 + # source://prism//lib/prism/node.rb#2656 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -3729,49 +3480,49 @@ class Prism::CallOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2986 + # source://prism//lib/prism/node.rb#2676 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#3006 + # source://prism//lib/prism/node.rb#2741 sig { override.returns(String) } def inspect; end # def message: () -> String? # - # source://prism//lib/prism/node.rb#2996 + # source://prism//lib/prism/node.rb#2731 sig { returns(T.nilable(String)) } def message; end # attr_reader message_loc: Location? # - # source://prism//lib/prism/node.rb#2942 + # source://prism//lib/prism/node.rb#2697 sig { returns(T.nilable(Prism::Location)) } def message_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#3001 + # source://prism//lib/prism/node.rb#2736 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#2961 + # source://prism//lib/prism/node.rb#2716 sig { returns(Prism::Location) } def operator_loc; end # attr_reader read_name: Symbol # - # source://prism//lib/prism/node.rb#2955 + # source://prism//lib/prism/node.rb#2710 sig { returns(Symbol) } def read_name; end # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#2926 + # source://prism//lib/prism/node.rb#2681 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -3779,32 +3530,19 @@ class Prism::CallOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2971 + # source://prism//lib/prism/node.rb#2661 sig { returns(T::Boolean) } def safe_navigation?; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#3024 + # source://prism//lib/prism/node.rb#2746 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#2968 + # source://prism//lib/prism/node.rb#2723 sig { returns(Prism::Node) } def value; end @@ -3812,33 +3550,20 @@ class Prism::CallOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2976 + # source://prism//lib/prism/node.rb#2666 sig { returns(T::Boolean) } def variable_call?; end # attr_reader write_name: Symbol # - # source://prism//lib/prism/node.rb#2958 + # source://prism//lib/prism/node.rb#2713 sig { returns(Symbol) } def write_name; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#2922 - 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#3034 + # source://prism//lib/prism/node.rb#2751 def type; end end end @@ -3856,35 +3581,36 @@ end # for foo.bar in baz do end # ^^^^^^^ # -# source://prism//lib/prism/node.rb#3065 +# source://prism//lib/prism/node.rb#2782 class Prism::CallTargetNode < ::Prism::Node - # def initialize: (Integer flags, Prism::node receiver, Location call_operator_loc, Symbol name, Location message_loc, Location location) -> void + # Initialize a new CallTargetNode node. # # @return [CallTargetNode] a new instance of CallTargetNode # - # source://prism//lib/prism/node.rb#3067 + # source://prism//lib/prism/node.rb#2784 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: Prism::Node, call_operator_loc: Prism::Location, name: Symbol, - message_loc: Prism::Location, - location: Prism::Location + message_loc: Prism::Location ).void end - def initialize(source, flags, receiver, call_operator_loc, name, message_loc, location); end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, name, message_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#3199 + # source://prism//lib/prism/node.rb#2895 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3078 + # source://prism//lib/prism/node.rb#2796 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -3892,65 +3618,66 @@ class Prism::CallTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3145 + # source://prism//lib/prism/node.rb#2839 sig { returns(T::Boolean) } def attribute_write?; end # def call_operator: () -> String # - # source://prism//lib/prism/node.rb#3155 + # source://prism//lib/prism/node.rb#2869 sig { returns(String) } def call_operator; end # attr_reader call_operator_loc: Location # - # source://prism//lib/prism/node.rb#3118 + # source://prism//lib/prism/node.rb#2852 sig { returns(Prism::Location) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3083 + # source://prism//lib/prism/node.rb#2801 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3093 + # source://prism//lib/prism/node.rb#2811 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3088 + # source://prism//lib/prism/node.rb#2806 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node, ?call_operator_loc: Location, ?name: Symbol, ?message_loc: Location) -> CallTargetNode # - # source://prism//lib/prism/node.rb#3098 + # source://prism//lib/prism/node.rb#2816 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: Prism::Node, call_operator_loc: Prism::Location, name: Symbol, - message_loc: Prism::Location, - location: Prism::Location + message_loc: 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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), name: T.unsafe(nil), message_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3083 + # source://prism//lib/prism/node.rb#2801 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node, call_operator_loc: Location, name: Symbol, message_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node, call_operator_loc: Location, name: Symbol, message_loc: Location } # - # source://prism//lib/prism/node.rb#3106 + # source://prism//lib/prism/node.rb#2824 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -3961,37 +3688,37 @@ class Prism::CallTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3150 + # source://prism//lib/prism/node.rb#2844 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#3165 + # source://prism//lib/prism/node.rb#2879 sig { override.returns(String) } def inspect; end # def message: () -> String # - # source://prism//lib/prism/node.rb#3160 + # source://prism//lib/prism/node.rb#2874 sig { returns(String) } def message; end # attr_reader message_loc: Location # - # source://prism//lib/prism/node.rb#3128 + # source://prism//lib/prism/node.rb#2862 sig { returns(Prism::Location) } def message_loc; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#3125 + # source://prism//lib/prism/node.rb#2859 sig { returns(Symbol) } def name; end # attr_reader receiver: Prism::node # - # source://prism//lib/prism/node.rb#3115 + # source://prism//lib/prism/node.rb#2849 sig { returns(Prism::Node) } def receiver; end @@ -3999,26 +3726,13 @@ class Prism::CallTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3135 + # source://prism//lib/prism/node.rb#2829 sig { returns(T::Boolean) } def safe_navigation?; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3183 + # source://prism//lib/prism/node.rb#2884 sig { override.returns(Symbol) } def type; end @@ -4026,27 +3740,14 @@ class Prism::CallTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3140 + # source://prism//lib/prism/node.rb#2834 sig { returns(T::Boolean) } def variable_call?; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#3111 - 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3193 + # source://prism//lib/prism/node.rb#2889 def type; end end end @@ -4056,77 +3757,81 @@ end # foo => [bar => baz] # ^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3213 +# source://prism//lib/prism/node.rb#2909 class Prism::CapturePatternNode < ::Prism::Node - # def initialize: (Prism::node value, Prism::node target, Location operator_loc, Location location) -> void + # Initialize a new CapturePatternNode node. # # @return [CapturePatternNode] a new instance of CapturePatternNode # - # source://prism//lib/prism/node.rb#3215 + # source://prism//lib/prism/node.rb#2911 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, value: Prism::Node, - target: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + target: Prism::LocalVariableTargetNode, + operator_loc: Prism::Location ).void end - def initialize(source, value, target, operator_loc, location); end + def initialize(source, node_id, location, flags, value, target, operator_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#3309 + # source://prism//lib/prism/node.rb#2989 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3224 + # source://prism//lib/prism/node.rb#2922 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3229 + # source://prism//lib/prism/node.rb#2927 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3239 + # source://prism//lib/prism/node.rb#2937 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3234 + # source://prism//lib/prism/node.rb#2932 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Prism::node, ?target: LocalVariableTargetNode, ?operator_loc: Location) -> CapturePatternNode # - # source://prism//lib/prism/node.rb#3244 + # source://prism//lib/prism/node.rb#2942 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, value: Prism::Node, - target: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + target: Prism::LocalVariableTargetNode, + operator_loc: 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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3229 + # source://prism//lib/prism/node.rb#2927 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::node, target: Prism::node, operator_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node, target: LocalVariableTargetNode, operator_loc: Location } # - # source://prism//lib/prism/node.rb#3252 + # source://prism//lib/prism/node.rb#2950 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -4135,62 +3840,44 @@ class Prism::CapturePatternNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#3275 + # source://prism//lib/prism/node.rb#2973 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#3270 + # source://prism//lib/prism/node.rb#2968 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#3263 + # source://prism//lib/prism/node.rb#2961 sig { returns(Prism::Location) } def operator_loc; end - # attr_reader target: Prism::node + # attr_reader target: LocalVariableTargetNode # - # source://prism//lib/prism/node.rb#3260 - sig { returns(Prism::Node) } + # source://prism//lib/prism/node.rb#2958 + sig { returns(Prism::LocalVariableTargetNode) } def target; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#3293 + # source://prism//lib/prism/node.rb#2978 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#3257 + # source://prism//lib/prism/node.rb#2955 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3303 + # source://prism//lib/prism/node.rb#2983 def type; end end end @@ -4202,117 +3889,127 @@ end # end # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3323 +# source://prism//lib/prism/node.rb#3003 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 + # Initialize a new CaseMatchNode node. # # @return [CaseMatchNode] a new instance of CaseMatchNode # - # source://prism//lib/prism/node.rb#3325 + # source://prism//lib/prism/node.rb#3005 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, predicate: T.nilable(Prism::Node), - conditions: T::Array[Prism::Node], - consequent: T.nilable(Prism::ElseNode), + conditions: T::Array[Prism::InNode], + else_clause: T.nilable(Prism::ElseNode), case_keyword_loc: Prism::Location, - end_keyword_loc: Prism::Location, - location: Prism::Location + end_keyword_loc: Prism::Location ).void end - def initialize(source, predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location); end + def initialize(source, node_id, location, flags, predicate, conditions, else_clause, case_keyword_loc, end_keyword_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#3440 + # source://prism//lib/prism/node.rb#3104 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3336 + # source://prism//lib/prism/node.rb#3018 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def case_keyword: () -> String # - # source://prism//lib/prism/node.rb#3396 + # source://prism//lib/prism/node.rb#3078 sig { returns(String) } def case_keyword; end # attr_reader case_keyword_loc: Location # - # source://prism//lib/prism/node.rb#3382 + # source://prism//lib/prism/node.rb#3064 sig { returns(Prism::Location) } def case_keyword_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3341 + # source://prism//lib/prism/node.rb#3023 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3355 + # source://prism//lib/prism/node.rb#3037 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3346 + # source://prism//lib/prism/node.rb#3028 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # attr_reader conditions: Array[Prism::node] + # attr_reader conditions: Array[InNode] # - # source://prism//lib/prism/node.rb#3376 - sig { returns(T::Array[Prism::Node]) } + # source://prism//lib/prism/node.rb#3058 + sig { returns(T::Array[Prism::InNode]) } def conditions; end - # attr_reader consequent: ElseNode? + # Returns the else clause of the case match node. This method is deprecated + # in favor of #else_clause. # - # source://prism//lib/prism/node.rb#3379 - sig { returns(T.nilable(Prism::ElseNode)) } + # source://prism//lib/prism/node_ext.rb#467 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?predicate: Prism::node?, ?conditions: Array[InNode], ?else_clause: ElseNode?, ?case_keyword_loc: Location, ?end_keyword_loc: Location) -> CaseMatchNode # - # source://prism//lib/prism/node.rb#3360 + # source://prism//lib/prism/node.rb#3042 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, predicate: T.nilable(Prism::Node), - conditions: T::Array[Prism::Node], - consequent: T.nilable(Prism::ElseNode), + conditions: T::Array[Prism::InNode], + else_clause: T.nilable(Prism::ElseNode), case_keyword_loc: Prism::Location, - end_keyword_loc: Prism::Location, - location: Prism::Location + end_keyword_loc: 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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), predicate: T.unsafe(nil), conditions: T.unsafe(nil), else_clause: T.unsafe(nil), case_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3341 + # source://prism//lib/prism/node.rb#3023 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { predicate: Prism::node?, conditions: Array[Prism::node], consequent: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, predicate: Prism::node?, conditions: Array[InNode], else_clause: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location } # - # source://prism//lib/prism/node.rb#3368 + # source://prism//lib/prism/node.rb#3050 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # attr_reader else_clause: ElseNode? + # + # source://prism//lib/prism/node.rb#3061 + sig { returns(T.nilable(Prism::ElseNode)) } + def else_clause; end + # def end_keyword: () -> String # - # source://prism//lib/prism/node.rb#3401 + # source://prism//lib/prism/node.rb#3083 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#3389 + # source://prism//lib/prism/node.rb#3071 sig { returns(Prism::Location) } def end_keyword_loc; end @@ -4321,44 +4018,26 @@ class Prism::CaseMatchNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#3406 + # source://prism//lib/prism/node.rb#3088 sig { override.returns(String) } def inspect; end # attr_reader predicate: Prism::node? # - # source://prism//lib/prism/node.rb#3373 + # source://prism//lib/prism/node.rb#3055 sig { returns(T.nilable(Prism::Node)) } def predicate; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#3424 + # source://prism//lib/prism/node.rb#3093 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3434 + # source://prism//lib/prism/node.rb#3098 def type; end end end @@ -4370,117 +4049,127 @@ end # end # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3457 +# source://prism//lib/prism/node.rb#3121 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 + # Initialize a new CaseNode node. # # @return [CaseNode] a new instance of CaseNode # - # source://prism//lib/prism/node.rb#3459 + # source://prism//lib/prism/node.rb#3123 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, predicate: T.nilable(Prism::Node), - conditions: T::Array[Prism::Node], - consequent: T.nilable(Prism::ElseNode), + conditions: T::Array[Prism::WhenNode], + else_clause: T.nilable(Prism::ElseNode), case_keyword_loc: Prism::Location, - end_keyword_loc: Prism::Location, - location: Prism::Location + end_keyword_loc: Prism::Location ).void end - def initialize(source, predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location); end + def initialize(source, node_id, location, flags, predicate, conditions, else_clause, case_keyword_loc, end_keyword_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#3574 + # source://prism//lib/prism/node.rb#3222 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3470 + # source://prism//lib/prism/node.rb#3136 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def case_keyword: () -> String # - # source://prism//lib/prism/node.rb#3530 + # source://prism//lib/prism/node.rb#3196 sig { returns(String) } def case_keyword; end # attr_reader case_keyword_loc: Location # - # source://prism//lib/prism/node.rb#3516 + # source://prism//lib/prism/node.rb#3182 sig { returns(Prism::Location) } def case_keyword_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3475 + # source://prism//lib/prism/node.rb#3141 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3489 + # source://prism//lib/prism/node.rb#3155 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3480 + # source://prism//lib/prism/node.rb#3146 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # attr_reader conditions: Array[Prism::node] + # attr_reader conditions: Array[WhenNode] # - # source://prism//lib/prism/node.rb#3510 - sig { returns(T::Array[Prism::Node]) } + # source://prism//lib/prism/node.rb#3176 + sig { returns(T::Array[Prism::WhenNode]) } def conditions; end - # attr_reader consequent: ElseNode? + # Returns the else clause of the case node. This method is deprecated in + # favor of #else_clause. # - # source://prism//lib/prism/node.rb#3513 - sig { returns(T.nilable(Prism::ElseNode)) } + # source://prism//lib/prism/node_ext.rb#476 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?predicate: Prism::node?, ?conditions: Array[WhenNode], ?else_clause: ElseNode?, ?case_keyword_loc: Location, ?end_keyword_loc: Location) -> CaseNode # - # source://prism//lib/prism/node.rb#3494 + # source://prism//lib/prism/node.rb#3160 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, predicate: T.nilable(Prism::Node), - conditions: T::Array[Prism::Node], - consequent: T.nilable(Prism::ElseNode), + conditions: T::Array[Prism::WhenNode], + else_clause: T.nilable(Prism::ElseNode), case_keyword_loc: Prism::Location, - end_keyword_loc: Prism::Location, - location: Prism::Location + end_keyword_loc: 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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), predicate: T.unsafe(nil), conditions: T.unsafe(nil), else_clause: T.unsafe(nil), case_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3475 + # source://prism//lib/prism/node.rb#3141 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { predicate: Prism::node?, conditions: Array[Prism::node], consequent: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, predicate: Prism::node?, conditions: Array[WhenNode], else_clause: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location } # - # source://prism//lib/prism/node.rb#3502 + # source://prism//lib/prism/node.rb#3168 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # attr_reader else_clause: ElseNode? + # + # source://prism//lib/prism/node.rb#3179 + sig { returns(T.nilable(Prism::ElseNode)) } + def else_clause; end + # def end_keyword: () -> String # - # source://prism//lib/prism/node.rb#3535 + # source://prism//lib/prism/node.rb#3201 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#3523 + # source://prism//lib/prism/node.rb#3189 sig { returns(Prism::Location) } def end_keyword_loc; end @@ -4489,44 +4178,26 @@ class Prism::CaseNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#3540 + # source://prism//lib/prism/node.rb#3206 sig { override.returns(String) } def inspect; end # attr_reader predicate: Prism::node? # - # source://prism//lib/prism/node.rb#3507 + # source://prism//lib/prism/node.rb#3173 sig { returns(T.nilable(Prism::Node)) } def predicate; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#3558 + # source://prism//lib/prism/node.rb#3211 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3568 + # source://prism//lib/prism/node.rb#3216 def type; end end end @@ -4536,123 +4207,127 @@ end # class Foo end # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3589 +# source://prism//lib/prism/node.rb#3237 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 + # Initialize a new ClassNode node. # # @return [ClassNode] a new instance of ClassNode # - # source://prism//lib/prism/node.rb#3591 + # source://prism//lib/prism/node.rb#3239 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, locals: T::Array[Symbol], class_keyword_loc: Prism::Location, - constant_path: Prism::Node, + constant_path: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::CallNode), inheritance_operator_loc: T.nilable(Prism::Location), superclass: T.nilable(Prism::Node), - body: T.nilable(Prism::Node), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), end_keyword_loc: Prism::Location, - name: Symbol, - location: Prism::Location + name: Symbol ).void end - def initialize(source, locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, body, end_keyword_loc, name, location); end + def initialize(source, node_id, location, flags, locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, body, end_keyword_loc, name); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#3733 + # source://prism//lib/prism/node.rb#3365 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3605 + # source://prism//lib/prism/node.rb#3255 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # attr_reader body: Prism::node? + # attr_reader body: StatementsNode | BeginNode | nil # - # source://prism//lib/prism/node.rb#3671 - sig { returns(T.nilable(Prism::Node)) } + # source://prism//lib/prism/node.rb#3321 + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3610 + # source://prism//lib/prism/node.rb#3260 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def class_keyword: () -> String # - # source://prism//lib/prism/node.rb#3684 + # source://prism//lib/prism/node.rb#3334 sig { returns(String) } def class_keyword; end # attr_reader class_keyword_loc: Location # - # source://prism//lib/prism/node.rb#3645 + # source://prism//lib/prism/node.rb#3295 sig { returns(Prism::Location) } def class_keyword_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3624 + # source://prism//lib/prism/node.rb#3274 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3615 + # source://prism//lib/prism/node.rb#3265 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # attr_reader constant_path: Prism::node + # attr_reader constant_path: ConstantReadNode | ConstantPathNode | CallNode # - # source://prism//lib/prism/node.rb#3652 - sig { returns(Prism::Node) } + # source://prism//lib/prism/node.rb#3302 + sig { returns(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::CallNode)) } 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?class_keyword_loc: Location, ?constant_path: ConstantReadNode | ConstantPathNode | CallNode, ?inheritance_operator_loc: Location?, ?superclass: Prism::node?, ?body: StatementsNode | BeginNode | nil, ?end_keyword_loc: Location, ?name: Symbol) -> ClassNode # - # source://prism//lib/prism/node.rb#3629 + # source://prism//lib/prism/node.rb#3279 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, locals: T::Array[Symbol], class_keyword_loc: Prism::Location, - constant_path: Prism::Node, + constant_path: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::CallNode), inheritance_operator_loc: T.nilable(Prism::Location), superclass: T.nilable(Prism::Node), - body: T.nilable(Prism::Node), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), end_keyword_loc: Prism::Location, - name: Symbol, - location: Prism::Location + name: Symbol ).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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), class_keyword_loc: T.unsafe(nil), constant_path: T.unsafe(nil), inheritance_operator_loc: T.unsafe(nil), superclass: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), name: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3610 + # source://prism//lib/prism/node.rb#3260 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { 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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], class_keyword_loc: Location, constant_path: ConstantReadNode | ConstantPathNode | CallNode, inheritance_operator_loc: Location?, superclass: Prism::node?, body: StatementsNode | BeginNode | nil, end_keyword_loc: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#3637 + # source://prism//lib/prism/node.rb#3287 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def end_keyword: () -> String # - # source://prism//lib/prism/node.rb#3694 + # source://prism//lib/prism/node.rb#3344 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#3674 + # source://prism//lib/prism/node.rb#3324 sig { returns(Prism::Location) } def end_keyword_loc; end @@ -4661,68 +4336,50 @@ class Prism::ClassNode < ::Prism::Node # def inheritance_operator: () -> String? # - # source://prism//lib/prism/node.rb#3689 + # source://prism//lib/prism/node.rb#3339 sig { returns(T.nilable(String)) } def inheritance_operator; end # attr_reader inheritance_operator_loc: Location? # - # source://prism//lib/prism/node.rb#3655 + # source://prism//lib/prism/node.rb#3305 sig { returns(T.nilable(Prism::Location)) } def inheritance_operator_loc; end # def inspect -> String # - # source://prism//lib/prism/node.rb#3699 + # source://prism//lib/prism/node.rb#3349 sig { override.returns(String) } def inspect; end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#3642 + # source://prism//lib/prism/node.rb#3292 sig { returns(T::Array[Symbol]) } def locals; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#3681 + # source://prism//lib/prism/node.rb#3331 sig { returns(Symbol) } def name; end # attr_reader superclass: Prism::node? # - # source://prism//lib/prism/node.rb#3668 + # source://prism//lib/prism/node.rb#3318 sig { returns(T.nilable(Prism::Node)) } def superclass; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#3717 + # source://prism//lib/prism/node.rb#3354 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#3727 + # source://prism//lib/prism/node.rb#3359 def type; end end end @@ -4732,83 +4389,87 @@ end # @@target &&= value # ^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3751 +# source://prism//lib/prism/node.rb#3383 class Prism::ClassVariableAndWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void + # Initialize a new ClassVariableAndWriteNode node. # # @return [ClassVariableAndWriteNode] a new instance of ClassVariableAndWriteNode # - # source://prism//lib/prism/node.rb#3753 + # source://prism//lib/prism/node.rb#3385 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, name, name_loc, operator_loc, value, location); end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#3855 + # source://prism//lib/prism/node.rb#3471 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3763 + # source://prism//lib/prism/node.rb#3397 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3768 + # source://prism//lib/prism/node.rb#3402 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3778 + # source://prism//lib/prism/node.rb#3412 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3773 + # source://prism//lib/prism/node.rb#3407 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> ClassVariableAndWriteNode # - # source://prism//lib/prism/node.rb#3783 + # source://prism//lib/prism/node.rb#3417 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3768 + # source://prism//lib/prism/node.rb#3402 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#3791 + # source://prism//lib/prism/node.rb#3425 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # source://prism//lib/prism/desugar_compiler.rb#127 + # source://prism//lib/prism/desugar_compiler.rb#164 def desugar; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -4816,68 +4477,50 @@ class Prism::ClassVariableAndWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#3821 + # source://prism//lib/prism/node.rb#3455 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#3796 + # source://prism//lib/prism/node.rb#3430 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#3799 + # source://prism//lib/prism/node.rb#3433 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#3816 + # source://prism//lib/prism/node.rb#3450 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#3806 + # source://prism//lib/prism/node.rb#3440 sig { returns(Prism::Location) } def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#3839 + # source://prism//lib/prism/node.rb#3460 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#3813 + # source://prism//lib/prism/node.rb#3447 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3849 + # source://prism//lib/prism/node.rb#3465 def type; end end end @@ -4887,97 +4530,101 @@ end # @@target += value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3868 +# source://prism//lib/prism/node.rb#3484 class Prism::ClassVariableOperatorWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location binary_operator_loc, Prism::node value, Symbol binary_operator, Location location) -> void + # Initialize a new ClassVariableOperatorWriteNode node. # # @return [ClassVariableOperatorWriteNode] a new instance of ClassVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#3870 + # source://prism//lib/prism/node.rb#3486 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, binary_operator_loc: Prism::Location, value: Prism::Node, - binary_operator: Symbol, - location: Prism::Location + binary_operator: Symbol ).void end - def initialize(source, name, name_loc, binary_operator_loc, value, binary_operator, location); end + def initialize(source, node_id, location, flags, name, name_loc, binary_operator_loc, value, binary_operator); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#3971 + # source://prism//lib/prism/node.rb#3571 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3881 + # source://prism//lib/prism/node.rb#3499 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader binary_operator: Symbol # - # source://prism//lib/prism/node.rb#3934 + # source://prism//lib/prism/node.rb#3552 sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # - # source://prism//lib/prism/node.rb#3924 + # source://prism//lib/prism/node.rb#3542 sig { returns(Prism::Location) } def binary_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3886 + # source://prism//lib/prism/node.rb#3504 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3896 + # source://prism//lib/prism/node.rb#3514 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#3891 + # source://prism//lib/prism/node.rb#3509 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol, ?location: Location) -> ClassVariableOperatorWriteNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> ClassVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#3901 + # source://prism//lib/prism/node.rb#3519 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, binary_operator_loc: Prism::Location, value: Prism::Node, - binary_operator: Symbol, - location: Prism::Location + binary_operator: Symbol ).returns(Prism::ClassVariableOperatorWriteNode) end - def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3886 + # source://prism//lib/prism/node.rb#3504 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } # - # source://prism//lib/prism/node.rb#3909 + # source://prism//lib/prism/node.rb#3527 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # source://prism//lib/prism/desugar_compiler.rb#139 + # source://prism//lib/prism/desugar_compiler.rb#176 def desugar; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -4985,68 +4632,50 @@ class Prism::ClassVariableOperatorWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#3937 + # source://prism//lib/prism/node.rb#3555 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#3914 + # source://prism//lib/prism/node.rb#3532 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#3917 + # source://prism//lib/prism/node.rb#3535 sig { returns(Prism::Location) } def name_loc; end # Returns the binary operator used to modify the receiver. This method is # deprecated in favor of #binary_operator. # - # source://prism//lib/prism/node_ext.rb#339 + # source://prism//lib/prism/node_ext.rb#355 def operator; end # Returns the location of the binary operator used to modify the receiver. # This method is deprecated in favor of #binary_operator_loc. # - # source://prism//lib/prism/node_ext.rb#346 + # source://prism//lib/prism/node_ext.rb#362 def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # 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. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#3955 + # source://prism//lib/prism/node.rb#3560 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#3931 + # source://prism//lib/prism/node.rb#3549 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#3965 + # source://prism//lib/prism/node.rb#3565 def type; end end end @@ -5056,83 +4685,87 @@ end # @@target ||= value # ^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3985 +# source://prism//lib/prism/node.rb#3585 class Prism::ClassVariableOrWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void + # Initialize a new ClassVariableOrWriteNode node. # # @return [ClassVariableOrWriteNode] a new instance of ClassVariableOrWriteNode # - # source://prism//lib/prism/node.rb#3987 + # source://prism//lib/prism/node.rb#3587 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, name, name_loc, operator_loc, value, location); end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#4089 + # source://prism//lib/prism/node.rb#3673 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3997 + # source://prism//lib/prism/node.rb#3599 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4002 + # source://prism//lib/prism/node.rb#3604 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4012 + # 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#4007 + # source://prism//lib/prism/node.rb#3609 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> ClassVariableOrWriteNode # - # source://prism//lib/prism/node.rb#4017 + # source://prism//lib/prism/node.rb#3619 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4002 + # source://prism//lib/prism/node.rb#3604 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#4025 + # source://prism//lib/prism/node.rb#3627 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # source://prism//lib/prism/desugar_compiler.rb#133 + # source://prism//lib/prism/desugar_compiler.rb#170 def desugar; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -5140,68 +4773,50 @@ class Prism::ClassVariableOrWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#4055 + # source://prism//lib/prism/node.rb#3657 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4030 + # source://prism//lib/prism/node.rb#3632 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#4033 + # source://prism//lib/prism/node.rb#3635 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#4050 + # source://prism//lib/prism/node.rb#3652 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#4040 + # source://prism//lib/prism/node.rb#3642 sig { returns(Prism::Location) } def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#4073 + # source://prism//lib/prism/node.rb#3662 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#4047 + # source://prism//lib/prism/node.rb#3649 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4083 + # source://prism//lib/prism/node.rb#3667 def type; end end end @@ -5211,62 +4826,69 @@ end # @@foo # ^^^^^ # -# source://prism//lib/prism/node.rb#4102 +# source://prism//lib/prism/node.rb#3686 class Prism::ClassVariableReadNode < ::Prism::Node - # def initialize: (Symbol name, Location location) -> void + # Initialize a new ClassVariableReadNode node. # # @return [ClassVariableReadNode] a new instance of ClassVariableReadNode # - # source://prism//lib/prism/node.rb#4104 - sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } - def initialize(source, name, location); end + # source://prism//lib/prism/node.rb#3688 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } + def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#4185 + # source://prism//lib/prism/node.rb#3753 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4111 + # source://prism//lib/prism/node.rb#3697 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4116 + # source://prism//lib/prism/node.rb#3702 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4126 + # source://prism//lib/prism/node.rb#3712 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4121 + # source://prism//lib/prism/node.rb#3707 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?location: Location) -> ClassVariableReadNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> ClassVariableReadNode # - # source://prism//lib/prism/node.rb#4131 - sig { params(name: Symbol, location: Prism::Location).returns(Prism::ClassVariableReadNode) } - def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#3717 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ClassVariableReadNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4116 + # source://prism//lib/prism/node.rb#3702 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#4139 + # source://prism//lib/prism/node.rb#3725 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -5275,7 +4897,7 @@ class Prism::ClassVariableReadNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#4151 + # source://prism//lib/prism/node.rb#3737 sig { override.returns(String) } def inspect; end @@ -5285,38 +4907,20 @@ class Prism::ClassVariableReadNode < ::Prism::Node # # @@_test # name `:@@_test` # - # source://prism//lib/prism/node.rb#4148 + # source://prism//lib/prism/node.rb#3734 sig { returns(Symbol) } def name; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#4169 + # source://prism//lib/prism/node.rb#3742 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#4179 + # source://prism//lib/prism/node.rb#3747 def type; end end end @@ -5326,62 +4930,69 @@ end # @@foo, @@bar = baz # ^^^^^ ^^^^^ # -# source://prism//lib/prism/node.rb#4195 +# source://prism//lib/prism/node.rb#3763 class Prism::ClassVariableTargetNode < ::Prism::Node - # def initialize: (Symbol name, Location location) -> void + # Initialize a new ClassVariableTargetNode node. # # @return [ClassVariableTargetNode] a new instance of ClassVariableTargetNode # - # source://prism//lib/prism/node.rb#4197 - sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } - def initialize(source, name, location); end + # source://prism//lib/prism/node.rb#3765 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } + def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#4274 + # source://prism//lib/prism/node.rb#3826 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4204 + # source://prism//lib/prism/node.rb#3774 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4209 + # source://prism//lib/prism/node.rb#3779 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4219 + # source://prism//lib/prism/node.rb#3789 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4214 + # source://prism//lib/prism/node.rb#3784 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?location: Location) -> ClassVariableTargetNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> ClassVariableTargetNode # - # source://prism//lib/prism/node.rb#4224 - sig { params(name: Symbol, location: Prism::Location).returns(Prism::ClassVariableTargetNode) } - def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#3794 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ClassVariableTargetNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4209 + # source://prism//lib/prism/node.rb#3779 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#4232 + # source://prism//lib/prism/node.rb#3802 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -5390,44 +5001,26 @@ class Prism::ClassVariableTargetNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#4240 + # source://prism//lib/prism/node.rb#3810 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4237 + # source://prism//lib/prism/node.rb#3807 sig { returns(Symbol) } def name; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4258 + # source://prism//lib/prism/node.rb#3815 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4268 + # source://prism//lib/prism/node.rb#3820 def type; end end end @@ -5437,79 +5030,83 @@ end # @@foo = 1 # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4284 +# source://prism//lib/prism/node.rb#3836 class Prism::ClassVariableWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Prism::node value, Location operator_loc, Location location) -> void + # Initialize a new ClassVariableWriteNode node. # # @return [ClassVariableWriteNode] a new instance of ClassVariableWriteNode # - # source://prism//lib/prism/node.rb#4286 + # source://prism//lib/prism/node.rb#3838 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, value: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).void end - def initialize(source, name, name_loc, value, operator_loc, location); end + def initialize(source, node_id, location, flags, name, name_loc, value, operator_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#4404 + # source://prism//lib/prism/node.rb#3940 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4296 + # source://prism//lib/prism/node.rb#3850 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4301 + # source://prism//lib/prism/node.rb#3855 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4311 + # source://prism//lib/prism/node.rb#3865 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4306 + # source://prism//lib/prism/node.rb#3860 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> ClassVariableWriteNode # - # source://prism//lib/prism/node.rb#4316 + # source://prism//lib/prism/node.rb#3870 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, value: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: 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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4301 + # source://prism//lib/prism/node.rb#3855 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location } # - # source://prism//lib/prism/node.rb#4324 + # source://prism//lib/prism/node.rb#3878 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -5518,7 +5115,7 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#4370 + # source://prism//lib/prism/node.rb#3924 sig { override.returns(String) } def inspect; end @@ -5528,7 +5125,7 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # # @@_test = :test # name `@@_test` # - # source://prism//lib/prism/node.rb#4333 + # source://prism//lib/prism/node.rb#3887 sig { returns(Symbol) } def name; end @@ -5537,13 +5134,13 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # @@foo = :bar # ^^^^^ # - # source://prism//lib/prism/node.rb#4339 + # source://prism//lib/prism/node.rb#3893 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#4365 + # source://prism//lib/prism/node.rb#3919 sig { returns(String) } def operator; end @@ -5552,26 +5149,13 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # @@foo = :bar # ^ # - # source://prism//lib/prism/node.rb#4358 + # source://prism//lib/prism/node.rb#3912 sig { returns(Prism::Location) } def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#4388 + # source://prism//lib/prism/node.rb#3929 sig { override.returns(Symbol) } def type; end @@ -5583,27 +5167,75 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # @@_xyz = 123 # ^^^ # - # source://prism//lib/prism/node.rb#4352 + # source://prism//lib/prism/node.rb#3906 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4398 + # source://prism//lib/prism/node.rb#3934 def type; end end end +# A cache that can be used to quickly compute code unit offsets from byte +# offsets. It purposefully provides only a single #[] method to access the +# cache in order to minimize surface area. +# +# Note that there are some known issues here that may or may not be addressed +# in the future: +# +# * The first is that there are issues when the cache computes values that are +# not on character boundaries. This can result in subsequent computations +# being off by one or more code units. +# * The second is that this cache is currently unbounded. In theory we could +# introduce some kind of LRU cache to limit the number of entries, but this +# has not yet been implemented. +# +# source://prism//lib/prism/parse_result.rb#172 +class Prism::CodeUnitsCache + # Initialize a new cache with the given source and encoding. + # + # @return [CodeUnitsCache] a new instance of CodeUnitsCache + # + # source://prism//lib/prism/parse_result.rb#198 + sig { params(source: String, encoding: Encoding).void } + def initialize(source, encoding); end + + # Retrieve the code units offset from the given byte offset. + # + # source://prism//lib/prism/parse_result.rb#212 + sig { params(byte_offset: Integer).returns(Integer) } + def [](byte_offset); end +end + +# source://prism//lib/prism/parse_result.rb#184 +class Prism::CodeUnitsCache::LengthCounter + # @return [LengthCounter] a new instance of LengthCounter + # + # source://prism//lib/prism/parse_result.rb#185 + def initialize(source, encoding); end + + # source://prism//lib/prism/parse_result.rb#190 + def count(byte_offset, byte_length); end +end + +# source://prism//lib/prism/parse_result.rb#173 +class Prism::CodeUnitsCache::UTF16Counter + # @return [UTF16Counter] a new instance of UTF16Counter + # + # source://prism//lib/prism/parse_result.rb#174 + def initialize(source, encoding); end + + # source://prism//lib/prism/parse_result.rb#179 + def count(byte_offset, byte_length); end +end + # This represents a comment that was encountered during parsing. It is the # base class for all comment types. # -# source://prism//lib/prism/parse_result.rb#366 +# source://prism//lib/prism/parse_result.rb#507 class Prism::Comment abstract! @@ -5611,25 +5243,25 @@ class Prism::Comment # # @return [Comment] a new instance of Comment # - # source://prism//lib/prism/parse_result.rb#371 + # source://prism//lib/prism/parse_result.rb#512 sig { params(location: Prism::Location).void } def initialize(location); end # Implement the hash pattern matching interface for Comment. # - # source://prism//lib/prism/parse_result.rb#376 + # source://prism//lib/prism/parse_result.rb#517 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # The location of this comment in the source. # - # source://prism//lib/prism/parse_result.rb#368 + # source://prism//lib/prism/parse_result.rb#509 sig { returns(Prism::Location) } def location; end # Returns the content of the comment by slicing it from the source code. # - # source://prism//lib/prism/parse_result.rb#381 + # source://prism//lib/prism/parse_result.rb#522 sig { returns(String) } def slice; end @@ -6586,83 +6218,87 @@ end # Target &&= value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4417 +# source://prism//lib/prism/node.rb#3953 class Prism::ConstantAndWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void + # Initialize a new ConstantAndWriteNode node. # # @return [ConstantAndWriteNode] a new instance of ConstantAndWriteNode # - # source://prism//lib/prism/node.rb#4419 + # source://prism//lib/prism/node.rb#3955 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, name, name_loc, operator_loc, value, location); end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#4521 + # source://prism//lib/prism/node.rb#4041 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4429 + # source://prism//lib/prism/node.rb#3967 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4434 + # source://prism//lib/prism/node.rb#3972 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4444 + # source://prism//lib/prism/node.rb#3982 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4439 + # source://prism//lib/prism/node.rb#3977 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> ConstantAndWriteNode # - # source://prism//lib/prism/node.rb#4449 + # source://prism//lib/prism/node.rb#3987 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4434 + # source://prism//lib/prism/node.rb#3972 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#4457 + # source://prism//lib/prism/node.rb#3995 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # source://prism//lib/prism/desugar_compiler.rb#145 + # source://prism//lib/prism/desugar_compiler.rb#182 def desugar; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -6670,68 +6306,50 @@ class Prism::ConstantAndWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#4487 + # source://prism//lib/prism/node.rb#4025 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4462 + # source://prism//lib/prism/node.rb#4000 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#4465 + # source://prism//lib/prism/node.rb#4003 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#4482 + # source://prism//lib/prism/node.rb#4020 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#4472 + # source://prism//lib/prism/node.rb#4010 sig { returns(Prism::Location) } def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#4505 + # source://prism//lib/prism/node.rb#4030 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#4479 + # source://prism//lib/prism/node.rb#4017 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4515 + # source://prism//lib/prism/node.rb#4035 def type; end end end @@ -6741,97 +6359,101 @@ end # Target += value # ^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4534 +# source://prism//lib/prism/node.rb#4054 class Prism::ConstantOperatorWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location binary_operator_loc, Prism::node value, Symbol binary_operator, Location location) -> void + # Initialize a new ConstantOperatorWriteNode node. # # @return [ConstantOperatorWriteNode] a new instance of ConstantOperatorWriteNode # - # source://prism//lib/prism/node.rb#4536 + # source://prism//lib/prism/node.rb#4056 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, binary_operator_loc: Prism::Location, value: Prism::Node, - binary_operator: Symbol, - location: Prism::Location + binary_operator: Symbol ).void end - def initialize(source, name, name_loc, binary_operator_loc, value, binary_operator, location); end + def initialize(source, node_id, location, flags, name, name_loc, binary_operator_loc, value, binary_operator); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#4637 + # source://prism//lib/prism/node.rb#4141 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4547 + # source://prism//lib/prism/node.rb#4069 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader binary_operator: Symbol # - # source://prism//lib/prism/node.rb#4600 + # source://prism//lib/prism/node.rb#4122 sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # - # source://prism//lib/prism/node.rb#4590 + # source://prism//lib/prism/node.rb#4112 sig { returns(Prism::Location) } def binary_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4552 + # source://prism//lib/prism/node.rb#4074 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4562 + # source://prism//lib/prism/node.rb#4084 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4557 + # source://prism//lib/prism/node.rb#4079 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol, ?location: Location) -> ConstantOperatorWriteNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> ConstantOperatorWriteNode # - # source://prism//lib/prism/node.rb#4567 + # source://prism//lib/prism/node.rb#4089 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, binary_operator_loc: Prism::Location, value: Prism::Node, - binary_operator: Symbol, - location: Prism::Location + binary_operator: Symbol ).returns(Prism::ConstantOperatorWriteNode) end - def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4552 + # source://prism//lib/prism/node.rb#4074 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } # - # source://prism//lib/prism/node.rb#4575 + # source://prism//lib/prism/node.rb#4097 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # source://prism//lib/prism/desugar_compiler.rb#157 + # source://prism//lib/prism/desugar_compiler.rb#194 def desugar; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -6839,68 +6461,50 @@ class Prism::ConstantOperatorWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#4603 + # source://prism//lib/prism/node.rb#4125 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4580 + # source://prism//lib/prism/node.rb#4102 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#4583 + # source://prism//lib/prism/node.rb#4105 sig { returns(Prism::Location) } def name_loc; end # Returns the binary operator used to modify the receiver. This method is # deprecated in favor of #binary_operator. # - # source://prism//lib/prism/node_ext.rb#355 + # source://prism//lib/prism/node_ext.rb#371 def operator; end # Returns the location of the binary operator used to modify the receiver. # This method is deprecated in favor of #binary_operator_loc. # - # source://prism//lib/prism/node_ext.rb#362 + # source://prism//lib/prism/node_ext.rb#378 def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#4621 + # source://prism//lib/prism/node.rb#4130 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#4597 + # source://prism//lib/prism/node.rb#4119 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#4631 + # source://prism//lib/prism/node.rb#4135 def type; end end end @@ -6910,83 +6514,87 @@ end # Target ||= value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4651 +# source://prism//lib/prism/node.rb#4155 class Prism::ConstantOrWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void + # Initialize a new ConstantOrWriteNode node. # # @return [ConstantOrWriteNode] a new instance of ConstantOrWriteNode # - # source://prism//lib/prism/node.rb#4653 + # source://prism//lib/prism/node.rb#4157 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, name, name_loc, operator_loc, value, location); end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#4755 + # source://prism//lib/prism/node.rb#4243 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4663 + # source://prism//lib/prism/node.rb#4169 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4668 + # source://prism//lib/prism/node.rb#4174 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4678 + # source://prism//lib/prism/node.rb#4184 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4673 + # source://prism//lib/prism/node.rb#4179 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> ConstantOrWriteNode # - # source://prism//lib/prism/node.rb#4683 + # source://prism//lib/prism/node.rb#4189 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4668 + # source://prism//lib/prism/node.rb#4174 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#4691 + # source://prism//lib/prism/node.rb#4197 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # source://prism//lib/prism/desugar_compiler.rb#151 + # source://prism//lib/prism/desugar_compiler.rb#188 def desugar; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -6994,68 +6602,50 @@ class Prism::ConstantOrWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#4721 + # source://prism//lib/prism/node.rb#4227 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4696 + # source://prism//lib/prism/node.rb#4202 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#4699 + # source://prism//lib/prism/node.rb#4205 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#4716 + # source://prism//lib/prism/node.rb#4222 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#4706 + # source://prism//lib/prism/node.rb#4212 sig { returns(Prism::Location) } def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#4739 + # source://prism//lib/prism/node.rb#4232 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#4713 + # source://prism//lib/prism/node.rb#4219 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4749 + # source://prism//lib/prism/node.rb#4237 def type; end end end @@ -7065,77 +6655,81 @@ end # Parent::Child &&= value # ^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4768 +# source://prism//lib/prism/node.rb#4256 class Prism::ConstantPathAndWriteNode < ::Prism::Node - # def initialize: (ConstantPathNode target, Location operator_loc, Prism::node value, Location location) -> void + # Initialize a new ConstantPathAndWriteNode node. # # @return [ConstantPathAndWriteNode] a new instance of ConstantPathAndWriteNode # - # source://prism//lib/prism/node.rb#4770 + # source://prism//lib/prism/node.rb#4258 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, target: Prism::ConstantPathNode, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, target, operator_loc, value, location); end + def initialize(source, node_id, location, flags, target, operator_loc, value); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#4864 + # source://prism//lib/prism/node.rb#4336 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4779 + # source://prism//lib/prism/node.rb#4269 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4784 + # source://prism//lib/prism/node.rb#4274 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4794 + # source://prism//lib/prism/node.rb#4284 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4789 + # source://prism//lib/prism/node.rb#4279 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node) -> ConstantPathAndWriteNode # - # source://prism//lib/prism/node.rb#4799 + # source://prism//lib/prism/node.rb#4289 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, target: Prism::ConstantPathNode, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4784 + # source://prism//lib/prism/node.rb#4274 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Prism::node, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, target: ConstantPathNode, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#4807 + # source://prism//lib/prism/node.rb#4297 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -7144,62 +6738,44 @@ class Prism::ConstantPathAndWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#4830 + # source://prism//lib/prism/node.rb#4320 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#4825 + # source://prism//lib/prism/node.rb#4315 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#4815 + # source://prism//lib/prism/node.rb#4305 sig { returns(Prism::Location) } def operator_loc; end # attr_reader target: ConstantPathNode # - # source://prism//lib/prism/node.rb#4812 + # source://prism//lib/prism/node.rb#4302 sig { returns(Prism::ConstantPathNode) } def target; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4848 + # source://prism//lib/prism/node.rb#4325 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#4822 + # source://prism//lib/prism/node.rb#4312 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#4858 + # source://prism//lib/prism/node.rb#4330 def type; end end end @@ -7209,34 +6785,36 @@ end # Foo::Bar # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#4876 +# source://prism//lib/prism/node.rb#4348 class Prism::ConstantPathNode < ::Prism::Node - # def initialize: (Prism::node? parent, Symbol? name, Location delimiter_loc, Location name_loc, Location location) -> void + # Initialize a new ConstantPathNode node. # # @return [ConstantPathNode] a new instance of ConstantPathNode # - # source://prism//lib/prism/node.rb#4878 + # source://prism//lib/prism/node.rb#4350 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, parent: T.nilable(Prism::Node), name: T.nilable(Symbol), delimiter_loc: Prism::Location, - name_loc: Prism::Location, - location: Prism::Location + name_loc: Prism::Location ).void end - def initialize(source, parent, name, delimiter_loc, name_loc, location); end + def initialize(source, node_id, location, flags, parent, name, delimiter_loc, name_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#5003 + # source://prism//lib/prism/node.rb#4459 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4888 + # source://prism//lib/prism/node.rb#4362 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -7244,57 +6822,59 @@ 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#196 + # source://prism//lib/prism/node_ext.rb#202 def child; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4893 + # source://prism//lib/prism/node.rb#4367 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#4905 + # source://prism//lib/prism/node.rb#4379 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#4898 + # source://prism//lib/prism/node.rb#4372 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?parent: Prism::node?, ?name: Symbol?, ?delimiter_loc: Location, ?name_loc: Location, ?location: Location) -> ConstantPathNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?parent: Prism::node?, ?name: Symbol?, ?delimiter_loc: Location, ?name_loc: Location) -> ConstantPathNode # - # source://prism//lib/prism/node.rb#4910 + # source://prism//lib/prism/node.rb#4384 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, parent: T.nilable(Prism::Node), name: T.nilable(Symbol), delimiter_loc: Prism::Location, - name_loc: Prism::Location, - location: Prism::Location + name_loc: Prism::Location ).returns(Prism::ConstantPathNode) end - def copy(parent: T.unsafe(nil), name: T.unsafe(nil), delimiter_loc: T.unsafe(nil), name_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), parent: T.unsafe(nil), name: T.unsafe(nil), delimiter_loc: T.unsafe(nil), name_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4893 + # source://prism//lib/prism/node.rb#4367 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { parent: Prism::node?, name: Symbol?, delimiter_loc: Location, name_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, parent: Prism::node?, name: Symbol?, delimiter_loc: Location, name_loc: Location } # - # source://prism//lib/prism/node.rb#4918 + # source://prism//lib/prism/node.rb#4392 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def delimiter: () -> String # - # source://prism//lib/prism/node.rb#4964 + # source://prism//lib/prism/node.rb#4438 sig { returns(String) } def delimiter; end @@ -7306,7 +6886,7 @@ class Prism::ConstantPathNode < ::Prism::Node # One::Two # ^^ # - # source://prism//lib/prism/node.rb#4944 + # source://prism//lib/prism/node.rb#4418 sig { returns(Prism::Location) } def delimiter_loc; end @@ -7315,26 +6895,26 @@ class Prism::ConstantPathNode < ::Prism::Node # Returns the full name of this constant path. For example: "Foo::Bar" # - # source://prism//lib/prism/node_ext.rb#189 + # source://prism//lib/prism/node_ext.rb#195 sig { returns(String) } def full_name; end # Returns the list of parts for the full name of this constant path. # For example: [:Foo, :Bar] # - # source://prism//lib/prism/node_ext.rb#167 + # source://prism//lib/prism/node_ext.rb#173 sig { returns(T::Array[Symbol]) } def full_name_parts; end # def inspect -> String # - # source://prism//lib/prism/node.rb#4969 + # source://prism//lib/prism/node.rb#4443 sig { override.returns(String) } def inspect; end # The name of the constant being accessed. This could be `nil` in the event of a syntax error. # - # source://prism//lib/prism/node.rb#4935 + # source://prism//lib/prism/node.rb#4409 sig { returns(T.nilable(Symbol)) } def name; end @@ -7346,7 +6926,7 @@ class Prism::ConstantPathNode < ::Prism::Node # One::Two # ^^^ # - # source://prism//lib/prism/node.rb#4957 + # source://prism//lib/prism/node.rb#4431 sig { returns(Prism::Location) } def name_loc; end @@ -7361,38 +6941,20 @@ class Prism::ConstantPathNode < ::Prism::Node # a.b::C # ^^^ # - # source://prism//lib/prism/node.rb#4932 + # source://prism//lib/prism/node.rb#4406 sig { returns(T.nilable(Prism::Node)) } def parent; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#4987 + # source://prism//lib/prism/node.rb#4448 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#4997 + # source://prism//lib/prism/node.rb#4453 def type; end end end @@ -7404,14 +6966,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#158 +# source://prism//lib/prism/node_ext.rb#164 class Prism::ConstantPathNode::DynamicPartsInConstantPathError < ::StandardError; end # An error class raised when missing nodes are found while computing a # constant path's full name. For example: # Foo:: -> raises because the constant path is missing the last part # -# source://prism//lib/prism/node_ext.rb#163 +# source://prism//lib/prism/node_ext.rb#169 class Prism::ConstantPathNode::MissingNodesInConstantPathError < ::StandardError; end # Represents assigning to a constant path using an operator that isn't `=`. @@ -7419,91 +6981,95 @@ class Prism::ConstantPathNode::MissingNodesInConstantPathError < ::StandardError # Parent::Child += value # ^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#5016 +# source://prism//lib/prism/node.rb#4472 class Prism::ConstantPathOperatorWriteNode < ::Prism::Node - # def initialize: (ConstantPathNode target, Location binary_operator_loc, Prism::node value, Symbol binary_operator, Location location) -> void + # Initialize a new ConstantPathOperatorWriteNode node. # # @return [ConstantPathOperatorWriteNode] a new instance of ConstantPathOperatorWriteNode # - # source://prism//lib/prism/node.rb#5018 + # source://prism//lib/prism/node.rb#4474 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, target: Prism::ConstantPathNode, binary_operator_loc: Prism::Location, value: Prism::Node, - binary_operator: Symbol, - location: Prism::Location + binary_operator: Symbol ).void end - def initialize(source, target, binary_operator_loc, value, binary_operator, location); end + def initialize(source, node_id, location, flags, target, binary_operator_loc, value, binary_operator); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#5111 + # source://prism//lib/prism/node.rb#4551 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5028 + # source://prism//lib/prism/node.rb#4486 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader binary_operator: Symbol # - # source://prism//lib/prism/node.rb#5074 + # source://prism//lib/prism/node.rb#4532 sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # - # source://prism//lib/prism/node.rb#5064 + # source://prism//lib/prism/node.rb#4522 sig { returns(Prism::Location) } def binary_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5033 + # source://prism//lib/prism/node.rb#4491 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5043 + # source://prism//lib/prism/node.rb#4501 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5038 + # source://prism//lib/prism/node.rb#4496 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?target: ConstantPathNode, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol, ?location: Location) -> ConstantPathOperatorWriteNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?target: ConstantPathNode, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> ConstantPathOperatorWriteNode # - # source://prism//lib/prism/node.rb#5048 + # source://prism//lib/prism/node.rb#4506 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, target: Prism::ConstantPathNode, binary_operator_loc: Prism::Location, value: Prism::Node, - binary_operator: Symbol, - location: Prism::Location + binary_operator: Symbol ).returns(Prism::ConstantPathOperatorWriteNode) end - def copy(target: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5033 + # source://prism//lib/prism/node.rb#4491 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, target: ConstantPathNode, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } # - # source://prism//lib/prism/node.rb#5056 + # source://prism//lib/prism/node.rb#4514 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -7512,62 +7078,44 @@ class Prism::ConstantPathOperatorWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#5077 + # source://prism//lib/prism/node.rb#4535 sig { override.returns(String) } def inspect; end # Returns the binary operator used to modify the receiver. This method is # deprecated in favor of #binary_operator. # - # source://prism//lib/prism/node_ext.rb#371 + # source://prism//lib/prism/node_ext.rb#387 def operator; end # Returns the location of the binary operator used to modify the receiver. # This method is deprecated in favor of #binary_operator_loc. # - # source://prism//lib/prism/node_ext.rb#378 + # source://prism//lib/prism/node_ext.rb#394 def operator_loc; end # attr_reader target: ConstantPathNode # - # source://prism//lib/prism/node.rb#5061 + # source://prism//lib/prism/node.rb#4519 sig { returns(Prism::ConstantPathNode) } def target; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#5095 + # source://prism//lib/prism/node.rb#4540 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#5071 + # source://prism//lib/prism/node.rb#4529 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#5105 + # source://prism//lib/prism/node.rb#4545 def type; end end end @@ -7577,77 +7125,81 @@ end # Parent::Child ||= value # ^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#5124 +# source://prism//lib/prism/node.rb#4564 class Prism::ConstantPathOrWriteNode < ::Prism::Node - # def initialize: (ConstantPathNode target, Location operator_loc, Prism::node value, Location location) -> void + # Initialize a new ConstantPathOrWriteNode node. # # @return [ConstantPathOrWriteNode] a new instance of ConstantPathOrWriteNode # - # source://prism//lib/prism/node.rb#5126 + # source://prism//lib/prism/node.rb#4566 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, target: Prism::ConstantPathNode, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, target, operator_loc, value, location); end + def initialize(source, node_id, location, flags, target, operator_loc, value); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#5220 + # source://prism//lib/prism/node.rb#4644 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5135 + # source://prism//lib/prism/node.rb#4577 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5140 + # source://prism//lib/prism/node.rb#4582 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5150 + # source://prism//lib/prism/node.rb#4592 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5145 + # source://prism//lib/prism/node.rb#4587 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node) -> ConstantPathOrWriteNode # - # source://prism//lib/prism/node.rb#5155 + # source://prism//lib/prism/node.rb#4597 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, target: Prism::ConstantPathNode, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5140 + # source://prism//lib/prism/node.rb#4582 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Prism::node, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, target: ConstantPathNode, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#5163 + # source://prism//lib/prism/node.rb#4605 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -7656,62 +7208,44 @@ class Prism::ConstantPathOrWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#5186 + # source://prism//lib/prism/node.rb#4628 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#5181 + # source://prism//lib/prism/node.rb#4623 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#5171 + # source://prism//lib/prism/node.rb#4613 sig { returns(Prism::Location) } def operator_loc; end # attr_reader target: ConstantPathNode # - # source://prism//lib/prism/node.rb#5168 + # source://prism//lib/prism/node.rb#4610 sig { returns(Prism::ConstantPathNode) } def target; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#5204 + # source://prism//lib/prism/node.rb#4633 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#5178 + # source://prism//lib/prism/node.rb#4620 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#5214 + # source://prism//lib/prism/node.rb#4638 def type; end end end @@ -7721,34 +7255,36 @@ end # Foo::Foo, Bar::Bar = baz # ^^^^^^^^ ^^^^^^^^ # -# source://prism//lib/prism/node.rb#5232 +# source://prism//lib/prism/node.rb#4656 class Prism::ConstantPathTargetNode < ::Prism::Node - # def initialize: (Prism::node? parent, Symbol? name, Location delimiter_loc, Location name_loc, Location location) -> void + # Initialize a new ConstantPathTargetNode node. # # @return [ConstantPathTargetNode] a new instance of ConstantPathTargetNode # - # source://prism//lib/prism/node.rb#5234 + # source://prism//lib/prism/node.rb#4658 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, parent: T.nilable(Prism::Node), name: T.nilable(Symbol), delimiter_loc: Prism::Location, - name_loc: Prism::Location, - location: Prism::Location + name_loc: Prism::Location ).void end - def initialize(source, parent, name, delimiter_loc, name_loc, location); end + def initialize(source, node_id, location, flags, parent, name, delimiter_loc, name_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#5338 + # source://prism//lib/prism/node.rb#4746 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5244 + # source://prism//lib/prism/node.rb#4670 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -7756,63 +7292,65 @@ 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#232 + # source://prism//lib/prism/node_ext.rb#243 def child; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5249 + # source://prism//lib/prism/node.rb#4675 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5261 + # source://prism//lib/prism/node.rb#4687 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5254 + # source://prism//lib/prism/node.rb#4680 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?parent: Prism::node?, ?name: Symbol?, ?delimiter_loc: Location, ?name_loc: Location, ?location: Location) -> ConstantPathTargetNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?parent: Prism::node?, ?name: Symbol?, ?delimiter_loc: Location, ?name_loc: Location) -> ConstantPathTargetNode # - # source://prism//lib/prism/node.rb#5266 + # source://prism//lib/prism/node.rb#4692 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, parent: T.nilable(Prism::Node), name: T.nilable(Symbol), delimiter_loc: Prism::Location, - name_loc: Prism::Location, - location: Prism::Location + name_loc: Prism::Location ).returns(Prism::ConstantPathTargetNode) end - def copy(parent: T.unsafe(nil), name: T.unsafe(nil), delimiter_loc: T.unsafe(nil), name_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), parent: T.unsafe(nil), name: T.unsafe(nil), delimiter_loc: T.unsafe(nil), name_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5249 + # source://prism//lib/prism/node.rb#4675 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { parent: Prism::node?, name: Symbol?, delimiter_loc: Location, name_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, parent: Prism::node?, name: Symbol?, delimiter_loc: Location, name_loc: Location } # - # source://prism//lib/prism/node.rb#5274 + # source://prism//lib/prism/node.rb#4700 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def delimiter: () -> String # - # source://prism//lib/prism/node.rb#5299 + # source://prism//lib/prism/node.rb#4725 sig { returns(String) } def delimiter; end # attr_reader delimiter_loc: Location # - # source://prism//lib/prism/node.rb#5285 + # source://prism//lib/prism/node.rb#4711 sig { returns(Prism::Location) } def delimiter_loc; end @@ -7821,69 +7359,51 @@ class Prism::ConstantPathTargetNode < ::Prism::Node # Returns the full name of this constant path. For example: "Foo::Bar" # - # source://prism//lib/prism/node_ext.rb#225 + # source://prism//lib/prism/node_ext.rb#236 sig { returns(String) } def full_name; end # Returns the list of parts for the full name of this constant path. # For example: [:Foo, :Bar] # - # source://prism//lib/prism/node_ext.rb#205 + # source://prism//lib/prism/node_ext.rb#216 sig { returns(T::Array[Symbol]) } def full_name_parts; end # def inspect -> String # - # source://prism//lib/prism/node.rb#5304 + # source://prism//lib/prism/node.rb#4730 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol? # - # source://prism//lib/prism/node.rb#5282 + # source://prism//lib/prism/node.rb#4708 sig { returns(T.nilable(Symbol)) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#5292 + # source://prism//lib/prism/node.rb#4718 sig { returns(Prism::Location) } def name_loc; end # attr_reader parent: Prism::node? # - # source://prism//lib/prism/node.rb#5279 + # source://prism//lib/prism/node.rb#4705 sig { returns(T.nilable(Prism::Node)) } def parent; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#5322 + # source://prism//lib/prism/node.rb#4735 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#5332 + # source://prism//lib/prism/node.rb#4740 def type; end end end @@ -7899,77 +7419,81 @@ end # ::Foo::Bar = 1 # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#5357 +# source://prism//lib/prism/node.rb#4765 class Prism::ConstantPathWriteNode < ::Prism::Node - # def initialize: (ConstantPathNode target, Location operator_loc, Prism::node value, Location location) -> void + # Initialize a new ConstantPathWriteNode node. # # @return [ConstantPathWriteNode] a new instance of ConstantPathWriteNode # - # source://prism//lib/prism/node.rb#5359 + # source://prism//lib/prism/node.rb#4767 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, target: Prism::ConstantPathNode, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, target, operator_loc, value, location); end + def initialize(source, node_id, location, flags, target, operator_loc, value); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#5465 + # source://prism//lib/prism/node.rb#4857 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5368 + # source://prism//lib/prism/node.rb#4778 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5373 + # source://prism//lib/prism/node.rb#4783 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5383 + # source://prism//lib/prism/node.rb#4793 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5378 + # source://prism//lib/prism/node.rb#4788 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node) -> ConstantPathWriteNode # - # source://prism//lib/prism/node.rb#5388 + # source://prism//lib/prism/node.rb#4798 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, target: Prism::ConstantPathNode, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5373 + # source://prism//lib/prism/node.rb#4783 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Prism::node, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, target: ConstantPathNode, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#5396 + # source://prism//lib/prism/node.rb#4806 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -7978,13 +7502,13 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#5431 + # source://prism//lib/prism/node.rb#4841 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#5426 + # source://prism//lib/prism/node.rb#4836 sig { returns(String) } def operator; end @@ -7993,7 +7517,7 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # ::ABC = 123 # ^ # - # source://prism//lib/prism/node.rb#5413 + # source://prism//lib/prism/node.rb#4823 sig { returns(Prism::Location) } def operator_loc; end @@ -8005,26 +7529,13 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # ::Foo = :abc # ^^^^^ # - # source://prism//lib/prism/node.rb#5407 + # source://prism//lib/prism/node.rb#4817 sig { returns(Prism::ConstantPathNode) } def target; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#5449 + # source://prism//lib/prism/node.rb#4846 sig { override.returns(Symbol) } def type; end @@ -8033,19 +7544,14 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # FOO::BAR = :abc # ^^^^ # - # source://prism//lib/prism/node.rb#5423 + # source://prism//lib/prism/node.rb#4833 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#5459 + # source://prism//lib/prism/node.rb#4851 def type; end end end @@ -8055,62 +7561,69 @@ end # Foo # ^^^ # -# source://prism//lib/prism/node.rb#5477 +# source://prism//lib/prism/node.rb#4869 class Prism::ConstantReadNode < ::Prism::Node - # def initialize: (Symbol name, Location location) -> void + # Initialize a new ConstantReadNode node. # # @return [ConstantReadNode] a new instance of ConstantReadNode # - # source://prism//lib/prism/node.rb#5479 - sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } - def initialize(source, name, location); end + # source://prism//lib/prism/node.rb#4871 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } + def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#5560 + # source://prism//lib/prism/node.rb#4936 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5486 + # source://prism//lib/prism/node.rb#4880 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5491 + # source://prism//lib/prism/node.rb#4885 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5501 + # source://prism//lib/prism/node.rb#4895 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5496 + # source://prism//lib/prism/node.rb#4890 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?location: Location) -> ConstantReadNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> ConstantReadNode # - # source://prism//lib/prism/node.rb#5506 - sig { params(name: Symbol, location: Prism::Location).returns(Prism::ConstantReadNode) } - def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#4900 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ConstantReadNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5491 + # source://prism//lib/prism/node.rb#4885 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#5514 + # source://prism//lib/prism/node.rb#4908 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -8119,20 +7632,20 @@ class Prism::ConstantReadNode < ::Prism::Node # Returns the full name of this constant. For example: "Foo" # - # source://prism//lib/prism/node_ext.rb#133 + # source://prism//lib/prism/node_ext.rb#139 sig { returns(String) } def full_name; end # Returns the list of parts for the full name of this constant. # For example: [:Foo] # - # source://prism//lib/prism/node_ext.rb#128 + # source://prism//lib/prism/node_ext.rb#134 sig { returns(T::Array[Symbol]) } def full_name_parts; end # def inspect -> String # - # source://prism//lib/prism/node.rb#5526 + # source://prism//lib/prism/node.rb#4920 sig { override.returns(String) } def inspect; end @@ -8142,38 +7655,20 @@ class Prism::ConstantReadNode < ::Prism::Node # # SOME_CONSTANT # name `:SOME_CONSTANT` # - # source://prism//lib/prism/node.rb#5523 + # source://prism//lib/prism/node.rb#4917 sig { returns(Symbol) } def name; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#5544 + # source://prism//lib/prism/node.rb#4925 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#5554 + # source://prism//lib/prism/node.rb#4930 def type; end end end @@ -8183,203 +7678,69 @@ end # Foo, Bar = baz # ^^^ ^^^ # -# source://prism//lib/prism/node.rb#5570 +# source://prism//lib/prism/node.rb#4946 class Prism::ConstantTargetNode < ::Prism::Node - # def initialize: (Symbol name, Location location) -> void + # Initialize a new ConstantTargetNode node. # # @return [ConstantTargetNode] a new instance of ConstantTargetNode # - # source://prism//lib/prism/node.rb#5572 - sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } - def initialize(source, name, location); end + # source://prism//lib/prism/node.rb#4948 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } + def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#5649 + # source://prism//lib/prism/node.rb#5009 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5579 - sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5584 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#5594 - sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#5589 - sig { override.returns(T::Array[Prism::Node]) } - def compact_child_nodes; end - - # def copy: (?name: Symbol, ?location: Location) -> ConstantTargetNode - # - # source://prism//lib/prism/node.rb#5599 - sig { params(name: Symbol, location: Prism::Location).returns(Prism::ConstantTargetNode) } - def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5584 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } - # - # source://prism//lib/prism/node.rb#5607 - sig { params(keys: T.nilable(T::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#246 - sig { returns(String) } - def full_name; end - - # Returns the list of parts for the full name of this constant. - # For example: [:Foo] - # - # source://prism//lib/prism/node_ext.rb#241 - sig { returns(T::Array[Symbol]) } - def full_name_parts; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#5615 - sig { override.returns(String) } - def inspect; end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#5612 - sig { returns(Symbol) } - def name; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#5633 - 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#5643 - def type; end - end -end - -# Represents writing to a constant. -# -# Foo = 1 -# ^^^^^^^ -# -# source://prism//lib/prism/node.rb#5659 -class Prism::ConstantWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Prism::node value, Location operator_loc, Location location) -> void - # - # @return [ConstantWriteNode] a new instance of ConstantWriteNode - # - # source://prism//lib/prism/node.rb#5661 - sig do - params( - source: Prism::Source, - name: Symbol, - name_loc: Prism::Location, - value: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location - ).void - end - def initialize(source, name, name_loc, value, operator_loc, location); end - - # Implements case-equality for the node. This is effectively == but without - # comparing the value of locations. Locations are checked only for presence. - # - # source://prism//lib/prism/node.rb#5779 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#5671 + # source://prism//lib/prism/node.rb#4957 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5676 + # source://prism//lib/prism/node.rb#4962 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5686 + # source://prism//lib/prism/node.rb#4972 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5681 + # source://prism//lib/prism/node.rb#4967 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> ConstantTargetNode # - # source://prism//lib/prism/node.rb#5691 + # source://prism//lib/prism/node.rb#4977 sig do params( - name: Symbol, - name_loc: Prism::Location, - value: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location - ).returns(Prism::ConstantWriteNode) + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ConstantTargetNode) 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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5676 + # source://prism//lib/prism/node.rb#4962 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#5699 + # source://prism//lib/prism/node.rb#4985 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -8388,20 +7749,147 @@ class Prism::ConstantWriteNode < ::Prism::Node # Returns the full name of this constant. For example: "Foo" # - # source://prism//lib/prism/node_ext.rb#146 + # source://prism//lib/prism/node_ext.rb#262 sig { returns(String) } def full_name; end # Returns the list of parts for the full name of this constant. # For example: [:Foo] # - # source://prism//lib/prism/node_ext.rb#141 + # source://prism//lib/prism/node_ext.rb#257 sig { returns(T::Array[Symbol]) } def full_name_parts; end # def inspect -> String # - # source://prism//lib/prism/node.rb#5745 + # source://prism//lib/prism/node.rb#4993 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#4990 + sig { returns(Symbol) } + def name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#4998 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#5003 + def type; end + end +end + +# Represents writing to a constant. +# +# Foo = 1 +# ^^^^^^^ +# +# source://prism//lib/prism/node.rb#5019 +class Prism::ConstantWriteNode < ::Prism::Node + # Initialize a new ConstantWriteNode node. + # + # @return [ConstantWriteNode] a new instance of ConstantWriteNode + # + # source://prism//lib/prism/node.rb#5021 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, value, operator_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#5123 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5033 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5038 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5048 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5043 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> ConstantWriteNode + # + # source://prism//lib/prism/node.rb#5053 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::ConstantWriteNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5038 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location } + # + # source://prism//lib/prism/node.rb#5061 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # Returns the full name of this constant. For example: "Foo" + # + # source://prism//lib/prism/node_ext.rb#152 + sig { returns(String) } + def full_name; end + + # Returns the list of parts for the full name of this constant. + # For example: [:Foo] + # + # source://prism//lib/prism/node_ext.rb#147 + sig { returns(T::Array[Symbol]) } + def full_name_parts; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#5107 sig { override.returns(String) } def inspect; end @@ -8411,7 +7899,7 @@ class Prism::ConstantWriteNode < ::Prism::Node # # XYZ = 1 # name `:XYZ` # - # source://prism//lib/prism/node.rb#5708 + # source://prism//lib/prism/node.rb#5070 sig { returns(Symbol) } def name; end @@ -8420,13 +7908,13 @@ class Prism::ConstantWriteNode < ::Prism::Node # FOO = 1 # ^^^ # - # source://prism//lib/prism/node.rb#5714 + # source://prism//lib/prism/node.rb#5076 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#5740 + # source://prism//lib/prism/node.rb#5102 sig { returns(String) } def operator; end @@ -8435,26 +7923,13 @@ class Prism::ConstantWriteNode < ::Prism::Node # FOO = :bar # ^ # - # source://prism//lib/prism/node.rb#5733 + # source://prism//lib/prism/node.rb#5095 sig { returns(Prism::Location) } def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#5763 + # source://prism//lib/prism/node.rb#5112 sig { override.returns(Symbol) } def type; end @@ -8466,19 +7941,14 @@ class Prism::ConstantWriteNode < ::Prism::Node # MyClass = Class.new # ^^^^^^^^^ # - # source://prism//lib/prism/node.rb#5727 + # source://prism//lib/prism/node.rb#5089 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#5773 + # source://prism//lib/prism/node.rb#5117 def type; end end end @@ -8489,796 +7959,2636 @@ end # source = Prism::Source.for("[1]") # # Prism::ArrayNode.new( +# source, +# 0, +# Prism::Location.new(source, 0, 3), +# 0, # [ # Prism::IntegerNode.new( -# Prism::IntegerBaseFlags::DECIMAL, -# 1, +# source, +# 0, # Prism::Location.new(source, 1, 1), -# source +# Prism::IntegerBaseFlags::DECIMAL, +# 1 # ) # ], # Prism::Location.new(source, 0, 1), -# Prism::Location.new(source, 2, 1), -# source +# Prism::Location.new(source, 2, 1) # ) # # you could instead write: # -# source = Prism::Source.for("[1]") +# class Builder +# include Prism::DSL # -# ArrayNode( -# IntegerNode(Prism::IntegerBaseFlags::DECIMAL, 1, Location(source, 1, 1)), source), -# Location(source, 0, 1), -# Location(source, 2, 1), -# source -# ) +# attr_reader :default_source # -# This is mostly helpful in the context of writing tests, but can also be used -# to generate trees programmatically. +# def initialize +# @default_source = source("[1]") +# end # -# source://prism//lib/prism/dsl.rb#42 +# def build +# array_node( +# location: location(start_offset: 0, length: 3), +# elements: [ +# integer_node( +# location: location(start_offset: 1, length: 1), +# flags: integer_base_flag(:decimal), +# value: 1 +# ) +# ], +# opening_loc: location(start_offset: 0, length: 1), +# closing_loc: location(start_offset: 2, length: 1) +# ) +# end +# end +# +# This is mostly helpful in the context of generating trees programmatically. +# +# source://prism//lib/prism/dsl.rb#61 module Prism::DSL - private + extend ::Prism::DSL - # Create a new AliasGlobalVariableNode node + # Create a new AliasGlobalVariableNode node. # - # source://prism//lib/prism/dsl.rb#51 - def AliasGlobalVariableNode(new_name, old_name, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#77 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + new_name: T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode), + old_name: T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::SymbolNode, Prism::MissingNode), + keyword_loc: Prism::Location + ).returns(Prism::AliasGlobalVariableNode) + end + def alias_global_variable_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), new_name: T.unsafe(nil), old_name: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end - # Create a new AliasMethodNode node + # Create a new AliasMethodNode node. # - # source://prism//lib/prism/dsl.rb#56 - def AliasMethodNode(new_name, old_name, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#82 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + new_name: T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode), + old_name: T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode, Prism::GlobalVariableReadNode, Prism::MissingNode), + keyword_loc: Prism::Location + ).returns(Prism::AliasMethodNode) + end + def alias_method_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), new_name: T.unsafe(nil), old_name: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end - # Create a new AlternationPatternNode node + # Create a new AlternationPatternNode node. # - # source://prism//lib/prism/dsl.rb#61 - def AlternationPatternNode(left, right, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#87 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::AlternationPatternNode) + end + def alternation_pattern_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - # Create a new AndNode node + # Create a new AndNode node. # - # source://prism//lib/prism/dsl.rb#66 - def AndNode(left, right, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#92 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::AndNode) + end + def and_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - # Create a new ArgumentsNode node + # Create a new ArgumentsNode node. # - # source://prism//lib/prism/dsl.rb#71 - def ArgumentsNode(flags, arguments, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#97 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + arguments: T::Array[Prism::Node] + ).returns(Prism::ArgumentsNode) + end + def arguments_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), arguments: T.unsafe(nil)); end - # Create a new ArrayNode node + # Retrieve the value of one of the ArgumentsNodeFlags flags. # - # source://prism//lib/prism/dsl.rb#76 - def ArrayNode(flags, elements, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#832 + sig { params(name: Symbol).returns(Integer) } + def arguments_node_flag(name); end - # Create a new ArrayPatternNode node + # Create a new ArrayNode node. # - # source://prism//lib/prism/dsl.rb#81 - def ArrayPatternNode(constant, requireds, rest, posts, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#102 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + elements: T::Array[Prism::Node], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::ArrayNode) + end + def array_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), elements: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - # Create a new AssocNode node + # Retrieve the value of one of the ArrayNodeFlags flags. # - # source://prism//lib/prism/dsl.rb#86 - def AssocNode(key, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#844 + sig { params(name: Symbol).returns(Integer) } + def array_node_flag(name); end - # Create a new AssocSplatNode node + # Create a new ArrayPatternNode node. # - # source://prism//lib/prism/dsl.rb#91 - def AssocSplatNode(value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#107 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + requireds: T::Array[Prism::Node], + rest: T.nilable(Prism::Node), + posts: T::Array[Prism::Node], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::ArrayPatternNode) + end + def array_pattern_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), constant: T.unsafe(nil), requireds: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - # Create a new BackReferenceReadNode node + # Create a new AssocNode node. # - # source://prism//lib/prism/dsl.rb#96 - def BackReferenceReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#112 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + key: Prism::Node, + value: Prism::Node, + operator_loc: T.nilable(Prism::Location) + ).returns(Prism::AssocNode) + end + def assoc_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), key: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - # Create a new BeginNode node + # Create a new AssocSplatNode node. # - # source://prism//lib/prism/dsl.rb#101 - def BeginNode(begin_keyword_loc, statements, rescue_clause, else_clause, ensure_clause, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#117 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).returns(Prism::AssocSplatNode) + end + def assoc_splat_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - # Create a new BlockArgumentNode node + # Create a new BackReferenceReadNode node. # - # source://prism//lib/prism/dsl.rb#106 - def BlockArgumentNode(expression, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#122 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::BackReferenceReadNode) + end + def back_reference_read_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end - # Create a new BlockLocalVariableNode node + # Create a new BeginNode node. # - # source://prism//lib/prism/dsl.rb#111 - def BlockLocalVariableNode(flags, name, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#127 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + begin_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + rescue_clause: T.nilable(Prism::RescueNode), + else_clause: T.nilable(Prism::ElseNode), + ensure_clause: T.nilable(Prism::EnsureNode), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::BeginNode) + end + def begin_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), begin_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), rescue_clause: T.unsafe(nil), else_clause: T.unsafe(nil), ensure_clause: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end - # Create a new BlockNode node + # Create a new BlockArgumentNode node. # - # source://prism//lib/prism/dsl.rb#116 - def BlockNode(locals, parameters, body, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#132 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).returns(Prism::BlockArgumentNode) + end + def block_argument_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), expression: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - # Create a new BlockParameterNode node + # Create a new BlockLocalVariableNode node. # - # source://prism//lib/prism/dsl.rb#121 - def BlockParameterNode(flags, name, name_loc, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#137 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::BlockLocalVariableNode) + end + def block_local_variable_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end - # Create a new BlockParametersNode node + # Create a new BlockNode node. # - # source://prism//lib/prism/dsl.rb#126 - def BlockParametersNode(parameters, locals, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#142 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + parameters: T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).returns(Prism::BlockNode) + end + def block_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # Create a new BlockParameterNode node. + # + # source://prism//lib/prism/dsl.rb#147 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location + ).returns(Prism::BlockParameterNode) + end + def block_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # Create a new BlockParametersNode node. + # + # source://prism//lib/prism/dsl.rb#152 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + parameters: T.nilable(Prism::ParametersNode), + locals: T::Array[Prism::BlockLocalVariableNode], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::BlockParametersNode) + end + def block_parameters_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), parameters: T.unsafe(nil), locals: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end + + # Create a new BreakNode node. + # + # source://prism//lib/prism/dsl.rb#157 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location + ).returns(Prism::BreakNode) + end + def break_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), arguments: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + + # Create a new CallAndWriteNode node. + # + # source://prism//lib/prism/dsl.rb#162 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::CallAndWriteNode) + end + def call_and_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), message_loc: T.unsafe(nil), read_name: T.unsafe(nil), write_name: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new CallNode node. + # + # source://prism//lib/prism/dsl.rb#167 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + name: Symbol, + message_loc: T.nilable(Prism::Location), + opening_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: T.nilable(Prism::Location), + block: T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) + ).returns(Prism::CallNode) + end + def call_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), name: T.unsafe(nil), message_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil)); end + + # Retrieve the value of one of the CallNodeFlags flags. + # + # source://prism//lib/prism/dsl.rb#852 + sig { params(name: Symbol).returns(Integer) } + def call_node_flag(name); end + + # Create a new CallOperatorWriteNode node. + # + # source://prism//lib/prism/dsl.rb#172 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + binary_operator: Symbol, + binary_operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::CallOperatorWriteNode) + end + def call_operator_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), message_loc: T.unsafe(nil), read_name: T.unsafe(nil), write_name: T.unsafe(nil), binary_operator: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new CallOrWriteNode node. + # + # source://prism//lib/prism/dsl.rb#177 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::CallOrWriteNode) + end + def call_or_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), message_loc: T.unsafe(nil), read_name: T.unsafe(nil), write_name: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new CallTargetNode node. + # + # source://prism//lib/prism/dsl.rb#182 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: Prism::Node, + call_operator_loc: Prism::Location, + name: Symbol, + message_loc: Prism::Location + ).returns(Prism::CallTargetNode) + end + def call_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), name: T.unsafe(nil), message_loc: T.unsafe(nil)); end + + # Create a new CapturePatternNode node. + # + # source://prism//lib/prism/dsl.rb#187 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + target: Prism::LocalVariableTargetNode, + operator_loc: Prism::Location + ).returns(Prism::CapturePatternNode) + end + def capture_pattern_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # Create a new CaseMatchNode node. + # + # source://prism//lib/prism/dsl.rb#192 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::InNode], + else_clause: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location + ).returns(Prism::CaseMatchNode) + end + def case_match_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), predicate: T.unsafe(nil), conditions: T.unsafe(nil), else_clause: T.unsafe(nil), case_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + # Create a new CaseNode node. + # + # source://prism//lib/prism/dsl.rb#197 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::WhenNode], + else_clause: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location + ).returns(Prism::CaseNode) + end + def case_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), predicate: T.unsafe(nil), conditions: T.unsafe(nil), else_clause: T.unsafe(nil), case_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end + + # Create a new ClassNode node. + # + # source://prism//lib/prism/dsl.rb#202 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + constant_path: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::CallNode), + inheritance_operator_loc: T.nilable(Prism::Location), + superclass: T.nilable(Prism::Node), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location, + name: Symbol + ).returns(Prism::ClassNode) + end + def class_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), class_keyword_loc: T.unsafe(nil), constant_path: T.unsafe(nil), inheritance_operator_loc: T.unsafe(nil), superclass: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), name: T.unsafe(nil)); end - # Create a new BreakNode node + # Create a new ClassVariableAndWriteNode node. # - # source://prism//lib/prism/dsl.rb#131 - def BreakNode(arguments, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#207 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ClassVariableAndWriteNode) + end + def class_variable_and_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new ClassVariableOperatorWriteNode node. + # + # source://prism//lib/prism/dsl.rb#212 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::ClassVariableOperatorWriteNode) + end + def class_variable_operator_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end - # Create a new CallAndWriteNode node + # Create a new ClassVariableOrWriteNode node. # - # source://prism//lib/prism/dsl.rb#136 - def CallAndWriteNode(flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#217 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ClassVariableOrWriteNode) + end + def class_variable_or_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new ClassVariableReadNode node. + # + # source://prism//lib/prism/dsl.rb#222 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ClassVariableReadNode) + end + def class_variable_read_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + # Create a new ClassVariableTargetNode node. + # + # source://prism//lib/prism/dsl.rb#227 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ClassVariableTargetNode) + end + def class_variable_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + # Create a new ClassVariableWriteNode node. + # + # source://prism//lib/prism/dsl.rb#232 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::ClassVariableWriteNode) + end + def class_variable_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end + + # Create a new ConstantAndWriteNode node. + # + # source://prism//lib/prism/dsl.rb#237 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantAndWriteNode) + end + def constant_and_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end + + # Create a new ConstantOperatorWriteNode node. + # + # source://prism//lib/prism/dsl.rb#242 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::ConstantOperatorWriteNode) + end + def constant_operator_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end - # Create a new CallNode node + # Create a new ConstantOrWriteNode node. # - # source://prism//lib/prism/dsl.rb#141 - def CallNode(flags, receiver, call_operator_loc, name, message_loc, opening_loc, arguments, closing_loc, block, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#247 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantOrWriteNode) + end + def constant_or_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - # Create a new CallOperatorWriteNode node + # Create a new ConstantPathAndWriteNode node. # - # source://prism//lib/prism/dsl.rb#146 - def CallOperatorWriteNode(flags, receiver, call_operator_loc, message_loc, read_name, write_name, binary_operator, binary_operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#252 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantPathAndWriteNode) + end + def constant_path_and_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - # Create a new CallOrWriteNode node + # Create a new ConstantPathNode node. # - # source://prism//lib/prism/dsl.rb#151 - def CallOrWriteNode(flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#257 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + parent: T.nilable(Prism::Node), + name: T.nilable(Symbol), + delimiter_loc: Prism::Location, + name_loc: Prism::Location + ).returns(Prism::ConstantPathNode) + end + def constant_path_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), parent: T.unsafe(nil), name: T.unsafe(nil), delimiter_loc: T.unsafe(nil), name_loc: T.unsafe(nil)); end - # Create a new CallTargetNode node + # Create a new ConstantPathOperatorWriteNode node. # - # source://prism//lib/prism/dsl.rb#156 - def CallTargetNode(flags, receiver, call_operator_loc, name, message_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#262 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::ConstantPathOperatorWriteNode) + end + def constant_path_operator_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end - # Create a new CapturePatternNode node + # Create a new ConstantPathOrWriteNode node. # - # source://prism//lib/prism/dsl.rb#161 - def CapturePatternNode(value, target, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#267 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantPathOrWriteNode) + end + def constant_path_or_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - # Create a new CaseMatchNode node + # Create a new ConstantPathTargetNode node. # - # source://prism//lib/prism/dsl.rb#166 - def CaseMatchNode(predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#272 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + parent: T.nilable(Prism::Node), + name: T.nilable(Symbol), + delimiter_loc: Prism::Location, + name_loc: Prism::Location + ).returns(Prism::ConstantPathTargetNode) + end + def constant_path_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), parent: T.unsafe(nil), name: T.unsafe(nil), delimiter_loc: T.unsafe(nil), name_loc: T.unsafe(nil)); end - # Create a new CaseNode node + # Create a new ConstantPathWriteNode node. # - # source://prism//lib/prism/dsl.rb#171 - def CaseNode(predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#277 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantPathWriteNode) + end + def constant_path_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - # Create a new ClassNode node + # Create a new ConstantReadNode node. # - # source://prism//lib/prism/dsl.rb#176 - def ClassNode(locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, body, end_keyword_loc, name, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#282 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ConstantReadNode) + end + def constant_read_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end - # Create a new ClassVariableAndWriteNode node + # Create a new ConstantTargetNode node. # - # source://prism//lib/prism/dsl.rb#181 - def ClassVariableAndWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#287 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ConstantTargetNode) + end + def constant_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end - # Create a new ClassVariableOperatorWriteNode node + # Create a new ConstantWriteNode node. # - # source://prism//lib/prism/dsl.rb#186 - def ClassVariableOperatorWriteNode(name, name_loc, binary_operator_loc, value, binary_operator, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#292 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::ConstantWriteNode) + end + def constant_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - # Create a new ClassVariableOrWriteNode node + # Create a new DefNode node. # - # source://prism//lib/prism/dsl.rb#191 - def ClassVariableOrWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#297 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + receiver: T.nilable(Prism::Node), + parameters: T.nilable(Prism::ParametersNode), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + locals: T::Array[Symbol], + def_keyword_loc: Prism::Location, + operator_loc: T.nilable(Prism::Location), + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + equal_loc: T.nilable(Prism::Location), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::DefNode) + end + def def_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), receiver: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil), locals: T.unsafe(nil), def_keyword_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil), equal_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end - # Create a new ClassVariableReadNode node + # Create a new DefinedNode node. # - # source://prism//lib/prism/dsl.rb#196 - def ClassVariableReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#302 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + lparen_loc: T.nilable(Prism::Location), + value: Prism::Node, + rparen_loc: T.nilable(Prism::Location), + keyword_loc: Prism::Location + ).returns(Prism::DefinedNode) + end + def defined_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), lparen_loc: T.unsafe(nil), value: T.unsafe(nil), rparen_loc: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end - # Create a new ClassVariableTargetNode node + # Create a new ElseNode node. # - # source://prism//lib/prism/dsl.rb#201 - def ClassVariableTargetNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#307 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + else_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::ElseNode) + end + def else_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), else_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end - # Create a new ClassVariableWriteNode node + # Create a new EmbeddedStatementsNode node. # - # source://prism//lib/prism/dsl.rb#206 - def ClassVariableWriteNode(name, name_loc, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#312 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + closing_loc: Prism::Location + ).returns(Prism::EmbeddedStatementsNode) + end + def embedded_statements_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), statements: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - # Create a new ConstantAndWriteNode node + # Create a new EmbeddedVariableNode node. # - # source://prism//lib/prism/dsl.rb#211 - def ConstantAndWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#317 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + variable: T.any(Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode) + ).returns(Prism::EmbeddedVariableNode) + end + def embedded_variable_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), operator_loc: T.unsafe(nil), variable: T.unsafe(nil)); end - # Create a new ConstantOperatorWriteNode node + # Retrieve the value of one of the EncodingFlags flags. # - # source://prism//lib/prism/dsl.rb#216 - def ConstantOperatorWriteNode(name, name_loc, binary_operator_loc, value, binary_operator, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#863 + sig { params(name: Symbol).returns(Integer) } + def encoding_flag(name); end - # Create a new ConstantOrWriteNode node + # Create a new EnsureNode node. # - # source://prism//lib/prism/dsl.rb#221 - def ConstantOrWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#322 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + ensure_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + end_keyword_loc: Prism::Location + ).returns(Prism::EnsureNode) + end + def ensure_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), ensure_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end - # Create a new ConstantPathAndWriteNode node + # Create a new FalseNode node. # - # source://prism//lib/prism/dsl.rb#226 - def ConstantPathAndWriteNode(target, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#327 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::FalseNode) + end + def false_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - # Create a new ConstantPathNode node + # Create a new FindPatternNode node. # - # source://prism//lib/prism/dsl.rb#231 - def ConstantPathNode(parent, name, delimiter_loc, name_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#332 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + left: Prism::SplatNode, + requireds: T::Array[Prism::Node], + right: T.any(Prism::SplatNode, Prism::MissingNode), + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::FindPatternNode) + end + def find_pattern_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), constant: T.unsafe(nil), left: T.unsafe(nil), requireds: T.unsafe(nil), right: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - # Create a new ConstantPathOperatorWriteNode node + # Create a new FlipFlopNode node. # - # source://prism//lib/prism/dsl.rb#236 - def ConstantPathOperatorWriteNode(target, binary_operator_loc, value, binary_operator, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#337 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: T.nilable(Prism::Node), + right: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).returns(Prism::FlipFlopNode) + end + def flip_flop_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - # Create a new ConstantPathOrWriteNode node + # Create a new FloatNode node. # - # source://prism//lib/prism/dsl.rb#241 - def ConstantPathOrWriteNode(target, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#342 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Float + ).returns(Prism::FloatNode) + end + def float_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil)); end - # Create a new ConstantPathTargetNode node + # Create a new ForNode node. # - # source://prism//lib/prism/dsl.rb#246 - def ConstantPathTargetNode(parent, name, delimiter_loc, name_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#347 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + index: T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode), + collection: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + for_keyword_loc: Prism::Location, + in_keyword_loc: Prism::Location, + do_keyword_loc: T.nilable(Prism::Location), + end_keyword_loc: Prism::Location + ).returns(Prism::ForNode) + end + def for_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), index: T.unsafe(nil), collection: T.unsafe(nil), statements: T.unsafe(nil), for_keyword_loc: T.unsafe(nil), in_keyword_loc: T.unsafe(nil), do_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end - # Create a new ConstantPathWriteNode node + # Create a new ForwardingArgumentsNode node. # - # source://prism//lib/prism/dsl.rb#251 - def ConstantPathWriteNode(target, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#352 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::ForwardingArgumentsNode) + end + def forwarding_arguments_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - # Create a new ConstantReadNode node + # Create a new ForwardingParameterNode node. # - # source://prism//lib/prism/dsl.rb#256 - def ConstantReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#357 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::ForwardingParameterNode) + end + def forwarding_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - # Create a new ConstantTargetNode node + # Create a new ForwardingSuperNode node. # - # source://prism//lib/prism/dsl.rb#261 - def ConstantTargetNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#362 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + block: T.nilable(Prism::BlockNode) + ).returns(Prism::ForwardingSuperNode) + end + def forwarding_super_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), block: T.unsafe(nil)); end - # Create a new ConstantWriteNode node + # Create a new GlobalVariableAndWriteNode node. # - # source://prism//lib/prism/dsl.rb#266 - def ConstantWriteNode(name, name_loc, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#367 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::GlobalVariableAndWriteNode) + end + def global_variable_and_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - # Create a new DefNode node + # Create a new GlobalVariableOperatorWriteNode node. # - # source://prism//lib/prism/dsl.rb#271 - def DefNode(name, name_loc, receiver, parameters, body, locals, def_keyword_loc, operator_loc, lparen_loc, rparen_loc, equal_loc, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#372 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::GlobalVariableOperatorWriteNode) + end + def global_variable_operator_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end - # Create a new DefinedNode node + # Create a new GlobalVariableOrWriteNode node. # - # source://prism//lib/prism/dsl.rb#276 - def DefinedNode(lparen_loc, value, rparen_loc, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#377 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::GlobalVariableOrWriteNode) + end + def global_variable_or_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - # Create a new ElseNode node + # Create a new GlobalVariableReadNode node. # - # source://prism//lib/prism/dsl.rb#281 - def ElseNode(else_keyword_loc, statements, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#382 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::GlobalVariableReadNode) + end + def global_variable_read_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end - # Create a new EmbeddedStatementsNode node + # Create a new GlobalVariableTargetNode node. # - # source://prism//lib/prism/dsl.rb#286 - def EmbeddedStatementsNode(opening_loc, statements, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#387 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::GlobalVariableTargetNode) + end + def global_variable_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end - # Create a new EmbeddedVariableNode node + # Create a new GlobalVariableWriteNode node. # - # source://prism//lib/prism/dsl.rb#291 - def EmbeddedVariableNode(operator_loc, variable, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#392 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::GlobalVariableWriteNode) + end + def global_variable_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - # Create a new EnsureNode node + # Create a new HashNode node. # - # source://prism//lib/prism/dsl.rb#296 - def EnsureNode(ensure_keyword_loc, statements, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#397 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)], + closing_loc: Prism::Location + ).returns(Prism::HashNode) + end + def hash_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), elements: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - # Create a new FalseNode node + # Create a new HashPatternNode node. # - # source://prism//lib/prism/dsl.rb#301 - def FalseNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#402 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + elements: T::Array[Prism::AssocNode], + rest: T.nilable(T.any(Prism::AssocSplatNode, Prism::NoKeywordsParameterNode)), + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::HashPatternNode) + end + def hash_pattern_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), constant: T.unsafe(nil), elements: T.unsafe(nil), rest: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - # Create a new FindPatternNode node + # Create a new IfNode node. # - # source://prism//lib/prism/dsl.rb#306 - def FindPatternNode(constant, left, requireds, right, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#407 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + if_keyword_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + subsequent: T.nilable(T.any(Prism::ElseNode, Prism::IfNode)), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::IfNode) + end + def if_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), if_keyword_loc: T.unsafe(nil), predicate: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), subsequent: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end - # Create a new FlipFlopNode node + # Create a new ImaginaryNode node. # - # source://prism//lib/prism/dsl.rb#311 - def FlipFlopNode(flags, left, right, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#412 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + numeric: T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode) + ).returns(Prism::ImaginaryNode) + end + def imaginary_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), numeric: T.unsafe(nil)); end - # Create a new FloatNode node + # Create a new ImplicitNode node. # - # source://prism//lib/prism/dsl.rb#316 - def FloatNode(value, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#417 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: T.any(Prism::LocalVariableReadNode, Prism::CallNode, Prism::ConstantReadNode, Prism::LocalVariableTargetNode) + ).returns(Prism::ImplicitNode) + end + def implicit_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil)); end - # Create a new ForNode node + # Create a new ImplicitRestNode node. # - # source://prism//lib/prism/dsl.rb#321 - def ForNode(index, collection, statements, for_keyword_loc, in_keyword_loc, do_keyword_loc, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#422 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::ImplicitRestNode) + end + def implicit_rest_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - # Create a new ForwardingArgumentsNode node + # Create a new InNode node. # - # source://prism//lib/prism/dsl.rb#326 - def ForwardingArgumentsNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#427 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + pattern: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + in_loc: Prism::Location, + then_loc: T.nilable(Prism::Location) + ).returns(Prism::InNode) + end + def in_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), pattern: T.unsafe(nil), statements: T.unsafe(nil), in_loc: T.unsafe(nil), then_loc: T.unsafe(nil)); end - # Create a new ForwardingParameterNode node + # Create a new IndexAndWriteNode node. # - # source://prism//lib/prism/dsl.rb#331 - def ForwardingParameterNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#432 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::BlockArgumentNode), + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::IndexAndWriteNode) + end + def index_and_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - # Create a new ForwardingSuperNode node + # Create a new IndexOperatorWriteNode node. # - # source://prism//lib/prism/dsl.rb#336 - def ForwardingSuperNode(block, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#437 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::BlockArgumentNode), + binary_operator: Symbol, + binary_operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::IndexOperatorWriteNode) + end + def index_operator_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), binary_operator: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - # Create a new GlobalVariableAndWriteNode node + # Create a new IndexOrWriteNode node. # - # source://prism//lib/prism/dsl.rb#341 - def GlobalVariableAndWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#442 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::BlockArgumentNode), + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::IndexOrWriteNode) + end + def index_or_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - # Create a new GlobalVariableOperatorWriteNode node + # Create a new IndexTargetNode node. # - # source://prism//lib/prism/dsl.rb#346 - def GlobalVariableOperatorWriteNode(name, name_loc, binary_operator_loc, value, binary_operator, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#447 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: Prism::Node, + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::BlockArgumentNode) + ).returns(Prism::IndexTargetNode) + end + def index_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil)); end - # Create a new GlobalVariableOrWriteNode node + # Create a new InstanceVariableAndWriteNode node. # - # source://prism//lib/prism/dsl.rb#351 - def GlobalVariableOrWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#452 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::InstanceVariableAndWriteNode) + end + def instance_variable_and_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - # Create a new GlobalVariableReadNode node + # Create a new InstanceVariableOperatorWriteNode node. # - # source://prism//lib/prism/dsl.rb#356 - def GlobalVariableReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#457 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::InstanceVariableOperatorWriteNode) + end + def instance_variable_operator_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end - # Create a new GlobalVariableTargetNode node + # Create a new InstanceVariableOrWriteNode node. # - # source://prism//lib/prism/dsl.rb#361 - def GlobalVariableTargetNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#462 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::InstanceVariableOrWriteNode) + end + def instance_variable_or_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - # Create a new GlobalVariableWriteNode node + # Create a new InstanceVariableReadNode node. # - # source://prism//lib/prism/dsl.rb#366 - def GlobalVariableWriteNode(name, name_loc, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#467 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::InstanceVariableReadNode) + end + def instance_variable_read_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end - # Create a new HashNode node + # Create a new InstanceVariableTargetNode node. # - # source://prism//lib/prism/dsl.rb#371 - def HashNode(opening_loc, elements, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#472 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::InstanceVariableTargetNode) + end + def instance_variable_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end - # Create a new HashPatternNode node + # Create a new InstanceVariableWriteNode node. # - # source://prism//lib/prism/dsl.rb#376 - def HashPatternNode(constant, elements, rest, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#477 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::InstanceVariableWriteNode) + end + def instance_variable_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - # Create a new IfNode node + # Retrieve the value of one of the IntegerBaseFlags flags. # - # 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 + # source://prism//lib/prism/dsl.rb#872 + sig { params(name: Symbol).returns(Integer) } + def integer_base_flag(name); end - # Create a new ImaginaryNode node + # Create a new IntegerNode node. # - # source://prism//lib/prism/dsl.rb#386 - def ImaginaryNode(numeric, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#482 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Integer + ).returns(Prism::IntegerNode) + end + def integer_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil)); end - # Create a new ImplicitNode node + # Create a new InterpolatedMatchLastLineNode node. # - # source://prism//lib/prism/dsl.rb#391 - def ImplicitNode(value, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#487 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location + ).returns(Prism::InterpolatedMatchLastLineNode) + end + def interpolated_match_last_line_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - # Create a new ImplicitRestNode node + # Create a new InterpolatedRegularExpressionNode node. # - # source://prism//lib/prism/dsl.rb#396 - def ImplicitRestNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#492 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location + ).returns(Prism::InterpolatedRegularExpressionNode) + end + def interpolated_regular_expression_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - # Create a new InNode node + # Create a new InterpolatedStringNode node. # - # source://prism//lib/prism/dsl.rb#401 - def InNode(pattern, statements, in_loc, then_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#497 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode, Prism::InterpolatedStringNode)], + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::InterpolatedStringNode) + end + def interpolated_string_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - # Create a new IndexAndWriteNode node + # Retrieve the value of one of the InterpolatedStringNodeFlags flags. # - # 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 + # source://prism//lib/prism/dsl.rb#883 + sig { params(name: Symbol).returns(Integer) } + def interpolated_string_node_flag(name); end - # Create a new IndexOperatorWriteNode node + # Create a new InterpolatedSymbolNode node. # - # source://prism//lib/prism/dsl.rb#411 - def IndexOperatorWriteNode(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, binary_operator, binary_operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#502 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::InterpolatedSymbolNode) + end + def interpolated_symbol_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - # Create a new IndexOrWriteNode node + # Create a new InterpolatedXStringNode node. # - # source://prism//lib/prism/dsl.rb#416 - def IndexOrWriteNode(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#507 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location + ).returns(Prism::InterpolatedXStringNode) + end + def interpolated_x_string_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - # Create a new IndexTargetNode node + # Create a new ItLocalVariableReadNode node. # - # source://prism//lib/prism/dsl.rb#421 - def IndexTargetNode(flags, receiver, opening_loc, arguments, closing_loc, block, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#512 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::ItLocalVariableReadNode) + end + def it_local_variable_read_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - # Create a new InstanceVariableAndWriteNode node + # Create a new ItParametersNode node. # - # source://prism//lib/prism/dsl.rb#426 - def InstanceVariableAndWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#517 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::ItParametersNode) + end + def it_parameters_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - # Create a new InstanceVariableOperatorWriteNode node + # Create a new KeywordHashNode node. # - # source://prism//lib/prism/dsl.rb#431 - def InstanceVariableOperatorWriteNode(name, name_loc, binary_operator_loc, value, binary_operator, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#522 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)] + ).returns(Prism::KeywordHashNode) + end + def keyword_hash_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), elements: T.unsafe(nil)); end - # Create a new InstanceVariableOrWriteNode node + # Retrieve the value of one of the KeywordHashNodeFlags flags. # - # source://prism//lib/prism/dsl.rb#436 - def InstanceVariableOrWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#892 + sig { params(name: Symbol).returns(Integer) } + def keyword_hash_node_flag(name); end - # Create a new InstanceVariableReadNode node + # Create a new KeywordRestParameterNode node. # - # source://prism//lib/prism/dsl.rb#441 - def InstanceVariableReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#527 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location + ).returns(Prism::KeywordRestParameterNode) + end + def keyword_rest_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - # Create a new InstanceVariableTargetNode node + # Create a new LambdaNode node. # - # source://prism//lib/prism/dsl.rb#446 - def InstanceVariableTargetNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#532 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + operator_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location, + parameters: T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)) + ).returns(Prism::LambdaNode) + end + def lambda_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil)); end - # Create a new InstanceVariableWriteNode node + # Create a new LocalVariableAndWriteNode node. # - # source://prism//lib/prism/dsl.rb#451 - def InstanceVariableWriteNode(name, name_loc, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#537 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + depth: Integer + ).returns(Prism::LocalVariableAndWriteNode) + end + def local_variable_and_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end - # Create a new IntegerNode node + # Create a new LocalVariableOperatorWriteNode node. # - # source://prism//lib/prism/dsl.rb#456 - def IntegerNode(flags, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#542 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + binary_operator: Symbol, + depth: Integer + ).returns(Prism::LocalVariableOperatorWriteNode) + end + def local_variable_operator_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), binary_operator: T.unsafe(nil), depth: T.unsafe(nil)); end - # Create a new InterpolatedMatchLastLineNode node + # Create a new LocalVariableOrWriteNode node. # - # source://prism//lib/prism/dsl.rb#461 - def InterpolatedMatchLastLineNode(flags, opening_loc, parts, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#547 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + depth: Integer + ).returns(Prism::LocalVariableOrWriteNode) + end + def local_variable_or_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end - # Create a new InterpolatedRegularExpressionNode node + # Create a new LocalVariableReadNode node. # - # source://prism//lib/prism/dsl.rb#466 - def InterpolatedRegularExpressionNode(flags, opening_loc, parts, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#552 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer + ).returns(Prism::LocalVariableReadNode) + end + def local_variable_read_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end - # Create a new InterpolatedStringNode node + # Create a new LocalVariableTargetNode node. # - # source://prism//lib/prism/dsl.rb#471 - def InterpolatedStringNode(flags, opening_loc, parts, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#557 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer + ).returns(Prism::LocalVariableTargetNode) + end + def local_variable_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end - # Create a new InterpolatedSymbolNode node + # Create a new LocalVariableWriteNode node. # - # source://prism//lib/prism/dsl.rb#476 - def InterpolatedSymbolNode(opening_loc, parts, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#562 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::LocalVariableWriteNode) + end + def local_variable_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - # Create a new InterpolatedXStringNode node + # Create a new Location object. # - # source://prism//lib/prism/dsl.rb#481 - def InterpolatedXStringNode(opening_loc, parts, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#72 + sig { params(source: Prism::Source, start_offset: Integer, length: Integer).returns(Prism::Location) } + def location(source: T.unsafe(nil), start_offset: T.unsafe(nil), length: T.unsafe(nil)); end - # Create a new ItLocalVariableReadNode node + # Retrieve the value of one of the LoopFlags flags. # - # source://prism//lib/prism/dsl.rb#486 - def ItLocalVariableReadNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#900 + sig { params(name: Symbol).returns(Integer) } + def loop_flag(name); end - # Create a new ItParametersNode node + # Create a new MatchLastLineNode node. # - # source://prism//lib/prism/dsl.rb#491 - def ItParametersNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#567 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String + ).returns(Prism::MatchLastLineNode) + end + def match_last_line_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end - # Create a new KeywordHashNode node + # Create a new MatchPredicateNode node. # - # source://prism//lib/prism/dsl.rb#496 - def KeywordHashNode(flags, elements, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#572 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::MatchPredicateNode) + end + def match_predicate_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), pattern: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - # Create a new KeywordRestParameterNode node + # Create a new MatchRequiredNode node. # - # source://prism//lib/prism/dsl.rb#501 - def KeywordRestParameterNode(flags, name, name_loc, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#577 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::MatchRequiredNode) + end + def match_required_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), pattern: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - # Create a new LambdaNode node + # Create a new MatchWriteNode node. # - # source://prism//lib/prism/dsl.rb#506 - def LambdaNode(locals, operator_loc, opening_loc, closing_loc, parameters, body, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#582 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + call: Prism::CallNode, + targets: T::Array[Prism::LocalVariableTargetNode] + ).returns(Prism::MatchWriteNode) + end + def match_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), call: T.unsafe(nil), targets: T.unsafe(nil)); end - # Create a new LocalVariableAndWriteNode node + # Create a new MissingNode node. # - # source://prism//lib/prism/dsl.rb#511 - def LocalVariableAndWriteNode(name_loc, operator_loc, value, name, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#587 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::MissingNode) + end + def missing_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - # Create a new LocalVariableOperatorWriteNode node + # Create a new ModuleNode node. # - # source://prism//lib/prism/dsl.rb#516 - def LocalVariableOperatorWriteNode(name_loc, binary_operator_loc, value, name, binary_operator, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#592 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + module_keyword_loc: Prism::Location, + constant_path: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::MissingNode), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location, + name: Symbol + ).returns(Prism::ModuleNode) + end + def module_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), module_keyword_loc: T.unsafe(nil), constant_path: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), name: T.unsafe(nil)); end - # Create a new LocalVariableOrWriteNode node + # Create a new MultiTargetNode node. # - # source://prism//lib/prism/dsl.rb#521 - def LocalVariableOrWriteNode(name_loc, operator_loc, value, name, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#597 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + rest: T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode)), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location) + ).returns(Prism::MultiTargetNode) + end + def multi_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), lefts: T.unsafe(nil), rest: T.unsafe(nil), rights: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil)); end - # Create a new LocalVariableReadNode node + # Create a new MultiWriteNode node. # - # source://prism//lib/prism/dsl.rb#526 - def LocalVariableReadNode(name, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#602 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + rest: T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode)), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::MultiWriteNode) + end + def multi_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), lefts: T.unsafe(nil), rest: T.unsafe(nil), rights: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - # Create a new LocalVariableTargetNode node + # Create a new NextNode node. # - # source://prism//lib/prism/dsl.rb#531 - def LocalVariableTargetNode(name, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#607 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location + ).returns(Prism::NextNode) + end + def next_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), arguments: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end - # Create a new LocalVariableWriteNode node + # Create a new NilNode node. # - # source://prism//lib/prism/dsl.rb#536 - def LocalVariableWriteNode(name, depth, name_loc, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#612 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::NilNode) + end + def nil_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - # Create a new Location object + # Create a new NoKeywordsParameterNode node. # - # source://prism//lib/prism/dsl.rb#46 - def Location(source = T.unsafe(nil), start_offset = T.unsafe(nil), length = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#617 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + keyword_loc: Prism::Location + ).returns(Prism::NoKeywordsParameterNode) + end + def no_keywords_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), operator_loc: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end - # Create a new MatchLastLineNode node + # Create a new NumberedParametersNode node. # - # source://prism//lib/prism/dsl.rb#541 - def MatchLastLineNode(flags, opening_loc, content_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#622 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + maximum: Integer + ).returns(Prism::NumberedParametersNode) + end + def numbered_parameters_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), maximum: T.unsafe(nil)); end - # Create a new MatchPredicateNode node + # Create a new NumberedReferenceReadNode node. # - # source://prism//lib/prism/dsl.rb#546 - def MatchPredicateNode(value, pattern, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#627 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + number: Integer + ).returns(Prism::NumberedReferenceReadNode) + end + def numbered_reference_read_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), number: T.unsafe(nil)); end - # Create a new MatchRequiredNode node + # Create a new OptionalKeywordParameterNode node. # - # source://prism//lib/prism/dsl.rb#551 - def MatchRequiredNode(value, pattern, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#632 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::OptionalKeywordParameterNode) + end + def optional_keyword_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil)); end - # Create a new MatchWriteNode node + # Create a new OptionalParameterNode node. # - # source://prism//lib/prism/dsl.rb#556 - def MatchWriteNode(call, targets, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#637 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::OptionalParameterNode) + end + def optional_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - # Create a new MissingNode node + # Create a new OrNode node. # - # source://prism//lib/prism/dsl.rb#561 - def MissingNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#642 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::OrNode) + end + def or_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - # Create a new ModuleNode node + # Retrieve the value of one of the ParameterFlags flags. # - # source://prism//lib/prism/dsl.rb#566 - def ModuleNode(locals, module_keyword_loc, constant_path, body, end_keyword_loc, name, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#908 + sig { params(name: Symbol).returns(Integer) } + def parameter_flag(name); end - # Create a new MultiTargetNode node + # Create a new ParametersNode node. # - # source://prism//lib/prism/dsl.rb#571 - def MultiTargetNode(lefts, rest, rights, lparen_loc, rparen_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#647 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + requireds: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)], + optionals: T::Array[Prism::OptionalParameterNode], + rest: T.nilable(T.any(Prism::RestParameterNode, Prism::ImplicitRestNode)), + posts: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode, Prism::ForwardingParameterNode)], + keywords: T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)], + keyword_rest: T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode)), + block: T.nilable(Prism::BlockParameterNode) + ).returns(Prism::ParametersNode) + end + def parameters_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), requireds: T.unsafe(nil), optionals: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), keywords: T.unsafe(nil), keyword_rest: T.unsafe(nil), block: T.unsafe(nil)); end - # Create a new MultiWriteNode node + # Create a new ParenthesesNode node. # - # source://prism//lib/prism/dsl.rb#576 - def MultiWriteNode(lefts, rest, rights, lparen_loc, rparen_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#652 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + body: T.nilable(Prism::Node), + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).returns(Prism::ParenthesesNode) + end + def parentheses_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), body: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - # Create a new NextNode node + # Create a new PinnedExpressionNode node. # - # source://prism//lib/prism/dsl.rb#581 - def NextNode(arguments, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#657 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: Prism::Node, + operator_loc: Prism::Location, + lparen_loc: Prism::Location, + rparen_loc: Prism::Location + ).returns(Prism::PinnedExpressionNode) + end + def pinned_expression_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), expression: T.unsafe(nil), operator_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil)); end - # Create a new NilNode node + # Create a new PinnedVariableNode node. # - # source://prism//lib/prism/dsl.rb#586 - def NilNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#662 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + variable: T.any(Prism::LocalVariableReadNode, Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::ItLocalVariableReadNode, Prism::MissingNode), + operator_loc: Prism::Location + ).returns(Prism::PinnedVariableNode) + end + def pinned_variable_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), variable: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - # Create a new NoKeywordsParameterNode node + # Create a new PostExecutionNode node. # - # source://prism//lib/prism/dsl.rb#591 - def NoKeywordsParameterNode(operator_loc, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#667 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).returns(Prism::PostExecutionNode) + end + def post_execution_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), statements: T.unsafe(nil), keyword_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - # Create a new NumberedParametersNode node + # Create a new PreExecutionNode node. # - # source://prism//lib/prism/dsl.rb#596 - def NumberedParametersNode(maximum, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#672 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).returns(Prism::PreExecutionNode) + end + def pre_execution_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), statements: T.unsafe(nil), keyword_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - # Create a new NumberedReferenceReadNode node + # Create a new ProgramNode node. # - # source://prism//lib/prism/dsl.rb#601 - def NumberedReferenceReadNode(number, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#677 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + statements: Prism::StatementsNode + ).returns(Prism::ProgramNode) + end + def program_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), statements: T.unsafe(nil)); end - # Create a new OptionalKeywordParameterNode node + # Retrieve the value of one of the RangeFlags flags. # - # source://prism//lib/prism/dsl.rb#606 - def OptionalKeywordParameterNode(flags, name, name_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#916 + sig { params(name: Symbol).returns(Integer) } + def range_flag(name); end - # Create a new OptionalParameterNode node + # Create a new RangeNode node. # - # source://prism//lib/prism/dsl.rb#611 - def OptionalParameterNode(flags, name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#682 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: T.nilable(Prism::Node), + right: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).returns(Prism::RangeNode) + end + def range_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - # Create a new OrNode node + # Create a new RationalNode node. # - # source://prism//lib/prism/dsl.rb#616 - def OrNode(left, right, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#687 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + numerator: Integer, + denominator: Integer + ).returns(Prism::RationalNode) + end + def rational_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), numerator: T.unsafe(nil), denominator: T.unsafe(nil)); end - # Create a new ParametersNode node + # Create a new RedoNode node. # - # source://prism//lib/prism/dsl.rb#621 - def ParametersNode(requireds, optionals, rest, posts, keywords, keyword_rest, block, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#692 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::RedoNode) + end + def redo_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - # Create a new ParenthesesNode node + # Retrieve the value of one of the RegularExpressionFlags flags. # - # source://prism//lib/prism/dsl.rb#626 - def ParenthesesNode(body, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#924 + sig { params(name: Symbol).returns(Integer) } + def regular_expression_flag(name); end - # Create a new PinnedExpressionNode node + # Create a new RegularExpressionNode node. # - # source://prism//lib/prism/dsl.rb#631 - def PinnedExpressionNode(expression, operator_loc, lparen_loc, rparen_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#697 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String + ).returns(Prism::RegularExpressionNode) + end + def regular_expression_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end - # Create a new PinnedVariableNode node + # Create a new RequiredKeywordParameterNode node. # - # source://prism//lib/prism/dsl.rb#636 - def PinnedVariableNode(variable, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#702 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location + ).returns(Prism::RequiredKeywordParameterNode) + end + def required_keyword_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil)); end - # Create a new PostExecutionNode node + # Create a new RequiredParameterNode node. # - # source://prism//lib/prism/dsl.rb#641 - def PostExecutionNode(statements, keyword_loc, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#707 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::RequiredParameterNode) + end + def required_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end - # Create a new PreExecutionNode node + # Create a new RescueModifierNode node. # - # source://prism//lib/prism/dsl.rb#646 - def PreExecutionNode(statements, keyword_loc, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#712 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: Prism::Node, + keyword_loc: Prism::Location, + rescue_expression: Prism::Node + ).returns(Prism::RescueModifierNode) + end + def rescue_modifier_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), expression: T.unsafe(nil), keyword_loc: T.unsafe(nil), rescue_expression: T.unsafe(nil)); end - # Create a new ProgramNode node + # Create a new RescueNode node. # - # source://prism//lib/prism/dsl.rb#651 - def ProgramNode(locals, statements, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#717 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + exceptions: T::Array[Prism::Node], + operator_loc: T.nilable(Prism::Location), + reference: T.nilable(T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode)), + statements: T.nilable(Prism::StatementsNode), + subsequent: T.nilable(Prism::RescueNode) + ).returns(Prism::RescueNode) + end + def rescue_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), exceptions: T.unsafe(nil), operator_loc: T.unsafe(nil), reference: T.unsafe(nil), statements: T.unsafe(nil), subsequent: T.unsafe(nil)); end - # Create a new RangeNode node + # Create a new RestParameterNode node. # - # source://prism//lib/prism/dsl.rb#656 - def RangeNode(flags, left, right, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#722 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location + ).returns(Prism::RestParameterNode) + end + def rest_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - # Create a new RationalNode node + # Create a new RetryNode node. # - # source://prism//lib/prism/dsl.rb#661 - def RationalNode(flags, numerator, denominator, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#727 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::RetryNode) + end + def retry_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - # Create a new RedoNode node + # Create a new ReturnNode node. # - # source://prism//lib/prism/dsl.rb#666 - def RedoNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#732 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode) + ).returns(Prism::ReturnNode) + end + def return_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), arguments: T.unsafe(nil)); end - # Create a new RegularExpressionNode node + # Create a new SelfNode node. # - # source://prism//lib/prism/dsl.rb#671 - def RegularExpressionNode(flags, opening_loc, content_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#737 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::SelfNode) + end + def self_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - # Create a new RequiredKeywordParameterNode node + # Create a new ShareableConstantNode node. # - # source://prism//lib/prism/dsl.rb#676 - def RequiredKeywordParameterNode(flags, name, name_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#742 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + write: T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode) + ).returns(Prism::ShareableConstantNode) + end + def shareable_constant_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), write: T.unsafe(nil)); end - # Create a new RequiredParameterNode node + # Retrieve the value of one of the ShareableConstantNodeFlags flags. # - # source://prism//lib/prism/dsl.rb#681 - def RequiredParameterNode(flags, name, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#942 + sig { params(name: Symbol).returns(Integer) } + def shareable_constant_node_flag(name); end - # Create a new RescueModifierNode node + # Create a new SingletonClassNode node. # - # source://prism//lib/prism/dsl.rb#686 - def RescueModifierNode(expression, keyword_loc, rescue_expression, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#747 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + operator_loc: Prism::Location, + expression: Prism::Node, + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location + ).returns(Prism::SingletonClassNode) + end + def singleton_class_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), class_keyword_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), expression: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end - # Create a new RescueNode node + # Create a new Source object. # - # source://prism//lib/prism/dsl.rb#691 - def RescueNode(keyword_loc, exceptions, operator_loc, reference, statements, consequent, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#67 + sig { params(string: String).returns(Prism::Source) } + def source(string); end - # Create a new RestParameterNode node + # Create a new SourceEncodingNode node. # - # source://prism//lib/prism/dsl.rb#696 - def RestParameterNode(flags, name, name_loc, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#752 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::SourceEncodingNode) + end + def source_encoding_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - # Create a new RetryNode node + # Create a new SourceFileNode node. # - # source://prism//lib/prism/dsl.rb#701 - def RetryNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#757 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + filepath: String + ).returns(Prism::SourceFileNode) + end + def source_file_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), filepath: T.unsafe(nil)); end - # Create a new ReturnNode node + # Create a new SourceLineNode node. # - # source://prism//lib/prism/dsl.rb#706 - def ReturnNode(flags, keyword_loc, arguments, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#762 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::SourceLineNode) + end + def source_line_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - # Create a new SelfNode node + # Create a new SplatNode node. # - # source://prism//lib/prism/dsl.rb#711 - def SelfNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#767 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + expression: T.nilable(Prism::Node) + ).returns(Prism::SplatNode) + end + def splat_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), operator_loc: T.unsafe(nil), expression: T.unsafe(nil)); end - # Create a new ShareableConstantNode node + # Create a new StatementsNode node. # - # source://prism//lib/prism/dsl.rb#716 - def ShareableConstantNode(flags, write, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#772 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + body: T::Array[Prism::Node] + ).returns(Prism::StatementsNode) + end + def statements_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), body: T.unsafe(nil)); end - # Create a new SingletonClassNode node + # Retrieve the value of one of the StringFlags flags. # - # source://prism//lib/prism/dsl.rb#721 - def SingletonClassNode(locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#952 + sig { params(name: Symbol).returns(Integer) } + def string_flag(name); end - # Create a new SourceEncodingNode node + # Create a new StringNode node. # - # source://prism//lib/prism/dsl.rb#726 - def SourceEncodingNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#777 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + content_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + unescaped: String + ).returns(Prism::StringNode) + end + def string_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end - # Create a new SourceFileNode node + # Create a new SuperNode node. # - # source://prism//lib/prism/dsl.rb#731 - def SourceFileNode(flags, filepath, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#782 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location), + block: T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) + ).returns(Prism::SuperNode) + end + def super_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), arguments: T.unsafe(nil), rparen_loc: T.unsafe(nil), block: T.unsafe(nil)); end - # Create a new SourceLineNode node + # Retrieve the value of one of the SymbolFlags flags. # - # source://prism//lib/prism/dsl.rb#736 - def SourceLineNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#963 + sig { params(name: Symbol).returns(Integer) } + def symbol_flag(name); end - # Create a new SplatNode node + # Create a new SymbolNode node. # - # source://prism//lib/prism/dsl.rb#741 - def SplatNode(operator_loc, expression, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#787 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + value_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + unescaped: String + ).returns(Prism::SymbolNode) + end + def symbol_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), value_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end - # Create a new StatementsNode node + # Create a new TrueNode node. # - # source://prism//lib/prism/dsl.rb#746 - def StatementsNode(body, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#792 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer + ).returns(Prism::TrueNode) + end + def true_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - # Create a new StringNode node + # Create a new UndefNode node. # - # source://prism//lib/prism/dsl.rb#751 - def StringNode(flags, opening_loc, content_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#797 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + names: T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)], + keyword_loc: Prism::Location + ).returns(Prism::UndefNode) + end + def undef_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), names: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end - # Create a new SuperNode node + # Create a new UnlessNode node. # - # source://prism//lib/prism/dsl.rb#756 - def SuperNode(keyword_loc, lparen_loc, arguments, rparen_loc, block, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#802 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + else_clause: T.nilable(Prism::ElseNode), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::UnlessNode) + end + def unless_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), predicate: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), else_clause: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end - # Create a new SymbolNode node + # Create a new UntilNode node. # - # source://prism//lib/prism/dsl.rb#761 - def SymbolNode(flags, opening_loc, value_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#807 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + statements: T.nilable(Prism::StatementsNode) + ).returns(Prism::UntilNode) + end + def until_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), predicate: T.unsafe(nil), statements: T.unsafe(nil)); end - # Create a new TrueNode node + # Create a new WhenNode node. # - # source://prism//lib/prism/dsl.rb#766 - def TrueNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#812 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + conditions: T::Array[Prism::Node], + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode) + ).returns(Prism::WhenNode) + end + def when_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), conditions: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil)); end - # Create a new UndefNode node + # Create a new WhileNode node. # - # source://prism//lib/prism/dsl.rb#771 - def UndefNode(names, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#817 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + statements: T.nilable(Prism::StatementsNode) + ).returns(Prism::WhileNode) + end + def while_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), predicate: T.unsafe(nil), statements: T.unsafe(nil)); end - # Create a new UnlessNode node + # Create a new XStringNode node. # - # source://prism//lib/prism/dsl.rb#776 - def UnlessNode(keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#822 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String + ).returns(Prism::XStringNode) + end + def x_string_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end - # Create a new UntilNode node + # Create a new YieldNode node. # - # source://prism//lib/prism/dsl.rb#781 - def UntilNode(flags, keyword_loc, closing_loc, predicate, statements, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#827 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location) + ).returns(Prism::YieldNode) + end + def yield_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), arguments: T.unsafe(nil), rparen_loc: T.unsafe(nil)); end - # Create a new WhenNode node - # - # source://prism//lib/prism/dsl.rb#786 - def WhenNode(keyword_loc, conditions, then_keyword_loc, statements, source = T.unsafe(nil), location = T.unsafe(nil)); end + private - # Create a new WhileNode node + # The default location object that gets attached to nodes if no location is + # specified, which uses the given source. # - # source://prism//lib/prism/dsl.rb#791 - def WhileNode(flags, keyword_loc, closing_loc, predicate, statements, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#982 + sig { returns(Prism::Location) } + def default_location; end - # Create a new XStringNode node + # The default node that gets attached to nodes if no node is specified for a + # required node field. # - # source://prism//lib/prism/dsl.rb#796 - def XStringNode(flags, opening_loc, content_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#988 + sig { params(source: Prism::Source, location: Prism::Location).returns(Prism::Node) } + def default_node(source, location); end - # Create a new YieldNode node + # The default source object that gets attached to nodes and locations if no + # source is specified. # - # source://prism//lib/prism/dsl.rb#801 - def YieldNode(keyword_loc, lparen_loc, arguments, rparen_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#976 + sig { returns(Prism::Source) } + def default_source; end end # Represents a method definition. @@ -9287,137 +10597,141 @@ end # end # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#5793 +# source://prism//lib/prism/node.rb#5137 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 + # Initialize a new DefNode node. # # @return [DefNode] a new instance of DefNode # - # source://prism//lib/prism/node.rb#5795 + # source://prism//lib/prism/node.rb#5139 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, receiver: T.nilable(Prism::Node), parameters: T.nilable(Prism::ParametersNode), - body: T.nilable(Prism::Node), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), locals: T::Array[Symbol], def_keyword_loc: Prism::Location, operator_loc: T.nilable(Prism::Location), lparen_loc: T.nilable(Prism::Location), rparen_loc: T.nilable(Prism::Location), equal_loc: T.nilable(Prism::Location), - end_keyword_loc: T.nilable(Prism::Location), - location: Prism::Location + end_keyword_loc: T.nilable(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 initialize(source, node_id, location, flags, name, name_loc, receiver, parameters, body, locals, def_keyword_loc, operator_loc, lparen_loc, rparen_loc, equal_loc, end_keyword_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#6008 + # source://prism//lib/prism/node.rb#5336 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5813 + # source://prism//lib/prism/node.rb#5159 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # attr_reader body: Prism::node? + # attr_reader body: StatementsNode | BeginNode | nil # - # source://prism//lib/prism/node.rb#5866 - sig { returns(T.nilable(Prism::Node)) } + # source://prism//lib/prism/node.rb#5212 + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5818 + # source://prism//lib/prism/node.rb#5164 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#5832 + # source://prism//lib/prism/node.rb#5178 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#5823 + # source://prism//lib/prism/node.rb#5169 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?receiver: Prism::node?, ?parameters: ParametersNode?, ?body: StatementsNode | BeginNode | nil, ?locals: Array[Symbol], ?def_keyword_loc: Location, ?operator_loc: Location?, ?lparen_loc: Location?, ?rparen_loc: Location?, ?equal_loc: Location?, ?end_keyword_loc: Location?) -> DefNode # - # source://prism//lib/prism/node.rb#5837 + # source://prism//lib/prism/node.rb#5183 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, receiver: T.nilable(Prism::Node), parameters: T.nilable(Prism::ParametersNode), - body: T.nilable(Prism::Node), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), locals: T::Array[Symbol], def_keyword_loc: Prism::Location, operator_loc: T.nilable(Prism::Location), lparen_loc: T.nilable(Prism::Location), rparen_loc: T.nilable(Prism::Location), equal_loc: T.nilable(Prism::Location), - end_keyword_loc: T.nilable(Prism::Location), - location: Prism::Location + end_keyword_loc: T.nilable(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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), receiver: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil), locals: T.unsafe(nil), def_keyword_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil), equal_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5818 + # source://prism//lib/prism/node.rb#5164 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { 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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, receiver: Prism::node?, parameters: ParametersNode?, body: StatementsNode | BeginNode | nil, locals: Array[Symbol], def_keyword_loc: Location, operator_loc: Location?, lparen_loc: Location?, rparen_loc: Location?, equal_loc: Location?, end_keyword_loc: Location? } # - # source://prism//lib/prism/node.rb#5845 + # source://prism//lib/prism/node.rb#5191 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def def_keyword: () -> String # - # source://prism//lib/prism/node.rb#5944 + # source://prism//lib/prism/node.rb#5290 sig { returns(String) } def def_keyword; end # attr_reader def_keyword_loc: Location # - # source://prism//lib/prism/node.rb#5872 + # source://prism//lib/prism/node.rb#5218 sig { returns(Prism::Location) } def def_keyword_loc; end # def end_keyword: () -> String? # - # source://prism//lib/prism/node.rb#5969 + # source://prism//lib/prism/node.rb#5315 sig { returns(T.nilable(String)) } def end_keyword; end # attr_reader end_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#5931 + # source://prism//lib/prism/node.rb#5277 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end # def equal: () -> String? # - # source://prism//lib/prism/node.rb#5964 + # source://prism//lib/prism/node.rb#5310 sig { returns(T.nilable(String)) } def equal; end # attr_reader equal_loc: Location? # - # source://prism//lib/prism/node.rb#5918 + # source://prism//lib/prism/node.rb#5264 sig { returns(T.nilable(Prism::Location)) } def equal_loc; end @@ -9426,104 +10740,86 @@ class Prism::DefNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#5974 + # source://prism//lib/prism/node.rb#5320 sig { override.returns(String) } def inspect; end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#5869 + # source://prism//lib/prism/node.rb#5215 sig { returns(T::Array[Symbol]) } def locals; end # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#5954 + # source://prism//lib/prism/node.rb#5300 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#5892 + # source://prism//lib/prism/node.rb#5238 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#5850 + # source://prism//lib/prism/node.rb#5196 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#5853 + # source://prism//lib/prism/node.rb#5199 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String? # - # source://prism//lib/prism/node.rb#5949 + # source://prism//lib/prism/node.rb#5295 sig { returns(T.nilable(String)) } def operator; end # attr_reader operator_loc: Location? # - # source://prism//lib/prism/node.rb#5879 + # source://prism//lib/prism/node.rb#5225 sig { returns(T.nilable(Prism::Location)) } def operator_loc; end # attr_reader parameters: ParametersNode? # - # source://prism//lib/prism/node.rb#5863 + # source://prism//lib/prism/node.rb#5209 sig { returns(T.nilable(Prism::ParametersNode)) } def parameters; end # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#5860 + # source://prism//lib/prism/node.rb#5206 sig { returns(T.nilable(Prism::Node)) } def receiver; end # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#5959 + # source://prism//lib/prism/node.rb#5305 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#5905 + # source://prism//lib/prism/node.rb#5251 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#5992 + # source://prism//lib/prism/node.rb#5325 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6002 + # source://prism//lib/prism/node.rb#5330 def type; end end end @@ -9533,79 +10829,83 @@ end # defined?(a) # ^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#6030 +# source://prism//lib/prism/node.rb#5358 class Prism::DefinedNode < ::Prism::Node - # def initialize: (Location? lparen_loc, Prism::node value, Location? rparen_loc, Location keyword_loc, Location location) -> void + # Initialize a new DefinedNode node. # # @return [DefinedNode] a new instance of DefinedNode # - # source://prism//lib/prism/node.rb#6032 + # source://prism//lib/prism/node.rb#5360 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, lparen_loc: T.nilable(Prism::Location), value: Prism::Node, rparen_loc: T.nilable(Prism::Location), - keyword_loc: Prism::Location, - location: Prism::Location + keyword_loc: Prism::Location ).void end - def initialize(source, lparen_loc, value, rparen_loc, keyword_loc, location); end + def initialize(source, node_id, location, flags, lparen_loc, value, rparen_loc, keyword_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#6160 + # source://prism//lib/prism/node.rb#5472 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6042 + # source://prism//lib/prism/node.rb#5372 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6047 + # source://prism//lib/prism/node.rb#5377 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6057 + # source://prism//lib/prism/node.rb#5387 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6052 + # source://prism//lib/prism/node.rb#5382 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?lparen_loc: Location?, ?value: Prism::node, ?rparen_loc: Location?, ?keyword_loc: Location) -> DefinedNode # - # source://prism//lib/prism/node.rb#6062 + # source://prism//lib/prism/node.rb#5392 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, lparen_loc: T.nilable(Prism::Location), value: Prism::Node, rparen_loc: T.nilable(Prism::Location), - keyword_loc: Prism::Location, - location: Prism::Location + keyword_loc: 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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), lparen_loc: T.unsafe(nil), value: T.unsafe(nil), rparen_loc: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6047 + # source://prism//lib/prism/node.rb#5377 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { lparen_loc: Location?, value: Prism::node, rparen_loc: Location?, keyword_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, lparen_loc: Location?, value: Prism::node, rparen_loc: Location?, keyword_loc: Location } # - # source://prism//lib/prism/node.rb#6070 + # source://prism//lib/prism/node.rb#5400 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -9614,126 +10914,110 @@ class Prism::DefinedNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#6126 + # source://prism//lib/prism/node.rb#5456 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#6121 + # source://prism//lib/prism/node.rb#5451 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#6104 + # source://prism//lib/prism/node.rb#5434 sig { returns(Prism::Location) } def keyword_loc; end # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#6111 + # source://prism//lib/prism/node.rb#5441 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#6075 + # source://prism//lib/prism/node.rb#5405 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#6116 + # source://prism//lib/prism/node.rb#5446 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#6091 + # source://prism//lib/prism/node.rb#5421 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#6144 + # source://prism//lib/prism/node.rb#5461 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#6088 + # source://prism//lib/prism/node.rb#5418 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6154 + # source://prism//lib/prism/node.rb#5466 def type; end end end # source://prism//lib/prism/desugar_compiler.rb#4 class Prism::DesugarAndWriteNode + include ::Prism::DSL + # @return [DesugarAndWriteNode] a new instance of DesugarAndWriteNode # - # source://prism//lib/prism/desugar_compiler.rb#7 - def initialize(node, source, read_class, write_class, *arguments); end + # source://prism//lib/prism/desugar_compiler.rb#9 + def initialize(node, default_source, read_class, write_class, **arguments); end # Returns the value of attribute arguments. # - # source://prism//lib/prism/desugar_compiler.rb#5 + # source://prism//lib/prism/desugar_compiler.rb#7 def arguments; end # Desugar `x &&= y` to `x && x = y` # - # source://prism//lib/prism/desugar_compiler.rb#16 + # source://prism//lib/prism/desugar_compiler.rb#18 def compile; end + # Returns the value of attribute default_source. + # + # source://prism//lib/prism/desugar_compiler.rb#7 + def default_source; end + # Returns the value of attribute node. # - # source://prism//lib/prism/desugar_compiler.rb#5 + # source://prism//lib/prism/desugar_compiler.rb#7 def node; end # Returns the value of attribute read_class. # - # source://prism//lib/prism/desugar_compiler.rb#5 + # source://prism//lib/prism/desugar_compiler.rb#7 def read_class; end - # Returns the value of attribute source. - # - # source://prism//lib/prism/desugar_compiler.rb#5 - def source; end - # Returns the value of attribute write_class. # - # source://prism//lib/prism/desugar_compiler.rb#5 + # source://prism//lib/prism/desugar_compiler.rb#7 def write_class; end end # DesugarCompiler is a compiler that desugars Ruby code into a more primitive # form. This is useful for consumers that want to deal with fewer node types. # -# source://prism//lib/prism/desugar_compiler.rb#218 +# source://prism//lib/prism/desugar_compiler.rb#255 class Prism::DesugarCompiler < ::Prism::MutationCompiler # @@foo &&= bar # @@ -9741,7 +11025,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # @@foo && @@foo = bar # - # source://prism//lib/prism/desugar_compiler.rb#224 + # source://prism//lib/prism/desugar_compiler.rb#261 def visit_class_variable_and_write_node(node); end # @@foo += bar @@ -9750,7 +11034,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # @@foo = @@foo + bar # - # source://prism//lib/prism/desugar_compiler.rb#242 + # source://prism//lib/prism/desugar_compiler.rb#279 def visit_class_variable_operator_write_node(node); end # @@foo ||= bar @@ -9759,7 +11043,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # defined?(@@foo) ? @@foo : @@foo = bar # - # source://prism//lib/prism/desugar_compiler.rb#233 + # source://prism//lib/prism/desugar_compiler.rb#270 def visit_class_variable_or_write_node(node); end # Foo &&= bar @@ -9768,7 +11052,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # Foo && Foo = bar # - # source://prism//lib/prism/desugar_compiler.rb#251 + # source://prism//lib/prism/desugar_compiler.rb#288 def visit_constant_and_write_node(node); end # Foo += bar @@ -9777,7 +11061,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # Foo = Foo + bar # - # source://prism//lib/prism/desugar_compiler.rb#269 + # source://prism//lib/prism/desugar_compiler.rb#306 def visit_constant_operator_write_node(node); end # Foo ||= bar @@ -9786,7 +11070,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # defined?(Foo) ? Foo : Foo = bar # - # source://prism//lib/prism/desugar_compiler.rb#260 + # source://prism//lib/prism/desugar_compiler.rb#297 def visit_constant_or_write_node(node); end # $foo &&= bar @@ -9795,7 +11079,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # $foo && $foo = bar # - # source://prism//lib/prism/desugar_compiler.rb#278 + # source://prism//lib/prism/desugar_compiler.rb#315 def visit_global_variable_and_write_node(node); end # $foo += bar @@ -9804,7 +11088,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # $foo = $foo + bar # - # source://prism//lib/prism/desugar_compiler.rb#296 + # source://prism//lib/prism/desugar_compiler.rb#333 def visit_global_variable_operator_write_node(node); end # $foo ||= bar @@ -9813,22 +11097,22 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # defined?($foo) ? $foo : $foo = bar # - # source://prism//lib/prism/desugar_compiler.rb#287 + # source://prism//lib/prism/desugar_compiler.rb#324 def visit_global_variable_or_write_node(node); end # becomes # - # source://prism//lib/prism/desugar_compiler.rb#305 + # source://prism//lib/prism/desugar_compiler.rb#342 def visit_instance_variable_and_write_node(node); end # becomes # - # source://prism//lib/prism/desugar_compiler.rb#323 + # source://prism//lib/prism/desugar_compiler.rb#360 def visit_instance_variable_operator_write_node(node); end # becomes # - # source://prism//lib/prism/desugar_compiler.rb#314 + # source://prism//lib/prism/desugar_compiler.rb#351 def visit_instance_variable_or_write_node(node); end # foo &&= bar @@ -9837,7 +11121,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # foo && foo = bar # - # source://prism//lib/prism/desugar_compiler.rb#332 + # source://prism//lib/prism/desugar_compiler.rb#369 def visit_local_variable_and_write_node(node); end # foo += bar @@ -9846,7 +11130,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # foo = foo + bar # - # source://prism//lib/prism/desugar_compiler.rb#350 + # source://prism//lib/prism/desugar_compiler.rb#387 def visit_local_variable_operator_write_node(node); end # foo ||= bar @@ -9855,121 +11139,127 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # foo || foo = bar # - # source://prism//lib/prism/desugar_compiler.rb#341 + # source://prism//lib/prism/desugar_compiler.rb#378 def visit_local_variable_or_write_node(node); end end -# source://prism//lib/prism/desugar_compiler.rb#63 +# source://prism//lib/prism/desugar_compiler.rb#86 class Prism::DesugarOperatorWriteNode + include ::Prism::DSL + # @return [DesugarOperatorWriteNode] a new instance of DesugarOperatorWriteNode # - # source://prism//lib/prism/desugar_compiler.rb#66 - def initialize(node, source, read_class, write_class, *arguments); end + # source://prism//lib/prism/desugar_compiler.rb#91 + def initialize(node, default_source, read_class, write_class, **arguments); end # Returns the value of attribute arguments. # - # source://prism//lib/prism/desugar_compiler.rb#64 + # source://prism//lib/prism/desugar_compiler.rb#89 def arguments; end # Desugar `x += y` to `x = x + y` # - # source://prism//lib/prism/desugar_compiler.rb#75 + # source://prism//lib/prism/desugar_compiler.rb#100 def compile; end + # Returns the value of attribute default_source. + # + # source://prism//lib/prism/desugar_compiler.rb#89 + def default_source; end + # Returns the value of attribute node. # - # source://prism//lib/prism/desugar_compiler.rb#64 + # source://prism//lib/prism/desugar_compiler.rb#89 def node; end # Returns the value of attribute read_class. # - # source://prism//lib/prism/desugar_compiler.rb#64 + # source://prism//lib/prism/desugar_compiler.rb#89 def read_class; end - # Returns the value of attribute source. - # - # source://prism//lib/prism/desugar_compiler.rb#64 - def source; end - # Returns the value of attribute write_class. # - # source://prism//lib/prism/desugar_compiler.rb#64 + # source://prism//lib/prism/desugar_compiler.rb#89 def write_class; end end -# source://prism//lib/prism/desugar_compiler.rb#27 +# source://prism//lib/prism/desugar_compiler.rb#35 class Prism::DesugarOrWriteDefinedNode + include ::Prism::DSL + # @return [DesugarOrWriteDefinedNode] a new instance of DesugarOrWriteDefinedNode # - # source://prism//lib/prism/desugar_compiler.rb#30 - def initialize(node, source, read_class, write_class, *arguments); end + # source://prism//lib/prism/desugar_compiler.rb#40 + def initialize(node, default_source, read_class, write_class, **arguments); end # Returns the value of attribute arguments. # - # source://prism//lib/prism/desugar_compiler.rb#28 + # source://prism//lib/prism/desugar_compiler.rb#38 def arguments; end # Desugar `x ||= y` to `defined?(x) ? x : x = y` # - # source://prism//lib/prism/desugar_compiler.rb#39 + # source://prism//lib/prism/desugar_compiler.rb#49 def compile; end + # Returns the value of attribute default_source. + # + # source://prism//lib/prism/desugar_compiler.rb#38 + def default_source; end + # Returns the value of attribute node. # - # source://prism//lib/prism/desugar_compiler.rb#28 + # source://prism//lib/prism/desugar_compiler.rb#38 def node; end # Returns the value of attribute read_class. # - # source://prism//lib/prism/desugar_compiler.rb#28 + # source://prism//lib/prism/desugar_compiler.rb#38 def read_class; end - # Returns the value of attribute source. - # - # source://prism//lib/prism/desugar_compiler.rb#28 - def source; end - # Returns the value of attribute write_class. # - # source://prism//lib/prism/desugar_compiler.rb#28 + # source://prism//lib/prism/desugar_compiler.rb#38 def write_class; end end -# source://prism//lib/prism/desugar_compiler.rb#101 +# source://prism//lib/prism/desugar_compiler.rb#130 class Prism::DesugarOrWriteNode + include ::Prism::DSL + # @return [DesugarOrWriteNode] a new instance of DesugarOrWriteNode # - # source://prism//lib/prism/desugar_compiler.rb#104 - def initialize(node, source, read_class, write_class, *arguments); end + # source://prism//lib/prism/desugar_compiler.rb#135 + def initialize(node, default_source, read_class, write_class, **arguments); end # Returns the value of attribute arguments. # - # source://prism//lib/prism/desugar_compiler.rb#102 + # source://prism//lib/prism/desugar_compiler.rb#133 def arguments; end # Desugar `x ||= y` to `x || x = y` # - # source://prism//lib/prism/desugar_compiler.rb#113 + # source://prism//lib/prism/desugar_compiler.rb#144 def compile; end + # Returns the value of attribute default_source. + # + # source://prism//lib/prism/desugar_compiler.rb#133 + def default_source; end + # Returns the value of attribute node. # - # source://prism//lib/prism/desugar_compiler.rb#102 + # source://prism//lib/prism/desugar_compiler.rb#133 def node; end # Returns the value of attribute read_class. # - # source://prism//lib/prism/desugar_compiler.rb#102 + # source://prism//lib/prism/desugar_compiler.rb#133 def read_class; end - # Returns the value of attribute source. - # - # source://prism//lib/prism/desugar_compiler.rb#102 - def source; end - # Returns the value of attribute write_class. # - # source://prism//lib/prism/desugar_compiler.rb#102 + # source://prism//lib/prism/desugar_compiler.rb#133 def write_class; end end @@ -9988,7 +11278,8 @@ end # end # end # -# dispatcher = Dispatcher.new +# listener = OctalListener.new +# dispatcher = Prism::Dispatcher.new # dispatcher.register(listener, :on_integer_node_enter) # # Then, you can walk any number of trees and dispatch events to the listeners: @@ -10004,13 +11295,13 @@ end # integer = result.value.statements.body.first.receiver.receiver # dispatcher.dispatch_once(integer) # -# source://prism//lib/prism/dispatcher.rb#41 +# source://prism//lib/prism/dispatcher.rb#42 class Prism::Dispatcher < ::Prism::Visitor # Initialize a new dispatcher. # # @return [Dispatcher] a new instance of Dispatcher # - # source://prism//lib/prism/dispatcher.rb#46 + # source://prism//lib/prism/dispatcher.rb#47 def initialize; end # Walks `root` dispatching events to all registered listeners. @@ -10024,1693 +11315,1693 @@ class Prism::Dispatcher < ::Prism::Visitor # # def dispatch_once: (Node) -> void # - # source://prism//lib/prism/dispatcher.rb#65 + # source://prism//lib/prism/dispatcher.rb#66 def dispatch_once(node); end # attr_reader listeners: Hash[Symbol, Array[Listener]] # - # source://prism//lib/prism/dispatcher.rb#43 + # source://prism//lib/prism/dispatcher.rb#44 def listeners; end # Register a listener for one or more events. # # def register: (Listener, *Symbol) -> void # - # source://prism//lib/prism/dispatcher.rb#53 + # source://prism//lib/prism/dispatcher.rb#54 def register(listener, *events); end # Dispatch enter and leave events for AliasGlobalVariableNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#71 + # source://prism//lib/prism/dispatcher.rb#72 def visit_alias_global_variable_node(node); end # Dispatch enter and leave events for AliasMethodNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#79 + # source://prism//lib/prism/dispatcher.rb#80 def visit_alias_method_node(node); end # Dispatch enter and leave events for AlternationPatternNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#87 + # source://prism//lib/prism/dispatcher.rb#88 def visit_alternation_pattern_node(node); end # Dispatch enter and leave events for AndNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#95 + # source://prism//lib/prism/dispatcher.rb#96 def visit_and_node(node); end # Dispatch enter and leave events for ArgumentsNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#103 + # source://prism//lib/prism/dispatcher.rb#104 def visit_arguments_node(node); end # Dispatch enter and leave events for ArrayNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#111 + # source://prism//lib/prism/dispatcher.rb#112 def visit_array_node(node); end # Dispatch enter and leave events for ArrayPatternNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#119 + # source://prism//lib/prism/dispatcher.rb#120 def visit_array_pattern_node(node); end # Dispatch enter and leave events for AssocNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#127 + # source://prism//lib/prism/dispatcher.rb#128 def visit_assoc_node(node); end # Dispatch enter and leave events for AssocSplatNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#135 + # source://prism//lib/prism/dispatcher.rb#136 def visit_assoc_splat_node(node); end # Dispatch enter and leave events for BackReferenceReadNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#143 + # source://prism//lib/prism/dispatcher.rb#144 def visit_back_reference_read_node(node); end # Dispatch enter and leave events for BeginNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#151 + # source://prism//lib/prism/dispatcher.rb#152 def visit_begin_node(node); end # Dispatch enter and leave events for BlockArgumentNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#159 + # source://prism//lib/prism/dispatcher.rb#160 def visit_block_argument_node(node); end # Dispatch enter and leave events for BlockLocalVariableNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#167 + # source://prism//lib/prism/dispatcher.rb#168 def visit_block_local_variable_node(node); end # Dispatch enter and leave events for BlockNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#175 + # source://prism//lib/prism/dispatcher.rb#176 def visit_block_node(node); end # Dispatch enter and leave events for BlockParameterNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#183 + # source://prism//lib/prism/dispatcher.rb#184 def visit_block_parameter_node(node); end # Dispatch enter and leave events for BlockParametersNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#191 + # source://prism//lib/prism/dispatcher.rb#192 def visit_block_parameters_node(node); end # Dispatch enter and leave events for BreakNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#199 + # source://prism//lib/prism/dispatcher.rb#200 def visit_break_node(node); end # Dispatch enter and leave events for CallAndWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#207 + # source://prism//lib/prism/dispatcher.rb#208 def visit_call_and_write_node(node); end # Dispatch enter and leave events for CallNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#215 + # source://prism//lib/prism/dispatcher.rb#216 def visit_call_node(node); end # Dispatch enter and leave events for CallOperatorWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#223 + # source://prism//lib/prism/dispatcher.rb#224 def visit_call_operator_write_node(node); end # Dispatch enter and leave events for CallOrWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#231 + # source://prism//lib/prism/dispatcher.rb#232 def visit_call_or_write_node(node); end # Dispatch enter and leave events for CallTargetNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#239 + # source://prism//lib/prism/dispatcher.rb#240 def visit_call_target_node(node); end # Dispatch enter and leave events for CapturePatternNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#247 + # source://prism//lib/prism/dispatcher.rb#248 def visit_capture_pattern_node(node); end # Dispatch enter and leave events for CaseMatchNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#255 + # source://prism//lib/prism/dispatcher.rb#256 def visit_case_match_node(node); end # Dispatch enter and leave events for CaseNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#263 + # source://prism//lib/prism/dispatcher.rb#264 def visit_case_node(node); end # Dispatch enter and leave events for ClassNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#271 + # source://prism//lib/prism/dispatcher.rb#272 def visit_class_node(node); end # Dispatch enter and leave events for ClassVariableAndWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#279 + # source://prism//lib/prism/dispatcher.rb#280 def visit_class_variable_and_write_node(node); end # Dispatch enter and leave events for ClassVariableOperatorWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#287 + # source://prism//lib/prism/dispatcher.rb#288 def visit_class_variable_operator_write_node(node); end # Dispatch enter and leave events for ClassVariableOrWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#295 + # source://prism//lib/prism/dispatcher.rb#296 def visit_class_variable_or_write_node(node); end # Dispatch enter and leave events for ClassVariableReadNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#303 + # source://prism//lib/prism/dispatcher.rb#304 def visit_class_variable_read_node(node); end # Dispatch enter and leave events for ClassVariableTargetNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#311 + # source://prism//lib/prism/dispatcher.rb#312 def visit_class_variable_target_node(node); end # Dispatch enter and leave events for ClassVariableWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#319 + # source://prism//lib/prism/dispatcher.rb#320 def visit_class_variable_write_node(node); end # Dispatch enter and leave events for ConstantAndWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#327 + # source://prism//lib/prism/dispatcher.rb#328 def visit_constant_and_write_node(node); end # Dispatch enter and leave events for ConstantOperatorWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#335 + # source://prism//lib/prism/dispatcher.rb#336 def visit_constant_operator_write_node(node); end # Dispatch enter and leave events for ConstantOrWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#343 + # source://prism//lib/prism/dispatcher.rb#344 def visit_constant_or_write_node(node); end # Dispatch enter and leave events for ConstantPathAndWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#351 + # source://prism//lib/prism/dispatcher.rb#352 def visit_constant_path_and_write_node(node); end # Dispatch enter and leave events for ConstantPathNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#359 + # source://prism//lib/prism/dispatcher.rb#360 def visit_constant_path_node(node); end # Dispatch enter and leave events for ConstantPathOperatorWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#367 + # source://prism//lib/prism/dispatcher.rb#368 def visit_constant_path_operator_write_node(node); end # Dispatch enter and leave events for ConstantPathOrWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#375 + # source://prism//lib/prism/dispatcher.rb#376 def visit_constant_path_or_write_node(node); end # Dispatch enter and leave events for ConstantPathTargetNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#383 + # source://prism//lib/prism/dispatcher.rb#384 def visit_constant_path_target_node(node); end # Dispatch enter and leave events for ConstantPathWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#391 + # source://prism//lib/prism/dispatcher.rb#392 def visit_constant_path_write_node(node); end # Dispatch enter and leave events for ConstantReadNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#399 + # source://prism//lib/prism/dispatcher.rb#400 def visit_constant_read_node(node); end # Dispatch enter and leave events for ConstantTargetNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#407 + # source://prism//lib/prism/dispatcher.rb#408 def visit_constant_target_node(node); end # Dispatch enter and leave events for ConstantWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#415 + # source://prism//lib/prism/dispatcher.rb#416 def visit_constant_write_node(node); end # Dispatch enter and leave events for DefNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#423 + # source://prism//lib/prism/dispatcher.rb#424 def visit_def_node(node); end # Dispatch enter and leave events for DefinedNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#431 + # source://prism//lib/prism/dispatcher.rb#432 def visit_defined_node(node); end # Dispatch enter and leave events for ElseNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#439 + # source://prism//lib/prism/dispatcher.rb#440 def visit_else_node(node); end # Dispatch enter and leave events for EmbeddedStatementsNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#447 + # source://prism//lib/prism/dispatcher.rb#448 def visit_embedded_statements_node(node); end # Dispatch enter and leave events for EmbeddedVariableNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#455 + # source://prism//lib/prism/dispatcher.rb#456 def visit_embedded_variable_node(node); end # Dispatch enter and leave events for EnsureNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#463 + # source://prism//lib/prism/dispatcher.rb#464 def visit_ensure_node(node); end # Dispatch enter and leave events for FalseNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#471 + # source://prism//lib/prism/dispatcher.rb#472 def visit_false_node(node); end # Dispatch enter and leave events for FindPatternNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#479 + # source://prism//lib/prism/dispatcher.rb#480 def visit_find_pattern_node(node); end # Dispatch enter and leave events for FlipFlopNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#487 + # source://prism//lib/prism/dispatcher.rb#488 def visit_flip_flop_node(node); end # Dispatch enter and leave events for FloatNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#495 + # source://prism//lib/prism/dispatcher.rb#496 def visit_float_node(node); end # Dispatch enter and leave events for ForNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#503 + # source://prism//lib/prism/dispatcher.rb#504 def visit_for_node(node); end # Dispatch enter and leave events for ForwardingArgumentsNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#511 + # source://prism//lib/prism/dispatcher.rb#512 def visit_forwarding_arguments_node(node); end # Dispatch enter and leave events for ForwardingParameterNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#519 + # source://prism//lib/prism/dispatcher.rb#520 def visit_forwarding_parameter_node(node); end # Dispatch enter and leave events for ForwardingSuperNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#527 + # source://prism//lib/prism/dispatcher.rb#528 def visit_forwarding_super_node(node); end # Dispatch enter and leave events for GlobalVariableAndWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#535 + # source://prism//lib/prism/dispatcher.rb#536 def visit_global_variable_and_write_node(node); end # Dispatch enter and leave events for GlobalVariableOperatorWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#543 + # source://prism//lib/prism/dispatcher.rb#544 def visit_global_variable_operator_write_node(node); end # Dispatch enter and leave events for GlobalVariableOrWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#551 + # source://prism//lib/prism/dispatcher.rb#552 def visit_global_variable_or_write_node(node); end # Dispatch enter and leave events for GlobalVariableReadNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#559 + # source://prism//lib/prism/dispatcher.rb#560 def visit_global_variable_read_node(node); end # Dispatch enter and leave events for GlobalVariableTargetNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#567 + # source://prism//lib/prism/dispatcher.rb#568 def visit_global_variable_target_node(node); end # Dispatch enter and leave events for GlobalVariableWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#575 + # source://prism//lib/prism/dispatcher.rb#576 def visit_global_variable_write_node(node); end # Dispatch enter and leave events for HashNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#583 + # source://prism//lib/prism/dispatcher.rb#584 def visit_hash_node(node); end # Dispatch enter and leave events for HashPatternNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#591 + # source://prism//lib/prism/dispatcher.rb#592 def visit_hash_pattern_node(node); end # Dispatch enter and leave events for IfNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#599 + # source://prism//lib/prism/dispatcher.rb#600 def visit_if_node(node); end # Dispatch enter and leave events for ImaginaryNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#607 + # source://prism//lib/prism/dispatcher.rb#608 def visit_imaginary_node(node); end # Dispatch enter and leave events for ImplicitNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#615 + # source://prism//lib/prism/dispatcher.rb#616 def visit_implicit_node(node); end # Dispatch enter and leave events for ImplicitRestNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#623 + # source://prism//lib/prism/dispatcher.rb#624 def visit_implicit_rest_node(node); end # Dispatch enter and leave events for InNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#631 + # source://prism//lib/prism/dispatcher.rb#632 def visit_in_node(node); end # Dispatch enter and leave events for IndexAndWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#639 + # source://prism//lib/prism/dispatcher.rb#640 def visit_index_and_write_node(node); end # Dispatch enter and leave events for IndexOperatorWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#647 + # source://prism//lib/prism/dispatcher.rb#648 def visit_index_operator_write_node(node); end # Dispatch enter and leave events for IndexOrWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#655 + # source://prism//lib/prism/dispatcher.rb#656 def visit_index_or_write_node(node); end # Dispatch enter and leave events for IndexTargetNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#663 + # source://prism//lib/prism/dispatcher.rb#664 def visit_index_target_node(node); end # Dispatch enter and leave events for InstanceVariableAndWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#671 + # source://prism//lib/prism/dispatcher.rb#672 def visit_instance_variable_and_write_node(node); end # Dispatch enter and leave events for InstanceVariableOperatorWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#679 + # source://prism//lib/prism/dispatcher.rb#680 def visit_instance_variable_operator_write_node(node); end # Dispatch enter and leave events for InstanceVariableOrWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#687 + # source://prism//lib/prism/dispatcher.rb#688 def visit_instance_variable_or_write_node(node); end # Dispatch enter and leave events for InstanceVariableReadNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#695 + # source://prism//lib/prism/dispatcher.rb#696 def visit_instance_variable_read_node(node); end # Dispatch enter and leave events for InstanceVariableTargetNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#703 + # source://prism//lib/prism/dispatcher.rb#704 def visit_instance_variable_target_node(node); end # Dispatch enter and leave events for InstanceVariableWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#711 + # source://prism//lib/prism/dispatcher.rb#712 def visit_instance_variable_write_node(node); end # Dispatch enter and leave events for IntegerNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#719 + # source://prism//lib/prism/dispatcher.rb#720 def visit_integer_node(node); end # Dispatch enter and leave events for InterpolatedMatchLastLineNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#727 + # source://prism//lib/prism/dispatcher.rb#728 def visit_interpolated_match_last_line_node(node); end # Dispatch enter and leave events for InterpolatedRegularExpressionNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#735 + # source://prism//lib/prism/dispatcher.rb#736 def visit_interpolated_regular_expression_node(node); end # Dispatch enter and leave events for InterpolatedStringNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#743 + # source://prism//lib/prism/dispatcher.rb#744 def visit_interpolated_string_node(node); end # Dispatch enter and leave events for InterpolatedSymbolNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#751 + # source://prism//lib/prism/dispatcher.rb#752 def visit_interpolated_symbol_node(node); end # Dispatch enter and leave events for InterpolatedXStringNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#759 + # source://prism//lib/prism/dispatcher.rb#760 def visit_interpolated_x_string_node(node); end # Dispatch enter and leave events for ItLocalVariableReadNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#767 + # source://prism//lib/prism/dispatcher.rb#768 def visit_it_local_variable_read_node(node); end # Dispatch enter and leave events for ItParametersNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#775 + # source://prism//lib/prism/dispatcher.rb#776 def visit_it_parameters_node(node); end # Dispatch enter and leave events for KeywordHashNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#783 + # source://prism//lib/prism/dispatcher.rb#784 def visit_keyword_hash_node(node); end # Dispatch enter and leave events for KeywordRestParameterNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#791 + # source://prism//lib/prism/dispatcher.rb#792 def visit_keyword_rest_parameter_node(node); end # Dispatch enter and leave events for LambdaNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#799 + # source://prism//lib/prism/dispatcher.rb#800 def visit_lambda_node(node); end # Dispatch enter and leave events for LocalVariableAndWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#807 + # source://prism//lib/prism/dispatcher.rb#808 def visit_local_variable_and_write_node(node); end # Dispatch enter and leave events for LocalVariableOperatorWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#815 + # source://prism//lib/prism/dispatcher.rb#816 def visit_local_variable_operator_write_node(node); end # Dispatch enter and leave events for LocalVariableOrWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#823 + # source://prism//lib/prism/dispatcher.rb#824 def visit_local_variable_or_write_node(node); end # Dispatch enter and leave events for LocalVariableReadNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#831 + # source://prism//lib/prism/dispatcher.rb#832 def visit_local_variable_read_node(node); end # Dispatch enter and leave events for LocalVariableTargetNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#839 + # source://prism//lib/prism/dispatcher.rb#840 def visit_local_variable_target_node(node); end # Dispatch enter and leave events for LocalVariableWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#847 + # source://prism//lib/prism/dispatcher.rb#848 def visit_local_variable_write_node(node); end # Dispatch enter and leave events for MatchLastLineNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#855 + # source://prism//lib/prism/dispatcher.rb#856 def visit_match_last_line_node(node); end # Dispatch enter and leave events for MatchPredicateNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#863 + # source://prism//lib/prism/dispatcher.rb#864 def visit_match_predicate_node(node); end # Dispatch enter and leave events for MatchRequiredNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#871 + # source://prism//lib/prism/dispatcher.rb#872 def visit_match_required_node(node); end # Dispatch enter and leave events for MatchWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#879 + # source://prism//lib/prism/dispatcher.rb#880 def visit_match_write_node(node); end # Dispatch enter and leave events for MissingNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#887 + # source://prism//lib/prism/dispatcher.rb#888 def visit_missing_node(node); end # Dispatch enter and leave events for ModuleNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#895 + # source://prism//lib/prism/dispatcher.rb#896 def visit_module_node(node); end # Dispatch enter and leave events for MultiTargetNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#903 + # source://prism//lib/prism/dispatcher.rb#904 def visit_multi_target_node(node); end # Dispatch enter and leave events for MultiWriteNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#911 + # source://prism//lib/prism/dispatcher.rb#912 def visit_multi_write_node(node); end # Dispatch enter and leave events for NextNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#919 + # source://prism//lib/prism/dispatcher.rb#920 def visit_next_node(node); end # Dispatch enter and leave events for NilNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#927 + # source://prism//lib/prism/dispatcher.rb#928 def visit_nil_node(node); end # Dispatch enter and leave events for NoKeywordsParameterNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#935 + # source://prism//lib/prism/dispatcher.rb#936 def visit_no_keywords_parameter_node(node); end # Dispatch enter and leave events for NumberedParametersNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#943 + # source://prism//lib/prism/dispatcher.rb#944 def visit_numbered_parameters_node(node); end # Dispatch enter and leave events for NumberedReferenceReadNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#951 + # source://prism//lib/prism/dispatcher.rb#952 def visit_numbered_reference_read_node(node); end # Dispatch enter and leave events for OptionalKeywordParameterNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#959 + # source://prism//lib/prism/dispatcher.rb#960 def visit_optional_keyword_parameter_node(node); end # Dispatch enter and leave events for OptionalParameterNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#967 + # source://prism//lib/prism/dispatcher.rb#968 def visit_optional_parameter_node(node); end # Dispatch enter and leave events for OrNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#975 + # source://prism//lib/prism/dispatcher.rb#976 def visit_or_node(node); end # Dispatch enter and leave events for ParametersNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#983 + # source://prism//lib/prism/dispatcher.rb#984 def visit_parameters_node(node); end # Dispatch enter and leave events for ParenthesesNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#991 + # source://prism//lib/prism/dispatcher.rb#992 def visit_parentheses_node(node); end # Dispatch enter and leave events for PinnedExpressionNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#999 + # source://prism//lib/prism/dispatcher.rb#1000 def visit_pinned_expression_node(node); end # Dispatch enter and leave events for PinnedVariableNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1007 + # source://prism//lib/prism/dispatcher.rb#1008 def visit_pinned_variable_node(node); end # Dispatch enter and leave events for PostExecutionNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1015 + # source://prism//lib/prism/dispatcher.rb#1016 def visit_post_execution_node(node); end # Dispatch enter and leave events for PreExecutionNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1023 + # source://prism//lib/prism/dispatcher.rb#1024 def visit_pre_execution_node(node); end # Dispatch enter and leave events for ProgramNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1031 + # source://prism//lib/prism/dispatcher.rb#1032 def visit_program_node(node); end # Dispatch enter and leave events for RangeNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1039 + # source://prism//lib/prism/dispatcher.rb#1040 def visit_range_node(node); end # Dispatch enter and leave events for RationalNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1047 + # source://prism//lib/prism/dispatcher.rb#1048 def visit_rational_node(node); end # Dispatch enter and leave events for RedoNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1055 + # source://prism//lib/prism/dispatcher.rb#1056 def visit_redo_node(node); end # Dispatch enter and leave events for RegularExpressionNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1063 + # source://prism//lib/prism/dispatcher.rb#1064 def visit_regular_expression_node(node); end # Dispatch enter and leave events for RequiredKeywordParameterNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1071 + # source://prism//lib/prism/dispatcher.rb#1072 def visit_required_keyword_parameter_node(node); end # Dispatch enter and leave events for RequiredParameterNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1079 + # source://prism//lib/prism/dispatcher.rb#1080 def visit_required_parameter_node(node); end # Dispatch enter and leave events for RescueModifierNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1087 + # source://prism//lib/prism/dispatcher.rb#1088 def visit_rescue_modifier_node(node); end # Dispatch enter and leave events for RescueNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1095 + # source://prism//lib/prism/dispatcher.rb#1096 def visit_rescue_node(node); end # Dispatch enter and leave events for RestParameterNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1103 + # source://prism//lib/prism/dispatcher.rb#1104 def visit_rest_parameter_node(node); end # Dispatch enter and leave events for RetryNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1111 + # source://prism//lib/prism/dispatcher.rb#1112 def visit_retry_node(node); end # Dispatch enter and leave events for ReturnNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1119 + # source://prism//lib/prism/dispatcher.rb#1120 def visit_return_node(node); end # Dispatch enter and leave events for SelfNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1127 + # source://prism//lib/prism/dispatcher.rb#1128 def visit_self_node(node); end # Dispatch enter and leave events for ShareableConstantNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1135 + # source://prism//lib/prism/dispatcher.rb#1136 def visit_shareable_constant_node(node); end # Dispatch enter and leave events for SingletonClassNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1143 + # source://prism//lib/prism/dispatcher.rb#1144 def visit_singleton_class_node(node); end # Dispatch enter and leave events for SourceEncodingNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1151 + # source://prism//lib/prism/dispatcher.rb#1152 def visit_source_encoding_node(node); end # Dispatch enter and leave events for SourceFileNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1159 + # source://prism//lib/prism/dispatcher.rb#1160 def visit_source_file_node(node); end # Dispatch enter and leave events for SourceLineNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1167 + # source://prism//lib/prism/dispatcher.rb#1168 def visit_source_line_node(node); end # Dispatch enter and leave events for SplatNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1175 + # source://prism//lib/prism/dispatcher.rb#1176 def visit_splat_node(node); end # Dispatch enter and leave events for StatementsNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1183 + # source://prism//lib/prism/dispatcher.rb#1184 def visit_statements_node(node); end # Dispatch enter and leave events for StringNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1191 + # source://prism//lib/prism/dispatcher.rb#1192 def visit_string_node(node); end # Dispatch enter and leave events for SuperNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1199 + # source://prism//lib/prism/dispatcher.rb#1200 def visit_super_node(node); end # Dispatch enter and leave events for SymbolNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1207 + # source://prism//lib/prism/dispatcher.rb#1208 def visit_symbol_node(node); end # Dispatch enter and leave events for TrueNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1215 + # source://prism//lib/prism/dispatcher.rb#1216 def visit_true_node(node); end # Dispatch enter and leave events for UndefNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1223 + # source://prism//lib/prism/dispatcher.rb#1224 def visit_undef_node(node); end # Dispatch enter and leave events for UnlessNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1231 + # source://prism//lib/prism/dispatcher.rb#1232 def visit_unless_node(node); end # Dispatch enter and leave events for UntilNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1239 + # source://prism//lib/prism/dispatcher.rb#1240 def visit_until_node(node); end # Dispatch enter and leave events for WhenNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1247 + # source://prism//lib/prism/dispatcher.rb#1248 def visit_when_node(node); end # Dispatch enter and leave events for WhileNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1255 + # source://prism//lib/prism/dispatcher.rb#1256 def visit_while_node(node); end # Dispatch enter and leave events for XStringNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1263 + # source://prism//lib/prism/dispatcher.rb#1264 def visit_x_string_node(node); end # Dispatch enter and leave events for YieldNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#1271 + # source://prism//lib/prism/dispatcher.rb#1272 def visit_yield_node(node); end end -# source://prism//lib/prism/dispatcher.rb#1277 +# source://prism//lib/prism/dispatcher.rb#1278 class Prism::Dispatcher::DispatchOnce < ::Prism::Visitor # @return [DispatchOnce] a new instance of DispatchOnce # - # source://prism//lib/prism/dispatcher.rb#1280 + # source://prism//lib/prism/dispatcher.rb#1281 def initialize(listeners); end # Returns the value of attribute listeners. # - # source://prism//lib/prism/dispatcher.rb#1278 + # source://prism//lib/prism/dispatcher.rb#1279 def listeners; end # Dispatch enter and leave events for AliasGlobalVariableNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1285 + # source://prism//lib/prism/dispatcher.rb#1286 def visit_alias_global_variable_node(node); end # Dispatch enter and leave events for AliasMethodNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1291 + # source://prism//lib/prism/dispatcher.rb#1292 def visit_alias_method_node(node); end # Dispatch enter and leave events for AlternationPatternNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1297 + # source://prism//lib/prism/dispatcher.rb#1298 def visit_alternation_pattern_node(node); end # Dispatch enter and leave events for AndNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1303 + # source://prism//lib/prism/dispatcher.rb#1304 def visit_and_node(node); end # Dispatch enter and leave events for ArgumentsNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1309 + # source://prism//lib/prism/dispatcher.rb#1310 def visit_arguments_node(node); end # Dispatch enter and leave events for ArrayNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1315 + # source://prism//lib/prism/dispatcher.rb#1316 def visit_array_node(node); end # Dispatch enter and leave events for ArrayPatternNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1321 + # source://prism//lib/prism/dispatcher.rb#1322 def visit_array_pattern_node(node); end # Dispatch enter and leave events for AssocNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1327 + # source://prism//lib/prism/dispatcher.rb#1328 def visit_assoc_node(node); end # Dispatch enter and leave events for AssocSplatNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1333 + # source://prism//lib/prism/dispatcher.rb#1334 def visit_assoc_splat_node(node); end # Dispatch enter and leave events for BackReferenceReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1339 + # source://prism//lib/prism/dispatcher.rb#1340 def visit_back_reference_read_node(node); end # Dispatch enter and leave events for BeginNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1345 + # source://prism//lib/prism/dispatcher.rb#1346 def visit_begin_node(node); end # Dispatch enter and leave events for BlockArgumentNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1351 + # source://prism//lib/prism/dispatcher.rb#1352 def visit_block_argument_node(node); end # Dispatch enter and leave events for BlockLocalVariableNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1357 + # source://prism//lib/prism/dispatcher.rb#1358 def visit_block_local_variable_node(node); end # Dispatch enter and leave events for BlockNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1363 + # source://prism//lib/prism/dispatcher.rb#1364 def visit_block_node(node); end # Dispatch enter and leave events for BlockParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1369 + # source://prism//lib/prism/dispatcher.rb#1370 def visit_block_parameter_node(node); end # Dispatch enter and leave events for BlockParametersNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1375 + # source://prism//lib/prism/dispatcher.rb#1376 def visit_block_parameters_node(node); end # Dispatch enter and leave events for BreakNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1381 + # source://prism//lib/prism/dispatcher.rb#1382 def visit_break_node(node); end # Dispatch enter and leave events for CallAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1387 + # source://prism//lib/prism/dispatcher.rb#1388 def visit_call_and_write_node(node); end # Dispatch enter and leave events for CallNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1393 + # source://prism//lib/prism/dispatcher.rb#1394 def visit_call_node(node); end # Dispatch enter and leave events for CallOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1399 + # source://prism//lib/prism/dispatcher.rb#1400 def visit_call_operator_write_node(node); end # Dispatch enter and leave events for CallOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1405 + # source://prism//lib/prism/dispatcher.rb#1406 def visit_call_or_write_node(node); end # Dispatch enter and leave events for CallTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1411 + # source://prism//lib/prism/dispatcher.rb#1412 def visit_call_target_node(node); end # Dispatch enter and leave events for CapturePatternNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1417 + # source://prism//lib/prism/dispatcher.rb#1418 def visit_capture_pattern_node(node); end # Dispatch enter and leave events for CaseMatchNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1423 + # source://prism//lib/prism/dispatcher.rb#1424 def visit_case_match_node(node); end # Dispatch enter and leave events for CaseNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1429 + # source://prism//lib/prism/dispatcher.rb#1430 def visit_case_node(node); end # Dispatch enter and leave events for ClassNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1435 + # source://prism//lib/prism/dispatcher.rb#1436 def visit_class_node(node); end # Dispatch enter and leave events for ClassVariableAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1441 + # source://prism//lib/prism/dispatcher.rb#1442 def visit_class_variable_and_write_node(node); end # Dispatch enter and leave events for ClassVariableOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1447 + # source://prism//lib/prism/dispatcher.rb#1448 def visit_class_variable_operator_write_node(node); end # Dispatch enter and leave events for ClassVariableOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1453 + # source://prism//lib/prism/dispatcher.rb#1454 def visit_class_variable_or_write_node(node); end # Dispatch enter and leave events for ClassVariableReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1459 + # source://prism//lib/prism/dispatcher.rb#1460 def visit_class_variable_read_node(node); end # Dispatch enter and leave events for ClassVariableTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1465 + # source://prism//lib/prism/dispatcher.rb#1466 def visit_class_variable_target_node(node); end # Dispatch enter and leave events for ClassVariableWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1471 + # source://prism//lib/prism/dispatcher.rb#1472 def visit_class_variable_write_node(node); end # Dispatch enter and leave events for ConstantAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1477 + # source://prism//lib/prism/dispatcher.rb#1478 def visit_constant_and_write_node(node); end # Dispatch enter and leave events for ConstantOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1483 + # source://prism//lib/prism/dispatcher.rb#1484 def visit_constant_operator_write_node(node); end # Dispatch enter and leave events for ConstantOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1489 + # source://prism//lib/prism/dispatcher.rb#1490 def visit_constant_or_write_node(node); end # Dispatch enter and leave events for ConstantPathAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1495 + # source://prism//lib/prism/dispatcher.rb#1496 def visit_constant_path_and_write_node(node); end # Dispatch enter and leave events for ConstantPathNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1501 + # source://prism//lib/prism/dispatcher.rb#1502 def visit_constant_path_node(node); end # Dispatch enter and leave events for ConstantPathOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1507 + # source://prism//lib/prism/dispatcher.rb#1508 def visit_constant_path_operator_write_node(node); end # Dispatch enter and leave events for ConstantPathOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1513 + # source://prism//lib/prism/dispatcher.rb#1514 def visit_constant_path_or_write_node(node); end # Dispatch enter and leave events for ConstantPathTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1519 + # source://prism//lib/prism/dispatcher.rb#1520 def visit_constant_path_target_node(node); end # Dispatch enter and leave events for ConstantPathWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1525 + # source://prism//lib/prism/dispatcher.rb#1526 def visit_constant_path_write_node(node); end # Dispatch enter and leave events for ConstantReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1531 + # source://prism//lib/prism/dispatcher.rb#1532 def visit_constant_read_node(node); end # Dispatch enter and leave events for ConstantTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1537 + # source://prism//lib/prism/dispatcher.rb#1538 def visit_constant_target_node(node); end # Dispatch enter and leave events for ConstantWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1543 + # source://prism//lib/prism/dispatcher.rb#1544 def visit_constant_write_node(node); end # Dispatch enter and leave events for DefNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1549 + # source://prism//lib/prism/dispatcher.rb#1550 def visit_def_node(node); end # Dispatch enter and leave events for DefinedNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1555 + # source://prism//lib/prism/dispatcher.rb#1556 def visit_defined_node(node); end # Dispatch enter and leave events for ElseNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1561 + # source://prism//lib/prism/dispatcher.rb#1562 def visit_else_node(node); end # Dispatch enter and leave events for EmbeddedStatementsNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1567 + # source://prism//lib/prism/dispatcher.rb#1568 def visit_embedded_statements_node(node); end # Dispatch enter and leave events for EmbeddedVariableNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1573 + # source://prism//lib/prism/dispatcher.rb#1574 def visit_embedded_variable_node(node); end # Dispatch enter and leave events for EnsureNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1579 + # source://prism//lib/prism/dispatcher.rb#1580 def visit_ensure_node(node); end # Dispatch enter and leave events for FalseNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1585 + # source://prism//lib/prism/dispatcher.rb#1586 def visit_false_node(node); end # Dispatch enter and leave events for FindPatternNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1591 + # source://prism//lib/prism/dispatcher.rb#1592 def visit_find_pattern_node(node); end # Dispatch enter and leave events for FlipFlopNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1597 + # source://prism//lib/prism/dispatcher.rb#1598 def visit_flip_flop_node(node); end # Dispatch enter and leave events for FloatNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1603 + # source://prism//lib/prism/dispatcher.rb#1604 def visit_float_node(node); end # Dispatch enter and leave events for ForNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1609 + # source://prism//lib/prism/dispatcher.rb#1610 def visit_for_node(node); end # Dispatch enter and leave events for ForwardingArgumentsNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1615 + # source://prism//lib/prism/dispatcher.rb#1616 def visit_forwarding_arguments_node(node); end # Dispatch enter and leave events for ForwardingParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1621 + # source://prism//lib/prism/dispatcher.rb#1622 def visit_forwarding_parameter_node(node); end # Dispatch enter and leave events for ForwardingSuperNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1627 + # source://prism//lib/prism/dispatcher.rb#1628 def visit_forwarding_super_node(node); end # Dispatch enter and leave events for GlobalVariableAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1633 + # source://prism//lib/prism/dispatcher.rb#1634 def visit_global_variable_and_write_node(node); end # Dispatch enter and leave events for GlobalVariableOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1639 + # source://prism//lib/prism/dispatcher.rb#1640 def visit_global_variable_operator_write_node(node); end # Dispatch enter and leave events for GlobalVariableOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1645 + # source://prism//lib/prism/dispatcher.rb#1646 def visit_global_variable_or_write_node(node); end # Dispatch enter and leave events for GlobalVariableReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1651 + # source://prism//lib/prism/dispatcher.rb#1652 def visit_global_variable_read_node(node); end # Dispatch enter and leave events for GlobalVariableTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1657 + # source://prism//lib/prism/dispatcher.rb#1658 def visit_global_variable_target_node(node); end # Dispatch enter and leave events for GlobalVariableWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1663 + # source://prism//lib/prism/dispatcher.rb#1664 def visit_global_variable_write_node(node); end # Dispatch enter and leave events for HashNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1669 + # source://prism//lib/prism/dispatcher.rb#1670 def visit_hash_node(node); end # Dispatch enter and leave events for HashPatternNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1675 + # source://prism//lib/prism/dispatcher.rb#1676 def visit_hash_pattern_node(node); end # Dispatch enter and leave events for IfNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1681 + # source://prism//lib/prism/dispatcher.rb#1682 def visit_if_node(node); end # Dispatch enter and leave events for ImaginaryNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1687 + # source://prism//lib/prism/dispatcher.rb#1688 def visit_imaginary_node(node); end # Dispatch enter and leave events for ImplicitNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1693 + # source://prism//lib/prism/dispatcher.rb#1694 def visit_implicit_node(node); end # Dispatch enter and leave events for ImplicitRestNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1699 + # source://prism//lib/prism/dispatcher.rb#1700 def visit_implicit_rest_node(node); end # Dispatch enter and leave events for InNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1705 + # source://prism//lib/prism/dispatcher.rb#1706 def visit_in_node(node); end # Dispatch enter and leave events for IndexAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1711 + # source://prism//lib/prism/dispatcher.rb#1712 def visit_index_and_write_node(node); end # Dispatch enter and leave events for IndexOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1717 + # source://prism//lib/prism/dispatcher.rb#1718 def visit_index_operator_write_node(node); end # Dispatch enter and leave events for IndexOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1723 + # source://prism//lib/prism/dispatcher.rb#1724 def visit_index_or_write_node(node); end # Dispatch enter and leave events for IndexTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1729 + # source://prism//lib/prism/dispatcher.rb#1730 def visit_index_target_node(node); end # Dispatch enter and leave events for InstanceVariableAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1735 + # source://prism//lib/prism/dispatcher.rb#1736 def visit_instance_variable_and_write_node(node); end # Dispatch enter and leave events for InstanceVariableOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1741 + # source://prism//lib/prism/dispatcher.rb#1742 def visit_instance_variable_operator_write_node(node); end # Dispatch enter and leave events for InstanceVariableOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1747 + # source://prism//lib/prism/dispatcher.rb#1748 def visit_instance_variable_or_write_node(node); end # Dispatch enter and leave events for InstanceVariableReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1753 + # source://prism//lib/prism/dispatcher.rb#1754 def visit_instance_variable_read_node(node); end # Dispatch enter and leave events for InstanceVariableTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1759 + # source://prism//lib/prism/dispatcher.rb#1760 def visit_instance_variable_target_node(node); end # Dispatch enter and leave events for InstanceVariableWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1765 + # source://prism//lib/prism/dispatcher.rb#1766 def visit_instance_variable_write_node(node); end # Dispatch enter and leave events for IntegerNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1771 + # source://prism//lib/prism/dispatcher.rb#1772 def visit_integer_node(node); end # Dispatch enter and leave events for InterpolatedMatchLastLineNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1777 + # source://prism//lib/prism/dispatcher.rb#1778 def visit_interpolated_match_last_line_node(node); end # Dispatch enter and leave events for InterpolatedRegularExpressionNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1783 + # source://prism//lib/prism/dispatcher.rb#1784 def visit_interpolated_regular_expression_node(node); end # Dispatch enter and leave events for InterpolatedStringNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1789 + # source://prism//lib/prism/dispatcher.rb#1790 def visit_interpolated_string_node(node); end # Dispatch enter and leave events for InterpolatedSymbolNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1795 + # source://prism//lib/prism/dispatcher.rb#1796 def visit_interpolated_symbol_node(node); end # Dispatch enter and leave events for InterpolatedXStringNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1801 + # source://prism//lib/prism/dispatcher.rb#1802 def visit_interpolated_x_string_node(node); end # Dispatch enter and leave events for ItLocalVariableReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1807 + # source://prism//lib/prism/dispatcher.rb#1808 def visit_it_local_variable_read_node(node); end # Dispatch enter and leave events for ItParametersNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1813 + # source://prism//lib/prism/dispatcher.rb#1814 def visit_it_parameters_node(node); end # Dispatch enter and leave events for KeywordHashNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1819 + # source://prism//lib/prism/dispatcher.rb#1820 def visit_keyword_hash_node(node); end # Dispatch enter and leave events for KeywordRestParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1825 + # source://prism//lib/prism/dispatcher.rb#1826 def visit_keyword_rest_parameter_node(node); end # Dispatch enter and leave events for LambdaNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1831 + # source://prism//lib/prism/dispatcher.rb#1832 def visit_lambda_node(node); end # Dispatch enter and leave events for LocalVariableAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1837 + # source://prism//lib/prism/dispatcher.rb#1838 def visit_local_variable_and_write_node(node); end # Dispatch enter and leave events for LocalVariableOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1843 + # source://prism//lib/prism/dispatcher.rb#1844 def visit_local_variable_operator_write_node(node); end # Dispatch enter and leave events for LocalVariableOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1849 + # source://prism//lib/prism/dispatcher.rb#1850 def visit_local_variable_or_write_node(node); end # Dispatch enter and leave events for LocalVariableReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1855 + # source://prism//lib/prism/dispatcher.rb#1856 def visit_local_variable_read_node(node); end # Dispatch enter and leave events for LocalVariableTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1861 + # source://prism//lib/prism/dispatcher.rb#1862 def visit_local_variable_target_node(node); end # Dispatch enter and leave events for LocalVariableWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1867 + # source://prism//lib/prism/dispatcher.rb#1868 def visit_local_variable_write_node(node); end # Dispatch enter and leave events for MatchLastLineNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1873 + # source://prism//lib/prism/dispatcher.rb#1874 def visit_match_last_line_node(node); end # Dispatch enter and leave events for MatchPredicateNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1879 + # source://prism//lib/prism/dispatcher.rb#1880 def visit_match_predicate_node(node); end # Dispatch enter and leave events for MatchRequiredNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1885 + # source://prism//lib/prism/dispatcher.rb#1886 def visit_match_required_node(node); end # Dispatch enter and leave events for MatchWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1891 + # source://prism//lib/prism/dispatcher.rb#1892 def visit_match_write_node(node); end # Dispatch enter and leave events for MissingNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1897 + # source://prism//lib/prism/dispatcher.rb#1898 def visit_missing_node(node); end # Dispatch enter and leave events for ModuleNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1903 + # source://prism//lib/prism/dispatcher.rb#1904 def visit_module_node(node); end # Dispatch enter and leave events for MultiTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1909 + # source://prism//lib/prism/dispatcher.rb#1910 def visit_multi_target_node(node); end # Dispatch enter and leave events for MultiWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1915 + # source://prism//lib/prism/dispatcher.rb#1916 def visit_multi_write_node(node); end # Dispatch enter and leave events for NextNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1921 + # source://prism//lib/prism/dispatcher.rb#1922 def visit_next_node(node); end # Dispatch enter and leave events for NilNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1927 + # source://prism//lib/prism/dispatcher.rb#1928 def visit_nil_node(node); end # Dispatch enter and leave events for NoKeywordsParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1933 + # source://prism//lib/prism/dispatcher.rb#1934 def visit_no_keywords_parameter_node(node); end # Dispatch enter and leave events for NumberedParametersNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1939 + # source://prism//lib/prism/dispatcher.rb#1940 def visit_numbered_parameters_node(node); end # Dispatch enter and leave events for NumberedReferenceReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1945 + # source://prism//lib/prism/dispatcher.rb#1946 def visit_numbered_reference_read_node(node); end # Dispatch enter and leave events for OptionalKeywordParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1951 + # source://prism//lib/prism/dispatcher.rb#1952 def visit_optional_keyword_parameter_node(node); end # Dispatch enter and leave events for OptionalParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1957 + # source://prism//lib/prism/dispatcher.rb#1958 def visit_optional_parameter_node(node); end # Dispatch enter and leave events for OrNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1963 + # source://prism//lib/prism/dispatcher.rb#1964 def visit_or_node(node); end # Dispatch enter and leave events for ParametersNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1969 + # source://prism//lib/prism/dispatcher.rb#1970 def visit_parameters_node(node); end # Dispatch enter and leave events for ParenthesesNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1975 + # source://prism//lib/prism/dispatcher.rb#1976 def visit_parentheses_node(node); end # Dispatch enter and leave events for PinnedExpressionNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1981 + # source://prism//lib/prism/dispatcher.rb#1982 def visit_pinned_expression_node(node); end # Dispatch enter and leave events for PinnedVariableNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1987 + # source://prism//lib/prism/dispatcher.rb#1988 def visit_pinned_variable_node(node); end # Dispatch enter and leave events for PostExecutionNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1993 + # source://prism//lib/prism/dispatcher.rb#1994 def visit_post_execution_node(node); end # Dispatch enter and leave events for PreExecutionNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1999 + # source://prism//lib/prism/dispatcher.rb#2000 def visit_pre_execution_node(node); end # Dispatch enter and leave events for ProgramNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2005 + # source://prism//lib/prism/dispatcher.rb#2006 def visit_program_node(node); end # Dispatch enter and leave events for RangeNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2011 + # source://prism//lib/prism/dispatcher.rb#2012 def visit_range_node(node); end # Dispatch enter and leave events for RationalNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2017 + # source://prism//lib/prism/dispatcher.rb#2018 def visit_rational_node(node); end # Dispatch enter and leave events for RedoNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2023 + # source://prism//lib/prism/dispatcher.rb#2024 def visit_redo_node(node); end # Dispatch enter and leave events for RegularExpressionNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2029 + # source://prism//lib/prism/dispatcher.rb#2030 def visit_regular_expression_node(node); end # Dispatch enter and leave events for RequiredKeywordParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2035 + # source://prism//lib/prism/dispatcher.rb#2036 def visit_required_keyword_parameter_node(node); end # Dispatch enter and leave events for RequiredParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2041 + # source://prism//lib/prism/dispatcher.rb#2042 def visit_required_parameter_node(node); end # Dispatch enter and leave events for RescueModifierNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2047 + # source://prism//lib/prism/dispatcher.rb#2048 def visit_rescue_modifier_node(node); end # Dispatch enter and leave events for RescueNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2053 + # source://prism//lib/prism/dispatcher.rb#2054 def visit_rescue_node(node); end # Dispatch enter and leave events for RestParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2059 + # source://prism//lib/prism/dispatcher.rb#2060 def visit_rest_parameter_node(node); end # Dispatch enter and leave events for RetryNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2065 + # source://prism//lib/prism/dispatcher.rb#2066 def visit_retry_node(node); end # Dispatch enter and leave events for ReturnNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2071 + # source://prism//lib/prism/dispatcher.rb#2072 def visit_return_node(node); end # Dispatch enter and leave events for SelfNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2077 + # source://prism//lib/prism/dispatcher.rb#2078 def visit_self_node(node); end # Dispatch enter and leave events for ShareableConstantNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2083 + # source://prism//lib/prism/dispatcher.rb#2084 def visit_shareable_constant_node(node); end # Dispatch enter and leave events for SingletonClassNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2089 + # source://prism//lib/prism/dispatcher.rb#2090 def visit_singleton_class_node(node); end # Dispatch enter and leave events for SourceEncodingNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2095 + # source://prism//lib/prism/dispatcher.rb#2096 def visit_source_encoding_node(node); end # Dispatch enter and leave events for SourceFileNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2101 + # source://prism//lib/prism/dispatcher.rb#2102 def visit_source_file_node(node); end # Dispatch enter and leave events for SourceLineNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2107 + # source://prism//lib/prism/dispatcher.rb#2108 def visit_source_line_node(node); end # Dispatch enter and leave events for SplatNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2113 + # source://prism//lib/prism/dispatcher.rb#2114 def visit_splat_node(node); end # Dispatch enter and leave events for StatementsNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2119 + # source://prism//lib/prism/dispatcher.rb#2120 def visit_statements_node(node); end # Dispatch enter and leave events for StringNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2125 + # source://prism//lib/prism/dispatcher.rb#2126 def visit_string_node(node); end # Dispatch enter and leave events for SuperNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2131 + # source://prism//lib/prism/dispatcher.rb#2132 def visit_super_node(node); end # Dispatch enter and leave events for SymbolNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2137 + # source://prism//lib/prism/dispatcher.rb#2138 def visit_symbol_node(node); end # Dispatch enter and leave events for TrueNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2143 + # source://prism//lib/prism/dispatcher.rb#2144 def visit_true_node(node); end # Dispatch enter and leave events for UndefNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2149 + # source://prism//lib/prism/dispatcher.rb#2150 def visit_undef_node(node); end # Dispatch enter and leave events for UnlessNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2155 + # source://prism//lib/prism/dispatcher.rb#2156 def visit_unless_node(node); end # Dispatch enter and leave events for UntilNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2161 + # source://prism//lib/prism/dispatcher.rb#2162 def visit_until_node(node); end # Dispatch enter and leave events for WhenNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2167 + # source://prism//lib/prism/dispatcher.rb#2168 def visit_when_node(node); end # Dispatch enter and leave events for WhileNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2173 + # source://prism//lib/prism/dispatcher.rb#2174 def visit_while_node(node); end # Dispatch enter and leave events for XStringNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2179 + # source://prism//lib/prism/dispatcher.rb#2180 def visit_x_string_node(node); end # Dispatch enter and leave events for YieldNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2185 + # source://prism//lib/prism/dispatcher.rb#2186 def visit_yield_node(node); end end @@ -12398,97 +13689,97 @@ class Prism::DotVisitor < ::Prism::Visitor # Visit a SelfNode node. # - # source://prism//lib/prism/dot_visitor.rb#4047 + # source://prism//lib/prism/dot_visitor.rb#4044 def visit_self_node(node); end # Visit a ShareableConstantNode node. # - # source://prism//lib/prism/dot_visitor.rb#4061 + # source://prism//lib/prism/dot_visitor.rb#4058 def visit_shareable_constant_node(node); end # Visit a SingletonClassNode node. # - # source://prism//lib/prism/dot_visitor.rb#4082 + # source://prism//lib/prism/dot_visitor.rb#4079 def visit_singleton_class_node(node); end # Visit a SourceEncodingNode node. # - # source://prism//lib/prism/dot_visitor.rb#4118 + # source://prism//lib/prism/dot_visitor.rb#4115 def visit_source_encoding_node(node); end # Visit a SourceFileNode node. # - # source://prism//lib/prism/dot_visitor.rb#4132 + # source://prism//lib/prism/dot_visitor.rb#4129 def visit_source_file_node(node); end # Visit a SourceLineNode node. # - # source://prism//lib/prism/dot_visitor.rb#4152 + # source://prism//lib/prism/dot_visitor.rb#4149 def visit_source_line_node(node); end # Visit a SplatNode node. # - # source://prism//lib/prism/dot_visitor.rb#4166 + # source://prism//lib/prism/dot_visitor.rb#4163 def visit_splat_node(node); end # Visit a StatementsNode node. # - # source://prism//lib/prism/dot_visitor.rb#4189 + # source://prism//lib/prism/dot_visitor.rb#4186 def visit_statements_node(node); end # Visit a StringNode node. # - # source://prism//lib/prism/dot_visitor.rb#4216 + # source://prism//lib/prism/dot_visitor.rb#4213 def visit_string_node(node); end # Visit a SuperNode node. # - # source://prism//lib/prism/dot_visitor.rb#4249 + # source://prism//lib/prism/dot_visitor.rb#4246 def visit_super_node(node); end # Visit a SymbolNode node. # - # source://prism//lib/prism/dot_visitor.rb#4288 + # source://prism//lib/prism/dot_visitor.rb#4285 def visit_symbol_node(node); end # Visit a TrueNode node. # - # source://prism//lib/prism/dot_visitor.rb#4323 + # source://prism//lib/prism/dot_visitor.rb#4320 def visit_true_node(node); end # Visit a UndefNode node. # - # source://prism//lib/prism/dot_visitor.rb#4337 + # source://prism//lib/prism/dot_visitor.rb#4334 def visit_undef_node(node); end # Visit a UnlessNode node. # - # source://prism//lib/prism/dot_visitor.rb#4367 + # source://prism//lib/prism/dot_visitor.rb#4364 def visit_unless_node(node); end # Visit a UntilNode node. # - # source://prism//lib/prism/dot_visitor.rb#4410 + # source://prism//lib/prism/dot_visitor.rb#4407 def visit_until_node(node); end # Visit a WhenNode node. # - # source://prism//lib/prism/dot_visitor.rb#4445 + # source://prism//lib/prism/dot_visitor.rb#4442 def visit_when_node(node); end # Visit a WhileNode node. # - # source://prism//lib/prism/dot_visitor.rb#4486 + # source://prism//lib/prism/dot_visitor.rb#4483 def visit_while_node(node); end # Visit a XStringNode node. # - # source://prism//lib/prism/dot_visitor.rb#4521 + # source://prism//lib/prism/dot_visitor.rb#4518 def visit_x_string_node(node); end # Visit a YieldNode node. # - # source://prism//lib/prism/dot_visitor.rb#4550 + # source://prism//lib/prism/dot_visitor.rb#4547 def visit_yield_node(node); end private @@ -12496,7 +13787,7 @@ 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#4596 + # source://prism//lib/prism/dot_visitor.rb#4593 def arguments_node_flags_inspect(node); end # Inspect a node that has array_node_flags flags to display the flags as a @@ -12537,7 +13828,7 @@ class Prism::DotVisitor < ::Prism::Visitor # Inspect a location to display the start and end line and column numbers. # - # source://prism//lib/prism/dot_visitor.rb#4590 + # source://prism//lib/prism/dot_visitor.rb#4587 def location_inspect(location); end # Inspect a node that has loop_flags flags to display the flags as a @@ -12548,7 +13839,7 @@ class Prism::DotVisitor < ::Prism::Visitor # Generate a unique node ID for a node throughout the digraph. # - # source://prism//lib/prism/dot_visitor.rb#4585 + # source://prism//lib/prism/dot_visitor.rb#4582 def node_id(node); end # Inspect a node that has parameter_flags flags to display the flags as a @@ -12569,28 +13860,22 @@ class Prism::DotVisitor < ::Prism::Visitor # source://prism//lib/prism/dot_visitor.rb#4685 def regular_expression_flags_inspect(node); end - # Inspect a node that has return_node_flags flags to display the flags as a - # comma-separated list. - # - # source://prism//lib/prism/dot_visitor.rb#4703 - def return_node_flags_inspect(node); end - # Inspect a node that has shareable_constant_node_flags flags to display the flags as a # comma-separated list. # - # source://prism//lib/prism/dot_visitor.rb#4711 + # source://prism//lib/prism/dot_visitor.rb#4703 def shareable_constant_node_flags_inspect(node); end # Inspect a node that has string_flags flags to display the flags as a # comma-separated list. # - # source://prism//lib/prism/dot_visitor.rb#4721 + # source://prism//lib/prism/dot_visitor.rb#4713 def string_flags_inspect(node); end # Inspect a node that has symbol_flags flags to display the flags as a # comma-separated list. # - # source://prism//lib/prism/dot_visitor.rb#4732 + # source://prism//lib/prism/dot_visitor.rb#4724 def symbol_flags_inspect(node); end end @@ -12684,101 +13969,105 @@ end # if a then b else c end # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#6173 +# source://prism//lib/prism/node.rb#5485 class Prism::ElseNode < ::Prism::Node - # def initialize: (Location else_keyword_loc, StatementsNode? statements, Location? end_keyword_loc, Location location) -> void + # Initialize a new ElseNode node. # # @return [ElseNode] a new instance of ElseNode # - # source://prism//lib/prism/node.rb#6175 + # source://prism//lib/prism/node.rb#5487 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, else_keyword_loc: Prism::Location, statements: T.nilable(Prism::StatementsNode), - end_keyword_loc: T.nilable(Prism::Location), - location: Prism::Location + end_keyword_loc: T.nilable(Prism::Location) ).void end - def initialize(source, else_keyword_loc, statements, end_keyword_loc, location); end + def initialize(source, node_id, location, flags, else_keyword_loc, statements, end_keyword_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#6286 + # source://prism//lib/prism/node.rb#5582 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6184 + # source://prism//lib/prism/node.rb#5498 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6189 + # source://prism//lib/prism/node.rb#5503 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6201 + # source://prism//lib/prism/node.rb#5515 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6194 + # source://prism//lib/prism/node.rb#5508 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?else_keyword_loc: Location, ?statements: StatementsNode?, ?end_keyword_loc: Location?) -> ElseNode # - # source://prism//lib/prism/node.rb#6206 + # source://prism//lib/prism/node.rb#5520 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, else_keyword_loc: Prism::Location, statements: T.nilable(Prism::StatementsNode), - end_keyword_loc: T.nilable(Prism::Location), - location: Prism::Location + end_keyword_loc: T.nilable(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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), else_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6189 + # source://prism//lib/prism/node.rb#5503 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { else_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location?, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, else_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location? } # - # source://prism//lib/prism/node.rb#6214 + # source://prism//lib/prism/node.rb#5528 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def else_keyword: () -> String # - # source://prism//lib/prism/node.rb#6242 + # source://prism//lib/prism/node.rb#5556 sig { returns(String) } def else_keyword; end # attr_reader else_keyword_loc: Location # - # source://prism//lib/prism/node.rb#6219 + # source://prism//lib/prism/node.rb#5533 sig { returns(Prism::Location) } def else_keyword_loc; end # def end_keyword: () -> String? # - # source://prism//lib/prism/node.rb#6247 + # source://prism//lib/prism/node.rb#5561 sig { returns(T.nilable(String)) } def end_keyword; end # attr_reader end_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#6229 + # source://prism//lib/prism/node.rb#5543 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end @@ -12787,44 +14076,26 @@ class Prism::ElseNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#6252 + # source://prism//lib/prism/node.rb#5566 sig { override.returns(String) } def inspect; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#6226 + # source://prism//lib/prism/node.rb#5540 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#6270 + # source://prism//lib/prism/node.rb#5571 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6280 + # source://prism//lib/prism/node.rb#5576 def type; end end end @@ -12832,11 +14103,11 @@ end # EmbDocComment objects correspond to comments that are surrounded by =begin # and =end. # -# source://prism//lib/prism/parse_result.rb#403 +# source://prism//lib/prism/parse_result.rb#544 class Prism::EmbDocComment < ::Prism::Comment # Returns a string representation of this comment. # - # source://prism//lib/prism/parse_result.rb#410 + # source://prism//lib/prism/parse_result.rb#551 sig { returns(String) } def inspect; end @@ -12844,7 +14115,7 @@ class Prism::EmbDocComment < ::Prism::Comment # # @return [Boolean] # - # source://prism//lib/prism/parse_result.rb#405 + # source://prism//lib/prism/parse_result.rb#546 sig { override.returns(T::Boolean) } def trailing?; end end @@ -12854,89 +14125,93 @@ end # "foo #{bar}" # ^^^^^^ # -# source://prism//lib/prism/node.rb#6298 +# source://prism//lib/prism/node.rb#5594 class Prism::EmbeddedStatementsNode < ::Prism::Node - # def initialize: (Location opening_loc, StatementsNode? statements, Location closing_loc, Location location) -> void + # Initialize a new EmbeddedStatementsNode node. # # @return [EmbeddedStatementsNode] a new instance of EmbeddedStatementsNode # - # source://prism//lib/prism/node.rb#6300 + # source://prism//lib/prism/node.rb#5596 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, opening_loc: Prism::Location, statements: T.nilable(Prism::StatementsNode), - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: Prism::Location ).void end - def initialize(source, opening_loc, statements, closing_loc, location); end + def initialize(source, node_id, location, flags, opening_loc, statements, closing_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#6405 + # source://prism//lib/prism/node.rb#5685 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6309 + # source://prism//lib/prism/node.rb#5607 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6314 + # source://prism//lib/prism/node.rb#5612 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#6366 + # source://prism//lib/prism/node.rb#5664 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#6354 + # source://prism//lib/prism/node.rb#5652 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6326 + # source://prism//lib/prism/node.rb#5624 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6319 + # source://prism//lib/prism/node.rb#5617 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?statements: StatementsNode?, ?closing_loc: Location) -> EmbeddedStatementsNode # - # source://prism//lib/prism/node.rb#6331 + # source://prism//lib/prism/node.rb#5629 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, opening_loc: Prism::Location, statements: T.nilable(Prism::StatementsNode), - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: 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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), statements: T.unsafe(nil), closing_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6314 + # source://prism//lib/prism/node.rb#5612 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location, statements: StatementsNode?, closing_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, statements: StatementsNode?, closing_loc: Location } # - # source://prism//lib/prism/node.rb#6339 + # source://prism//lib/prism/node.rb#5637 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -12945,56 +14220,38 @@ class Prism::EmbeddedStatementsNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#6371 + # source://prism//lib/prism/node.rb#5669 sig { override.returns(String) } def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#6361 + # source://prism//lib/prism/node.rb#5659 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#6344 + # source://prism//lib/prism/node.rb#5642 sig { returns(Prism::Location) } def opening_loc; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#6351 + # source://prism//lib/prism/node.rb#5649 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#6389 + # source://prism//lib/prism/node.rb#5674 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6399 + # source://prism//lib/prism/node.rb#5679 def type; end end end @@ -13004,75 +14261,79 @@ end # "foo #@bar" # ^^^^^ # -# source://prism//lib/prism/node.rb#6417 +# source://prism//lib/prism/node.rb#5697 class Prism::EmbeddedVariableNode < ::Prism::Node - # def initialize: (Location operator_loc, Prism::node variable, Location location) -> void + # Initialize a new EmbeddedVariableNode node. # # @return [EmbeddedVariableNode] a new instance of EmbeddedVariableNode # - # source://prism//lib/prism/node.rb#6419 + # source://prism//lib/prism/node.rb#5699 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, operator_loc: Prism::Location, - variable: Prism::Node, - location: Prism::Location + variable: T.any(Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode) ).void end - def initialize(source, operator_loc, variable, location); end + def initialize(source, node_id, location, flags, operator_loc, variable); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#6509 + # source://prism//lib/prism/node.rb#5773 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6427 + # source://prism//lib/prism/node.rb#5709 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6432 + # source://prism//lib/prism/node.rb#5714 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6442 + # source://prism//lib/prism/node.rb#5724 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6437 + # source://prism//lib/prism/node.rb#5719 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?operator_loc: Location, ?variable: Prism::node, ?location: Location) -> EmbeddedVariableNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?operator_loc: Location, ?variable: InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode) -> EmbeddedVariableNode # - # source://prism//lib/prism/node.rb#6447 + # source://prism//lib/prism/node.rb#5729 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, operator_loc: Prism::Location, - variable: Prism::Node, - location: Prism::Location + variable: T.any(Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode) ).returns(Prism::EmbeddedVariableNode) end - def copy(operator_loc: T.unsafe(nil), variable: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), operator_loc: T.unsafe(nil), variable: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6432 + # source://prism//lib/prism/node.rb#5714 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { operator_loc: Location, variable: Prism::node, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, operator_loc: Location, variable: InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode } # - # source://prism//lib/prism/node.rb#6455 + # source://prism//lib/prism/node.rb#5737 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -13081,73 +14342,57 @@ class Prism::EmbeddedVariableNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#6475 + # source://prism//lib/prism/node.rb#5757 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#6470 + # source://prism//lib/prism/node.rb#5752 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#6460 + # source://prism//lib/prism/node.rb#5742 sig { returns(Prism::Location) } def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#6493 + # source://prism//lib/prism/node.rb#5762 sig { override.returns(Symbol) } def type; end - # attr_reader variable: Prism::node + # attr_reader variable: InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode # - # source://prism//lib/prism/node.rb#6467 - sig { returns(Prism::Node) } + # source://prism//lib/prism/node.rb#5749 + sig do + returns(T.any(Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)) + end def variable; end class << self - # 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#6503 + # source://prism//lib/prism/node.rb#5767 def type; end end end # Flags for nodes that have unescaped content. # -# source://prism//lib/prism/node.rb#19157 +# source://prism//lib/prism/node.rb#16723 module Prism::EncodingFlags; end # internal bytes forced the encoding to binary # -# source://prism//lib/prism/node.rb#19162 +# source://prism//lib/prism/node.rb#16728 Prism::EncodingFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer) # internal bytes forced the encoding to UTF-8 # -# source://prism//lib/prism/node.rb#19159 +# source://prism//lib/prism/node.rb#16725 Prism::EncodingFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # Represents an `ensure` clause in a `begin` statement. @@ -13159,101 +14404,105 @@ Prism::EncodingFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # bar # end # -# source://prism//lib/prism/node.rb#6524 +# source://prism//lib/prism/node.rb#5788 class Prism::EnsureNode < ::Prism::Node - # def initialize: (Location ensure_keyword_loc, StatementsNode? statements, Location end_keyword_loc, Location location) -> void + # Initialize a new EnsureNode node. # # @return [EnsureNode] a new instance of EnsureNode # - # source://prism//lib/prism/node.rb#6526 + # source://prism//lib/prism/node.rb#5790 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, ensure_keyword_loc: Prism::Location, statements: T.nilable(Prism::StatementsNode), - end_keyword_loc: Prism::Location, - location: Prism::Location + end_keyword_loc: Prism::Location ).void end - def initialize(source, ensure_keyword_loc, statements, end_keyword_loc, location); end + def initialize(source, node_id, location, flags, ensure_keyword_loc, statements, end_keyword_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#6631 + # source://prism//lib/prism/node.rb#5879 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6535 + # source://prism//lib/prism/node.rb#5801 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6540 + # source://prism//lib/prism/node.rb#5806 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6552 + # source://prism//lib/prism/node.rb#5818 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6545 + # source://prism//lib/prism/node.rb#5811 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?ensure_keyword_loc: Location, ?statements: StatementsNode?, ?end_keyword_loc: Location) -> EnsureNode # - # source://prism//lib/prism/node.rb#6557 + # source://prism//lib/prism/node.rb#5823 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, ensure_keyword_loc: Prism::Location, statements: T.nilable(Prism::StatementsNode), - end_keyword_loc: Prism::Location, - location: Prism::Location + end_keyword_loc: 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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), ensure_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6540 + # source://prism//lib/prism/node.rb#5806 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { ensure_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, ensure_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location } # - # source://prism//lib/prism/node.rb#6565 + # source://prism//lib/prism/node.rb#5831 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def end_keyword: () -> String # - # source://prism//lib/prism/node.rb#6592 + # source://prism//lib/prism/node.rb#5858 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#6580 + # source://prism//lib/prism/node.rb#5846 sig { returns(Prism::Location) } def end_keyword_loc; end # def ensure_keyword: () -> String # - # source://prism//lib/prism/node.rb#6587 + # source://prism//lib/prism/node.rb#5853 sig { returns(String) } def ensure_keyword; end # attr_reader ensure_keyword_loc: Location # - # source://prism//lib/prism/node.rb#6570 + # source://prism//lib/prism/node.rb#5836 sig { returns(Prism::Location) } def ensure_keyword_loc; end @@ -13262,44 +14511,26 @@ class Prism::EnsureNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#6597 + # source://prism//lib/prism/node.rb#5863 sig { override.returns(String) } def inspect; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#6577 + # source://prism//lib/prism/node.rb#5843 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#6615 + # source://prism//lib/prism/node.rb#5868 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6625 + # source://prism//lib/prism/node.rb#5873 def type; end end end @@ -13309,62 +14540,62 @@ end # false # ^^^^^ # -# source://prism//lib/prism/node.rb#6643 +# source://prism//lib/prism/node.rb#5891 class Prism::FalseNode < ::Prism::Node - # def initialize: (Location location) -> void + # Initialize a new FalseNode node. # # @return [FalseNode] a new instance of FalseNode # - # source://prism//lib/prism/node.rb#6645 - sig { params(source: Prism::Source, location: Prism::Location).void } - def initialize(source, location); end + # source://prism//lib/prism/node.rb#5893 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#6718 + # source://prism//lib/prism/node.rb#5950 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6651 + # source://prism//lib/prism/node.rb#5901 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6656 + # source://prism//lib/prism/node.rb#5906 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6666 + # source://prism//lib/prism/node.rb#5916 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6661 + # source://prism//lib/prism/node.rb#5911 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?location: Location) -> FalseNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> FalseNode # - # source://prism//lib/prism/node.rb#6671 - sig { params(location: Prism::Location).returns(Prism::FalseNode) } - def copy(location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#5921 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::FalseNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6656 + # source://prism//lib/prism/node.rb#5906 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#6679 + # source://prism//lib/prism/node.rb#5929 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -13373,38 +14604,20 @@ class Prism::FalseNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#6684 + # source://prism//lib/prism/node.rb#5934 sig { override.returns(String) } def inspect; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#6702 + # source://prism//lib/prism/node.rb#5939 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#6712 + # source://prism//lib/prism/node.rb#5944 def type; end end end @@ -13420,101 +14633,105 @@ end # foo in Foo(*bar, baz, *qux) # ^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#6733 +# source://prism//lib/prism/node.rb#5965 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 + # Initialize a new FindPatternNode node. # # @return [FindPatternNode] a new instance of FindPatternNode # - # source://prism//lib/prism/node.rb#6735 + # source://prism//lib/prism/node.rb#5967 sig do params( source: Prism::Source, - constant: T.nilable(Prism::Node), - left: Prism::Node, + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + left: Prism::SplatNode, requireds: T::Array[Prism::Node], - right: Prism::Node, + right: T.any(Prism::SplatNode, Prism::MissingNode), opening_loc: T.nilable(Prism::Location), - closing_loc: T.nilable(Prism::Location), - location: Prism::Location + closing_loc: T.nilable(Prism::Location) ).void end - def initialize(source, constant, left, requireds, right, opening_loc, closing_loc, location); end + def initialize(source, node_id, location, flags, constant, left, requireds, right, opening_loc, closing_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#6867 + # source://prism//lib/prism/node.rb#6083 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6747 + # source://prism//lib/prism/node.rb#5981 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6752 + # source://prism//lib/prism/node.rb#5986 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#6828 + # source://prism//lib/prism/node.rb#6062 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#6810 + # source://prism//lib/prism/node.rb#6044 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6767 + # source://prism//lib/prism/node.rb#6001 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6757 + # source://prism//lib/prism/node.rb#5991 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # attr_reader constant: Prism::node? + # attr_reader constant: ConstantReadNode | ConstantPathNode | nil # - # source://prism//lib/prism/node.rb#6785 - sig { returns(T.nilable(Prism::Node)) } + # source://prism//lib/prism/node.rb#6019 + sig { returns(T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode))) } 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant: ConstantReadNode | ConstantPathNode | nil, ?left: SplatNode, ?requireds: Array[Prism::node], ?right: SplatNode | MissingNode, ?opening_loc: Location?, ?closing_loc: Location?) -> FindPatternNode # - # source://prism//lib/prism/node.rb#6772 + # source://prism//lib/prism/node.rb#6006 sig do params( - constant: T.nilable(Prism::Node), - left: Prism::Node, + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + left: Prism::SplatNode, requireds: T::Array[Prism::Node], - right: Prism::Node, + right: T.any(Prism::SplatNode, Prism::MissingNode), opening_loc: T.nilable(Prism::Location), - closing_loc: T.nilable(Prism::Location), - location: Prism::Location + closing_loc: T.nilable(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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), constant: T.unsafe(nil), left: T.unsafe(nil), requireds: T.unsafe(nil), right: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6752 + # source://prism//lib/prism/node.rb#5986 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { constant: Prism::node?, left: Prism::node, requireds: Array[Prism::node], right: Prism::node, opening_loc: Location?, closing_loc: Location?, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant: ConstantReadNode | ConstantPathNode | nil, left: SplatNode, requireds: Array[Prism::node], right: SplatNode | MissingNode, opening_loc: Location?, closing_loc: Location? } # - # source://prism//lib/prism/node.rb#6780 + # source://prism//lib/prism/node.rb#6014 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -13523,68 +14740,50 @@ class Prism::FindPatternNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#6833 + # source://prism//lib/prism/node.rb#6067 sig { override.returns(String) } def inspect; end - # attr_reader left: Prism::node + # attr_reader left: SplatNode # - # source://prism//lib/prism/node.rb#6788 - sig { returns(Prism::Node) } + # source://prism//lib/prism/node.rb#6022 + sig { returns(Prism::SplatNode) } def left; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#6823 + # source://prism//lib/prism/node.rb#6057 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#6797 + # source://prism//lib/prism/node.rb#6031 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader requireds: Array[Prism::node] # - # source://prism//lib/prism/node.rb#6791 + # source://prism//lib/prism/node.rb#6025 sig { returns(T::Array[Prism::Node]) } def requireds; end - # attr_reader right: Prism::node + # attr_reader right: SplatNode | MissingNode # - # source://prism//lib/prism/node.rb#6794 - sig { returns(Prism::Node) } + # source://prism//lib/prism/node.rb#6028 + sig { returns(T.any(Prism::SplatNode, Prism::MissingNode)) } def right; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#6851 + # source://prism//lib/prism/node.rb#6072 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6861 + # source://prism//lib/prism/node.rb#6077 def type; end end end @@ -13594,79 +14793,81 @@ end # baz if foo .. bar # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#6883 +# source://prism//lib/prism/node.rb#6099 class Prism::FlipFlopNode < ::Prism::Node - # def initialize: (Integer flags, Prism::node? left, Prism::node? right, Location operator_loc, Location location) -> void + # Initialize a new FlipFlopNode node. # # @return [FlipFlopNode] a new instance of FlipFlopNode # - # source://prism//lib/prism/node.rb#6885 + # source://prism//lib/prism/node.rb#6101 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, left: T.nilable(Prism::Node), right: T.nilable(Prism::Node), - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).void end - def initialize(source, flags, left, right, operator_loc, location); end + def initialize(source, node_id, location, flags, left, right, operator_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#6992 + # source://prism//lib/prism/node.rb#6187 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6895 + # source://prism//lib/prism/node.rb#6112 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6900 + # source://prism//lib/prism/node.rb#6117 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6913 + # source://prism//lib/prism/node.rb#6130 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#6905 + # source://prism//lib/prism/node.rb#6122 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node?, ?right: Prism::node?, ?operator_loc: Location) -> FlipFlopNode # - # source://prism//lib/prism/node.rb#6918 + # source://prism//lib/prism/node.rb#6135 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, left: T.nilable(Prism::Node), right: T.nilable(Prism::Node), - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: 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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6900 + # source://prism//lib/prism/node.rb#6117 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, left: Prism::node?, right: Prism::node?, operator_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node?, right: Prism::node?, operator_loc: Location } # - # source://prism//lib/prism/node.rb#6926 + # source://prism//lib/prism/node.rb#6143 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -13674,7 +14875,7 @@ class Prism::FlipFlopNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#6948 + # source://prism//lib/prism/node.rb#6148 sig { returns(T::Boolean) } def exclude_end?; end @@ -13683,70 +14884,44 @@ class Prism::FlipFlopNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#6958 + # source://prism//lib/prism/node.rb#6171 sig { override.returns(String) } def inspect; end # attr_reader left: Prism::node? # - # source://prism//lib/prism/node.rb#6935 + # source://prism//lib/prism/node.rb#6153 sig { returns(T.nilable(Prism::Node)) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#6953 + # source://prism//lib/prism/node.rb#6166 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#6941 + # source://prism//lib/prism/node.rb#6159 sig { returns(Prism::Location) } def operator_loc; end # attr_reader right: Prism::node? # - # source://prism//lib/prism/node.rb#6938 + # source://prism//lib/prism/node.rb#6156 sig { returns(T.nilable(Prism::Node)) } def right; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#6976 + # source://prism//lib/prism/node.rb#6176 sig { override.returns(Symbol) } def type; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#6931 - 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6986 + # source://prism//lib/prism/node.rb#6181 def type; end end end @@ -13756,62 +14931,62 @@ end # 1.0 # ^^^ # -# source://prism//lib/prism/node.rb#7005 +# source://prism//lib/prism/node.rb#6200 class Prism::FloatNode < ::Prism::Node - # def initialize: (Float value, Location location) -> void + # Initialize a new FloatNode node. # # @return [FloatNode] a new instance of FloatNode # - # source://prism//lib/prism/node.rb#7007 - sig { params(source: Prism::Source, value: Float, location: Prism::Location).void } - def initialize(source, value, location); end + # source://prism//lib/prism/node.rb#6202 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, value: Float).void } + def initialize(source, node_id, location, flags, value); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#7084 + # source://prism//lib/prism/node.rb#6263 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7014 + # source://prism//lib/prism/node.rb#6211 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7019 + # source://prism//lib/prism/node.rb#6216 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7029 + # source://prism//lib/prism/node.rb#6226 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7024 + # source://prism//lib/prism/node.rb#6221 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?value: Float, ?location: Location) -> FloatNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Float) -> FloatNode # - # source://prism//lib/prism/node.rb#7034 - sig { params(value: Float, location: Prism::Location).returns(Prism::FloatNode) } - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#6231 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer, value: Float).returns(Prism::FloatNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7019 + # source://prism//lib/prism/node.rb#6216 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { value: Float, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Float } # - # source://prism//lib/prism/node.rb#7042 + # source://prism//lib/prism/node.rb#6239 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -13820,44 +14995,26 @@ class Prism::FloatNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#7050 + # source://prism//lib/prism/node.rb#6247 sig { override.returns(String) } def inspect; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#7068 + # source://prism//lib/prism/node.rb#6252 sig { override.returns(Symbol) } def type; end # The value of the floating point number as a Float. # - # source://prism//lib/prism/node.rb#7047 + # source://prism//lib/prism/node.rb#6244 sig { returns(Float) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#7078 + # source://prism//lib/prism/node.rb#6257 def type; end end end @@ -13867,43 +15024,45 @@ end # for i in a end # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#7094 +# source://prism//lib/prism/node.rb#6273 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 + # Initialize a new ForNode node. # # @return [ForNode] a new instance of ForNode # - # source://prism//lib/prism/node.rb#7096 + # source://prism//lib/prism/node.rb#6275 sig do params( source: Prism::Source, - index: Prism::Node, + node_id: Integer, + location: Prism::Location, + flags: Integer, + index: T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode), collection: Prism::Node, statements: T.nilable(Prism::StatementsNode), for_keyword_loc: Prism::Location, in_keyword_loc: Prism::Location, do_keyword_loc: T.nilable(Prism::Location), - end_keyword_loc: Prism::Location, - location: Prism::Location + end_keyword_loc: 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 initialize(source, node_id, location, flags, index, collection, statements, for_keyword_loc, in_keyword_loc, do_keyword_loc, end_keyword_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#7266 + # source://prism//lib/prism/node.rb#6429 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7109 + # source://prism//lib/prism/node.rb#6290 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7114 + # source://prism//lib/prism/node.rb#6295 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end @@ -13912,55 +15071,57 @@ class Prism::ForNode < ::Prism::Node # for i in a end # ^ # - # source://prism//lib/prism/node.rb#7155 + # source://prism//lib/prism/node.rb#6336 sig { returns(Prism::Node) } def collection; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7128 + # source://prism//lib/prism/node.rb#6309 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7119 + # source://prism//lib/prism/node.rb#6300 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?index: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode, ?collection: Prism::node, ?statements: StatementsNode?, ?for_keyword_loc: Location, ?in_keyword_loc: Location, ?do_keyword_loc: Location?, ?end_keyword_loc: Location) -> ForNode # - # source://prism//lib/prism/node.rb#7133 + # source://prism//lib/prism/node.rb#6314 sig do params( - index: Prism::Node, + node_id: Integer, + location: Prism::Location, + flags: Integer, + index: T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode), collection: Prism::Node, statements: T.nilable(Prism::StatementsNode), for_keyword_loc: Prism::Location, in_keyword_loc: Prism::Location, do_keyword_loc: T.nilable(Prism::Location), - end_keyword_loc: Prism::Location, - location: Prism::Location + end_keyword_loc: 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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), index: T.unsafe(nil), collection: T.unsafe(nil), statements: T.unsafe(nil), for_keyword_loc: T.unsafe(nil), in_keyword_loc: T.unsafe(nil), do_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7114 + # source://prism//lib/prism/node.rb#6295 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { 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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, index: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode, collection: Prism::node, statements: StatementsNode?, for_keyword_loc: Location, in_keyword_loc: Location, do_keyword_loc: Location?, end_keyword_loc: Location } # - # source://prism//lib/prism/node.rb#7141 + # source://prism//lib/prism/node.rb#6322 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def do_keyword: () -> String? # - # source://prism//lib/prism/node.rb#7222 + # source://prism//lib/prism/node.rb#6403 sig { returns(T.nilable(String)) } def do_keyword; end @@ -13969,13 +15130,13 @@ class Prism::ForNode < ::Prism::Node # for i in a do end # ^^ # - # source://prism//lib/prism/node.rb#7189 + # source://prism//lib/prism/node.rb#6370 sig { returns(T.nilable(Prism::Location)) } def do_keyword_loc; end # def end_keyword: () -> String # - # source://prism//lib/prism/node.rb#7227 + # source://prism//lib/prism/node.rb#6408 sig { returns(String) } def end_keyword; end @@ -13984,7 +15145,7 @@ class Prism::ForNode < ::Prism::Node # for i in a end # ^^^ # - # source://prism//lib/prism/node.rb#7205 + # source://prism//lib/prism/node.rb#6386 sig { returns(Prism::Location) } def end_keyword_loc; end @@ -13993,7 +15154,7 @@ class Prism::ForNode < ::Prism::Node # def for_keyword: () -> String # - # source://prism//lib/prism/node.rb#7212 + # source://prism//lib/prism/node.rb#6393 sig { returns(String) } def for_keyword; end @@ -14002,13 +15163,13 @@ class Prism::ForNode < ::Prism::Node # for i in a end # ^^^ # - # source://prism//lib/prism/node.rb#7169 + # source://prism//lib/prism/node.rb#6350 sig { returns(Prism::Location) } def for_keyword_loc; end # def in_keyword: () -> String # - # source://prism//lib/prism/node.rb#7217 + # source://prism//lib/prism/node.rb#6398 sig { returns(String) } def in_keyword; end @@ -14017,7 +15178,7 @@ class Prism::ForNode < ::Prism::Node # for i in a end # ^^ # - # source://prism//lib/prism/node.rb#7179 + # source://prism//lib/prism/node.rb#6360 sig { returns(Prism::Location) } def in_keyword_loc; end @@ -14026,13 +15187,15 @@ class Prism::ForNode < ::Prism::Node # for i in a end # ^ # - # source://prism//lib/prism/node.rb#7149 - sig { returns(Prism::Node) } + # source://prism//lib/prism/node.rb#6330 + sig do + returns(T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode)) + end def index; end # def inspect -> String # - # source://prism//lib/prism/node.rb#7232 + # source://prism//lib/prism/node.rb#6413 sig { override.returns(String) } def inspect; end @@ -14043,38 +15206,20 @@ class Prism::ForNode < ::Prism::Node # ^^^^^^ # end # - # source://prism//lib/prism/node.rb#7163 + # source://prism//lib/prism/node.rb#6344 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7250 + # source://prism//lib/prism/node.rb#6418 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#7260 + # source://prism//lib/prism/node.rb#6423 def type; end end end @@ -14086,62 +15231,62 @@ end # ^^^ # end # -# source://prism//lib/prism/node.rb#7284 +# source://prism//lib/prism/node.rb#6447 class Prism::ForwardingArgumentsNode < ::Prism::Node - # def initialize: (Location location) -> void + # Initialize a new ForwardingArgumentsNode node. # # @return [ForwardingArgumentsNode] a new instance of ForwardingArgumentsNode # - # source://prism//lib/prism/node.rb#7286 - sig { params(source: Prism::Source, location: Prism::Location).void } - def initialize(source, location); end + # source://prism//lib/prism/node.rb#6449 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#7359 + # source://prism//lib/prism/node.rb#6506 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7292 + # source://prism//lib/prism/node.rb#6457 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7297 + # source://prism//lib/prism/node.rb#6462 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7307 + # source://prism//lib/prism/node.rb#6472 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7302 + # source://prism//lib/prism/node.rb#6467 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?location: Location) -> ForwardingArgumentsNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ForwardingArgumentsNode # - # source://prism//lib/prism/node.rb#7312 - sig { params(location: Prism::Location).returns(Prism::ForwardingArgumentsNode) } - def copy(location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#6477 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::ForwardingArgumentsNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7297 + # source://prism//lib/prism/node.rb#6462 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#7320 + # source://prism//lib/prism/node.rb#6485 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -14150,38 +15295,20 @@ class Prism::ForwardingArgumentsNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#7325 + # source://prism//lib/prism/node.rb#6490 sig { override.returns(String) } def inspect; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7343 + # source://prism//lib/prism/node.rb#6495 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#7353 + # source://prism//lib/prism/node.rb#6500 def type; end end end @@ -14192,62 +15319,62 @@ end # ^^^ # end # -# source://prism//lib/prism/node.rb#7369 +# source://prism//lib/prism/node.rb#6516 class Prism::ForwardingParameterNode < ::Prism::Node - # def initialize: (Location location) -> void + # Initialize a new ForwardingParameterNode node. # # @return [ForwardingParameterNode] a new instance of ForwardingParameterNode # - # source://prism//lib/prism/node.rb#7371 - sig { params(source: Prism::Source, location: Prism::Location).void } - def initialize(source, location); end + # source://prism//lib/prism/node.rb#6518 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#7444 + # source://prism//lib/prism/node.rb#6575 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7377 + # source://prism//lib/prism/node.rb#6526 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7382 + # source://prism//lib/prism/node.rb#6531 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7392 + # source://prism//lib/prism/node.rb#6541 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7387 + # source://prism//lib/prism/node.rb#6536 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?location: Location) -> ForwardingParameterNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ForwardingParameterNode # - # source://prism//lib/prism/node.rb#7397 - sig { params(location: Prism::Location).returns(Prism::ForwardingParameterNode) } - def copy(location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#6546 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::ForwardingParameterNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7382 + # source://prism//lib/prism/node.rb#6531 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#7405 + # source://prism//lib/prism/node.rb#6554 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -14256,38 +15383,20 @@ class Prism::ForwardingParameterNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#7410 + # source://prism//lib/prism/node.rb#6559 sig { override.returns(String) } def inspect; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7428 + # source://prism//lib/prism/node.rb#6564 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#7438 + # source://prism//lib/prism/node.rb#6569 def type; end end end @@ -14297,68 +15406,83 @@ end # super # ^^^^^ # -# source://prism//lib/prism/node.rb#7453 +# source://prism//lib/prism/node.rb#6584 class Prism::ForwardingSuperNode < ::Prism::Node - # def initialize: (BlockNode? block, Location location) -> void + # Initialize a new ForwardingSuperNode node. # # @return [ForwardingSuperNode] a new instance of ForwardingSuperNode # - # source://prism//lib/prism/node.rb#7455 - sig { params(source: Prism::Source, block: T.nilable(Prism::BlockNode), location: Prism::Location).void } - def initialize(source, block, location); end + # source://prism//lib/prism/node.rb#6586 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + block: T.nilable(Prism::BlockNode) + ).void + end + def initialize(source, node_id, location, flags, block); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#7534 + # source://prism//lib/prism/node.rb#6649 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7462 + # source://prism//lib/prism/node.rb#6595 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader block: BlockNode? # - # source://prism//lib/prism/node.rb#7497 + # source://prism//lib/prism/node.rb#6630 sig { returns(T.nilable(Prism::BlockNode)) } def block; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7467 + # source://prism//lib/prism/node.rb#6600 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7479 + # source://prism//lib/prism/node.rb#6612 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7472 + # source://prism//lib/prism/node.rb#6605 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?block: BlockNode?, ?location: Location) -> ForwardingSuperNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?block: BlockNode?) -> ForwardingSuperNode # - # source://prism//lib/prism/node.rb#7484 - sig { params(block: T.nilable(Prism::BlockNode), location: Prism::Location).returns(Prism::ForwardingSuperNode) } - def copy(block: T.unsafe(nil), location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#6617 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + block: T.nilable(Prism::BlockNode) + ).returns(Prism::ForwardingSuperNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), block: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7467 + # source://prism//lib/prism/node.rb#6600 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { block: BlockNode?, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, block: BlockNode? } # - # source://prism//lib/prism/node.rb#7492 + # source://prism//lib/prism/node.rb#6625 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -14367,38 +15491,20 @@ class Prism::ForwardingSuperNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#7500 + # source://prism//lib/prism/node.rb#6633 sig { override.returns(String) } def inspect; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#7518 + # source://prism//lib/prism/node.rb#6638 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7528 + # source://prism//lib/prism/node.rb#6643 def type; end end end @@ -14408,83 +15514,87 @@ end # $target &&= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#7544 +# source://prism//lib/prism/node.rb#6659 class Prism::GlobalVariableAndWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void + # Initialize a new GlobalVariableAndWriteNode node. # # @return [GlobalVariableAndWriteNode] a new instance of GlobalVariableAndWriteNode # - # source://prism//lib/prism/node.rb#7546 + # source://prism//lib/prism/node.rb#6661 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, name, name_loc, operator_loc, value, location); end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#7648 + # source://prism//lib/prism/node.rb#6747 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7556 + # source://prism//lib/prism/node.rb#6673 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7561 + # source://prism//lib/prism/node.rb#6678 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7571 + # source://prism//lib/prism/node.rb#6688 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7566 + # source://prism//lib/prism/node.rb#6683 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> GlobalVariableAndWriteNode # - # source://prism//lib/prism/node.rb#7576 + # source://prism//lib/prism/node.rb#6693 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7561 + # source://prism//lib/prism/node.rb#6678 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#7584 + # source://prism//lib/prism/node.rb#6701 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # source://prism//lib/prism/desugar_compiler.rb#163 + # source://prism//lib/prism/desugar_compiler.rb#200 def desugar; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -14492,68 +15602,50 @@ class Prism::GlobalVariableAndWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#7614 + # source://prism//lib/prism/node.rb#6731 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#7589 + # source://prism//lib/prism/node.rb#6706 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#7592 + # source://prism//lib/prism/node.rb#6709 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#7609 + # source://prism//lib/prism/node.rb#6726 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#7599 + # source://prism//lib/prism/node.rb#6716 sig { returns(Prism::Location) } def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#7632 + # source://prism//lib/prism/node.rb#6736 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#7606 + # source://prism//lib/prism/node.rb#6723 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#7642 + # source://prism//lib/prism/node.rb#6741 def type; end end end @@ -14563,97 +15655,101 @@ end # $target += value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#7661 +# source://prism//lib/prism/node.rb#6760 class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location binary_operator_loc, Prism::node value, Symbol binary_operator, Location location) -> void + # Initialize a new GlobalVariableOperatorWriteNode node. # # @return [GlobalVariableOperatorWriteNode] a new instance of GlobalVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#7663 + # source://prism//lib/prism/node.rb#6762 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, binary_operator_loc: Prism::Location, value: Prism::Node, - binary_operator: Symbol, - location: Prism::Location + binary_operator: Symbol ).void end - def initialize(source, name, name_loc, binary_operator_loc, value, binary_operator, location); end + def initialize(source, node_id, location, flags, name, name_loc, binary_operator_loc, value, binary_operator); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#7764 + # source://prism//lib/prism/node.rb#6847 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7674 + # source://prism//lib/prism/node.rb#6775 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader binary_operator: Symbol # - # source://prism//lib/prism/node.rb#7727 + # source://prism//lib/prism/node.rb#6828 sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # - # source://prism//lib/prism/node.rb#7717 + # source://prism//lib/prism/node.rb#6818 sig { returns(Prism::Location) } def binary_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7679 + # source://prism//lib/prism/node.rb#6780 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7689 + # source://prism//lib/prism/node.rb#6790 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7684 + # source://prism//lib/prism/node.rb#6785 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol, ?location: Location) -> GlobalVariableOperatorWriteNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> GlobalVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#7694 + # source://prism//lib/prism/node.rb#6795 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, binary_operator_loc: Prism::Location, value: Prism::Node, - binary_operator: Symbol, - location: Prism::Location + binary_operator: Symbol ).returns(Prism::GlobalVariableOperatorWriteNode) end - def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7679 + # source://prism//lib/prism/node.rb#6780 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } # - # source://prism//lib/prism/node.rb#7702 + # source://prism//lib/prism/node.rb#6803 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # source://prism//lib/prism/desugar_compiler.rb#175 + # source://prism//lib/prism/desugar_compiler.rb#212 def desugar; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -14661,68 +15757,50 @@ class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#7730 + # source://prism//lib/prism/node.rb#6831 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#7707 + # source://prism//lib/prism/node.rb#6808 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#7710 + # source://prism//lib/prism/node.rb#6811 sig { returns(Prism::Location) } def name_loc; end # Returns the binary operator used to modify the receiver. This method is # deprecated in favor of #binary_operator. # - # source://prism//lib/prism/node_ext.rb#387 + # source://prism//lib/prism/node_ext.rb#403 def operator; end # Returns the location of the binary operator used to modify the receiver. # This method is deprecated in favor of #binary_operator_loc. # - # source://prism//lib/prism/node_ext.rb#394 + # source://prism//lib/prism/node_ext.rb#410 def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#7748 + # source://prism//lib/prism/node.rb#6836 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#7724 + # source://prism//lib/prism/node.rb#6825 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7758 + # source://prism//lib/prism/node.rb#6841 def type; end end end @@ -14732,83 +15810,87 @@ end # $target ||= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#7778 +# source://prism//lib/prism/node.rb#6861 class Prism::GlobalVariableOrWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void + # Initialize a new GlobalVariableOrWriteNode node. # # @return [GlobalVariableOrWriteNode] a new instance of GlobalVariableOrWriteNode # - # source://prism//lib/prism/node.rb#7780 + # source://prism//lib/prism/node.rb#6863 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, name, name_loc, operator_loc, value, location); end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#7882 + # source://prism//lib/prism/node.rb#6949 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7790 + # source://prism//lib/prism/node.rb#6875 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7795 + # source://prism//lib/prism/node.rb#6880 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7805 + # source://prism//lib/prism/node.rb#6890 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7800 + # source://prism//lib/prism/node.rb#6885 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> GlobalVariableOrWriteNode # - # source://prism//lib/prism/node.rb#7810 + # source://prism//lib/prism/node.rb#6895 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7795 + # source://prism//lib/prism/node.rb#6880 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#7818 + # source://prism//lib/prism/node.rb#6903 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # source://prism//lib/prism/desugar_compiler.rb#169 + # source://prism//lib/prism/desugar_compiler.rb#206 def desugar; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -14816,68 +15898,50 @@ class Prism::GlobalVariableOrWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#7848 + # source://prism//lib/prism/node.rb#6933 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#7823 + # source://prism//lib/prism/node.rb#6908 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#7826 + # source://prism//lib/prism/node.rb#6911 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#7843 + # source://prism//lib/prism/node.rb#6928 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#7833 + # source://prism//lib/prism/node.rb#6918 sig { returns(Prism::Location) } def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7866 + # source://prism//lib/prism/node.rb#6938 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#7840 + # source://prism//lib/prism/node.rb#6925 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7876 + # source://prism//lib/prism/node.rb#6943 def type; end end end @@ -14887,62 +15951,69 @@ end # $foo # ^^^^ # -# source://prism//lib/prism/node.rb#7895 +# source://prism//lib/prism/node.rb#6962 class Prism::GlobalVariableReadNode < ::Prism::Node - # def initialize: (Symbol name, Location location) -> void + # Initialize a new GlobalVariableReadNode node. # # @return [GlobalVariableReadNode] a new instance of GlobalVariableReadNode # - # source://prism//lib/prism/node.rb#7897 - sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } - def initialize(source, name, location); end + # source://prism//lib/prism/node.rb#6964 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } + def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#7978 + # source://prism//lib/prism/node.rb#7029 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7904 + # source://prism//lib/prism/node.rb#6973 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7909 + # source://prism//lib/prism/node.rb#6978 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7919 + # source://prism//lib/prism/node.rb#6988 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#7914 + # source://prism//lib/prism/node.rb#6983 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?location: Location) -> GlobalVariableReadNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> GlobalVariableReadNode # - # source://prism//lib/prism/node.rb#7924 - sig { params(name: Symbol, location: Prism::Location).returns(Prism::GlobalVariableReadNode) } - def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#6993 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::GlobalVariableReadNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7909 + # source://prism//lib/prism/node.rb#6978 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#7932 + # source://prism//lib/prism/node.rb#7001 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -14951,7 +16022,7 @@ class Prism::GlobalVariableReadNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#7944 + # source://prism//lib/prism/node.rb#7013 sig { override.returns(String) } def inspect; end @@ -14961,38 +16032,20 @@ class Prism::GlobalVariableReadNode < ::Prism::Node # # $_Test # name `:$_Test` # - # source://prism//lib/prism/node.rb#7941 + # source://prism//lib/prism/node.rb#7010 sig { returns(Symbol) } def name; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#7962 + # source://prism//lib/prism/node.rb#7018 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7972 + # source://prism//lib/prism/node.rb#7023 def type; end end end @@ -15002,62 +16055,69 @@ end # $foo, $bar = baz # ^^^^ ^^^^ # -# source://prism//lib/prism/node.rb#7988 +# source://prism//lib/prism/node.rb#7039 class Prism::GlobalVariableTargetNode < ::Prism::Node - # def initialize: (Symbol name, Location location) -> void + # Initialize a new GlobalVariableTargetNode node. # # @return [GlobalVariableTargetNode] a new instance of GlobalVariableTargetNode # - # source://prism//lib/prism/node.rb#7990 - sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } - def initialize(source, name, location); end + # source://prism//lib/prism/node.rb#7041 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } + def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#8067 + # source://prism//lib/prism/node.rb#7102 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7997 + # source://prism//lib/prism/node.rb#7050 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8002 + # source://prism//lib/prism/node.rb#7055 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8012 + # source://prism//lib/prism/node.rb#7065 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8007 + # source://prism//lib/prism/node.rb#7060 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?location: Location) -> GlobalVariableTargetNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> GlobalVariableTargetNode # - # source://prism//lib/prism/node.rb#8017 - sig { params(name: Symbol, location: Prism::Location).returns(Prism::GlobalVariableTargetNode) } - def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#7070 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::GlobalVariableTargetNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8002 + # source://prism//lib/prism/node.rb#7055 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#8025 + # source://prism//lib/prism/node.rb#7078 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -15066,44 +16126,26 @@ class Prism::GlobalVariableTargetNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#8033 + # source://prism//lib/prism/node.rb#7086 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#8030 + # source://prism//lib/prism/node.rb#7083 sig { returns(Symbol) } def name; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#8051 + # source://prism//lib/prism/node.rb#7091 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#8061 + # source://prism//lib/prism/node.rb#7096 def type; end end end @@ -15113,79 +16155,83 @@ end # $foo = 1 # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#8077 +# source://prism//lib/prism/node.rb#7112 class Prism::GlobalVariableWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Prism::node value, Location operator_loc, Location location) -> void + # Initialize a new GlobalVariableWriteNode node. # # @return [GlobalVariableWriteNode] a new instance of GlobalVariableWriteNode # - # source://prism//lib/prism/node.rb#8079 + # source://prism//lib/prism/node.rb#7114 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, value: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).void end - def initialize(source, name, name_loc, value, operator_loc, location); end + def initialize(source, node_id, location, flags, name, name_loc, value, operator_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#8197 + # source://prism//lib/prism/node.rb#7216 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8089 + # source://prism//lib/prism/node.rb#7126 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8094 + # source://prism//lib/prism/node.rb#7131 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8104 + # source://prism//lib/prism/node.rb#7141 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8099 + # source://prism//lib/prism/node.rb#7136 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> GlobalVariableWriteNode # - # source://prism//lib/prism/node.rb#8109 + # source://prism//lib/prism/node.rb#7146 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, value: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: 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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8094 + # source://prism//lib/prism/node.rb#7131 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location } # - # source://prism//lib/prism/node.rb#8117 + # source://prism//lib/prism/node.rb#7154 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -15194,7 +16240,7 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#8163 + # source://prism//lib/prism/node.rb#7200 sig { override.returns(String) } def inspect; end @@ -15204,7 +16250,7 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # # $_Test = 123 # name `:$_Test` # - # source://prism//lib/prism/node.rb#8126 + # source://prism//lib/prism/node.rb#7163 sig { returns(Symbol) } def name; end @@ -15213,13 +16259,13 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # $foo = :bar # ^^^^ # - # source://prism//lib/prism/node.rb#8132 + # source://prism//lib/prism/node.rb#7169 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#8158 + # source://prism//lib/prism/node.rb#7195 sig { returns(String) } def operator; end @@ -15228,26 +16274,13 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # $foo = :bar # ^ # - # source://prism//lib/prism/node.rb#8151 + # source://prism//lib/prism/node.rb#7188 sig { returns(Prism::Location) } def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#8181 + # source://prism//lib/prism/node.rb#7205 sig { override.returns(Symbol) } def type; end @@ -15259,19 +16292,14 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # $-xyz = 123 # ^^^ # - # source://prism//lib/prism/node.rb#8145 + # source://prism//lib/prism/node.rb#7182 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#8191 + # source://prism//lib/prism/node.rb#7210 def type; end end end @@ -15281,45 +16309,47 @@ end # { a => b } # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#8210 +# source://prism//lib/prism/node.rb#7229 class Prism::HashNode < ::Prism::Node - # def initialize: (Location opening_loc, Array[AssocNode | AssocSplatNode] elements, Location closing_loc, Location location) -> void + # Initialize a new HashNode node. # # @return [HashNode] a new instance of HashNode # - # source://prism//lib/prism/node.rb#8212 + # source://prism//lib/prism/node.rb#7231 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, opening_loc: Prism::Location, elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)], - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: Prism::Location ).void end - def initialize(source, opening_loc, elements, closing_loc, location); end + def initialize(source, node_id, location, flags, opening_loc, elements, closing_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#8327 + # source://prism//lib/prism/node.rb#7330 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8221 + # source://prism//lib/prism/node.rb#7242 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8226 + # source://prism//lib/prism/node.rb#7247 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#8288 + # source://prism//lib/prism/node.rb#7309 sig { returns(String) } def closing; end @@ -15328,45 +16358,47 @@ class Prism::HashNode < ::Prism::Node # { a => b } # ^ # - # source://prism//lib/prism/node.rb#8276 + # source://prism//lib/prism/node.rb#7297 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8236 + # source://prism//lib/prism/node.rb#7257 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8231 + # source://prism//lib/prism/node.rb#7252 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?elements: Array[AssocNode | AssocSplatNode], ?closing_loc: Location) -> HashNode # - # source://prism//lib/prism/node.rb#8241 + # source://prism//lib/prism/node.rb#7262 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, opening_loc: Prism::Location, elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)], - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: 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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), elements: T.unsafe(nil), closing_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8226 + # source://prism//lib/prism/node.rb#7247 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location, elements: Array[AssocNode | AssocSplatNode], closing_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, elements: Array[AssocNode | AssocSplatNode], closing_loc: Location } # - # source://prism//lib/prism/node.rb#8249 + # source://prism//lib/prism/node.rb#7270 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -15378,7 +16410,7 @@ class Prism::HashNode < ::Prism::Node # { **foo } # ^^^^^ # - # source://prism//lib/prism/node.rb#8270 + # source://prism//lib/prism/node.rb#7291 sig { returns(T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)]) } def elements; end @@ -15387,13 +16419,13 @@ class Prism::HashNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#8293 + # source://prism//lib/prism/node.rb#7314 sig { override.returns(String) } def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#8283 + # source://prism//lib/prism/node.rb#7304 sig { returns(String) } def opening; end @@ -15402,38 +16434,20 @@ class Prism::HashNode < ::Prism::Node # { a => b } # ^ # - # source://prism//lib/prism/node.rb#8257 + # source://prism//lib/prism/node.rb#7278 sig { returns(Prism::Location) } def opening_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#8311 + # source://prism//lib/prism/node.rb#7319 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#8321 + # source://prism//lib/prism/node.rb#7324 def type; end end end @@ -15446,105 +16460,109 @@ end # foo => { a: 1, b: 2, **c } # ^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#8343 +# source://prism//lib/prism/node.rb#7346 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 + # Initialize a new HashPatternNode node. # # @return [HashPatternNode] a new instance of HashPatternNode # - # source://prism//lib/prism/node.rb#8345 + # source://prism//lib/prism/node.rb#7348 sig do params( source: Prism::Source, - constant: T.nilable(Prism::Node), + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), elements: T::Array[Prism::AssocNode], rest: T.nilable(T.any(Prism::AssocSplatNode, Prism::NoKeywordsParameterNode)), opening_loc: T.nilable(Prism::Location), - closing_loc: T.nilable(Prism::Location), - location: Prism::Location + closing_loc: T.nilable(Prism::Location) ).void end - def initialize(source, constant, elements, rest, opening_loc, closing_loc, location); end + def initialize(source, node_id, location, flags, constant, elements, rest, opening_loc, closing_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#8472 + # source://prism//lib/prism/node.rb#7459 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8356 + # source://prism//lib/prism/node.rb#7361 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8361 + # source://prism//lib/prism/node.rb#7366 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#8433 + # source://prism//lib/prism/node.rb#7438 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#8415 + # source://prism//lib/prism/node.rb#7420 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8375 + # source://prism//lib/prism/node.rb#7380 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8366 + # source://prism//lib/prism/node.rb#7371 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # attr_reader constant: Prism::node? + # attr_reader constant: ConstantReadNode | ConstantPathNode | nil # - # source://prism//lib/prism/node.rb#8393 - sig { returns(T.nilable(Prism::Node)) } + # source://prism//lib/prism/node.rb#7398 + sig { returns(T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode))) } def constant; end - # def copy: (?constant: Prism::node?, ?elements: Array[AssocNode], ?rest: AssocSplatNode | NoKeywordsParameterNode | nil, ?opening_loc: Location?, ?closing_loc: Location?, ?location: Location) -> HashPatternNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant: ConstantReadNode | ConstantPathNode | nil, ?elements: Array[AssocNode], ?rest: AssocSplatNode | NoKeywordsParameterNode | nil, ?opening_loc: Location?, ?closing_loc: Location?) -> HashPatternNode # - # source://prism//lib/prism/node.rb#8380 + # source://prism//lib/prism/node.rb#7385 sig do params( - constant: T.nilable(Prism::Node), + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), elements: T::Array[Prism::AssocNode], rest: T.nilable(T.any(Prism::AssocSplatNode, Prism::NoKeywordsParameterNode)), opening_loc: T.nilable(Prism::Location), - closing_loc: T.nilable(Prism::Location), - location: Prism::Location + closing_loc: T.nilable(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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), constant: T.unsafe(nil), elements: T.unsafe(nil), rest: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8361 + # source://prism//lib/prism/node.rb#7366 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { constant: Prism::node?, elements: Array[AssocNode], rest: AssocSplatNode | NoKeywordsParameterNode | nil, opening_loc: Location?, closing_loc: Location?, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant: ConstantReadNode | ConstantPathNode | nil, elements: Array[AssocNode], rest: AssocSplatNode | NoKeywordsParameterNode | nil, opening_loc: Location?, closing_loc: Location? } # - # source://prism//lib/prism/node.rb#8388 + # source://prism//lib/prism/node.rb#7393 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader elements: Array[AssocNode] # - # source://prism//lib/prism/node.rb#8396 + # source://prism//lib/prism/node.rb#7401 sig { returns(T::Array[Prism::AssocNode]) } def elements; end @@ -15553,67 +16571,49 @@ class Prism::HashPatternNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#8438 + # source://prism//lib/prism/node.rb#7443 sig { override.returns(String) } def inspect; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#8428 + # source://prism//lib/prism/node.rb#7433 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#8402 + # source://prism//lib/prism/node.rb#7407 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader rest: AssocSplatNode | NoKeywordsParameterNode | nil # - # source://prism//lib/prism/node.rb#8399 + # source://prism//lib/prism/node.rb#7404 sig { returns(T.nilable(T.any(Prism::AssocSplatNode, Prism::NoKeywordsParameterNode))) } def rest; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#8456 + # source://prism//lib/prism/node.rb#7448 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#8466 + # source://prism//lib/prism/node.rb#7453 def type; end end end -# source://prism//lib/prism/node_ext.rb#49 +# source://prism//lib/prism/node_ext.rb#52 module Prism::HeredocQuery # Returns true if this node was represented as a heredoc in the source code. # # @return [Boolean] # - # source://prism//lib/prism/node_ext.rb#51 + # source://prism//lib/prism/node_ext.rb#54 def heredoc?; end end @@ -15628,107 +16628,99 @@ end # foo ? bar : baz # ^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#8493 +# source://prism//lib/prism/node.rb#7480 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 + # Initialize a new IfNode node. # # @return [IfNode] a new instance of IfNode # - # source://prism//lib/prism/node.rb#8495 + # source://prism//lib/prism/node.rb#7482 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, if_keyword_loc: T.nilable(Prism::Location), predicate: Prism::Node, then_keyword_loc: T.nilable(Prism::Location), statements: T.nilable(Prism::StatementsNode), - consequent: T.nilable(Prism::Node), - end_keyword_loc: T.nilable(Prism::Location), - location: Prism::Location + subsequent: T.nilable(T.any(Prism::ElseNode, Prism::IfNode)), + end_keyword_loc: T.nilable(Prism::Location) ).void end - def initialize(source, if_keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, location); end + def initialize(source, node_id, location, flags, if_keyword_loc, predicate, then_keyword_loc, statements, subsequent, end_keyword_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#8687 + # source://prism//lib/prism/node.rb#7658 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8507 + # source://prism//lib/prism/node.rb#7496 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8512 + # source://prism//lib/prism/node.rb#7501 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8526 + # source://prism//lib/prism/node.rb#7515 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8517 + # source://prism//lib/prism/node.rb#7506 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # Represents an `ElseNode` or an `IfNode` when there is an `else` or an `elsif` in the `if` statement. - # - # if foo - # bar - # elsif baz - # ^^^^^^^^^ - # qux - # ^^^ - # end - # ^^^ + # Returns the subsequent if/elsif/else clause of the if node. This method is + # deprecated in favor of #subsequent. # - # if foo then bar else baz end - # ^^^^^^^^^^^^ - # - # source://prism//lib/prism/node.rb#8617 - sig { returns(T.nilable(Prism::Node)) } + # source://prism//lib/prism/node_ext.rb#485 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?if_keyword_loc: Location?, ?predicate: Prism::node, ?then_keyword_loc: Location?, ?statements: StatementsNode?, ?subsequent: ElseNode | IfNode | nil, ?end_keyword_loc: Location?) -> IfNode # - # source://prism//lib/prism/node.rb#8531 + # source://prism//lib/prism/node.rb#7520 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, if_keyword_loc: T.nilable(Prism::Location), predicate: Prism::Node, then_keyword_loc: T.nilable(Prism::Location), statements: T.nilable(Prism::StatementsNode), - consequent: T.nilable(Prism::Node), - end_keyword_loc: T.nilable(Prism::Location), - location: Prism::Location + subsequent: T.nilable(T.any(Prism::ElseNode, Prism::IfNode)), + end_keyword_loc: T.nilable(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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), if_keyword_loc: T.unsafe(nil), predicate: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), subsequent: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8512 + # source://prism//lib/prism/node.rb#7501 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { if_keyword_loc: Location?, predicate: Prism::node, then_keyword_loc: Location?, statements: StatementsNode?, consequent: Prism::node?, end_keyword_loc: Location?, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, if_keyword_loc: Location?, predicate: Prism::node, then_keyword_loc: Location?, statements: StatementsNode?, subsequent: ElseNode | IfNode | nil, end_keyword_loc: Location? } # - # source://prism//lib/prism/node.rb#8539 + # source://prism//lib/prism/node.rb#7528 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def end_keyword: () -> String? # - # source://prism//lib/prism/node.rb#8648 + # source://prism//lib/prism/node.rb#7637 sig { returns(T.nilable(String)) } def end_keyword; end @@ -15739,7 +16731,7 @@ class Prism::IfNode < ::Prism::Node # end # ^^^ # - # source://prism//lib/prism/node.rb#8625 + # source://prism//lib/prism/node.rb#7614 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end @@ -15748,7 +16740,7 @@ class Prism::IfNode < ::Prism::Node # def if_keyword: () -> String? # - # source://prism//lib/prism/node.rb#8638 + # source://prism//lib/prism/node.rb#7627 sig { returns(T.nilable(String)) } def if_keyword; end @@ -15759,18 +16751,18 @@ class Prism::IfNode < ::Prism::Node # # The `if_keyword_loc` field will be `nil` when the `IfNode` represents a ternary expression. # - # source://prism//lib/prism/node.rb#8549 + # source://prism//lib/prism/node.rb#7538 sig { returns(T.nilable(Prism::Location)) } def if_keyword_loc; end # def inspect -> String # - # source://prism//lib/prism/node.rb#8653 + # source://prism//lib/prism/node.rb#7642 sig { override.returns(String) } def inspect; end # source://prism//lib/prism/parse_result/newlines.rb#91 - def newline!(lines); end + def newline_flag!(lines); end # The node for the condition the `IfNode` is testing. # @@ -15785,7 +16777,7 @@ class Prism::IfNode < ::Prism::Node # foo ? bar : baz # ^^^ # - # source://prism//lib/prism/node.rb#8573 + # source://prism//lib/prism/node.rb#7562 sig { returns(Prism::Node) } def predicate; end @@ -15798,13 +16790,31 @@ class Prism::IfNode < ::Prism::Node # ^^^ # end # - # source://prism//lib/prism/node.rb#8602 + # source://prism//lib/prism/node.rb#7591 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end + # Represents an `ElseNode` or an `IfNode` when there is an `else` or an `elsif` in the `if` statement. + # + # if foo + # bar + # elsif baz + # ^^^^^^^^^ + # qux + # ^^^ + # end + # ^^^ + # + # if foo then bar else baz end + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/node.rb#7606 + sig { returns(T.nilable(T.any(Prism::ElseNode, Prism::IfNode))) } + def subsequent; end + # def then_keyword: () -> String? # - # source://prism//lib/prism/node.rb#8643 + # source://prism//lib/prism/node.rb#7632 sig { returns(T.nilable(String)) } def then_keyword; end @@ -15816,38 +16826,20 @@ class Prism::IfNode < ::Prism::Node # a ? b : c # ^ # - # source://prism//lib/prism/node.rb#8582 + # source://prism//lib/prism/node.rb#7571 sig { returns(T.nilable(Prism::Location)) } def then_keyword_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#8671 + # source://prism//lib/prism/node.rb#7647 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#8681 + # source://prism//lib/prism/node.rb#7652 def type; end end end @@ -15857,73 +16849,77 @@ end # 1.0i # ^^^^ # -# source://prism//lib/prism/node.rb#8702 +# source://prism//lib/prism/node.rb#7673 class Prism::ImaginaryNode < ::Prism::Node - # def initialize: (FloatNode | IntegerNode | RationalNode numeric, Location location) -> void + # Initialize a new ImaginaryNode node. # # @return [ImaginaryNode] a new instance of ImaginaryNode # - # source://prism//lib/prism/node.rb#8704 + # source://prism//lib/prism/node.rb#7675 sig do params( source: Prism::Source, - numeric: T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode), - location: Prism::Location + node_id: Integer, + location: Prism::Location, + flags: Integer, + numeric: T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode) ).void end - def initialize(source, numeric, location); end + def initialize(source, node_id, location, flags, numeric); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#8781 + # source://prism//lib/prism/node.rb#7736 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8711 + # source://prism//lib/prism/node.rb#7684 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8716 + # source://prism//lib/prism/node.rb#7689 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8726 + # source://prism//lib/prism/node.rb#7699 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8721 + # source://prism//lib/prism/node.rb#7694 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?numeric: FloatNode | IntegerNode | RationalNode, ?location: Location) -> ImaginaryNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?numeric: FloatNode | IntegerNode | RationalNode) -> ImaginaryNode # - # source://prism//lib/prism/node.rb#8731 + # source://prism//lib/prism/node.rb#7704 sig do params( - numeric: T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode), - location: Prism::Location + node_id: Integer, + location: Prism::Location, + flags: Integer, + numeric: T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode) ).returns(Prism::ImaginaryNode) end - def copy(numeric: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), numeric: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8716 + # source://prism//lib/prism/node.rb#7689 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { numeric: FloatNode | IntegerNode | RationalNode, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, numeric: FloatNode | IntegerNode | RationalNode } # - # source://prism//lib/prism/node.rb#8739 + # source://prism//lib/prism/node.rb#7712 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -15932,50 +16928,32 @@ class Prism::ImaginaryNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#8747 + # source://prism//lib/prism/node.rb#7720 sig { override.returns(String) } def inspect; end # attr_reader numeric: FloatNode | IntegerNode | RationalNode # - # source://prism//lib/prism/node.rb#8744 + # source://prism//lib/prism/node.rb#7717 sig { returns(T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode)) } def numeric; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#8765 + # source://prism//lib/prism/node.rb#7725 sig { override.returns(Symbol) } def type; end # Returns the value of the node as a Ruby Complex. # - # source://prism//lib/prism/node_ext.rb#101 + # source://prism//lib/prism/node_ext.rb#107 sig { returns(Complex) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#8775 + # source://prism//lib/prism/node.rb#7730 def type; end end end @@ -15991,62 +16969,77 @@ end # foo in { bar: } # ^^^^ # -# source://prism//lib/prism/node.rb#8797 +# source://prism//lib/prism/node.rb#7752 class Prism::ImplicitNode < ::Prism::Node - # def initialize: (Prism::node value, Location location) -> void + # Initialize a new ImplicitNode node. # # @return [ImplicitNode] a new instance of ImplicitNode # - # source://prism//lib/prism/node.rb#8799 - sig { params(source: Prism::Source, value: Prism::Node, location: Prism::Location).void } - def initialize(source, value, location); end + # source://prism//lib/prism/node.rb#7754 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: T.any(Prism::LocalVariableReadNode, Prism::CallNode, Prism::ConstantReadNode, Prism::LocalVariableTargetNode) + ).void + end + def initialize(source, node_id, location, flags, value); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#8876 + # source://prism//lib/prism/node.rb#7815 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8806 + # source://prism//lib/prism/node.rb#7763 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8811 + # source://prism//lib/prism/node.rb#7768 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8821 + # source://prism//lib/prism/node.rb#7778 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#8816 + # source://prism//lib/prism/node.rb#7773 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?value: Prism::node, ?location: Location) -> ImplicitNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: LocalVariableReadNode | CallNode | ConstantReadNode | LocalVariableTargetNode) -> ImplicitNode # - # source://prism//lib/prism/node.rb#8826 - sig { params(value: Prism::Node, location: Prism::Location).returns(Prism::ImplicitNode) } - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#7783 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: T.any(Prism::LocalVariableReadNode, Prism::CallNode, Prism::ConstantReadNode, Prism::LocalVariableTargetNode) + ).returns(Prism::ImplicitNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8811 + # source://prism//lib/prism/node.rb#7768 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::node, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: LocalVariableReadNode | CallNode | ConstantReadNode | LocalVariableTargetNode } # - # source://prism//lib/prism/node.rb#8834 + # source://prism//lib/prism/node.rb#7791 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -16055,44 +17048,28 @@ class Prism::ImplicitNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#8842 + # source://prism//lib/prism/node.rb#7799 sig { override.returns(String) } def inspect; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#8860 + # source://prism//lib/prism/node.rb#7804 sig { override.returns(Symbol) } def type; end - # attr_reader value: Prism::node + # attr_reader value: LocalVariableReadNode | CallNode | ConstantReadNode | LocalVariableTargetNode # - # source://prism//lib/prism/node.rb#8839 - sig { returns(Prism::Node) } + # source://prism//lib/prism/node.rb#7796 + sig do + returns(T.any(Prism::LocalVariableReadNode, Prism::CallNode, Prism::ConstantReadNode, Prism::LocalVariableTargetNode)) + end def value; end class << self - # 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#8870 + # source://prism//lib/prism/node.rb#7809 def type; end end end @@ -16111,62 +17088,62 @@ end # foo, = bar # ^ # -# source://prism//lib/prism/node.rb#8895 +# source://prism//lib/prism/node.rb#7834 class Prism::ImplicitRestNode < ::Prism::Node - # def initialize: (Location location) -> void + # Initialize a new ImplicitRestNode node. # # @return [ImplicitRestNode] a new instance of ImplicitRestNode # - # source://prism//lib/prism/node.rb#8897 - sig { params(source: Prism::Source, location: Prism::Location).void } - def initialize(source, location); end + # source://prism//lib/prism/node.rb#7836 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#8970 + # source://prism//lib/prism/node.rb#7893 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8903 + # 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#8908 + # 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#8918 + # 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#8913 + # source://prism//lib/prism/node.rb#7854 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?location: Location) -> ImplicitRestNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ImplicitRestNode # - # source://prism//lib/prism/node.rb#8923 - sig { params(location: Prism::Location).returns(Prism::ImplicitRestNode) } - def copy(location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#7864 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::ImplicitRestNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8908 + # 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) -> { location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#8931 + # 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 @@ -16175,38 +17152,20 @@ class Prism::ImplicitRestNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#8936 + # source://prism//lib/prism/node.rb#7877 sig { override.returns(String) } def inspect; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#8954 + # source://prism//lib/prism/node.rb#7882 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#8964 + # source://prism//lib/prism/node.rb#7887 def type; end end end @@ -16216,79 +17175,83 @@ end # case a; in b then c end # ^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#8979 +# source://prism//lib/prism/node.rb#7902 class Prism::InNode < ::Prism::Node - # def initialize: (Prism::node pattern, StatementsNode? statements, Location in_loc, Location? then_loc, Location location) -> void + # Initialize a new InNode node. # # @return [InNode] a new instance of InNode # - # source://prism//lib/prism/node.rb#8981 + # source://prism//lib/prism/node.rb#7904 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, pattern: Prism::Node, statements: T.nilable(Prism::StatementsNode), in_loc: Prism::Location, - then_loc: T.nilable(Prism::Location), - location: Prism::Location + then_loc: T.nilable(Prism::Location) ).void end - def initialize(source, pattern, statements, in_loc, then_loc, location); end + def initialize(source, node_id, location, flags, pattern, statements, in_loc, then_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#9097 + # source://prism//lib/prism/node.rb#8004 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8991 + # source://prism//lib/prism/node.rb#7916 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8996 + # source://prism//lib/prism/node.rb#7921 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9009 + # source://prism//lib/prism/node.rb#7934 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#9001 + # source://prism//lib/prism/node.rb#7926 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?pattern: Prism::node, ?statements: StatementsNode?, ?in_loc: Location, ?then_loc: Location?) -> InNode # - # source://prism//lib/prism/node.rb#9014 + # source://prism//lib/prism/node.rb#7939 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, pattern: Prism::Node, statements: T.nilable(Prism::StatementsNode), in_loc: Prism::Location, - then_loc: T.nilable(Prism::Location), - location: Prism::Location + then_loc: T.nilable(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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), pattern: T.unsafe(nil), statements: T.unsafe(nil), in_loc: T.unsafe(nil), then_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8996 + # source://prism//lib/prism/node.rb#7921 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { pattern: Prism::node, statements: StatementsNode?, in_loc: Location, then_loc: Location?, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, pattern: Prism::node, statements: StatementsNode?, in_loc: Location, then_loc: Location? } # - # source://prism//lib/prism/node.rb#9022 + # source://prism//lib/prism/node.rb#7947 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -16297,74 +17260,56 @@ class Prism::InNode < ::Prism::Node # def in: () -> String # - # source://prism//lib/prism/node.rb#9053 + # source://prism//lib/prism/node.rb#7978 sig { returns(String) } def in; end # attr_reader in_loc: Location # - # source://prism//lib/prism/node.rb#9033 + # source://prism//lib/prism/node.rb#7958 sig { returns(Prism::Location) } def in_loc; end # def inspect -> String # - # source://prism//lib/prism/node.rb#9063 + # source://prism//lib/prism/node.rb#7988 sig { override.returns(String) } def inspect; end # attr_reader pattern: Prism::node # - # source://prism//lib/prism/node.rb#9027 + # source://prism//lib/prism/node.rb#7952 sig { returns(Prism::Node) } def pattern; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#9030 + # source://prism//lib/prism/node.rb#7955 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # def then: () -> String? # - # source://prism//lib/prism/node.rb#9058 + # source://prism//lib/prism/node.rb#7983 sig { returns(T.nilable(String)) } def then; end # attr_reader then_loc: Location? # - # source://prism//lib/prism/node.rb#9040 + # source://prism//lib/prism/node.rb#7965 sig { returns(T.nilable(Prism::Location)) } def then_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#9081 + # source://prism//lib/prism/node.rb#7993 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#9091 + # source://prism//lib/prism/node.rb#7998 def type; end end end @@ -16374,45 +17319,46 @@ end # foo.bar[baz] &&= value # ^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#9110 +# source://prism//lib/prism/node.rb#8017 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 + # Initialize a new IndexAndWriteNode node. # # @return [IndexAndWriteNode] a new instance of IndexAndWriteNode # - # source://prism//lib/prism/node.rb#9112 + # source://prism//lib/prism/node.rb#8019 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, - block: T.nilable(Prism::Node), + block: T.nilable(Prism::BlockArgumentNode), operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, location); end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#9289 + # source://prism//lib/prism/node.rb#8175 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9127 + # source://prism//lib/prism/node.rb#8035 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#9192 + # source://prism//lib/prism/node.rb#8116 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end @@ -16420,87 +17366,88 @@ class Prism::IndexAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9225 + # source://prism//lib/prism/node.rb#8083 sig { returns(T::Boolean) } def attribute_write?; end - # attr_reader block: Prism::node? + # attr_reader block: BlockArgumentNode? # - # source://prism//lib/prism/node.rb#9202 - sig { returns(T.nilable(Prism::Node)) } + # source://prism//lib/prism/node.rb#8126 + sig { returns(T.nilable(Prism::BlockArgumentNode)) } def block; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#9235 + # source://prism//lib/prism/node.rb#8139 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#9172 + # source://prism//lib/prism/node.rb#8096 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9132 + # source://prism//lib/prism/node.rb#8040 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#9245 + # source://prism//lib/prism/node.rb#8149 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#9195 + # source://prism//lib/prism/node.rb#8119 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9147 + # source://prism//lib/prism/node.rb#8055 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#9137 + # source://prism//lib/prism/node.rb#8045 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: BlockArgumentNode?, ?operator_loc: Location, ?value: Prism::node) -> IndexAndWriteNode # - # source://prism//lib/prism/node.rb#9152 + # source://prism//lib/prism/node.rb#8060 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, - block: T.nilable(Prism::Node), + block: T.nilable(Prism::BlockArgumentNode), operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9132 + # source://prism//lib/prism/node.rb#8040 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { 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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: BlockArgumentNode?, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#9160 + # source://prism//lib/prism/node.rb#8068 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -16511,43 +17458,43 @@ class Prism::IndexAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9230 + # source://prism//lib/prism/node.rb#8088 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#9255 + # source://prism//lib/prism/node.rb#8159 sig { override.returns(String) } def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#9240 + # source://prism//lib/prism/node.rb#8144 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#9185 + # source://prism//lib/prism/node.rb#8109 sig { returns(Prism::Location) } def opening_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#9250 + # source://prism//lib/prism/node.rb#8154 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#9205 + # source://prism//lib/prism/node.rb#8129 sig { returns(Prism::Location) } def operator_loc; end # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#9169 + # source://prism//lib/prism/node.rb#8093 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -16555,32 +17502,19 @@ class Prism::IndexAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9215 + # source://prism//lib/prism/node.rb#8073 sig { returns(T::Boolean) } def safe_navigation?; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#9273 + # source://prism//lib/prism/node.rb#8164 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#9212 + # source://prism//lib/prism/node.rb#8136 sig { returns(Prism::Node) } def value; end @@ -16588,27 +17522,14 @@ class Prism::IndexAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9220 + # source://prism//lib/prism/node.rb#8078 sig { returns(T::Boolean) } def variable_call?; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#9165 - 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#9283 + # source://prism//lib/prism/node.rb#8169 def type; end end end @@ -16618,46 +17539,47 @@ end # foo.bar[baz] += value # ^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#9307 +# source://prism//lib/prism/node.rb#8193 class Prism::IndexOperatorWriteNode < ::Prism::Node - # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Prism::node? block, Symbol binary_operator, Location binary_operator_loc, Prism::node value, Location location) -> void + # Initialize a new IndexOperatorWriteNode node. # # @return [IndexOperatorWriteNode] a new instance of IndexOperatorWriteNode # - # source://prism//lib/prism/node.rb#9309 + # source://prism//lib/prism/node.rb#8195 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, - block: T.nilable(Prism::Node), + block: T.nilable(Prism::BlockArgumentNode), binary_operator: Symbol, binary_operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, binary_operator, binary_operator_loc, value, location); end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, binary_operator, binary_operator_loc, value); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#9485 + # source://prism//lib/prism/node.rb#8350 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9325 + # source://prism//lib/prism/node.rb#8212 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#9390 + # source://prism//lib/prism/node.rb#8293 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end @@ -16665,100 +17587,101 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9426 + # source://prism//lib/prism/node.rb#8260 sig { returns(T::Boolean) } def attribute_write?; end # attr_reader binary_operator: Symbol # - # source://prism//lib/prism/node.rb#9403 + # source://prism//lib/prism/node.rb#8306 sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # - # source://prism//lib/prism/node.rb#9406 + # source://prism//lib/prism/node.rb#8309 sig { returns(Prism::Location) } def binary_operator_loc; end - # attr_reader block: Prism::node? + # attr_reader block: BlockArgumentNode? # - # source://prism//lib/prism/node.rb#9400 - sig { returns(T.nilable(Prism::Node)) } + # source://prism//lib/prism/node.rb#8303 + sig { returns(T.nilable(Prism::BlockArgumentNode)) } def block; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#9436 + # source://prism//lib/prism/node.rb#8319 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#9370 + # source://prism//lib/prism/node.rb#8273 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9330 + # source://prism//lib/prism/node.rb#8217 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#9446 + # source://prism//lib/prism/node.rb#8329 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#9393 + # source://prism//lib/prism/node.rb#8296 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9345 + # source://prism//lib/prism/node.rb#8232 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#9335 + # source://prism//lib/prism/node.rb#8222 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: Prism::node?, ?binary_operator: Symbol, ?binary_operator_loc: Location, ?value: Prism::node, ?location: Location) -> IndexOperatorWriteNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: BlockArgumentNode?, ?binary_operator: Symbol, ?binary_operator_loc: Location, ?value: Prism::node) -> IndexOperatorWriteNode # - # source://prism//lib/prism/node.rb#9350 + # source://prism//lib/prism/node.rb#8237 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, - block: T.nilable(Prism::Node), + block: T.nilable(Prism::BlockArgumentNode), binary_operator: Symbol, binary_operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).returns(Prism::IndexOperatorWriteNode) end - def copy(flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), binary_operator: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), binary_operator: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9330 + # source://prism//lib/prism/node.rb#8217 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { 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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: BlockArgumentNode?, binary_operator: Symbol, binary_operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#9358 + # source://prism//lib/prism/node.rb#8245 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -16769,43 +17692,43 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9431 + # source://prism//lib/prism/node.rb#8265 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#9451 + # source://prism//lib/prism/node.rb#8334 sig { override.returns(String) } def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#9441 + # source://prism//lib/prism/node.rb#8324 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#9383 + # source://prism//lib/prism/node.rb#8286 sig { returns(Prism::Location) } def opening_loc; end # Returns the binary operator used to modify the receiver. This method is # deprecated in favor of #binary_operator. # - # source://prism//lib/prism/node_ext.rb#403 + # source://prism//lib/prism/node_ext.rb#419 def operator; end # Returns the location of the binary operator used to modify the receiver. # This method is deprecated in favor of #binary_operator_loc. # - # source://prism//lib/prism/node_ext.rb#410 + # source://prism//lib/prism/node_ext.rb#426 def operator_loc; end # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#9367 + # source://prism//lib/prism/node.rb#8270 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -16813,32 +17736,19 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9416 + # source://prism//lib/prism/node.rb#8250 sig { returns(T::Boolean) } def safe_navigation?; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#9469 + # source://prism//lib/prism/node.rb#8339 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#9413 + # source://prism//lib/prism/node.rb#8316 sig { returns(Prism::Node) } def value; end @@ -16846,27 +17756,14 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9421 + # source://prism//lib/prism/node.rb#8255 sig { returns(T::Boolean) } def variable_call?; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#9363 - sig { returns(Integer) } - def flags; end - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#9479 + # source://prism//lib/prism/node.rb#8344 def type; end end end @@ -16876,45 +17773,46 @@ end # foo.bar[baz] ||= value # ^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#9504 +# source://prism//lib/prism/node.rb#8369 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 + # Initialize a new IndexOrWriteNode node. # # @return [IndexOrWriteNode] a new instance of IndexOrWriteNode # - # source://prism//lib/prism/node.rb#9506 + # source://prism//lib/prism/node.rb#8371 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, - block: T.nilable(Prism::Node), + block: T.nilable(Prism::BlockArgumentNode), operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, location); end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#9683 + # source://prism//lib/prism/node.rb#8527 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9521 + # source://prism//lib/prism/node.rb#8387 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#9586 + # source://prism//lib/prism/node.rb#8468 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end @@ -16922,87 +17820,88 @@ class Prism::IndexOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9619 + # source://prism//lib/prism/node.rb#8435 sig { returns(T::Boolean) } def attribute_write?; end - # attr_reader block: Prism::node? + # attr_reader block: BlockArgumentNode? # - # source://prism//lib/prism/node.rb#9596 - sig { returns(T.nilable(Prism::Node)) } + # source://prism//lib/prism/node.rb#8478 + sig { returns(T.nilable(Prism::BlockArgumentNode)) } def block; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#9629 + # source://prism//lib/prism/node.rb#8491 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#9566 + # source://prism//lib/prism/node.rb#8448 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9526 + # source://prism//lib/prism/node.rb#8392 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#9639 + # source://prism//lib/prism/node.rb#8501 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#9589 + # source://prism//lib/prism/node.rb#8471 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9541 + # source://prism//lib/prism/node.rb#8407 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#9531 + # source://prism//lib/prism/node.rb#8397 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: BlockArgumentNode?, ?operator_loc: Location, ?value: Prism::node) -> IndexOrWriteNode # - # source://prism//lib/prism/node.rb#9546 + # source://prism//lib/prism/node.rb#8412 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, - block: T.nilable(Prism::Node), + block: T.nilable(Prism::BlockArgumentNode), operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9526 + # source://prism//lib/prism/node.rb#8392 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { 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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: BlockArgumentNode?, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#9554 + # source://prism//lib/prism/node.rb#8420 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -17013,43 +17912,43 @@ class Prism::IndexOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9624 + # source://prism//lib/prism/node.rb#8440 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#9649 + # source://prism//lib/prism/node.rb#8511 sig { override.returns(String) } def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#9634 + # source://prism//lib/prism/node.rb#8496 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#9579 + # source://prism//lib/prism/node.rb#8461 sig { returns(Prism::Location) } def opening_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#9644 + # source://prism//lib/prism/node.rb#8506 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#9599 + # source://prism//lib/prism/node.rb#8481 sig { returns(Prism::Location) } def operator_loc; end # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#9563 + # source://prism//lib/prism/node.rb#8445 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -17057,32 +17956,19 @@ class Prism::IndexOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9609 + # source://prism//lib/prism/node.rb#8425 sig { returns(T::Boolean) } def safe_navigation?; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#9667 + # source://prism//lib/prism/node.rb#8516 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#9606 + # source://prism//lib/prism/node.rb#8488 sig { returns(Prism::Node) } def value; end @@ -17090,27 +17976,14 @@ class Prism::IndexOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9614 + # source://prism//lib/prism/node.rb#8430 sig { returns(T::Boolean) } def variable_call?; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#9559 - 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#9677 + # source://prism//lib/prism/node.rb#8521 def type; end end end @@ -17128,42 +18001,43 @@ end # for foo[bar] in baz do end # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#9709 +# source://prism//lib/prism/node.rb#8553 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 + # Initialize a new IndexTargetNode node. # # @return [IndexTargetNode] a new instance of IndexTargetNode # - # source://prism//lib/prism/node.rb#9711 + # source://prism//lib/prism/node.rb#8555 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: Prism::Node, opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, - block: T.nilable(Prism::Node), - location: Prism::Location + block: T.nilable(Prism::BlockArgumentNode) ).void end - def initialize(source, flags, receiver, opening_loc, arguments, closing_loc, block, location); end + def initialize(source, node_id, location, flags, receiver, opening_loc, arguments, closing_loc, block); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#9851 + # source://prism//lib/prism/node.rb#8674 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9723 + # source://prism//lib/prism/node.rb#8568 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#9774 + # source://prism//lib/prism/node.rb#8635 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end @@ -17171,72 +18045,73 @@ class Prism::IndexTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9797 + # source://prism//lib/prism/node.rb#8615 sig { returns(T::Boolean) } def attribute_write?; end - # attr_reader block: Prism::node? + # attr_reader block: BlockArgumentNode? # - # source://prism//lib/prism/node.rb#9784 - sig { returns(T.nilable(Prism::Node)) } + # source://prism//lib/prism/node.rb#8645 + sig { returns(T.nilable(Prism::BlockArgumentNode)) } def block; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9728 + # source://prism//lib/prism/node.rb#8573 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#9812 + # source://prism//lib/prism/node.rb#8653 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#9777 + # source://prism//lib/prism/node.rb#8638 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9742 + # source://prism//lib/prism/node.rb#8587 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#9733 + # source://prism//lib/prism/node.rb#8578 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: BlockArgumentNode?) -> IndexTargetNode # - # source://prism//lib/prism/node.rb#9747 + # source://prism//lib/prism/node.rb#8592 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: Prism::Node, opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, - block: T.nilable(Prism::Node), - location: Prism::Location + block: T.nilable(Prism::BlockArgumentNode) ).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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9728 + # source://prism//lib/prism/node.rb#8573 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Prism::node?, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: BlockArgumentNode? } # - # source://prism//lib/prism/node.rb#9755 + # source://prism//lib/prism/node.rb#8600 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -17247,31 +18122,31 @@ class Prism::IndexTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9802 + # source://prism//lib/prism/node.rb#8620 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#9817 + # source://prism//lib/prism/node.rb#8658 sig { override.returns(String) } def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#9807 + # source://prism//lib/prism/node.rb#8648 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#9767 + # source://prism//lib/prism/node.rb#8628 sig { returns(Prism::Location) } def opening_loc; end # attr_reader receiver: Prism::node # - # source://prism//lib/prism/node.rb#9764 + # source://prism//lib/prism/node.rb#8625 sig { returns(Prism::Node) } def receiver; end @@ -17279,26 +18154,13 @@ class Prism::IndexTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9787 + # source://prism//lib/prism/node.rb#8605 sig { returns(T::Boolean) } def safe_navigation?; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#9835 + # source://prism//lib/prism/node.rb#8663 sig { override.returns(Symbol) } def type; end @@ -17306,27 +18168,14 @@ class Prism::IndexTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9792 + # source://prism//lib/prism/node.rb#8610 sig { returns(T::Boolean) } def variable_call?; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#9760 - 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#9845 + # source://prism//lib/prism/node.rb#8668 def type; end end end @@ -17334,11 +18183,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#388 +# source://prism//lib/prism/parse_result.rb#529 class Prism::InlineComment < ::Prism::Comment # Returns a string representation of this comment. # - # source://prism//lib/prism/parse_result.rb#396 + # source://prism//lib/prism/parse_result.rb#537 sig { returns(String) } def inspect; end @@ -17347,7 +18196,7 @@ class Prism::InlineComment < ::Prism::Comment # # @return [Boolean] # - # source://prism//lib/prism/parse_result.rb#391 + # source://prism//lib/prism/parse_result.rb#532 sig { override.returns(T::Boolean) } def trailing?; end end @@ -17389,764 +18238,764 @@ class Prism::InspectVisitor < ::Prism::Visitor # Inspect a AliasMethodNode node. # - # source://prism//lib/prism/inspect_visitor.rb#87 + # source://prism//lib/prism/inspect_visitor.rb#89 def visit_alias_method_node(node); end # Inspect a AlternationPatternNode node. # - # source://prism//lib/prism/inspect_visitor.rb#97 + # source://prism//lib/prism/inspect_visitor.rb#101 def visit_alternation_pattern_node(node); end # Inspect a AndNode node. # - # source://prism//lib/prism/inspect_visitor.rb#107 + # source://prism//lib/prism/inspect_visitor.rb#113 def visit_and_node(node); end # Inspect a ArgumentsNode node. # - # source://prism//lib/prism/inspect_visitor.rb#117 + # source://prism//lib/prism/inspect_visitor.rb#125 def visit_arguments_node(node); end # Inspect a ArrayNode node. # - # source://prism//lib/prism/inspect_visitor.rb#133 + # source://prism//lib/prism/inspect_visitor.rb#141 def visit_array_node(node); end # Inspect a ArrayPatternNode node. # - # source://prism//lib/prism/inspect_visitor.rb#151 + # source://prism//lib/prism/inspect_visitor.rb#159 def visit_array_pattern_node(node); end # Inspect a AssocNode node. # - # source://prism//lib/prism/inspect_visitor.rb#188 + # source://prism//lib/prism/inspect_visitor.rb#198 def visit_assoc_node(node); end # Inspect a AssocSplatNode node. # - # source://prism//lib/prism/inspect_visitor.rb#198 + # source://prism//lib/prism/inspect_visitor.rb#210 def visit_assoc_splat_node(node); end # Inspect a BackReferenceReadNode node. # - # source://prism//lib/prism/inspect_visitor.rb#210 + # source://prism//lib/prism/inspect_visitor.rb#224 def visit_back_reference_read_node(node); end # Inspect a BeginNode node. # - # source://prism//lib/prism/inspect_visitor.rb#216 + # source://prism//lib/prism/inspect_visitor.rb#232 def visit_begin_node(node); end # Inspect a BlockArgumentNode node. # - # source://prism//lib/prism/inspect_visitor.rb#247 + # source://prism//lib/prism/inspect_visitor.rb#265 def visit_block_argument_node(node); end # Inspect a BlockLocalVariableNode node. # - # source://prism//lib/prism/inspect_visitor.rb#259 + # source://prism//lib/prism/inspect_visitor.rb#279 def visit_block_local_variable_node(node); end # Inspect a BlockNode node. # - # source://prism//lib/prism/inspect_visitor.rb#267 + # source://prism//lib/prism/inspect_visitor.rb#287 def visit_block_node(node); end # Inspect a BlockParameterNode node. # - # source://prism//lib/prism/inspect_visitor.rb#287 + # source://prism//lib/prism/inspect_visitor.rb#309 def visit_block_parameter_node(node); end # Inspect a BlockParametersNode node. # - # source://prism//lib/prism/inspect_visitor.rb#301 + # source://prism//lib/prism/inspect_visitor.rb#323 def visit_block_parameters_node(node); end # Inspect a BreakNode node. # - # source://prism//lib/prism/inspect_visitor.rb#323 + # source://prism//lib/prism/inspect_visitor.rb#347 def visit_break_node(node); end # Inspect a CallAndWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#335 + # source://prism//lib/prism/inspect_visitor.rb#361 def visit_call_and_write_node(node); end # Inspect a CallNode node. # - # source://prism//lib/prism/inspect_visitor.rb#355 + # source://prism//lib/prism/inspect_visitor.rb#381 def visit_call_node(node); end # Inspect a CallOperatorWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#385 + # source://prism//lib/prism/inspect_visitor.rb#411 def visit_call_operator_write_node(node); end # Inspect a CallOrWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#406 + # source://prism//lib/prism/inspect_visitor.rb#432 def visit_call_or_write_node(node); end # Inspect a CallTargetNode node. # - # source://prism//lib/prism/inspect_visitor.rb#426 + # source://prism//lib/prism/inspect_visitor.rb#452 def visit_call_target_node(node); end # Inspect a CapturePatternNode node. # - # source://prism//lib/prism/inspect_visitor.rb#438 + # source://prism//lib/prism/inspect_visitor.rb#464 def visit_capture_pattern_node(node); end # Inspect a CaseMatchNode node. # - # source://prism//lib/prism/inspect_visitor.rb#448 + # source://prism//lib/prism/inspect_visitor.rb#476 def visit_case_match_node(node); end # Inspect a CaseNode node. # - # source://prism//lib/prism/inspect_visitor.rb#476 + # source://prism//lib/prism/inspect_visitor.rb#506 def visit_case_node(node); end # Inspect a ClassNode node. # - # source://prism//lib/prism/inspect_visitor.rb#504 + # source://prism//lib/prism/inspect_visitor.rb#536 def visit_class_node(node); end # Inspect a ClassVariableAndWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#528 + # source://prism//lib/prism/inspect_visitor.rb#562 def visit_class_variable_and_write_node(node); end # Inspect a ClassVariableOperatorWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#538 + # source://prism//lib/prism/inspect_visitor.rb#574 def visit_class_variable_operator_write_node(node); end # Inspect a ClassVariableOrWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#549 + # source://prism//lib/prism/inspect_visitor.rb#587 def visit_class_variable_or_write_node(node); end # Inspect a ClassVariableReadNode node. # - # source://prism//lib/prism/inspect_visitor.rb#559 + # source://prism//lib/prism/inspect_visitor.rb#599 def visit_class_variable_read_node(node); end # Inspect a ClassVariableTargetNode node. # - # source://prism//lib/prism/inspect_visitor.rb#565 + # source://prism//lib/prism/inspect_visitor.rb#607 def visit_class_variable_target_node(node); end # Inspect a ClassVariableWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#571 + # source://prism//lib/prism/inspect_visitor.rb#615 def visit_class_variable_write_node(node); end # Inspect a ConstantAndWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#581 + # source://prism//lib/prism/inspect_visitor.rb#627 def visit_constant_and_write_node(node); end # Inspect a ConstantOperatorWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#591 + # source://prism//lib/prism/inspect_visitor.rb#639 def visit_constant_operator_write_node(node); end # Inspect a ConstantOrWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#602 + # source://prism//lib/prism/inspect_visitor.rb#652 def visit_constant_or_write_node(node); end # Inspect a ConstantPathAndWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#612 + # source://prism//lib/prism/inspect_visitor.rb#664 def visit_constant_path_and_write_node(node); end # Inspect a ConstantPathNode node. # - # source://prism//lib/prism/inspect_visitor.rb#622 + # source://prism//lib/prism/inspect_visitor.rb#676 def visit_constant_path_node(node); end # Inspect a ConstantPathOperatorWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#640 + # source://prism//lib/prism/inspect_visitor.rb#696 def visit_constant_path_operator_write_node(node); end # Inspect a ConstantPathOrWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#651 + # source://prism//lib/prism/inspect_visitor.rb#709 def visit_constant_path_or_write_node(node); end # Inspect a ConstantPathTargetNode node. # - # source://prism//lib/prism/inspect_visitor.rb#661 + # source://prism//lib/prism/inspect_visitor.rb#721 def visit_constant_path_target_node(node); end # Inspect a ConstantPathWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#679 + # source://prism//lib/prism/inspect_visitor.rb#741 def visit_constant_path_write_node(node); end # Inspect a ConstantReadNode node. # - # source://prism//lib/prism/inspect_visitor.rb#689 + # source://prism//lib/prism/inspect_visitor.rb#753 def visit_constant_read_node(node); end # Inspect a ConstantTargetNode node. # - # source://prism//lib/prism/inspect_visitor.rb#695 + # source://prism//lib/prism/inspect_visitor.rb#761 def visit_constant_target_node(node); end # Inspect a ConstantWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#701 + # source://prism//lib/prism/inspect_visitor.rb#769 def visit_constant_write_node(node); end # Inspect a DefNode node. # - # source://prism//lib/prism/inspect_visitor.rb#711 + # source://prism//lib/prism/inspect_visitor.rb#781 def visit_def_node(node); end # Inspect a DefinedNode node. # - # source://prism//lib/prism/inspect_visitor.rb#743 + # source://prism//lib/prism/inspect_visitor.rb#815 def visit_defined_node(node); end # Inspect a ElseNode node. # - # source://prism//lib/prism/inspect_visitor.rb#753 + # source://prism//lib/prism/inspect_visitor.rb#827 def visit_else_node(node); end # Inspect a EmbeddedStatementsNode node. # - # source://prism//lib/prism/inspect_visitor.rb#766 + # source://prism//lib/prism/inspect_visitor.rb#842 def visit_embedded_statements_node(node); end # Inspect a EmbeddedVariableNode node. # - # source://prism//lib/prism/inspect_visitor.rb#779 + # source://prism//lib/prism/inspect_visitor.rb#857 def visit_embedded_variable_node(node); end # Inspect a EnsureNode node. # - # source://prism//lib/prism/inspect_visitor.rb#787 + # source://prism//lib/prism/inspect_visitor.rb#867 def visit_ensure_node(node); end # Inspect a FalseNode node. # - # source://prism//lib/prism/inspect_visitor.rb#800 + # source://prism//lib/prism/inspect_visitor.rb#882 def visit_false_node(node); end # Inspect a FindPatternNode node. # - # source://prism//lib/prism/inspect_visitor.rb#805 + # source://prism//lib/prism/inspect_visitor.rb#889 def visit_find_pattern_node(node); end # Inspect a FlipFlopNode node. # - # source://prism//lib/prism/inspect_visitor.rb#831 + # source://prism//lib/prism/inspect_visitor.rb#917 def visit_flip_flop_node(node); end # Inspect a FloatNode node. # - # source://prism//lib/prism/inspect_visitor.rb#851 + # source://prism//lib/prism/inspect_visitor.rb#937 def visit_float_node(node); end # Inspect a ForNode node. # - # source://prism//lib/prism/inspect_visitor.rb#857 + # source://prism//lib/prism/inspect_visitor.rb#945 def visit_for_node(node); end # Inspect a ForwardingArgumentsNode node. # - # source://prism//lib/prism/inspect_visitor.rb#876 + # source://prism//lib/prism/inspect_visitor.rb#966 def visit_forwarding_arguments_node(node); end # Inspect a ForwardingParameterNode node. # - # source://prism//lib/prism/inspect_visitor.rb#881 + # source://prism//lib/prism/inspect_visitor.rb#973 def visit_forwarding_parameter_node(node); end # Inspect a ForwardingSuperNode node. # - # source://prism//lib/prism/inspect_visitor.rb#886 + # source://prism//lib/prism/inspect_visitor.rb#980 def visit_forwarding_super_node(node); end # Inspect a GlobalVariableAndWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#897 + # source://prism//lib/prism/inspect_visitor.rb#993 def visit_global_variable_and_write_node(node); end # Inspect a GlobalVariableOperatorWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#907 + # source://prism//lib/prism/inspect_visitor.rb#1005 def visit_global_variable_operator_write_node(node); end # Inspect a GlobalVariableOrWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#918 + # source://prism//lib/prism/inspect_visitor.rb#1018 def visit_global_variable_or_write_node(node); end # Inspect a GlobalVariableReadNode node. # - # source://prism//lib/prism/inspect_visitor.rb#928 + # source://prism//lib/prism/inspect_visitor.rb#1030 def visit_global_variable_read_node(node); end # Inspect a GlobalVariableTargetNode node. # - # source://prism//lib/prism/inspect_visitor.rb#934 + # source://prism//lib/prism/inspect_visitor.rb#1038 def visit_global_variable_target_node(node); end # Inspect a GlobalVariableWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#940 + # source://prism//lib/prism/inspect_visitor.rb#1046 def visit_global_variable_write_node(node); end # Inspect a HashNode node. # - # source://prism//lib/prism/inspect_visitor.rb#950 + # source://prism//lib/prism/inspect_visitor.rb#1058 def visit_hash_node(node); end # Inspect a HashPatternNode node. # - # source://prism//lib/prism/inspect_visitor.rb#966 + # source://prism//lib/prism/inspect_visitor.rb#1076 def visit_hash_pattern_node(node); end # Inspect a IfNode node. # - # source://prism//lib/prism/inspect_visitor.rb#994 + # source://prism//lib/prism/inspect_visitor.rb#1106 def visit_if_node(node); end # Inspect a ImaginaryNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1016 + # source://prism//lib/prism/inspect_visitor.rb#1130 def visit_imaginary_node(node); end # Inspect a ImplicitNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1023 + # source://prism//lib/prism/inspect_visitor.rb#1139 def visit_implicit_node(node); end # Inspect a ImplicitRestNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1030 + # source://prism//lib/prism/inspect_visitor.rb#1148 def visit_implicit_rest_node(node); end # Inspect a InNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1035 + # source://prism//lib/prism/inspect_visitor.rb#1155 def visit_in_node(node); end # Inspect a IndexAndWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1050 + # source://prism//lib/prism/inspect_visitor.rb#1172 def visit_index_and_write_node(node); end # Inspect a IndexOperatorWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1081 + # source://prism//lib/prism/inspect_visitor.rb#1203 def visit_index_operator_write_node(node); end # Inspect a IndexOrWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1113 + # source://prism//lib/prism/inspect_visitor.rb#1235 def visit_index_or_write_node(node); end # Inspect a IndexTargetNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1144 + # source://prism//lib/prism/inspect_visitor.rb#1266 def visit_index_target_node(node); end # Inspect a InstanceVariableAndWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1167 + # source://prism//lib/prism/inspect_visitor.rb#1289 def visit_instance_variable_and_write_node(node); end # Inspect a InstanceVariableOperatorWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1177 + # source://prism//lib/prism/inspect_visitor.rb#1301 def visit_instance_variable_operator_write_node(node); end # Inspect a InstanceVariableOrWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1188 + # source://prism//lib/prism/inspect_visitor.rb#1314 def visit_instance_variable_or_write_node(node); end # Inspect a InstanceVariableReadNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1198 + # source://prism//lib/prism/inspect_visitor.rb#1326 def visit_instance_variable_read_node(node); end # Inspect a InstanceVariableTargetNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1204 + # source://prism//lib/prism/inspect_visitor.rb#1334 def visit_instance_variable_target_node(node); end # Inspect a InstanceVariableWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1210 + # source://prism//lib/prism/inspect_visitor.rb#1342 def visit_instance_variable_write_node(node); end # Inspect a IntegerNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1220 + # source://prism//lib/prism/inspect_visitor.rb#1354 def visit_integer_node(node); end # Inspect a InterpolatedMatchLastLineNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1228 + # source://prism//lib/prism/inspect_visitor.rb#1362 def visit_interpolated_match_last_line_node(node); end # Inspect a InterpolatedRegularExpressionNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1246 + # source://prism//lib/prism/inspect_visitor.rb#1380 def visit_interpolated_regular_expression_node(node); end # Inspect a InterpolatedStringNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1264 + # source://prism//lib/prism/inspect_visitor.rb#1398 def visit_interpolated_string_node(node); end # Inspect a InterpolatedSymbolNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1282 + # source://prism//lib/prism/inspect_visitor.rb#1416 def visit_interpolated_symbol_node(node); end # Inspect a InterpolatedXStringNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1298 + # source://prism//lib/prism/inspect_visitor.rb#1434 def visit_interpolated_x_string_node(node); end # Inspect a ItLocalVariableReadNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1314 + # source://prism//lib/prism/inspect_visitor.rb#1452 def visit_it_local_variable_read_node(node); end # Inspect a ItParametersNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1319 + # source://prism//lib/prism/inspect_visitor.rb#1459 def visit_it_parameters_node(node); end # Inspect a KeywordHashNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1324 + # source://prism//lib/prism/inspect_visitor.rb#1466 def visit_keyword_hash_node(node); end # Inspect a KeywordRestParameterNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1340 + # source://prism//lib/prism/inspect_visitor.rb#1482 def visit_keyword_rest_parameter_node(node); end # Inspect a LambdaNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1354 + # source://prism//lib/prism/inspect_visitor.rb#1496 def visit_lambda_node(node); end # Inspect a LocalVariableAndWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1375 + # source://prism//lib/prism/inspect_visitor.rb#1519 def visit_local_variable_and_write_node(node); end # Inspect a LocalVariableOperatorWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1386 + # source://prism//lib/prism/inspect_visitor.rb#1532 def visit_local_variable_operator_write_node(node); end # Inspect a LocalVariableOrWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1398 + # source://prism//lib/prism/inspect_visitor.rb#1546 def visit_local_variable_or_write_node(node); end # Inspect a LocalVariableReadNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1409 + # source://prism//lib/prism/inspect_visitor.rb#1559 def visit_local_variable_read_node(node); end # Inspect a LocalVariableTargetNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1416 + # source://prism//lib/prism/inspect_visitor.rb#1568 def visit_local_variable_target_node(node); end # Inspect a LocalVariableWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1423 + # source://prism//lib/prism/inspect_visitor.rb#1577 def visit_local_variable_write_node(node); end # Inspect a MatchLastLineNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1434 + # source://prism//lib/prism/inspect_visitor.rb#1590 def visit_match_last_line_node(node); end # Inspect a MatchPredicateNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1445 + # source://prism//lib/prism/inspect_visitor.rb#1601 def visit_match_predicate_node(node); end # Inspect a MatchRequiredNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1455 + # source://prism//lib/prism/inspect_visitor.rb#1613 def visit_match_required_node(node); end # Inspect a MatchWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1465 + # source://prism//lib/prism/inspect_visitor.rb#1625 def visit_match_write_node(node); end # Inspect a MissingNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1481 + # source://prism//lib/prism/inspect_visitor.rb#1643 def visit_missing_node(node); end # Inspect a ModuleNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1486 + # source://prism//lib/prism/inspect_visitor.rb#1650 def visit_module_node(node); end # Inspect a MultiTargetNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1503 + # source://prism//lib/prism/inspect_visitor.rb#1669 def visit_multi_target_node(node); end # Inspect a MultiWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1534 + # source://prism//lib/prism/inspect_visitor.rb#1702 def visit_multi_write_node(node); end # Inspect a NextNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1568 + # source://prism//lib/prism/inspect_visitor.rb#1738 def visit_next_node(node); end # Inspect a NilNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1580 + # source://prism//lib/prism/inspect_visitor.rb#1752 def visit_nil_node(node); end # Inspect a NoKeywordsParameterNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1585 + # source://prism//lib/prism/inspect_visitor.rb#1759 def visit_no_keywords_parameter_node(node); end # Inspect a NumberedParametersNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1592 + # source://prism//lib/prism/inspect_visitor.rb#1768 def visit_numbered_parameters_node(node); end # Inspect a NumberedReferenceReadNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1598 + # source://prism//lib/prism/inspect_visitor.rb#1776 def visit_numbered_reference_read_node(node); end # Inspect a OptionalKeywordParameterNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1604 + # source://prism//lib/prism/inspect_visitor.rb#1784 def visit_optional_keyword_parameter_node(node); end # Inspect a OptionalParameterNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1615 + # source://prism//lib/prism/inspect_visitor.rb#1795 def visit_optional_parameter_node(node); end # Inspect a OrNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1627 + # source://prism//lib/prism/inspect_visitor.rb#1807 def visit_or_node(node); end # Inspect a ParametersNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1637 + # source://prism//lib/prism/inspect_visitor.rb#1819 def visit_parameters_node(node); end # Inspect a ParenthesesNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1696 + # source://prism//lib/prism/inspect_visitor.rb#1880 def visit_parentheses_node(node); end # Inspect a PinnedExpressionNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1709 + # source://prism//lib/prism/inspect_visitor.rb#1895 def visit_pinned_expression_node(node); end # Inspect a PinnedVariableNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1719 + # source://prism//lib/prism/inspect_visitor.rb#1907 def visit_pinned_variable_node(node); end # Inspect a PostExecutionNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1727 + # source://prism//lib/prism/inspect_visitor.rb#1917 def visit_post_execution_node(node); end # Inspect a PreExecutionNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1741 + # source://prism//lib/prism/inspect_visitor.rb#1933 def visit_pre_execution_node(node); end # Inspect a ProgramNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1755 + # source://prism//lib/prism/inspect_visitor.rb#1949 def visit_program_node(node); end # Inspect a RangeNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1763 + # source://prism//lib/prism/inspect_visitor.rb#1959 def visit_range_node(node); end # Inspect a RationalNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1783 + # source://prism//lib/prism/inspect_visitor.rb#1979 def visit_rational_node(node); end # Inspect a RedoNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1792 + # source://prism//lib/prism/inspect_visitor.rb#1988 def visit_redo_node(node); end # Inspect a RegularExpressionNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1797 + # source://prism//lib/prism/inspect_visitor.rb#1995 def visit_regular_expression_node(node); end # Inspect a RequiredKeywordParameterNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1808 + # source://prism//lib/prism/inspect_visitor.rb#2006 def visit_required_keyword_parameter_node(node); end # Inspect a RequiredParameterNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1817 + # source://prism//lib/prism/inspect_visitor.rb#2015 def visit_required_parameter_node(node); end # Inspect a RescueModifierNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1825 + # source://prism//lib/prism/inspect_visitor.rb#2023 def visit_rescue_modifier_node(node); end # Inspect a RescueNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1835 + # source://prism//lib/prism/inspect_visitor.rb#2035 def visit_rescue_node(node); end # Inspect a RestParameterNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1869 + # source://prism//lib/prism/inspect_visitor.rb#2071 def visit_rest_parameter_node(node); end # Inspect a RetryNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1883 + # source://prism//lib/prism/inspect_visitor.rb#2085 def visit_retry_node(node); end # Inspect a ReturnNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1888 + # source://prism//lib/prism/inspect_visitor.rb#2092 def visit_return_node(node); end # Inspect a SelfNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1902 + # source://prism//lib/prism/inspect_visitor.rb#2106 def visit_self_node(node); end # Inspect a ShareableConstantNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1907 + # source://prism//lib/prism/inspect_visitor.rb#2113 def visit_shareable_constant_node(node); end # Inspect a SingletonClassNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1916 + # source://prism//lib/prism/inspect_visitor.rb#2122 def visit_singleton_class_node(node); end # Inspect a SourceEncodingNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1933 + # source://prism//lib/prism/inspect_visitor.rb#2141 def visit_source_encoding_node(node); end # Inspect a SourceFileNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1938 + # source://prism//lib/prism/inspect_visitor.rb#2148 def visit_source_file_node(node); end # Inspect a SourceLineNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1946 + # source://prism//lib/prism/inspect_visitor.rb#2156 def visit_source_line_node(node); end # Inspect a SplatNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1951 + # source://prism//lib/prism/inspect_visitor.rb#2163 def visit_splat_node(node); end # Inspect a StatementsNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1963 + # source://prism//lib/prism/inspect_visitor.rb#2177 def visit_statements_node(node); end # Inspect a StringNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1977 + # source://prism//lib/prism/inspect_visitor.rb#2193 def visit_string_node(node); end # Inspect a SuperNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1988 + # source://prism//lib/prism/inspect_visitor.rb#2204 def visit_super_node(node); end # Inspect a SymbolNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2008 + # source://prism//lib/prism/inspect_visitor.rb#2226 def visit_symbol_node(node); end # Inspect a TrueNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2019 + # source://prism//lib/prism/inspect_visitor.rb#2237 def visit_true_node(node); end # Inspect a UndefNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2024 + # source://prism//lib/prism/inspect_visitor.rb#2244 def visit_undef_node(node); end # Inspect a UnlessNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2039 + # source://prism//lib/prism/inspect_visitor.rb#2261 def visit_unless_node(node); end # Inspect a UntilNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2061 + # source://prism//lib/prism/inspect_visitor.rb#2285 def visit_until_node(node); end # Inspect a WhenNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2078 + # source://prism//lib/prism/inspect_visitor.rb#2302 def visit_when_node(node); end # Inspect a WhileNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2100 + # source://prism//lib/prism/inspect_visitor.rb#2326 def visit_while_node(node); end # Inspect a XStringNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2117 + # source://prism//lib/prism/inspect_visitor.rb#2343 def visit_x_string_node(node); end # Inspect a YieldNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2128 + # source://prism//lib/prism/inspect_visitor.rb#2354 def visit_yield_node(node); end private # Compose a string representing the given inner location field. # - # source://prism//lib/prism/inspect_visitor.rb#2150 + # source://prism//lib/prism/inspect_visitor.rb#2378 def inspect_location(location); end # Compose a header for the given node. # - # source://prism//lib/prism/inspect_visitor.rb#2144 + # source://prism//lib/prism/inspect_visitor.rb#2372 def inspect_node(name, node); end class << self @@ -18179,83 +19028,87 @@ end # @target &&= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#9866 +# source://prism//lib/prism/node.rb#8689 class Prism::InstanceVariableAndWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void + # Initialize a new InstanceVariableAndWriteNode node. # # @return [InstanceVariableAndWriteNode] a new instance of InstanceVariableAndWriteNode # - # source://prism//lib/prism/node.rb#9868 + # source://prism//lib/prism/node.rb#8691 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, name, name_loc, operator_loc, value, location); end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#9970 + # source://prism//lib/prism/node.rb#8777 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9878 + # source://prism//lib/prism/node.rb#8703 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9883 + # source://prism//lib/prism/node.rb#8708 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9893 + # source://prism//lib/prism/node.rb#8718 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#9888 + # source://prism//lib/prism/node.rb#8713 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> InstanceVariableAndWriteNode # - # source://prism//lib/prism/node.rb#9898 + # source://prism//lib/prism/node.rb#8723 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9883 + # source://prism//lib/prism/node.rb#8708 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#9906 + # source://prism//lib/prism/node.rb#8731 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # source://prism//lib/prism/desugar_compiler.rb#181 + # source://prism//lib/prism/desugar_compiler.rb#218 def desugar; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -18263,68 +19116,50 @@ class Prism::InstanceVariableAndWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#9936 + # source://prism//lib/prism/node.rb#8761 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#9911 + # source://prism//lib/prism/node.rb#8736 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#9914 + # source://prism//lib/prism/node.rb#8739 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#9931 + # source://prism//lib/prism/node.rb#8756 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#9921 + # source://prism//lib/prism/node.rb#8746 sig { returns(Prism::Location) } def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#9954 + # source://prism//lib/prism/node.rb#8766 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#9928 + # source://prism//lib/prism/node.rb#8753 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#9964 + # source://prism//lib/prism/node.rb#8771 def type; end end end @@ -18334,97 +19169,101 @@ end # @target += value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#9983 +# source://prism//lib/prism/node.rb#8790 class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location binary_operator_loc, Prism::node value, Symbol binary_operator, Location location) -> void + # Initialize a new InstanceVariableOperatorWriteNode node. # # @return [InstanceVariableOperatorWriteNode] a new instance of InstanceVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#9985 + # source://prism//lib/prism/node.rb#8792 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, binary_operator_loc: Prism::Location, value: Prism::Node, - binary_operator: Symbol, - location: Prism::Location + binary_operator: Symbol ).void end - def initialize(source, name, name_loc, binary_operator_loc, value, binary_operator, location); end + def initialize(source, node_id, location, flags, name, name_loc, binary_operator_loc, value, binary_operator); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#10086 + # source://prism//lib/prism/node.rb#8877 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9996 + # source://prism//lib/prism/node.rb#8805 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader binary_operator: Symbol # - # source://prism//lib/prism/node.rb#10049 + # source://prism//lib/prism/node.rb#8858 sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # - # source://prism//lib/prism/node.rb#10039 + # source://prism//lib/prism/node.rb#8848 sig { returns(Prism::Location) } def binary_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10001 + # source://prism//lib/prism/node.rb#8810 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10011 + # source://prism//lib/prism/node.rb#8820 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10006 + # source://prism//lib/prism/node.rb#8815 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol, ?location: Location) -> InstanceVariableOperatorWriteNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> InstanceVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#10016 + # source://prism//lib/prism/node.rb#8825 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, binary_operator_loc: Prism::Location, value: Prism::Node, - binary_operator: Symbol, - location: Prism::Location + binary_operator: Symbol ).returns(Prism::InstanceVariableOperatorWriteNode) end - def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10001 + # source://prism//lib/prism/node.rb#8810 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } # - # source://prism//lib/prism/node.rb#10024 + # source://prism//lib/prism/node.rb#8833 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # source://prism//lib/prism/desugar_compiler.rb#193 + # source://prism//lib/prism/desugar_compiler.rb#230 def desugar; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -18432,68 +19271,50 @@ class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#10052 + # source://prism//lib/prism/node.rb#8861 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#10029 + # source://prism//lib/prism/node.rb#8838 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#10032 + # source://prism//lib/prism/node.rb#8841 sig { returns(Prism::Location) } def name_loc; end # Returns the binary operator used to modify the receiver. This method is # deprecated in favor of #binary_operator. # - # source://prism//lib/prism/node_ext.rb#419 + # source://prism//lib/prism/node_ext.rb#435 def operator; end # Returns the location of the binary operator used to modify the receiver. # This method is deprecated in favor of #binary_operator_loc. # - # source://prism//lib/prism/node_ext.rb#426 + # source://prism//lib/prism/node_ext.rb#442 def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#10070 + # source://prism//lib/prism/node.rb#8866 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#10046 + # source://prism//lib/prism/node.rb#8855 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#10080 + # source://prism//lib/prism/node.rb#8871 def type; end end end @@ -18503,83 +19324,87 @@ end # @target ||= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#10100 +# source://prism//lib/prism/node.rb#8891 class Prism::InstanceVariableOrWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void + # Initialize a new InstanceVariableOrWriteNode node. # # @return [InstanceVariableOrWriteNode] a new instance of InstanceVariableOrWriteNode # - # source://prism//lib/prism/node.rb#10102 + # source://prism//lib/prism/node.rb#8893 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, name, name_loc, operator_loc, value, location); end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#10204 + # source://prism//lib/prism/node.rb#8979 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10112 + # source://prism//lib/prism/node.rb#8905 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10117 + # source://prism//lib/prism/node.rb#8910 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10127 + # source://prism//lib/prism/node.rb#8920 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10122 + # source://prism//lib/prism/node.rb#8915 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> InstanceVariableOrWriteNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> InstanceVariableOrWriteNode # - # source://prism//lib/prism/node.rb#10132 + # source://prism//lib/prism/node.rb#8925 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10117 + # source://prism//lib/prism/node.rb#8910 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#10140 + # source://prism//lib/prism/node.rb#8933 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # source://prism//lib/prism/desugar_compiler.rb#187 + # source://prism//lib/prism/desugar_compiler.rb#224 def desugar; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -18587,68 +19412,50 @@ class Prism::InstanceVariableOrWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#10170 + # source://prism//lib/prism/node.rb#8963 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#10145 + # source://prism//lib/prism/node.rb#8938 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#10148 + # source://prism//lib/prism/node.rb#8941 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#10165 + # source://prism//lib/prism/node.rb#8958 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#10155 + # source://prism//lib/prism/node.rb#8948 sig { returns(Prism::Location) } def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10188 + # source://prism//lib/prism/node.rb#8968 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#10162 + # source://prism//lib/prism/node.rb#8955 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10198 + # source://prism//lib/prism/node.rb#8973 def type; end end end @@ -18658,62 +19465,69 @@ end # @foo # ^^^^ # -# source://prism//lib/prism/node.rb#10217 +# source://prism//lib/prism/node.rb#8992 class Prism::InstanceVariableReadNode < ::Prism::Node - # def initialize: (Symbol name, Location location) -> void + # Initialize a new InstanceVariableReadNode node. # # @return [InstanceVariableReadNode] a new instance of InstanceVariableReadNode # - # source://prism//lib/prism/node.rb#10219 - sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } - def initialize(source, name, location); end + # source://prism//lib/prism/node.rb#8994 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } + def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#10300 + # source://prism//lib/prism/node.rb#9059 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10226 + # source://prism//lib/prism/node.rb#9003 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10231 + # source://prism//lib/prism/node.rb#9008 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10241 + # source://prism//lib/prism/node.rb#9018 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10236 + # source://prism//lib/prism/node.rb#9013 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?location: Location) -> InstanceVariableReadNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> InstanceVariableReadNode # - # source://prism//lib/prism/node.rb#10246 - sig { params(name: Symbol, location: Prism::Location).returns(Prism::InstanceVariableReadNode) } - def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#9023 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::InstanceVariableReadNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10231 + # source://prism//lib/prism/node.rb#9008 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#10254 + # source://prism//lib/prism/node.rb#9031 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -18722,7 +19536,7 @@ class Prism::InstanceVariableReadNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#10266 + # source://prism//lib/prism/node.rb#9043 sig { override.returns(String) } def inspect; end @@ -18732,38 +19546,20 @@ class Prism::InstanceVariableReadNode < ::Prism::Node # # @_test # name `:@_test` # - # source://prism//lib/prism/node.rb#10263 + # source://prism//lib/prism/node.rb#9040 sig { returns(Symbol) } def name; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#10284 + # source://prism//lib/prism/node.rb#9048 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#10294 + # source://prism//lib/prism/node.rb#9053 def type; end end end @@ -18773,62 +19569,69 @@ end # @foo, @bar = baz # ^^^^ ^^^^ # -# source://prism//lib/prism/node.rb#10310 +# source://prism//lib/prism/node.rb#9069 class Prism::InstanceVariableTargetNode < ::Prism::Node - # def initialize: (Symbol name, Location location) -> void + # Initialize a new InstanceVariableTargetNode node. # # @return [InstanceVariableTargetNode] a new instance of InstanceVariableTargetNode # - # source://prism//lib/prism/node.rb#10312 - sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } - def initialize(source, name, location); end + # source://prism//lib/prism/node.rb#9071 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } + def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#10389 + # source://prism//lib/prism/node.rb#9132 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10319 + # source://prism//lib/prism/node.rb#9080 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10324 + # source://prism//lib/prism/node.rb#9085 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10334 + # source://prism//lib/prism/node.rb#9095 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10329 + # source://prism//lib/prism/node.rb#9090 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?location: Location) -> InstanceVariableTargetNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> InstanceVariableTargetNode # - # source://prism//lib/prism/node.rb#10339 - sig { params(name: Symbol, location: Prism::Location).returns(Prism::InstanceVariableTargetNode) } - def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#9100 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::InstanceVariableTargetNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10324 + # source://prism//lib/prism/node.rb#9085 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#10347 + # source://prism//lib/prism/node.rb#9108 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -18837,44 +19640,26 @@ class Prism::InstanceVariableTargetNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#10355 + # source://prism//lib/prism/node.rb#9116 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#10352 + # source://prism//lib/prism/node.rb#9113 sig { returns(Symbol) } def name; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#10373 + # source://prism//lib/prism/node.rb#9121 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10383 + # source://prism//lib/prism/node.rb#9126 def type; end end end @@ -18884,79 +19669,83 @@ end # @foo = 1 # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#10399 +# source://prism//lib/prism/node.rb#9142 class Prism::InstanceVariableWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Prism::node value, Location operator_loc, Location location) -> void + # Initialize a new InstanceVariableWriteNode node. # # @return [InstanceVariableWriteNode] a new instance of InstanceVariableWriteNode # - # source://prism//lib/prism/node.rb#10401 + # source://prism//lib/prism/node.rb#9144 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, value: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).void end - def initialize(source, name, name_loc, value, operator_loc, location); end + def initialize(source, node_id, location, flags, name, name_loc, value, operator_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#10519 + # source://prism//lib/prism/node.rb#9246 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10411 + # source://prism//lib/prism/node.rb#9156 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10416 + # source://prism//lib/prism/node.rb#9161 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10426 + # source://prism//lib/prism/node.rb#9171 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10421 + # source://prism//lib/prism/node.rb#9166 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> InstanceVariableWriteNode # - # source://prism//lib/prism/node.rb#10431 + # source://prism//lib/prism/node.rb#9176 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, value: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: 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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10416 + # source://prism//lib/prism/node.rb#9161 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location } # - # source://prism//lib/prism/node.rb#10439 + # source://prism//lib/prism/node.rb#9184 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -18965,7 +19754,7 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#10485 + # source://prism//lib/prism/node.rb#9230 sig { override.returns(String) } def inspect; end @@ -18975,7 +19764,7 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # # @_foo = "bar" # name `@_foo` # - # source://prism//lib/prism/node.rb#10448 + # source://prism//lib/prism/node.rb#9193 sig { returns(Symbol) } def name; end @@ -18984,13 +19773,13 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # @_x = 1 # ^^^ # - # source://prism//lib/prism/node.rb#10454 + # source://prism//lib/prism/node.rb#9199 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#10480 + # source://prism//lib/prism/node.rb#9225 sig { returns(String) } def operator; end @@ -18999,26 +19788,13 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # @x = y # ^ # - # source://prism//lib/prism/node.rb#10473 + # source://prism//lib/prism/node.rb#9218 sig { returns(Prism::Location) } def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10503 + # source://prism//lib/prism/node.rb#9235 sig { override.returns(Symbol) } def type; end @@ -19030,46 +19806,41 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # @_x = 1234 # ^^^^ # - # source://prism//lib/prism/node.rb#10467 + # source://prism//lib/prism/node.rb#9212 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#10513 + # source://prism//lib/prism/node.rb#9240 def type; end end end # Flags for integer nodes that correspond to the base of the integer. # -# source://prism//lib/prism/node.rb#19166 +# source://prism//lib/prism/node.rb#16732 module Prism::IntegerBaseFlags; end # 0b prefix # -# source://prism//lib/prism/node.rb#19168 +# source://prism//lib/prism/node.rb#16734 Prism::IntegerBaseFlags::BINARY = T.let(T.unsafe(nil), Integer) # 0d or no prefix # -# source://prism//lib/prism/node.rb#19171 +# source://prism//lib/prism/node.rb#16737 Prism::IntegerBaseFlags::DECIMAL = T.let(T.unsafe(nil), Integer) # 0x prefix # -# source://prism//lib/prism/node.rb#19177 +# source://prism//lib/prism/node.rb#16743 Prism::IntegerBaseFlags::HEXADECIMAL = T.let(T.unsafe(nil), Integer) # 0o or 0 prefix # -# source://prism//lib/prism/node.rb#19174 +# source://prism//lib/prism/node.rb#16740 Prism::IntegerBaseFlags::OCTAL = T.let(T.unsafe(nil), Integer) # Represents an integer number literal. @@ -19077,25 +19848,33 @@ Prism::IntegerBaseFlags::OCTAL = T.let(T.unsafe(nil), Integer) # 1 # ^ # -# source://prism//lib/prism/node.rb#10532 +# source://prism//lib/prism/node.rb#9259 class Prism::IntegerNode < ::Prism::Node - # def initialize: (Integer flags, Integer value, Location location) -> void + # Initialize a new IntegerNode node. # # @return [IntegerNode] a new instance of IntegerNode # - # source://prism//lib/prism/node.rb#10534 - sig { params(source: Prism::Source, flags: Integer, value: Integer, location: Prism::Location).void } - def initialize(source, flags, value, location); end + # source://prism//lib/prism/node.rb#9261 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Integer + ).void + end + def initialize(source, node_id, location, flags, value); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#10636 + # source://prism//lib/prism/node.rb#9342 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10542 + # source://prism//lib/prism/node.rb#9270 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -19103,52 +19882,59 @@ class Prism::IntegerNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10582 + # source://prism//lib/prism/node.rb#9303 sig { returns(T::Boolean) } def binary?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10547 + # source://prism//lib/prism/node.rb#9275 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10557 + # source://prism//lib/prism/node.rb#9285 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10552 + # source://prism//lib/prism/node.rb#9280 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?flags: Integer, ?value: Integer, ?location: Location) -> IntegerNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Integer) -> IntegerNode # - # source://prism//lib/prism/node.rb#10562 - sig { params(flags: Integer, value: Integer, location: Prism::Location).returns(Prism::IntegerNode) } - def copy(flags: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#9290 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Integer + ).returns(Prism::IntegerNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil)); end # def decimal?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10587 + # source://prism//lib/prism/node.rb#9308 sig { returns(T::Boolean) } def decimal?; end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10547 + # source://prism//lib/prism/node.rb#9275 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, value: Integer, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Integer } # - # source://prism//lib/prism/node.rb#10570 + # source://prism//lib/prism/node.rb#9298 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -19159,13 +19945,13 @@ class Prism::IntegerNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10597 + # source://prism//lib/prism/node.rb#9318 sig { returns(T::Boolean) } def hexadecimal?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#10602 + # source://prism//lib/prism/node.rb#9326 sig { override.returns(String) } def inspect; end @@ -19173,52 +19959,26 @@ class Prism::IntegerNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10592 + # source://prism//lib/prism/node.rb#9313 sig { returns(T::Boolean) } def octal?; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#10620 + # source://prism//lib/prism/node.rb#9331 sig { override.returns(Symbol) } def type; end # The value of the integer literal as a number. # - # source://prism//lib/prism/node.rb#10579 + # source://prism//lib/prism/node.rb#9323 sig { returns(Integer) } def value; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#10575 - 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#10630 + # source://prism//lib/prism/node.rb#9336 def type; end end end @@ -19228,36 +19988,37 @@ end # if /foo #{bar} baz/ then end # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#10647 +# source://prism//lib/prism/node.rb#9353 class Prism::InterpolatedMatchLastLineNode < ::Prism::Node include ::Prism::RegularExpressionOptions - # def initialize: (Integer flags, Location opening_loc, Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] parts, Location closing_loc, Location location) -> void + # Initialize a new InterpolatedMatchLastLineNode node. # # @return [InterpolatedMatchLastLineNode] a new instance of InterpolatedMatchLastLineNode # - # source://prism//lib/prism/node.rb#10649 + # source://prism//lib/prism/node.rb#9355 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, opening_loc: Prism::Location, parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: Prism::Location ).void end - def initialize(source, flags, opening_loc, parts, closing_loc, location); end + def initialize(source, node_id, location, flags, opening_loc, parts, closing_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#10812 + # source://prism//lib/prism/node.rb#9497 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10659 + # source://prism//lib/prism/node.rb#9366 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -19265,64 +20026,65 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10738 + # source://prism//lib/prism/node.rb#9424 sig { returns(T::Boolean) } def ascii_8bit?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10664 + # source://prism//lib/prism/node.rb#9371 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#10773 + # source://prism//lib/prism/node.rb#9476 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#10706 + # source://prism//lib/prism/node.rb#9464 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10674 + # source://prism//lib/prism/node.rb#9381 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10669 + # source://prism//lib/prism/node.rb#9376 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location) -> InterpolatedMatchLastLineNode # - # source://prism//lib/prism/node.rb#10679 + # source://prism//lib/prism/node.rb#9386 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, opening_loc: Prism::Location, parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: 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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10664 + # source://prism//lib/prism/node.rb#9371 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location } # - # source://prism//lib/prism/node.rb#10687 + # source://prism//lib/prism/node.rb#9394 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -19330,7 +20092,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10733 + # source://prism//lib/prism/node.rb#9419 sig { returns(T::Boolean) } def euc_jp?; end @@ -19338,7 +20100,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10718 + # source://prism//lib/prism/node.rb#9404 sig { returns(T::Boolean) } def extended?; end @@ -19349,7 +20111,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10758 + # source://prism//lib/prism/node.rb#9444 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -19357,7 +20119,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10763 + # source://prism//lib/prism/node.rb#9449 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end @@ -19365,7 +20127,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10753 + # source://prism//lib/prism/node.rb#9439 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -19373,13 +20135,13 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10713 + # source://prism//lib/prism/node.rb#9399 sig { returns(T::Boolean) } def ignore_case?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#10778 + # source://prism//lib/prism/node.rb#9481 sig { override.returns(String) } def inspect; end @@ -19387,30 +20149,30 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10723 + # source://prism//lib/prism/node.rb#9409 sig { returns(T::Boolean) } def multi_line?; end # source://prism//lib/prism/parse_result/newlines.rb#121 - def newline!(lines); end + def newline_flag!(lines); end # def once?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10728 + # source://prism//lib/prism/node.rb#9414 sig { returns(T::Boolean) } def once?; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#10768 + # source://prism//lib/prism/node.rb#9471 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#10696 + # source://prism//lib/prism/node.rb#9454 sig { returns(Prism::Location) } def opening_loc; end @@ -19419,26 +20181,13 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] # - # source://prism//lib/prism/node.rb#10703 + # source://prism//lib/prism/node.rb#9461 sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } def parts; 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. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10796 + # source://prism//lib/prism/node.rb#9486 sig { override.returns(Symbol) } def type; end @@ -19446,7 +20195,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10748 + # source://prism//lib/prism/node.rb#9434 sig { returns(T::Boolean) } def utf_8?; end @@ -19454,27 +20203,14 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10743 + # source://prism//lib/prism/node.rb#9429 sig { returns(T::Boolean) } def windows_31j?; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#10692 - 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#10806 + # source://prism//lib/prism/node.rb#9491 def type; end end end @@ -19484,36 +20220,37 @@ end # /foo #{bar} baz/ # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#10826 +# source://prism//lib/prism/node.rb#9511 class Prism::InterpolatedRegularExpressionNode < ::Prism::Node include ::Prism::RegularExpressionOptions - # def initialize: (Integer flags, Location opening_loc, Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] parts, Location closing_loc, Location location) -> void + # Initialize a new InterpolatedRegularExpressionNode node. # # @return [InterpolatedRegularExpressionNode] a new instance of InterpolatedRegularExpressionNode # - # source://prism//lib/prism/node.rb#10828 + # source://prism//lib/prism/node.rb#9513 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, opening_loc: Prism::Location, parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: Prism::Location ).void end - def initialize(source, flags, opening_loc, parts, closing_loc, location); end + def initialize(source, node_id, location, flags, opening_loc, parts, closing_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#10991 + # source://prism//lib/prism/node.rb#9655 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10838 + # source://prism//lib/prism/node.rb#9524 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -19521,64 +20258,65 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10917 + # source://prism//lib/prism/node.rb#9582 sig { returns(T::Boolean) } def ascii_8bit?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10843 + # source://prism//lib/prism/node.rb#9529 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#10952 + # source://prism//lib/prism/node.rb#9634 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#10885 + # source://prism//lib/prism/node.rb#9622 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10853 + # source://prism//lib/prism/node.rb#9539 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#10848 + # source://prism//lib/prism/node.rb#9534 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location) -> InterpolatedRegularExpressionNode # - # source://prism//lib/prism/node.rb#10858 + # source://prism//lib/prism/node.rb#9544 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, opening_loc: Prism::Location, parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: 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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10843 + # source://prism//lib/prism/node.rb#9529 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location } # - # source://prism//lib/prism/node.rb#10866 + # source://prism//lib/prism/node.rb#9552 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -19586,7 +20324,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10912 + # source://prism//lib/prism/node.rb#9577 sig { returns(T::Boolean) } def euc_jp?; end @@ -19594,7 +20332,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10897 + # source://prism//lib/prism/node.rb#9562 sig { returns(T::Boolean) } def extended?; end @@ -19605,7 +20343,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10937 + # source://prism//lib/prism/node.rb#9602 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -19613,7 +20351,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10942 + # source://prism//lib/prism/node.rb#9607 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end @@ -19621,7 +20359,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10932 + # source://prism//lib/prism/node.rb#9597 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -19629,13 +20367,13 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10892 + # source://prism//lib/prism/node.rb#9557 sig { returns(T::Boolean) } def ignore_case?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#10957 + # source://prism//lib/prism/node.rb#9639 sig { override.returns(String) } def inspect; end @@ -19643,30 +20381,30 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10902 + # source://prism//lib/prism/node.rb#9567 sig { returns(T::Boolean) } def multi_line?; end # source://prism//lib/prism/parse_result/newlines.rb#128 - def newline!(lines); end + def newline_flag!(lines); end # def once?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10907 + # source://prism//lib/prism/node.rb#9572 sig { returns(T::Boolean) } def once?; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#10947 + # source://prism//lib/prism/node.rb#9629 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#10875 + # source://prism//lib/prism/node.rb#9612 sig { returns(Prism::Location) } def opening_loc; end @@ -19675,26 +20413,13 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] # - # source://prism//lib/prism/node.rb#10882 + # source://prism//lib/prism/node.rb#9619 sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } def parts; 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. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#10975 + # source://prism//lib/prism/node.rb#9644 sig { override.returns(Symbol) } def type; end @@ -19702,7 +20427,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10927 + # source://prism//lib/prism/node.rb#9592 sig { returns(T::Boolean) } def utf_8?; end @@ -19710,27 +20435,14 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10922 + # source://prism//lib/prism/node.rb#9587 sig { returns(T::Boolean) } def windows_31j?; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#10871 - 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10985 + # source://prism//lib/prism/node.rb#9649 def type; end end end @@ -19740,93 +20452,95 @@ end # "foo #{bar} baz" # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11005 +# source://prism//lib/prism/node.rb#9669 class Prism::InterpolatedStringNode < ::Prism::Node include ::Prism::HeredocQuery - # def initialize: (Integer flags, Location? opening_loc, Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode] parts, Location? closing_loc, Location location) -> void + # Initialize a new InterpolatedStringNode node. # # @return [InterpolatedStringNode] a new instance of InterpolatedStringNode # - # source://prism//lib/prism/node.rb#11007 + # source://prism//lib/prism/node.rb#9671 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, opening_loc: T.nilable(Prism::Location), parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode, Prism::InterpolatedStringNode)], - closing_loc: T.nilable(Prism::Location), - location: Prism::Location + closing_loc: T.nilable(Prism::Location) ).void end - def initialize(source, flags, opening_loc, parts, closing_loc, location); end + def initialize(source, node_id, location, flags, opening_loc, parts, closing_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#11137 + # source://prism//lib/prism/node.rb#9780 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11017 + # source://prism//lib/prism/node.rb#9682 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11022 + # source://prism//lib/prism/node.rb#9687 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#11098 + # source://prism//lib/prism/node.rb#9759 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#11070 + # source://prism//lib/prism/node.rb#9741 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11032 + # source://prism//lib/prism/node.rb#9697 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11027 + # source://prism//lib/prism/node.rb#9692 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode], ?closing_loc: Location?) -> InterpolatedStringNode # - # source://prism//lib/prism/node.rb#11037 + # source://prism//lib/prism/node.rb#9702 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, opening_loc: T.nilable(Prism::Location), parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode, Prism::InterpolatedStringNode)], - closing_loc: T.nilable(Prism::Location), - location: Prism::Location + closing_loc: T.nilable(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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11022 + # source://prism//lib/prism/node.rb#9687 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location?, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode], closing_loc: Location?, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode], closing_loc: Location? } # - # source://prism//lib/prism/node.rb#11045 + # source://prism//lib/prism/node.rb#9710 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -19837,7 +20551,7 @@ class Prism::InterpolatedStringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11083 + # source://prism//lib/prism/node.rb#9715 sig { returns(T::Boolean) } def frozen?; end @@ -19846,7 +20560,7 @@ class Prism::InterpolatedStringNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#11103 + # source://prism//lib/prism/node.rb#9764 sig { override.returns(String) } def inspect; end @@ -19854,82 +20568,56 @@ class Prism::InterpolatedStringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11088 + # source://prism//lib/prism/node.rb#9720 sig { returns(T::Boolean) } def mutable?; end # source://prism//lib/prism/parse_result/newlines.rb#135 - def newline!(lines); end + def newline_flag!(lines); end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#11093 + # source://prism//lib/prism/node.rb#9754 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#11054 + # source://prism//lib/prism/node.rb#9725 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode] # - # source://prism//lib/prism/node.rb#11067 + # source://prism//lib/prism/node.rb#9738 sig do returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode, Prism::InterpolatedStringNode)]) end def parts; end - # 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. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11121 + # source://prism//lib/prism/node.rb#9769 sig { override.returns(Symbol) } def type; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#11050 - 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#11131 + # source://prism//lib/prism/node.rb#9774 def type; end end end # Flags for interpolated string nodes that indicated mutability if they are also marked as literals. # -# source://prism//lib/prism/node.rb#19181 +# source://prism//lib/prism/node.rb#16747 module Prism::InterpolatedStringNodeFlags; end -# source://prism//lib/prism/node.rb#19183 +# source://prism//lib/prism/node.rb#16749 Prism::InterpolatedStringNodeFlags::FROZEN = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/node.rb#19186 +# source://prism//lib/prism/node.rb#16752 Prism::InterpolatedStringNodeFlags::MUTABLE = T.let(T.unsafe(nil), Integer) # Represents a symbol literal that contains interpolation. @@ -19937,89 +20625,93 @@ Prism::InterpolatedStringNodeFlags::MUTABLE = T.let(T.unsafe(nil), Integer) # :"foo #{bar} baz" # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11151 +# source://prism//lib/prism/node.rb#9794 class Prism::InterpolatedSymbolNode < ::Prism::Node - # def initialize: (Location? opening_loc, Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] parts, Location? closing_loc, Location location) -> void + # Initialize a new InterpolatedSymbolNode node. # # @return [InterpolatedSymbolNode] a new instance of InterpolatedSymbolNode # - # source://prism//lib/prism/node.rb#11153 + # source://prism//lib/prism/node.rb#9796 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, opening_loc: T.nilable(Prism::Location), parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], - closing_loc: T.nilable(Prism::Location), - location: Prism::Location + closing_loc: T.nilable(Prism::Location) ).void end - def initialize(source, opening_loc, parts, closing_loc, location); end + def initialize(source, node_id, location, flags, opening_loc, parts, closing_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#11268 + # source://prism//lib/prism/node.rb#9895 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11162 + # source://prism//lib/prism/node.rb#9807 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11167 + # source://prism//lib/prism/node.rb#9812 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#11229 + # source://prism//lib/prism/node.rb#9874 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#11211 + # source://prism//lib/prism/node.rb#9856 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11177 + # source://prism//lib/prism/node.rb#9822 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11172 + # source://prism//lib/prism/node.rb#9817 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location?) -> InterpolatedSymbolNode # - # source://prism//lib/prism/node.rb#11182 + # source://prism//lib/prism/node.rb#9827 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, opening_loc: T.nilable(Prism::Location), parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], - closing_loc: T.nilable(Prism::Location), - location: Prism::Location + closing_loc: T.nilable(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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11167 + # source://prism//lib/prism/node.rb#9812 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location?, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location?, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location? } # - # source://prism//lib/prism/node.rb#11190 + # source://prism//lib/prism/node.rb#9835 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -20028,59 +20720,41 @@ class Prism::InterpolatedSymbolNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#11234 + # source://prism//lib/prism/node.rb#9879 sig { override.returns(String) } def inspect; end # source://prism//lib/prism/parse_result/newlines.rb#142 - def newline!(lines); end + def newline_flag!(lines); end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#11224 + # source://prism//lib/prism/node.rb#9869 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#11195 + # source://prism//lib/prism/node.rb#9840 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] # - # source://prism//lib/prism/node.rb#11208 + # source://prism//lib/prism/node.rb#9853 sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } def parts; 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. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#11252 + # source://prism//lib/prism/node.rb#9884 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11262 + # source://prism//lib/prism/node.rb#9889 def type; end end end @@ -20090,91 +20764,95 @@ end # `foo #{bar} baz` # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11281 +# source://prism//lib/prism/node.rb#9908 class Prism::InterpolatedXStringNode < ::Prism::Node include ::Prism::HeredocQuery - # def initialize: (Location opening_loc, Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] parts, Location closing_loc, Location location) -> void + # Initialize a new InterpolatedXStringNode node. # # @return [InterpolatedXStringNode] a new instance of InterpolatedXStringNode # - # source://prism//lib/prism/node.rb#11283 + # source://prism//lib/prism/node.rb#9910 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, opening_loc: Prism::Location, parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: Prism::Location ).void end - def initialize(source, opening_loc, parts, closing_loc, location); end + def initialize(source, node_id, location, flags, opening_loc, parts, closing_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#11386 + # source://prism//lib/prism/node.rb#9997 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11292 + # source://prism//lib/prism/node.rb#9921 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11297 + # source://prism//lib/prism/node.rb#9926 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#11347 + # source://prism//lib/prism/node.rb#9976 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#11335 + # source://prism//lib/prism/node.rb#9964 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11307 + # source://prism//lib/prism/node.rb#9936 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11302 + # source://prism//lib/prism/node.rb#9931 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location) -> InterpolatedXStringNode # - # source://prism//lib/prism/node.rb#11312 + # source://prism//lib/prism/node.rb#9941 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, opening_loc: Prism::Location, parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: 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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11297 + # source://prism//lib/prism/node.rb#9926 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location } # - # source://prism//lib/prism/node.rb#11320 + # source://prism//lib/prism/node.rb#9949 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -20186,59 +20864,41 @@ class Prism::InterpolatedXStringNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#11352 + # source://prism//lib/prism/node.rb#9981 sig { override.returns(String) } def inspect; end # source://prism//lib/prism/parse_result/newlines.rb#149 - def newline!(lines); end + def newline_flag!(lines); end # def opening: () -> String # - # source://prism//lib/prism/node.rb#11342 + # source://prism//lib/prism/node.rb#9971 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#11325 + # source://prism//lib/prism/node.rb#9954 sig { returns(Prism::Location) } def opening_loc; end # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] # - # source://prism//lib/prism/node.rb#11332 + # source://prism//lib/prism/node.rb#9961 sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } def parts; 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. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11370 + # source://prism//lib/prism/node.rb#9986 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11380 + # source://prism//lib/prism/node.rb#9991 def type; end end end @@ -20248,62 +20908,62 @@ end # -> { it } # ^^ # -# source://prism//lib/prism/node.rb#11399 +# source://prism//lib/prism/node.rb#10010 class Prism::ItLocalVariableReadNode < ::Prism::Node - # def initialize: (Location location) -> void + # Initialize a new ItLocalVariableReadNode node. # # @return [ItLocalVariableReadNode] a new instance of ItLocalVariableReadNode # - # source://prism//lib/prism/node.rb#11401 - sig { params(source: Prism::Source, location: Prism::Location).void } - def initialize(source, location); end + # source://prism//lib/prism/node.rb#10012 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#11474 + # source://prism//lib/prism/node.rb#10069 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11407 + # source://prism//lib/prism/node.rb#10020 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11412 + # source://prism//lib/prism/node.rb#10025 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11422 + # source://prism//lib/prism/node.rb#10035 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11417 + # source://prism//lib/prism/node.rb#10030 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?location: Location) -> ItLocalVariableReadNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ItLocalVariableReadNode # - # source://prism//lib/prism/node.rb#11427 - sig { params(location: Prism::Location).returns(Prism::ItLocalVariableReadNode) } - def copy(location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#10040 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::ItLocalVariableReadNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11412 + # source://prism//lib/prism/node.rb#10025 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#11435 + # source://prism//lib/prism/node.rb#10048 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -20312,38 +20972,20 @@ class Prism::ItLocalVariableReadNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#11440 + # source://prism//lib/prism/node.rb#10053 sig { override.returns(String) } def inspect; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#11458 + # source://prism//lib/prism/node.rb#10058 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#11468 + # source://prism//lib/prism/node.rb#10063 def type; end end end @@ -20353,62 +20995,62 @@ end # -> { it + it } # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11483 +# source://prism//lib/prism/node.rb#10078 class Prism::ItParametersNode < ::Prism::Node - # def initialize: (Location location) -> void + # Initialize a new ItParametersNode node. # # @return [ItParametersNode] a new instance of ItParametersNode # - # source://prism//lib/prism/node.rb#11485 - sig { params(source: Prism::Source, location: Prism::Location).void } - def initialize(source, location); end + # source://prism//lib/prism/node.rb#10080 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#11558 + # source://prism//lib/prism/node.rb#10137 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11491 + # source://prism//lib/prism/node.rb#10088 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11496 + # source://prism//lib/prism/node.rb#10093 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11506 + # source://prism//lib/prism/node.rb#10103 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11501 + # source://prism//lib/prism/node.rb#10098 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?location: Location) -> ItParametersNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ItParametersNode # - # source://prism//lib/prism/node.rb#11511 - sig { params(location: Prism::Location).returns(Prism::ItParametersNode) } - def copy(location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#10108 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::ItParametersNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11496 + # source://prism//lib/prism/node.rb#10093 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#11519 + # source://prism//lib/prism/node.rb#10116 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -20417,38 +21059,20 @@ class Prism::ItParametersNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#11524 + # source://prism//lib/prism/node.rb#10121 sig { override.returns(String) } def inspect; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11542 + # source://prism//lib/prism/node.rb#10126 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#11552 + # source://prism//lib/prism/node.rb#10131 def type; end end end @@ -20458,81 +21082,83 @@ end # foo(a: b) # ^^^^ # -# source://prism//lib/prism/node.rb#11567 +# source://prism//lib/prism/node.rb#10146 class Prism::KeywordHashNode < ::Prism::Node - # def initialize: (Integer flags, Array[AssocNode | AssocSplatNode] elements, Location location) -> void + # Initialize a new KeywordHashNode node. # # @return [KeywordHashNode] a new instance of KeywordHashNode # - # source://prism//lib/prism/node.rb#11569 + # source://prism//lib/prism/node.rb#10148 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, - elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)], - location: Prism::Location + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)] ).void end - def initialize(source, flags, elements, location); end + def initialize(source, node_id, location, flags, elements); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#11656 + # source://prism//lib/prism/node.rb#10214 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11577 + # source://prism//lib/prism/node.rb#10157 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11582 + # source://prism//lib/prism/node.rb#10162 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11592 + # source://prism//lib/prism/node.rb#10172 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11587 + # source://prism//lib/prism/node.rb#10167 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?flags: Integer, ?elements: Array[AssocNode | AssocSplatNode], ?location: Location) -> KeywordHashNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?elements: Array[AssocNode | AssocSplatNode]) -> KeywordHashNode # - # source://prism//lib/prism/node.rb#11597 + # source://prism//lib/prism/node.rb#10177 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, - elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)], - location: Prism::Location + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)] ).returns(Prism::KeywordHashNode) end - def copy(flags: T.unsafe(nil), elements: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), elements: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11582 + # source://prism//lib/prism/node.rb#10162 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, elements: Array[AssocNode | AssocSplatNode], location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, elements: Array[AssocNode | AssocSplatNode] } # - # source://prism//lib/prism/node.rb#11605 + # source://prism//lib/prism/node.rb#10185 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader elements: Array[AssocNode | AssocSplatNode] # - # source://prism//lib/prism/node.rb#11614 + # source://prism//lib/prism/node.rb#10195 sig { returns(T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)]) } def elements; end @@ -20541,7 +21167,7 @@ class Prism::KeywordHashNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#11622 + # source://prism//lib/prism/node.rb#10198 sig { override.returns(String) } def inspect; end @@ -20549,58 +21175,32 @@ class Prism::KeywordHashNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11617 + # source://prism//lib/prism/node.rb#10190 sig { returns(T::Boolean) } def symbol_keys?; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#11640 + # source://prism//lib/prism/node.rb#10203 sig { override.returns(Symbol) } def type; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#11610 - 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11650 + # source://prism//lib/prism/node.rb#10208 def type; end end end # Flags for keyword hash nodes. # -# source://prism//lib/prism/node.rb#19190 +# source://prism//lib/prism/node.rb#16756 module Prism::KeywordHashNodeFlags; end # a keyword hash which only has `AssocNode` elements all with symbol keys, which means the elements can be treated as keyword arguments # -# source://prism//lib/prism/node.rb#19192 +# source://prism//lib/prism/node.rb#16758 Prism::KeywordHashNodeFlags::SYMBOL_KEYS = T.let(T.unsafe(nil), Integer) # Represents a keyword rest parameter to a method, block, or lambda definition. @@ -20609,79 +21209,81 @@ Prism::KeywordHashNodeFlags::SYMBOL_KEYS = T.let(T.unsafe(nil), Integer) # ^^^ # end # -# source://prism//lib/prism/node.rb#11669 +# source://prism//lib/prism/node.rb#10227 class Prism::KeywordRestParameterNode < ::Prism::Node - # def initialize: (Integer flags, Symbol? name, Location? name_loc, Location operator_loc, Location location) -> void + # Initialize a new KeywordRestParameterNode node. # # @return [KeywordRestParameterNode] a new instance of KeywordRestParameterNode # - # source://prism//lib/prism/node.rb#11671 + # source://prism//lib/prism/node.rb#10229 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, name: T.nilable(Symbol), name_loc: T.nilable(Prism::Location), - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).void end - def initialize(source, flags, name, name_loc, operator_loc, location); end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#11785 + # source://prism//lib/prism/node.rb#10322 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11681 + # source://prism//lib/prism/node.rb#10240 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11686 + # source://prism//lib/prism/node.rb#10245 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11696 + # source://prism//lib/prism/node.rb#10255 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11691 + # source://prism//lib/prism/node.rb#10250 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location) -> KeywordRestParameterNode # - # source://prism//lib/prism/node.rb#11701 + # source://prism//lib/prism/node.rb#10260 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, name: T.nilable(Symbol), name_loc: T.nilable(Prism::Location), - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: 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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11686 + # source://prism//lib/prism/node.rb#10245 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol?, name_loc: Location?, operator_loc: Location } # - # source://prism//lib/prism/node.rb#11709 + # source://prism//lib/prism/node.rb#10268 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -20690,31 +21292,31 @@ class Prism::KeywordRestParameterNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#11751 + # source://prism//lib/prism/node.rb#10306 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol? # - # source://prism//lib/prism/node.rb#11718 + # source://prism//lib/prism/node.rb#10278 sig { returns(T.nilable(Symbol)) } def name; end # attr_reader name_loc: Location? # - # source://prism//lib/prism/node.rb#11721 + # source://prism//lib/prism/node.rb#10281 sig { returns(T.nilable(Prism::Location)) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#11746 + # source://prism//lib/prism/node.rb#10301 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#11734 + # source://prism//lib/prism/node.rb#10294 sig { returns(Prism::Location) } def operator_loc; end @@ -20722,46 +21324,20 @@ class Prism::KeywordRestParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11741 + # source://prism//lib/prism/node.rb#10273 sig { returns(T::Boolean) } def repeated_parameter?; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#11769 + # source://prism//lib/prism/node.rb#10311 sig { override.returns(Symbol) } def type; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#11714 - 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#11779 + # source://prism//lib/prism/node.rb#10316 def type; end end end @@ -20771,101 +21347,105 @@ end # ->(value) { value * 2 } # ^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11798 +# source://prism//lib/prism/node.rb#10335 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 + # Initialize a new LambdaNode node. # # @return [LambdaNode] a new instance of LambdaNode # - # source://prism//lib/prism/node.rb#11800 + # source://prism//lib/prism/node.rb#10337 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, locals: T::Array[Symbol], operator_loc: Prism::Location, opening_loc: Prism::Location, closing_loc: Prism::Location, - parameters: T.nilable(Prism::Node), - body: T.nilable(Prism::Node), - location: Prism::Location + parameters: T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)) ).void end - def initialize(source, locals, operator_loc, opening_loc, closing_loc, parameters, body, location); end + def initialize(source, node_id, location, flags, locals, operator_loc, opening_loc, closing_loc, parameters, body); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#11927 + # source://prism//lib/prism/node.rb#10448 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11812 + # source://prism//lib/prism/node.rb#10351 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # attr_reader body: Prism::node? + # attr_reader body: StatementsNode | BeginNode | nil # - # source://prism//lib/prism/node.rb#11875 - sig { returns(T.nilable(Prism::Node)) } + # source://prism//lib/prism/node.rb#10414 + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11817 + # source://prism//lib/prism/node.rb#10356 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#11888 + # source://prism//lib/prism/node.rb#10427 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#11865 + # source://prism//lib/prism/node.rb#10404 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11830 + # source://prism//lib/prism/node.rb#10369 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11822 + # source://prism//lib/prism/node.rb#10361 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?operator_loc: Location, ?opening_loc: Location, ?closing_loc: Location, ?parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil, ?body: StatementsNode | BeginNode | nil) -> LambdaNode # - # source://prism//lib/prism/node.rb#11835 + # source://prism//lib/prism/node.rb#10374 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, locals: T::Array[Symbol], operator_loc: Prism::Location, opening_loc: Prism::Location, closing_loc: Prism::Location, - parameters: T.nilable(Prism::Node), - body: T.nilable(Prism::Node), - location: Prism::Location + parameters: T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)) ).returns(Prism::LambdaNode) end - def copy(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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11817 + # source://prism//lib/prism/node.rb#10356 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], operator_loc: Location, opening_loc: Location, closing_loc: Location, parameters: Prism::node?, body: Prism::node?, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], operator_loc: Location, opening_loc: Location, closing_loc: Location, parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil, body: StatementsNode | BeginNode | nil } # - # source://prism//lib/prism/node.rb#11843 + # source://prism//lib/prism/node.rb#10382 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -20874,74 +21454,56 @@ class Prism::LambdaNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#11893 + # source://prism//lib/prism/node.rb#10432 sig { override.returns(String) } def inspect; end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#11848 + # source://prism//lib/prism/node.rb#10387 sig { returns(T::Array[Symbol]) } def locals; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#11883 + # source://prism//lib/prism/node.rb#10422 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#11858 + # source://prism//lib/prism/node.rb#10397 sig { returns(Prism::Location) } def opening_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#11878 + # source://prism//lib/prism/node.rb#10417 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#11851 + # source://prism//lib/prism/node.rb#10390 sig { returns(Prism::Location) } def operator_loc; end - # attr_reader parameters: Prism::node? + # attr_reader parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil # - # source://prism//lib/prism/node.rb#11872 - sig { returns(T.nilable(Prism::Node)) } + # source://prism//lib/prism/node.rb#10411 + sig { returns(T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode))) } def parameters; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#11911 + # source://prism//lib/prism/node.rb#10437 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11921 + # source://prism//lib/prism/node.rb#10442 def type; end end end @@ -21197,13 +21759,13 @@ end # This is a result specific to the `lex` and `lex_file` methods. # -# source://prism//lib/prism/parse_result.rb#610 +# source://prism//lib/prism/parse_result.rb#764 class Prism::LexResult < ::Prism::Result # Create a new lex result object with the given values. # # @return [LexResult] a new instance of LexResult # - # source://prism//lib/prism/parse_result.rb#615 + # source://prism//lib/prism/parse_result.rb#769 sig do params( value: T::Array[T.untyped], @@ -21219,13 +21781,13 @@ class Prism::LexResult < ::Prism::Result # Implement the hash pattern matching interface for LexResult. # - # source://prism//lib/prism/parse_result.rb#621 + # source://prism//lib/prism/parse_result.rb#775 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # The list of tokens that were parsed from the source code. # - # source://prism//lib/prism/parse_result.rb#612 + # source://prism//lib/prism/parse_result.rb#766 sig { returns(T::Array[T.untyped]) } def value; end end @@ -21257,91 +21819,95 @@ end # target &&= value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11943 +# source://prism//lib/prism/node.rb#10464 class Prism::LocalVariableAndWriteNode < ::Prism::Node - # def initialize: (Location name_loc, Location operator_loc, Prism::node value, Symbol name, Integer depth, Location location) -> void + # Initialize a new LocalVariableAndWriteNode node. # # @return [LocalVariableAndWriteNode] a new instance of LocalVariableAndWriteNode # - # source://prism//lib/prism/node.rb#11945 + # source://prism//lib/prism/node.rb#10466 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name_loc: Prism::Location, operator_loc: Prism::Location, value: Prism::Node, name: Symbol, - depth: Integer, - location: Prism::Location + depth: Integer ).void end - def initialize(source, name_loc, operator_loc, value, name, depth, location); end + def initialize(source, node_id, location, flags, name_loc, operator_loc, value, name, depth); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#12051 + # source://prism//lib/prism/node.rb#10556 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11956 + # source://prism//lib/prism/node.rb#10479 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11961 + # source://prism//lib/prism/node.rb#10484 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11971 + # source://prism//lib/prism/node.rb#10494 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#11966 + # source://prism//lib/prism/node.rb#10489 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?depth: Integer) -> LocalVariableAndWriteNode # - # source://prism//lib/prism/node.rb#11976 + # source://prism//lib/prism/node.rb#10499 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name_loc: Prism::Location, operator_loc: Prism::Location, value: Prism::Node, name: Symbol, - depth: Integer, - location: Prism::Location + depth: Integer ).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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11961 + # source://prism//lib/prism/node.rb#10484 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name_loc: Location, operator_loc: Location, value: Prism::node, name: Symbol, depth: Integer, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name_loc: Location, operator_loc: Location, value: Prism::node, name: Symbol, depth: Integer } # - # source://prism//lib/prism/node.rb#11984 + # source://prism//lib/prism/node.rb#10507 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader depth: Integer # - # source://prism//lib/prism/node.rb#12009 + # source://prism//lib/prism/node.rb#10532 sig { returns(Integer) } def depth; end - # source://prism//lib/prism/desugar_compiler.rb#199 + # source://prism//lib/prism/desugar_compiler.rb#236 def desugar; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -21349,68 +21915,50 @@ class Prism::LocalVariableAndWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#12017 + # source://prism//lib/prism/node.rb#10540 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#12006 + # source://prism//lib/prism/node.rb#10529 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#11989 + # source://prism//lib/prism/node.rb#10512 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#12012 + # source://prism//lib/prism/node.rb#10535 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#11996 + # source://prism//lib/prism/node.rb#10519 sig { returns(Prism::Location) } def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#12035 + # source://prism//lib/prism/node.rb#10545 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#12003 + # source://prism//lib/prism/node.rb#10526 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12045 + # source://prism//lib/prism/node.rb#10550 def type; end end end @@ -21420,105 +21968,109 @@ end # target += value # ^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#12065 +# source://prism//lib/prism/node.rb#10570 class Prism::LocalVariableOperatorWriteNode < ::Prism::Node - # def initialize: (Location name_loc, Location binary_operator_loc, Prism::node value, Symbol name, Symbol binary_operator, Integer depth, Location location) -> void + # Initialize a new LocalVariableOperatorWriteNode node. # # @return [LocalVariableOperatorWriteNode] a new instance of LocalVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#12067 + # source://prism//lib/prism/node.rb#10572 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name_loc: Prism::Location, binary_operator_loc: Prism::Location, value: Prism::Node, name: Symbol, binary_operator: Symbol, - depth: Integer, - location: Prism::Location + depth: Integer ).void end - def initialize(source, name_loc, binary_operator_loc, value, name, binary_operator, depth, location); end + def initialize(source, node_id, location, flags, name_loc, binary_operator_loc, value, name, binary_operator, depth); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#12172 + # source://prism//lib/prism/node.rb#10661 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12079 + # source://prism//lib/prism/node.rb#10586 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader binary_operator: Symbol # - # source://prism//lib/prism/node.rb#12132 + # source://prism//lib/prism/node.rb#10639 sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # - # source://prism//lib/prism/node.rb#12119 + # source://prism//lib/prism/node.rb#10626 sig { returns(Prism::Location) } def binary_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12084 + # source://prism//lib/prism/node.rb#10591 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12094 + # source://prism//lib/prism/node.rb#10601 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12089 + # source://prism//lib/prism/node.rb#10596 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?binary_operator: Symbol, ?depth: Integer, ?location: Location) -> LocalVariableOperatorWriteNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?binary_operator: Symbol, ?depth: Integer) -> LocalVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#12099 + # source://prism//lib/prism/node.rb#10606 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name_loc: Prism::Location, binary_operator_loc: Prism::Location, value: Prism::Node, name: Symbol, binary_operator: Symbol, - depth: Integer, - location: Prism::Location + depth: Integer ).returns(Prism::LocalVariableOperatorWriteNode) end - def copy(name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), binary_operator: T.unsafe(nil), depth: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), binary_operator: T.unsafe(nil), depth: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12084 + # source://prism//lib/prism/node.rb#10591 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name_loc: Location, binary_operator_loc: Location, value: Prism::node, name: Symbol, binary_operator: Symbol, depth: Integer, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name_loc: Location, binary_operator_loc: Location, value: Prism::node, name: Symbol, binary_operator: Symbol, depth: Integer } # - # source://prism//lib/prism/node.rb#12107 + # source://prism//lib/prism/node.rb#10614 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader depth: Integer # - # source://prism//lib/prism/node.rb#12135 + # source://prism//lib/prism/node.rb#10642 sig { returns(Integer) } def depth; end - # source://prism//lib/prism/desugar_compiler.rb#211 + # source://prism//lib/prism/desugar_compiler.rb#248 def desugar; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -21526,68 +22078,50 @@ class Prism::LocalVariableOperatorWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#12138 + # source://prism//lib/prism/node.rb#10645 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#12129 + # source://prism//lib/prism/node.rb#10636 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#12112 + # source://prism//lib/prism/node.rb#10619 sig { returns(Prism::Location) } def name_loc; end # Returns the binary operator used to modify the receiver. This method is # deprecated in favor of #binary_operator. # - # source://prism//lib/prism/node_ext.rb#435 + # source://prism//lib/prism/node_ext.rb#451 def operator; end # Returns the location of the binary operator used to modify the receiver. # This method is deprecated in favor of #binary_operator_loc. # - # source://prism//lib/prism/node_ext.rb#442 + # source://prism//lib/prism/node_ext.rb#458 def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12156 + # source://prism//lib/prism/node.rb#10650 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#12126 + # source://prism//lib/prism/node.rb#10633 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#12166 + # source://prism//lib/prism/node.rb#10655 def type; end end end @@ -21597,91 +22131,95 @@ end # target ||= value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#12187 +# source://prism//lib/prism/node.rb#10676 class Prism::LocalVariableOrWriteNode < ::Prism::Node - # def initialize: (Location name_loc, Location operator_loc, Prism::node value, Symbol name, Integer depth, Location location) -> void + # Initialize a new LocalVariableOrWriteNode node. # # @return [LocalVariableOrWriteNode] a new instance of LocalVariableOrWriteNode # - # source://prism//lib/prism/node.rb#12189 + # source://prism//lib/prism/node.rb#10678 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name_loc: Prism::Location, operator_loc: Prism::Location, value: Prism::Node, name: Symbol, - depth: Integer, - location: Prism::Location + depth: Integer ).void end - def initialize(source, name_loc, operator_loc, value, name, depth, location); end + def initialize(source, node_id, location, flags, name_loc, operator_loc, value, name, depth); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#12295 + # source://prism//lib/prism/node.rb#10768 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12200 + # source://prism//lib/prism/node.rb#10691 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12205 + # source://prism//lib/prism/node.rb#10696 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12215 + # source://prism//lib/prism/node.rb#10706 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12210 + # source://prism//lib/prism/node.rb#10701 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?depth: Integer) -> LocalVariableOrWriteNode # - # source://prism//lib/prism/node.rb#12220 + # source://prism//lib/prism/node.rb#10711 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name_loc: Prism::Location, operator_loc: Prism::Location, value: Prism::Node, name: Symbol, - depth: Integer, - location: Prism::Location + depth: Integer ).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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12205 + # source://prism//lib/prism/node.rb#10696 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name_loc: Location, operator_loc: Location, value: Prism::node, name: Symbol, depth: Integer, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name_loc: Location, operator_loc: Location, value: Prism::node, name: Symbol, depth: Integer } # - # source://prism//lib/prism/node.rb#12228 + # source://prism//lib/prism/node.rb#10719 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader depth: Integer # - # source://prism//lib/prism/node.rb#12253 + # source://prism//lib/prism/node.rb#10744 sig { returns(Integer) } def depth; end - # source://prism//lib/prism/desugar_compiler.rb#205 + # source://prism//lib/prism/desugar_compiler.rb#242 def desugar; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -21689,68 +22227,50 @@ class Prism::LocalVariableOrWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#12261 + # source://prism//lib/prism/node.rb#10752 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#12250 + # source://prism//lib/prism/node.rb#10741 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#12233 + # source://prism//lib/prism/node.rb#10724 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#12256 + # source://prism//lib/prism/node.rb#10747 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#12240 + # source://prism//lib/prism/node.rb#10731 sig { returns(Prism::Location) } def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#12279 + # source://prism//lib/prism/node.rb#10757 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#12247 + # source://prism//lib/prism/node.rb#10738 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#12289 + # source://prism//lib/prism/node.rb#10762 def type; end end end @@ -21760,62 +22280,79 @@ end # foo # ^^^ # -# source://prism//lib/prism/node.rb#12309 +# source://prism//lib/prism/node.rb#10782 class Prism::LocalVariableReadNode < ::Prism::Node - # def initialize: (Symbol name, Integer depth, Location location) -> void + # Initialize a new LocalVariableReadNode node. # # @return [LocalVariableReadNode] a new instance of LocalVariableReadNode # - # source://prism//lib/prism/node.rb#12311 - sig { params(source: Prism::Source, name: Symbol, depth: Integer, location: Prism::Location).void } - def initialize(source, name, depth, location); end + # source://prism//lib/prism/node.rb#10784 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer + ).void + end + def initialize(source, node_id, location, flags, name, depth); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#12406 + # source://prism//lib/prism/node.rb#10863 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12319 + # source://prism//lib/prism/node.rb#10794 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12324 + # source://prism//lib/prism/node.rb#10799 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12334 + # source://prism//lib/prism/node.rb#10809 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12329 + # source://prism//lib/prism/node.rb#10804 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?depth: Integer, ?location: Location) -> LocalVariableReadNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?depth: Integer) -> LocalVariableReadNode # - # source://prism//lib/prism/node.rb#12339 - sig { params(name: Symbol, depth: Integer, location: Prism::Location).returns(Prism::LocalVariableReadNode) } - def copy(name: T.unsafe(nil), depth: T.unsafe(nil), location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#10814 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer + ).returns(Prism::LocalVariableReadNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12324 + # source://prism//lib/prism/node.rb#10799 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, depth: Integer, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, depth: Integer } # - # source://prism//lib/prism/node.rb#12347 + # source://prism//lib/prism/node.rb#10822 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -21827,7 +22364,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#12369 + # source://prism//lib/prism/node.rb#10844 sig { returns(Integer) } def depth; end @@ -21836,7 +22373,7 @@ class Prism::LocalVariableReadNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#12372 + # source://prism//lib/prism/node.rb#10847 sig { override.returns(String) } def inspect; end @@ -21850,38 +22387,20 @@ class Prism::LocalVariableReadNode < ::Prism::Node # # _1 # name `:_1` # - # source://prism//lib/prism/node.rb#12360 + # source://prism//lib/prism/node.rb#10835 sig { returns(Symbol) } def name; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#12390 + # source://prism//lib/prism/node.rb#10852 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12400 + # source://prism//lib/prism/node.rb#10857 def type; end end end @@ -21891,68 +22410,85 @@ end # foo, bar = baz # ^^^ ^^^ # -# source://prism//lib/prism/node.rb#12417 +# source://prism//lib/prism/node.rb#10874 class Prism::LocalVariableTargetNode < ::Prism::Node - # def initialize: (Symbol name, Integer depth, Location location) -> void + # Initialize a new LocalVariableTargetNode node. # # @return [LocalVariableTargetNode] a new instance of LocalVariableTargetNode # - # source://prism//lib/prism/node.rb#12419 - sig { params(source: Prism::Source, name: Symbol, depth: Integer, location: Prism::Location).void } - def initialize(source, name, depth, location); end + # source://prism//lib/prism/node.rb#10876 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer + ).void + end + def initialize(source, node_id, location, flags, name, depth); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#12500 + # source://prism//lib/prism/node.rb#10941 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12427 + # source://prism//lib/prism/node.rb#10886 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12432 + # source://prism//lib/prism/node.rb#10891 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12442 + # source://prism//lib/prism/node.rb#10901 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12437 + # source://prism//lib/prism/node.rb#10896 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?depth: Integer, ?location: Location) -> LocalVariableTargetNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?depth: Integer) -> LocalVariableTargetNode # - # source://prism//lib/prism/node.rb#12447 - sig { params(name: Symbol, depth: Integer, location: Prism::Location).returns(Prism::LocalVariableTargetNode) } - def copy(name: T.unsafe(nil), depth: T.unsafe(nil), location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#10906 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer + ).returns(Prism::LocalVariableTargetNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12432 + # source://prism//lib/prism/node.rb#10891 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, depth: Integer, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, depth: Integer } # - # source://prism//lib/prism/node.rb#12455 + # source://prism//lib/prism/node.rb#10914 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader depth: Integer # - # source://prism//lib/prism/node.rb#12463 + # source://prism//lib/prism/node.rb#10922 sig { returns(Integer) } def depth; end @@ -21961,44 +22497,26 @@ class Prism::LocalVariableTargetNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#12466 + # source://prism//lib/prism/node.rb#10925 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#12460 + # source://prism//lib/prism/node.rb#10919 sig { returns(Symbol) } def name; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#12484 + # source://prism//lib/prism/node.rb#10930 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#12494 + # source://prism//lib/prism/node.rb#10935 def type; end end end @@ -22008,81 +22526,85 @@ end # foo = 1 # ^^^^^^^ # -# source://prism//lib/prism/node.rb#12511 +# source://prism//lib/prism/node.rb#10952 class Prism::LocalVariableWriteNode < ::Prism::Node - # def initialize: (Symbol name, Integer depth, Location name_loc, Prism::node value, Location operator_loc, Location location) -> void + # Initialize a new LocalVariableWriteNode node. # # @return [LocalVariableWriteNode] a new instance of LocalVariableWriteNode # - # source://prism//lib/prism/node.rb#12513 + # source://prism//lib/prism/node.rb#10954 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, depth: Integer, name_loc: Prism::Location, value: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).void end - def initialize(source, name, depth, name_loc, value, operator_loc, location); end + def initialize(source, node_id, location, flags, name, depth, name_loc, value, operator_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#12645 + # source://prism//lib/prism/node.rb#11070 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12524 + # source://prism//lib/prism/node.rb#10967 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12529 + # source://prism//lib/prism/node.rb#10972 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12539 + # source://prism//lib/prism/node.rb#10982 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12534 + # source://prism//lib/prism/node.rb#10977 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?depth: Integer, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> LocalVariableWriteNode # - # source://prism//lib/prism/node.rb#12544 + # source://prism//lib/prism/node.rb#10987 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, depth: Integer, name_loc: Prism::Location, value: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: 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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12529 + # source://prism//lib/prism/node.rb#10972 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, depth: Integer, name_loc: Location, value: Prism::node, operator_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, depth: Integer, name_loc: Location, value: Prism::node, operator_loc: Location } # - # source://prism//lib/prism/node.rb#12552 + # source://prism//lib/prism/node.rb#10995 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -22094,7 +22616,7 @@ 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#12570 + # source://prism//lib/prism/node.rb#11013 sig { returns(Integer) } def depth; end @@ -22103,7 +22625,7 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#12611 + # source://prism//lib/prism/node.rb#11054 sig { override.returns(String) } def inspect; end @@ -22113,7 +22635,7 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # # abc = 123 # name `:abc` # - # source://prism//lib/prism/node.rb#12561 + # source://prism//lib/prism/node.rb#11004 sig { returns(Symbol) } def name; end @@ -22122,13 +22644,13 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # foo = :bar # ^^^ # - # source://prism//lib/prism/node.rb#12576 + # source://prism//lib/prism/node.rb#11019 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#12606 + # source://prism//lib/prism/node.rb#11049 sig { returns(String) } def operator; end @@ -22137,26 +22659,13 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # x = :y # ^ # - # source://prism//lib/prism/node.rb#12599 + # source://prism//lib/prism/node.rb#11042 sig { returns(Prism::Location) } def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#12629 + # source://prism//lib/prism/node.rb#11059 sig { override.returns(Symbol) } def type; end @@ -22172,39 +22681,34 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # # foo = foo # - # source://prism//lib/prism/node.rb#12593 + # source://prism//lib/prism/node.rb#11036 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12639 + # source://prism//lib/prism/node.rb#11064 def type; end end end # This represents a location in the source. # -# source://prism//lib/prism/parse_result.rb#156 +# source://prism//lib/prism/parse_result.rb#273 class Prism::Location # Create a new location object with the given source, start byte offset, and # byte length. # # @return [Location] a new instance of Location # - # source://prism//lib/prism/parse_result.rb#171 + # source://prism//lib/prism/parse_result.rb#288 sig { params(source: Prism::Source, start_offset: Integer, length: Integer).void } def initialize(source, start_offset, length); end # Returns true if the given other location is equal to this location. # - # source://prism//lib/prism/parse_result.rb#335 + # source://prism//lib/prism/parse_result.rb#476 sig { params(other: T.untyped).returns(T::Boolean) } def ==(other); end @@ -22212,84 +22716,128 @@ class Prism::Location # 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 + # source://prism//lib/prism/parse_result.rb#495 sig { params(string: String).returns(Prism::Location) } def adjoin(string); end + # The end column in code units using the given cache to fetch or calculate + # the value. + # + # source://prism//lib/prism/parse_result.rb#461 + sig do + params( + cache: T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer)) + ).returns(Integer) + end + def cached_end_code_units_column(cache); end + + # The end offset from the start of the file in code units using the given + # cache to fetch or calculate the value. + # + # source://prism//lib/prism/parse_result.rb#397 + sig do + params( + cache: T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer)) + ).returns(Integer) + end + def cached_end_code_units_offset(cache); end + + # The start column in code units using the given cache to fetch or calculate + # the value. + # + # source://prism//lib/prism/parse_result.rb#437 + sig do + params( + cache: T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer)) + ).returns(Integer) + end + def cached_start_code_units_column(cache); end + + # The start offset from the start of the file in code units using the given + # cache to fetch or calculate the value. + # + # source://prism//lib/prism/parse_result.rb#375 + sig do + params( + cache: T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer)) + ).returns(Integer) + end + def cached_start_code_units_offset(cache); end + # Returns a new location that is the result of chopping off the last byte. # - # source://prism//lib/prism/parse_result.rb#217 + # source://prism//lib/prism/parse_result.rb#334 sig { returns(Prism::Location) } def chop; end # Returns all comments that are associated with this location (both leading # and trailing comments). # - # source://prism//lib/prism/parse_result.rb#207 + # source://prism//lib/prism/parse_result.rb#324 sig { returns(T::Array[Prism::Comment]) } def comments; end # Create a new location object with the given options. # - # source://prism//lib/prism/parse_result.rb#212 + # source://prism//lib/prism/parse_result.rb#329 sig { params(source: Prism::Source, start_offset: Integer, length: Integer).returns(Prism::Location) } def copy(source: T.unsafe(nil), start_offset: T.unsafe(nil), length: T.unsafe(nil)); end # Implement the hash pattern matching interface for Location. # - # source://prism//lib/prism/parse_result.rb#325 + # source://prism//lib/prism/parse_result.rb#466 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # The column number in characters where this location ends from the start of # the line. # - # source://prism//lib/prism/parse_result.rb#314 + # source://prism//lib/prism/parse_result.rb#449 sig { returns(Integer) } def end_character_column; end # The character offset from the beginning of the source where this location # ends. # - # source://prism//lib/prism/parse_result.rb#263 + # source://prism//lib/prism/parse_result.rb#386 sig { returns(Integer) } def end_character_offset; end # The column number in code units of the given encoding where this location # ends from the start of the line. # - # source://prism//lib/prism/parse_result.rb#320 + # source://prism//lib/prism/parse_result.rb#455 sig { params(encoding: Encoding).returns(Integer) } def end_code_units_column(encoding = T.unsafe(nil)); end # The offset from the start of the file in code units of the given encoding. # - # source://prism//lib/prism/parse_result.rb#268 + # source://prism//lib/prism/parse_result.rb#391 sig { params(encoding: Encoding).returns(Integer) } def end_code_units_offset(encoding = T.unsafe(nil)); end # The column number in bytes where this location ends from the start of the # line. # - # source://prism//lib/prism/parse_result.rb#308 + # source://prism//lib/prism/parse_result.rb#443 sig { returns(Integer) } def end_column; end # The line number where this location ends. # - # source://prism//lib/prism/parse_result.rb#284 + # source://prism//lib/prism/parse_result.rb#413 sig { returns(Integer) } def end_line; end # The byte offset from the beginning of the source where this location ends. # - # source://prism//lib/prism/parse_result.rb#257 + # source://prism//lib/prism/parse_result.rb#380 sig { returns(Integer) } def end_offset; end # Returns a string representation of this location. # - # source://prism//lib/prism/parse_result.rb#222 + # source://prism//lib/prism/parse_result.rb#339 sig { returns(String) } def inspect; end @@ -22297,38 +22845,38 @@ 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#344 + # source://prism//lib/prism/parse_result.rb#485 sig { params(other: Prism::Location).returns(Prism::Location) } def join(other); end # Attach a comment to the leading comments of this location. # - # source://prism//lib/prism/parse_result.rb#190 + # source://prism//lib/prism/parse_result.rb#307 sig { params(comment: Prism::Comment).void } def leading_comment(comment); end # These are the comments that are associated with this location that exist # before the start of this location. # - # source://prism//lib/prism/parse_result.rb#185 + # source://prism//lib/prism/parse_result.rb#302 sig { returns(T::Array[Prism::Comment]) } def leading_comments; end # The length of this location in bytes. # - # source://prism//lib/prism/parse_result.rb#167 + # source://prism//lib/prism/parse_result.rb#284 sig { returns(Integer) } def length; end # Implement the pretty print interface for Location. # - # source://prism//lib/prism/parse_result.rb#330 + # source://prism//lib/prism/parse_result.rb#471 sig { params(q: T.untyped).void } def pretty_print(q); end # The source code that this location represents. # - # source://prism//lib/prism/parse_result.rb#232 + # source://prism//lib/prism/parse_result.rb#349 sig { returns(String) } def slice; end @@ -22336,78 +22884,78 @@ class Prism::Location # 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 + # source://prism//lib/prism/parse_result.rb#356 def slice_lines; end # Returns all of the lines of the source code associated with this location. # - # source://prism//lib/prism/parse_result.rb#227 + # source://prism//lib/prism/parse_result.rb#344 sig { returns(T::Array[String]) } def source_lines; end # The column number in characters where this location ends from the start of # the line. # - # source://prism//lib/prism/parse_result.rb#296 + # source://prism//lib/prism/parse_result.rb#425 sig { returns(Integer) } def start_character_column; end # The character offset from the beginning of the source where this location # starts. # - # source://prism//lib/prism/parse_result.rb#247 + # source://prism//lib/prism/parse_result.rb#364 sig { returns(Integer) } def start_character_offset; end # The column number in code units of the given encoding where this location # starts from the start of the line. # - # source://prism//lib/prism/parse_result.rb#302 + # source://prism//lib/prism/parse_result.rb#431 sig { params(encoding: Encoding).returns(Integer) } def start_code_units_column(encoding = T.unsafe(nil)); end # The offset from the start of the file in code units of the given encoding. # - # source://prism//lib/prism/parse_result.rb#252 + # source://prism//lib/prism/parse_result.rb#369 sig { params(encoding: Encoding).returns(Integer) } def start_code_units_offset(encoding = T.unsafe(nil)); end # The column number in bytes where this location starts from the start of # the line. # - # source://prism//lib/prism/parse_result.rb#290 + # source://prism//lib/prism/parse_result.rb#419 sig { returns(Integer) } def start_column; end # The line number where this location starts. # - # source://prism//lib/prism/parse_result.rb#273 + # source://prism//lib/prism/parse_result.rb#402 sig { returns(Integer) } def start_line; end # The content of the line where this location starts before this location. # - # source://prism//lib/prism/parse_result.rb#278 + # source://prism//lib/prism/parse_result.rb#407 sig { returns(String) } def start_line_slice; end # The byte offset from the beginning of the source where this location # starts. # - # source://prism//lib/prism/parse_result.rb#164 + # source://prism//lib/prism/parse_result.rb#281 sig { returns(Integer) } def start_offset; end # Attach a comment to the trailing comments of this location. # - # source://prism//lib/prism/parse_result.rb#201 + # source://prism//lib/prism/parse_result.rb#318 sig { params(comment: Prism::Comment).void } def trailing_comment(comment); end # These are the comments that are associated with this location that exist # after the end of this location. # - # source://prism//lib/prism/parse_result.rb#196 + # source://prism//lib/prism/parse_result.rb#313 sig { returns(T::Array[Prism::Comment]) } def trailing_comments; end @@ -22416,66 +22964,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#159 + # source://prism//lib/prism/parse_result.rb#276 sig { returns(Prism::Source) } def source; end end # Flags for while and until loop nodes. # -# source://prism//lib/prism/node.rb#19196 +# source://prism//lib/prism/node.rb#16762 module Prism::LoopFlags; end # a loop after a begin statement, so the body is executed first before the condition # -# source://prism//lib/prism/node.rb#19198 +# source://prism//lib/prism/node.rb#16764 Prism::LoopFlags::BEGIN_MODIFIER = T.let(T.unsafe(nil), Integer) # This represents a magic comment that was encountered during parsing. # -# source://prism//lib/prism/parse_result.rb#416 +# source://prism//lib/prism/parse_result.rb#557 class Prism::MagicComment # Create a new magic comment object with the given key and value locations. # # @return [MagicComment] a new instance of MagicComment # - # source://prism//lib/prism/parse_result.rb#424 + # source://prism//lib/prism/parse_result.rb#565 sig { params(key_loc: Prism::Location, value_loc: Prism::Location).void } def initialize(key_loc, value_loc); end # Implement the hash pattern matching interface for MagicComment. # - # source://prism//lib/prism/parse_result.rb#440 + # source://prism//lib/prism/parse_result.rb#581 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # Returns a string representation of this magic comment. # - # source://prism//lib/prism/parse_result.rb#445 + # source://prism//lib/prism/parse_result.rb#586 sig { returns(String) } def inspect; end # Returns the key of the magic comment by slicing it from the source code. # - # source://prism//lib/prism/parse_result.rb#430 + # source://prism//lib/prism/parse_result.rb#571 sig { returns(String) } def key; end # A Location object representing the location of the key in the source. # - # source://prism//lib/prism/parse_result.rb#418 + # source://prism//lib/prism/parse_result.rb#559 sig { returns(Prism::Location) } def key_loc; end # Returns the value of the magic comment by slicing it from the source code. # - # source://prism//lib/prism/parse_result.rb#435 + # source://prism//lib/prism/parse_result.rb#576 sig { returns(String) } def value; end # A Location object representing the location of the value in the source. # - # source://prism//lib/prism/parse_result.rb#421 + # source://prism//lib/prism/parse_result.rb#562 sig { returns(Prism::Location) } def value_loc; end end @@ -22485,37 +23033,38 @@ end # if /foo/i then end # ^^^^^^ # -# source://prism//lib/prism/node.rb#12659 +# source://prism//lib/prism/node.rb#11084 class Prism::MatchLastLineNode < ::Prism::Node include ::Prism::RegularExpressionOptions - # def initialize: (Integer flags, Location opening_loc, Location content_loc, Location closing_loc, String unescaped, Location location) -> void + # Initialize a new MatchLastLineNode node. # # @return [MatchLastLineNode] a new instance of MatchLastLineNode # - # source://prism//lib/prism/node.rb#12661 + # source://prism//lib/prism/node.rb#11086 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, opening_loc: Prism::Location, content_loc: Prism::Location, closing_loc: Prism::Location, - unescaped: String, - location: Prism::Location + unescaped: String ).void end - def initialize(source, flags, opening_loc, content_loc, closing_loc, unescaped, location); end + def initialize(source, node_id, location, flags, opening_loc, content_loc, closing_loc, unescaped); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#12837 + # source://prism//lib/prism/node.rb#11241 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12672 + # source://prism//lib/prism/node.rb#11098 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -22523,77 +23072,78 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12758 + # source://prism//lib/prism/node.rb#11156 sig { returns(T::Boolean) } def ascii_8bit?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12677 + # source://prism//lib/prism/node.rb#11103 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#12798 + # source://prism//lib/prism/node.rb#11220 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#12723 + # source://prism//lib/prism/node.rb#11200 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12687 + # source://prism//lib/prism/node.rb#11113 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12682 + # source://prism//lib/prism/node.rb#11108 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def content: () -> String # - # source://prism//lib/prism/node.rb#12793 + # source://prism//lib/prism/node.rb#11215 sig { returns(String) } def content; end # attr_reader content_loc: Location # - # source://prism//lib/prism/node.rb#12716 + # source://prism//lib/prism/node.rb#11193 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String) -> MatchLastLineNode # - # source://prism//lib/prism/node.rb#12692 + # source://prism//lib/prism/node.rb#11118 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, opening_loc: Prism::Location, content_loc: Prism::Location, closing_loc: Prism::Location, - unescaped: String, - location: Prism::Location + unescaped: String ).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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12677 + # source://prism//lib/prism/node.rb#11103 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String } # - # source://prism//lib/prism/node.rb#12700 + # source://prism//lib/prism/node.rb#11126 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -22601,7 +23151,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12753 + # source://prism//lib/prism/node.rb#11151 sig { returns(T::Boolean) } def euc_jp?; end @@ -22609,7 +23159,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12738 + # source://prism//lib/prism/node.rb#11136 sig { returns(T::Boolean) } def extended?; end @@ -22620,7 +23170,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12778 + # source://prism//lib/prism/node.rb#11176 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -22628,7 +23178,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12783 + # source://prism//lib/prism/node.rb#11181 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end @@ -22636,7 +23186,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12773 + # source://prism//lib/prism/node.rb#11171 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -22644,13 +23194,13 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12733 + # source://prism//lib/prism/node.rb#11131 sig { returns(T::Boolean) } def ignore_case?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#12803 + # source://prism//lib/prism/node.rb#11225 sig { override.returns(String) } def inspect; end @@ -22658,7 +23208,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12743 + # source://prism//lib/prism/node.rb#11141 sig { returns(T::Boolean) } def multi_line?; end @@ -22666,47 +23216,34 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12748 + # source://prism//lib/prism/node.rb#11146 sig { returns(T::Boolean) } def once?; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#12788 + # source://prism//lib/prism/node.rb#11210 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#12709 + # source://prism//lib/prism/node.rb#11186 sig { returns(Prism::Location) } def opening_loc; end sig { returns(Integer) } def options; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#12821 + # source://prism//lib/prism/node.rb#11230 sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#12730 + # source://prism//lib/prism/node.rb#11207 sig { returns(String) } def unescaped; end @@ -22714,7 +23251,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12768 + # source://prism//lib/prism/node.rb#11166 sig { returns(T::Boolean) } def utf_8?; end @@ -22722,27 +23259,14 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12763 + # source://prism//lib/prism/node.rb#11161 sig { returns(T::Boolean) } def windows_31j?; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#12705 - 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12831 + # source://prism//lib/prism/node.rb#11235 def type; end end end @@ -22752,77 +23276,81 @@ end # foo in bar # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#12851 +# source://prism//lib/prism/node.rb#11255 class Prism::MatchPredicateNode < ::Prism::Node - # def initialize: (Prism::node value, Prism::node pattern, Location operator_loc, Location location) -> void + # Initialize a new MatchPredicateNode node. # # @return [MatchPredicateNode] a new instance of MatchPredicateNode # - # source://prism//lib/prism/node.rb#12853 + # source://prism//lib/prism/node.rb#11257 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, value: Prism::Node, pattern: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).void end - def initialize(source, value, pattern, operator_loc, location); end + def initialize(source, node_id, location, flags, value, pattern, operator_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#12947 + # source://prism//lib/prism/node.rb#11335 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12862 + # source://prism//lib/prism/node.rb#11268 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12867 + # source://prism//lib/prism/node.rb#11273 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12877 + # source://prism//lib/prism/node.rb#11283 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12872 + # source://prism//lib/prism/node.rb#11278 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Prism::node, ?pattern: Prism::node, ?operator_loc: Location) -> MatchPredicateNode # - # source://prism//lib/prism/node.rb#12882 + # source://prism//lib/prism/node.rb#11288 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, value: Prism::Node, pattern: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: 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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), pattern: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12867 + # source://prism//lib/prism/node.rb#11273 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::node, pattern: Prism::node, operator_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node, pattern: Prism::node, operator_loc: Location } # - # source://prism//lib/prism/node.rb#12890 + # source://prism//lib/prism/node.rb#11296 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -22831,62 +23359,44 @@ class Prism::MatchPredicateNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#12913 + # source://prism//lib/prism/node.rb#11319 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#12908 + # source://prism//lib/prism/node.rb#11314 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#12901 + # source://prism//lib/prism/node.rb#11307 sig { returns(Prism::Location) } def operator_loc; end # attr_reader pattern: Prism::node # - # source://prism//lib/prism/node.rb#12898 + # source://prism//lib/prism/node.rb#11304 sig { returns(Prism::Node) } def pattern; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#12931 + # source://prism//lib/prism/node.rb#11324 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#12895 + # source://prism//lib/prism/node.rb#11301 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12941 + # source://prism//lib/prism/node.rb#11329 def type; end end end @@ -22896,77 +23406,81 @@ end # foo => bar # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#12959 +# source://prism//lib/prism/node.rb#11347 class Prism::MatchRequiredNode < ::Prism::Node - # def initialize: (Prism::node value, Prism::node pattern, Location operator_loc, Location location) -> void + # Initialize a new MatchRequiredNode node. # # @return [MatchRequiredNode] a new instance of MatchRequiredNode # - # source://prism//lib/prism/node.rb#12961 + # source://prism//lib/prism/node.rb#11349 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, value: Prism::Node, pattern: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).void end - def initialize(source, value, pattern, operator_loc, location); end + def initialize(source, node_id, location, flags, value, pattern, operator_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#13055 + # source://prism//lib/prism/node.rb#11427 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12970 + # source://prism//lib/prism/node.rb#11360 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12975 + # source://prism//lib/prism/node.rb#11365 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12985 + # source://prism//lib/prism/node.rb#11375 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#12980 + # source://prism//lib/prism/node.rb#11370 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Prism::node, ?pattern: Prism::node, ?operator_loc: Location) -> MatchRequiredNode # - # source://prism//lib/prism/node.rb#12990 + # source://prism//lib/prism/node.rb#11380 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, value: Prism::Node, pattern: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: 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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), pattern: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12975 + # source://prism//lib/prism/node.rb#11365 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::node, pattern: Prism::node, operator_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node, pattern: Prism::node, operator_loc: Location } # - # source://prism//lib/prism/node.rb#12998 + # source://prism//lib/prism/node.rb#11388 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -22975,62 +23489,44 @@ class Prism::MatchRequiredNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#13021 + # source://prism//lib/prism/node.rb#11411 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#13016 + # source://prism//lib/prism/node.rb#11406 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#13009 + # source://prism//lib/prism/node.rb#11399 sig { returns(Prism::Location) } def operator_loc; end # attr_reader pattern: Prism::node # - # source://prism//lib/prism/node.rb#13006 + # source://prism//lib/prism/node.rb#11396 sig { returns(Prism::Node) } def pattern; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13039 + # source://prism//lib/prism/node.rb#11416 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#13003 + # source://prism//lib/prism/node.rb#11393 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#13049 + # source://prism//lib/prism/node.rb#11421 def type; end end end @@ -23040,81 +23536,85 @@ end # /(?bar)/ =~ baz # ^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#13067 +# source://prism//lib/prism/node.rb#11439 class Prism::MatchWriteNode < ::Prism::Node - # def initialize: (CallNode call, Array[LocalVariableTargetNode] targets, Location location) -> void + # Initialize a new MatchWriteNode node. # # @return [MatchWriteNode] a new instance of MatchWriteNode # - # source://prism//lib/prism/node.rb#13069 + # source://prism//lib/prism/node.rb#11441 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, call: Prism::CallNode, - targets: T::Array[Prism::LocalVariableTargetNode], - location: Prism::Location + targets: T::Array[Prism::LocalVariableTargetNode] ).void end - def initialize(source, call, targets, location); end + def initialize(source, node_id, location, flags, call, targets); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#13150 + # source://prism//lib/prism/node.rb#11506 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13077 + # source://prism//lib/prism/node.rb#11451 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader call: CallNode # - # source://prism//lib/prism/node.rb#13110 + # source://prism//lib/prism/node.rb#11484 sig { returns(Prism::CallNode) } def call; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13082 + # source://prism//lib/prism/node.rb#11456 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13092 + # source://prism//lib/prism/node.rb#11466 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13087 + # source://prism//lib/prism/node.rb#11461 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?call: CallNode, ?targets: Array[LocalVariableTargetNode], ?location: Location) -> MatchWriteNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?call: CallNode, ?targets: Array[LocalVariableTargetNode]) -> MatchWriteNode # - # source://prism//lib/prism/node.rb#13097 + # source://prism//lib/prism/node.rb#11471 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, call: Prism::CallNode, - targets: T::Array[Prism::LocalVariableTargetNode], - location: Prism::Location + targets: T::Array[Prism::LocalVariableTargetNode] ).returns(Prism::MatchWriteNode) end - def copy(call: T.unsafe(nil), targets: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), call: T.unsafe(nil), targets: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13082 + # source://prism//lib/prism/node.rb#11456 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { call: CallNode, targets: Array[LocalVariableTargetNode], location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, call: CallNode, targets: Array[LocalVariableTargetNode] } # - # source://prism//lib/prism/node.rb#13105 + # source://prism//lib/prism/node.rb#11479 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -23123,106 +23623,88 @@ class Prism::MatchWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#13116 + # source://prism//lib/prism/node.rb#11490 sig { override.returns(String) } def inspect; end # attr_reader targets: Array[LocalVariableTargetNode] # - # source://prism//lib/prism/node.rb#13113 + # source://prism//lib/prism/node.rb#11487 sig { returns(T::Array[Prism::LocalVariableTargetNode]) } def targets; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#13134 + # source://prism//lib/prism/node.rb#11495 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#13144 + # source://prism//lib/prism/node.rb#11500 def type; end end end # Represents a node that is missing from the source and results in a syntax error. # -# source://prism//lib/prism/node.rb#13159 +# source://prism//lib/prism/node.rb#11515 class Prism::MissingNode < ::Prism::Node - # def initialize: (Location location) -> void + # Initialize a new MissingNode node. # # @return [MissingNode] a new instance of MissingNode # - # source://prism//lib/prism/node.rb#13161 - sig { params(source: Prism::Source, location: Prism::Location).void } - def initialize(source, location); end + # source://prism//lib/prism/node.rb#11517 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#13234 + # source://prism//lib/prism/node.rb#11574 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13167 + # source://prism//lib/prism/node.rb#11525 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13172 + # source://prism//lib/prism/node.rb#11530 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13182 + # source://prism//lib/prism/node.rb#11540 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13177 + # source://prism//lib/prism/node.rb#11535 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?location: Location) -> MissingNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> MissingNode # - # source://prism//lib/prism/node.rb#13187 - sig { params(location: Prism::Location).returns(Prism::MissingNode) } - def copy(location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#11545 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::MissingNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13172 + # source://prism//lib/prism/node.rb#11530 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#13195 + # source://prism//lib/prism/node.rb#11553 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -23231,38 +23713,20 @@ class Prism::MissingNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#13200 + # source://prism//lib/prism/node.rb#11558 sig { override.returns(String) } def inspect; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#13218 + # source://prism//lib/prism/node.rb#11563 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#13228 + # source://prism//lib/prism/node.rb#11568 def type; end end end @@ -23272,107 +23736,111 @@ end # module Foo end # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#13243 +# source://prism//lib/prism/node.rb#11583 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 + # Initialize a new ModuleNode node. # # @return [ModuleNode] a new instance of ModuleNode # - # source://prism//lib/prism/node.rb#13245 + # source://prism//lib/prism/node.rb#11585 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, locals: T::Array[Symbol], module_keyword_loc: Prism::Location, - constant_path: Prism::Node, - body: T.nilable(Prism::Node), + constant_path: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::MissingNode), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), end_keyword_loc: Prism::Location, - name: Symbol, - location: Prism::Location + name: Symbol ).void end - def initialize(source, locals, module_keyword_loc, constant_path, body, end_keyword_loc, name, location); end + def initialize(source, node_id, location, flags, locals, module_keyword_loc, constant_path, body, end_keyword_loc, name); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#13363 + # source://prism//lib/prism/node.rb#11687 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13257 + # source://prism//lib/prism/node.rb#11599 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # attr_reader body: Prism::node? + # attr_reader body: StatementsNode | BeginNode | nil # - # source://prism//lib/prism/node.rb#13306 - sig { returns(T.nilable(Prism::Node)) } + # source://prism//lib/prism/node.rb#11648 + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13262 + # source://prism//lib/prism/node.rb#11604 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13275 + # source://prism//lib/prism/node.rb#11617 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13267 + # source://prism//lib/prism/node.rb#11609 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # attr_reader constant_path: Prism::node + # attr_reader constant_path: ConstantReadNode | ConstantPathNode | MissingNode # - # source://prism//lib/prism/node.rb#13303 - sig { returns(Prism::Node) } + # source://prism//lib/prism/node.rb#11645 + sig { returns(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::MissingNode)) } 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?module_keyword_loc: Location, ?constant_path: ConstantReadNode | ConstantPathNode | MissingNode, ?body: StatementsNode | BeginNode | nil, ?end_keyword_loc: Location, ?name: Symbol) -> ModuleNode # - # source://prism//lib/prism/node.rb#13280 + # source://prism//lib/prism/node.rb#11622 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, locals: T::Array[Symbol], module_keyword_loc: Prism::Location, - constant_path: Prism::Node, - body: T.nilable(Prism::Node), + constant_path: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::MissingNode), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), end_keyword_loc: Prism::Location, - name: Symbol, - location: Prism::Location + name: Symbol ).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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), module_keyword_loc: T.unsafe(nil), constant_path: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), name: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13262 + # source://prism//lib/prism/node.rb#11604 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], module_keyword_loc: Location, constant_path: Prism::node, body: Prism::node?, end_keyword_loc: Location, name: Symbol, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], module_keyword_loc: Location, constant_path: ConstantReadNode | ConstantPathNode | MissingNode, body: StatementsNode | BeginNode | nil, end_keyword_loc: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#13288 + # source://prism//lib/prism/node.rb#11630 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def end_keyword: () -> String # - # source://prism//lib/prism/node.rb#13324 + # source://prism//lib/prism/node.rb#11666 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#13309 + # source://prism//lib/prism/node.rb#11651 sig { returns(Prism::Location) } def end_keyword_loc; end @@ -23381,62 +23849,44 @@ class Prism::ModuleNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#13329 + # source://prism//lib/prism/node.rb#11671 sig { override.returns(String) } def inspect; end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#13293 + # source://prism//lib/prism/node.rb#11635 sig { returns(T::Array[Symbol]) } def locals; end # def module_keyword: () -> String # - # source://prism//lib/prism/node.rb#13319 + # source://prism//lib/prism/node.rb#11661 sig { returns(String) } def module_keyword; end # attr_reader module_keyword_loc: Location # - # source://prism//lib/prism/node.rb#13296 + # source://prism//lib/prism/node.rb#11638 sig { returns(Prism::Location) } def module_keyword_loc; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#13316 + # source://prism//lib/prism/node.rb#11658 sig { returns(Symbol) } def name; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#13347 + # source://prism//lib/prism/node.rb#11676 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13357 + # source://prism//lib/prism/node.rb#11681 def type; end end end @@ -23446,81 +23896,90 @@ end # a, (b, c) = 1, 2, 3 # ^^^^^^ # -# source://prism//lib/prism/node.rb#13379 +# This can be a part of `MultiWriteNode` as above, or the target of a `for` loop +# +# for a, b in [[1, 2], [3, 4]] +# ^^^^ +# +# source://prism//lib/prism/node.rb#11708 class Prism::MultiTargetNode < ::Prism::Node - # 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 + # Initialize a new MultiTargetNode node. # # @return [MultiTargetNode] a new instance of MultiTargetNode # - # source://prism//lib/prism/node.rb#13381 + # source://prism//lib/prism/node.rb#11710 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], - rest: T.nilable(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)], + rest: T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode)), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], lparen_loc: T.nilable(Prism::Location), - rparen_loc: T.nilable(Prism::Location), - location: Prism::Location + rparen_loc: T.nilable(Prism::Location) ).void end - def initialize(source, lefts, rest, rights, lparen_loc, rparen_loc, location); end + def initialize(source, node_id, location, flags, lefts, rest, rights, lparen_loc, rparen_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#13508 + # source://prism//lib/prism/node.rb#11851 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13392 + # source://prism//lib/prism/node.rb#11723 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13397 + # source://prism//lib/prism/node.rb#11728 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13411 + # source://prism//lib/prism/node.rb#11742 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13402 + # source://prism//lib/prism/node.rb#11733 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], ?rest: ImplicitRestNode | SplatNode | nil, ?rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], ?lparen_loc: Location?, ?rparen_loc: Location?) -> MultiTargetNode # - # source://prism//lib/prism/node.rb#13416 + # source://prism//lib/prism/node.rb#11747 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], - rest: T.nilable(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)], + rest: T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode)), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], lparen_loc: T.nilable(Prism::Location), - rparen_loc: T.nilable(Prism::Location), - location: Prism::Location + rparen_loc: T.nilable(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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), lefts: T.unsafe(nil), rest: T.unsafe(nil), rights: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13397 + # source://prism//lib/prism/node.rb#11728 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { 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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], rest: ImplicitRestNode | SplatNode | nil, rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], lparen_loc: Location?, rparen_loc: Location? } # - # source://prism//lib/prism/node.rb#13424 + # source://prism//lib/prism/node.rb#11755 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -23529,13 +23988,21 @@ class Prism::MultiTargetNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#13474 + # source://prism//lib/prism/node.rb#11835 sig { override.returns(String) } def inspect; end - # attr_reader lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode] + # Represents the targets expressions before a splat node. + # + # a, (b, c, *) = 1, 2, 3, 4, 5 + # ^^^^ # - # source://prism//lib/prism/node.rb#13429 + # The splat node can be absent, in that case all target expressions are in the left field. + # + # a, (b, c) = 1, 2, 3, 4, 5 + # ^^^^ + # + # source://prism//lib/prism/node.rb#11768 sig do returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)]) end @@ -23543,70 +24010,74 @@ class Prism::MultiTargetNode < ::Prism::Node # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#13464 + # source://prism//lib/prism/node.rb#11825 sig { returns(T.nilable(String)) } def lparen; end - # attr_reader lparen_loc: Location? + # The location of the opening parenthesis. # - # source://prism//lib/prism/node.rb#13438 + # a, (b, c) = 1, 2, 3 + # ^ + # + # source://prism//lib/prism/node.rb#11796 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end - # attr_reader rest: Prism::node? + # Represents a splat node in the target expression. # - # source://prism//lib/prism/node.rb#13432 - sig { returns(T.nilable(Prism::Node)) } + # a, (b, *c) = 1, 2, 3, 4 + # ^^ + # + # The variable can be empty, this results in a `SplatNode` with a `nil` expression field. + # + # a, (b, *) = 1, 2, 3, 4 + # ^ + # + # If the `*` is omitted, this field will contain an `ImplicitRestNode` + # + # a, (b,) = 1, 2, 3, 4 + # ^ + # + # source://prism//lib/prism/node.rb#11784 + sig { returns(T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode))) } def rest; end - # attr_reader rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode] + # Represents the targets expressions after a splat node. + # + # a, (*, b, c) = 1, 2, 3, 4, 5 + # ^^^^ # - # source://prism//lib/prism/node.rb#13435 + # source://prism//lib/prism/node.rb#11790 sig do - returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode)]) + returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)]) end def rights; end # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#13469 + # source://prism//lib/prism/node.rb#11830 sig { returns(T.nilable(String)) } def rparen; end - # attr_reader rparen_loc: Location? + # The location of the closing parenthesis. # - # source://prism//lib/prism/node.rb#13451 + # a, (b, c) = 1, 2, 3 + # ^ + # + # source://prism//lib/prism/node.rb#11812 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#13492 + # source://prism//lib/prism/node.rb#11840 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13502 + # source://prism//lib/prism/node.rb#11845 def type; end end end @@ -23616,85 +24087,89 @@ end # a, b, c = 1, 2, 3 # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#13524 +# source://prism//lib/prism/node.rb#11867 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 + # Initialize a new MultiWriteNode node. # # @return [MultiWriteNode] a new instance of MultiWriteNode # - # source://prism//lib/prism/node.rb#13526 + # source://prism//lib/prism/node.rb#11869 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)], + node_id: Integer, + location: Prism::Location, + flags: Integer, + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + rest: T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode)), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], lparen_loc: T.nilable(Prism::Location), rparen_loc: T.nilable(Prism::Location), operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, lefts, rest, rights, lparen_loc, rparen_loc, operator_loc, value, location); end + def initialize(source, node_id, location, flags, lefts, rest, rights, lparen_loc, rparen_loc, operator_loc, value); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#13671 + # source://prism//lib/prism/node.rb#12034 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13539 + # source://prism//lib/prism/node.rb#11884 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13544 + # source://prism//lib/prism/node.rb#11889 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13559 + # source://prism//lib/prism/node.rb#11904 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13549 + # source://prism//lib/prism/node.rb#11894 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode], ?rest: ImplicitRestNode | SplatNode | nil, ?rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode], ?lparen_loc: Location?, ?rparen_loc: Location?, ?operator_loc: Location, ?value: Prism::node) -> MultiWriteNode # - # source://prism//lib/prism/node.rb#13564 + # source://prism//lib/prism/node.rb#11909 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)], + node_id: Integer, + location: Prism::Location, + flags: Integer, + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + rest: T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode)), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], lparen_loc: T.nilable(Prism::Location), rparen_loc: T.nilable(Prism::Location), operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), lefts: T.unsafe(nil), rest: T.unsafe(nil), rights: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13544 + # source://prism//lib/prism/node.rb#11889 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { 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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode], rest: ImplicitRestNode | SplatNode | nil, rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode], lparen_loc: Location?, rparen_loc: Location?, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#13572 + # source://prism//lib/prism/node.rb#11917 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -23703,102 +24178,120 @@ class Prism::MultiWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#13637 + # source://prism//lib/prism/node.rb#12018 sig { override.returns(String) } def inspect; end - # attr_reader lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode] + # Represents the targets expressions before a splat node. + # + # a, b, * = 1, 2, 3, 4, 5 + # ^^^^ # - # source://prism//lib/prism/node.rb#13577 + # The splat node can be absent, in that case all target expressions are in the left field. + # + # a, b, c = 1, 2, 3, 4, 5 + # ^^^^^^^ + # + # source://prism//lib/prism/node.rb#11930 sig do - returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode)]) + returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)]) end def lefts; end # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#13622 + # source://prism//lib/prism/node.rb#12003 sig { returns(T.nilable(String)) } def lparen; end - # attr_reader lparen_loc: Location? + # The location of the opening parenthesis. # - # source://prism//lib/prism/node.rb#13586 + # (a, b, c) = 1, 2, 3 + # ^ + # + # source://prism//lib/prism/node.rb#11958 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#13632 + # source://prism//lib/prism/node.rb#12013 sig { returns(String) } def operator; end - # attr_reader operator_loc: Location + # The location of the operator. + # + # a, b, c = 1, 2, 3 + # ^ # - # source://prism//lib/prism/node.rb#13612 + # source://prism//lib/prism/node.rb#11990 sig { returns(Prism::Location) } def operator_loc; end - # attr_reader rest: Prism::node? + # Represents a splat node in the target expression. # - # source://prism//lib/prism/node.rb#13580 - sig { returns(T.nilable(Prism::Node)) } + # a, b, *c = 1, 2, 3, 4 + # ^^ + # + # The variable can be empty, this results in a `SplatNode` with a `nil` expression field. + # + # a, b, * = 1, 2, 3, 4 + # ^ + # + # If the `*` is omitted, this field will contain an `ImplicitRestNode` + # + # a, b, = 1, 2, 3, 4 + # ^ + # + # source://prism//lib/prism/node.rb#11946 + sig { returns(T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode))) } def rest; end - # attr_reader rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode] + # Represents the targets expressions after a splat node. # - # source://prism//lib/prism/node.rb#13583 + # a, *, b, c = 1, 2, 3, 4, 5 + # ^^^^ + # + # source://prism//lib/prism/node.rb#11952 sig do - returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode)]) + returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)]) end def rights; end # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#13627 + # source://prism//lib/prism/node.rb#12008 sig { returns(T.nilable(String)) } def rparen; end - # attr_reader rparen_loc: Location? + # The location of the closing parenthesis. + # + # (a, b, c) = 1, 2, 3 + # ^ # - # source://prism//lib/prism/node.rb#13599 + # source://prism//lib/prism/node.rb#11974 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#13655 + # source://prism//lib/prism/node.rb#12023 sig { override.returns(Symbol) } def type; end - # attr_reader value: Prism::node + # The value to write to the targets. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # a, b, c = 1, 2, 3 + # ^^^^^^^ # - # source://prism//lib/prism/node.rb#13619 + # source://prism//lib/prism/node.rb#12000 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13665 + # source://prism//lib/prism/node.rb#12028 def type; end end end @@ -24570,81 +25063,85 @@ end # next 1 # ^^^^^^ # -# source://prism//lib/prism/node.rb#13689 +# source://prism//lib/prism/node.rb#12052 class Prism::NextNode < ::Prism::Node - # def initialize: (ArgumentsNode? arguments, Location keyword_loc, Location location) -> void + # Initialize a new NextNode node. # # @return [NextNode] a new instance of NextNode # - # source://prism//lib/prism/node.rb#13691 + # source://prism//lib/prism/node.rb#12054 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, arguments: T.nilable(Prism::ArgumentsNode), - keyword_loc: Prism::Location, - location: Prism::Location + keyword_loc: Prism::Location ).void end - def initialize(source, arguments, keyword_loc, location); end + def initialize(source, node_id, location, flags, arguments, keyword_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#13783 + # source://prism//lib/prism/node.rb#12130 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13699 + # source://prism//lib/prism/node.rb#12064 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#13734 + # source://prism//lib/prism/node.rb#12099 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13704 + # source://prism//lib/prism/node.rb#12069 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13716 + # source://prism//lib/prism/node.rb#12081 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13709 + # source://prism//lib/prism/node.rb#12074 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?arguments: ArgumentsNode?, ?keyword_loc: Location, ?location: Location) -> NextNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?arguments: ArgumentsNode?, ?keyword_loc: Location) -> NextNode # - # source://prism//lib/prism/node.rb#13721 + # source://prism//lib/prism/node.rb#12086 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, arguments: T.nilable(Prism::ArgumentsNode), - keyword_loc: Prism::Location, - location: Prism::Location + keyword_loc: Prism::Location ).returns(Prism::NextNode) end - def copy(arguments: T.unsafe(nil), keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), arguments: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13704 + # source://prism//lib/prism/node.rb#12069 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { arguments: ArgumentsNode?, keyword_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, arguments: ArgumentsNode?, keyword_loc: Location } # - # source://prism//lib/prism/node.rb#13729 + # source://prism//lib/prism/node.rb#12094 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -24653,50 +25150,32 @@ class Prism::NextNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#13749 + # source://prism//lib/prism/node.rb#12114 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#13744 + # source://prism//lib/prism/node.rb#12109 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#13737 + # source://prism//lib/prism/node.rb#12102 sig { returns(Prism::Location) } def keyword_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#13767 + # source://prism//lib/prism/node.rb#12119 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13777 + # source://prism//lib/prism/node.rb#12124 def type; end end end @@ -24706,62 +25185,62 @@ end # nil # ^^^ # -# source://prism//lib/prism/node.rb#13794 +# source://prism//lib/prism/node.rb#12141 class Prism::NilNode < ::Prism::Node - # def initialize: (Location location) -> void + # Initialize a new NilNode node. # # @return [NilNode] a new instance of NilNode # - # source://prism//lib/prism/node.rb#13796 - sig { params(source: Prism::Source, location: Prism::Location).void } - def initialize(source, location); end + # source://prism//lib/prism/node.rb#12143 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#13869 + # source://prism//lib/prism/node.rb#12200 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13802 + # source://prism//lib/prism/node.rb#12151 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13807 + # source://prism//lib/prism/node.rb#12156 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13817 + # source://prism//lib/prism/node.rb#12166 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13812 + # source://prism//lib/prism/node.rb#12161 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?location: Location) -> NilNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> NilNode # - # source://prism//lib/prism/node.rb#13822 - sig { params(location: Prism::Location).returns(Prism::NilNode) } - def copy(location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#12171 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::NilNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13807 + # source://prism//lib/prism/node.rb#12156 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#13830 + # source://prism//lib/prism/node.rb#12179 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -24770,38 +25249,20 @@ class Prism::NilNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#13835 + # source://prism//lib/prism/node.rb#12184 sig { override.returns(String) } def inspect; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#13853 + # source://prism//lib/prism/node.rb#12189 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#13863 + # source://prism//lib/prism/node.rb#12194 def type; end end end @@ -24812,75 +25273,79 @@ end # ^^^^^ # end # -# source://prism//lib/prism/node.rb#13879 +# source://prism//lib/prism/node.rb#12210 class Prism::NoKeywordsParameterNode < ::Prism::Node - # def initialize: (Location operator_loc, Location keyword_loc, Location location) -> void + # Initialize a new NoKeywordsParameterNode node. # # @return [NoKeywordsParameterNode] a new instance of NoKeywordsParameterNode # - # source://prism//lib/prism/node.rb#13881 + # source://prism//lib/prism/node.rb#12212 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, operator_loc: Prism::Location, - keyword_loc: Prism::Location, - location: Prism::Location + keyword_loc: Prism::Location ).void end - def initialize(source, operator_loc, keyword_loc, location); end + def initialize(source, node_id, location, flags, operator_loc, keyword_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#13980 + # source://prism//lib/prism/node.rb#12295 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13889 + # source://prism//lib/prism/node.rb#12222 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13894 + # source://prism//lib/prism/node.rb#12227 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#13904 + # source://prism//lib/prism/node.rb#12237 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#13899 + # source://prism//lib/prism/node.rb#12232 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?operator_loc: Location, ?keyword_loc: Location, ?location: Location) -> NoKeywordsParameterNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?operator_loc: Location, ?keyword_loc: Location) -> NoKeywordsParameterNode # - # source://prism//lib/prism/node.rb#13909 + # source://prism//lib/prism/node.rb#12242 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, operator_loc: Prism::Location, - keyword_loc: Prism::Location, - location: Prism::Location + keyword_loc: Prism::Location ).returns(Prism::NoKeywordsParameterNode) end - def copy(operator_loc: T.unsafe(nil), keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), operator_loc: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13894 + # source://prism//lib/prism/node.rb#12227 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { operator_loc: Location, keyword_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, operator_loc: Location, keyword_loc: Location } # - # source://prism//lib/prism/node.rb#13917 + # source://prism//lib/prism/node.rb#12250 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -24889,62 +25354,44 @@ class Prism::NoKeywordsParameterNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#13946 + # source://prism//lib/prism/node.rb#12279 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#13941 + # source://prism//lib/prism/node.rb#12274 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#13929 + # source://prism//lib/prism/node.rb#12262 sig { returns(Prism::Location) } def keyword_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#13936 + # source://prism//lib/prism/node.rb#12269 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#13922 + # source://prism//lib/prism/node.rb#12255 sig { returns(Prism::Location) } def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#13964 + # source://prism//lib/prism/node.rb#12284 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13974 + # source://prism//lib/prism/node.rb#12289 def type; end end end @@ -24960,16 +25407,26 @@ class Prism::Node # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#131 + # source://prism//lib/prism/node.rb#169 sig { abstract.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end + # Returns the first node that matches the given block when visited in a + # depth-first search. This is useful for finding a node that matches a + # particular condition. + # + # node.breadth_first_search { |node| node.node_id == node_id } + # + # source://prism//lib/prism/node.rb#139 + sig { params(block: T.proc.params(node: Prism::Node).returns(T::Boolean)).returns(T.nilable(Prism::Node)) } + def breadth_first_search(&block); end + # Returns an array of child nodes, including `nil`s in the place of optional # nodes that were not present. # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#137 + # source://prism//lib/prism/node.rb#175 sig { abstract.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end @@ -24978,7 +25435,7 @@ class Prism::Node # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#151 + # source://prism//lib/prism/node.rb#189 sig { abstract.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end @@ -24987,7 +25444,7 @@ class Prism::Node # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#145 + # source://prism//lib/prism/node.rb#183 sig { abstract.returns(T::Array[Prism::Node]) } def compact_child_nodes; end @@ -24996,7 +25453,7 @@ class Prism::Node # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#137 + # source://prism//lib/prism/node.rb#175 sig { abstract.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -25006,7 +25463,7 @@ class Prism::Node # 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 + # source://prism//lib/prism/node.rb#40 sig { returns(Integer) } def end_offset; end @@ -25017,29 +25474,46 @@ class Prism::Node # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#162 + # source://prism//lib/prism/node.rb#194 sig { abstract.returns(String) } def inspect; end # A Location instance that represents the location of this node in the # source. # - # source://prism//lib/prism/node.rb#19 + # source://prism//lib/prism/node.rb#25 sig { returns(Prism::Location) } def location; end + # Returns true if the node has the newline flag set. + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#72 + sig { returns(T::Boolean) } + def newline?; end + # source://prism//lib/prism/parse_result/newlines.rb#69 - def newline!(lines); end + def newline_flag!(lines); end # @return [Boolean] # # source://prism//lib/prism/parse_result/newlines.rb#65 - def newline?; end + def newline_flag?; end + + # A unique identifier for this node. This is used in a very specific + # use case where you want to keep around a reference to a node without + # having to keep around the syntax tree in memory. This unique identifier + # will be consistent across multiple parses of the same source code. + # + # source://prism//lib/prism/node.rb#21 + sig { returns(Integer) } + def node_id; end # Similar to inspect, but respects the current level of indentation given by # the pretty print object. # - # source://prism//lib/prism/node.rb#62 + # source://prism//lib/prism/node.rb#83 sig { params(q: T.untyped).void } def pretty_print(q); end @@ -25047,13 +25521,13 @@ class Prism::Node # An alias for source_lines, used to mimic the API from # RubyVM::AbstractSyntaxTree to make it easier to migrate. # - # source://prism//lib/prism/node.rb#40 + # source://prism//lib/prism/node.rb#46 sig { returns(T::Array[String]) } def script_lines; end # Slice the location of the node from the source. # - # source://prism//lib/prism/node.rb#49 + # source://prism//lib/prism/node.rb#55 sig { returns(String) } def slice; end @@ -25061,26 +25535,34 @@ class Prism::Node # of the line that the location starts on, ending at the end of the line # that the location ends on. # - # source://prism//lib/prism/node.rb#56 + # source://prism//lib/prism/node.rb#62 sig { returns(String) } def slice_lines; end # Returns all of the lines of the source code associated with this node. # - # source://prism//lib/prism/node.rb#40 + # source://prism//lib/prism/node.rb#46 sig { returns(T::Array[String]) } def source_lines; end # The start offset of the node in the source. This method is effectively a # delegate method to the location object. # - # source://prism//lib/prism/node.rb#27 + # source://prism//lib/prism/node.rb#33 sig { returns(Integer) } def start_offset; end + # Returns true if the node has the static literal flag set. + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#77 + sig { returns(T::Boolean) } + def static_literal?; end + # Convert this node into a graphviz dot graph string. # - # source://prism//lib/prism/node.rb#70 + # source://prism//lib/prism/node.rb#91 sig { returns(String) } def to_dot; end @@ -25091,19 +25573,38 @@ class Prism::Node # Important to note is that the column given to this method should be in # bytes, as opposed to characters or code units. # - # source://prism//lib/prism/node.rb#81 + # source://prism//lib/prism/node.rb#102 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. + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#157 + # source://prism//lib/prism/node.rb#210 sig { abstract.returns(Symbol) } def type; end + protected + + # An bitset of flags for this node. There are certain flags that are common + # for all nodes, and then some nodes have specific flags. + # + # source://prism//lib/prism/node.rb#68 + sig { returns(Integer) } + def flags; end + private # A pointer to the source that this node was created from. @@ -25119,79 +25620,114 @@ class Prism::Node # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#115 + # source://prism//lib/prism/node.rb#153 def fields; end - # Returns the type of the node as a symbol. + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#167 + # source://prism//lib/prism/node.rb#218 def type; end end end +# The flags that are common to all nodes. +# +# source://prism//lib/prism/node.rb#16855 +module Prism::NodeFlags; end + +# A flag to indicate that the node is a candidate to emit a :line event +# through tracepoint when compiled. +# +# source://prism//lib/prism/node.rb#16858 +Prism::NodeFlags::NEWLINE = T.let(T.unsafe(nil), Integer) + +# A flag to indicate that the value that the node represents is a value that +# can be determined at parse-time. +# +# source://prism//lib/prism/node.rb#16862 +Prism::NodeFlags::STATIC_LITERAL = T.let(T.unsafe(nil), Integer) + # Represents an implicit set of parameters through the use of numbered parameters within a block or lambda. # # -> { _1 + _2 } # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#13991 +# source://prism//lib/prism/node.rb#12306 class Prism::NumberedParametersNode < ::Prism::Node - # def initialize: (Integer maximum, Location location) -> void + # Initialize a new NumberedParametersNode node. # # @return [NumberedParametersNode] a new instance of NumberedParametersNode # - # source://prism//lib/prism/node.rb#13993 - sig { params(source: Prism::Source, maximum: Integer, location: Prism::Location).void } - def initialize(source, maximum, location); end + # source://prism//lib/prism/node.rb#12308 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + maximum: Integer + ).void + end + def initialize(source, node_id, location, flags, maximum); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#14070 + # source://prism//lib/prism/node.rb#12369 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14000 + # source://prism//lib/prism/node.rb#12317 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14005 + # source://prism//lib/prism/node.rb#12322 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14015 + # source://prism//lib/prism/node.rb#12332 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14010 + # source://prism//lib/prism/node.rb#12327 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?maximum: Integer, ?location: Location) -> NumberedParametersNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?maximum: Integer) -> NumberedParametersNode # - # source://prism//lib/prism/node.rb#14020 - sig { params(maximum: Integer, location: Prism::Location).returns(Prism::NumberedParametersNode) } - def copy(maximum: T.unsafe(nil), location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#12337 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + maximum: Integer + ).returns(Prism::NumberedParametersNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), maximum: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14005 + # source://prism//lib/prism/node.rb#12322 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { maximum: Integer, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, maximum: Integer } # - # source://prism//lib/prism/node.rb#14028 + # source://prism//lib/prism/node.rb#12345 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -25200,44 +25736,26 @@ class Prism::NumberedParametersNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#14036 + # source://prism//lib/prism/node.rb#12353 sig { override.returns(String) } def inspect; end # attr_reader maximum: Integer # - # source://prism//lib/prism/node.rb#14033 + # source://prism//lib/prism/node.rb#12350 sig { returns(Integer) } def maximum; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14054 + # source://prism//lib/prism/node.rb#12358 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#14064 + # source://prism//lib/prism/node.rb#12363 def type; end end end @@ -25247,62 +25765,77 @@ end # $1 # ^^ # -# source://prism//lib/prism/node.rb#14080 +# source://prism//lib/prism/node.rb#12379 class Prism::NumberedReferenceReadNode < ::Prism::Node - # def initialize: (Integer number, Location location) -> void + # Initialize a new NumberedReferenceReadNode node. # # @return [NumberedReferenceReadNode] a new instance of NumberedReferenceReadNode # - # source://prism//lib/prism/node.rb#14082 - sig { params(source: Prism::Source, number: Integer, location: Prism::Location).void } - def initialize(source, number, location); end + # source://prism//lib/prism/node.rb#12381 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + number: Integer + ).void + end + def initialize(source, node_id, location, flags, number); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#14165 + # source://prism//lib/prism/node.rb#12448 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14089 + # source://prism//lib/prism/node.rb#12390 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14094 + # source://prism//lib/prism/node.rb#12395 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14104 + # source://prism//lib/prism/node.rb#12405 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14099 + # source://prism//lib/prism/node.rb#12400 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?number: Integer, ?location: Location) -> NumberedReferenceReadNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?number: Integer) -> NumberedReferenceReadNode # - # source://prism//lib/prism/node.rb#14109 - sig { params(number: Integer, location: Prism::Location).returns(Prism::NumberedReferenceReadNode) } - def copy(number: T.unsafe(nil), location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#12410 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + number: Integer + ).returns(Prism::NumberedReferenceReadNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), number: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14094 + # source://prism//lib/prism/node.rb#12395 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { number: Integer, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, number: Integer } # - # source://prism//lib/prism/node.rb#14117 + # source://prism//lib/prism/node.rb#12418 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -25311,7 +25844,7 @@ class Prism::NumberedReferenceReadNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#14131 + # source://prism//lib/prism/node.rb#12432 sig { override.returns(String) } def inspect; end @@ -25323,38 +25856,20 @@ class Prism::NumberedReferenceReadNode < ::Prism::Node # # $4294967296 # number `0` # - # source://prism//lib/prism/node.rb#14128 + # source://prism//lib/prism/node.rb#12429 sig { returns(Integer) } def number; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#14149 + # source://prism//lib/prism/node.rb#12437 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14159 + # source://prism//lib/prism/node.rb#12442 def type; end end end @@ -25365,79 +25880,81 @@ end # ^^^^ # end # -# source://prism//lib/prism/node.rb#14176 +# source://prism//lib/prism/node.rb#12459 class Prism::OptionalKeywordParameterNode < ::Prism::Node - # def initialize: (Integer flags, Symbol name, Location name_loc, Prism::node value, Location location) -> void + # Initialize a new OptionalKeywordParameterNode node. # # @return [OptionalKeywordParameterNode] a new instance of OptionalKeywordParameterNode # - # source://prism//lib/prism/node.rb#14178 + # source://prism//lib/prism/node.rb#12461 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, name: Symbol, name_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, flags, name, name_loc, value, location); end + def initialize(source, node_id, location, flags, name, name_loc, value); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#14277 + # source://prism//lib/prism/node.rb#12539 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14188 + # source://prism//lib/prism/node.rb#12472 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14193 + # source://prism//lib/prism/node.rb#12477 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14203 + # source://prism//lib/prism/node.rb#12487 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14198 + # source://prism//lib/prism/node.rb#12482 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node) -> OptionalKeywordParameterNode # - # source://prism//lib/prism/node.rb#14208 + # source://prism//lib/prism/node.rb#12492 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, name: Symbol, name_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14193 + # source://prism//lib/prism/node.rb#12477 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, name_loc: Location, value: Prism::node, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#14216 + # source://prism//lib/prism/node.rb#12500 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -25446,19 +25963,19 @@ class Prism::OptionalKeywordParameterNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#14243 + # source://prism//lib/prism/node.rb#12523 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#14225 + # source://prism//lib/prism/node.rb#12510 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#14228 + # source://prism//lib/prism/node.rb#12513 sig { returns(Prism::Location) } def name_loc; end @@ -25466,52 +25983,26 @@ class Prism::OptionalKeywordParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#14238 + # source://prism//lib/prism/node.rb#12505 sig { returns(T::Boolean) } def repeated_parameter?; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14261 + # source://prism//lib/prism/node.rb#12528 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#14235 + # source://prism//lib/prism/node.rb#12520 sig { returns(Prism::Node) } def value; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#14221 - 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#14271 + # source://prism//lib/prism/node.rb#12533 def type; end end end @@ -25522,81 +26013,83 @@ end # ^^^^^ # end # -# source://prism//lib/prism/node.rb#14291 +# source://prism//lib/prism/node.rb#12553 class Prism::OptionalParameterNode < ::Prism::Node - # def initialize: (Integer flags, Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void + # Initialize a new OptionalParameterNode node. # # @return [OptionalParameterNode] a new instance of OptionalParameterNode # - # source://prism//lib/prism/node.rb#14293 + # source://prism//lib/prism/node.rb#12555 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, flags, name, name_loc, operator_loc, value, location); end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#14405 + # source://prism//lib/prism/node.rb#12646 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14304 + # source://prism//lib/prism/node.rb#12567 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14309 + # source://prism//lib/prism/node.rb#12572 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14319 + # source://prism//lib/prism/node.rb#12582 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14314 + # source://prism//lib/prism/node.rb#12577 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> OptionalParameterNode # - # source://prism//lib/prism/node.rb#14324 + # source://prism//lib/prism/node.rb#12587 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14309 + # source://prism//lib/prism/node.rb#12572 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # - # source://prism//lib/prism/node.rb#14332 + # source://prism//lib/prism/node.rb#12595 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -25605,31 +26098,31 @@ class Prism::OptionalParameterNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#14371 + # source://prism//lib/prism/node.rb#12630 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#14341 + # source://prism//lib/prism/node.rb#12605 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#14344 + # source://prism//lib/prism/node.rb#12608 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#14366 + # source://prism//lib/prism/node.rb#12625 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#14351 + # source://prism//lib/prism/node.rb#12615 sig { returns(Prism::Location) } def operator_loc; end @@ -25637,52 +26130,26 @@ class Prism::OptionalParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#14361 + # source://prism//lib/prism/node.rb#12600 sig { returns(T::Boolean) } def repeated_parameter?; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#14389 + # source://prism//lib/prism/node.rb#12635 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#14358 + # source://prism//lib/prism/node.rb#12622 sig { returns(Prism::Node) } def value; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#14337 - 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14399 + # source://prism//lib/prism/node.rb#12640 def type; end end end @@ -25692,77 +26159,81 @@ end # left or right # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#14419 +# source://prism//lib/prism/node.rb#12660 class Prism::OrNode < ::Prism::Node - # def initialize: (Prism::node left, Prism::node right, Location operator_loc, Location location) -> void + # Initialize a new OrNode node. # # @return [OrNode] a new instance of OrNode # - # source://prism//lib/prism/node.rb#14421 + # source://prism//lib/prism/node.rb#12662 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, left: Prism::Node, right: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).void end - def initialize(source, left, right, operator_loc, location); end + def initialize(source, node_id, location, flags, left, right, operator_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#14530 + # source://prism//lib/prism/node.rb#12755 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14430 + # source://prism//lib/prism/node.rb#12673 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14435 + # source://prism//lib/prism/node.rb#12678 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14445 + # source://prism//lib/prism/node.rb#12688 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14440 + # source://prism//lib/prism/node.rb#12683 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node, ?right: Prism::node, ?operator_loc: Location) -> OrNode # - # source://prism//lib/prism/node.rb#14450 + # source://prism//lib/prism/node.rb#12693 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, left: Prism::Node, right: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: 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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14435 + # source://prism//lib/prism/node.rb#12678 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { left: Prism::node, right: Prism::node, operator_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node, right: Prism::node, operator_loc: Location } # - # source://prism//lib/prism/node.rb#14458 + # source://prism//lib/prism/node.rb#12701 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -25771,7 +26242,7 @@ class Prism::OrNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#14496 + # source://prism//lib/prism/node.rb#12739 sig { override.returns(String) } def inspect; end @@ -25783,13 +26254,13 @@ class Prism::OrNode < ::Prism::Node # 1 || 2 # ^ # - # source://prism//lib/prism/node.rb#14469 + # source://prism//lib/prism/node.rb#12712 sig { returns(Prism::Node) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#14491 + # source://prism//lib/prism/node.rb#12734 sig { returns(String) } def operator; end @@ -25798,11 +26269,11 @@ class Prism::OrNode < ::Prism::Node # left or right # ^^ # - # source://prism//lib/prism/node.rb#14484 + # source://prism//lib/prism/node.rb#12727 sig { returns(Prism::Location) } def operator_loc; end - # Represents the right side of the expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # Represents the right side of the expression. # # left || right # ^^^^^ @@ -25810,38 +26281,20 @@ class Prism::OrNode < ::Prism::Node # 1 or 2 # ^ # - # source://prism//lib/prism/node.rb#14478 + # source://prism//lib/prism/node.rb#12721 sig { returns(Prism::Node) } def right; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#14514 + # source://prism//lib/prism/node.rb#12744 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14524 + # source://prism//lib/prism/node.rb#12749 def type; end end end @@ -26090,12 +26543,12 @@ Prism::Pack::UTF8 = T.let(T.unsafe(nil), Symbol) # Flags for parameter nodes. # -# source://prism//lib/prism/node.rb#19202 +# source://prism//lib/prism/node.rb#16768 module Prism::ParameterFlags; end # a parameter name that has been repeated in the method signature # -# source://prism//lib/prism/node.rb#19204 +# source://prism//lib/prism/node.rb#16770 Prism::ParameterFlags::REPEATED_PARAMETER = T.let(T.unsafe(nil), Integer) # Represents the list of parameters on a method, block, or lambda definition. @@ -26104,91 +26557,95 @@ Prism::ParameterFlags::REPEATED_PARAMETER = T.let(T.unsafe(nil), Integer) # ^^^^^^^ # end # -# source://prism//lib/prism/node.rb#14543 +# source://prism//lib/prism/node.rb#12768 class Prism::ParametersNode < ::Prism::Node - # def initialize: (Array[RequiredParameterNode | MultiTargetNode] requireds, Array[OptionalParameterNode] optionals, RestParameterNode | ImplicitRestNode | nil rest, Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode] posts, Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode] keywords, KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil keyword_rest, BlockParameterNode? block, Location location) -> void + # Initialize a new ParametersNode node. # # @return [ParametersNode] a new instance of ParametersNode # - # source://prism//lib/prism/node.rb#14545 + # source://prism//lib/prism/node.rb#12770 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, requireds: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)], optionals: T::Array[Prism::OptionalParameterNode], rest: T.nilable(T.any(Prism::RestParameterNode, Prism::ImplicitRestNode)), posts: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode, Prism::ForwardingParameterNode)], keywords: T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)], keyword_rest: T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode)), - block: T.nilable(Prism::BlockParameterNode), - location: Prism::Location + block: T.nilable(Prism::BlockParameterNode) ).void end - def initialize(source, requireds, optionals, rest, posts, keywords, keyword_rest, block, location); end + def initialize(source, node_id, location, flags, requireds, optionals, rest, posts, keywords, keyword_rest, block); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#14654 + # source://prism//lib/prism/node.rb#12863 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14558 + # source://prism//lib/prism/node.rb#12785 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader block: BlockParameterNode? # - # source://prism//lib/prism/node.rb#14617 + # source://prism//lib/prism/node.rb#12844 sig { returns(T.nilable(Prism::BlockParameterNode)) } def block; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14563 + # source://prism//lib/prism/node.rb#12790 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14581 + # source://prism//lib/prism/node.rb#12808 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14568 + # source://prism//lib/prism/node.rb#12795 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?requireds: Array[RequiredParameterNode | MultiTargetNode], ?optionals: Array[OptionalParameterNode], ?rest: RestParameterNode | ImplicitRestNode | nil, ?posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode], ?keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode], ?keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil, ?block: BlockParameterNode?, ?location: Location) -> ParametersNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?requireds: Array[RequiredParameterNode | MultiTargetNode], ?optionals: Array[OptionalParameterNode], ?rest: RestParameterNode | ImplicitRestNode | nil, ?posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode], ?keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode], ?keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil, ?block: BlockParameterNode?) -> ParametersNode # - # source://prism//lib/prism/node.rb#14586 + # source://prism//lib/prism/node.rb#12813 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, requireds: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)], optionals: T::Array[Prism::OptionalParameterNode], rest: T.nilable(T.any(Prism::RestParameterNode, Prism::ImplicitRestNode)), posts: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode, Prism::ForwardingParameterNode)], keywords: T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)], keyword_rest: T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode)), - block: T.nilable(Prism::BlockParameterNode), - location: Prism::Location + block: T.nilable(Prism::BlockParameterNode) ).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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), requireds: T.unsafe(nil), optionals: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), keywords: T.unsafe(nil), keyword_rest: T.unsafe(nil), block: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14563 + # source://prism//lib/prism/node.rb#12790 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { 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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, requireds: Array[RequiredParameterNode | MultiTargetNode], optionals: Array[OptionalParameterNode], rest: RestParameterNode | ImplicitRestNode | nil, posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode], keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode], keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil, block: BlockParameterNode? } # - # source://prism//lib/prism/node.rb#14594 + # source://prism//lib/prism/node.rb#12821 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -26197,13 +26654,13 @@ class Prism::ParametersNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#14620 + # source://prism//lib/prism/node.rb#12847 sig { override.returns(String) } def inspect; end # attr_reader keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil # - # source://prism//lib/prism/node.rb#14614 + # source://prism//lib/prism/node.rb#12841 sig do returns(T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode))) end @@ -26211,19 +26668,19 @@ class Prism::ParametersNode < ::Prism::Node # attr_reader keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode] # - # source://prism//lib/prism/node.rb#14611 + # source://prism//lib/prism/node.rb#12838 sig { returns(T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)]) } def keywords; end # attr_reader optionals: Array[OptionalParameterNode] # - # source://prism//lib/prism/node.rb#14602 + # source://prism//lib/prism/node.rb#12829 sig { returns(T::Array[Prism::OptionalParameterNode]) } def optionals; end # attr_reader posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode] # - # source://prism//lib/prism/node.rb#14608 + # source://prism//lib/prism/node.rb#12835 sig do returns(T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode, Prism::ForwardingParameterNode)]) end @@ -26231,50 +26688,32 @@ class Prism::ParametersNode < ::Prism::Node # attr_reader requireds: Array[RequiredParameterNode | MultiTargetNode] # - # source://prism//lib/prism/node.rb#14599 + # source://prism//lib/prism/node.rb#12826 sig { returns(T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)]) } def requireds; end # attr_reader rest: RestParameterNode | ImplicitRestNode | nil # - # source://prism//lib/prism/node.rb#14605 + # source://prism//lib/prism/node.rb#12832 sig { returns(T.nilable(T.any(Prism::RestParameterNode, Prism::ImplicitRestNode))) } def rest; end # Mirrors the Method#parameters method. # - # source://prism//lib/prism/node_ext.rb#253 + # source://prism//lib/prism/node_ext.rb#269 sig { returns(T::Array[T.any([Symbol, Symbol], [Symbol])]) } def signature; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#14638 + # source://prism//lib/prism/node.rb#12852 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14648 + # source://prism//lib/prism/node.rb#12857 def type; end end end @@ -26284,95 +26723,99 @@ end # (10 + 34) # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#14674 +# source://prism//lib/prism/node.rb#12883 class Prism::ParenthesesNode < ::Prism::Node - # def initialize: (Prism::node? body, Location opening_loc, Location closing_loc, Location location) -> void + # Initialize a new ParenthesesNode node. # # @return [ParenthesesNode] a new instance of ParenthesesNode # - # source://prism//lib/prism/node.rb#14676 + # source://prism//lib/prism/node.rb#12885 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, body: T.nilable(Prism::Node), opening_loc: Prism::Location, - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: Prism::Location ).void end - def initialize(source, body, opening_loc, closing_loc, location); end + def initialize(source, node_id, location, flags, body, opening_loc, closing_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#14781 + # source://prism//lib/prism/node.rb#12974 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14685 + # source://prism//lib/prism/node.rb#12896 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: Prism::node? # - # source://prism//lib/prism/node.rb#14720 + # source://prism//lib/prism/node.rb#12931 sig { returns(T.nilable(Prism::Node)) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14690 + # source://prism//lib/prism/node.rb#12901 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#14742 + # source://prism//lib/prism/node.rb#12953 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#14730 + # source://prism//lib/prism/node.rb#12941 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14702 + # source://prism//lib/prism/node.rb#12913 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14695 + # source://prism//lib/prism/node.rb#12906 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?body: Prism::node?, ?opening_loc: Location, ?closing_loc: Location) -> ParenthesesNode # - # source://prism//lib/prism/node.rb#14707 + # source://prism//lib/prism/node.rb#12918 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, body: T.nilable(Prism::Node), opening_loc: Prism::Location, - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: 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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), body: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14690 + # source://prism//lib/prism/node.rb#12901 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { body: Prism::node?, opening_loc: Location, closing_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, body: Prism::node?, opening_loc: Location, closing_loc: Location } # - # source://prism//lib/prism/node.rb#14715 + # source://prism//lib/prism/node.rb#12926 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -26381,116 +26824,98 @@ class Prism::ParenthesesNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#14747 + # source://prism//lib/prism/node.rb#12958 sig { override.returns(String) } def inspect; end # source://prism//lib/prism/parse_result/newlines.rb#85 - def newline!(lines); end + def newline_flag!(lines); end # def opening: () -> String # - # source://prism//lib/prism/node.rb#14737 + # source://prism//lib/prism/node.rb#12948 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#14723 + # source://prism//lib/prism/node.rb#12934 sig { returns(Prism::Location) } def opening_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#14765 + # source://prism//lib/prism/node.rb#12963 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#14775 + # source://prism//lib/prism/node.rb#12968 def type; end end end # This represents an error that was encountered during parsing. # -# source://prism//lib/prism/parse_result.rb#451 +# source://prism//lib/prism/parse_result.rb#592 class Prism::ParseError # Create a new error object with the given message and location. # # @return [ParseError] a new instance of ParseError # - # source://prism//lib/prism/parse_result.rb#466 + # source://prism//lib/prism/parse_result.rb#607 sig { params(type: Symbol, message: String, location: Prism::Location, level: Symbol).void } def initialize(type, message, location, level); end # Implement the hash pattern matching interface for ParseError. # - # source://prism//lib/prism/parse_result.rb#474 + # source://prism//lib/prism/parse_result.rb#615 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # Returns a string representation of this error. # - # source://prism//lib/prism/parse_result.rb#479 + # source://prism//lib/prism/parse_result.rb#620 sig { returns(String) } def inspect; end # The level of this error. # - # source://prism//lib/prism/parse_result.rb#463 + # source://prism//lib/prism/parse_result.rb#604 sig { returns(Symbol) } def level; end # A Location object representing the location of this error in the source. # - # source://prism//lib/prism/parse_result.rb#460 + # source://prism//lib/prism/parse_result.rb#601 sig { returns(Prism::Location) } def location; end # The message associated with this error. # - # source://prism//lib/prism/parse_result.rb#457 + # source://prism//lib/prism/parse_result.rb#598 sig { returns(String) } def message; end # The type of error. This is an _internal_ symbol that is used for # communicating with translation layers. It is not meant to be public API. # - # source://prism//lib/prism/parse_result.rb#454 + # source://prism//lib/prism/parse_result.rb#595 sig { returns(Symbol) } def type; end end # This is a result specific to the `parse_lex` and `parse_lex_file` methods. # -# source://prism//lib/prism/parse_result.rb#627 +# source://prism//lib/prism/parse_result.rb#781 class Prism::ParseLexResult < ::Prism::Result # Create a new parse lex result object with the given values. # # @return [ParseLexResult] a new instance of ParseLexResult # - # source://prism//lib/prism/parse_result.rb#633 + # source://prism//lib/prism/parse_result.rb#787 sig do params( value: [Prism::ProgramNode, T::Array[T.untyped]], @@ -26506,27 +26931,27 @@ class Prism::ParseLexResult < ::Prism::Result # Implement the hash pattern matching interface for ParseLexResult. # - # source://prism//lib/prism/parse_result.rb#639 + # source://prism//lib/prism/parse_result.rb#793 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # A tuple of the syntax tree and the list of tokens that were parsed from # the source code. # - # source://prism//lib/prism/parse_result.rb#630 + # source://prism//lib/prism/parse_result.rb#784 sig { returns([Prism::ProgramNode, T::Array[T.untyped]]) } def value; end end # This is a result specific to the `parse` and `parse_file` methods. # -# source://prism//lib/prism/parse_result.rb#576 +# source://prism//lib/prism/parse_result.rb#722 class Prism::ParseResult < ::Prism::Result # Create a new parse result object with the given values. # # @return [ParseResult] a new instance of ParseResult # - # source://prism//lib/prism/parse_result.rb#587 + # source://prism//lib/prism/parse_result.rb#735 sig do params( value: Prism::ProgramNode, @@ -26542,24 +26967,30 @@ class Prism::ParseResult < ::Prism::Result # Attach the list of comments to their respective locations in the tree. # - # source://prism//lib/prism/parse_result.rb#598 + # source://prism//lib/prism/parse_result.rb#746 def attach_comments!; end # Implement the hash pattern matching interface for ParseResult. # - # source://prism//lib/prism/parse_result.rb#593 + # source://prism//lib/prism/parse_result.rb#741 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # Returns a string representation of the syntax tree with the errors + # displayed inline. + # + # source://prism//lib/prism/parse_result.rb#758 + def errors_format; end + # Walk the tree and mark nodes that are on a new line, loosely emulating # the behavior of CRuby's `:line` tracepoint event. # - # source://prism//lib/prism/parse_result.rb#604 + # source://prism//lib/prism/parse_result.rb#752 def mark_newlines!; end # The syntax tree that was parsed from the source code. # - # source://prism//lib/prism/parse_result.rb#584 + # source://prism//lib/prism/parse_result.rb#732 sig { returns(Prism::ProgramNode) } def value; end end @@ -26671,6 +27102,29 @@ class Prism::ParseResult::Comments::NodeTarget def trailing_comment(comment); end end +# An object to represent the set of errors on a parse result. This object +# can be used to format the errors in a human-readable way. +# +# source://prism//lib/prism/parse_result/errors.rb#9 +class Prism::ParseResult::Errors + # Initialize a new set of errors from the given parse result. + # + # @return [Errors] a new instance of Errors + # + # source://prism//lib/prism/parse_result/errors.rb#14 + def initialize(parse_result); end + + # Formats the errors in a human-readable way and return them as a string. + # + # source://prism//lib/prism/parse_result/errors.rb#19 + def format; end + + # The parse result that contains the errors. + # + # source://prism//lib/prism/parse_result/errors.rb#11 + def parse_result; end +end + # The :line tracepoint event gets fired whenever the Ruby VM encounters an # expression on a new line. The types of expressions that can trigger this # event are: @@ -26729,50 +27183,50 @@ end # This represents a warning that was encountered during parsing. # -# source://prism//lib/prism/parse_result.rb#485 +# source://prism//lib/prism/parse_result.rb#626 class Prism::ParseWarning # Create a new warning object with the given message and location. # # @return [ParseWarning] a new instance of ParseWarning # - # source://prism//lib/prism/parse_result.rb#500 + # source://prism//lib/prism/parse_result.rb#641 sig { params(type: Symbol, message: String, location: Prism::Location, level: Symbol).void } def initialize(type, message, location, level); end # Implement the hash pattern matching interface for ParseWarning. # - # source://prism//lib/prism/parse_result.rb#508 + # source://prism//lib/prism/parse_result.rb#649 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # Returns a string representation of this warning. # - # source://prism//lib/prism/parse_result.rb#513 + # source://prism//lib/prism/parse_result.rb#654 sig { returns(String) } def inspect; end # The level of this warning. # - # source://prism//lib/prism/parse_result.rb#497 + # source://prism//lib/prism/parse_result.rb#638 sig { returns(Symbol) } def level; end # A Location object representing the location of this warning in the source. # - # source://prism//lib/prism/parse_result.rb#494 + # source://prism//lib/prism/parse_result.rb#635 sig { returns(Prism::Location) } def location; end # The message associated with this warning. # - # source://prism//lib/prism/parse_result.rb#491 + # source://prism//lib/prism/parse_result.rb#632 sig { returns(String) } def message; end # The type of warning. This is an _internal_ symbol that is used for # communicating with translation layers. It is not meant to be public API. # - # source://prism//lib/prism/parse_result.rb#488 + # source://prism//lib/prism/parse_result.rb#629 sig { returns(Symbol) } def type; end end @@ -26943,85 +27397,89 @@ end # foo in ^(bar) # ^^^^^^ # -# source://prism//lib/prism/node.rb#14793 +# source://prism//lib/prism/node.rb#12986 class Prism::PinnedExpressionNode < ::Prism::Node - # def initialize: (Prism::node expression, Location operator_loc, Location lparen_loc, Location rparen_loc, Location location) -> void + # Initialize a new PinnedExpressionNode node. # # @return [PinnedExpressionNode] a new instance of PinnedExpressionNode # - # source://prism//lib/prism/node.rb#14795 + # source://prism//lib/prism/node.rb#12988 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, expression: Prism::Node, operator_loc: Prism::Location, lparen_loc: Prism::Location, - rparen_loc: Prism::Location, - location: Prism::Location + rparen_loc: Prism::Location ).void end - def initialize(source, expression, operator_loc, lparen_loc, rparen_loc, location); end + def initialize(source, node_id, location, flags, expression, operator_loc, lparen_loc, rparen_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#14911 + # source://prism//lib/prism/node.rb#13088 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14805 + # source://prism//lib/prism/node.rb#13000 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14810 + # source://prism//lib/prism/node.rb#13005 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14820 + # source://prism//lib/prism/node.rb#13015 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14815 + # source://prism//lib/prism/node.rb#13010 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?expression: Prism::node, ?operator_loc: Location, ?lparen_loc: Location, ?rparen_loc: Location) -> PinnedExpressionNode # - # source://prism//lib/prism/node.rb#14825 + # source://prism//lib/prism/node.rb#13020 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, expression: Prism::Node, operator_loc: Prism::Location, lparen_loc: Prism::Location, - rparen_loc: Prism::Location, - location: Prism::Location + rparen_loc: 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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), expression: T.unsafe(nil), operator_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14810 + # source://prism//lib/prism/node.rb#13005 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { expression: Prism::node, operator_loc: Location, lparen_loc: Location, rparen_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, expression: Prism::node, operator_loc: Location, lparen_loc: Location, rparen_loc: Location } # - # source://prism//lib/prism/node.rb#14833 + # source://prism//lib/prism/node.rb#13028 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader expression: Prism::node # - # source://prism//lib/prism/node.rb#14838 + # source://prism//lib/prism/node.rb#13033 sig { returns(Prism::Node) } def expression; end @@ -27030,74 +27488,56 @@ class Prism::PinnedExpressionNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#14877 + # source://prism//lib/prism/node.rb#13072 sig { override.returns(String) } def inspect; end # def lparen: () -> String # - # source://prism//lib/prism/node.rb#14867 + # source://prism//lib/prism/node.rb#13062 sig { returns(String) } def lparen; end # attr_reader lparen_loc: Location # - # source://prism//lib/prism/node.rb#14848 + # source://prism//lib/prism/node.rb#13043 sig { returns(Prism::Location) } def lparen_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#14862 + # source://prism//lib/prism/node.rb#13057 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#14841 + # source://prism//lib/prism/node.rb#13036 sig { returns(Prism::Location) } def operator_loc; end # def rparen: () -> String # - # source://prism//lib/prism/node.rb#14872 + # source://prism//lib/prism/node.rb#13067 sig { returns(String) } def rparen; end # attr_reader rparen_loc: Location # - # source://prism//lib/prism/node.rb#14855 + # source://prism//lib/prism/node.rb#13050 sig { returns(Prism::Location) } def rparen_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14895 + # source://prism//lib/prism/node.rb#13077 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14905 + # source://prism//lib/prism/node.rb#13082 def type; end end end @@ -27107,75 +27547,79 @@ end # foo in ^bar # ^^^^ # -# source://prism//lib/prism/node.rb#14924 +# source://prism//lib/prism/node.rb#13101 class Prism::PinnedVariableNode < ::Prism::Node - # def initialize: (Prism::node variable, Location operator_loc, Location location) -> void + # Initialize a new PinnedVariableNode node. # # @return [PinnedVariableNode] a new instance of PinnedVariableNode # - # source://prism//lib/prism/node.rb#14926 + # source://prism//lib/prism/node.rb#13103 sig do params( source: Prism::Source, - variable: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + node_id: Integer, + location: Prism::Location, + flags: Integer, + variable: T.any(Prism::LocalVariableReadNode, Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::ItLocalVariableReadNode, Prism::MissingNode), + operator_loc: Prism::Location ).void end - def initialize(source, variable, operator_loc, location); end + def initialize(source, node_id, location, flags, variable, operator_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#15016 + # source://prism//lib/prism/node.rb#13177 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14934 + # source://prism//lib/prism/node.rb#13113 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14939 + # source://prism//lib/prism/node.rb#13118 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14949 + # source://prism//lib/prism/node.rb#13128 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#14944 + # source://prism//lib/prism/node.rb#13123 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?variable: Prism::node, ?operator_loc: Location, ?location: Location) -> PinnedVariableNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?variable: LocalVariableReadNode | InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | ItLocalVariableReadNode | MissingNode, ?operator_loc: Location) -> PinnedVariableNode # - # source://prism//lib/prism/node.rb#14954 + # source://prism//lib/prism/node.rb#13133 sig do params( - variable: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + node_id: Integer, + location: Prism::Location, + flags: Integer, + variable: T.any(Prism::LocalVariableReadNode, Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::ItLocalVariableReadNode, Prism::MissingNode), + operator_loc: Prism::Location ).returns(Prism::PinnedVariableNode) end - def copy(variable: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), variable: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14939 + # source://prism//lib/prism/node.rb#13118 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { variable: Prism::node, operator_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, variable: LocalVariableReadNode | InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | ItLocalVariableReadNode | MissingNode, operator_loc: Location } # - # source://prism//lib/prism/node.rb#14962 + # source://prism//lib/prism/node.rb#13141 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -27184,56 +27628,40 @@ class Prism::PinnedVariableNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#14982 + # source://prism//lib/prism/node.rb#13161 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#14977 + # source://prism//lib/prism/node.rb#13156 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#14970 + # source://prism//lib/prism/node.rb#13149 sig { returns(Prism::Location) } def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#15000 + # source://prism//lib/prism/node.rb#13166 sig { override.returns(Symbol) } def type; end - # attr_reader variable: Prism::node + # attr_reader variable: LocalVariableReadNode | InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | ItLocalVariableReadNode | MissingNode # - # source://prism//lib/prism/node.rb#14967 - sig { returns(Prism::Node) } + # source://prism//lib/prism/node.rb#13146 + sig do + returns(T.any(Prism::LocalVariableReadNode, Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::ItLocalVariableReadNode, Prism::MissingNode)) + end def variable; end class << self - # 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#15010 + # source://prism//lib/prism/node.rb#13171 def type; end end end @@ -27243,91 +27671,95 @@ end # END { foo } # ^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#15027 +# source://prism//lib/prism/node.rb#13188 class Prism::PostExecutionNode < ::Prism::Node - # def initialize: (StatementsNode? statements, Location keyword_loc, Location opening_loc, Location closing_loc, Location location) -> void + # Initialize a new PostExecutionNode node. # # @return [PostExecutionNode] a new instance of PostExecutionNode # - # source://prism//lib/prism/node.rb#15029 + # source://prism//lib/prism/node.rb#13190 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, statements: T.nilable(Prism::StatementsNode), keyword_loc: Prism::Location, opening_loc: Prism::Location, - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: Prism::Location ).void end - def initialize(source, statements, keyword_loc, opening_loc, closing_loc, location); end + def initialize(source, node_id, location, flags, statements, keyword_loc, opening_loc, closing_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#15147 + # source://prism//lib/prism/node.rb#13292 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15039 + # source://prism//lib/prism/node.rb#13202 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15044 + # source://prism//lib/prism/node.rb#13207 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#15108 + # source://prism//lib/prism/node.rb#13271 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#15091 + # source://prism//lib/prism/node.rb#13254 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15056 + # source://prism//lib/prism/node.rb#13219 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15049 + # source://prism//lib/prism/node.rb#13212 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?statements: StatementsNode?, ?keyword_loc: Location, ?opening_loc: Location, ?closing_loc: Location) -> PostExecutionNode # - # source://prism//lib/prism/node.rb#15061 + # source://prism//lib/prism/node.rb#13224 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, statements: T.nilable(Prism::StatementsNode), keyword_loc: Prism::Location, opening_loc: Prism::Location, - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: 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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), statements: T.unsafe(nil), keyword_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15044 + # source://prism//lib/prism/node.rb#13207 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location } # - # source://prism//lib/prism/node.rb#15069 + # source://prism//lib/prism/node.rb#13232 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -27336,68 +27768,50 @@ class Prism::PostExecutionNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#15113 + # source://prism//lib/prism/node.rb#13276 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#15098 + # source://prism//lib/prism/node.rb#13261 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#15077 + # source://prism//lib/prism/node.rb#13240 sig { returns(Prism::Location) } def keyword_loc; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#15103 + # source://prism//lib/prism/node.rb#13266 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#15084 + # source://prism//lib/prism/node.rb#13247 sig { returns(Prism::Location) } def opening_loc; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#15074 + # source://prism//lib/prism/node.rb#13237 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#15131 + # source://prism//lib/prism/node.rb#13281 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#15141 + # source://prism//lib/prism/node.rb#13286 def type; end end end @@ -27407,91 +27821,95 @@ end # BEGIN { foo } # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#15160 +# source://prism//lib/prism/node.rb#13305 class Prism::PreExecutionNode < ::Prism::Node - # def initialize: (StatementsNode? statements, Location keyword_loc, Location opening_loc, Location closing_loc, Location location) -> void + # Initialize a new PreExecutionNode node. # # @return [PreExecutionNode] a new instance of PreExecutionNode # - # source://prism//lib/prism/node.rb#15162 + # source://prism//lib/prism/node.rb#13307 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, statements: T.nilable(Prism::StatementsNode), keyword_loc: Prism::Location, opening_loc: Prism::Location, - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: Prism::Location ).void end - def initialize(source, statements, keyword_loc, opening_loc, closing_loc, location); end + def initialize(source, node_id, location, flags, statements, keyword_loc, opening_loc, closing_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#15280 + # source://prism//lib/prism/node.rb#13409 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15172 + # source://prism//lib/prism/node.rb#13319 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15177 + # source://prism//lib/prism/node.rb#13324 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#15241 + # source://prism//lib/prism/node.rb#13388 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#15224 + # source://prism//lib/prism/node.rb#13371 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15189 + # source://prism//lib/prism/node.rb#13336 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15182 + # source://prism//lib/prism/node.rb#13329 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?statements: StatementsNode?, ?keyword_loc: Location, ?opening_loc: Location, ?closing_loc: Location) -> PreExecutionNode # - # source://prism//lib/prism/node.rb#15194 + # source://prism//lib/prism/node.rb#13341 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, statements: T.nilable(Prism::StatementsNode), keyword_loc: Prism::Location, opening_loc: Prism::Location, - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: 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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), statements: T.unsafe(nil), keyword_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15177 + # source://prism//lib/prism/node.rb#13324 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location } # - # source://prism//lib/prism/node.rb#15202 + # source://prism//lib/prism/node.rb#13349 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -27500,143 +27918,129 @@ class Prism::PreExecutionNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#15246 + # source://prism//lib/prism/node.rb#13393 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#15231 + # source://prism//lib/prism/node.rb#13378 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#15210 + # source://prism//lib/prism/node.rb#13357 sig { returns(Prism::Location) } def keyword_loc; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#15236 + # source://prism//lib/prism/node.rb#13383 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#15217 + # source://prism//lib/prism/node.rb#13364 sig { returns(Prism::Location) } def opening_loc; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#15207 + # source://prism//lib/prism/node.rb#13354 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15264 + # source://prism//lib/prism/node.rb#13398 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#15274 + # source://prism//lib/prism/node.rb#13403 def type; end end end # The top level node of any parse tree. # -# source://prism//lib/prism/node.rb#15290 +# source://prism//lib/prism/node.rb#13419 class Prism::ProgramNode < ::Prism::Node - # def initialize: (Array[Symbol] locals, StatementsNode statements, Location location) -> void + # Initialize a new ProgramNode node. # # @return [ProgramNode] a new instance of ProgramNode # - # source://prism//lib/prism/node.rb#15292 + # source://prism//lib/prism/node.rb#13421 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, locals: T::Array[Symbol], - statements: Prism::StatementsNode, - location: Prism::Location + statements: Prism::StatementsNode ).void end - def initialize(source, locals, statements, location); end + def initialize(source, node_id, location, flags, locals, statements); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#15373 + # source://prism//lib/prism/node.rb#13486 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15300 + # source://prism//lib/prism/node.rb#13431 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15305 + # source://prism//lib/prism/node.rb#13436 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15315 + # source://prism//lib/prism/node.rb#13446 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15310 + # source://prism//lib/prism/node.rb#13441 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?locals: Array[Symbol], ?statements: StatementsNode, ?location: Location) -> ProgramNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?statements: StatementsNode) -> ProgramNode # - # source://prism//lib/prism/node.rb#15320 + # source://prism//lib/prism/node.rb#13451 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, locals: T::Array[Symbol], - statements: Prism::StatementsNode, - location: Prism::Location + statements: Prism::StatementsNode ).returns(Prism::ProgramNode) end - def copy(locals: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), statements: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15305 + # source://prism//lib/prism/node.rb#13436 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], statements: StatementsNode, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], statements: StatementsNode } # - # source://prism//lib/prism/node.rb#15328 + # source://prism//lib/prism/node.rb#13459 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -27645,62 +28049,44 @@ class Prism::ProgramNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#15339 + # source://prism//lib/prism/node.rb#13470 sig { override.returns(String) } def inspect; end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#15333 + # source://prism//lib/prism/node.rb#13464 sig { returns(T::Array[Symbol]) } def locals; end # attr_reader statements: StatementsNode # - # source://prism//lib/prism/node.rb#15336 + # source://prism//lib/prism/node.rb#13467 sig { returns(Prism::StatementsNode) } def statements; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15357 + # source://prism//lib/prism/node.rb#13475 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#15367 + # source://prism//lib/prism/node.rb#13480 def type; end end end # Flags for range and flip-flop nodes. # -# source://prism//lib/prism/node.rb#19208 +# source://prism//lib/prism/node.rb#16774 module Prism::RangeFlags; end # ... operator # -# source://prism//lib/prism/node.rb#19210 +# source://prism//lib/prism/node.rb#16776 Prism::RangeFlags::EXCLUDE_END = T.let(T.unsafe(nil), Integer) # Represents the use of the `..` or `...` operators. @@ -27711,79 +28097,81 @@ Prism::RangeFlags::EXCLUDE_END = T.let(T.unsafe(nil), Integer) # c if a =~ /left/ ... b =~ /right/ # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#15388 +# source://prism//lib/prism/node.rb#13501 class Prism::RangeNode < ::Prism::Node - # def initialize: (Integer flags, Prism::node? left, Prism::node? right, Location operator_loc, Location location) -> void + # Initialize a new RangeNode node. # # @return [RangeNode] a new instance of RangeNode # - # source://prism//lib/prism/node.rb#15390 + # source://prism//lib/prism/node.rb#13503 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, left: T.nilable(Prism::Node), right: T.nilable(Prism::Node), - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).void end - def initialize(source, flags, left, right, operator_loc, location); end + def initialize(source, node_id, location, flags, left, right, operator_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#15510 + # source://prism//lib/prism/node.rb#13602 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15400 + # source://prism//lib/prism/node.rb#13514 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15405 + # source://prism//lib/prism/node.rb#13519 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15418 + # source://prism//lib/prism/node.rb#13532 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15410 + # source://prism//lib/prism/node.rb#13524 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node?, ?right: Prism::node?, ?operator_loc: Location) -> RangeNode # - # source://prism//lib/prism/node.rb#15423 + # source://prism//lib/prism/node.rb#13537 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, left: T.nilable(Prism::Node), right: T.nilable(Prism::Node), - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: 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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15405 + # source://prism//lib/prism/node.rb#13519 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, left: Prism::node?, right: Prism::node?, operator_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node?, right: Prism::node?, operator_loc: Location } # - # source://prism//lib/prism/node.rb#15431 + # source://prism//lib/prism/node.rb#13545 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -27791,7 +28179,7 @@ class Prism::RangeNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15466 + # source://prism//lib/prism/node.rb#13550 sig { returns(T::Boolean) } def exclude_end?; end @@ -27800,7 +28188,7 @@ class Prism::RangeNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#15476 + # source://prism//lib/prism/node.rb#13586 sig { override.returns(String) } def inspect; end @@ -27812,19 +28200,19 @@ class Prism::RangeNode < ::Prism::Node # hello...goodbye # ^^^^^ # - # source://prism//lib/prism/node.rb#15446 + # source://prism//lib/prism/node.rb#13561 sig { returns(T.nilable(Prism::Node)) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#15471 + # source://prism//lib/prism/node.rb#13581 sig { returns(String) } def operator; end # The location of the `..` or `...` operator. # - # source://prism//lib/prism/node.rb#15459 + # source://prism//lib/prism/node.rb#13574 sig { returns(Prism::Location) } def operator_loc; end @@ -27837,46 +28225,20 @@ 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#15456 + # source://prism//lib/prism/node.rb#13571 sig { returns(T.nilable(Prism::Node)) } def right; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#15494 + # source://prism//lib/prism/node.rb#13591 sig { override.returns(Symbol) } def type; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#15436 - 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15504 + # source://prism//lib/prism/node.rb#13596 def type; end end end @@ -27886,33 +28248,34 @@ end # 1.0r # ^^^^ # -# source://prism//lib/prism/node.rb#15523 +# source://prism//lib/prism/node.rb#13615 class Prism::RationalNode < ::Prism::Node - # def initialize: (Integer flags, Integer numerator, Integer denominator, Location location) -> void + # Initialize a new RationalNode node. # # @return [RationalNode] a new instance of RationalNode # - # source://prism//lib/prism/node.rb#15525 + # source://prism//lib/prism/node.rb#13617 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, numerator: Integer, - denominator: Integer, - location: Prism::Location + denominator: Integer ).void end - def initialize(source, flags, numerator, denominator, location); end + def initialize(source, node_id, location, flags, numerator, denominator); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#15635 + # source://prism//lib/prism/node.rb#13706 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15534 + # source://prism//lib/prism/node.rb#13627 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -27920,59 +28283,60 @@ class Prism::RationalNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15581 + # source://prism//lib/prism/node.rb#13660 sig { returns(T::Boolean) } def binary?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15539 + # source://prism//lib/prism/node.rb#13632 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15549 + # source://prism//lib/prism/node.rb#13642 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15544 + # source://prism//lib/prism/node.rb#13637 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?flags: Integer, ?numerator: Integer, ?denominator: Integer, ?location: Location) -> RationalNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?numerator: Integer, ?denominator: Integer) -> RationalNode # - # source://prism//lib/prism/node.rb#15554 + # source://prism//lib/prism/node.rb#13647 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, numerator: Integer, - denominator: Integer, - location: Prism::Location + denominator: Integer ).returns(Prism::RationalNode) end - def copy(flags: T.unsafe(nil), numerator: T.unsafe(nil), denominator: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), numerator: T.unsafe(nil), denominator: T.unsafe(nil)); end # def decimal?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15586 + # source://prism//lib/prism/node.rb#13665 sig { returns(T::Boolean) } def decimal?; end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15539 + # source://prism//lib/prism/node.rb#13632 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, numerator: Integer, denominator: Integer, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, numerator: Integer, denominator: Integer } # - # source://prism//lib/prism/node.rb#15562 + # source://prism//lib/prism/node.rb#13655 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -27980,7 +28344,7 @@ class Prism::RationalNode < ::Prism::Node # # 1.5r # denominator 2 # - # source://prism//lib/prism/node.rb#15578 + # source://prism//lib/prism/node.rb#13687 sig { returns(Integer) } def denominator; end @@ -27991,13 +28355,13 @@ class Prism::RationalNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15596 + # source://prism//lib/prism/node.rb#13675 sig { returns(T::Boolean) } def hexadecimal?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#15601 + # source://prism//lib/prism/node.rb#13690 sig { override.returns(String) } def inspect; end @@ -28005,66 +28369,40 @@ class Prism::RationalNode < ::Prism::Node # # 1.5r # numerator 3 # - # source://prism//lib/prism/node.rb#15573 + # source://prism//lib/prism/node.rb#13682 sig { returns(Integer) } def numerator; end # Returns the value of the node as an IntegerNode or a FloatNode. This # method is deprecated in favor of #value or #numerator/#denominator. # - # source://prism//lib/prism/node_ext.rb#114 + # source://prism//lib/prism/node_ext.rb#120 def numeric; end # def octal?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15591 + # source://prism//lib/prism/node.rb#13670 sig { returns(T::Boolean) } def octal?; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#15619 + # source://prism//lib/prism/node.rb#13695 sig { override.returns(Symbol) } def type; end # Returns the value of the node as a Ruby Rational. # - # source://prism//lib/prism/node_ext.rb#108 + # source://prism//lib/prism/node_ext.rb#114 sig { returns(Rational) } def value; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#15567 - sig { returns(Integer) } - def flags; end - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15629 + # source://prism//lib/prism/node.rb#13700 def type; end end end @@ -28074,62 +28412,62 @@ end # redo # ^^^^ # -# source://prism//lib/prism/node.rb#15647 +# source://prism//lib/prism/node.rb#13718 class Prism::RedoNode < ::Prism::Node - # def initialize: (Location location) -> void + # Initialize a new RedoNode node. # # @return [RedoNode] a new instance of RedoNode # - # source://prism//lib/prism/node.rb#15649 - sig { params(source: Prism::Source, location: Prism::Location).void } - def initialize(source, location); end + # source://prism//lib/prism/node.rb#13720 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#15722 + # source://prism//lib/prism/node.rb#13777 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15655 + # source://prism//lib/prism/node.rb#13728 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15660 + # source://prism//lib/prism/node.rb#13733 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15670 + # source://prism//lib/prism/node.rb#13743 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15665 + # source://prism//lib/prism/node.rb#13738 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?location: Location) -> RedoNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> RedoNode # - # source://prism//lib/prism/node.rb#15675 - sig { params(location: Prism::Location).returns(Prism::RedoNode) } - def copy(location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#13748 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::RedoNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15660 + # source://prism//lib/prism/node.rb#13733 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#15683 + # source://prism//lib/prism/node.rb#13756 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -28138,38 +28476,20 @@ class Prism::RedoNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#15688 + # source://prism//lib/prism/node.rb#13761 sig { override.returns(String) } def inspect; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#15706 + # source://prism//lib/prism/node.rb#13766 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15716 + # source://prism//lib/prism/node.rb#13771 def type; end end end @@ -28306,62 +28626,62 @@ class Prism::Reflection::StringField < ::Prism::Reflection::Field; end # Flags for regular expression and match last line nodes. # -# source://prism//lib/prism/node.rb#19214 +# source://prism//lib/prism/node.rb#16780 module Prism::RegularExpressionFlags; end # n - forces the ASCII-8BIT encoding # -# source://prism//lib/prism/node.rb#19231 +# source://prism//lib/prism/node.rb#16797 Prism::RegularExpressionFlags::ASCII_8BIT = T.let(T.unsafe(nil), Integer) # e - forces the EUC-JP encoding # -# source://prism//lib/prism/node.rb#19228 +# source://prism//lib/prism/node.rb#16794 Prism::RegularExpressionFlags::EUC_JP = T.let(T.unsafe(nil), Integer) # x - ignores whitespace and allows comments in regular expressions # -# source://prism//lib/prism/node.rb#19219 +# source://prism//lib/prism/node.rb#16785 Prism::RegularExpressionFlags::EXTENDED = T.let(T.unsafe(nil), Integer) # internal bytes forced the encoding to binary # -# source://prism//lib/prism/node.rb#19243 +# source://prism//lib/prism/node.rb#16809 Prism::RegularExpressionFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer) # internal bytes forced the encoding to US-ASCII # -# source://prism//lib/prism/node.rb#19246 +# source://prism//lib/prism/node.rb#16812 Prism::RegularExpressionFlags::FORCED_US_ASCII_ENCODING = T.let(T.unsafe(nil), Integer) # internal bytes forced the encoding to UTF-8 # -# source://prism//lib/prism/node.rb#19240 +# source://prism//lib/prism/node.rb#16806 Prism::RegularExpressionFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # i - ignores the case of characters when matching # -# source://prism//lib/prism/node.rb#19216 +# source://prism//lib/prism/node.rb#16782 Prism::RegularExpressionFlags::IGNORE_CASE = T.let(T.unsafe(nil), Integer) # m - allows $ to match the end of lines within strings # -# source://prism//lib/prism/node.rb#19222 +# source://prism//lib/prism/node.rb#16788 Prism::RegularExpressionFlags::MULTI_LINE = T.let(T.unsafe(nil), Integer) # o - only interpolates values into the regular expression once # -# source://prism//lib/prism/node.rb#19225 +# source://prism//lib/prism/node.rb#16791 Prism::RegularExpressionFlags::ONCE = T.let(T.unsafe(nil), Integer) # u - forces the UTF-8 encoding # -# source://prism//lib/prism/node.rb#19237 +# source://prism//lib/prism/node.rb#16803 Prism::RegularExpressionFlags::UTF_8 = T.let(T.unsafe(nil), Integer) # s - forces the Windows-31J encoding # -# source://prism//lib/prism/node.rb#19234 +# source://prism//lib/prism/node.rb#16800 Prism::RegularExpressionFlags::WINDOWS_31J = T.let(T.unsafe(nil), Integer) # Represents a regular expression literal with no interpolation. @@ -28369,37 +28689,38 @@ Prism::RegularExpressionFlags::WINDOWS_31J = T.let(T.unsafe(nil), Integer) # /foo/i # ^^^^^^ # -# source://prism//lib/prism/node.rb#15731 +# source://prism//lib/prism/node.rb#13786 class Prism::RegularExpressionNode < ::Prism::Node include ::Prism::RegularExpressionOptions - # def initialize: (Integer flags, Location opening_loc, Location content_loc, Location closing_loc, String unescaped, Location location) -> void + # Initialize a new RegularExpressionNode node. # # @return [RegularExpressionNode] a new instance of RegularExpressionNode # - # source://prism//lib/prism/node.rb#15733 + # source://prism//lib/prism/node.rb#13788 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, opening_loc: Prism::Location, content_loc: Prism::Location, closing_loc: Prism::Location, - unescaped: String, - location: Prism::Location + unescaped: String ).void end - def initialize(source, flags, opening_loc, content_loc, closing_loc, unescaped, location); end + def initialize(source, node_id, location, flags, opening_loc, content_loc, closing_loc, unescaped); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#15909 + # source://prism//lib/prism/node.rb#13943 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15744 + # source://prism//lib/prism/node.rb#13800 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -28407,77 +28728,78 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15830 + # source://prism//lib/prism/node.rb#13858 sig { returns(T::Boolean) } def ascii_8bit?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15749 + # source://prism//lib/prism/node.rb#13805 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#15870 + # source://prism//lib/prism/node.rb#13922 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#15795 + # source://prism//lib/prism/node.rb#13902 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15759 + # source://prism//lib/prism/node.rb#13815 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15754 + # source://prism//lib/prism/node.rb#13810 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def content: () -> String # - # source://prism//lib/prism/node.rb#15865 + # source://prism//lib/prism/node.rb#13917 sig { returns(String) } def content; end # attr_reader content_loc: Location # - # source://prism//lib/prism/node.rb#15788 + # source://prism//lib/prism/node.rb#13895 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String) -> RegularExpressionNode # - # source://prism//lib/prism/node.rb#15764 + # source://prism//lib/prism/node.rb#13820 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, opening_loc: Prism::Location, content_loc: Prism::Location, closing_loc: Prism::Location, - unescaped: String, - location: Prism::Location + unescaped: String ).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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15749 + # source://prism//lib/prism/node.rb#13805 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String } # - # source://prism//lib/prism/node.rb#15772 + # source://prism//lib/prism/node.rb#13828 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -28485,7 +28807,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15825 + # source://prism//lib/prism/node.rb#13853 sig { returns(T::Boolean) } def euc_jp?; end @@ -28493,7 +28815,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15810 + # source://prism//lib/prism/node.rb#13838 sig { returns(T::Boolean) } def extended?; end @@ -28504,7 +28826,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15850 + # source://prism//lib/prism/node.rb#13878 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -28512,7 +28834,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15855 + # source://prism//lib/prism/node.rb#13883 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end @@ -28520,7 +28842,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15845 + # source://prism//lib/prism/node.rb#13873 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -28528,13 +28850,13 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15805 + # source://prism//lib/prism/node.rb#13833 sig { returns(T::Boolean) } def ignore_case?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#15875 + # source://prism//lib/prism/node.rb#13927 sig { override.returns(String) } def inspect; end @@ -28542,7 +28864,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15815 + # source://prism//lib/prism/node.rb#13843 sig { returns(T::Boolean) } def multi_line?; end @@ -28550,47 +28872,34 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15820 + # source://prism//lib/prism/node.rb#13848 sig { returns(T::Boolean) } def once?; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#15860 + # source://prism//lib/prism/node.rb#13912 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#15781 + # source://prism//lib/prism/node.rb#13888 sig { returns(Prism::Location) } def opening_loc; end sig { returns(Integer) } def options; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#15893 + # source://prism//lib/prism/node.rb#13932 sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#15802 + # source://prism//lib/prism/node.rb#13909 sig { returns(String) } def unescaped; end @@ -28598,7 +28907,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15840 + # source://prism//lib/prism/node.rb#13868 sig { returns(T::Boolean) } def utf_8?; end @@ -28606,27 +28915,14 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15835 + # source://prism//lib/prism/node.rb#13863 sig { returns(T::Boolean) } def windows_31j?; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#15777 - 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#15903 + # source://prism//lib/prism/node.rb#13937 def type; end end end @@ -28646,77 +28942,79 @@ end # ^^ # end # -# source://prism//lib/prism/node.rb#15924 +# source://prism//lib/prism/node.rb#13958 class Prism::RequiredKeywordParameterNode < ::Prism::Node - # def initialize: (Integer flags, Symbol name, Location name_loc, Location location) -> void + # Initialize a new RequiredKeywordParameterNode node. # # @return [RequiredKeywordParameterNode] a new instance of RequiredKeywordParameterNode # - # source://prism//lib/prism/node.rb#15926 + # source://prism//lib/prism/node.rb#13960 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, name: Symbol, - name_loc: Prism::Location, - location: Prism::Location + name_loc: Prism::Location ).void end - def initialize(source, flags, name, name_loc, location); end + def initialize(source, node_id, location, flags, name, name_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#16021 + # source://prism//lib/prism/node.rb#14034 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15935 + # source://prism//lib/prism/node.rb#13970 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15940 + # source://prism//lib/prism/node.rb#13975 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15950 + # source://prism//lib/prism/node.rb#13985 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#15945 + # source://prism//lib/prism/node.rb#13980 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?flags: Integer, ?name: Symbol, ?name_loc: Location, ?location: Location) -> RequiredKeywordParameterNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location) -> RequiredKeywordParameterNode # - # source://prism//lib/prism/node.rb#15955 + # source://prism//lib/prism/node.rb#13990 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, name: Symbol, - name_loc: Prism::Location, - location: Prism::Location + name_loc: 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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15940 + # source://prism//lib/prism/node.rb#13975 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, name_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location } # - # source://prism//lib/prism/node.rb#15963 + # source://prism//lib/prism/node.rb#13998 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -28725,19 +29023,19 @@ class Prism::RequiredKeywordParameterNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#15987 + # source://prism//lib/prism/node.rb#14018 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#15972 + # source://prism//lib/prism/node.rb#14008 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#15975 + # source://prism//lib/prism/node.rb#14011 sig { returns(Prism::Location) } def name_loc; end @@ -28745,46 +29043,20 @@ class Prism::RequiredKeywordParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15982 + # source://prism//lib/prism/node.rb#14003 sig { returns(T::Boolean) } def repeated_parameter?; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#16005 + # source://prism//lib/prism/node.rb#14023 sig { override.returns(Symbol) } def type; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#15968 - 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#16015 + # source://prism//lib/prism/node.rb#14028 def type; end end end @@ -28795,62 +29067,69 @@ end # ^ # end # -# source://prism//lib/prism/node.rb#16034 +# source://prism//lib/prism/node.rb#14047 class Prism::RequiredParameterNode < ::Prism::Node - # def initialize: (Integer flags, Symbol name, Location location) -> void + # Initialize a new RequiredParameterNode node. # # @return [RequiredParameterNode] a new instance of RequiredParameterNode # - # source://prism//lib/prism/node.rb#16036 - sig { params(source: Prism::Source, flags: Integer, name: Symbol, location: Prism::Location).void } - def initialize(source, flags, name, location); end + # source://prism//lib/prism/node.rb#14049 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } + def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#16123 + # source://prism//lib/prism/node.rb#14115 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16044 + # source://prism//lib/prism/node.rb#14058 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16049 + # source://prism//lib/prism/node.rb#14063 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16059 + # source://prism//lib/prism/node.rb#14073 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16054 + # source://prism//lib/prism/node.rb#14068 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?flags: Integer, ?name: Symbol, ?location: Location) -> RequiredParameterNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> RequiredParameterNode # - # source://prism//lib/prism/node.rb#16064 - sig { params(flags: Integer, name: Symbol, location: Prism::Location).returns(Prism::RequiredParameterNode) } - def copy(flags: T.unsafe(nil), name: T.unsafe(nil), location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#14078 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::RequiredParameterNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16049 + # source://prism//lib/prism/node.rb#14063 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#16072 + # source://prism//lib/prism/node.rb#14086 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -28859,13 +29138,13 @@ class Prism::RequiredParameterNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#16089 + # source://prism//lib/prism/node.rb#14099 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#16081 + # source://prism//lib/prism/node.rb#14096 sig { returns(Symbol) } def name; end @@ -28873,46 +29152,20 @@ class Prism::RequiredParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16084 + # source://prism//lib/prism/node.rb#14091 sig { returns(T::Boolean) } def repeated_parameter?; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#16107 + # source://prism//lib/prism/node.rb#14104 sig { override.returns(Symbol) } def type; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#16077 - 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#16117 + # source://prism//lib/prism/node.rb#14109 def type; end end end @@ -28922,83 +29175,87 @@ end # foo rescue nil # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#16134 +# source://prism//lib/prism/node.rb#14126 class Prism::RescueModifierNode < ::Prism::Node - # def initialize: (Prism::node expression, Location keyword_loc, Prism::node rescue_expression, Location location) -> void + # Initialize a new RescueModifierNode node. # # @return [RescueModifierNode] a new instance of RescueModifierNode # - # source://prism//lib/prism/node.rb#16136 + # source://prism//lib/prism/node.rb#14128 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, expression: Prism::Node, keyword_loc: Prism::Location, - rescue_expression: Prism::Node, - location: Prism::Location + rescue_expression: Prism::Node ).void end - def initialize(source, expression, keyword_loc, rescue_expression, location); end + def initialize(source, node_id, location, flags, expression, keyword_loc, rescue_expression); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#16230 + # source://prism//lib/prism/node.rb#14206 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16145 + # source://prism//lib/prism/node.rb#14139 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16150 + # source://prism//lib/prism/node.rb#14144 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16160 + # source://prism//lib/prism/node.rb#14154 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16155 + # source://prism//lib/prism/node.rb#14149 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?expression: Prism::node, ?keyword_loc: Location, ?rescue_expression: Prism::node) -> RescueModifierNode # - # source://prism//lib/prism/node.rb#16165 + # source://prism//lib/prism/node.rb#14159 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, expression: Prism::Node, keyword_loc: Prism::Location, - rescue_expression: Prism::Node, - location: Prism::Location + rescue_expression: Prism::Node ).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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), expression: T.unsafe(nil), keyword_loc: T.unsafe(nil), rescue_expression: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16150 + # source://prism//lib/prism/node.rb#14144 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { expression: Prism::node, keyword_loc: Location, rescue_expression: Prism::node, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, expression: Prism::node, keyword_loc: Location, rescue_expression: Prism::node } # - # source://prism//lib/prism/node.rb#16173 + # source://prism//lib/prism/node.rb#14167 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader expression: Prism::node # - # source://prism//lib/prism/node.rb#16178 + # source://prism//lib/prism/node.rb#14172 sig { returns(Prism::Node) } def expression; end @@ -29007,59 +29264,41 @@ class Prism::RescueModifierNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#16196 + # source://prism//lib/prism/node.rb#14190 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#16191 + # source://prism//lib/prism/node.rb#14185 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#16181 + # source://prism//lib/prism/node.rb#14175 sig { returns(Prism::Location) } def keyword_loc; end # source://prism//lib/prism/parse_result/newlines.rb#115 - def newline!(lines); end + def newline_flag!(lines); end # attr_reader rescue_expression: Prism::node # - # source://prism//lib/prism/node.rb#16188 + # source://prism//lib/prism/node.rb#14182 sig { returns(Prism::Node) } def rescue_expression; 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 + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#16214 + # source://prism//lib/prism/node.rb#14195 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#16224 + # source://prism//lib/prism/node.rb#14200 def type; end end end @@ -29072,97 +29311,101 @@ end # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ # end # -# `Foo, *splat, Bar` are in the `exceptions` field. `ex` is in the `exception` field. +# `Foo, *splat, Bar` are in the `exceptions` field. `ex` is in the `reference` field. # -# source://prism//lib/prism/node.rb#16247 +# source://prism//lib/prism/node.rb#14223 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 + # Initialize a new RescueNode node. # # @return [RescueNode] a new instance of RescueNode # - # source://prism//lib/prism/node.rb#16249 + # source://prism//lib/prism/node.rb#14225 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, keyword_loc: Prism::Location, exceptions: T::Array[Prism::Node], operator_loc: T.nilable(Prism::Location), - reference: T.nilable(Prism::Node), + reference: T.nilable(T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode)), statements: T.nilable(Prism::StatementsNode), - consequent: T.nilable(Prism::RescueNode), - location: Prism::Location + subsequent: T.nilable(Prism::RescueNode) ).void end - def initialize(source, keyword_loc, exceptions, operator_loc, reference, statements, consequent, location); end + def initialize(source, node_id, location, flags, keyword_loc, exceptions, operator_loc, reference, statements, subsequent); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#16375 + # source://prism//lib/prism/node.rb#14335 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16261 + # source://prism//lib/prism/node.rb#14239 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16266 + # source://prism//lib/prism/node.rb#14244 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16281 + # source://prism//lib/prism/node.rb#14259 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16271 + # source://prism//lib/prism/node.rb#14249 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # attr_reader consequent: RescueNode? + # Returns the subsequent rescue clause of the rescue node. This method is + # deprecated in favor of #subsequent. # - # source://prism//lib/prism/node.rb#16328 - sig { returns(T.nilable(Prism::RescueNode)) } + # source://prism//lib/prism/node_ext.rb#494 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?exceptions: Array[Prism::node], ?operator_loc: Location?, ?reference: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode | nil, ?statements: StatementsNode?, ?subsequent: RescueNode?) -> RescueNode # - # source://prism//lib/prism/node.rb#16286 + # source://prism//lib/prism/node.rb#14264 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, keyword_loc: Prism::Location, exceptions: T::Array[Prism::Node], operator_loc: T.nilable(Prism::Location), - reference: T.nilable(Prism::Node), + reference: T.nilable(T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode)), statements: T.nilable(Prism::StatementsNode), - consequent: T.nilable(Prism::RescueNode), - location: Prism::Location + subsequent: T.nilable(Prism::RescueNode) ).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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), exceptions: T.unsafe(nil), operator_loc: T.unsafe(nil), reference: T.unsafe(nil), statements: T.unsafe(nil), subsequent: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16266 + # source://prism//lib/prism/node.rb#14244 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, exceptions: Array[Prism::node], operator_loc: Location?, reference: Prism::node?, statements: StatementsNode?, consequent: RescueNode?, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, exceptions: Array[Prism::node], operator_loc: Location?, reference: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode | nil, statements: StatementsNode?, subsequent: RescueNode? } # - # source://prism//lib/prism/node.rb#16294 + # source://prism//lib/prism/node.rb#14272 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader exceptions: Array[Prism::node] # - # source://prism//lib/prism/node.rb#16306 + # source://prism//lib/prism/node.rb#14284 sig { returns(T::Array[Prism::Node]) } def exceptions; end @@ -29171,74 +29414,64 @@ class Prism::RescueNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#16341 + # source://prism//lib/prism/node.rb#14319 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#16331 + # source://prism//lib/prism/node.rb#14309 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#16299 + # source://prism//lib/prism/node.rb#14277 sig { returns(Prism::Location) } def keyword_loc; end # def operator: () -> String? # - # source://prism//lib/prism/node.rb#16336 + # source://prism//lib/prism/node.rb#14314 sig { returns(T.nilable(String)) } def operator; end # attr_reader operator_loc: Location? # - # source://prism//lib/prism/node.rb#16309 + # source://prism//lib/prism/node.rb#14287 sig { returns(T.nilable(Prism::Location)) } def operator_loc; end - # attr_reader reference: Prism::node? + # attr_reader reference: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode | nil # - # source://prism//lib/prism/node.rb#16322 - sig { returns(T.nilable(Prism::Node)) } + # source://prism//lib/prism/node.rb#14300 + sig do + returns(T.nilable(T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode))) + end def reference; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#16325 + # source://prism//lib/prism/node.rb#14303 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # attr_reader subsequent: RescueNode? # - # def type: () -> Symbol + # source://prism//lib/prism/node.rb#14306 + sig { returns(T.nilable(Prism::RescueNode)) } + def subsequent; end + + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#16359 + # source://prism//lib/prism/node.rb#14324 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#16369 + # source://prism//lib/prism/node.rb#14329 def type; end end end @@ -29249,79 +29482,81 @@ end # ^^ # end # -# source://prism//lib/prism/node.rb#16392 +# source://prism//lib/prism/node.rb#14352 class Prism::RestParameterNode < ::Prism::Node - # def initialize: (Integer flags, Symbol? name, Location? name_loc, Location operator_loc, Location location) -> void + # Initialize a new RestParameterNode node. # # @return [RestParameterNode] a new instance of RestParameterNode # - # source://prism//lib/prism/node.rb#16394 + # source://prism//lib/prism/node.rb#14354 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, name: T.nilable(Symbol), name_loc: T.nilable(Prism::Location), - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).void end - def initialize(source, flags, name, name_loc, operator_loc, location); end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#16508 + # source://prism//lib/prism/node.rb#14447 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16404 + # source://prism//lib/prism/node.rb#14365 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16409 + # source://prism//lib/prism/node.rb#14370 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16419 + # source://prism//lib/prism/node.rb#14380 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16414 + # source://prism//lib/prism/node.rb#14375 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location) -> RestParameterNode # - # source://prism//lib/prism/node.rb#16424 + # source://prism//lib/prism/node.rb#14385 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, name: T.nilable(Symbol), name_loc: T.nilable(Prism::Location), - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: 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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16409 + # source://prism//lib/prism/node.rb#14370 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol?, name_loc: Location?, operator_loc: Location } # - # source://prism//lib/prism/node.rb#16432 + # source://prism//lib/prism/node.rb#14393 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -29330,31 +29565,31 @@ class Prism::RestParameterNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#16474 + # source://prism//lib/prism/node.rb#14431 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol? # - # source://prism//lib/prism/node.rb#16441 + # source://prism//lib/prism/node.rb#14403 sig { returns(T.nilable(Symbol)) } def name; end # attr_reader name_loc: Location? # - # source://prism//lib/prism/node.rb#16444 + # source://prism//lib/prism/node.rb#14406 sig { returns(T.nilable(Prism::Location)) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#16469 + # source://prism//lib/prism/node.rb#14426 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#16457 + # source://prism//lib/prism/node.rb#14419 sig { returns(Prism::Location) } def operator_loc; end @@ -29362,46 +29597,20 @@ class Prism::RestParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16464 + # source://prism//lib/prism/node.rb#14398 sig { returns(T::Boolean) } def repeated_parameter?; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#16492 + # source://prism//lib/prism/node.rb#14436 sig { override.returns(Symbol) } def type; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#16437 - 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#16502 + # source://prism//lib/prism/node.rb#14441 def type; end end end @@ -29410,13 +29619,13 @@ end # the requested structure, any comments that were encounters, and any errors # that were encountered. # -# source://prism//lib/prism/parse_result.rb#521 +# source://prism//lib/prism/parse_result.rb#662 class Prism::Result # Create a new result object with the given values. # # @return [Result] a new instance of Result # - # source://prism//lib/prism/parse_result.rb#543 + # source://prism//lib/prism/parse_result.rb#684 sig do params( comments: T::Array[Prism::Comment], @@ -29429,9 +29638,19 @@ class Prism::Result end def initialize(comments, magic_comments, data_loc, errors, warnings, source); end + # Create a code units cache for the given encoding. + # + # source://prism//lib/prism/parse_result.rb#716 + sig do + params( + encoding: Encoding + ).returns(T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer))) + end + def code_units_cache(encoding); end + # The list of comments that were encountered during parsing. # - # source://prism//lib/prism/parse_result.rb#523 + # source://prism//lib/prism/parse_result.rb#664 sig { returns(T::Array[Prism::Comment]) } def comments; end @@ -29439,25 +29658,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#531 + # source://prism//lib/prism/parse_result.rb#672 sig { returns(T.nilable(Prism::Location)) } def data_loc; end # Implement the hash pattern matching interface for Result. # - # source://prism//lib/prism/parse_result.rb#553 + # source://prism//lib/prism/parse_result.rb#694 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # Returns the encoding of the source code that was parsed. # - # source://prism//lib/prism/parse_result.rb#558 + # source://prism//lib/prism/parse_result.rb#699 sig { returns(Encoding) } def encoding; end # The list of errors that were generated during parsing. # - # source://prism//lib/prism/parse_result.rb#534 + # source://prism//lib/prism/parse_result.rb#675 sig { returns(T::Array[Prism::ParseError]) } def errors; end @@ -29466,19 +29685,19 @@ class Prism::Result # # @return [Boolean] # - # source://prism//lib/prism/parse_result.rb#570 + # source://prism//lib/prism/parse_result.rb#711 sig { returns(T::Boolean) } def failure?; end # The list of magic comments that were encountered during parsing. # - # source://prism//lib/prism/parse_result.rb#526 + # source://prism//lib/prism/parse_result.rb#667 sig { returns(T::Array[Prism::MagicComment]) } def magic_comments; end # A Source instance that represents the source code that was parsed. # - # source://prism//lib/prism/parse_result.rb#540 + # source://prism//lib/prism/parse_result.rb#681 sig { returns(Prism::Source) } def source; end @@ -29487,13 +29706,13 @@ class Prism::Result # # @return [Boolean] # - # source://prism//lib/prism/parse_result.rb#564 + # source://prism//lib/prism/parse_result.rb#705 sig { returns(T::Boolean) } def success?; end # The list of warnings that were generated during parsing. # - # source://prism//lib/prism/parse_result.rb#537 + # source://prism//lib/prism/parse_result.rb#678 sig { returns(T::Array[Prism::ParseWarning]) } def warnings; end end @@ -29503,62 +29722,62 @@ end # retry # ^^^^^ # -# source://prism//lib/prism/node.rb#16521 +# source://prism//lib/prism/node.rb#14460 class Prism::RetryNode < ::Prism::Node - # def initialize: (Location location) -> void + # Initialize a new RetryNode node. # # @return [RetryNode] a new instance of RetryNode # - # source://prism//lib/prism/node.rb#16523 - sig { params(source: Prism::Source, location: Prism::Location).void } - def initialize(source, location); end + # source://prism//lib/prism/node.rb#14462 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#16596 + # source://prism//lib/prism/node.rb#14519 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16529 + # source://prism//lib/prism/node.rb#14470 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16534 + # source://prism//lib/prism/node.rb#14475 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16544 + # source://prism//lib/prism/node.rb#14485 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16539 + # source://prism//lib/prism/node.rb#14480 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?location: Location) -> RetryNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> RetryNode # - # source://prism//lib/prism/node.rb#16549 - sig { params(location: Prism::Location).returns(Prism::RetryNode) } - def copy(location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#14490 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::RetryNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16534 + # source://prism//lib/prism/node.rb#14475 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#16557 + # source://prism//lib/prism/node.rb#14498 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -29567,38 +29786,20 @@ class Prism::RetryNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#16562 + # source://prism//lib/prism/node.rb#14503 sig { override.returns(String) } def inspect; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#16580 + # source://prism//lib/prism/node.rb#14508 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#16590 + # source://prism//lib/prism/node.rb#14513 def type; end end end @@ -29608,83 +29809,85 @@ end # return 1 # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#16605 +# source://prism//lib/prism/node.rb#14528 class Prism::ReturnNode < ::Prism::Node - # def initialize: (Integer flags, Location keyword_loc, ArgumentsNode? arguments, Location location) -> void + # Initialize a new ReturnNode node. # # @return [ReturnNode] a new instance of ReturnNode # - # source://prism//lib/prism/node.rb#16607 + # source://prism//lib/prism/node.rb#14530 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, keyword_loc: Prism::Location, - arguments: T.nilable(Prism::ArgumentsNode), - location: Prism::Location + arguments: T.nilable(Prism::ArgumentsNode) ).void end - def initialize(source, flags, keyword_loc, arguments, location); end + def initialize(source, node_id, location, flags, keyword_loc, arguments); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#16709 + # source://prism//lib/prism/node.rb#14606 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16616 + # source://prism//lib/prism/node.rb#14540 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#16662 + # source://prism//lib/prism/node.rb#14582 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16621 + # source://prism//lib/prism/node.rb#14545 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16633 + # source://prism//lib/prism/node.rb#14557 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16626 + # source://prism//lib/prism/node.rb#14550 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?flags: Integer, ?keyword_loc: Location, ?arguments: ArgumentsNode?, ?location: Location) -> ReturnNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?arguments: ArgumentsNode?) -> ReturnNode # - # source://prism//lib/prism/node.rb#16638 + # source://prism//lib/prism/node.rb#14562 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, keyword_loc: Prism::Location, - arguments: T.nilable(Prism::ArgumentsNode), - location: Prism::Location + arguments: T.nilable(Prism::ArgumentsNode) ).returns(Prism::ReturnNode) end - def copy(flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), arguments: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), arguments: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16621 + # source://prism//lib/prism/node.rb#14545 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, keyword_loc: Location, arguments: ArgumentsNode?, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, arguments: ArgumentsNode? } # - # source://prism//lib/prism/node.rb#16646 + # source://prism//lib/prism/node.rb#14570 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -29693,141 +29896,97 @@ class Prism::ReturnNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#16675 + # source://prism//lib/prism/node.rb#14590 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#16670 + # source://prism//lib/prism/node.rb#14585 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#16655 + # source://prism//lib/prism/node.rb#14575 sig { returns(Prism::Location) } def keyword_loc; end - # def redundant?: () -> bool + # Return a symbol representation of this node type. See `Node#type`. # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#16665 - sig { returns(T::Boolean) } - def redundant?; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # 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#16693 + # source://prism//lib/prism/node.rb#14595 sig { override.returns(Symbol) } def type; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#16651 - sig { returns(Integer) } - def flags; end - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#16703 + # source://prism//lib/prism/node.rb#14600 def type; end end end -# Flags for return nodes. -# -# source://prism//lib/prism/node.rb#19250 -module Prism::ReturnNodeFlags; end - -# a return statement that is redundant because it is the last statement in a method -# -# source://prism//lib/prism/node.rb#19252 -Prism::ReturnNodeFlags::REDUNDANT = T.let(T.unsafe(nil), Integer) - # Represents the `self` keyword. # # self # ^^^^ # -# source://prism//lib/prism/node.rb#16721 +# source://prism//lib/prism/node.rb#14617 class Prism::SelfNode < ::Prism::Node - # def initialize: (Location location) -> void + # Initialize a new SelfNode node. # # @return [SelfNode] a new instance of SelfNode # - # source://prism//lib/prism/node.rb#16723 - sig { params(source: Prism::Source, location: Prism::Location).void } - def initialize(source, location); end + # source://prism//lib/prism/node.rb#14619 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#16796 + # source://prism//lib/prism/node.rb#14676 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16729 + # source://prism//lib/prism/node.rb#14627 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16734 + # source://prism//lib/prism/node.rb#14632 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16744 + # source://prism//lib/prism/node.rb#14642 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16739 + # source://prism//lib/prism/node.rb#14637 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?location: Location) -> SelfNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> SelfNode # - # source://prism//lib/prism/node.rb#16749 - sig { params(location: Prism::Location).returns(Prism::SelfNode) } - def copy(location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#14647 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::SelfNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16734 + # source://prism//lib/prism/node.rb#14632 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#16757 + # source://prism//lib/prism/node.rb#14655 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -29836,38 +29995,20 @@ class Prism::SelfNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#16762 + # source://prism//lib/prism/node.rb#14660 sig { override.returns(String) } def inspect; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#16780 + # source://prism//lib/prism/node.rb#14665 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#16790 + # source://prism//lib/prism/node.rb#14670 def type; end end end @@ -29885,154 +30026,154 @@ module Prism::Serialize # Deserialize the tokens represented by the given string into a parse # result. # - # source://prism//lib/prism/serialize.rb#40 + # source://prism//lib/prism/serialize.rb#51 def load_tokens(source, serialized); end end end -# source://prism//lib/prism/serialize.rb#44 +# source://prism//lib/prism/serialize.rb#55 class Prism::Serialize::Loader # @return [Loader] a new instance of Loader # - # source://prism//lib/prism/serialize.rb#80 + # source://prism//lib/prism/serialize.rb#91 def initialize(source, serialized); end # Returns the value of attribute constant_pool. # - # source://prism//lib/prism/serialize.rb#77 + # source://prism//lib/prism/serialize.rb#88 def constant_pool; end # Returns the value of attribute constant_pool_offset. # - # source://prism//lib/prism/serialize.rb#77 + # source://prism//lib/prism/serialize.rb#88 def constant_pool_offset; end # Returns the value of attribute encoding. # - # source://prism//lib/prism/serialize.rb#76 + # source://prism//lib/prism/serialize.rb#87 def encoding; end # Returns the value of attribute input. # - # source://prism//lib/prism/serialize.rb#76 + # source://prism//lib/prism/serialize.rb#87 def input; end # Returns the value of attribute io. # - # source://prism//lib/prism/serialize.rb#76 + # source://prism//lib/prism/serialize.rb#87 def io; end - # source://prism//lib/prism/serialize.rb#118 + # source://prism//lib/prism/serialize.rb#129 def load_comments; end - # source://prism//lib/prism/serialize.rb#104 + # source://prism//lib/prism/serialize.rb#115 def load_encoding; end - # source://prism//lib/prism/serialize.rb#95 + # source://prism//lib/prism/serialize.rb#106 def load_header; end - # source://prism//lib/prism/serialize.rb#114 + # source://prism//lib/prism/serialize.rb#125 def load_line_offsets; end - # source://prism//lib/prism/serialize.rb#438 + # source://prism//lib/prism/serialize.rb#462 def load_metadata; end - # source://prism//lib/prism/serialize.rb#472 + # source://prism//lib/prism/serialize.rb#496 def load_nodes; end - # source://prism//lib/prism/serialize.rb#486 + # source://prism//lib/prism/serialize.rb#510 def load_result; end - # source://prism//lib/prism/serialize.rb#110 + # source://prism//lib/prism/serialize.rb#121 def load_start_line; end - # source://prism//lib/prism/serialize.rb#447 + # source://prism//lib/prism/serialize.rb#471 def load_tokens; end - # source://prism//lib/prism/serialize.rb#460 + # source://prism//lib/prism/serialize.rb#484 def load_tokens_result; end # Returns the value of attribute serialized. # - # source://prism//lib/prism/serialize.rb#76 + # source://prism//lib/prism/serialize.rb#87 def serialized; end # Returns the value of attribute source. # - # source://prism//lib/prism/serialize.rb#77 + # source://prism//lib/prism/serialize.rb#88 def source; end # Returns the value of attribute start_line. # - # source://prism//lib/prism/serialize.rb#78 + # source://prism//lib/prism/serialize.rb#89 def start_line; end private - # source://prism//lib/prism/serialize.rb#572 + # source://prism//lib/prism/serialize.rb#596 def load_constant(index); end - # source://prism//lib/prism/serialize.rb#525 + # source://prism//lib/prism/serialize.rb#549 def load_double; end - # source://prism//lib/prism/serialize.rb#540 + # source://prism//lib/prism/serialize.rb#564 def load_embedded_string; end - # source://prism//lib/prism/serialize.rb#602 + # source://prism//lib/prism/serialize.rb#626 def load_error_level; end - # source://prism//lib/prism/serialize.rb#514 + # source://prism//lib/prism/serialize.rb#538 def load_integer; end - # source://prism//lib/prism/serialize.rb#556 + # source://prism//lib/prism/serialize.rb#580 def load_location; end - # source://prism//lib/prism/serialize.rb#560 + # source://prism//lib/prism/serialize.rb#584 def load_location_object; end - # source://prism//lib/prism/serialize.rb#631 + # source://prism//lib/prism/serialize.rb#655 def load_node; end - # source://prism//lib/prism/serialize.rb#597 + # source://prism//lib/prism/serialize.rb#621 def load_optional_constant; end - # source://prism//lib/prism/serialize.rb#564 + # source://prism//lib/prism/serialize.rb#588 def load_optional_location; end - # source://prism//lib/prism/serialize.rb#568 + # source://prism//lib/prism/serialize.rb#592 def load_optional_location_object; end - # source://prism//lib/prism/serialize.rb#533 + # source://prism//lib/prism/serialize.rb#557 def load_optional_node; end - # source://prism//lib/prism/serialize.rb#593 + # source://prism//lib/prism/serialize.rb#617 def load_required_constant; end - # source://prism//lib/prism/serialize.rb#544 + # source://prism//lib/prism/serialize.rb#568 def load_string; end - # source://prism//lib/prism/serialize.rb#529 + # source://prism//lib/prism/serialize.rb#553 def load_uint32; end - # source://prism//lib/prism/serialize.rb#509 + # source://prism//lib/prism/serialize.rb#533 def load_varsint; end # variable-length integer using https://en.wikipedia.org/wiki/LEB128 # This is also what protobuf uses: https://protobuf.dev/programming-guides/encoding/#varints # - # source://prism//lib/prism/serialize.rb#495 + # source://prism//lib/prism/serialize.rb#519 def load_varuint; end - # source://prism//lib/prism/serialize.rb#617 + # source://prism//lib/prism/serialize.rb#641 def load_warning_level; end end -# source://prism//lib/prism/serialize.rb#127 +# source://prism//lib/prism/serialize.rb#138 Prism::Serialize::Loader::DIAGNOSTIC_TYPES = T.let(T.unsafe(nil), Array) # StringIO is synchronized and that adds a high overhead on TruffleRuby. # -# source://prism//lib/prism/serialize.rb#72 +# source://prism//lib/prism/serialize.rb#83 Prism::Serialize::Loader::FastStringIO = StringIO # The major version of prism that we are expecting to find in the serialized @@ -30055,7 +30196,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#1863 +# source://prism//lib/prism/serialize.rb#1737 Prism::Serialize::TOKEN_TYPES = T.let(T.unsafe(nil), Array) # This node wraps a constant write to indicate that when the value is written, it should have its shareability state modified. @@ -30063,75 +30204,77 @@ Prism::Serialize::TOKEN_TYPES = T.let(T.unsafe(nil), Array) # C = { a: 1 } # ^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#16806 +# source://prism//lib/prism/node.rb#14686 class Prism::ShareableConstantNode < ::Prism::Node - # def initialize: (Integer flags, ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode write, Location location) -> void + # Initialize a new ShareableConstantNode node. # # @return [ShareableConstantNode] a new instance of ShareableConstantNode # - # source://prism//lib/prism/node.rb#16808 + # source://prism//lib/prism/node.rb#14688 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, - write: T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode), - location: Prism::Location + write: T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode) ).void end - def initialize(source, flags, write, location); end + def initialize(source, node_id, location, flags, write); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#16905 + # source://prism//lib/prism/node.rb#14764 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16816 + # source://prism//lib/prism/node.rb#14697 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16821 + # source://prism//lib/prism/node.rb#14702 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16831 + # source://prism//lib/prism/node.rb#14712 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16826 + # source://prism//lib/prism/node.rb#14707 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?write: ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode) -> ShareableConstantNode # - # source://prism//lib/prism/node.rb#16836 + # source://prism//lib/prism/node.rb#14717 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, - write: T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode), - location: Prism::Location + write: T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode) ).returns(Prism::ShareableConstantNode) end - def copy(flags: T.unsafe(nil), write: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), write: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16821 + # source://prism//lib/prism/node.rb#14702 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, write: ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, write: ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode } # - # source://prism//lib/prism/node.rb#16844 + # source://prism//lib/prism/node.rb#14725 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -30139,7 +30282,7 @@ class Prism::ShareableConstantNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16866 + # source://prism//lib/prism/node.rb#14740 sig { returns(T::Boolean) } def experimental_copy?; end @@ -30147,7 +30290,7 @@ class Prism::ShareableConstantNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16861 + # source://prism//lib/prism/node.rb#14735 sig { returns(T::Boolean) } def experimental_everything?; end @@ -30156,7 +30299,7 @@ class Prism::ShareableConstantNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#16871 + # source://prism//lib/prism/node.rb#14748 sig { override.returns(String) } def inspect; end @@ -30164,76 +30307,50 @@ class Prism::ShareableConstantNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16856 + # source://prism//lib/prism/node.rb#14730 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 + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#16889 + # source://prism//lib/prism/node.rb#14753 sig { override.returns(Symbol) } def type; end # The constant write that should be modified with the shareability state. # - # source://prism//lib/prism/node.rb#16853 + # source://prism//lib/prism/node.rb#14745 sig do returns(T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode)) end def write; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#16849 - 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#16899 + # source://prism//lib/prism/node.rb#14758 def type; end end end # Flags for shareable constant nodes. # -# source://prism//lib/prism/node.rb#19256 +# source://prism//lib/prism/node.rb#16816 module Prism::ShareableConstantNodeFlags; end # constant writes that should be modified with shareable constant value experimental copy # -# source://prism//lib/prism/node.rb#19264 +# source://prism//lib/prism/node.rb#16824 Prism::ShareableConstantNodeFlags::EXPERIMENTAL_COPY = T.let(T.unsafe(nil), Integer) # constant writes that should be modified with shareable constant value experimental everything # -# source://prism//lib/prism/node.rb#19261 +# source://prism//lib/prism/node.rb#16821 Prism::ShareableConstantNodeFlags::EXPERIMENTAL_EVERYTHING = T.let(T.unsafe(nil), Integer) # constant writes that should be modified with shareable constant value literal # -# source://prism//lib/prism/node.rb#19258 +# source://prism//lib/prism/node.rb#16818 Prism::ShareableConstantNodeFlags::LITERAL = T.let(T.unsafe(nil), Integer) # Represents a singleton class declaration involving the `class` keyword. @@ -30241,119 +30358,123 @@ Prism::ShareableConstantNodeFlags::LITERAL = T.let(T.unsafe(nil), Integer) # class << self end # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#16916 +# source://prism//lib/prism/node.rb#14775 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 + # Initialize a new SingletonClassNode node. # # @return [SingletonClassNode] a new instance of SingletonClassNode # - # source://prism//lib/prism/node.rb#16918 + # source://prism//lib/prism/node.rb#14777 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, locals: T::Array[Symbol], class_keyword_loc: Prism::Location, operator_loc: Prism::Location, expression: Prism::Node, - body: T.nilable(Prism::Node), - end_keyword_loc: Prism::Location, - location: Prism::Location + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location ).void end - def initialize(source, locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc, location); end + def initialize(source, node_id, location, flags, locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#17045 + # source://prism//lib/prism/node.rb#14888 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16930 + # source://prism//lib/prism/node.rb#14791 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # attr_reader body: Prism::node? + # attr_reader body: StatementsNode | BeginNode | nil # - # source://prism//lib/prism/node.rb#16986 - sig { returns(T.nilable(Prism::Node)) } + # source://prism//lib/prism/node.rb#14847 + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16935 + # source://prism//lib/prism/node.rb#14796 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def class_keyword: () -> String # - # source://prism//lib/prism/node.rb#16996 + # source://prism//lib/prism/node.rb#14857 sig { returns(String) } def class_keyword; end # attr_reader class_keyword_loc: Location # - # source://prism//lib/prism/node.rb#16969 + # source://prism//lib/prism/node.rb#14830 sig { returns(Prism::Location) } def class_keyword_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16948 + # source://prism//lib/prism/node.rb#14809 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#16940 + # source://prism//lib/prism/node.rb#14801 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?class_keyword_loc: Location, ?operator_loc: Location, ?expression: Prism::node, ?body: StatementsNode | BeginNode | nil, ?end_keyword_loc: Location) -> SingletonClassNode # - # source://prism//lib/prism/node.rb#16953 + # source://prism//lib/prism/node.rb#14814 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, locals: T::Array[Symbol], class_keyword_loc: Prism::Location, operator_loc: Prism::Location, expression: Prism::Node, - body: T.nilable(Prism::Node), - end_keyword_loc: Prism::Location, - location: Prism::Location + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: 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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), class_keyword_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), expression: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16935 + # source://prism//lib/prism/node.rb#14796 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], class_keyword_loc: Location, operator_loc: Location, expression: Prism::node, body: Prism::node?, end_keyword_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], class_keyword_loc: Location, operator_loc: Location, expression: Prism::node, body: StatementsNode | BeginNode | nil, end_keyword_loc: Location } # - # source://prism//lib/prism/node.rb#16961 + # source://prism//lib/prism/node.rb#14822 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def end_keyword: () -> String # - # source://prism//lib/prism/node.rb#17006 + # source://prism//lib/prism/node.rb#14867 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#16989 + # source://prism//lib/prism/node.rb#14850 sig { returns(Prism::Location) } def end_keyword_loc; end # attr_reader expression: Prism::node # - # source://prism//lib/prism/node.rb#16983 + # source://prism//lib/prism/node.rb#14844 sig { returns(Prism::Node) } def expression; end @@ -30362,56 +30483,38 @@ class Prism::SingletonClassNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#17011 + # source://prism//lib/prism/node.rb#14872 sig { override.returns(String) } def inspect; end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#16966 + # source://prism//lib/prism/node.rb#14827 sig { returns(T::Array[Symbol]) } def locals; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#17001 + # source://prism//lib/prism/node.rb#14862 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#16976 + # source://prism//lib/prism/node.rb#14837 sig { returns(Prism::Location) } def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#17029 + # source://prism//lib/prism/node.rb#14877 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#17039 + # source://prism//lib/prism/node.rb#14882 def type; end end end @@ -30426,26 +30529,37 @@ class Prism::Source # # @return [Source] a new instance of Source # - # source://prism//lib/prism/parse_result.rb#26 + # source://prism//lib/prism/parse_result.rb#45 sig { params(source: String, start_line: Integer, offsets: T::Array[Integer]).void } def initialize(source, start_line = T.unsafe(nil), offsets = T.unsafe(nil)); end # Return the column number in characters for the given byte offset. # - # source://prism//lib/prism/parse_result.rb#78 + # source://prism//lib/prism/parse_result.rb#97 sig { params(byte_offset: Integer).returns(Integer) } def character_column(byte_offset); end # Return the character offset for the given byte offset. # - # source://prism//lib/prism/parse_result.rb#73 + # source://prism//lib/prism/parse_result.rb#92 sig { params(byte_offset: Integer).returns(Integer) } def character_offset(byte_offset); end + # Generate a cache that targets a specific encoding for calculating code + # unit offsets. + # + # source://prism//lib/prism/parse_result.rb#125 + sig do + params( + encoding: Encoding + ).returns(T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer))) + end + def code_units_cache(encoding); end + # Returns the column number in code units for the given encoding for the # given byte offset. # - # source://prism//lib/prism/parse_result.rb#95 + # source://prism//lib/prism/parse_result.rb#131 sig { params(byte_offset: Integer, encoding: Encoding).returns(Integer) } def code_units_column(byte_offset, encoding); end @@ -30456,71 +30570,77 @@ 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#88 + # We purposefully replace invalid and undefined characters with replacement + # characters in this conversion. This happens for two reasons. First, it's + # possible that the given byte offset will not occur on a character + # boundary. Second, it's possible that the source code will contain a + # character that has no equivalent in the given encoding. + # + # source://prism//lib/prism/parse_result.rb#113 sig { params(byte_offset: Integer, encoding: Encoding).returns(Integer) } def code_units_offset(byte_offset, encoding); end # Return the column number for the given byte offset. # - # source://prism//lib/prism/parse_result.rb#68 + # source://prism//lib/prism/parse_result.rb#87 sig { params(byte_offset: Integer).returns(Integer) } def column(byte_offset); end # Returns the encoding of the source code, which is set by parameters to the # parser or by the encoding magic comment. # - # source://prism//lib/prism/parse_result.rb#34 + # source://prism//lib/prism/parse_result.rb#53 sig { returns(Encoding) } def encoding; end # Binary search through the offsets to find the line number for the given # byte offset. # - # source://prism//lib/prism/parse_result.rb#51 + # source://prism//lib/prism/parse_result.rb#70 sig { params(byte_offset: Integer).returns(Integer) } def line(byte_offset); end # Returns the byte offset of the end of the line corresponding to the given # byte offset. # - # source://prism//lib/prism/parse_result.rb#63 + # source://prism//lib/prism/parse_result.rb#82 def line_end(byte_offset); end # Return the byte offset of the start of the line corresponding to the given # byte offset. # - # source://prism//lib/prism/parse_result.rb#57 + # source://prism//lib/prism/parse_result.rb#76 sig { params(byte_offset: Integer).returns(Integer) } def line_start(byte_offset); end # Returns the lines of the source code as an array of strings. # - # source://prism//lib/prism/parse_result.rb#39 + # source://prism//lib/prism/parse_result.rb#58 sig { returns(T::Array[String]) } def lines; end # The list of newline byte offsets in the source code. # - # source://prism//lib/prism/parse_result.rb#23 + # source://prism//lib/prism/parse_result.rb#42 sig { returns(T::Array[Integer]) } def offsets; end # Perform a byteslice on the source code using the given byte offset and # byte length. # - # source://prism//lib/prism/parse_result.rb#45 + # source://prism//lib/prism/parse_result.rb#64 sig { params(byte_offset: Integer, length: Integer).returns(String) } def slice(byte_offset, length); end # The source code that this source object represents. # - # source://prism//lib/prism/parse_result.rb#17 + # source://prism//lib/prism/parse_result.rb#36 sig { returns(String) } def source; end # The line number where this source starts. # - # source://prism//lib/prism/parse_result.rb#20 + # source://prism//lib/prism/parse_result.rb#39 sig { returns(Integer) } def start_line; end @@ -30529,7 +30649,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#103 + # source://prism//lib/prism/parse_result.rb#139 def find_line(byte_offset); end class << self @@ -30548,62 +30668,62 @@ end # __ENCODING__ # ^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#17061 +# source://prism//lib/prism/node.rb#14904 class Prism::SourceEncodingNode < ::Prism::Node - # def initialize: (Location location) -> void + # Initialize a new SourceEncodingNode node. # # @return [SourceEncodingNode] a new instance of SourceEncodingNode # - # source://prism//lib/prism/node.rb#17063 - sig { params(source: Prism::Source, location: Prism::Location).void } - def initialize(source, location); end + # source://prism//lib/prism/node.rb#14906 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#17136 + # source://prism//lib/prism/node.rb#14963 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17069 + # source://prism//lib/prism/node.rb#14914 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17074 + # source://prism//lib/prism/node.rb#14919 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17084 + # source://prism//lib/prism/node.rb#14929 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17079 + # source://prism//lib/prism/node.rb#14924 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?location: Location) -> SourceEncodingNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> SourceEncodingNode # - # source://prism//lib/prism/node.rb#17089 - sig { params(location: Prism::Location).returns(Prism::SourceEncodingNode) } - def copy(location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#14934 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::SourceEncodingNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17074 + # source://prism//lib/prism/node.rb#14919 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#17097 + # source://prism//lib/prism/node.rb#14942 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -30612,38 +30732,20 @@ class Prism::SourceEncodingNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#17102 + # source://prism//lib/prism/node.rb#14947 sig { override.returns(String) } def inspect; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#17120 + # source://prism//lib/prism/node.rb#14952 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#17130 + # source://prism//lib/prism/node.rb#14957 def type; end end end @@ -30653,253 +30755,224 @@ end # __FILE__ # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#17145 +# source://prism//lib/prism/node.rb#14972 class Prism::SourceFileNode < ::Prism::Node - # def initialize: (Integer flags, String filepath, Location location) -> void + # Initialize a new SourceFileNode node. # # @return [SourceFileNode] a new instance of SourceFileNode # - # source://prism//lib/prism/node.rb#17147 - sig { params(source: Prism::Source, flags: Integer, filepath: String, location: Prism::Location).void } - def initialize(source, flags, filepath, location); end - - # Implements case-equality for the node. This is effectively == but without - # comparing the value of locations. Locations are checked only for presence. - # - # source://prism//lib/prism/node.rb#17249 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#17155 - sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#17160 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#17170 - sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#17165 - sig { override.returns(T::Array[Prism::Node]) } - def compact_child_nodes; end - - # def copy: (?flags: Integer, ?filepath: String, ?location: Location) -> SourceFileNode - # - # source://prism//lib/prism/node.rb#17175 - sig { params(flags: Integer, filepath: String, location: Prism::Location).returns(Prism::SourceFileNode) } - def copy(flags: T.unsafe(nil), filepath: T.unsafe(nil), location: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#17160 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, filepath: String, location: Location } - # - # source://prism//lib/prism/node.rb#17183 - sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } - def deconstruct_keys(keys); end - - sig { override.returns(T::Array[Prism::Reflection::Field]) } - def fields; end - - # Represents the file path being parsed. This corresponds directly to the `filepath` option given to the various `Prism::parse*` APIs. - # - # source://prism//lib/prism/node.rb#17192 - sig { returns(String) } - def filepath; end - - # def forced_binary_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#17200 - sig { returns(T::Boolean) } - def forced_binary_encoding?; end - - # def forced_utf8_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#17195 - sig { returns(T::Boolean) } - def forced_utf8_encoding?; end - - # def frozen?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#17205 - sig { returns(T::Boolean) } - def frozen?; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#17215 - sig { override.returns(String) } - def inspect; end - - # def mutable?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#17210 - sig { returns(T::Boolean) } - def mutable?; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#17233 - sig { override.returns(Symbol) } - def type; end - - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#17188 - 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#17243 - def type; end + # source://prism//lib/prism/node.rb#14974 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + filepath: String + ).void end -end - -# Represents the use of the `__LINE__` keyword. -# -# __LINE__ -# ^^^^^^^^ -# -# source://prism//lib/prism/node.rb#17260 -class Prism::SourceLineNode < ::Prism::Node - # def initialize: (Location location) -> void - # - # @return [SourceLineNode] a new instance of SourceLineNode - # - # source://prism//lib/prism/node.rb#17262 - sig { params(source: Prism::Source, location: Prism::Location).void } - def initialize(source, location); end + def initialize(source, node_id, location, flags, filepath); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#17335 + # source://prism//lib/prism/node.rb#15055 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17268 + # source://prism//lib/prism/node.rb#14983 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17273 + # source://prism//lib/prism/node.rb#14988 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17283 + # source://prism//lib/prism/node.rb#14998 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17278 + # source://prism//lib/prism/node.rb#14993 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?location: Location) -> SourceLineNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?filepath: String) -> SourceFileNode # - # source://prism//lib/prism/node.rb#17288 - sig { params(location: Prism::Location).returns(Prism::SourceLineNode) } - def copy(location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#15003 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + filepath: String + ).returns(Prism::SourceFileNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), filepath: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17273 + # source://prism//lib/prism/node.rb#14988 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, filepath: String } # - # source://prism//lib/prism/node.rb#17296 + # source://prism//lib/prism/node.rb#15011 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } def fields; end + # Represents the file path being parsed. This corresponds directly to the `filepath` option given to the various `Prism::parse*` APIs. + # + # source://prism//lib/prism/node.rb#15036 + sig { returns(String) } + def filepath; end + + # def forced_binary_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15021 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15016 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def frozen?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15026 + sig { returns(T::Boolean) } + def frozen?; end + # def inspect -> String # - # source://prism//lib/prism/node.rb#17301 + # source://prism//lib/prism/node.rb#15039 sig { override.returns(String) } def inspect; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # def mutable?: () -> bool # - # 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. + # @return [Boolean] # - # def type: () -> Symbol + # source://prism//lib/prism/node.rb#15031 + sig { returns(T::Boolean) } + def mutable?; end + + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#17319 + # source://prism//lib/prism/node.rb#15044 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol + # source://prism//lib/prism/node.rb#15049 + def type; end + end +end + +# Represents the use of the `__LINE__` keyword. +# +# __LINE__ +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#15066 +class Prism::SourceLineNode < ::Prism::Node + # Initialize a new SourceLineNode node. + # + # @return [SourceLineNode] a new instance of SourceLineNode + # + # source://prism//lib/prism/node.rb#15068 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#15125 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15076 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15081 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15091 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15086 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> SourceLineNode + # + # source://prism//lib/prism/node.rb#15096 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::SourceLineNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15081 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#15104 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#15109 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#15114 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#17329 + # source://prism//lib/prism/node.rb#15119 def type; end end end @@ -30909,81 +30982,85 @@ end # [*a] # ^^ # -# source://prism//lib/prism/node.rb#17344 +# source://prism//lib/prism/node.rb#15134 class Prism::SplatNode < ::Prism::Node - # def initialize: (Location operator_loc, Prism::node? expression, Location location) -> void + # Initialize a new SplatNode node. # # @return [SplatNode] a new instance of SplatNode # - # source://prism//lib/prism/node.rb#17346 + # source://prism//lib/prism/node.rb#15136 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, operator_loc: Prism::Location, - expression: T.nilable(Prism::Node), - location: Prism::Location + expression: T.nilable(Prism::Node) ).void end - def initialize(source, operator_loc, expression, location); end + def initialize(source, node_id, location, flags, operator_loc, expression); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#17438 + # source://prism//lib/prism/node.rb#15212 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17354 + # source://prism//lib/prism/node.rb#15146 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17359 + # source://prism//lib/prism/node.rb#15151 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17371 + # source://prism//lib/prism/node.rb#15163 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17364 + # source://prism//lib/prism/node.rb#15156 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?operator_loc: Location, ?expression: Prism::node?, ?location: Location) -> SplatNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?operator_loc: Location, ?expression: Prism::node?) -> SplatNode # - # source://prism//lib/prism/node.rb#17376 + # source://prism//lib/prism/node.rb#15168 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, operator_loc: Prism::Location, - expression: T.nilable(Prism::Node), - location: Prism::Location + expression: T.nilable(Prism::Node) ).returns(Prism::SplatNode) end - def copy(operator_loc: T.unsafe(nil), expression: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), operator_loc: T.unsafe(nil), expression: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17359 + # source://prism//lib/prism/node.rb#15151 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { operator_loc: Location, expression: Prism::node?, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, operator_loc: Location, expression: Prism::node? } # - # source://prism//lib/prism/node.rb#17384 + # source://prism//lib/prism/node.rb#15176 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader expression: Prism::node? # - # source://prism//lib/prism/node.rb#17396 + # source://prism//lib/prism/node.rb#15188 sig { returns(T.nilable(Prism::Node)) } def expression; end @@ -30992,50 +31069,32 @@ class Prism::SplatNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#17404 + # source://prism//lib/prism/node.rb#15196 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#17399 + # source://prism//lib/prism/node.rb#15191 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#17389 + # source://prism//lib/prism/node.rb#15181 sig { returns(Prism::Location) } def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#17422 + # source://prism//lib/prism/node.rb#15201 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#17432 + # source://prism//lib/prism/node.rb#15206 def type; end end end @@ -31045,68 +31104,83 @@ end # foo; bar; baz # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#17449 +# source://prism//lib/prism/node.rb#15223 class Prism::StatementsNode < ::Prism::Node - # def initialize: (Array[Prism::node] body, Location location) -> void + # Initialize a new StatementsNode node. # # @return [StatementsNode] a new instance of StatementsNode # - # source://prism//lib/prism/node.rb#17451 - sig { params(source: Prism::Source, body: T::Array[Prism::Node], location: Prism::Location).void } - def initialize(source, body, location); end + # source://prism//lib/prism/node.rb#15225 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + body: T::Array[Prism::Node] + ).void + end + def initialize(source, node_id, location, flags, body); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#17528 + # source://prism//lib/prism/node.rb#15286 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17458 + # source://prism//lib/prism/node.rb#15234 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: Array[Prism::node] # - # source://prism//lib/prism/node.rb#17491 + # source://prism//lib/prism/node.rb#15267 sig { returns(T::Array[Prism::Node]) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17463 + # source://prism//lib/prism/node.rb#15239 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17473 + # source://prism//lib/prism/node.rb#15249 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17468 + # source://prism//lib/prism/node.rb#15244 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?body: Array[Prism::node], ?location: Location) -> StatementsNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?body: Array[Prism::node]) -> StatementsNode # - # source://prism//lib/prism/node.rb#17478 - sig { params(body: T::Array[Prism::Node], location: Prism::Location).returns(Prism::StatementsNode) } - def copy(body: T.unsafe(nil), location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#15254 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + body: T::Array[Prism::Node] + ).returns(Prism::StatementsNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), body: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17463 + # source://prism//lib/prism/node.rb#15239 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { body: Array[Prism::node], location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, body: Array[Prism::node] } # - # source://prism//lib/prism/node.rb#17486 + # source://prism//lib/prism/node.rb#15262 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -31115,61 +31189,43 @@ class Prism::StatementsNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#17494 + # source://prism//lib/prism/node.rb#15270 sig { override.returns(String) } def inspect; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#17512 + # source://prism//lib/prism/node.rb#15275 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#17522 + # source://prism//lib/prism/node.rb#15280 def type; end end end # Flags for string nodes. # -# source://prism//lib/prism/node.rb#19268 +# source://prism//lib/prism/node.rb#16828 module Prism::StringFlags; end # internal bytes forced the encoding to binary # -# source://prism//lib/prism/node.rb#19273 +# source://prism//lib/prism/node.rb#16833 Prism::StringFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer) # internal bytes forced the encoding to UTF-8 # -# source://prism//lib/prism/node.rb#19270 +# source://prism//lib/prism/node.rb#16830 Prism::StringFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/node.rb#19276 +# source://prism//lib/prism/node.rb#16836 Prism::StringFlags::FROZEN = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/node.rb#19279 +# source://prism//lib/prism/node.rb#16839 Prism::StringFlags::MUTABLE = T.let(T.unsafe(nil), Integer) # Represents a string literal, a string contained within a `%w` list, or plain string content within an interpolated string. @@ -31183,107 +31239,109 @@ Prism::StringFlags::MUTABLE = T.let(T.unsafe(nil), Integer) # "foo #{bar} baz" # ^^^^ ^^^^ # -# source://prism//lib/prism/node.rb#17545 +# source://prism//lib/prism/node.rb#15303 class Prism::StringNode < ::Prism::Node include ::Prism::HeredocQuery - # def initialize: (Integer flags, Location? opening_loc, Location content_loc, Location? closing_loc, String unescaped, Location location) -> void + # Initialize a new StringNode node. # # @return [StringNode] a new instance of StringNode # - # source://prism//lib/prism/node.rb#17547 + # source://prism//lib/prism/node.rb#15305 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, opening_loc: T.nilable(Prism::Location), content_loc: Prism::Location, closing_loc: T.nilable(Prism::Location), - unescaped: String, - location: Prism::Location + unescaped: String ).void end - def initialize(source, flags, opening_loc, content_loc, closing_loc, unescaped, location); end + def initialize(source, node_id, location, flags, opening_loc, content_loc, closing_loc, unescaped); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#17700 + # source://prism//lib/prism/node.rb#15437 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17558 + # source://prism//lib/prism/node.rb#15317 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17563 + # source://prism//lib/prism/node.rb#15322 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#17661 + # source://prism//lib/prism/node.rb#15416 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#17615 + # source://prism//lib/prism/node.rb#15390 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17573 + # source://prism//lib/prism/node.rb#15332 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17568 + # source://prism//lib/prism/node.rb#15327 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def content: () -> String # - # source://prism//lib/prism/node.rb#17656 + # source://prism//lib/prism/node.rb#15411 sig { returns(String) } def content; end # attr_reader content_loc: Location # - # source://prism//lib/prism/node.rb#17608 + # source://prism//lib/prism/node.rb#15383 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?content_loc: Location, ?closing_loc: Location?, ?unescaped: String) -> StringNode # - # source://prism//lib/prism/node.rb#17578 + # source://prism//lib/prism/node.rb#15337 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, opening_loc: T.nilable(Prism::Location), content_loc: Prism::Location, closing_loc: T.nilable(Prism::Location), - unescaped: String, - location: Prism::Location + unescaped: String ).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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17563 + # source://prism//lib/prism/node.rb#15322 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location?, content_loc: Location, closing_loc: Location?, unescaped: String, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, content_loc: Location, closing_loc: Location?, unescaped: String } # - # source://prism//lib/prism/node.rb#17586 + # source://prism//lib/prism/node.rb#15345 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -31294,7 +31352,7 @@ class Prism::StringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#17636 + # source://prism//lib/prism/node.rb#15355 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -31302,7 +31360,7 @@ class Prism::StringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#17631 + # source://prism//lib/prism/node.rb#15350 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -31310,7 +31368,7 @@ class Prism::StringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#17641 + # source://prism//lib/prism/node.rb#15360 sig { returns(T::Boolean) } def frozen?; end @@ -31319,7 +31377,7 @@ class Prism::StringNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#17666 + # source://prism//lib/prism/node.rb#15421 sig { override.returns(String) } def inspect; end @@ -31327,71 +31385,45 @@ class Prism::StringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#17646 + # source://prism//lib/prism/node.rb#15365 sig { returns(T::Boolean) } def mutable?; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#17651 + # source://prism//lib/prism/node.rb#15406 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#17595 + # source://prism//lib/prism/node.rb#15370 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # Occasionally it's helpful to treat a string as if it were interpolated so # that there's a consistent interface for working with strings. # - # source://prism//lib/prism/node_ext.rb#69 + # source://prism//lib/prism/node_ext.rb#72 sig { returns(Prism::InterpolatedStringNode) } def to_interpolated; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#17684 + # source://prism//lib/prism/node.rb#15426 sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#17628 + # source://prism//lib/prism/node.rb#15403 sig { returns(String) } def unescaped; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#17591 - 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#17694 + # source://prism//lib/prism/node.rb#15431 def type; end end end @@ -31404,93 +31436,97 @@ end # super foo, bar # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#17717 +# source://prism//lib/prism/node.rb#15454 class Prism::SuperNode < ::Prism::Node - # def initialize: (Location keyword_loc, Location? lparen_loc, ArgumentsNode? arguments, Location? rparen_loc, Prism::node? block, Location location) -> void + # Initialize a new SuperNode node. # # @return [SuperNode] a new instance of SuperNode # - # source://prism//lib/prism/node.rb#17719 + # source://prism//lib/prism/node.rb#15456 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, keyword_loc: Prism::Location, lparen_loc: T.nilable(Prism::Location), arguments: T.nilable(Prism::ArgumentsNode), rparen_loc: T.nilable(Prism::Location), - block: T.nilable(Prism::Node), - location: Prism::Location + block: T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) ).void end - def initialize(source, keyword_loc, lparen_loc, arguments, rparen_loc, block, location); end + def initialize(source, node_id, location, flags, keyword_loc, lparen_loc, arguments, rparen_loc, block); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#17854 + # source://prism//lib/prism/node.rb#15575 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17730 + # source://prism//lib/prism/node.rb#15469 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#17786 + # source://prism//lib/prism/node.rb#15525 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end - # attr_reader block: Prism::node? + # attr_reader block: BlockNode | BlockArgumentNode | nil # - # source://prism//lib/prism/node.rb#17802 - sig { returns(T.nilable(Prism::Node)) } + # source://prism//lib/prism/node.rb#15541 + sig { returns(T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode))) } def block; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17735 + # source://prism//lib/prism/node.rb#15474 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17748 + # source://prism//lib/prism/node.rb#15487 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17740 + # source://prism//lib/prism/node.rb#15479 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?lparen_loc: Location?, ?arguments: ArgumentsNode?, ?rparen_loc: Location?, ?block: BlockNode | BlockArgumentNode | nil) -> SuperNode # - # source://prism//lib/prism/node.rb#17753 + # source://prism//lib/prism/node.rb#15492 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, keyword_loc: Prism::Location, lparen_loc: T.nilable(Prism::Location), arguments: T.nilable(Prism::ArgumentsNode), rparen_loc: T.nilable(Prism::Location), - block: T.nilable(Prism::Node), - location: Prism::Location + block: T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) ).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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), arguments: T.unsafe(nil), rparen_loc: T.unsafe(nil), block: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17735 + # source://prism//lib/prism/node.rb#15474 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, block: Prism::node?, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, block: BlockNode | BlockArgumentNode | nil } # - # source://prism//lib/prism/node.rb#17761 + # source://prism//lib/prism/node.rb#15500 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -31499,96 +31535,78 @@ class Prism::SuperNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#17820 + # source://prism//lib/prism/node.rb#15559 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#17805 + # source://prism//lib/prism/node.rb#15544 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#17766 + # source://prism//lib/prism/node.rb#15505 sig { returns(Prism::Location) } def keyword_loc; end # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#17810 + # source://prism//lib/prism/node.rb#15549 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#17773 + # source://prism//lib/prism/node.rb#15512 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#17815 + # source://prism//lib/prism/node.rb#15554 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#17789 + # source://prism//lib/prism/node.rb#15528 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#17838 + # source://prism//lib/prism/node.rb#15564 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#17848 + # source://prism//lib/prism/node.rb#15569 def type; end end end # Flags for symbol nodes. # -# source://prism//lib/prism/node.rb#19283 +# source://prism//lib/prism/node.rb#16843 module Prism::SymbolFlags; end # internal bytes forced the encoding to binary # -# source://prism//lib/prism/node.rb#19288 +# source://prism//lib/prism/node.rb#16848 Prism::SymbolFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer) # internal bytes forced the encoding to US-ASCII # -# source://prism//lib/prism/node.rb#19291 +# source://prism//lib/prism/node.rb#16851 Prism::SymbolFlags::FORCED_US_ASCII_ENCODING = T.let(T.unsafe(nil), Integer) # internal bytes forced the encoding to UTF-8 # -# source://prism//lib/prism/node.rb#19285 +# source://prism//lib/prism/node.rb#16845 Prism::SymbolFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # Represents a symbol literal or a symbol contained within a `%i` list. @@ -31599,93 +31617,95 @@ Prism::SymbolFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # %i[foo] # ^^^ # -# source://prism//lib/prism/node.rb#17871 +# source://prism//lib/prism/node.rb#15592 class Prism::SymbolNode < ::Prism::Node - # def initialize: (Integer flags, Location? opening_loc, Location? value_loc, Location? closing_loc, String unescaped, Location location) -> void + # Initialize a new SymbolNode node. # # @return [SymbolNode] a new instance of SymbolNode # - # source://prism//lib/prism/node.rb#17873 + # source://prism//lib/prism/node.rb#15594 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, opening_loc: T.nilable(Prism::Location), value_loc: T.nilable(Prism::Location), closing_loc: T.nilable(Prism::Location), - unescaped: String, - location: Prism::Location + unescaped: String ).void end - def initialize(source, flags, opening_loc, value_loc, closing_loc, unescaped, location); end + def initialize(source, node_id, location, flags, opening_loc, value_loc, closing_loc, unescaped); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#18027 + # source://prism//lib/prism/node.rb#15727 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17884 + # source://prism//lib/prism/node.rb#15606 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17889 + # source://prism//lib/prism/node.rb#15611 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#17988 + # source://prism//lib/prism/node.rb#15706 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#17947 + # source://prism//lib/prism/node.rb#15680 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17899 + # source://prism//lib/prism/node.rb#15621 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#17894 + # source://prism//lib/prism/node.rb#15616 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?value_loc: Location?, ?closing_loc: Location?, ?unescaped: String) -> SymbolNode # - # source://prism//lib/prism/node.rb#17904 + # source://prism//lib/prism/node.rb#15626 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, opening_loc: T.nilable(Prism::Location), value_loc: T.nilable(Prism::Location), closing_loc: T.nilable(Prism::Location), - unescaped: String, - location: Prism::Location + unescaped: String ).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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), value_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17889 + # source://prism//lib/prism/node.rb#15611 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location?, value_loc: Location?, closing_loc: Location?, unescaped: String, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, value_loc: Location?, closing_loc: Location?, unescaped: String } # - # source://prism//lib/prism/node.rb#17912 + # source://prism//lib/prism/node.rb#15634 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -31696,7 +31716,7 @@ class Prism::SymbolNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#17968 + # source://prism//lib/prism/node.rb#15644 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -31704,7 +31724,7 @@ class Prism::SymbolNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#17973 + # source://prism//lib/prism/node.rb#15649 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end @@ -31712,131 +31732,110 @@ class Prism::SymbolNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#17963 + # source://prism//lib/prism/node.rb#15639 sig { returns(T::Boolean) } def forced_utf8_encoding?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#17993 + # source://prism//lib/prism/node.rb#15711 sig { override.returns(String) } def inspect; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#17978 + # source://prism//lib/prism/node.rb#15696 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#17921 + # source://prism//lib/prism/node.rb#15654 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#18011 + # source://prism//lib/prism/node.rb#15716 sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#17960 + # source://prism//lib/prism/node.rb#15693 sig { returns(String) } def unescaped; end # def value: () -> String? # - # source://prism//lib/prism/node.rb#17983 + # source://prism//lib/prism/node.rb#15701 sig { returns(T.nilable(String)) } def value; end # attr_reader value_loc: Location? # - # source://prism//lib/prism/node.rb#17934 + # source://prism//lib/prism/node.rb#15667 sig { returns(T.nilable(Prism::Location)) } def value_loc; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#17917 - 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#18021 + # source://prism//lib/prism/node.rb#15721 def type; end end end # This represents a token from the Ruby source. # -# source://prism//lib/prism/parse_result.rb#645 +# source://prism//lib/prism/parse_result.rb#799 class Prism::Token # Create a new token object with the given type, value, and location. # # @return [Token] a new instance of Token # - # source://prism//lib/prism/parse_result.rb#657 + # source://prism//lib/prism/parse_result.rb#811 sig { params(source: Prism::Source, type: Symbol, value: String, location: T.any(Integer, Prism::Location)).void } def initialize(source, type, value, location); end # Returns true if the given other token is equal to this token. # - # source://prism//lib/prism/parse_result.rb#692 + # source://prism//lib/prism/parse_result.rb#846 sig { params(other: T.untyped).returns(T::Boolean) } def ==(other); end # Implement the hash pattern matching interface for Token. # - # source://prism//lib/prism/parse_result.rb#665 + # source://prism//lib/prism/parse_result.rb#819 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # Returns a string representation of this token. + # + # source://prism//lib/prism/parse_result.rb#853 + def inspect; end + # A Location object representing the location of this token in the source. # - # source://prism//lib/prism/parse_result.rb#670 + # source://prism//lib/prism/parse_result.rb#824 sig { returns(Prism::Location) } def location; end # Implement the pretty print interface for Token. # - # source://prism//lib/prism/parse_result.rb#677 + # source://prism//lib/prism/parse_result.rb#831 sig { params(q: T.untyped).void } def pretty_print(q); end # The type of token that this token is. # - # source://prism//lib/prism/parse_result.rb#651 + # source://prism//lib/prism/parse_result.rb#805 sig { returns(Symbol) } def type; end # A byteslice of the source that this token represents. # - # source://prism//lib/prism/parse_result.rb#654 + # source://prism//lib/prism/parse_result.rb#808 sig { returns(String) } def value; end @@ -31844,7 +31843,7 @@ class Prism::Token # The Source object that represents the source this token came from. # - # source://prism//lib/prism/parse_result.rb#647 + # source://prism//lib/prism/parse_result.rb#801 sig { returns(Prism::Source) } def source; end end @@ -33128,50 +33127,50 @@ class Prism::Translation::Parser::Lexer # # @return [Lexer] a new instance of Lexer # - # source://prism//lib/prism/translation/parser/lexer.rb#204 + # source://prism//lib/prism/translation/parser/lexer.rb#217 def initialize(source_buffer, lexed, offset_cache); end # An array of tuples that contain prism tokens and their associated lex # state when they were lexed. # - # source://prism//lib/prism/translation/parser/lexer.rb#197 + # source://prism//lib/prism/translation/parser/lexer.rb#210 def lexed; end # A hash that maps offsets in bytes to offsets in characters. # - # source://prism//lib/prism/translation/parser/lexer.rb#200 + # source://prism//lib/prism/translation/parser/lexer.rb#213 def offset_cache; end # The Parser::Source::Buffer that the tokens were lexed from. # - # source://prism//lib/prism/translation/parser/lexer.rb#193 + # source://prism//lib/prism/translation/parser/lexer.rb#206 def source_buffer; end # Convert the prism tokens into the expected format for the parser gem. # - # source://prism//lib/prism/translation/parser/lexer.rb#214 + # source://prism//lib/prism/translation/parser/lexer.rb#227 def to_a; end private # Parse a complex from the string representation. # - # source://prism//lib/prism/translation/parser/lexer.rb#387 + # source://prism//lib/prism/translation/parser/lexer.rb#409 def parse_complex(value); end # Parse a float from the string representation. # - # source://prism//lib/prism/translation/parser/lexer.rb#380 + # source://prism//lib/prism/translation/parser/lexer.rb#402 def parse_float(value); end # Parse an integer from the string representation. # - # source://prism//lib/prism/translation/parser/lexer.rb#373 + # source://prism//lib/prism/translation/parser/lexer.rb#395 def parse_integer(value); end # Parse a rational from the string representation. # - # source://prism//lib/prism/translation/parser/lexer.rb#402 + # source://prism//lib/prism/translation/parser/lexer.rb#424 def parse_rational(value); end end @@ -33189,7 +33188,21 @@ 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 +# It is used to determine whether `do` is of the token type `kDO` or `kDO_LAMBDA`. +# +# NOTE: In edge cases like `-> (foo = -> (bar) {}) do end`, please note that `kDO` is still returned +# instead of `kDO_LAMBDA`, which is expected: https://github.com/ruby/prism/pull/3046 +# +# source://prism//lib/prism/translation/parser/lexer.rb#194 +Prism::Translation::Parser::Lexer::LAMBDA_TOKEN_TYPES = T.let(T.unsafe(nil), Array) + +# The `PARENTHESIS_LEFT` token in Prism is classified as either `tLPAREN` or `tLPAREN2` in the Parser gem. +# The following token types are listed as those classified as `tLPAREN`. +# +# source://prism//lib/prism/translation/parser/lexer.rb#198 +Prism::Translation::Parser::Lexer::LPAREN_CONVERSION_TOKEN_TYPES = T.let(T.unsafe(nil), Array) + +# source://prism//lib/prism/translation/parser/lexer.rb#223 Prism::Translation::Parser::Lexer::Range = Parser::Source::Range # The direct translating of types between the two lexers. @@ -34268,25 +34281,25 @@ class Prism::Translation::Ripper < ::Prism::Compiler # :stopdoc: # - # source://prism//lib/prism/translation/ripper.rb#3389 + # source://prism//lib/prism/translation/ripper.rb#3385 def _dispatch_0; end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def _dispatch_1(_); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def _dispatch_2(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3392 + # source://prism//lib/prism/translation/ripper.rb#3388 def _dispatch_3(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3393 + # source://prism//lib/prism/translation/ripper.rb#3389 def _dispatch_4(_, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3394 + # source://prism//lib/prism/translation/ripper.rb#3390 def _dispatch_5(_, _, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3395 + # source://prism//lib/prism/translation/ripper.rb#3391 def _dispatch_7(_, _, _, _, _, _, _); end # This method is responsible for updating lineno and column information @@ -34295,7 +34308,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#3379 + # source://prism//lib/prism/translation/ripper.rb#3375 def bounds(location); end # Returns true if the given node is a command node. @@ -34307,7 +34320,7 @@ class Prism::Translation::Ripper < ::Prism::Compiler # This method is called when the parser found syntax error. # - # source://prism//lib/prism/translation/ripper.rb#3417 + # source://prism//lib/prism/translation/ripper.rb#3413 def compile_error(msg); end # This method is provided by the Ripper C extension. It is called when a @@ -34315,577 +34328,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#3432 + # source://prism//lib/prism/translation/ripper.rb#3428 def dedent_string(string, width); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_BEGIN(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_CHAR(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_END(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on___end__(_); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_alias(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_alias_error(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_aref(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_aref_field(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_arg_ambiguous(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_arg_paren(_); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_args_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_args_add_block(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_args_add_star(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3389 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_args_forward; end - # source://prism//lib/prism/translation/ripper.rb#3389 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_args_new; end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_array(_); end - # source://prism//lib/prism/translation/ripper.rb#3393 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_aryptn(_, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_assign(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_assign_error(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_assoc_new(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_assoc_splat(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_assoclist_from_args(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_backref(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_backtick(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_bare_assoc_hash(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_begin(_); end - # source://prism//lib/prism/translation/ripper.rb#3392 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_binary(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_block_var(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_blockarg(_); end - # source://prism//lib/prism/translation/ripper.rb#3393 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_bodystmt(_, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_brace_block(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_break(_); end - # source://prism//lib/prism/translation/ripper.rb#3392 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_call(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_case(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3392 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_class(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_class_name_error(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_comma(_); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_command(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3393 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_command_call(_, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_comment(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_const(_); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_const_path_field(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_const_path_ref(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_const_ref(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_cvar(_); end - # source://prism//lib/prism/translation/ripper.rb#3392 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_def(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_defined(_); end - # source://prism//lib/prism/translation/ripper.rb#3394 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_defs(_, _, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_do_block(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_dot2(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_dot3(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_dyna_symbol(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_else(_); end - # source://prism//lib/prism/translation/ripper.rb#3392 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_elsif(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_embdoc(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_embdoc_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_embdoc_end(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_embexpr_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_embexpr_end(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_embvar(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_ensure(_); end - # source://prism//lib/prism/translation/ripper.rb#3389 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_excessed_comma; end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_fcall(_); end - # source://prism//lib/prism/translation/ripper.rb#3392 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_field(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_float(_); end - # source://prism//lib/prism/translation/ripper.rb#3393 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_fndptn(_, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3392 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_for(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_gvar(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_hash(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_heredoc_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_heredoc_dedent(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_heredoc_end(_); end - # source://prism//lib/prism/translation/ripper.rb#3392 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_hshptn(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_ident(_); end - # source://prism//lib/prism/translation/ripper.rb#3392 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_if(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_if_mod(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3392 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_ifop(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_ignored_nl(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_ignored_sp(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_imaginary(_); end - # source://prism//lib/prism/translation/ripper.rb#3392 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_in(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_int(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_ivar(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_kw(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_kwrest_param(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_label(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_label_end(_); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_lambda(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_lbrace(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_lbracket(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_lparen(_); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_magic_comment(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_massign(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_method_add_arg(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_method_add_block(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_mlhs_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_mlhs_add_post(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_mlhs_add_star(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3389 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_mlhs_new; end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_mlhs_paren(_); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_module(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_mrhs_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_mrhs_add_star(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3389 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_mrhs_new; end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_mrhs_new_from_args(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_next(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_nl(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_nokw_param(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_op(_); end - # source://prism//lib/prism/translation/ripper.rb#3392 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_opassign(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_operator_ambiguous(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_param_error(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3395 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_params(_, _, _, _, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_paren(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_parse_error(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_period(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_program(_); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_qsymbols_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_qsymbols_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#3389 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_qsymbols_new; end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_qwords_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_qwords_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#3389 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_qwords_new; end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_rational(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_rbrace(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_rbracket(_); end - # source://prism//lib/prism/translation/ripper.rb#3389 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_redo; end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_regexp_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_regexp_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_regexp_end(_); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_regexp_literal(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3389 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_regexp_new; end - # source://prism//lib/prism/translation/ripper.rb#3393 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_rescue(_, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_rescue_mod(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_rest_param(_); end - # source://prism//lib/prism/translation/ripper.rb#3389 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_retry; end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_return(_); end - # source://prism//lib/prism/translation/ripper.rb#3389 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_return0; end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_rparen(_); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_sclass(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_semicolon(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_sp(_); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_stmts_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3389 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_stmts_new; end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_string_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_string_concat(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3389 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_string_content; end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_string_dvar(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_string_embexpr(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_string_literal(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_super(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_symbeg(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_symbol(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_symbol_literal(_); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_symbols_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_symbols_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#3389 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_symbols_new; end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_tlambda(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_tlambeg(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_top_const_field(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_top_const_ref(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_tstring_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_tstring_content(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_tstring_end(_); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_unary(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_undef(_); end - # source://prism//lib/prism/translation/ripper.rb#3392 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_unless(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_unless_mod(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_until(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_until_mod(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_var_alias(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_var_field(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_var_ref(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_vcall(_); end - # source://prism//lib/prism/translation/ripper.rb#3389 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_void_stmt; end - # source://prism//lib/prism/translation/ripper.rb#3392 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_when(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_while(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_while_mod(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_word_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3389 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_word_new; end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_words_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_words_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#3389 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_words_new; end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_words_sep(_); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_xstring_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_xstring_literal(_); end - # source://prism//lib/prism/translation/ripper.rb#3389 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_xstring_new; end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_yield(_); end - # source://prism//lib/prism/translation/ripper.rb#3389 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_yield0; end - # source://prism//lib/prism/translation/ripper.rb#3389 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_zsuper; end # Lazily initialize the parse result. @@ -34897,7 +34910,7 @@ class Prism::Translation::Ripper < ::Prism::Compiler # # @return [Boolean] # - # source://prism//lib/prism/translation/ripper.rb#3284 + # source://prism//lib/prism/translation/ripper.rb#3280 def trailing_comma?(left, right); end # Visit one side of an alias global variable node. @@ -34969,7 +34982,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#3323 + # source://prism//lib/prism/translation/ripper.rb#3319 def visit_number_node(node); end # Visit a pattern within a pattern match. This is used to bypass the @@ -34994,7 +35007,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#3296 + # source://prism//lib/prism/translation/ripper.rb#3292 def visit_token(token, allow_keywords = T.unsafe(nil)); end # Dispatch a words_sep event that contains the space between the elements @@ -35006,26 +35019,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#3341 + # source://prism//lib/prism/translation/ripper.rb#3337 def visit_write_value(node); end # Returns true if there is a semicolon between the two locations. # # @return [Boolean] # - # source://prism//lib/prism/translation/ripper.rb#3289 + # source://prism//lib/prism/translation/ripper.rb#3285 def void_stmt?(left, right, allow_newline); end # This method is called when weak warning is produced by the parser. # +fmt+ and +args+ is printf style. # - # source://prism//lib/prism/translation/ripper.rb#3408 + # source://prism//lib/prism/translation/ripper.rb#3404 def warn(fmt, *args); end # This method is called when strong warning is produced by the parser. # +fmt+ and +args+ is printf style. # - # source://prism//lib/prism/translation/ripper.rb#3413 + # source://prism//lib/prism/translation/ripper.rb#3409 def warning(fmt, *args); end class << self @@ -35842,13 +35855,13 @@ class Prism::Translation::RubyParser # Parse the given source and translate it into the seattlerb/ruby_parser # gem's Sexp format. # - # source://prism//lib/prism/translation/ruby_parser.rb#1556 + # source://prism//lib/prism/translation/ruby_parser.rb#1598 def parse(source, filepath = T.unsafe(nil)); end # Parse the given file and translate it into the seattlerb/ruby_parser # gem's Sexp format. # - # source://prism//lib/prism/translation/ruby_parser.rb#1562 + # source://prism//lib/prism/translation/ruby_parser.rb#1604 def parse_file(filepath); end private @@ -35856,20 +35869,20 @@ class Prism::Translation::RubyParser # Translate the given parse result and filepath into the # seattlerb/ruby_parser gem's Sexp format. # - # source://prism//lib/prism/translation/ruby_parser.rb#1584 + # source://prism//lib/prism/translation/ruby_parser.rb#1626 def translate(result, filepath); end class << self # Parse the given source and translate it into the seattlerb/ruby_parser # gem's Sexp format. # - # source://prism//lib/prism/translation/ruby_parser.rb#1569 + # source://prism//lib/prism/translation/ruby_parser.rb#1611 def parse(source, filepath = T.unsafe(nil)); end # Parse the given file and translate it into the seattlerb/ruby_parser # gem's Sexp format. # - # source://prism//lib/prism/translation/ruby_parser.rb#1575 + # source://prism//lib/prism/translation/ruby_parser.rb#1617 def parse_file(filepath); end end end @@ -35931,25 +35944,25 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # foo(bar) # ^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#96 + # source://prism//lib/prism/translation/ruby_parser.rb#108 def visit_arguments_node(node); end # [] # ^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#63 + # source://prism//lib/prism/translation/ruby_parser.rb#75 def visit_array_node(node); end # foo => [bar] # ^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#73 + # source://prism//lib/prism/translation/ruby_parser.rb#85 def visit_array_pattern_node(node); end # { a: 1 } # ^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#102 + # source://prism//lib/prism/translation/ruby_parser.rb#114 def visit_assoc_node(node); end # def foo(**); bar(**); end @@ -35958,47 +35971,47 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # { **foo } # ^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#111 + # source://prism//lib/prism/translation/ruby_parser.rb#123 def visit_assoc_splat_node(node); end # $+ # ^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#121 + # source://prism//lib/prism/translation/ruby_parser.rb#133 def visit_back_reference_read_node(node); end # begin end # ^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#127 + # source://prism//lib/prism/translation/ruby_parser.rb#139 def visit_begin_node(node); end # foo(&bar) # ^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#160 + # source://prism//lib/prism/translation/ruby_parser.rb#172 def visit_block_argument_node(node); end # foo { |; bar| } # ^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#168 + # source://prism//lib/prism/translation/ruby_parser.rb#180 def visit_block_local_variable_node(node); end # A block on a keyword or method call. # - # source://prism//lib/prism/translation/ruby_parser.rb#173 + # source://prism//lib/prism/translation/ruby_parser.rb#185 def visit_block_node(node); end # def foo(&bar); end # ^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#179 + # source://prism//lib/prism/translation/ruby_parser.rb#191 def visit_block_parameter_node(node); end # A block's parameters. # - # source://prism//lib/prism/translation/ruby_parser.rb#184 + # source://prism//lib/prism/translation/ruby_parser.rb#196 def visit_block_parameters_node(node); end # break @@ -36007,13 +36020,13 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # break foo # ^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#224 + # source://prism//lib/prism/translation/ruby_parser.rb#236 def visit_break_node(node); end # foo.bar &&= baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#287 + # source://prism//lib/prism/translation/ruby_parser.rb#304 def visit_call_and_write_node(node); end # foo @@ -36025,79 +36038,79 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # foo.bar() {} # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#242 + # source://prism//lib/prism/translation/ruby_parser.rb#254 def visit_call_node(node); end # foo.bar += baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#277 + # source://prism//lib/prism/translation/ruby_parser.rb#294 def visit_call_operator_write_node(node); end # foo.bar ||= baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#297 + # source://prism//lib/prism/translation/ruby_parser.rb#314 def visit_call_or_write_node(node); end # foo.bar, = 1 # ^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#320 + # source://prism//lib/prism/translation/ruby_parser.rb#337 def visit_call_target_node(node); end # foo => bar => baz # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#326 + # source://prism//lib/prism/translation/ruby_parser.rb#343 def visit_capture_pattern_node(node); end # case foo; in bar; end # ^^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#338 + # source://prism//lib/prism/translation/ruby_parser.rb#355 def visit_case_match_node(node); end # case foo; when bar; end # ^^^^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#332 + # source://prism//lib/prism/translation/ruby_parser.rb#349 def visit_case_node(node); end # class Foo; end # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#344 + # source://prism//lib/prism/translation/ruby_parser.rb#361 def visit_class_node(node); end # @@foo &&= bar # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#385 + # source://prism//lib/prism/translation/ruby_parser.rb#402 def visit_class_variable_and_write_node(node); end # @@foo += bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#379 + # source://prism//lib/prism/translation/ruby_parser.rb#396 def visit_class_variable_operator_write_node(node); end # @@foo ||= bar # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#391 + # source://prism//lib/prism/translation/ruby_parser.rb#408 def visit_class_variable_or_write_node(node); end # @@foo # ^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#364 + # source://prism//lib/prism/translation/ruby_parser.rb#381 def visit_class_variable_read_node(node); end # @@foo, = bar # ^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#397 + # source://prism//lib/prism/translation/ruby_parser.rb#414 def visit_class_variable_target_node(node); end # @@foo = 1 @@ -36106,55 +36119,55 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # @@foo, @@bar = 1 # ^^^^^ ^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#373 + # source://prism//lib/prism/translation/ruby_parser.rb#390 def visit_class_variable_write_node(node); end # Foo &&= bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#430 + # source://prism//lib/prism/translation/ruby_parser.rb#447 def visit_constant_and_write_node(node); end # Foo += bar # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#424 + # source://prism//lib/prism/translation/ruby_parser.rb#441 def visit_constant_operator_write_node(node); end # Foo ||= bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#436 + # source://prism//lib/prism/translation/ruby_parser.rb#453 def visit_constant_or_write_node(node); end # Foo::Bar &&= baz # ^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#473 + # source://prism//lib/prism/translation/ruby_parser.rb#490 def visit_constant_path_and_write_node(node); end # Foo::Bar # ^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#448 + # source://prism//lib/prism/translation/ruby_parser.rb#465 def visit_constant_path_node(node); end # Foo::Bar += baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#467 + # source://prism//lib/prism/translation/ruby_parser.rb#484 def visit_constant_path_operator_write_node(node); end # Foo::Bar ||= baz # ^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#479 + # source://prism//lib/prism/translation/ruby_parser.rb#496 def visit_constant_path_or_write_node(node); end # Foo::Bar, = baz # ^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#485 + # source://prism//lib/prism/translation/ruby_parser.rb#502 def visit_constant_path_target_node(node); end # Foo::Bar = 1 @@ -36163,19 +36176,19 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # Foo::Foo, Bar::Bar = 1 # ^^^^^^^^ ^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#461 + # source://prism//lib/prism/translation/ruby_parser.rb#478 def visit_constant_path_write_node(node); end # Foo # ^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#409 + # source://prism//lib/prism/translation/ruby_parser.rb#426 def visit_constant_read_node(node); end # Foo, = bar # ^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#442 + # source://prism//lib/prism/translation/ruby_parser.rb#459 def visit_constant_target_node(node); end # Foo = 1 @@ -36184,7 +36197,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # Foo, Bar = 1 # ^^^ ^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#418 + # source://prism//lib/prism/translation/ruby_parser.rb#435 def visit_constant_write_node(node); end # def foo; end @@ -36193,7 +36206,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # def self.foo; end # ^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#501 + # source://prism//lib/prism/translation/ruby_parser.rb#518 def visit_def_node(node); end # defined? a @@ -36202,73 +36215,73 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # defined?(a) # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#532 + # source://prism//lib/prism/translation/ruby_parser.rb#549 def visit_defined_node(node); end # if foo then bar else baz end # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#538 + # source://prism//lib/prism/translation/ruby_parser.rb#555 def visit_else_node(node); end # "foo #{bar}" # ^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#544 + # source://prism//lib/prism/translation/ruby_parser.rb#561 def visit_embedded_statements_node(node); end # "foo #@bar" # ^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#552 + # source://prism//lib/prism/translation/ruby_parser.rb#569 def visit_embedded_variable_node(node); end # begin; foo; ensure; bar; end # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#558 + # source://prism//lib/prism/translation/ruby_parser.rb#575 def visit_ensure_node(node); end # false # ^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#564 + # source://prism//lib/prism/translation/ruby_parser.rb#581 def visit_false_node(node); end # foo => [*, bar, *] # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#570 + # source://prism//lib/prism/translation/ruby_parser.rb#587 def visit_find_pattern_node(node); end # if foo .. bar; end # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#576 + # source://prism//lib/prism/translation/ruby_parser.rb#593 def visit_flip_flop_node(node); end # 1.0 # ^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#586 + # source://prism//lib/prism/translation/ruby_parser.rb#603 def visit_float_node(node); end # for foo in bar do end # ^^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#592 + # source://prism//lib/prism/translation/ruby_parser.rb#609 def visit_for_node(node); end # def foo(...); bar(...); end # ^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#598 + # source://prism//lib/prism/translation/ruby_parser.rb#615 def visit_forwarding_arguments_node(node); end # def foo(...); end # ^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#604 + # source://prism//lib/prism/translation/ruby_parser.rb#621 def visit_forwarding_parameter_node(node); end # super @@ -36277,37 +36290,37 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # super {} # ^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#613 + # source://prism//lib/prism/translation/ruby_parser.rb#630 def visit_forwarding_super_node(node); end # $foo &&= bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#640 + # source://prism//lib/prism/translation/ruby_parser.rb#657 def visit_global_variable_and_write_node(node); end # $foo += bar # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#634 + # source://prism//lib/prism/translation/ruby_parser.rb#651 def visit_global_variable_operator_write_node(node); end # $foo ||= bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#646 + # source://prism//lib/prism/translation/ruby_parser.rb#663 def visit_global_variable_or_write_node(node); end # $foo # ^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#619 + # source://prism//lib/prism/translation/ruby_parser.rb#636 def visit_global_variable_read_node(node); end # $foo, = bar # ^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#652 + # source://prism//lib/prism/translation/ruby_parser.rb#669 def visit_global_variable_target_node(node); end # $foo = 1 @@ -36316,19 +36329,19 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # $foo, $bar = 1 # ^^^^ ^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#628 + # source://prism//lib/prism/translation/ruby_parser.rb#645 def visit_global_variable_write_node(node); end # {} # ^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#658 + # source://prism//lib/prism/translation/ruby_parser.rb#675 def visit_hash_node(node); end # foo => {} # ^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#664 + # source://prism//lib/prism/translation/ruby_parser.rb#681 def visit_hash_pattern_node(node); end # if foo then bar end @@ -36340,80 +36353,80 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # foo ? bar : baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#685 + # source://prism//lib/prism/translation/ruby_parser.rb#702 def visit_if_node(node); end # 1i # - # source://prism//lib/prism/translation/ruby_parser.rb#690 + # source://prism//lib/prism/translation/ruby_parser.rb#707 def visit_imaginary_node(node); end # { foo: } # ^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#696 + # source://prism//lib/prism/translation/ruby_parser.rb#713 def visit_implicit_node(node); end # foo { |bar,| } # ^ # - # source://prism//lib/prism/translation/ruby_parser.rb#701 + # source://prism//lib/prism/translation/ruby_parser.rb#718 def visit_implicit_rest_node(node); end # case foo; in bar; end # ^^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#706 + # source://prism//lib/prism/translation/ruby_parser.rb#723 def visit_in_node(node); end # foo[bar] &&= baz # ^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#732 + # source://prism//lib/prism/translation/ruby_parser.rb#749 def visit_index_and_write_node(node); end # foo[bar] += baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#719 + # source://prism//lib/prism/translation/ruby_parser.rb#736 def visit_index_operator_write_node(node); end # foo[bar] ||= baz # ^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#745 + # source://prism//lib/prism/translation/ruby_parser.rb#762 def visit_index_or_write_node(node); end # foo[bar], = 1 # ^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#758 + # source://prism//lib/prism/translation/ruby_parser.rb#775 def visit_index_target_node(node); end # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#788 + # source://prism//lib/prism/translation/ruby_parser.rb#805 def visit_instance_variable_and_write_node(node); end # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#782 + # source://prism//lib/prism/translation/ruby_parser.rb#799 def visit_instance_variable_operator_write_node(node); end # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#794 + # source://prism//lib/prism/translation/ruby_parser.rb#811 def visit_instance_variable_or_write_node(node); end # ^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#767 + # source://prism//lib/prism/translation/ruby_parser.rb#784 def visit_instance_variable_read_node(node); end # @foo, = bar # ^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#800 + # source://prism//lib/prism/translation/ruby_parser.rb#817 def visit_instance_variable_target_node(node); end # ^^^^^^^^ @@ -36421,55 +36434,55 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # @foo, @bar = 1 # ^^^^ ^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#776 + # source://prism//lib/prism/translation/ruby_parser.rb#793 def visit_instance_variable_write_node(node); end # 1 # ^ # - # source://prism//lib/prism/translation/ruby_parser.rb#806 + # source://prism//lib/prism/translation/ruby_parser.rb#823 def visit_integer_node(node); end # if /foo #{bar}/ then end # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#812 + # source://prism//lib/prism/translation/ruby_parser.rb#829 def visit_interpolated_match_last_line_node(node); end # /foo #{bar}/ # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#829 + # source://prism//lib/prism/translation/ruby_parser.rb#846 def visit_interpolated_regular_expression_node(node); end # "foo #{bar}" # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#844 + # source://prism//lib/prism/translation/ruby_parser.rb#861 def visit_interpolated_string_node(node); end # :"foo #{bar}" # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#851 + # source://prism//lib/prism/translation/ruby_parser.rb#868 def visit_interpolated_symbol_node(node); end # `foo #{bar}` # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#858 + # source://prism//lib/prism/translation/ruby_parser.rb#875 def visit_interpolated_x_string_node(node); end # -> { it } # ^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#923 + # source://prism//lib/prism/translation/ruby_parser.rb#947 def visit_it_local_variable_read_node(node); end # foo(bar: baz) # ^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#929 + # source://prism//lib/prism/translation/ruby_parser.rb#953 def visit_keyword_hash_node(node); end # def foo(**bar); end @@ -36478,42 +36491,42 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # def foo(**); end # ^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#938 + # source://prism//lib/prism/translation/ruby_parser.rb#962 def visit_keyword_rest_parameter_node(node); end # -> {} # - # source://prism//lib/prism/translation/ruby_parser.rb#943 + # source://prism//lib/prism/translation/ruby_parser.rb#967 def visit_lambda_node(node); end # foo &&= bar # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#986 + # source://prism//lib/prism/translation/ruby_parser.rb#1010 def visit_local_variable_and_write_node(node); end # foo += bar # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#980 + # source://prism//lib/prism/translation/ruby_parser.rb#1004 def visit_local_variable_operator_write_node(node); end # foo ||= bar # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#992 + # source://prism//lib/prism/translation/ruby_parser.rb#1016 def visit_local_variable_or_write_node(node); end # foo # ^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#961 + # source://prism//lib/prism/translation/ruby_parser.rb#985 def visit_local_variable_read_node(node); end # foo, = bar # ^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#998 + # source://prism//lib/prism/translation/ruby_parser.rb#1022 def visit_local_variable_target_node(node); end # foo = 1 @@ -36522,56 +36535,56 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # foo, bar = 1 # ^^^ ^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#974 + # source://prism//lib/prism/translation/ruby_parser.rb#998 def visit_local_variable_write_node(node); end # if /foo/ then end # ^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1004 + # source://prism//lib/prism/translation/ruby_parser.rb#1028 def visit_match_last_line_node(node); end # foo in bar # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1010 + # source://prism//lib/prism/translation/ruby_parser.rb#1034 def visit_match_predicate_node(node); end # foo => bar # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1016 + # source://prism//lib/prism/translation/ruby_parser.rb#1040 def visit_match_required_node(node); end # /(?foo)/ =~ bar # ^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1022 + # source://prism//lib/prism/translation/ruby_parser.rb#1046 def visit_match_write_node(node); end # A node that is missing from the syntax tree. This is only used in the # case of a syntax error. The parser gem doesn't have such a concept, so # we invent our own here. # - # source://prism//lib/prism/translation/ruby_parser.rb#1029 + # source://prism//lib/prism/translation/ruby_parser.rb#1053 def visit_missing_node(node); end # module Foo; end # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1035 + # source://prism//lib/prism/translation/ruby_parser.rb#1059 def visit_module_node(node); end # foo, bar = baz # ^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1055 + # source://prism//lib/prism/translation/ruby_parser.rb#1079 def visit_multi_target_node(node); end # foo, bar = baz # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1065 + # source://prism//lib/prism/translation/ruby_parser.rb#1089 def visit_multi_write_node(node); end # next @@ -36580,55 +36593,55 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # next foo # ^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1089 + # source://prism//lib/prism/translation/ruby_parser.rb#1113 def visit_next_node(node); end # nil # ^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1102 + # source://prism//lib/prism/translation/ruby_parser.rb#1126 def visit_nil_node(node); end # def foo(**nil); end # ^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1108 + # source://prism//lib/prism/translation/ruby_parser.rb#1132 def visit_no_keywords_parameter_node(node); end # -> { _1 + _2 } # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1114 + # source://prism//lib/prism/translation/ruby_parser.rb#1138 def visit_numbered_parameters_node(node); end # $1 # ^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1120 + # source://prism//lib/prism/translation/ruby_parser.rb#1144 def visit_numbered_reference_read_node(node); end # def foo(bar: baz); end # ^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1126 + # source://prism//lib/prism/translation/ruby_parser.rb#1150 def visit_optional_keyword_parameter_node(node); end # def foo(bar = 1); end # ^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1132 + # source://prism//lib/prism/translation/ruby_parser.rb#1156 def visit_optional_parameter_node(node); end # a or b # ^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1138 + # source://prism//lib/prism/translation/ruby_parser.rb#1162 def visit_or_node(node); end # def foo(bar, *baz); end # ^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1144 + # source://prism//lib/prism/translation/ruby_parser.rb#1180 def visit_parameters_node(node); end # () @@ -36637,82 +36650,82 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # (1) # ^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1182 + # source://prism//lib/prism/translation/ruby_parser.rb#1218 def visit_parentheses_node(node); end # foo => ^(bar) # ^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1192 + # source://prism//lib/prism/translation/ruby_parser.rb#1228 def visit_pinned_expression_node(node); end # foo = 1 and bar => ^foo # ^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1198 + # source://prism//lib/prism/translation/ruby_parser.rb#1234 def visit_pinned_variable_node(node); end # END {} # - # source://prism//lib/prism/translation/ruby_parser.rb#1207 + # source://prism//lib/prism/translation/ruby_parser.rb#1243 def visit_post_execution_node(node); end # BEGIN {} # - # source://prism//lib/prism/translation/ruby_parser.rb#1212 + # source://prism//lib/prism/translation/ruby_parser.rb#1248 def visit_pre_execution_node(node); end # The top-level program node. # - # source://prism//lib/prism/translation/ruby_parser.rb#1217 + # source://prism//lib/prism/translation/ruby_parser.rb#1253 def visit_program_node(node); end # 0..5 # ^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1223 + # source://prism//lib/prism/translation/ruby_parser.rb#1259 def visit_range_node(node); end # 1r # ^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1245 + # source://prism//lib/prism/translation/ruby_parser.rb#1281 def visit_rational_node(node); end # redo # ^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1251 + # source://prism//lib/prism/translation/ruby_parser.rb#1287 def visit_redo_node(node); end # /foo/ # ^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1257 + # source://prism//lib/prism/translation/ruby_parser.rb#1293 def visit_regular_expression_node(node); end # def foo(bar:); end # ^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1263 + # source://prism//lib/prism/translation/ruby_parser.rb#1299 def visit_required_keyword_parameter_node(node); end # def foo(bar); end # ^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1269 + # source://prism//lib/prism/translation/ruby_parser.rb#1305 def visit_required_parameter_node(node); end # foo rescue bar # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1275 + # source://prism//lib/prism/translation/ruby_parser.rb#1311 def visit_rescue_modifier_node(node); end # begin; rescue; end # ^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1281 + # source://prism//lib/prism/translation/ruby_parser.rb#1317 def visit_rescue_node(node); end # def foo(*bar); end @@ -36721,13 +36734,13 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # def foo(*); end # ^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1301 + # source://prism//lib/prism/translation/ruby_parser.rb#1337 def visit_rest_parameter_node(node); end # retry # ^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1307 + # source://prism//lib/prism/translation/ruby_parser.rb#1343 def visit_retry_node(node); end # return @@ -36736,42 +36749,42 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # return 1 # ^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1316 + # source://prism//lib/prism/translation/ruby_parser.rb#1352 def visit_return_node(node); end # self # ^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1329 + # source://prism//lib/prism/translation/ruby_parser.rb#1365 def visit_self_node(node); end # A shareable constant. # - # source://prism//lib/prism/translation/ruby_parser.rb#1334 + # source://prism//lib/prism/translation/ruby_parser.rb#1370 def visit_shareable_constant_node(node); end # class << self; end # ^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1340 + # source://prism//lib/prism/translation/ruby_parser.rb#1376 def visit_singleton_class_node(node); end # __ENCODING__ # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1348 + # source://prism//lib/prism/translation/ruby_parser.rb#1384 def visit_source_encoding_node(node); end # __FILE__ # ^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1355 + # source://prism//lib/prism/translation/ruby_parser.rb#1391 def visit_source_file_node(node); end # __LINE__ # ^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1361 + # source://prism//lib/prism/translation/ruby_parser.rb#1397 def visit_source_line_node(node); end # foo(*bar) @@ -36783,42 +36796,42 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # def foo(*); bar(*); end # ^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1373 + # source://prism//lib/prism/translation/ruby_parser.rb#1409 def visit_splat_node(node); end # A list of statements. # - # source://prism//lib/prism/translation/ruby_parser.rb#1382 + # source://prism//lib/prism/translation/ruby_parser.rb#1418 def visit_statements_node(node); end # "foo" # ^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1394 + # source://prism//lib/prism/translation/ruby_parser.rb#1430 def visit_string_node(node); end # super(foo) # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1400 + # source://prism//lib/prism/translation/ruby_parser.rb#1442 def visit_super_node(node); end # :foo # ^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1414 + # source://prism//lib/prism/translation/ruby_parser.rb#1456 def visit_symbol_node(node); end # true # ^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1420 + # source://prism//lib/prism/translation/ruby_parser.rb#1462 def visit_true_node(node); end # undef foo # ^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1426 + # source://prism//lib/prism/translation/ruby_parser.rb#1468 def visit_undef_node(node); end # unless foo; bar end @@ -36827,7 +36840,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # bar unless foo # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1436 + # source://prism//lib/prism/translation/ruby_parser.rb#1478 def visit_unless_node(node); end # until foo; bar end @@ -36836,13 +36849,13 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # bar until foo # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1445 + # source://prism//lib/prism/translation/ruby_parser.rb#1487 def visit_until_node(node); end # case foo; when bar; end # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1451 + # source://prism//lib/prism/translation/ruby_parser.rb#1493 def visit_when_node(node); end # while foo; bar end @@ -36851,13 +36864,13 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # bar while foo # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1460 + # source://prism//lib/prism/translation/ruby_parser.rb#1502 def visit_while_node(node); end # `foo` # ^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1466 + # source://prism//lib/prism/translation/ruby_parser.rb#1508 def visit_x_string_node(node); end # yield @@ -36866,7 +36879,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # yield 1 # ^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1482 + # source://prism//lib/prism/translation/ruby_parser.rb#1524 def visit_yield_node(node); end private @@ -36874,12 +36887,12 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # If a class variable is written within a method definition, it has a # different type than everywhere else. # - # source://prism//lib/prism/translation/ruby_parser.rb#403 + # source://prism//lib/prism/translation/ruby_parser.rb#420 def class_variable_write_type; end # Create a new compiler with the given options. # - # source://prism//lib/prism/translation/ruby_parser.rb#1489 + # source://prism//lib/prism/translation/ruby_parser.rb#1531 def copy_compiler(in_def: T.unsafe(nil), in_pattern: T.unsafe(nil)); end # Call nodes with operators following them will either be op_asgn or @@ -36888,53 +36901,53 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # # @return [Boolean] # - # source://prism//lib/prism/translation/ruby_parser.rb#308 + # source://prism//lib/prism/translation/ruby_parser.rb#325 def op_asgn?(node); end # Call nodes with operators following them can use &. as an operator, # which changes their type by prefixing "safe_". # - # source://prism//lib/prism/translation/ruby_parser.rb#314 + # source://prism//lib/prism/translation/ruby_parser.rb#331 def op_asgn_type(node, type); end # Create a new Sexp object from the given prism node and arguments. # - # source://prism//lib/prism/translation/ruby_parser.rb#1494 + # source://prism//lib/prism/translation/ruby_parser.rb#1536 def s(node, *arguments); end # Visit a block node, which will modify the AST by wrapping the given # visited node in an iter node. # - # source://prism//lib/prism/translation/ruby_parser.rb#1504 + # source://prism//lib/prism/translation/ruby_parser.rb#1546 def visit_block(node, sexp, block); end # def foo((bar, baz)); end # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1159 + # source://prism//lib/prism/translation/ruby_parser.rb#1195 def visit_destructured_parameter(node); end # Visit the interpolated content of the string-like node. # - # source://prism//lib/prism/translation/ruby_parser.rb#865 + # source://prism//lib/prism/translation/ruby_parser.rb#882 def visit_interpolated_parts(parts); end # Pattern constants get wrapped in another layer of :const. # - # source://prism//lib/prism/translation/ruby_parser.rb#1525 + # source://prism//lib/prism/translation/ruby_parser.rb#1567 def visit_pattern_constant(node); end # If the bounds of a range node are empty parentheses, then they do not # get replaced by their usual s(:nil), but instead are s(:begin). # - # source://prism//lib/prism/translation/ruby_parser.rb#1235 + # source://prism//lib/prism/translation/ruby_parser.rb#1271 def visit_range_bounds_node(node); end # Visit the value of a write, which will be on the right-hand side of # a write operator. Because implicit arrays can have splats, those could # potentially be wrapped in an svalue node. # - # source://prism//lib/prism/translation/ruby_parser.rb#1539 + # source://prism//lib/prism/translation/ruby_parser.rb#1581 def visit_write_value(node); end end @@ -36943,62 +36956,62 @@ end # true # ^^^^ # -# source://prism//lib/prism/node.rb#18041 +# source://prism//lib/prism/node.rb#15741 class Prism::TrueNode < ::Prism::Node - # def initialize: (Location location) -> void + # Initialize a new TrueNode node. # # @return [TrueNode] a new instance of TrueNode # - # source://prism//lib/prism/node.rb#18043 - sig { params(source: Prism::Source, location: Prism::Location).void } - def initialize(source, location); end + # source://prism//lib/prism/node.rb#15743 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#18116 + # source://prism//lib/prism/node.rb#15800 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18049 + # source://prism//lib/prism/node.rb#15751 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18054 + # source://prism//lib/prism/node.rb#15756 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18064 + # source://prism//lib/prism/node.rb#15766 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18059 + # source://prism//lib/prism/node.rb#15761 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?location: Location) -> TrueNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> TrueNode # - # source://prism//lib/prism/node.rb#18069 - sig { params(location: Prism::Location).returns(Prism::TrueNode) } - def copy(location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#15771 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::TrueNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18054 + # source://prism//lib/prism/node.rb#15756 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#18077 + # source://prism//lib/prism/node.rb#15779 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -37007,38 +37020,20 @@ class Prism::TrueNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#18082 + # source://prism//lib/prism/node.rb#15784 sig { override.returns(String) } def inspect; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#18100 + # source://prism//lib/prism/node.rb#15789 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#18110 + # source://prism//lib/prism/node.rb#15794 def type; end end end @@ -37048,237 +37043,233 @@ end # undef :foo, :bar, :baz # ^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#18125 +# source://prism//lib/prism/node.rb#15809 class Prism::UndefNode < ::Prism::Node - # def initialize: (Array[SymbolNode | InterpolatedSymbolNode] names, Location keyword_loc, Location location) -> void + # Initialize a new UndefNode node. # # @return [UndefNode] a new instance of UndefNode # - # source://prism//lib/prism/node.rb#18127 + # source://prism//lib/prism/node.rb#15811 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, names: T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)], - keyword_loc: Prism::Location, - location: Prism::Location - ).void - end - def initialize(source, names, keyword_loc, location); end - - # Implements case-equality for the node. This is effectively == but without - # comparing the value of locations. Locations are checked only for presence. - # - # source://prism//lib/prism/node.rb#18217 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#18135 - sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#18140 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#18150 - sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#18145 - sig { override.returns(T::Array[Prism::Node]) } - def compact_child_nodes; end - - # def copy: (?names: Array[SymbolNode | InterpolatedSymbolNode], ?keyword_loc: Location, ?location: Location) -> UndefNode - # - # source://prism//lib/prism/node.rb#18155 - 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#18140 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { names: Array[SymbolNode | InterpolatedSymbolNode], keyword_loc: Location, location: Location } - # - # source://prism//lib/prism/node.rb#18163 - sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } - def deconstruct_keys(keys); end - - sig { override.returns(T::Array[Prism::Reflection::Field]) } - def fields; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#18183 - sig { override.returns(String) } - def inspect; end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#18178 - sig { returns(String) } - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#18171 - sig { returns(Prism::Location) } - def keyword_loc; end - - # attr_reader names: Array[SymbolNode | InterpolatedSymbolNode] - # - # source://prism//lib/prism/node.rb#18168 - sig { returns(T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)]) } - def names; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#18201 - 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#18211 - def type; end - end -end - -# Represents the use of the `unless` keyword, either in the block form or the modifier form. -# -# bar unless foo -# ^^^^^^^^^^^^^^ -# -# unless foo then bar end -# ^^^^^^^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#18232 -class Prism::UnlessNode < ::Prism::Node - # def initialize: (Location keyword_loc, Prism::node predicate, Location? then_keyword_loc, StatementsNode? statements, ElseNode? consequent, Location? end_keyword_loc, Location location) -> void - # - # @return [UnlessNode] a new instance of UnlessNode - # - # source://prism//lib/prism/node.rb#18234 - 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 + keyword_loc: Prism::Location ).void end - def initialize(source, keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, location); end + def initialize(source, node_id, location, flags, names, keyword_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#18399 + # source://prism//lib/prism/node.rb#15885 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18246 + # source://prism//lib/prism/node.rb#15821 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18251 + # source://prism//lib/prism/node.rb#15826 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18265 + # source://prism//lib/prism/node.rb#15836 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18256 + # source://prism//lib/prism/node.rb#15831 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # The else clause of the unless expression, if present. + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?names: Array[SymbolNode | InterpolatedSymbolNode], ?keyword_loc: Location) -> UndefNode # - # unless cond then bar else baz end - # ^^^^^^^^ + # source://prism//lib/prism/node.rb#15841 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + names: T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)], + keyword_loc: Prism::Location + ).returns(Prism::UndefNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), names: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18331 - sig { returns(T.nilable(Prism::ElseNode)) } + # source://prism//lib/prism/node.rb#15826 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, names: Array[SymbolNode | InterpolatedSymbolNode], keyword_loc: Location } + # + # source://prism//lib/prism/node.rb#15849 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#15869 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#15864 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#15857 + sig { returns(Prism::Location) } + def keyword_loc; end + + # attr_reader names: Array[SymbolNode | InterpolatedSymbolNode] + # + # source://prism//lib/prism/node.rb#15854 + sig { returns(T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)]) } + def names; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#15874 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#15879 + def type; end + end +end + +# Represents the use of the `unless` keyword, either in the block form or the modifier form. +# +# bar unless foo +# ^^^^^^^^^^^^^^ +# +# unless foo then bar end +# ^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#15900 +class Prism::UnlessNode < ::Prism::Node + # Initialize a new UnlessNode node. + # + # @return [UnlessNode] a new instance of UnlessNode + # + # source://prism//lib/prism/node.rb#15902 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + else_clause: T.nilable(Prism::ElseNode), + end_keyword_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, keyword_loc, predicate, then_keyword_loc, statements, else_clause, end_keyword_loc); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#16051 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15916 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15921 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15935 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15926 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # Returns the else clause of the unless node. This method is deprecated in + # favor of #else_clause. + # + # source://prism//lib/prism/node_ext.rb#503 def consequent; end - # def copy: (?keyword_loc: Location, ?predicate: Prism::node, ?then_keyword_loc: Location?, ?statements: StatementsNode?, ?consequent: ElseNode?, ?end_keyword_loc: Location?, ?location: Location) -> UnlessNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?predicate: Prism::node, ?then_keyword_loc: Location?, ?statements: StatementsNode?, ?else_clause: ElseNode?, ?end_keyword_loc: Location?) -> UnlessNode # - # source://prism//lib/prism/node.rb#18270 + # source://prism//lib/prism/node.rb#15940 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, keyword_loc: Prism::Location, predicate: Prism::Node, then_keyword_loc: T.nilable(Prism::Location), statements: T.nilable(Prism::StatementsNode), - consequent: T.nilable(Prism::ElseNode), - end_keyword_loc: T.nilable(Prism::Location), - location: Prism::Location + else_clause: T.nilable(Prism::ElseNode), + end_keyword_loc: T.nilable(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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), predicate: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), else_clause: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18251 + # source://prism//lib/prism/node.rb#15921 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, predicate: Prism::node, then_keyword_loc: Location?, statements: StatementsNode?, consequent: ElseNode?, end_keyword_loc: Location?, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, predicate: Prism::node, then_keyword_loc: Location?, statements: StatementsNode?, else_clause: ElseNode?, end_keyword_loc: Location? } # - # source://prism//lib/prism/node.rb#18278 + # source://prism//lib/prism/node.rb#15948 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # The else clause of the unless expression, if present. + # + # unless cond then bar else baz end + # ^^^^^^^^ + # + # source://prism//lib/prism/node.rb#16001 + sig { returns(T.nilable(Prism::ElseNode)) } + def else_clause; end + # def end_keyword: () -> String? # - # source://prism//lib/prism/node.rb#18360 + # source://prism//lib/prism/node.rb#16030 sig { returns(T.nilable(String)) } def end_keyword; end @@ -37287,7 +37278,7 @@ class Prism::UnlessNode < ::Prism::Node # unless cond then bar end # ^^^ # - # source://prism//lib/prism/node.rb#18337 + # source://prism//lib/prism/node.rb#16007 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end @@ -37296,13 +37287,13 @@ class Prism::UnlessNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#18365 + # source://prism//lib/prism/node.rb#16035 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#18350 + # source://prism//lib/prism/node.rb#16020 sig { returns(String) } def keyword; end @@ -37314,12 +37305,12 @@ class Prism::UnlessNode < ::Prism::Node # bar unless cond # ^^^^^^ # - # source://prism//lib/prism/node.rb#18289 + # source://prism//lib/prism/node.rb#15959 sig { returns(Prism::Location) } def keyword_loc; end # source://prism//lib/prism/parse_result/newlines.rb#97 - def newline!(lines); end + def newline_flag!(lines); end # The condition to be evaluated for the unless expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). # @@ -37329,7 +37320,7 @@ class Prism::UnlessNode < ::Prism::Node # bar unless cond # ^^^^ # - # source://prism//lib/prism/node.rb#18302 + # source://prism//lib/prism/node.rb#15972 sig { returns(Prism::Node) } def predicate; end @@ -37339,13 +37330,13 @@ class Prism::UnlessNode < ::Prism::Node # unless cond then bar end # ^^^ # - # source://prism//lib/prism/node.rb#18325 + # source://prism//lib/prism/node.rb#15995 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # def then_keyword: () -> String? # - # source://prism//lib/prism/node.rb#18355 + # source://prism//lib/prism/node.rb#16025 sig { returns(T.nilable(String)) } def then_keyword; end @@ -37354,38 +37345,20 @@ class Prism::UnlessNode < ::Prism::Node # unless cond then bar end # ^^^^ # - # source://prism//lib/prism/node.rb#18308 + # source://prism//lib/prism/node.rb#15978 sig { returns(T.nilable(Prism::Location)) } def then_keyword_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#18383 + # source://prism//lib/prism/node.rb#16040 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#18393 + # source://prism//lib/prism/node.rb#16045 def type; end end end @@ -37398,35 +37371,36 @@ end # until foo do bar end # ^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#18417 +# source://prism//lib/prism/node.rb#16069 class Prism::UntilNode < ::Prism::Node - # def initialize: (Integer flags, Location keyword_loc, Location? closing_loc, Prism::node predicate, StatementsNode? statements, Location location) -> void + # Initialize a new UntilNode node. # # @return [UntilNode] a new instance of UntilNode # - # source://prism//lib/prism/node.rb#18419 + # source://prism//lib/prism/node.rb#16071 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, keyword_loc: Prism::Location, closing_loc: T.nilable(Prism::Location), predicate: Prism::Node, - statements: T.nilable(Prism::StatementsNode), - location: Prism::Location + statements: T.nilable(Prism::StatementsNode) ).void end - def initialize(source, flags, keyword_loc, closing_loc, predicate, statements, location); end + def initialize(source, node_id, location, flags, keyword_loc, closing_loc, predicate, statements); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#18545 + # source://prism//lib/prism/node.rb#16176 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18430 + # source://prism//lib/prism/node.rb#16083 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -37434,65 +37408,66 @@ class Prism::UntilNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#18496 + # source://prism//lib/prism/node.rb#16119 sig { returns(T::Boolean) } def begin_modifier?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18435 + # source://prism//lib/prism/node.rb#16088 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#18506 + # source://prism//lib/prism/node.rb#16155 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#18477 + # source://prism//lib/prism/node.rb#16131 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18448 + # source://prism//lib/prism/node.rb#16101 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18440 + # source://prism//lib/prism/node.rb#16093 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?closing_loc: Location?, ?predicate: Prism::node, ?statements: StatementsNode?) -> UntilNode # - # source://prism//lib/prism/node.rb#18453 + # source://prism//lib/prism/node.rb#16106 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, keyword_loc: Prism::Location, closing_loc: T.nilable(Prism::Location), predicate: Prism::Node, - statements: T.nilable(Prism::StatementsNode), - location: Prism::Location + statements: T.nilable(Prism::StatementsNode) ).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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), predicate: T.unsafe(nil), statements: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18435 + # source://prism//lib/prism/node.rb#16088 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, keyword_loc: Location, closing_loc: Location?, predicate: Prism::node, statements: StatementsNode?, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, closing_loc: Location?, predicate: Prism::node, statements: StatementsNode? } # - # source://prism//lib/prism/node.rb#18461 + # source://prism//lib/prism/node.rb#16114 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -37501,73 +37476,47 @@ class Prism::UntilNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#18511 + # source://prism//lib/prism/node.rb#16160 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#18501 + # source://prism//lib/prism/node.rb#16150 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#18470 + # source://prism//lib/prism/node.rb#16124 sig { returns(Prism::Location) } def keyword_loc; end # source://prism//lib/prism/parse_result/newlines.rb#103 - def newline!(lines); end + def newline_flag!(lines); end # attr_reader predicate: Prism::node # - # source://prism//lib/prism/node.rb#18490 + # source://prism//lib/prism/node.rb#16144 sig { returns(Prism::Node) } def predicate; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#18493 + # source://prism//lib/prism/node.rb#16147 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#18529 + # source://prism//lib/prism/node.rb#16165 sig { override.returns(Symbol) } def type; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#18466 - 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#18539 + # source://prism//lib/prism/node.rb#16170 def type; end end end @@ -38510,85 +38459,89 @@ end # ^^^^^^^^^ # end # -# source://prism//lib/prism/node.rb#18561 +# source://prism//lib/prism/node.rb#16192 class Prism::WhenNode < ::Prism::Node - # def initialize: (Location keyword_loc, Array[Prism::node] conditions, Location? then_keyword_loc, StatementsNode? statements, Location location) -> void + # Initialize a new WhenNode node. # # @return [WhenNode] a new instance of WhenNode # - # source://prism//lib/prism/node.rb#18563 + # source://prism//lib/prism/node.rb#16194 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, keyword_loc: Prism::Location, conditions: T::Array[Prism::Node], then_keyword_loc: T.nilable(Prism::Location), - statements: T.nilable(Prism::StatementsNode), - location: Prism::Location + statements: T.nilable(Prism::StatementsNode) ).void end - def initialize(source, keyword_loc, conditions, then_keyword_loc, statements, location); end + def initialize(source, node_id, location, flags, keyword_loc, conditions, then_keyword_loc, statements); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#18679 + # source://prism//lib/prism/node.rb#16294 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18573 + # source://prism//lib/prism/node.rb#16206 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18578 + # source://prism//lib/prism/node.rb#16211 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18591 + # source://prism//lib/prism/node.rb#16224 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18583 + # source://prism//lib/prism/node.rb#16216 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader conditions: Array[Prism::node] # - # source://prism//lib/prism/node.rb#18616 + # source://prism//lib/prism/node.rb#16249 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?conditions: Array[Prism::node], ?then_keyword_loc: Location?, ?statements: StatementsNode?) -> WhenNode # - # source://prism//lib/prism/node.rb#18596 + # source://prism//lib/prism/node.rb#16229 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, keyword_loc: Prism::Location, conditions: T::Array[Prism::Node], then_keyword_loc: T.nilable(Prism::Location), - statements: T.nilable(Prism::StatementsNode), - location: Prism::Location + statements: T.nilable(Prism::StatementsNode) ).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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), conditions: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18578 + # source://prism//lib/prism/node.rb#16211 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, conditions: Array[Prism::node], then_keyword_loc: Location?, statements: StatementsNode?, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, conditions: Array[Prism::node], then_keyword_loc: Location?, statements: StatementsNode? } # - # source://prism//lib/prism/node.rb#18604 + # source://prism//lib/prism/node.rb#16237 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -38597,68 +38550,50 @@ class Prism::WhenNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#18645 + # source://prism//lib/prism/node.rb#16278 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#18635 + # source://prism//lib/prism/node.rb#16268 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#18609 + # source://prism//lib/prism/node.rb#16242 sig { returns(Prism::Location) } def keyword_loc; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#18632 + # source://prism//lib/prism/node.rb#16265 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # def then_keyword: () -> String? # - # source://prism//lib/prism/node.rb#18640 + # source://prism//lib/prism/node.rb#16273 sig { returns(T.nilable(String)) } def then_keyword; end # attr_reader then_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#18619 + # source://prism//lib/prism/node.rb#16252 sig { returns(T.nilable(Prism::Location)) } def then_keyword_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#18663 + # source://prism//lib/prism/node.rb#16283 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#18673 + # source://prism//lib/prism/node.rb#16288 def type; end end end @@ -38671,35 +38606,36 @@ end # while foo do bar end # ^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#18696 +# source://prism//lib/prism/node.rb#16311 class Prism::WhileNode < ::Prism::Node - # def initialize: (Integer flags, Location keyword_loc, Location? closing_loc, Prism::node predicate, StatementsNode? statements, Location location) -> void + # Initialize a new WhileNode node. # # @return [WhileNode] a new instance of WhileNode # - # source://prism//lib/prism/node.rb#18698 + # source://prism//lib/prism/node.rb#16313 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, keyword_loc: Prism::Location, closing_loc: T.nilable(Prism::Location), predicate: Prism::Node, - statements: T.nilable(Prism::StatementsNode), - location: Prism::Location + statements: T.nilable(Prism::StatementsNode) ).void end - def initialize(source, flags, keyword_loc, closing_loc, predicate, statements, location); end + def initialize(source, node_id, location, flags, keyword_loc, closing_loc, predicate, statements); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#18824 + # source://prism//lib/prism/node.rb#16418 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18709 + # source://prism//lib/prism/node.rb#16325 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -38707,65 +38643,66 @@ class Prism::WhileNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#18775 + # source://prism//lib/prism/node.rb#16361 sig { returns(T::Boolean) } def begin_modifier?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18714 + # source://prism//lib/prism/node.rb#16330 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#18785 + # source://prism//lib/prism/node.rb#16397 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#18756 + # source://prism//lib/prism/node.rb#16373 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18727 + # source://prism//lib/prism/node.rb#16343 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18719 + # source://prism//lib/prism/node.rb#16335 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?closing_loc: Location?, ?predicate: Prism::node, ?statements: StatementsNode?) -> WhileNode # - # source://prism//lib/prism/node.rb#18732 + # source://prism//lib/prism/node.rb#16348 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, keyword_loc: Prism::Location, closing_loc: T.nilable(Prism::Location), predicate: Prism::Node, - statements: T.nilable(Prism::StatementsNode), - location: Prism::Location + statements: T.nilable(Prism::StatementsNode) ).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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), predicate: T.unsafe(nil), statements: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18714 + # source://prism//lib/prism/node.rb#16330 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, keyword_loc: Location, closing_loc: Location?, predicate: Prism::node, statements: StatementsNode?, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, closing_loc: Location?, predicate: Prism::node, statements: StatementsNode? } # - # source://prism//lib/prism/node.rb#18740 + # source://prism//lib/prism/node.rb#16356 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -38774,73 +38711,47 @@ class Prism::WhileNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#18790 + # source://prism//lib/prism/node.rb#16402 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#18780 + # source://prism//lib/prism/node.rb#16392 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#18749 + # source://prism//lib/prism/node.rb#16366 sig { returns(Prism::Location) } def keyword_loc; end # source://prism//lib/prism/parse_result/newlines.rb#109 - def newline!(lines); end + def newline_flag!(lines); end # attr_reader predicate: Prism::node # - # source://prism//lib/prism/node.rb#18769 + # source://prism//lib/prism/node.rb#16386 sig { returns(Prism::Node) } def predicate; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#18772 + # source://prism//lib/prism/node.rb#16389 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#18808 + # source://prism//lib/prism/node.rb#16407 sig { override.returns(Symbol) } def type; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#18745 - 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#18818 + # source://prism//lib/prism/node.rb#16412 def type; end end end @@ -38850,107 +38761,109 @@ end # `foo` # ^^^^^ # -# source://prism//lib/prism/node.rb#18838 +# source://prism//lib/prism/node.rb#16432 class Prism::XStringNode < ::Prism::Node include ::Prism::HeredocQuery - # def initialize: (Integer flags, Location opening_loc, Location content_loc, Location closing_loc, String unescaped, Location location) -> void + # Initialize a new XStringNode node. # # @return [XStringNode] a new instance of XStringNode # - # source://prism//lib/prism/node.rb#18840 + # source://prism//lib/prism/node.rb#16434 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, opening_loc: Prism::Location, content_loc: Prism::Location, closing_loc: Prism::Location, - unescaped: String, - location: Prism::Location + unescaped: String ).void end - def initialize(source, flags, opening_loc, content_loc, closing_loc, unescaped, location); end + def initialize(source, node_id, location, flags, opening_loc, content_loc, closing_loc, unescaped); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#18971 + # source://prism//lib/prism/node.rb#16544 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18851 + # source://prism//lib/prism/node.rb#16446 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18856 + # source://prism//lib/prism/node.rb#16451 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#18932 + # source://prism//lib/prism/node.rb#16523 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#18902 + # source://prism//lib/prism/node.rb#16503 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18866 + # source://prism//lib/prism/node.rb#16461 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism//lib/prism/node.rb#18861 + # source://prism//lib/prism/node.rb#16456 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def content: () -> String # - # source://prism//lib/prism/node.rb#18927 + # source://prism//lib/prism/node.rb#16518 sig { returns(String) } def content; end # attr_reader content_loc: Location # - # source://prism//lib/prism/node.rb#18895 + # source://prism//lib/prism/node.rb#16496 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String) -> XStringNode # - # source://prism//lib/prism/node.rb#18871 + # source://prism//lib/prism/node.rb#16466 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, opening_loc: Prism::Location, content_loc: Prism::Location, closing_loc: Prism::Location, - unescaped: String, - location: Prism::Location + unescaped: String ).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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18856 + # source://prism//lib/prism/node.rb#16451 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String } # - # source://prism//lib/prism/node.rb#18879 + # source://prism//lib/prism/node.rb#16474 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -38961,7 +38874,7 @@ class Prism::XStringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#18917 + # source://prism//lib/prism/node.rb#16484 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -38969,7 +38882,7 @@ class Prism::XStringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#18912 + # source://prism//lib/prism/node.rb#16479 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -38978,71 +38891,45 @@ class Prism::XStringNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#18937 + # source://prism//lib/prism/node.rb#16528 sig { override.returns(String) } def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#18922 + # source://prism//lib/prism/node.rb#16513 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#18888 + # source://prism//lib/prism/node.rb#16489 sig { returns(Prism::Location) } def opening_loc; end # Occasionally it's helpful to treat a string as if it were interpolated so # that there's a consistent interface for working with strings. # - # source://prism//lib/prism/node_ext.rb#86 + # source://prism//lib/prism/node_ext.rb#90 sig { returns(Prism::InterpolatedXStringNode) } def to_interpolated; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # 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#18955 + # source://prism//lib/prism/node.rb#16533 sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#18909 + # source://prism//lib/prism/node.rb#16510 sig { returns(String) } def unescaped; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#18884 - 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#18965 + # source://prism//lib/prism/node.rb#16538 def type; end end end @@ -39052,85 +38939,89 @@ end # yield 1 # ^^^^^^^ # -# source://prism//lib/prism/node.rb#18985 +# source://prism//lib/prism/node.rb#16558 class Prism::YieldNode < ::Prism::Node - # def initialize: (Location keyword_loc, Location? lparen_loc, ArgumentsNode? arguments, Location? rparen_loc, Location location) -> void + # Initialize a new YieldNode node. # # @return [YieldNode] a new instance of YieldNode # - # source://prism//lib/prism/node.rb#18987 + # source://prism//lib/prism/node.rb#16560 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, keyword_loc: Prism::Location, lparen_loc: T.nilable(Prism::Location), arguments: T.nilable(Prism::ArgumentsNode), - rparen_loc: T.nilable(Prism::Location), - location: Prism::Location + rparen_loc: T.nilable(Prism::Location) ).void end - def initialize(source, keyword_loc, lparen_loc, arguments, rparen_loc, location); end + def initialize(source, node_id, location, flags, keyword_loc, lparen_loc, arguments, rparen_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism//lib/prism/node.rb#19117 + # source://prism//lib/prism/node.rb#16674 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18997 + # source://prism//lib/prism/node.rb#16572 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#19052 + # source://prism//lib/prism/node.rb#16627 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#19002 + # source://prism//lib/prism/node.rb#16577 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#19014 + # 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#19007 + # source://prism//lib/prism/node.rb#16582 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 + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?lparen_loc: Location?, ?arguments: ArgumentsNode?, ?rparen_loc: Location?) -> YieldNode # - # source://prism//lib/prism/node.rb#19019 + # source://prism//lib/prism/node.rb#16594 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, keyword_loc: Prism::Location, lparen_loc: T.nilable(Prism::Location), arguments: T.nilable(Prism::ArgumentsNode), - rparen_loc: T.nilable(Prism::Location), - location: Prism::Location + rparen_loc: T.nilable(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 copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), arguments: T.unsafe(nil), rparen_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#19002 + # source://prism//lib/prism/node.rb#16577 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location? } # - # source://prism//lib/prism/node.rb#19027 + # 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 @@ -39139,74 +39030,56 @@ class Prism::YieldNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#19083 + # source://prism//lib/prism/node.rb#16658 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#19068 + # source://prism//lib/prism/node.rb#16643 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#19032 + # source://prism//lib/prism/node.rb#16607 sig { returns(Prism::Location) } def keyword_loc; end # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#19073 + # source://prism//lib/prism/node.rb#16648 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#19039 + # source://prism//lib/prism/node.rb#16614 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#19078 + # source://prism//lib/prism/node.rb#16653 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#19055 + # source://prism//lib/prism/node.rb#16630 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#19101 + # source://prism//lib/prism/node.rb#16663 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 + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#19111 + # source://prism//lib/prism/node.rb#16668 def type; end end end diff --git a/sorbet/rbi/gems/rack@3.1.7.rbi b/sorbet/rbi/gems/rack@3.1.8.rbi similarity index 97% rename from sorbet/rbi/gems/rack@3.1.7.rbi rename to sorbet/rbi/gems/rack@3.1.8.rbi index 3bcc588..24f1744 100644 --- a/sorbet/rbi/gems/rack@3.1.7.rbi +++ b/sorbet/rbi/gems/rack@3.1.8.rbi @@ -4363,31 +4363,31 @@ module Rack::Utils # matches (same specificity and quality), the value returned # is arbitrary. # - # source://rack//lib/rack/utils.rb#166 + # source://rack//lib/rack/utils.rb#167 def best_q_match(q_value_header, available_mimes); end - # source://rack//lib/rack/utils.rb#119 + # source://rack//lib/rack/utils.rb#120 def build_nested_query(value, prefix = T.unsafe(nil)); end - # source://rack//lib/rack/utils.rb#109 + # source://rack//lib/rack/utils.rb#110 def build_query(params); end # Parses the "Range:" header, if present, into an array of Range objects. # Returns nil if the header is missing or syntactically invalid. # Returns an empty array if none of the ranges are satisfiable. # - # source://rack//lib/rack/utils.rb#408 + # source://rack//lib/rack/utils.rb#409 def byte_ranges(env, size); end - # source://rack//lib/rack/utils.rb#608 + # source://rack//lib/rack/utils.rb#609 def clean_path_info(path_info); end # :nocov: # - # source://rack//lib/rack/utils.rb#90 + # source://rack//lib/rack/utils.rb#91 def clock_time; end - # source://rack//lib/rack/utils.rb#366 + # source://rack//lib/rack/utils.rb#367 def delete_cookie_header!(headers, key, value = T.unsafe(nil)); end # :call-seq: @@ -4404,7 +4404,7 @@ module Rack::Utils # delete_set_cookie_header("myname") # # => "myname=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT" # - # source://rack//lib/rack/utils.rb#362 + # source://rack//lib/rack/utils.rb#363 def delete_set_cookie_header(key, value = T.unsafe(nil)); end # :call-seq: @@ -4425,15 +4425,15 @@ module Rack::Utils # header # # => ["mycookie=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT"] # - # source://rack//lib/rack/utils.rb#390 + # source://rack//lib/rack/utils.rb#391 def delete_set_cookie_header!(header, key, value = T.unsafe(nil)); end # URI escapes. (CGI style space to +) # - # source://rack//lib/rack/utils.rb#39 + # source://rack//lib/rack/utils.rb#40 def escape(s); end - # source://rack//lib/rack/utils.rb#261 + # source://rack//lib/rack/utils.rb#262 def escape_cookie_key(key); end # Escape ampersands, brackets and quotes to their HTML/XML entities. @@ -4442,13 +4442,13 @@ module Rack::Utils # Like URI escaping, but with %20 instead of +. Strictly speaking this is # true URI escaping. # - # source://rack//lib/rack/utils.rb#45 + # source://rack//lib/rack/utils.rb#46 def escape_path(s); end - # source://rack//lib/rack/utils.rb#148 + # source://rack//lib/rack/utils.rb#149 def forwarded_values(forwarded_header); end - # source://rack//lib/rack/utils.rb#412 + # source://rack//lib/rack/utils.rb#413 def get_byte_ranges(http_range, size); end # :call-seq: @@ -4460,7 +4460,7 @@ module Rack::Utils # parse_cookies({'HTTP_COOKIE' => 'myname=myvalue'}) # # => {'myname' => 'myvalue'} # - # source://rack//lib/rack/utils.rb#252 + # source://rack//lib/rack/utils.rb#253 def parse_cookies(env); end # :call-seq: @@ -4473,27 +4473,27 @@ module Rack::Utils # parse_cookies_header('myname=myvalue; max-age=0') # # => {"myname"=>"myvalue", "max-age"=>"0"} # - # source://rack//lib/rack/utils.rb#233 + # source://rack//lib/rack/utils.rb#234 def parse_cookies_header(value); end - # source://rack//lib/rack/utils.rb#105 + # source://rack//lib/rack/utils.rb#106 def parse_nested_query(qs, d = T.unsafe(nil)); end - # source://rack//lib/rack/utils.rb#101 + # source://rack//lib/rack/utils.rb#102 def parse_query(qs, d = T.unsafe(nil), &unescaper); end - # source://rack//lib/rack/utils.rb#137 + # source://rack//lib/rack/utils.rb#138 def q_values(q_value_header); end - # source://rack//lib/rack/utils.rb#401 + # source://rack//lib/rack/utils.rb#402 def rfc2822(time); end # :nocov: # - # source://rack//lib/rack/utils.rb#454 + # source://rack//lib/rack/utils.rb#455 def secure_compare(a, b); end - # source://rack//lib/rack/utils.rb#191 + # source://rack//lib/rack/utils.rb#192 def select_best_encoding(available_encodings, accept_encoding); end # :call-seq: @@ -4519,7 +4519,7 @@ module Rack::Utils # set_cookie_header("myname", {value: "myvalue", max_age: 10}) # # => "myname=myvalue; max-age=10" # - # source://rack//lib/rack/utils.rb#293 + # source://rack//lib/rack/utils.rb#294 def set_cookie_header(key, value); end # :call-seq: @@ -4531,25 +4531,25 @@ module Rack::Utils # If the headers already contains a +set-cookie+ key, it will be converted # to an +Array+ if not already, and appended to. # - # source://rack//lib/rack/utils.rb#336 + # source://rack//lib/rack/utils.rb#337 def set_cookie_header!(headers, key, value); end - # source://rack//lib/rack/utils.rb#588 + # source://rack//lib/rack/utils.rb#589 def status_code(status); end # Unescapes a URI escaped string with +encoding+. +encoding+ will be the # target encoding of the string returned, and it defaults to UTF-8 # - # source://rack//lib/rack/utils.rb#57 + # source://rack//lib/rack/utils.rb#58 def unescape(s, encoding = T.unsafe(nil)); end # Unescapes the **path** component of a URI. See Rack::Utils.unescape for # unescaping query parameters or form components. # - # source://rack//lib/rack/utils.rb#51 + # source://rack//lib/rack/utils.rb#52 def unescape_path(s); end - # source://rack//lib/rack/utils.rb#625 + # source://rack//lib/rack/utils.rb#626 def valid_path?(path); end class << self @@ -4558,41 +4558,41 @@ module Rack::Utils # matches (same specificity and quality), the value returned # is arbitrary. # - # source://rack//lib/rack/utils.rb#166 + # source://rack//lib/rack/utils.rb#167 def best_q_match(q_value_header, available_mimes); end - # source://rack//lib/rack/utils.rb#119 + # source://rack//lib/rack/utils.rb#120 def build_nested_query(value, prefix = T.unsafe(nil)); end - # source://rack//lib/rack/utils.rb#109 + # source://rack//lib/rack/utils.rb#110 def build_query(params); end # Parses the "Range:" header, if present, into an array of Range objects. # Returns nil if the header is missing or syntactically invalid. # Returns an empty array if none of the ranges are satisfiable. # - # source://rack//lib/rack/utils.rb#408 + # source://rack//lib/rack/utils.rb#409 def byte_ranges(env, size); end - # source://rack//lib/rack/utils.rb#608 + # source://rack//lib/rack/utils.rb#609 def clean_path_info(path_info); end - # source://rack//lib/rack/utils.rb#90 + # source://rack//lib/rack/utils.rb#91 def clock_time; end # Returns the value of attribute default_query_parser. # - # source://rack//lib/rack/utils.rb#29 + # source://rack//lib/rack/utils.rb#30 def default_query_parser; end # Sets the attribute default_query_parser # # @param value the value to set the attribute default_query_parser to. # - # source://rack//lib/rack/utils.rb#29 + # source://rack//lib/rack/utils.rb#30 def default_query_parser=(_arg0); end - # source://rack//lib/rack/utils.rb#366 + # source://rack//lib/rack/utils.rb#367 def delete_cookie_header!(headers, key, value = T.unsafe(nil)); end # :call-seq: @@ -4609,7 +4609,7 @@ module Rack::Utils # delete_set_cookie_header("myname") # # => "myname=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT" # - # source://rack//lib/rack/utils.rb#362 + # source://rack//lib/rack/utils.rb#363 def delete_set_cookie_header(key, value = T.unsafe(nil)); end # :call-seq: @@ -4630,15 +4630,15 @@ module Rack::Utils # header # # => ["mycookie=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT"] # - # source://rack//lib/rack/utils.rb#390 + # source://rack//lib/rack/utils.rb#391 def delete_set_cookie_header!(header, key, value = T.unsafe(nil)); end # URI escapes. (CGI style space to +) # - # source://rack//lib/rack/utils.rb#39 + # source://rack//lib/rack/utils.rb#40 def escape(s); end - # source://rack//lib/rack/utils.rb#261 + # source://rack//lib/rack/utils.rb#262 def escape_cookie_key(key); end def escape_html(_arg0); end @@ -4646,57 +4646,57 @@ module Rack::Utils # Like URI escaping, but with %20 instead of +. Strictly speaking this is # true URI escaping. # - # source://rack//lib/rack/utils.rb#45 + # source://rack//lib/rack/utils.rb#46 def escape_path(s); end - # source://rack//lib/rack/utils.rb#148 + # source://rack//lib/rack/utils.rb#149 def forwarded_values(forwarded_header); end - # source://rack//lib/rack/utils.rb#412 + # source://rack//lib/rack/utils.rb#413 def get_byte_ranges(http_range, size); end # Returns the value of attribute multipart_file_limit. # - # source://rack//lib/rack/utils.rb#64 + # source://rack//lib/rack/utils.rb#65 def multipart_file_limit; end # Sets the attribute multipart_file_limit # # @param value the value to set the attribute multipart_file_limit to. # - # source://rack//lib/rack/utils.rb#64 + # source://rack//lib/rack/utils.rb#65 def multipart_file_limit=(_arg0); end # Returns the value of attribute multipart_file_limit. # multipart_part_limit is the original name of multipart_file_limit, but # the limit only counts parts with filenames. # - # source://rack//lib/rack/utils.rb#64 + # source://rack//lib/rack/utils.rb#65 def multipart_part_limit; end # Sets the attribute multipart_file_limit # # @param value the value to set the attribute multipart_file_limit to. # - # source://rack//lib/rack/utils.rb#64 + # source://rack//lib/rack/utils.rb#65 def multipart_part_limit=(_arg0); end # Returns the value of attribute multipart_total_part_limit. # - # source://rack//lib/rack/utils.rb#62 + # source://rack//lib/rack/utils.rb#63 def multipart_total_part_limit; end # Sets the attribute multipart_total_part_limit # # @param value the value to set the attribute multipart_total_part_limit to. # - # source://rack//lib/rack/utils.rb#62 + # source://rack//lib/rack/utils.rb#63 def multipart_total_part_limit=(_arg0); end - # source://rack//lib/rack/utils.rb#81 + # source://rack//lib/rack/utils.rb#82 def param_depth_limit; end - # source://rack//lib/rack/utils.rb#85 + # source://rack//lib/rack/utils.rb#86 def param_depth_limit=(v); end # :call-seq: @@ -4708,7 +4708,7 @@ module Rack::Utils # parse_cookies({'HTTP_COOKIE' => 'myname=myvalue'}) # # => {'myname' => 'myvalue'} # - # source://rack//lib/rack/utils.rb#252 + # source://rack//lib/rack/utils.rb#253 def parse_cookies(env); end # :call-seq: @@ -4721,25 +4721,25 @@ module Rack::Utils # parse_cookies_header('myname=myvalue; max-age=0') # # => {"myname"=>"myvalue", "max-age"=>"0"} # - # source://rack//lib/rack/utils.rb#233 + # source://rack//lib/rack/utils.rb#234 def parse_cookies_header(value); end - # source://rack//lib/rack/utils.rb#105 + # source://rack//lib/rack/utils.rb#106 def parse_nested_query(qs, d = T.unsafe(nil)); end - # source://rack//lib/rack/utils.rb#101 + # source://rack//lib/rack/utils.rb#102 def parse_query(qs, d = T.unsafe(nil), &unescaper); end - # source://rack//lib/rack/utils.rb#137 + # source://rack//lib/rack/utils.rb#138 def q_values(q_value_header); end - # source://rack//lib/rack/utils.rb#401 + # source://rack//lib/rack/utils.rb#402 def rfc2822(time); end - # source://rack//lib/rack/utils.rb#454 + # source://rack//lib/rack/utils.rb#455 def secure_compare(a, b); end - # source://rack//lib/rack/utils.rb#191 + # source://rack//lib/rack/utils.rb#192 def select_best_encoding(available_encodings, accept_encoding); end # :call-seq: @@ -4765,7 +4765,7 @@ module Rack::Utils # set_cookie_header("myname", {value: "myvalue", max_age: 10}) # # => "myname=myvalue; max-age=10" # - # source://rack//lib/rack/utils.rb#293 + # source://rack//lib/rack/utils.rb#294 def set_cookie_header(key, value); end # :call-seq: @@ -4777,27 +4777,27 @@ module Rack::Utils # If the headers already contains a +set-cookie+ key, it will be converted # to an +Array+ if not already, and appended to. # - # source://rack//lib/rack/utils.rb#336 + # source://rack//lib/rack/utils.rb#337 def set_cookie_header!(headers, key, value); end - # source://rack//lib/rack/utils.rb#588 + # source://rack//lib/rack/utils.rb#589 def status_code(status); end # Unescapes a URI escaped string with +encoding+. +encoding+ will be the # target encoding of the string returned, and it defaults to UTF-8 # - # source://rack//lib/rack/utils.rb#57 + # source://rack//lib/rack/utils.rb#58 def unescape(s, encoding = T.unsafe(nil)); end # Unescapes the **path** component of a URI. See Rack::Utils.unescape for # unescaping query parameters or form components. # - # source://rack//lib/rack/utils.rb#51 + # source://rack//lib/rack/utils.rb#52 def unescape_path(s); end # @return [Boolean] # - # source://rack//lib/rack/utils.rb#625 + # source://rack//lib/rack/utils.rb#626 def valid_path?(path); end end end @@ -4811,30 +4811,30 @@ Rack::Utils::COMMON_SEP = T.let(T.unsafe(nil), Hash) # would be the request environment. The second of which would be the rack # application that the request would be forwarded to. # -# source://rack//lib/rack/utils.rb#477 +# source://rack//lib/rack/utils.rb#478 class Rack::Utils::Context # @return [Context] a new instance of Context # - # source://rack//lib/rack/utils.rb#480 + # source://rack//lib/rack/utils.rb#481 def initialize(app_f, app_r); end # Returns the value of attribute app. # - # source://rack//lib/rack/utils.rb#478 + # source://rack//lib/rack/utils.rb#479 def app; end - # source://rack//lib/rack/utils.rb#485 + # source://rack//lib/rack/utils.rb#486 def call(env); end - # source://rack//lib/rack/utils.rb#493 + # source://rack//lib/rack/utils.rb#494 def context(env, app = T.unsafe(nil)); end # Returns the value of attribute for. # - # source://rack//lib/rack/utils.rb#478 + # source://rack//lib/rack/utils.rb#479 def for; end - # source://rack//lib/rack/utils.rb#489 + # source://rack//lib/rack/utils.rb#490 def recontext(app); end end @@ -4848,7 +4848,7 @@ Rack::Utils::DEFAULT_SEP = T.let(T.unsafe(nil), Regexp) # .reject {|v| v['Description'] == 'Unassigned' or v['Description'].include? '(' } \ # .map {|v| %Q/#{v['Value']} => '#{v['Description']}'/ }.join(','+?\n)" # -# source://rack//lib/rack/utils.rb#504 +# source://rack//lib/rack/utils.rb#505 Rack::Utils::HTTP_STATUS_CODES = T.let(T.unsafe(nil), Hash) # source://rack//lib/rack/utils.rb#22 @@ -4857,16 +4857,16 @@ Rack::Utils::InvalidParameterError = Rack::QueryParser::InvalidParameterError # source://rack//lib/rack/utils.rb#26 Rack::Utils::KeySpaceConstrainedParams = Rack::QueryParser::Params -# source://rack//lib/rack/utils.rb#623 +# source://rack//lib/rack/utils.rb#624 Rack::Utils::NULL_BYTE = T.let(T.unsafe(nil), String) -# source://rack//lib/rack/utils.rb#574 +# source://rack//lib/rack/utils.rb#575 Rack::Utils::OBSOLETE_SYMBOLS_TO_STATUS_CODES = T.let(T.unsafe(nil), Hash) -# source://rack//lib/rack/utils.rb#582 +# source://rack//lib/rack/utils.rb#583 Rack::Utils::OBSOLETE_SYMBOL_MAPPINGS = T.let(T.unsafe(nil), Hash) -# source://rack//lib/rack/utils.rb#606 +# source://rack//lib/rack/utils.rb#607 Rack::Utils::PATH_SEPS = T.let(T.unsafe(nil), Regexp) # source://rack//lib/rack/utils.rb#21 @@ -4877,14 +4877,17 @@ Rack::Utils::ParamsTooDeepError = Rack::QueryParser::ParamsTooDeepError # Responses with HTTP status codes that should not have an entity body # -# source://rack//lib/rack/utils.rb#568 +# source://rack//lib/rack/utils.rb#569 Rack::Utils::STATUS_WITH_NO_ENTITY_BODY = T.let(T.unsafe(nil), Hash) -# source://rack//lib/rack/utils.rb#570 +# source://rack//lib/rack/utils.rb#571 Rack::Utils::SYMBOL_TO_STATUS_CODE = T.let(T.unsafe(nil), Hash) +# source://rack//lib/rack/utils.rb#27 +Rack::Utils::URI_PARSER = T.let(T.unsafe(nil), URI::RFC2396_Parser) + # A valid cookie key according to RFC2616. # A can be any US-ASCII characters, except control characters, spaces, or tabs. It also must not contain a separator character like the following: ( ) < > @ , ; : \ " / [ ] ? = { }. # -# source://rack//lib/rack/utils.rb#258 +# source://rack//lib/rack/utils.rb#259 Rack::Utils::VALID_COOKIE_KEY = T.let(T.unsafe(nil), Regexp) diff --git a/sorbet/rbi/gems/rbi@0.1.14.rbi b/sorbet/rbi/gems/rbi@0.2.1.rbi similarity index 64% rename from sorbet/rbi/gems/rbi@0.1.14.rbi rename to sorbet/rbi/gems/rbi@0.2.1.rbi index 67d2530..a5d9453 100644 --- a/sorbet/rbi/gems/rbi@0.1.14.rbi +++ b/sorbet/rbi/gems/rbi@0.2.1.rbi @@ -8,21 +8,21 @@ # source://rbi//lib/rbi.rb#7 module RBI; end -# source://rbi//lib/rbi/model.rb#1043 +# source://rbi//lib/rbi/model.rb#1045 class RBI::Arg < ::RBI::Node - # source://rbi//lib/rbi/model.rb#1055 + # source://rbi//lib/rbi/model.rb#1057 sig { params(value: ::String, loc: T.nilable(::RBI::Loc)).void } def initialize(value, loc: T.unsafe(nil)); end - # source://rbi//lib/rbi/model.rb#1061 + # source://rbi//lib/rbi/model.rb#1063 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end - # source://rbi//lib/rbi/model.rb#1066 + # source://rbi//lib/rbi/model.rb#1068 sig { returns(::String) } def to_s; end - # source://rbi//lib/rbi/model.rb#1047 + # source://rbi//lib/rbi/model.rb#1049 sig { returns(::String) } def value; end end @@ -50,7 +50,7 @@ class RBI::Attr < ::RBI::NodeWithComments end def initialize(name, names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil)); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#414 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#420 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end @@ -70,7 +70,7 @@ class RBI::Attr < ::RBI::NodeWithComments sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#422 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#428 sig { override.params(other: ::RBI::Node).void } def merge_with(other); end @@ -110,7 +110,7 @@ class RBI::Attr < ::RBI::NodeWithComments params( name: ::String, sig: T.nilable(::RBI::Sig), - attribute_type: T.nilable(::String), + attribute_type: T.nilable(T.any(::RBI::Type, ::String)), visibility: ::RBI::Visibility, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment] @@ -121,7 +121,7 @@ class RBI::Attr < ::RBI::NodeWithComments # @raise [UnexpectedMultipleSigsError] # # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#66 - sig(:final) { returns([T.nilable(::RBI::Sig), T.nilable(::String)]) } + sig(:final) { returns([T.nilable(::RBI::Sig), T.nilable(T.any(::RBI::Type, ::String))]) } def parse_sig; end end @@ -141,7 +141,7 @@ class RBI::AttrAccessor < ::RBI::Attr end def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#454 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#460 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end @@ -174,7 +174,7 @@ class RBI::AttrReader < ::RBI::Attr end def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#436 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#442 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end @@ -207,7 +207,7 @@ class RBI::AttrWriter < ::RBI::Attr end def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#445 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#451 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end @@ -269,7 +269,7 @@ class RBI::Class < ::RBI::Scope end def initialize(name, superclass_name: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#378 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#384 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end @@ -331,28 +331,28 @@ end # end # ~~~ # -# source://rbi//lib/rbi/rewriters/merge_trees.rb#591 +# source://rbi//lib/rbi/rewriters/merge_trees.rb#583 class RBI::ConflictTree < ::RBI::Tree - # source://rbi//lib/rbi/rewriters/merge_trees.rb#601 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#593 sig { params(left_name: ::String, right_name: ::String).void } def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#595 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#587 sig { returns(::RBI::Tree) } def left; end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#598 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#590 sig { returns(::String) } def left_name; end # @return [Tree] # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#595 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#587 def right; end # @return [String] # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#598 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#590 def right_name; end end @@ -374,7 +374,7 @@ class RBI::Const < ::RBI::NodeWithComments end def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#405 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#411 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end @@ -422,7 +422,7 @@ class RBI::Extend < ::RBI::Mixin end def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#504 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#510 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end @@ -464,7 +464,7 @@ class RBI::File sig { returns(T::Boolean) } def empty?; end - # source://rbi//lib/rbi/printer.rb#744 + # source://rbi//lib/rbi/printer.rb#743 sig do params( out: T.any(::IO, ::StringIO), @@ -475,6 +475,14 @@ class RBI::File end def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end + # source://rbi//lib/rbi/rbs_printer.rb#996 + sig { params(out: T.any(::IO, ::StringIO), indent: ::Integer, print_locs: T::Boolean).void } + def rbs_print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rbs_printer.rb#1002 + sig { params(indent: ::Integer, print_locs: T::Boolean).returns(::String) } + def rbs_string(indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end + # source://rbi//lib/rbi/model.rb#143 sig { returns(::RBI::Tree) } def root; end @@ -493,7 +501,7 @@ class RBI::File # source://rbi//lib/rbi/model.rb#146 def strictness=(_arg0); end - # source://rbi//lib/rbi/printer.rb#750 + # source://rbi//lib/rbi/printer.rb#749 sig { params(indent: ::Integer, print_locs: T::Boolean, max_line_length: T.nilable(::Integer)).returns(::String) } def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end end @@ -507,11 +515,11 @@ class RBI::Formatter group_nodes: T::Boolean, max_line_length: T.nilable(::Integer), nest_singleton_methods: T::Boolean, - nest_non_public_methods: T::Boolean, + nest_non_public_members: T::Boolean, sort_nodes: T::Boolean ).void end - def initialize(add_sig_templates: T.unsafe(nil), group_nodes: T.unsafe(nil), max_line_length: T.unsafe(nil), nest_singleton_methods: T.unsafe(nil), nest_non_public_methods: T.unsafe(nil), sort_nodes: T.unsafe(nil)); end + def initialize(add_sig_templates: T.unsafe(nil), group_nodes: T.unsafe(nil), max_line_length: T.unsafe(nil), nest_singleton_methods: T.unsafe(nil), nest_non_public_members: T.unsafe(nil), sort_nodes: T.unsafe(nil)); end # source://rbi//lib/rbi/formatter.rb#47 sig { params(file: ::RBI::File).void } @@ -553,19 +561,19 @@ end # source://rbi//lib/rbi/rewriters/group_nodes.rb#99 class RBI::Group::Kind < ::T::Enum enums do - Mixins = new - RequiredAncestors = new - Helpers = new - TypeMembers = new - MixesInClassMethods = new - Sends = new Attrs = new - TStructFields = new - TEnums = new + Consts = new + Helpers = new Inits = new Methods = new + MixesInClassMethods = new + Mixins = new + RequiredAncestors = new + Sends = new SingletonClasses = new - Consts = new + TEnums = new + TStructFields = new + TypeMembers = new end end @@ -589,7 +597,7 @@ class RBI::Helper < ::RBI::NodeWithComments end def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#522 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#528 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end @@ -622,7 +630,7 @@ class RBI::Include < ::RBI::Mixin end def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#495 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#501 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end @@ -690,21 +698,21 @@ module RBI::Indexable def index_ids; end end -# source://rbi//lib/rbi/model.rb#1071 +# source://rbi//lib/rbi/model.rb#1073 class RBI::KwArg < ::RBI::Arg - # source://rbi//lib/rbi/model.rb#1084 + # source://rbi//lib/rbi/model.rb#1086 sig { params(keyword: ::String, value: ::String, loc: T.nilable(::RBI::Loc)).void } def initialize(keyword, value, loc: T.unsafe(nil)); end - # source://rbi//lib/rbi/model.rb#1090 + # source://rbi//lib/rbi/model.rb#1092 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end - # source://rbi//lib/rbi/model.rb#1075 + # source://rbi//lib/rbi/model.rb#1077 sig { returns(::String) } def keyword; end - # source://rbi//lib/rbi/model.rb#1095 + # source://rbi//lib/rbi/model.rb#1097 sig { returns(::String) } def to_s; end end @@ -909,7 +917,7 @@ class RBI::Method < ::RBI::NodeWithComments sig do params( params: T::Array[::RBI::SigParam], - return_type: T.nilable(::String), + return_type: T.any(::RBI::Type, ::String), is_abstract: T::Boolean, is_override: T::Boolean, is_overridable: T::Boolean, @@ -921,7 +929,7 @@ class RBI::Method < ::RBI::NodeWithComments 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#463 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#469 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end @@ -942,7 +950,7 @@ class RBI::Method < ::RBI::NodeWithComments # source://rbi//lib/rbi/model.rb#495 def is_singleton=(_arg0); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#472 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#478 sig { override.params(other: ::RBI::Node).void } def merge_with(other); end @@ -998,7 +1006,7 @@ class RBI::MixesInClassMethods < ::RBI::Mixin end def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#513 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#519 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end @@ -1030,7 +1038,7 @@ class RBI::Mixin < ::RBI::NodeWithComments end def initialize(name, names, loc: T.unsafe(nil), comments: T.unsafe(nil)); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#486 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#492 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end @@ -1052,7 +1060,7 @@ class RBI::Module < ::RBI::Scope end def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#387 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#393 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end @@ -1122,7 +1130,7 @@ class RBI::Node # source://rbi//lib/rbi/model.rb#14 def parent_tree=(_arg0); end - # source://rbi//lib/rbi/printer.rb#768 + # source://rbi//lib/rbi/printer.rb#767 sig do params( out: T.any(::IO, ::StringIO), @@ -1133,6 +1141,14 @@ class RBI::Node end def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end + # source://rbi//lib/rbi/rbs_printer.rb#1013 + sig { params(out: T.any(::IO, ::StringIO), indent: ::Integer, print_locs: T::Boolean).void } + def rbs_print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rbs_printer.rb#1019 + sig { params(indent: ::Integer, print_locs: T::Boolean).returns(::String) } + def rbs_string(indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end + # @raise [ReplaceNodeError] # # source://rbi//lib/rbi/model.rb#35 @@ -1143,7 +1159,7 @@ class RBI::Node sig { params(version: ::Gem::Version).returns(T::Boolean) } def satisfies_version?(version); end - # source://rbi//lib/rbi/printer.rb#774 + # source://rbi//lib/rbi/printer.rb#773 sig { params(indent: ::Integer, print_locs: T::Boolean, max_line_length: T.nilable(::Integer)).returns(::String) } def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end end @@ -1268,21 +1284,21 @@ class RBI::Parser end end -# source://rbi//lib/rbi/parser.rb#791 +# source://rbi//lib/rbi/parser.rb#828 class RBI::Parser::SigBuilder < ::RBI::Parser::Visitor - # source://rbi//lib/rbi/parser.rb#798 + # source://rbi//lib/rbi/parser.rb#835 sig { params(content: ::String, file: ::String).void } def initialize(content, file:); end - # source://rbi//lib/rbi/parser.rb#795 + # source://rbi//lib/rbi/parser.rb#832 sig { returns(::RBI::Sig) } def current; end - # source://rbi//lib/rbi/parser.rb#850 + # source://rbi//lib/rbi/parser.rb#887 sig { override.params(node: ::Prism::AssocNode).void } def visit_assoc_node(node); end - # source://rbi//lib/rbi/parser.rb#805 + # source://rbi//lib/rbi/parser.rb#842 sig { override.params(node: ::Prism::CallNode).void } def visit_call_node(node); end end @@ -1301,39 +1317,39 @@ class RBI::Parser::TreeBuilder < ::RBI::Parser::Visitor sig { returns(::RBI::Tree) } def tree; end - # source://rbi//lib/rbi/parser.rb#299 + # source://rbi//lib/rbi/parser.rb#324 sig { params(node: ::Prism::CallNode).void } def visit_call_node(node); end - # source://rbi//lib/rbi/parser.rb#176 + # source://rbi//lib/rbi/parser.rb#175 sig { override.params(node: ::Prism::ClassNode).void } def visit_class_node(node); end - # source://rbi//lib/rbi/parser.rb#208 + # source://rbi//lib/rbi/parser.rb#224 sig { params(node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode)).void } def visit_constant_assign(node); end - # source://rbi//lib/rbi/parser.rb#201 + # source://rbi//lib/rbi/parser.rb#217 sig { override.params(node: ::Prism::ConstantPathWriteNode).void } def visit_constant_path_write_node(node); end - # source://rbi//lib/rbi/parser.rb#194 + # source://rbi//lib/rbi/parser.rb#210 sig { override.params(node: ::Prism::ConstantWriteNode).void } def visit_constant_write_node(node); end - # source://rbi//lib/rbi/parser.rb#241 + # source://rbi//lib/rbi/parser.rb#257 sig { override.params(node: ::Prism::DefNode).void } def visit_def_node(node); end - # source://rbi//lib/rbi/parser.rb#255 + # source://rbi//lib/rbi/parser.rb#278 sig { override.params(node: ::Prism::ModuleNode).void } def visit_module_node(node); end - # source://rbi//lib/rbi/parser.rb#272 + # source://rbi//lib/rbi/parser.rb#296 sig { override.params(node: ::Prism::ProgramNode).void } def visit_program_node(node); end - # source://rbi//lib/rbi/parser.rb#283 + # source://rbi//lib/rbi/parser.rb#307 sig { override.params(node: ::Prism::SingletonClassNode).void } def visit_singleton_class_node(node); end @@ -1341,49 +1357,49 @@ class RBI::Parser::TreeBuilder < ::RBI::Parser::Visitor # Collect all the remaining comments within a node # - # source://rbi//lib/rbi/parser.rb#467 + # source://rbi//lib/rbi/parser.rb#503 sig { params(node: ::Prism::Node).void } def collect_dangling_comments(node); end # Collect all the remaining comments after visiting the tree # - # source://rbi//lib/rbi/parser.rb#485 + # source://rbi//lib/rbi/parser.rb#521 sig { void } def collect_orphan_comments; end - # source://rbi//lib/rbi/parser.rb#508 + # source://rbi//lib/rbi/parser.rb#544 sig { returns(::RBI::Tree) } def current_scope; end - # source://rbi//lib/rbi/parser.rb#513 + # source://rbi//lib/rbi/parser.rb#549 sig { returns(T::Array[::RBI::Sig]) } def current_sigs; end - # source://rbi//lib/rbi/parser.rb#520 - sig { returns(T::Array[::RBI::Comment]) } - def current_sigs_comments; end + # source://rbi//lib/rbi/parser.rb#556 + sig { params(sigs: T::Array[::RBI::Sig]).returns(T::Array[::RBI::Comment]) } + def detach_comments_from_sigs(sigs); end - # source://rbi//lib/rbi/parser.rb#527 + # source://rbi//lib/rbi/parser.rb#568 sig { params(node: ::Prism::Node).returns(T::Array[::RBI::Comment]) } def node_comments(node); end - # source://rbi//lib/rbi/parser.rb#545 + # source://rbi//lib/rbi/parser.rb#586 sig { params(node: ::Prism::Comment).returns(::RBI::Comment) } def parse_comment(node); end - # source://rbi//lib/rbi/parser.rb#574 + # source://rbi//lib/rbi/parser.rb#615 sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Param]) } def parse_params(node); end - # source://rbi//lib/rbi/parser.rb#550 + # source://rbi//lib/rbi/parser.rb#591 sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Arg]) } def parse_send_args(node); end - # source://rbi//lib/rbi/parser.rb#648 + # source://rbi//lib/rbi/parser.rb#689 sig { params(node: ::Prism::CallNode).returns(::RBI::Sig) } def parse_sig(node); end - # source://rbi//lib/rbi/parser.rb#658 + # source://rbi//lib/rbi/parser.rb#698 sig do params( node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode) @@ -1391,23 +1407,23 @@ class RBI::Parser::TreeBuilder < ::RBI::Parser::Visitor end def parse_struct(node); end - # source://rbi//lib/rbi/parser.rb#708 + # source://rbi//lib/rbi/parser.rb#748 sig { params(send: ::Prism::CallNode).void } def parse_tstruct_field(send); end - # source://rbi//lib/rbi/parser.rb#745 + # source://rbi//lib/rbi/parser.rb#785 sig { params(name: ::String, node: ::Prism::Node).returns(::RBI::Visibility) } def parse_visibility(name, node); end - # source://rbi//lib/rbi/parser.rb#759 + # source://rbi//lib/rbi/parser.rb#799 sig { void } def separate_header_comments; end - # source://rbi//lib/rbi/parser.rb#769 + # source://rbi//lib/rbi/parser.rb#809 sig { void } def set_root_tree_loc; end - # source://rbi//lib/rbi/parser.rb#783 + # source://rbi//lib/rbi/parser.rb#823 sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } def type_variable_definition?(node); end end @@ -1521,35 +1537,35 @@ class RBI::Printer < ::RBI::Visitor private - # source://rbi//lib/rbi/printer.rb#619 + # source://rbi//lib/rbi/printer.rb#618 sig { params(node: ::RBI::Node).returns(T::Boolean) } def oneline?(node); end - # source://rbi//lib/rbi/printer.rb#577 + # source://rbi//lib/rbi/printer.rb#576 sig { params(node: ::RBI::Node).void } def print_blank_line_before(node); end - # source://rbi//lib/rbi/printer.rb#587 + # source://rbi//lib/rbi/printer.rb#586 sig { params(node: ::RBI::Node).void } def print_loc(node); end - # source://rbi//lib/rbi/printer.rb#593 + # source://rbi//lib/rbi/printer.rb#592 sig { params(node: ::RBI::Param, last: T::Boolean).void } def print_param_comment_leading_space(node, last:); end - # source://rbi//lib/rbi/printer.rb#666 + # source://rbi//lib/rbi/printer.rb#665 sig { params(node: ::RBI::Sig).void } def print_sig_as_block(node); end - # source://rbi//lib/rbi/printer.rb#641 + # source://rbi//lib/rbi/printer.rb#640 sig { params(node: ::RBI::Sig).void } def print_sig_as_line(node); end - # source://rbi//lib/rbi/printer.rb#611 + # source://rbi//lib/rbi/printer.rb#610 sig { params(node: ::RBI::SigParam, last: T::Boolean).void } def print_sig_param_comment_leading_space(node, last:); end - # source://rbi//lib/rbi/printer.rb#722 + # source://rbi//lib/rbi/printer.rb#721 sig { params(node: ::RBI::Sig).returns(T::Array[::String]) } def sig_modifiers(node); end @@ -1589,7 +1605,7 @@ class RBI::Printer < ::RBI::Visitor sig { override.params(node: ::RBI::Comment).void } def visit_comment(node); end - # source://rbi//lib/rbi/printer.rb#554 + # source://rbi//lib/rbi/printer.rb#553 sig { override.params(node: ::RBI::ConflictTree).void } def visit_conflict_tree(node); end @@ -1601,11 +1617,11 @@ class RBI::Printer < ::RBI::Visitor sig { override.params(node: ::RBI::Extend).void } def visit_extend(node); end - # source://rbi//lib/rbi/printer.rb#526 + # source://rbi//lib/rbi/printer.rb#525 sig { override.params(node: ::RBI::Group).void } def visit_group(node); end - # source://rbi//lib/rbi/printer.rb#512 + # source://rbi//lib/rbi/printer.rb#511 sig { override.params(node: ::RBI::Helper).void } def visit_helper(node); end @@ -1633,7 +1649,7 @@ class RBI::Printer < ::RBI::Visitor sig { override.params(node: ::RBI::Method).void } def visit_method(node); end - # source://rbi//lib/rbi/printer.rb#521 + # source://rbi//lib/rbi/printer.rb#520 sig { override.params(node: ::RBI::MixesInClassMethods).void } def visit_mixes_in_class_methods(node); end @@ -1665,7 +1681,7 @@ class RBI::Printer < ::RBI::Visitor sig { override.params(node: ::RBI::ReqParam).void } def visit_req_param(node); end - # source://rbi//lib/rbi/printer.rb#545 + # source://rbi//lib/rbi/printer.rb#544 sig { override.params(node: ::RBI::RequiresAncestor).void } def visit_requires_ancestor(node); end @@ -1681,7 +1697,7 @@ class RBI::Printer < ::RBI::Visitor sig { params(node: ::RBI::Scope).void } def visit_scope_body(node); end - # source://rbi//lib/rbi/printer.rb#563 + # source://rbi//lib/rbi/printer.rb#562 sig { override.params(node: ::RBI::ScopeConflict).void } def visit_scope_conflict(node); end @@ -1697,7 +1713,7 @@ class RBI::Printer < ::RBI::Visitor sig { override.params(node: ::RBI::Sig).void } def visit_sig(node); end - # source://rbi//lib/rbi/printer.rb#446 + # source://rbi//lib/rbi/printer.rb#447 sig { override.params(node: ::RBI::SigParam).void } def visit_sig_param(node); end @@ -1709,15 +1725,15 @@ class RBI::Printer < ::RBI::Visitor sig { override.params(node: ::RBI::Struct).void } def visit_struct(node); end - # source://rbi//lib/rbi/printer.rb#466 + # source://rbi//lib/rbi/printer.rb#467 sig { params(node: ::RBI::TStructField).void } def visit_t_struct_field(node); end - # source://rbi//lib/rbi/printer.rb#484 + # source://rbi//lib/rbi/printer.rb#485 sig { override.params(node: ::RBI::TEnum).void } def visit_tenum(node); end - # source://rbi//lib/rbi/printer.rb#489 + # source://rbi//lib/rbi/printer.rb#490 sig { override.params(node: ::RBI::TEnumBlock).void } def visit_tenum_block(node); end @@ -1725,19 +1741,19 @@ class RBI::Printer < ::RBI::Visitor sig { override.params(node: ::RBI::Tree).void } def visit_tree(node); end - # source://rbi//lib/rbi/printer.rb#451 + # source://rbi//lib/rbi/printer.rb#452 sig { override.params(node: ::RBI::TStruct).void } def visit_tstruct(node); end - # source://rbi//lib/rbi/printer.rb#456 + # source://rbi//lib/rbi/printer.rb#457 sig { override.params(node: ::RBI::TStructConst).void } def visit_tstruct_const(node); end - # source://rbi//lib/rbi/printer.rb#461 + # source://rbi//lib/rbi/printer.rb#462 sig { override.params(node: ::RBI::TStructProp).void } def visit_tstruct_prop(node); end - # source://rbi//lib/rbi/printer.rb#503 + # source://rbi//lib/rbi/printer.rb#502 sig { override.params(node: ::RBI::TypeMember).void } def visit_type_member(node); end @@ -1745,7 +1761,7 @@ class RBI::Printer < ::RBI::Visitor sig { params(node: ::RBI::Visibility).void } def visit_visibility(node); end - # source://rbi//lib/rbi/printer.rb#532 + # source://rbi//lib/rbi/printer.rb#531 sig { override.params(node: ::RBI::VisibilityGroup).void } def visit_visibility_group(node); end end @@ -1753,9 +1769,9 @@ end # source://rbi//lib/rbi/printer.rb#5 class RBI::PrinterError < ::RBI::Error; end -# source://rbi//lib/rbi/model.rb#984 +# source://rbi//lib/rbi/model.rb#986 class RBI::Private < ::RBI::Visibility - # source://rbi//lib/rbi/model.rb#994 + # source://rbi//lib/rbi/model.rb#996 sig do params( loc: T.nilable(::RBI::Loc), @@ -1766,9 +1782,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#968 +# source://rbi//lib/rbi/model.rb#970 class RBI::Protected < ::RBI::Visibility - # source://rbi//lib/rbi/model.rb#978 + # source://rbi//lib/rbi/model.rb#980 sig do params( loc: T.nilable(::RBI::Loc), @@ -1779,9 +1795,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#952 +# source://rbi//lib/rbi/model.rb#954 class RBI::Public < ::RBI::Visibility - # source://rbi//lib/rbi/model.rb#962 + # source://rbi//lib/rbi/model.rb#964 sig do params( loc: T.nilable(::RBI::Loc), @@ -1792,6 +1808,323 @@ class RBI::Public < ::RBI::Visibility def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end end +# source://rbi//lib/rbi/rbs_printer.rb#5 +class RBI::RBSPrinter < ::RBI::Visitor + # source://rbi//lib/rbi/rbs_printer.rb#18 + sig { params(out: T.any(::IO, ::StringIO), indent: ::Integer, print_locs: T::Boolean).void } + def initialize(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rbs_printer.rb#15 + sig { returns(::Integer) } + def current_indent; end + + # source://rbi//lib/rbi/rbs_printer.rb#35 + sig { void } + def dedent; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/rbs_printer.rb#9 + def in_visibility_group; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/rbs_printer.rb#9 + def in_visibility_group=(_arg0); end + + # Printing + # + # source://rbi//lib/rbi/rbs_printer.rb#30 + sig { void } + def indent; end + + # source://rbi//lib/rbi/rbs_printer.rb#12 + sig { returns(T.nilable(::RBI::Node)) } + def previous_node; end + + # Print a string without indentation nor `\n` at the end. + # + # source://rbi//lib/rbi/rbs_printer.rb#41 + sig { params(string: ::String).void } + def print(string); end + + # source://rbi//lib/rbi/rbs_printer.rb#275 + sig { params(node: ::RBI::Attr, sig: ::RBI::Sig).void } + def print_attr_sig(node, sig); end + + # source://rbi//lib/rbi/rbs_printer.rb#9 + sig { returns(T::Boolean) } + def print_locs; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/rbs_printer.rb#9 + def print_locs=(_arg0); end + + # source://rbi//lib/rbi/rbs_printer.rb#350 + sig { params(node: ::RBI::Method, sig: ::RBI::Sig).void } + def print_method_sig(node, sig); end + + # Print a string with indentation and `\n` at the end. + # + # source://rbi//lib/rbi/rbs_printer.rb#61 + sig { params(string: ::String).void } + def printl(string); end + + # Print a string without indentation but with a `\n` at the end. + # + # source://rbi//lib/rbi/rbs_printer.rb#47 + sig { params(string: T.nilable(::String)).void } + def printn(string = T.unsafe(nil)); end + + # Print a string with indentation but without a `\n` at the end. + # + # source://rbi//lib/rbi/rbs_printer.rb#54 + sig { params(string: T.nilable(::String)).void } + def printt(string = T.unsafe(nil)); end + + # source://rbi//lib/rbi/rbs_printer.rb#67 + sig { override.params(nodes: T::Array[::RBI::Node]).void } + def visit_all(nodes); end + + # source://rbi//lib/rbi/rbs_printer.rb#505 + sig { override.params(node: ::RBI::Arg).void } + def visit_arg(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#243 + sig { params(node: ::RBI::Attr).void } + def visit_attr(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#228 + sig { override.params(node: ::RBI::AttrAccessor).void } + def visit_attr_accessor(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#233 + sig { override.params(node: ::RBI::AttrReader).void } + def visit_attr_reader(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#238 + sig { override.params(node: ::RBI::AttrWriter).void } + def visit_attr_writer(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#106 + sig { override.params(node: ::RBI::BlankLine).void } + def visit_blank_line(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#444 + sig { override.params(node: ::RBI::BlockParam).void } + def visit_block_param(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#123 + sig { override.params(node: ::RBI::Class).void } + def visit_class(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#90 + sig { override.params(node: ::RBI::Comment).void } + def visit_comment(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#625 + sig { override.params(node: ::RBI::ConflictTree).void } + def visit_conflict_tree(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#213 + sig { override.params(node: ::RBI::Const).void } + def visit_const(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#454 + sig { override.params(node: ::RBI::Extend).void } + def visit_extend(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#78 + sig { override.params(file: ::RBI::File).void } + def visit_file(file); end + + # source://rbi//lib/rbi/rbs_printer.rb#601 + sig { override.params(node: ::RBI::Group).void } + def visit_group(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#591 + sig { override.params(node: ::RBI::Helper).void } + def visit_helper(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#449 + sig { override.params(node: ::RBI::Include).void } + def visit_include(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#510 + sig { override.params(node: ::RBI::KwArg).void } + def visit_kw_arg(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#434 + sig { override.params(node: ::RBI::KwOptParam).void } + def visit_kw_opt_param(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#429 + sig { override.params(node: ::RBI::KwParam).void } + def visit_kw_param(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#439 + sig { override.params(node: ::RBI::KwRestParam).void } + def visit_kw_rest_param(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#292 + sig { override.params(node: ::RBI::Method).void } + def visit_method(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#596 + sig { override.params(node: ::RBI::MixesInClassMethods).void } + def visit_mixes_in_class_methods(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#459 + sig { params(node: ::RBI::Mixin).void } + def visit_mixin(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#118 + sig { override.params(node: ::RBI::Module).void } + def visit_module(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#419 + sig { override.params(node: ::RBI::OptParam).void } + def visit_opt_param(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#486 + sig { override.params(node: ::RBI::Private).void } + def visit_private(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#481 + sig { override.params(node: ::RBI::Protected).void } + def visit_protected(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#476 + sig { override.params(node: ::RBI::Public).void } + def visit_public(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#414 + sig { override.params(node: ::RBI::ReqParam).void } + def visit_req_param(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#620 + sig { override.params(node: ::RBI::RequiresAncestor).void } + def visit_requires_ancestor(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#424 + sig { override.params(node: ::RBI::RestParam).void } + def visit_rest_param(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#138 + sig { params(node: ::RBI::Scope).void } + def visit_scope(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#201 + sig { params(node: ::RBI::Scope).void } + def visit_scope_body(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#634 + sig { override.params(node: ::RBI::ScopeConflict).void } + def visit_scope_conflict(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#148 + sig { params(node: ::RBI::Scope).void } + def visit_scope_header(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#500 + sig { override.params(node: ::RBI::Send).void } + def visit_send(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#133 + sig { override.params(node: ::RBI::SingletonClass).void } + def visit_singleton_class(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#128 + sig { override.params(node: ::RBI::Struct).void } + def visit_struct(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#563 + sig { override.params(node: ::RBI::TEnum).void } + def visit_tenum(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#568 + sig { override.params(node: ::RBI::TEnumBlock).void } + def visit_tenum_block(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#111 + sig { override.params(node: ::RBI::Tree).void } + def visit_tree(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#515 + sig { override.params(node: ::RBI::TStruct).void } + def visit_tstruct(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#549 + sig { override.params(node: ::RBI::TStructConst).void } + def visit_tstruct_const(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#556 + sig { override.params(node: ::RBI::TStructProp).void } + def visit_tstruct_prop(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#586 + sig { override.params(node: ::RBI::TypeMember).void } + def visit_type_member(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#491 + sig { params(node: ::RBI::Visibility).void } + def visit_visibility(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#607 + sig { override.params(node: ::RBI::VisibilityGroup).void } + def visit_visibility_group(node); end + + private + + # source://rbi//lib/rbi/rbs_printer.rb#782 + sig { params(node: ::RBI::Type).returns(T::Boolean) } + def bare_nilable_proc?(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#777 + sig { params(node: ::RBI::Type).returns(T::Boolean) } + def bare_proc?(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#725 + sig { params(node: ::RBI::Node).returns(T::Boolean) } + def oneline?(node); end + + # Parse a string containing a `T.let(x, X)` and extract the type + # + # Returns `nil` is the string is not a `T.let`. + # + # source://rbi//lib/rbi/rbs_printer.rb#759 + sig { params(code: T.nilable(::String)).returns(T.nilable(::String)) } + def parse_t_let(code); end + + # source://rbi//lib/rbi/rbs_printer.rb#747 + sig { params(type: T.any(::RBI::Type, ::String)).returns(::RBI::Type) } + def parse_type(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#650 + sig { params(node: ::RBI::Node).void } + def print_blank_line_before(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#669 + sig { params(node: ::RBI::Node).void } + def print_loc(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#699 + sig { params(node: ::RBI::Param, last: T::Boolean).void } + def print_param_comment_leading_space(node, last:); end + + # source://rbi//lib/rbi/rbs_printer.rb#675 + sig { params(node: ::RBI::Method, param: ::RBI::SigParam).void } + def print_sig_param(node, param); end + + # source://rbi//lib/rbi/rbs_printer.rb#717 + sig { params(node: ::RBI::SigParam, last: T::Boolean).void } + def print_sig_param_comment_leading_space(node, last:); end +end + +# source://rbi//lib/rbi/rbs_printer.rb#6 +class RBI::RBSPrinter::Error < ::RBI::Error; end + # source://rbi//lib/rbi/model.rb#5 class RBI::ReplaceNodeError < ::RBI::Error; end @@ -2009,16 +2342,81 @@ end # source://rbi//lib/rbi/rewriters/filter_versions.rb#60 RBI::Rewriters::FilterVersions::VERSION_PREFIX = T.let(T.unsafe(nil), String) -# source://rbi//lib/rbi/rewriters/group_nodes.rb#8 -class RBI::Rewriters::GroupNodes < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/group_nodes.rb#12 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - private - - # source://rbi//lib/rbi/rewriters/group_nodes.rb#36 - sig { params(node: ::RBI::Node).returns(::RBI::Group::Kind) } +# Rewrite non-singleton methods inside singleton classes to singleton methods +# +# Example: +# ~~~rb +# class << self +# def m1; end +# def self.m2; end +# +# class << self +# def m3; end +# end +# end +# ~~~ +# +# will be rewritten to: +# +# ~~~rb +# def self.m1; end +# +# class << self +# def self.m2; end +# def self.m3; end +# end +# ~~~ +# +# source://rbi//lib/rbi/rewriters/flatten_singleton_methods.rb#30 +class RBI::Rewriters::FlattenSingletonMethods < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/flatten_singleton_methods.rb#34 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end +end + +# Flattens visibility nodes into method nodes +# +# Example: +# ~~~rb +# class A +# def m1; end +# private +# def m2; end +# def m3; end +# end +# ~~~ +# +# will be transformed into: +# +# ~~~rb +# class A +# def m1; end +# private def m2; end +# private def m3; end +# end +# ~~~ +# +# source://rbi//lib/rbi/rewriters/flatten_visibilities.rb#27 +class RBI::Rewriters::FlattenVisibilities < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/flatten_visibilities.rb#31 + sig { void } + def initialize; end + + # source://rbi//lib/rbi/rewriters/flatten_visibilities.rb#38 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end +end + +# source://rbi//lib/rbi/rewriters/group_nodes.rb#8 +class RBI::Rewriters::GroupNodes < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/group_nodes.rb#12 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # source://rbi//lib/rbi/rewriters/group_nodes.rb#36 + sig { params(node: ::RBI::Node).returns(::RBI::Group::Kind) } def group_kind(node); end end @@ -2099,7 +2497,7 @@ class RBI::Rewriters::Merge::Conflict < ::T::Struct def to_s; end class << self - # source://sorbet-runtime/0.5.11547/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11620/lib/types/struct.rb#13 def inherited(s); end end end @@ -2155,8 +2553,8 @@ end # source://rbi//lib/rbi/rewriters/merge_trees.rb#42 class RBI::Rewriters::Merge::Keep < ::T::Enum enums do - NONE = new LEFT = new + NONE = new RIGHT = new end end @@ -2205,9 +2603,9 @@ class RBI::Rewriters::Merge::TreeMerger < ::RBI::Visitor def replace_scope_header(left, right); end end -# source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#6 -class RBI::Rewriters::NestNonPublicMethods < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#10 +# source://rbi//lib/rbi/rewriters/nest_non_public_members.rb#6 +class RBI::Rewriters::NestNonPublicMembers < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/nest_non_public_members.rb#10 sig { override.params(node: T.nilable(::RBI::Node)).void } def visit(node); end end @@ -2219,6 +2617,34 @@ class RBI::Rewriters::NestSingletonMethods < ::RBI::Visitor def visit(node); end end +# This rewriter moves top-level members into a top-level Object class +# +# Example: +# ~~~rb +# def foo; end +# attr_reader :bar +# ~~~ +# +# will be rewritten to: +# +# ~~~rb +# class Object +# def foo; end +# attr_reader :bar +# end +# ~~~ +# +# source://rbi//lib/rbi/rewriters/nest_top_level_members.rb#22 +class RBI::Rewriters::NestTopLevelMembers < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/nest_top_level_members.rb#26 + sig { void } + def initialize; end + + # source://rbi//lib/rbi/rewriters/nest_top_level_members.rb#33 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end +end + # Remove all definitions existing in the index from the current tree # # Let's create an `Index` from two different `Tree`s: @@ -2316,7 +2742,7 @@ class RBI::Rewriters::RemoveKnownDefinitions::Operation < ::T::Struct def to_s; end class << self - # source://sorbet-runtime/0.5.11547/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11620/lib/types/struct.rb#13 def inherited(s); end end end @@ -2390,38 +2816,38 @@ end # end # ~~~ # -# source://rbi//lib/rbi/rewriters/merge_trees.rb#624 +# source://rbi//lib/rbi/rewriters/merge_trees.rb#616 class RBI::ScopeConflict < ::RBI::Tree - # source://rbi//lib/rbi/rewriters/merge_trees.rb#641 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#633 sig { params(left: ::RBI::Scope, right: ::RBI::Scope, left_name: ::String, right_name: ::String).void } def initialize(left:, right:, left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#628 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#620 sig { returns(::RBI::Scope) } def left; end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#631 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#623 sig { returns(::String) } def left_name; end # @return [Scope] # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#628 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#620 def right; end # @return [String] # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#631 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#623 def right_name; end end # Sends # -# source://rbi//lib/rbi/model.rb#1002 +# source://rbi//lib/rbi/model.rb#1004 class RBI::Send < ::RBI::NodeWithComments include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#1020 + # source://rbi//lib/rbi/model.rb#1022 sig do params( method: ::String, @@ -2433,19 +2859,19 @@ 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#1028 + # source://rbi//lib/rbi/model.rb#1030 sig { params(arg: ::RBI::Arg).void } def <<(arg); end - # source://rbi//lib/rbi/model.rb#1033 + # source://rbi//lib/rbi/model.rb#1035 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end - # source://rbi//lib/rbi/model.rb#1009 + # source://rbi//lib/rbi/model.rb#1011 sig { returns(T::Array[::RBI::Arg]) } def args; end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#531 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#537 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end @@ -2453,24 +2879,24 @@ class RBI::Send < ::RBI::NodeWithComments sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/model.rb#1006 + # source://rbi//lib/rbi/model.rb#1008 sig { returns(::String) } def method; end - # source://rbi//lib/rbi/model.rb#1038 + # source://rbi//lib/rbi/model.rb#1040 sig { returns(::String) } def to_s; end end # Sorbet's sigs # -# source://rbi//lib/rbi/model.rb#1102 -class RBI::Sig < ::RBI::Node - # source://rbi//lib/rbi/model.rb#1134 +# source://rbi//lib/rbi/model.rb#1104 +class RBI::Sig < ::RBI::NodeWithComments + # source://rbi//lib/rbi/model.rb#1137 sig do params( params: T::Array[::RBI::SigParam], - return_type: T.nilable(::String), + return_type: T.any(::RBI::Type, ::String), is_abstract: T::Boolean, is_override: T::Boolean, is_overridable: T::Boolean, @@ -2478,96 +2904,97 @@ class RBI::Sig < ::RBI::Node type_params: T::Array[::String], checked: T.nilable(::Symbol), loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], block: T.nilable(T.proc.params(node: ::RBI::Sig).void) ).void end - def initialize(params: T.unsafe(nil), return_type: T.unsafe(nil), is_abstract: T.unsafe(nil), is_override: T.unsafe(nil), is_overridable: T.unsafe(nil), is_final: T.unsafe(nil), type_params: T.unsafe(nil), checked: T.unsafe(nil), loc: T.unsafe(nil), &block); end + def initialize(params: T.unsafe(nil), return_type: T.unsafe(nil), is_abstract: T.unsafe(nil), is_override: T.unsafe(nil), is_overridable: T.unsafe(nil), is_final: T.unsafe(nil), type_params: T.unsafe(nil), checked: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#1159 + # source://rbi//lib/rbi/model.rb#1163 sig { params(param: ::RBI::SigParam).void } def <<(param); end - # source://rbi//lib/rbi/model.rb#1169 + # source://rbi//lib/rbi/model.rb#1173 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end - # source://rbi//lib/rbi/model.rb#1164 - sig { params(name: ::String, type: ::String).void } + # source://rbi//lib/rbi/model.rb#1168 + sig { params(name: ::String, type: T.any(::RBI::Type, ::String)).void } def add_param(name, type); end - # source://rbi//lib/rbi/model.rb#1118 + # source://rbi//lib/rbi/model.rb#1120 sig { returns(T.nilable(::Symbol)) } def checked; end # @return [Symbol, nil] # - # source://rbi//lib/rbi/model.rb#1118 + # source://rbi//lib/rbi/model.rb#1120 def checked=(_arg0); end - # source://rbi//lib/rbi/model.rb#1112 + # source://rbi//lib/rbi/model.rb#1114 sig { returns(T::Boolean) } def is_abstract; end # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#1112 + # source://rbi//lib/rbi/model.rb#1114 def is_abstract=(_arg0); end # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#1112 + # source://rbi//lib/rbi/model.rb#1114 def is_final; end # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#1112 + # source://rbi//lib/rbi/model.rb#1114 def is_final=(_arg0); end # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#1112 + # source://rbi//lib/rbi/model.rb#1114 def is_overridable; end # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#1112 + # source://rbi//lib/rbi/model.rb#1114 def is_overridable=(_arg0); end # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#1112 + # source://rbi//lib/rbi/model.rb#1114 def is_override; end # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#1112 + # source://rbi//lib/rbi/model.rb#1114 def is_override=(_arg0); end - # source://rbi//lib/rbi/model.rb#1106 + # source://rbi//lib/rbi/model.rb#1108 sig { returns(T::Array[::RBI::SigParam]) } def params; end - # source://rbi//lib/rbi/model.rb#1109 - sig { returns(T.nilable(::String)) } + # source://rbi//lib/rbi/model.rb#1111 + sig { returns(T.any(::RBI::Type, ::String)) } def return_type; end - # @return [String, nil] + # @return [Type, String] # - # source://rbi//lib/rbi/model.rb#1109 + # source://rbi//lib/rbi/model.rb#1111 def return_type=(_arg0); end - # source://rbi//lib/rbi/model.rb#1115 + # source://rbi//lib/rbi/model.rb#1117 sig { returns(T::Array[::String]) } def type_params; end end -# source://rbi//lib/rbi/model.rb#1178 +# source://rbi//lib/rbi/model.rb#1182 class RBI::SigParam < ::RBI::NodeWithComments - # source://rbi//lib/rbi/model.rb#1193 + # source://rbi//lib/rbi/model.rb#1200 sig do params( name: ::String, - type: ::String, + type: T.any(::RBI::Type, ::String), loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment], block: T.nilable(T.proc.params(node: ::RBI::SigParam).void) @@ -2575,17 +3002,16 @@ 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#1201 + # source://rbi//lib/rbi/model.rb#1208 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end - # source://rbi//lib/rbi/model.rb#1182 + # source://rbi//lib/rbi/model.rb#1186 sig { returns(::String) } def name; end - # @return [String] - # - # source://rbi//lib/rbi/model.rb#1182 + # source://rbi//lib/rbi/model.rb#1189 + sig { returns(T.any(::RBI::Type, ::String)) } def type; end end @@ -2621,7 +3047,7 @@ class RBI::Struct < ::RBI::Scope end def initialize(name, members: T.unsafe(nil), keyword_init: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#396 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#402 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end @@ -2659,9 +3085,9 @@ end # Sorbet's T::Enum # -# source://rbi//lib/rbi/model.rb#1319 +# source://rbi//lib/rbi/model.rb#1329 class RBI::TEnum < ::RBI::Class - # source://rbi//lib/rbi/model.rb#1330 + # source://rbi//lib/rbi/model.rb#1340 sig do params( name: ::String, @@ -2673,41 +3099,26 @@ 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#1336 -class RBI::TEnumBlock < ::RBI::NodeWithComments - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#1350 +# source://rbi//lib/rbi/model.rb#1346 +class RBI::TEnumBlock < ::RBI::Scope + # source://rbi//lib/rbi/model.rb#1356 sig do params( - names: T::Array[::String], loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment], block: T.nilable(T.proc.params(node: ::RBI::TEnumBlock).void) ).void end - def initialize(names = T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end # source://rbi//lib/rbi/model.rb#1362 - sig { params(name: ::String).void } - def <<(name); end - - # source://rbi//lib/rbi/model.rb#1357 - sig { returns(T::Boolean) } - def empty?; end + sig { override.returns(::String) } + def fully_qualified_name; end # source://rbi//lib/rbi/index.rb#223 sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#558 - sig { override.params(other: ::RBI::Node).void } - def merge_with(other); end - - # source://rbi//lib/rbi/model.rb#1340 - sig { returns(T::Array[::String]) } - def names; end - # source://rbi//lib/rbi/model.rb#1367 sig { override.returns(::String) } def to_s; end @@ -2715,9 +3126,9 @@ end # Sorbet's T::Struct # -# source://rbi//lib/rbi/model.rb#1208 +# source://rbi//lib/rbi/model.rb#1215 class RBI::TStruct < ::RBI::Class - # source://rbi//lib/rbi/model.rb#1219 + # source://rbi//lib/rbi/model.rb#1226 sig do params( name: ::String, @@ -2729,15 +3140,15 @@ 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#1257 +# source://rbi//lib/rbi/model.rb#1267 class RBI::TStructConst < ::RBI::TStructField include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#1270 + # source://rbi//lib/rbi/model.rb#1280 sig do params( name: ::String, - type: ::String, + type: T.any(::RBI::Type, ::String), default: T.nilable(::String), loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment], @@ -2746,11 +3157,11 @@ class RBI::TStructConst < ::RBI::TStructField end def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#549 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#555 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#1276 + # source://rbi//lib/rbi/model.rb#1286 sig { override.returns(T::Array[::String]) } def fully_qualified_names; end @@ -2758,22 +3169,22 @@ class RBI::TStructConst < ::RBI::TStructField sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/model.rb#1282 + # source://rbi//lib/rbi/model.rb#1292 sig { override.returns(::String) } def to_s; end end # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://rbi//lib/rbi/model.rb#1225 +# source://rbi//lib/rbi/model.rb#1232 class RBI::TStructField < ::RBI::NodeWithComments abstract! - # source://rbi//lib/rbi/model.rb#1246 + # source://rbi//lib/rbi/model.rb#1256 sig do params( name: ::String, - type: ::String, + type: T.any(::RBI::Type, ::String), default: T.nilable(::String), loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment] @@ -2781,54 +3192,53 @@ class RBI::TStructField < ::RBI::NodeWithComments end def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil)); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#540 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#546 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#1235 + # source://rbi//lib/rbi/model.rb#1245 sig { returns(T.nilable(::String)) } def default; end # @return [String, nil] # - # source://rbi//lib/rbi/model.rb#1235 + # source://rbi//lib/rbi/model.rb#1245 def default=(_arg0); end # @abstract # - # source://rbi//lib/rbi/model.rb#1254 + # source://rbi//lib/rbi/model.rb#1264 sig { abstract.returns(T::Array[::String]) } def fully_qualified_names; end - # source://rbi//lib/rbi/model.rb#1232 + # source://rbi//lib/rbi/model.rb#1239 sig { returns(::String) } def name; end # @return [String] # - # source://rbi//lib/rbi/model.rb#1232 + # source://rbi//lib/rbi/model.rb#1239 def name=(_arg0); end - # @return [String] - # - # source://rbi//lib/rbi/model.rb#1232 + # source://rbi//lib/rbi/model.rb#1242 + sig { returns(T.any(::RBI::Type, ::String)) } def type; end - # @return [String] + # @return [Type, String] # - # source://rbi//lib/rbi/model.rb#1232 + # source://rbi//lib/rbi/model.rb#1242 def type=(_arg0); end end -# source://rbi//lib/rbi/model.rb#1287 +# source://rbi//lib/rbi/model.rb#1297 class RBI::TStructProp < ::RBI::TStructField include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#1300 + # source://rbi//lib/rbi/model.rb#1310 sig do params( name: ::String, - type: ::String, + type: T.any(::RBI::Type, ::String), default: T.nilable(::String), loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment], @@ -2837,11 +3247,11 @@ class RBI::TStructProp < ::RBI::TStructField end def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/rewriters/merge_trees.rb#572 + # source://rbi//lib/rbi/rewriters/merge_trees.rb#564 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#1306 + # source://rbi//lib/rbi/model.rb#1316 sig { override.returns(T::Array[::String]) } def fully_qualified_names; end @@ -2849,7 +3259,7 @@ class RBI::TStructProp < ::RBI::TStructField sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/model.rb#1312 + # source://rbi//lib/rbi/model.rb#1322 sig { override.returns(::String) } def to_s; end end @@ -2878,7 +3288,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.16.1/lib/tapioca/rbi_ext/model.rb#38 + # source://tapioca/0.16.3/lib/tapioca/rbi_ext/model.rb#38 sig do params( name: ::String, @@ -2888,19 +3298,19 @@ class RBI::Tree < ::RBI::NodeWithComments end def create_class(name, superclass_name: T.unsafe(nil), &block); end - # source://tapioca/0.16.1/lib/tapioca/rbi_ext/model.rb#45 + # source://tapioca/0.16.3/lib/tapioca/rbi_ext/model.rb#45 sig { params(name: ::String, value: ::String).void } def create_constant(name, value:); end - # source://tapioca/0.16.1/lib/tapioca/rbi_ext/model.rb#55 + # source://tapioca/0.16.3/lib/tapioca/rbi_ext/model.rb#55 sig { params(name: ::String).void } def create_extend(name); end - # source://tapioca/0.16.1/lib/tapioca/rbi_ext/model.rb#50 + # source://tapioca/0.16.3/lib/tapioca/rbi_ext/model.rb#50 sig { params(name: ::String).void } def create_include(name); end - # source://tapioca/0.16.1/lib/tapioca/rbi_ext/model.rb#90 + # source://tapioca/0.16.3/lib/tapioca/rbi_ext/model.rb#90 sig do params( name: ::String, @@ -2914,19 +3324,19 @@ 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), &block); end - # source://tapioca/0.16.1/lib/tapioca/rbi_ext/model.rb#60 + # source://tapioca/0.16.3/lib/tapioca/rbi_ext/model.rb#60 sig { params(name: ::String).void } def create_mixes_in_class_methods(name); end - # source://tapioca/0.16.1/lib/tapioca/rbi_ext/model.rb#25 + # source://tapioca/0.16.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.16.1/lib/tapioca/rbi_ext/model.rb#9 + # source://tapioca/0.16.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.16.1/lib/tapioca/rbi_ext/model.rb#74 + # source://tapioca/0.16.3/lib/tapioca/rbi_ext/model.rb#74 sig do params( name: ::String, @@ -2951,6 +3361,14 @@ class RBI::Tree < ::RBI::NodeWithComments sig { params(version: ::Gem::Version).void } def filter_versions!(version); end + # source://rbi//lib/rbi/rewriters/flatten_singleton_methods.rb#60 + sig { void } + def flatten_singleton_methods!; end + + # source://rbi//lib/rbi/rewriters/flatten_visibilities.rb#60 + sig { void } + def flatten_visibilities!; end + # source://rbi//lib/rbi/rewriters/group_nodes.rb#81 sig { void } def group_nodes!; end @@ -2970,14 +3388,18 @@ 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//lib/rbi/rewriters/nest_non_public_methods.rb#46 + # source://rbi//lib/rbi/rewriters/nest_non_public_members.rb#46 sig { void } - def nest_non_public_methods!; end + def nest_non_public_members!; end # source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#36 sig { void } def nest_singleton_methods!; end + # source://rbi//lib/rbi/rewriters/nest_top_level_members.rb#63 + sig { void } + def nest_top_level_members!; end + # source://rbi//lib/rbi/model.rb#112 sig { returns(T::Array[::RBI::Node]) } def nodes; end @@ -2992,15 +3414,730 @@ class RBI::Tree < ::RBI::NodeWithComments private - # source://tapioca/0.16.1/lib/tapioca/rbi_ext/model.rb#123 + # source://tapioca/0.16.3/lib/tapioca/rbi_ext/model.rb#123 sig { params(node: ::RBI::Node).returns(::RBI::Node) } def create_node(node); end - # source://tapioca/0.16.1/lib/tapioca/rbi_ext/model.rb#118 + # source://tapioca/0.16.3/lib/tapioca/rbi_ext/model.rb#118 sig { returns(T::Hash[::String, ::RBI::Node]) } def nodes_cache; end end +# The base class for all RBI types. +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/type.rb#6 +class RBI::Type + abstract! + + # source://rbi//lib/rbi/type.rb#699 + sig { void } + def initialize; end + + # @abstract + # + # source://rbi//lib/rbi/type.rb#745 + sig { abstract.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#748 + sig { params(other: ::BasicObject).returns(T::Boolean) } + def eql?(other); end + + # source://rbi//lib/rbi/type.rb#753 + sig { override.returns(::Integer) } + def hash; end + + # Returns a new type that is `nilable` if it is not already. + # + # If the type is already nilable, it returns itself. + # ```ruby + # type = RBI::Type.simple("String") + # type.to_rbi # => "String" + # type.nilable.to_rbi # => "T.nilable(String)" + # type.nilable.nilable.to_rbi # => "T.nilable(String)" + # ``` + # + # source://rbi//lib/rbi/type.rb#713 + sig { returns(::RBI::Type) } + def nilable; end + + # Returns whether the type is nilable. + # + # source://rbi//lib/rbi/type.rb#740 + sig { returns(T::Boolean) } + def nilable?; end + + # Returns the non-nilable version of the type. + # If the type is already non-nilable, it returns itself. + # If the type is nilable, it returns the inner type. + # + # ```ruby + # type = RBI::Type.nilable(RBI::Type.simple("String")) + # type.to_rbi # => "T.nilable(String)" + # type.non_nilable.to_rbi # => "String" + # type.non_nilable.non_nilable.to_rbi # => "String" + # ``` + # + # source://rbi//lib/rbi/type.rb#728 + sig { returns(::RBI::Type) } + def non_nilable; end + + # source://rbi//lib/rbi/rbs_printer.rb#1030 + sig { returns(::String) } + def rbs_string; end + + # @abstract + # + # source://rbi//lib/rbi/type.rb#758 + sig { abstract.returns(::String) } + def to_rbi; end + + # source://rbi//lib/rbi/type.rb#761 + sig { override.returns(::String) } + def to_s; end + + class << self + # Builds a type that represents an intersection of multiple types like `T.all(String, Integer)`. + # + # Note that this method transforms types such as `T.all(String, String)` into `String`, so + # it may return something other than a `All`. + # + # source://rbi//lib/rbi/type.rb#563 + sig { params(type1: ::RBI::Type, type2: ::RBI::Type, types: ::RBI::Type).returns(::RBI::Type) } + def all(type1, type2, *types); end + + # Builds a type that represents a union of multiple types like `T.any(String, Integer)`. + # + # Note that this method transforms types such as `T.any(String, NilClass)` into `T.nilable(String)`, so + # it may return something other than a `Any`. + # + # source://rbi//lib/rbi/type.rb#590 + sig { params(type1: ::RBI::Type, type2: ::RBI::Type, types: ::RBI::Type).returns(::RBI::Type) } + def any(type1, type2, *types); end + + # Builds a type that represents `T.anything`. + # + # source://rbi//lib/rbi/type.rb#488 + sig { returns(::RBI::Type::Anything) } + def anything; end + + # Builds a type that represents `T.attached_class`. + # + # source://rbi//lib/rbi/type.rb#494 + sig { returns(::RBI::Type::AttachedClass) } + def attached_class; end + + # Builds a type that represents `T::Boolean`. + # + # source://rbi//lib/rbi/type.rb#500 + sig { returns(::RBI::Type::Boolean) } + def boolean; end + + # Builds a type that represents the singleton class of another type like `T.class_of(Foo)`. + # + # source://rbi//lib/rbi/type.rb#538 + sig { params(type: ::RBI::Type::Simple, type_parameter: T.nilable(::RBI::Type)).returns(::RBI::Type::ClassOf) } + def class_of(type, type_parameter = T.unsafe(nil)); end + + # Builds a type that represents a generic type like `T::Array[String]` or `T::Hash[Symbol, Integer]`. + # + # source://rbi//lib/rbi/type.rb#655 + sig { params(name: ::String, params: T.any(::RBI::Type, T::Array[::RBI::Type])).returns(::RBI::Type::Generic) } + def generic(name, *params); end + + # Builds a type that represents a nilable of another type like `T.nilable(String)`. + # + # Note that this method transforms types such as `T.nilable(T.untyped)` into `T.untyped`, so + # it may return something other than a `RBI::Type::Nilable`. + # + # source://rbi//lib/rbi/type.rb#547 + sig { params(type: ::RBI::Type).returns(::RBI::Type) } + def nilable(type); end + + # Builds a type that represents `T.noreturn`. + # + # source://rbi//lib/rbi/type.rb#506 + sig { returns(::RBI::Type::NoReturn) } + def noreturn; end + + # source://rbi//lib/rbi/type_parser.rb#26 + sig { params(node: ::Prism::Node).returns(::RBI::Type) } + def parse_node(node); end + + # @raise [Error] + # + # source://rbi//lib/rbi/type_parser.rb#10 + sig { params(string: ::String).returns(::RBI::Type) } + def parse_string(string); end + + # Builds a type that represents a proc type like `T.proc.void`. + # + # source://rbi//lib/rbi/type.rb#683 + sig { returns(::RBI::Type::Proc) } + def proc; end + + # Builds a type that represents `T.self_type`. + # + # source://rbi//lib/rbi/type.rb#512 + sig { returns(::RBI::Type::SelfType) } + def self_type; end + + # Builds a type that represents a shape type like `{name: String, age: Integer}`. + # + # source://rbi//lib/rbi/type.rb#675 + sig { params(types: T::Hash[T.any(::String, ::Symbol), ::RBI::Type]).returns(::RBI::Type::Shape) } + def shape(types = T.unsafe(nil)); end + + # Builds a simple type like `String` or `::Foo::Bar`. + # + # It raises a `NameError` if the name is not a valid Ruby class identifier. + # + # @raise [NameError] + # + # source://rbi//lib/rbi/type.rb#477 + sig { params(name: ::String).returns(::RBI::Type::Simple) } + def simple(name); end + + # Builds a type that represents the class of another type like `T::Class[Foo]`. + # + # source://rbi//lib/rbi/type.rb#532 + sig { params(type: ::RBI::Type).returns(::RBI::Type::Class) } + def t_class(type); end + + # Builds a type that represents a tuple type like `[String, Integer]`. + # + # source://rbi//lib/rbi/type.rb#669 + sig { params(types: T.any(::RBI::Type, T::Array[::RBI::Type])).returns(::RBI::Type::Tuple) } + def tuple(*types); end + + # Builds a type that represents a type parameter like `T.type_parameter(:U)`. + # + # source://rbi//lib/rbi/type.rb#661 + sig { params(name: ::Symbol).returns(::RBI::Type::TypeParameter) } + def type_parameter(name); end + + # Builds a type that represents `T.untyped`. + # + # source://rbi//lib/rbi/type.rb#518 + sig { returns(::RBI::Type::Untyped) } + def untyped; end + + # Builds a type that represents `void`. + # + # source://rbi//lib/rbi/type.rb#524 + sig { returns(::RBI::Type::Void) } + def void; end + + private + + # source://rbi//lib/rbi/type_parser.rb#263 + sig { params(node: ::Prism::CallNode).returns(T::Array[::Prism::Node]) } + def call_chain(node); end + + # source://rbi//lib/rbi/type_parser.rb#250 + sig { params(node: ::Prism::CallNode, count: ::Integer).returns(T::Array[::Prism::Node]) } + def check_arguments_at_least!(node, count); end + + # source://rbi//lib/rbi/type_parser.rb#235 + sig { params(node: ::Prism::CallNode, count: ::Integer).returns(T::Array[::Prism::Node]) } + def check_arguments_exactly!(node, count); end + + # @raise [Error] + # + # source://rbi//lib/rbi/type_parser.rb#69 + sig { params(node: ::Prism::CallNode).returns(::RBI::Type) } + def parse_call(node); end + + # source://rbi//lib/rbi/type_parser.rb#52 + sig { params(node: T.any(::Prism::ConstantPathNode, ::Prism::ConstantReadNode)).returns(::RBI::Type) } + def parse_constant(node); end + + # @raise [Error] + # + # source://rbi//lib/rbi/type_parser.rb#195 + sig { params(node: ::Prism::CallNode).returns(::RBI::Type) } + def parse_proc(node); end + + # source://rbi//lib/rbi/type_parser.rb#176 + sig { params(node: T.any(::Prism::HashNode, ::Prism::KeywordHashNode)).returns(::RBI::Type) } + def parse_shape(node); end + + # source://rbi//lib/rbi/type_parser.rb#171 + sig { params(node: ::Prism::ArrayNode).returns(::RBI::Type) } + def parse_tuple(node); end + + # source://rbi//lib/rbi/type_parser.rb#276 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def t?(node); end + + # source://rbi//lib/rbi/type_parser.rb#288 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def t_boolean?(node); end + + # source://rbi//lib/rbi/type_parser.rb#295 + sig { params(node: ::Prism::ConstantPathNode).returns(T::Boolean) } + def t_class?(node); end + + # source://rbi//lib/rbi/type_parser.rb#300 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def t_class_of?(node); end + + # source://rbi//lib/rbi/type_parser.rb#307 + sig { params(node: ::Prism::CallNode).returns(T::Boolean) } + def t_proc?(node); end + + # source://rbi//lib/rbi/type.rb#693 + sig { params(name: ::String).returns(T::Boolean) } + def valid_identifier?(name); end + end +end + +# A type that is intersection of multiple types like `T.all(String, Integer)`. +# +# source://rbi//lib/rbi/type.rb#252 +class RBI::Type::All < ::RBI::Type::Composite + # source://rbi//lib/rbi/type.rb#256 + sig { override.returns(::String) } + def to_rbi; end +end + +# A type that is union of multiple types like `T.any(String, Integer)`. +# +# source://rbi//lib/rbi/type.rb#262 +class RBI::Type::Any < ::RBI::Type::Composite + # source://rbi//lib/rbi/type.rb#271 + sig { returns(T::Boolean) } + def nilable?; end + + # source://rbi//lib/rbi/type.rb#266 + sig { override.returns(::String) } + def to_rbi; end +end + +# `T.anything`. +# +# source://rbi//lib/rbi/type.rb#43 +class RBI::Type::Anything < ::RBI::Type + # source://rbi//lib/rbi/type.rb#47 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#52 + sig { override.returns(::String) } + def to_rbi; end +end + +# `T.attached_class`. +# +# source://rbi//lib/rbi/type.rb#58 +class RBI::Type::AttachedClass < ::RBI::Type + # source://rbi//lib/rbi/type.rb#62 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#67 + sig { override.returns(::String) } + def to_rbi; end +end + +# `T::Boolean`. +# +# source://rbi//lib/rbi/type.rb#73 +class RBI::Type::Boolean < ::RBI::Type + # source://rbi//lib/rbi/type.rb#77 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#82 + sig { override.returns(::String) } + def to_rbi; end +end + +# The class of another type like `T::Class[Foo]`. +# +# source://rbi//lib/rbi/type.rb#150 +class RBI::Type::Class < ::RBI::Type + # source://rbi//lib/rbi/type.rb#157 + sig { params(type: ::RBI::Type).void } + def initialize(type); end + + # source://rbi//lib/rbi/type.rb#163 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#168 + sig { override.returns(::String) } + def to_rbi; end + + # source://rbi//lib/rbi/type.rb#154 + sig { returns(::RBI::Type) } + def type; end +end + +# The singleton class of another type like `T.class_of(Foo)`. +# +# source://rbi//lib/rbi/type.rb#174 +class RBI::Type::ClassOf < ::RBI::Type + # source://rbi//lib/rbi/type.rb#184 + sig { params(type: ::RBI::Type::Simple, type_parameter: T.nilable(::RBI::Type)).void } + def initialize(type, type_parameter = T.unsafe(nil)); end + + # source://rbi//lib/rbi/type.rb#191 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#196 + sig { override.returns(::String) } + def to_rbi; end + + # source://rbi//lib/rbi/type.rb#178 + sig { returns(::RBI::Type::Simple) } + def type; end + + # source://rbi//lib/rbi/type.rb#181 + sig { returns(T.nilable(::RBI::Type)) } + def type_parameter; end +end + +# A type that is composed of multiple types like `T.all(String, Integer)`. +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/type.rb#230 +class RBI::Type::Composite < ::RBI::Type + abstract! + + # source://rbi//lib/rbi/type.rb#240 + sig { params(types: T::Array[::RBI::Type]).void } + def initialize(types); end + + # source://rbi//lib/rbi/type.rb#246 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#237 + sig { returns(T::Array[::RBI::Type]) } + def types; end +end + +# source://rbi//lib/rbi/type_parser.rb#6 +class RBI::Type::Error < ::RBI::Error; end + +# A generic type like `T::Array[String]` or `T::Hash[Symbol, Integer]`. +# +# source://rbi//lib/rbi/type.rb#279 +class RBI::Type::Generic < ::RBI::Type + # source://rbi//lib/rbi/type.rb#289 + sig { params(name: ::String, params: ::RBI::Type).void } + def initialize(name, *params); end + + # source://rbi//lib/rbi/type.rb#296 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#283 + sig { returns(::String) } + def name; end + + # source://rbi//lib/rbi/type.rb#286 + sig { returns(T::Array[::RBI::Type]) } + def params; end + + # source://rbi//lib/rbi/type.rb#301 + sig { override.returns(::String) } + def to_rbi; end +end + +# A type that can be `nil` like `T.nilable(String)`. +# +# source://rbi//lib/rbi/type.rb#206 +class RBI::Type::Nilable < ::RBI::Type + # source://rbi//lib/rbi/type.rb#213 + sig { params(type: ::RBI::Type).void } + def initialize(type); end + + # source://rbi//lib/rbi/type.rb#219 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#224 + sig { override.returns(::String) } + def to_rbi; end + + # source://rbi//lib/rbi/type.rb#210 + sig { returns(::RBI::Type) } + def type; end +end + +# `T.noreturn`. +# +# source://rbi//lib/rbi/type.rb#88 +class RBI::Type::NoReturn < ::RBI::Type + # source://rbi//lib/rbi/type.rb#92 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#97 + sig { override.returns(::String) } + def to_rbi; end +end + +# A proc type like `T.proc.void`. +# +# source://rbi//lib/rbi/type.rb#387 +class RBI::Type::Proc < ::RBI::Type + # source://rbi//lib/rbi/type.rb#400 + sig { void } + def initialize; end + + # source://rbi//lib/rbi/type.rb#408 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#436 + sig { params(type: T.untyped).returns(T.self_type) } + def bind(type); end + + # source://rbi//lib/rbi/type.rb#418 + sig { params(params: ::RBI::Type).returns(T.self_type) } + def params(**params); end + + # source://rbi//lib/rbi/type.rb#397 + sig { returns(T.nilable(::RBI::Type)) } + def proc_bind; end + + # source://rbi//lib/rbi/type.rb#391 + sig { returns(T::Hash[::Symbol, ::RBI::Type]) } + def proc_params; end + + # source://rbi//lib/rbi/type.rb#394 + sig { returns(::RBI::Type) } + def proc_returns; end + + # source://rbi//lib/rbi/type.rb#424 + sig { params(type: T.untyped).returns(T.self_type) } + def returns(type); end + + # source://rbi//lib/rbi/type.rb#442 + sig { override.returns(::String) } + def to_rbi; end + + # source://rbi//lib/rbi/type.rb#430 + sig { returns(T.self_type) } + def void; end +end + +# `T.self_type`. +# +# source://rbi//lib/rbi/type.rb#103 +class RBI::Type::SelfType < ::RBI::Type + # source://rbi//lib/rbi/type.rb#107 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#112 + sig { override.returns(::String) } + def to_rbi; end +end + +# A shape type like `{name: String, age: Integer}`. +# +# source://rbi//lib/rbi/type.rb#357 +class RBI::Type::Shape < ::RBI::Type + # source://rbi//lib/rbi/type.rb#364 + sig { params(types: T::Hash[T.any(::String, ::Symbol), ::RBI::Type]).void } + def initialize(types); end + + # source://rbi//lib/rbi/type.rb#370 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#375 + sig { override.returns(::String) } + def to_rbi; end + + # source://rbi//lib/rbi/type.rb#361 + sig { returns(T::Hash[T.any(::String, ::Symbol), ::RBI::Type]) } + def types; end +end + +# A type that represents a simple class name like `String` or `Foo`. +# +# It can also be a qualified name like `::Foo` or `Foo::Bar`. +# +# source://rbi//lib/rbi/type.rb#17 +class RBI::Type::Simple < ::RBI::Type + # source://rbi//lib/rbi/type.rb#24 + sig { params(name: ::String).void } + def initialize(name); end + + # source://rbi//lib/rbi/type.rb#30 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#21 + sig { returns(::String) } + def name; end + + # source://rbi//lib/rbi/type.rb#35 + sig { override.returns(::String) } + def to_rbi; end +end + +# A tuple type like `[String, Integer]`. +# +# source://rbi//lib/rbi/type.rb#333 +class RBI::Type::Tuple < ::RBI::Type + # source://rbi//lib/rbi/type.rb#340 + sig { params(types: T::Array[::RBI::Type]).void } + def initialize(types); end + + # source://rbi//lib/rbi/type.rb#346 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#351 + sig { override.returns(::String) } + def to_rbi; end + + # source://rbi//lib/rbi/type.rb#337 + sig { returns(T::Array[::RBI::Type]) } + def types; end +end + +# A type parameter like `T.type_parameter(:U)`. +# +# source://rbi//lib/rbi/type.rb#307 +class RBI::Type::TypeParameter < ::RBI::Type + # source://rbi//lib/rbi/type.rb#314 + sig { params(name: ::Symbol).void } + def initialize(name); end + + # source://rbi//lib/rbi/type.rb#320 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#311 + sig { returns(::Symbol) } + def name; end + + # source://rbi//lib/rbi/type.rb#325 + sig { override.returns(::String) } + def to_rbi; end +end + +# `T.untyped`. +# +# source://rbi//lib/rbi/type.rb#118 +class RBI::Type::Untyped < ::RBI::Type + # source://rbi//lib/rbi/type.rb#122 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#127 + sig { override.returns(::String) } + def to_rbi; end +end + +# source://rbi//lib/rbi/type_visitor.rb#6 +class RBI::Type::Visitor + # source://rbi//lib/rbi/type_visitor.rb#12 + sig { params(node: ::RBI::Type).void } + def visit(node); end + + private + + # source://rbi//lib/rbi/type_visitor.rb#58 + sig { params(type: ::RBI::Type::All).void } + def visit_all(type); end + + # source://rbi//lib/rbi/type_visitor.rb#61 + sig { params(type: ::RBI::Type::Any).void } + def visit_any(type); end + + # source://rbi//lib/rbi/type_visitor.rb#64 + sig { params(type: ::RBI::Type::Anything).void } + def visit_anything(type); end + + # source://rbi//lib/rbi/type_visitor.rb#67 + sig { params(type: ::RBI::Type::AttachedClass).void } + def visit_attached_class(type); end + + # source://rbi//lib/rbi/type_visitor.rb#70 + sig { params(type: ::RBI::Type::Boolean).void } + def visit_boolean(type); end + + # source://rbi//lib/rbi/type_visitor.rb#73 + sig { params(type: ::RBI::Type::Class).void } + def visit_class(type); end + + # source://rbi//lib/rbi/type_visitor.rb#76 + sig { params(type: ::RBI::Type::ClassOf).void } + def visit_class_of(type); end + + # source://rbi//lib/rbi/type_visitor.rb#79 + sig { params(type: ::RBI::Type::Generic).void } + def visit_generic(type); end + + # source://rbi//lib/rbi/type_visitor.rb#82 + sig { params(type: ::RBI::Type::Nilable).void } + def visit_nilable(type); end + + # source://rbi//lib/rbi/type_visitor.rb#88 + sig { params(type: ::RBI::Type::NoReturn).void } + def visit_no_return(type); end + + # source://rbi//lib/rbi/type_visitor.rb#91 + sig { params(type: ::RBI::Type::Proc).void } + def visit_proc(type); end + + # source://rbi//lib/rbi/type_visitor.rb#94 + sig { params(type: ::RBI::Type::SelfType).void } + def visit_self_type(type); end + + # source://rbi//lib/rbi/type_visitor.rb#100 + sig { params(type: ::RBI::Type::Shape).void } + def visit_shape(type); end + + # source://rbi//lib/rbi/type_visitor.rb#85 + sig { params(type: ::RBI::Type::Simple).void } + def visit_simple(type); end + + # source://rbi//lib/rbi/type_visitor.rb#103 + sig { params(type: ::RBI::Type::Tuple).void } + def visit_tuple(type); end + + # source://rbi//lib/rbi/type_visitor.rb#106 + sig { params(type: ::RBI::Type::TypeParameter).void } + def visit_type_parameter(type); end + + # source://rbi//lib/rbi/type_visitor.rb#109 + sig { params(type: ::RBI::Type::Untyped).void } + def visit_untyped(type); end + + # source://rbi//lib/rbi/type_visitor.rb#97 + sig { params(type: ::RBI::Type::Void).void } + def visit_void(type); end +end + +# source://rbi//lib/rbi/type_visitor.rb#9 +class RBI::Type::Visitor::Error < ::RBI::Error; end + +# `void`. +# +# source://rbi//lib/rbi/type.rb#133 +class RBI::Type::Void < ::RBI::Type + # source://rbi//lib/rbi/type.rb#137 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#142 + sig { override.returns(::String) } + def to_rbi; end +end + # source://rbi//lib/rbi/model.rb#1400 class RBI::TypeMember < ::RBI::NodeWithComments include ::RBI::Indexable @@ -3039,6 +4176,99 @@ class RBI::TypeMember < ::RBI::NodeWithComments def value; end end +# source://rbi//lib/rbi/rbs_printer.rb#787 +class RBI::TypePrinter + # source://rbi//lib/rbi/rbs_printer.rb#794 + sig { void } + def initialize; end + + # source://rbi//lib/rbi/rbs_printer.rb#791 + sig { returns(::String) } + def string; end + + # source://rbi//lib/rbi/rbs_printer.rb#799 + sig { params(node: ::RBI::Type).void } + def visit(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#907 + sig { params(type: ::RBI::Type::All).void } + def visit_all(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#917 + sig { params(type: ::RBI::Type::Any).void } + def visit_any(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#864 + sig { params(type: ::RBI::Type::Anything).void } + def visit_anything(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#889 + sig { params(type: ::RBI::Type::AttachedClass).void } + def visit_attached_class(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#848 + sig { params(type: ::RBI::Type::Boolean).void } + def visit_boolean(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#969 + sig { params(type: ::RBI::Type::Class).void } + def visit_class(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#900 + sig { params(type: ::RBI::Type::ClassOf).void } + def visit_class_of(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#853 + sig { params(type: ::RBI::Type::Generic).void } + def visit_generic(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#894 + sig { params(type: ::RBI::Type::Nilable).void } + def visit_nilable(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#874 + sig { params(type: ::RBI::Type::NoReturn).void } + def visit_no_return(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#948 + sig { params(type: ::RBI::Type::Proc).void } + def visit_proc(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#884 + sig { params(type: ::RBI::Type::SelfType).void } + def visit_self_type(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#937 + sig { params(type: ::RBI::Type::Shape).void } + def visit_shape(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#843 + sig { params(type: ::RBI::Type::Simple).void } + def visit_simple(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#927 + sig { params(type: ::RBI::Type::Tuple).void } + def visit_tuple(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#964 + sig { params(type: ::RBI::Type::TypeParameter).void } + def visit_type_parameter(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#879 + sig { params(type: ::RBI::Type::Untyped).void } + def visit_untyped(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#869 + sig { params(type: ::RBI::Type::Void).void } + def visit_void(type); end + + private + + # source://rbi//lib/rbi/rbs_printer.rb#978 + sig { params(type_name: ::String).returns(::String) } + def translate_t_type(type_name); end +end + # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#5 class RBI::UnexpectedMultipleSigsError < ::RBI::Error # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#10 @@ -3081,18 +4311,18 @@ class RBI::Visibility < ::RBI::NodeWithComments def initialize(visibility, loc: T.unsafe(nil), comments: T.unsafe(nil)); end # source://rbi//lib/rbi/model.rb#932 - sig { params(other: ::RBI::Visibility).returns(T::Boolean) } + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end - # source://rbi//lib/rbi/model.rb#947 + # source://rbi//lib/rbi/model.rb#949 sig { returns(T::Boolean) } def private?; end - # source://rbi//lib/rbi/model.rb#942 + # source://rbi//lib/rbi/model.rb#944 sig { returns(T::Boolean) } def protected?; end - # source://rbi//lib/rbi/model.rb#937 + # source://rbi//lib/rbi/model.rb#939 sig { returns(T::Boolean) } def public?; end @@ -3101,13 +4331,13 @@ class RBI::Visibility < ::RBI::NodeWithComments def visibility; end end -# source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#52 +# source://rbi//lib/rbi/rewriters/nest_non_public_members.rb#52 class RBI::VisibilityGroup < ::RBI::Tree - # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#59 + # source://rbi//lib/rbi/rewriters/nest_non_public_members.rb#59 sig { params(visibility: ::RBI::Visibility).void } def initialize(visibility); end - # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#56 + # source://rbi//lib/rbi/rewriters/nest_non_public_members.rb#56 sig { returns(::RBI::Visibility) } def visibility; end end diff --git a/sorbet/rbi/gems/reline@0.5.9.rbi b/sorbet/rbi/gems/reline@0.5.10.rbi similarity index 78% rename from sorbet/rbi/gems/reline@0.5.9.rbi rename to sorbet/rbi/gems/reline@0.5.10.rbi index 6c8a636..676e499 100644 --- a/sorbet/rbi/gems/reline@0.5.9.rbi +++ b/sorbet/rbi/gems/reline@0.5.10.rbi @@ -11,19 +11,19 @@ module Reline extend ::SingleForwardable class << self - # source://reline//lib/reline.rb#483 + # source://reline//lib/reline.rb#486 def core; end - # source://reline//lib/reline.rb#479 + # source://reline//lib/reline.rb#482 def encoding_system_needs; end - # source://reline//lib/reline.rb#460 - def insert_text(*args, &block); end + # source://reline//lib/reline.rb#463 + def insert_text(text); end - # source://reline//lib/reline.rb#503 + # source://reline//lib/reline.rb#506 def line_editor; end - # source://reline//lib/reline.rb#499 + # source://reline//lib/reline.rb#502 def ungetc(c); end end end @@ -46,7 +46,7 @@ class Reline::ANSI < ::Reline::IO # source://reline//lib/reline/io/ansi.rb#248 def cursor_pos; end - # source://reline//lib/reline/io/ansi.rb#359 + # source://reline//lib/reline/io/ansi.rb#366 def deprep(otio); end # @return [Boolean] @@ -94,7 +94,7 @@ class Reline::ANSI < ::Reline::IO # source://reline//lib/reline/io/ansi.rb#158 def output=(val); end - # source://reline//lib/reline/io/ansi.rb#352 + # source://reline//lib/reline/io/ansi.rb#359 def prep; end # source://reline//lib/reline/io/ansi.rb#189 @@ -159,13 +159,13 @@ class Reline::Config # source://reline//lib/reline/config.rb#31 def initialize; end - # source://reline//lib/reline/config.rb#156 + # source://reline//lib/reline/config.rb#162 def add_default_key_binding(keystroke, target); end - # source://reline//lib/reline/config.rb#152 + # source://reline//lib/reline/config.rb#158 def add_default_key_binding_by_keymap(keymap, keystroke, target); end - # source://reline//lib/reline/config.rb#141 + # source://reline//lib/reline/config.rb#147 def add_oneshot_key_binding(keystroke, target); end # Returns the value of attribute autocompletion. @@ -180,10 +180,10 @@ class Reline::Config # source://reline//lib/reline/config.rb#29 def autocompletion=(_arg0); end - # source://reline//lib/reline/config.rb#323 + # source://reline//lib/reline/config.rb#313 def bind_key(key, func_name); end - # source://reline//lib/reline/config.rb#240 + # source://reline//lib/reline/config.rb#246 def bind_variable(name, value, raw_value); end # source://reline//lib/reline/config.rb#26 @@ -204,15 +204,15 @@ class Reline::Config # source://reline//lib/reline/config.rb#26 def disable_completion=(_arg0); end - # source://reline//lib/reline/config.rb#66 + # source://reline//lib/reline/config.rb#72 def editing_mode; end - # source://reline//lib/reline/config.rb#70 + # source://reline//lib/reline/config.rb#76 def editing_mode=(val); end # @return [Boolean] # - # source://reline//lib/reline/config.rb#74 + # source://reline//lib/reline/config.rb#80 def editing_mode_is?(*val); end # source://reline//lib/reline/config.rb#26 @@ -227,7 +227,7 @@ class Reline::Config # source://reline//lib/reline/config.rb#26 def enable_bracketed_paste=(_arg0); end - # source://reline//lib/reline/config.rb#205 + # source://reline//lib/reline/config.rb#211 def handle_directive(directive, file, no, if_stack); end # source://reline//lib/reline/config.rb#26 @@ -236,7 +236,7 @@ class Reline::Config # source://reline//lib/reline/config.rb#26 def history_size=(_arg0); end - # source://reline//lib/reline/config.rb#86 + # source://reline//lib/reline/config.rb#92 def inputrc_path; end # source://reline//lib/reline/config.rb#26 @@ -245,13 +245,13 @@ class Reline::Config # source://reline//lib/reline/config.rb#26 def isearch_terminators=(_arg0); end - # source://reline//lib/reline/config.rb#136 + # source://reline//lib/reline/config.rb#142 def key_bindings; end - # source://reline//lib/reline/config.rb#337 + # source://reline//lib/reline/config.rb#327 def key_notation_to_code(notation); end - # source://reline//lib/reline/config.rb#78 + # source://reline//lib/reline/config.rb#84 def keymap; end # source://reline//lib/reline/config.rb#26 @@ -262,25 +262,31 @@ class Reline::Config # @return [Boolean] # - # source://reline//lib/reline/config.rb#82 + # source://reline//lib/reline/config.rb#88 def loaded?; end - # source://reline//lib/reline/config.rb#371 + # source://reline//lib/reline/config.rb#361 def parse_keyseq(str); end - # source://reline//lib/reline/config.rb#116 + # source://reline//lib/reline/config.rb#122 def read(file = T.unsafe(nil)); end - # source://reline//lib/reline/config.rb#160 + # source://reline//lib/reline/config.rb#166 def read_lines(lines, file = T.unsafe(nil)); end - # source://reline//lib/reline/config.rb#59 + # source://reline//lib/reline/config.rb#369 + def reload; end + + # source://reline//lib/reline/config.rb#35 def reset; end - # source://reline//lib/reline/config.rb#148 + # source://reline//lib/reline/config.rb#154 def reset_oneshot_key_bindings; end - # source://reline//lib/reline/config.rb#318 + # source://reline//lib/reline/config.rb#42 + def reset_variables; end + + # source://reline//lib/reline/config.rb#308 def retrieve_string(str); end # source://reline//lib/reline/config.rb#26 @@ -314,12 +320,12 @@ class Reline::Config private - # source://reline//lib/reline/config.rb#112 + # source://reline//lib/reline/config.rb#118 def default_inputrc_path; end # @return [Boolean] # - # source://reline//lib/reline/config.rb#379 + # source://reline//lib/reline/config.rb#374 def seven_bit_encoding?(encoding); end end @@ -375,7 +381,7 @@ class Reline::Core # source://reline//lib/reline.rb#161 def add_dialog_proc(name_sym, p, context = T.unsafe(nil)); end - # source://reline//lib/reline.rb#406 + # source://reline//lib/reline.rb#409 def ambiguous_width; end # source://reline//lib/reline.rb#54 @@ -577,7 +583,7 @@ class Reline::Core # source://reline//lib/reline.rb#294 def inner_readline(prompt, add_hist, multiline, &confirm_multiline_termination); end - # source://reline//lib/reline.rb#411 + # source://reline//lib/reline.rb#414 def may_req_ambiguous_char_width; end # GNU Readline watis for "keyseq-timeout" milliseconds when the input is @@ -587,7 +593,7 @@ class Reline::Core # `ESC` is ambiguous because it can be a standalone ESC (matched) or part of # `ESC char` or part of CSI sequence (matching). # - # source://reline//lib/reline.rb#376 + # source://reline//lib/reline.rb#379 def read_io(keyseq_timeout, &block); end end @@ -766,7 +772,7 @@ Reline::Face::Config::RESET_SGR = T.let(T.unsafe(nil), String) # source://reline//lib/reline/face.rb#4 Reline::Face::SGR_PARAMETERS = T.let(T.unsafe(nil), Hash) -# source://reline//lib/reline.rb#516 +# source://reline//lib/reline.rb#519 Reline::HISTORY = T.let(T.unsafe(nil), Reline::History) # source://reline//lib/reline/history.rb#1 @@ -829,7 +835,7 @@ end # source://reline//lib/reline/io.rb#4 Reline::IO::RESET_COLOR = T.let(T.unsafe(nil), String) -# source://reline//lib/reline.rb#509 +# source://reline//lib/reline.rb#512 Reline::IOGate = T.let(T.unsafe(nil), Reline::ANSI) # source://reline//lib/reline.rb#21 @@ -1067,7 +1073,7 @@ class Reline::LineEditor # source://reline//lib/reline/line_editor.rb#75 def initialize(config, encoding); end - # source://reline//lib/reline/line_editor.rb#697 + # source://reline//lib/reline/line_editor.rb#681 def add_dialog_proc(name, p, context = T.unsafe(nil)); end # Returns the value of attribute auto_indent_proc. @@ -1087,24 +1093,21 @@ class Reline::LineEditor # source://reline//lib/reline/line_editor.rb#8 def byte_pointer; end - # source://reline//lib/reline/line_editor.rb#1396 + # source://reline//lib/reline/line_editor.rb#1380 def byte_pointer=(val); end - # source://reline//lib/reline/line_editor.rb#399 + # source://reline//lib/reline/line_editor.rb#398 def calculate_overlay_levels(overlay_levels); end - # source://reline//lib/reline/line_editor.rb#1181 + # source://reline//lib/reline/line_editor.rb#1165 def call_completion_proc; end - # source://reline//lib/reline/line_editor.rb#1189 + # source://reline//lib/reline/line_editor.rb#1173 def call_completion_proc_with_checking_args(pre, target, post); end - # source://reline//lib/reline/line_editor.rb#447 + # source://reline//lib/reline/line_editor.rb#446 def clear_dialogs; end - # source://reline//lib/reline/line_editor.rb#467 - def clear_rendered_lines; end - # Returns the value of attribute completion_append_character. # # source://reline//lib/reline/line_editor.rb#11 @@ -1129,7 +1132,7 @@ class Reline::LineEditor # source://reline//lib/reline/line_editor.rb#10 def completion_proc=(_arg0); end - # source://reline//lib/reline/line_editor.rb#1335 + # source://reline//lib/reline/line_editor.rb#1319 def confirm_multiline_termination; end # Returns the value of attribute confirm_multiline_termination_proc. @@ -1144,16 +1147,16 @@ class Reline::LineEditor # source://reline//lib/reline/line_editor.rb#9 def confirm_multiline_termination_proc=(_arg0); end - # source://reline//lib/reline/line_editor.rb#305 + # source://reline//lib/reline/line_editor.rb#304 def current_byte_pointer_cursor; end - # source://reline//lib/reline/line_editor.rb#1232 + # source://reline//lib/reline/line_editor.rb#1216 def current_line; end - # source://reline//lib/reline/line_editor.rb#1362 + # source://reline//lib/reline/line_editor.rb#1346 def delete_text(start = T.unsafe(nil), length = T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#904 + # source://reline//lib/reline/line_editor.rb#888 def dialog_proc_scope_completion_journey_data; end # Returns the value of attribute dig_perfect_match_proc. @@ -1168,50 +1171,50 @@ class Reline::LineEditor # source://reline//lib/reline/line_editor.rb#15 def dig_perfect_match_proc=(_arg0); end - # source://reline//lib/reline/line_editor.rb#806 + # source://reline//lib/reline/line_editor.rb#790 def editing_mode; end # @return [Boolean] # - # source://reline//lib/reline/line_editor.rb#219 + # source://reline//lib/reline/line_editor.rb#218 def eof?; end - # source://reline//lib/reline/line_editor.rb#215 + # source://reline//lib/reline/line_editor.rb#214 def finalize; end - # source://reline//lib/reline/line_editor.rb#1416 + # source://reline//lib/reline/line_editor.rb#1400 def finish; end # @return [Boolean] # - # source://reline//lib/reline/line_editor.rb#1412 + # source://reline//lib/reline/line_editor.rb#1396 def finished?; end # source://reline//lib/reline/line_editor.rb#166 def handle_signal; end - # source://reline//lib/reline/line_editor.rb#1102 + # source://reline//lib/reline/line_editor.rb#1086 def input_key(key); end - # source://reline//lib/reline/line_editor.rb#1340 - def insert_pasted_text(text); end + # source://reline//lib/reline/line_editor.rb#1324 + def insert_multiline_text(text); end - # source://reline//lib/reline/line_editor.rb#1352 + # source://reline//lib/reline/line_editor.rb#1336 def insert_text(text); end # source://reline//lib/reline/line_editor.rb#82 def io_gate; end - # source://reline//lib/reline/line_editor.rb#1228 + # source://reline//lib/reline/line_editor.rb#1212 def line; end - # source://reline//lib/reline/line_editor.rb#352 + # source://reline//lib/reline/line_editor.rb#351 def modified_lines; end - # source://reline//lib/reline/line_editor.rb#274 + # source://reline//lib/reline/line_editor.rb#273 def multiline_off; end - # source://reline//lib/reline/line_editor.rb#270 + # source://reline//lib/reline/line_editor.rb#269 def multiline_on; end # Sets the attribute output @@ -1233,10 +1236,10 @@ class Reline::LineEditor # source://reline//lib/reline/line_editor.rb#12 def output_modifier_proc=(_arg0); end - # source://reline//lib/reline/line_editor.rb#493 - def print_nomultiline_prompt(prompt); end + # source://reline//lib/reline/line_editor.rb#471 + def print_nomultiline_prompt; end - # source://reline//lib/reline/line_editor.rb#358 + # source://reline//lib/reline/line_editor.rb#357 def prompt_list; end # Returns the value of attribute prompt_proc. @@ -1251,138 +1254,135 @@ class Reline::LineEditor # source://reline//lib/reline/line_editor.rb#13 def prompt_proc=(_arg0); end - # source://reline//lib/reline/line_editor.rb#1152 + # source://reline//lib/reline/line_editor.rb#1136 def push_input_lines; end - # source://reline//lib/reline/line_editor.rb#502 - def render_differential; end + # source://reline//lib/reline/line_editor.rb#476 + def render; end - # source://reline//lib/reline/line_editor.rb#462 + # source://reline//lib/reline/line_editor.rb#461 def render_finished; end - # source://reline//lib/reline/line_editor.rb#484 - def render_full_content; end - - # source://reline//lib/reline/line_editor.rb#407 + # source://reline//lib/reline/line_editor.rb#406 def render_line_differential(old_items, new_items); end - # source://reline//lib/reline/line_editor.rb#570 + # source://reline//lib/reline/line_editor.rb#554 def rerender; end # source://reline//lib/reline/line_editor.rb#139 def reset(prompt = T.unsafe(nil), encoding:); end - # source://reline//lib/reline/line_editor.rb#261 + # source://reline//lib/reline/line_editor.rb#260 def reset_line; end - # source://reline//lib/reline/line_editor.rb#223 + # source://reline//lib/reline/line_editor.rb#222 def reset_variables(prompt = T.unsafe(nil), encoding:); end - # source://reline//lib/reline/line_editor.rb#566 + # source://reline//lib/reline/line_editor.rb#550 def rest_height(wrapped_cursor_y); end - # source://reline//lib/reline/line_editor.rb#1259 + # source://reline//lib/reline/line_editor.rb#1243 def retrieve_completion_block(set_completion_quote_character = T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#1148 + # source://reline//lib/reline/line_editor.rb#1132 def save_old_buffer; end - # source://reline//lib/reline/line_editor.rb#364 + # source://reline//lib/reline/line_editor.rb#363 def screen_height; end - # source://reline//lib/reline/line_editor.rb#372 + # source://reline//lib/reline/line_editor.rb#371 def screen_scroll_top; end - # source://reline//lib/reline/line_editor.rb#368 + # source://reline//lib/reline/line_editor.rb#367 def screen_width; end - # source://reline//lib/reline/line_editor.rb#1171 + # source://reline//lib/reline/line_editor.rb#1155 def scroll_into_view; end - # source://reline//lib/reline/line_editor.rb#1236 + # source://reline//lib/reline/line_editor.rb#1220 def set_current_line(line, byte_pointer = T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#1247 + # source://reline//lib/reline/line_editor.rb#1231 def set_current_lines(lines, byte_pointer = T.unsafe(nil), line_index = T.unsafe(nil)); end # source://reline//lib/reline/line_editor.rb#86 def set_pasting_state(in_pasting); end - # source://reline//lib/reline/line_editor.rb#206 + # source://reline//lib/reline/line_editor.rb#205 def set_signal_handlers; end - # source://reline//lib/reline/line_editor.rb#1164 + # source://reline//lib/reline/line_editor.rb#1148 def trim_input_lines; end - # source://reline//lib/reline/line_editor.rb#1092 + # source://reline//lib/reline/line_editor.rb#1076 def update(key); end - # source://reline//lib/reline/line_editor.rb#454 + # source://reline//lib/reline/line_editor.rb#453 def update_dialogs(key = T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#562 + # source://reline//lib/reline/line_editor.rb#546 def upper_space_height(wrapped_cursor_y); end - # source://reline//lib/reline/line_editor.rb#1404 + # source://reline//lib/reline/line_editor.rb#1388 def whole_buffer; end - # source://reline//lib/reline/line_editor.rb#1400 + # source://reline//lib/reline/line_editor.rb#1384 def whole_lines; end - # source://reline//lib/reline/line_editor.rb#344 + # source://reline//lib/reline/line_editor.rb#343 def with_cache(key, *deps); end - # source://reline//lib/reline/line_editor.rb#978 + # source://reline//lib/reline/line_editor.rb#962 def wrap_method_call(method_symbol, method_obj, key, with_operator = T.unsafe(nil)); end # Calculate cursor position in word wrapped content. # - # source://reline//lib/reline/line_editor.rb#438 + # source://reline//lib/reline/line_editor.rb#437 def wrapped_cursor_position; end - # source://reline//lib/reline/line_editor.rb#376 + # source://reline//lib/reline/line_editor.rb#375 def wrapped_prompt_and_input_lines; end private # @return [Boolean] # - # source://reline//lib/reline/line_editor.rb#968 + # source://reline//lib/reline/line_editor.rb#952 def argumentable?(method_obj); end - # source://reline//lib/reline/line_editor.rb#1571 + # source://reline//lib/reline/line_editor.rb#1555 def backward_char(key, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#1874 + # source://reline//lib/reline/line_editor.rb#1858 def backward_delete_char(key, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#2017 + # source://reline//lib/reline/line_editor.rb#2000 def backward_kill_word(key); end - # source://reline//lib/reline/line_editor.rb#1999 + # source://reline//lib/reline/line_editor.rb#1982 def backward_word(key); end - # source://reline//lib/reline/line_editor.rb#1588 + # source://reline//lib/reline/line_editor.rb#1572 def beginning_of_line(key); end # @return [Boolean] # - # source://reline//lib/reline/line_editor.rb#1408 + # source://reline//lib/reline/line_editor.rb#1392 def buffer_empty?; end - # source://reline//lib/reline/line_editor.rb#1427 + # source://reline//lib/reline/line_editor.rb#1411 def byteinsert(str, byte_pointer, other); end - # source://reline//lib/reline/line_editor.rb#1421 + # source://reline//lib/reline/line_editor.rb#1405 def byteslice!(str, byte_pointer, size); end - # source://reline//lib/reline/line_editor.rb#309 + # source://reline//lib/reline/line_editor.rb#308 def calculate_nearest_cursor(cursor); end - # source://reline//lib/reline/line_editor.rb#1434 + # source://reline//lib/reline/line_editor.rb#1418 def calculate_width(str, allow_escape_code = T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#2057 + # source://reline//lib/reline/line_editor.rb#2040 def capitalize_word(key); end # source://reline//lib/reline/line_editor.rb#93 @@ -1391,52 +1391,55 @@ class Reline::LineEditor # source://reline//lib/reline/line_editor.rb#107 def check_multiline_prompt(buffer, mode_string); end - # source://reline//lib/reline/line_editor.rb#998 + # source://reline//lib/reline/line_editor.rb#982 def cleanup_waiting; end - # source://reline//lib/reline/line_editor.rb#1982 + # source://reline//lib/reline/line_editor.rb#541 + def clear_rendered_screen_cache; end + + # source://reline//lib/reline/line_editor.rb#1966 def clear_screen(key); end - # source://reline//lib/reline/line_editor.rb#1454 + # source://reline//lib/reline/line_editor.rb#1438 def complete(_key); end - # source://reline//lib/reline/line_editor.rb#814 + # source://reline//lib/reline/line_editor.rb#798 def complete_internal_proc(list, is_menu); end - # source://reline//lib/reline/line_editor.rb#1471 + # source://reline//lib/reline/line_editor.rb#1455 def completion_journey_move(direction); end - # source://reline//lib/reline/line_editor.rb#1487 + # source://reline//lib/reline/line_editor.rb#1471 def completion_journey_up(_key); end - # source://reline//lib/reline/line_editor.rb#2103 + # source://reline//lib/reline/line_editor.rb#2086 def copy_for_vi(text); end - # source://reline//lib/reline/line_editor.rb#1939 + # source://reline//lib/reline/line_editor.rb#1923 def delete_char(key); end - # source://reline//lib/reline/line_editor.rb#1954 + # source://reline//lib/reline/line_editor.rb#1938 def delete_char_or_list(key); end - # source://reline//lib/reline/line_editor.rb#708 + # source://reline//lib/reline/line_editor.rb#692 def dialog_range(dialog, dialog_y); end - # source://reline//lib/reline/line_editor.rb#2067 + # source://reline//lib/reline/line_editor.rb#2050 def downcase_word(key); end - # source://reline//lib/reline/line_editor.rb#2352 + # source://reline//lib/reline/line_editor.rb#2339 def ed_argument_digit(key); end - # source://reline//lib/reline/line_editor.rb#1982 + # source://reline//lib/reline/line_editor.rb#1966 def ed_clear_screen(key); end - # source://reline//lib/reline/line_editor.rb#2298 + # source://reline//lib/reline/line_editor.rb#2285 def ed_delete_next_char(key, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#2214 + # source://reline//lib/reline/line_editor.rb#2197 def ed_delete_prev_char(key, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#2017 + # source://reline//lib/reline/line_editor.rb#2000 def ed_delete_prev_word(key); end # Editline:: +ed-insert+ (vi input: almost all; emacs: printable characters) @@ -1453,7 +1456,7 @@ class Reline::LineEditor # million. # GNU Readline:: +self-insert+ (a, b, A, 1, !, …) Insert yourself. # - # source://reline//lib/reline/line_editor.rb#1514 + # source://reline//lib/reline/line_editor.rb#1498 def ed_digit(key); end # Editline:: +ed-insert+ (vi input: almost all; emacs: printable characters) @@ -1470,7 +1473,7 @@ class Reline::LineEditor # million. # GNU Readline:: +self-insert+ (a, b, A, 1, !, …) Insert yourself. # - # source://reline//lib/reline/line_editor.rb#1514 + # source://reline//lib/reline/line_editor.rb#1498 def ed_insert(key); end # Editline:: +ed-kill-line+ (vi command: +D+, +Ctrl-K+; emacs: +Ctrl-K+, @@ -1479,69 +1482,69 @@ class Reline::LineEditor # the line. With a negative numeric argument, kill backward # from the cursor to the beginning of the current line. # - # source://reline//lib/reline/line_editor.rb#1895 + # source://reline//lib/reline/line_editor.rb#1879 def ed_kill_line(key); end - # source://reline//lib/reline/line_editor.rb#1588 + # source://reline//lib/reline/line_editor.rb#1572 def ed_move_to_beg(key); end - # source://reline//lib/reline/line_editor.rb#1594 + # source://reline//lib/reline/line_editor.rb#1578 def ed_move_to_end(key); end - # source://reline//lib/reline/line_editor.rb#1845 + # source://reline//lib/reline/line_editor.rb#1829 def ed_newline(key); end - # source://reline//lib/reline/line_editor.rb#1558 + # source://reline//lib/reline/line_editor.rb#1542 def ed_next_char(key, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#1828 + # source://reline//lib/reline/line_editor.rb#1812 def ed_next_history(key, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#1571 + # source://reline//lib/reline/line_editor.rb#1555 def ed_prev_char(key, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#1811 + # source://reline//lib/reline/line_editor.rb#1795 def ed_prev_history(key, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#1999 + # source://reline//lib/reline/line_editor.rb#1982 def ed_prev_word(key); end - # source://reline//lib/reline/line_editor.rb#1542 + # source://reline//lib/reline/line_editor.rb#1526 def ed_quoted_insert(str, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#1774 + # source://reline//lib/reline/line_editor.rb#1758 def ed_search_next_history(key, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#1759 + # source://reline//lib/reline/line_editor.rb#1743 def ed_search_prev_history(key, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#2027 + # source://reline//lib/reline/line_editor.rb#2010 def ed_transpose_chars(key); end - # source://reline//lib/reline/line_editor.rb#2044 + # source://reline//lib/reline/line_editor.rb#2027 def ed_transpose_words(key); end # do nothing # - # source://reline//lib/reline/line_editor.rb#1493 + # source://reline//lib/reline/line_editor.rb#1477 def ed_unassigned(key); end - # source://reline//lib/reline/line_editor.rb#2057 + # source://reline//lib/reline/line_editor.rb#2040 def em_capitol_case(key); end - # source://reline//lib/reline/line_editor.rb#1939 + # source://reline//lib/reline/line_editor.rb#1923 def em_delete(key); end - # source://reline//lib/reline/line_editor.rb#2007 + # source://reline//lib/reline/line_editor.rb#1990 def em_delete_next_word(key); end - # source://reline//lib/reline/line_editor.rb#1954 + # source://reline//lib/reline/line_editor.rb#1938 def em_delete_or_list(key); end - # source://reline//lib/reline/line_editor.rb#1874 + # source://reline//lib/reline/line_editor.rb#1858 def em_delete_prev_char(key, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#2514 + # source://reline//lib/reline/line_editor.rb#2501 def em_exchange_mark(key); end # Editline:: +em-kill-line+ (not bound) Delete the entire contents of the @@ -1549,78 +1552,78 @@ class Reline::LineEditor # GNU Readline:: +kill-whole-line+ (not bound) Kill all characters on the # current line, no matter where point is. # - # source://reline//lib/reline/line_editor.rb#1931 + # source://reline//lib/reline/line_editor.rb#1915 def em_kill_line(key); end - # source://reline//lib/reline/line_editor.rb#2093 + # source://reline//lib/reline/line_editor.rb#2076 def em_kill_region(key); end - # source://reline//lib/reline/line_editor.rb#2067 + # source://reline//lib/reline/line_editor.rb#2050 def em_lower_case(key); end - # source://reline//lib/reline/line_editor.rb#1991 + # source://reline//lib/reline/line_editor.rb#1974 def em_next_word(key); end - # source://reline//lib/reline/line_editor.rb#2509 + # source://reline//lib/reline/line_editor.rb#2496 def em_set_mark(key); end - # source://reline//lib/reline/line_editor.rb#2080 + # source://reline//lib/reline/line_editor.rb#2063 def em_upper_case(key); end - # source://reline//lib/reline/line_editor.rb#1966 + # source://reline//lib/reline/line_editor.rb#1950 def em_yank(key); end - # source://reline//lib/reline/line_editor.rb#1972 + # source://reline//lib/reline/line_editor.rb#1956 def em_yank_pop(key); end - # source://reline//lib/reline/line_editor.rb#2522 + # source://reline//lib/reline/line_editor.rb#2509 def emacs_editing_mode(key); end - # source://reline//lib/reline/line_editor.rb#1594 + # source://reline//lib/reline/line_editor.rb#1578 def end_of_line(key); end - # source://reline//lib/reline/line_editor.rb#2514 + # source://reline//lib/reline/line_editor.rb#2501 def exchange_point_and_mark(key); end - # source://reline//lib/reline/line_editor.rb#1558 + # source://reline//lib/reline/line_editor.rb#1542 def forward_char(key, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#1744 + # source://reline//lib/reline/line_editor.rb#1728 def forward_search_history(key); end - # source://reline//lib/reline/line_editor.rb#1991 + # source://reline//lib/reline/line_editor.rb#1974 def forward_word(key); end - # source://reline//lib/reline/line_editor.rb#1599 + # source://reline//lib/reline/line_editor.rb#1583 def generate_searcher(search_key); end - # source://reline//lib/reline/line_editor.rb#184 + # source://reline//lib/reline/line_editor.rb#183 def handle_interrupted; end # source://reline//lib/reline/line_editor.rb#171 def handle_resized; end - # source://reline//lib/reline/line_editor.rb#1759 + # source://reline//lib/reline/line_editor.rb#1743 def history_search_backward(key, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#1774 + # source://reline//lib/reline/line_editor.rb#1758 def history_search_forward(key, arg: T.unsafe(nil)); end # @return [Boolean] # - # source://reline//lib/reline/line_editor.rb#972 + # source://reline//lib/reline/line_editor.rb#956 def inclusive?(method_obj); end - # source://reline//lib/reline/line_editor.rb#1683 + # source://reline//lib/reline/line_editor.rb#1667 def incremental_search_history(key); end - # source://reline//lib/reline/line_editor.rb#278 + # source://reline//lib/reline/line_editor.rb#277 def insert_new_line(cursor_line, next_line); end - # source://reline//lib/reline/line_editor.rb#1438 + # source://reline//lib/reline/line_editor.rb#1422 def key_delete(key); end - # source://reline//lib/reline/line_editor.rb#1446 + # source://reline//lib/reline/line_editor.rb#1430 def key_newline(key); end # Editline:: +ed-kill-line+ (vi command: +D+, +Ctrl-K+; emacs: +Ctrl-K+, @@ -1629,7 +1632,7 @@ class Reline::LineEditor # the line. With a negative numeric argument, kill backward # from the cursor to the beginning of the current line. # - # source://reline//lib/reline/line_editor.rb#1895 + # source://reline//lib/reline/line_editor.rb#1879 def kill_line(key); end # Editline:: +em-kill-line+ (not bound) Delete the entire contents of the @@ -1637,76 +1640,85 @@ class Reline::LineEditor # GNU Readline:: +kill-whole-line+ (not bound) Kill all characters on the # current line, no matter where point is. # - # source://reline//lib/reline/line_editor.rb#1931 + # source://reline//lib/reline/line_editor.rb#1915 def kill_whole_line(key); end - # source://reline//lib/reline/line_editor.rb#2007 + # source://reline//lib/reline/line_editor.rb#1990 def kill_word(key); end - # source://reline//lib/reline/line_editor.rb#810 + # source://reline//lib/reline/line_editor.rb#794 def menu(_target, list); end - # source://reline//lib/reline/line_editor.rb#1479 + # source://reline//lib/reline/line_editor.rb#1463 def menu_complete(_key); end - # source://reline//lib/reline/line_editor.rb#1483 + # source://reline//lib/reline/line_editor.rb#1467 def menu_complete_backward(_key); end - # source://reline//lib/reline/line_editor.rb#798 + # source://reline//lib/reline/line_editor.rb#782 def modify_lines(before, complete); end - # source://reline//lib/reline/line_editor.rb#917 + # source://reline//lib/reline/line_editor.rb#901 def move_completed_list(direction); end - # source://reline//lib/reline/line_editor.rb#1789 + # source://reline//lib/reline/line_editor.rb#1773 def move_history(history_pointer, line:, cursor:, save_buffer: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#1828 + # source://reline//lib/reline/line_editor.rb#1812 def next_history(key, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#1070 + # source://reline//lib/reline/line_editor.rb#1054 def normal_char(key); end - # source://reline//lib/reline/line_editor.rb#860 + # source://reline//lib/reline/line_editor.rb#844 def perform_completion(list, just_show_list); end - # source://reline//lib/reline/line_editor.rb#2550 + # source://reline//lib/reline/line_editor.rb#2537 def prev_action_state_value(type); end - # source://reline//lib/reline/line_editor.rb#1811 + # source://reline//lib/reline/line_editor.rb#1795 def previous_history(key, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#1211 + # source://reline//lib/reline/line_editor.rb#1195 def process_auto_indent(line_index = T.unsafe(nil), cursor_dependent: T.unsafe(nil), add_newline: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#1495 + # source://reline//lib/reline/line_editor.rb#1479 def process_insert(force: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#1006 + # source://reline//lib/reline/line_editor.rb#990 def process_key(key, method_symbol); end - # source://reline//lib/reline/line_editor.rb#1542 + # source://reline//lib/reline/line_editor.rb#1526 def quoted_insert(str, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#2540 + # source://reline//lib/reline/line_editor.rb#2545 + def re_read_init_file(_key); end + + # source://reline//lib/reline/line_editor.rb#2527 def redo(_key); end - # source://reline//lib/reline/line_editor.rb#929 + # Reflects lines to be rendered and new cursor position to the screen + # by calculating the difference from the previous render. + # + # source://reline//lib/reline/line_editor.rb#508 + def render_differential(new_lines, new_cursor_x, new_cursor_y); end + + # source://reline//lib/reline/line_editor.rb#913 def retrieve_completion_journey_state; end - # source://reline//lib/reline/line_editor.rb#1739 + # source://reline//lib/reline/line_editor.rb#1723 def reverse_search_history(key); end - # source://reline//lib/reline/line_editor.rb#944 + # source://reline//lib/reline/line_editor.rb#928 def run_for_operators(key, method_symbol, &block); end - # source://reline//lib/reline/line_editor.rb#1749 + # source://reline//lib/reline/line_editor.rb#1733 def search_history(prefix, pointer_range); end - # source://reline//lib/reline/line_editor.rb#2410 + # source://reline//lib/reline/line_editor.rb#2397 def search_next_char(key, arg, need_prev_char: T.unsafe(nil), inclusive: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#2462 + # source://reline//lib/reline/line_editor.rb#2449 def search_prev_char(key, arg, need_next_char = T.unsafe(nil)); end # Editline:: +ed-insert+ (vi input: almost all; emacs: printable characters) @@ -1723,25 +1735,25 @@ class Reline::LineEditor # million. # GNU Readline:: +self-insert+ (a, b, A, 1, !, …) Insert yourself. # - # source://reline//lib/reline/line_editor.rb#1514 + # source://reline//lib/reline/line_editor.rb#1498 def self_insert(key); end - # source://reline//lib/reline/line_editor.rb#2509 + # source://reline//lib/reline/line_editor.rb#2496 def set_mark(key); end - # source://reline//lib/reline/line_editor.rb#2554 + # source://reline//lib/reline/line_editor.rb#2541 def set_next_action_state(type, value); end - # source://reline//lib/reline/line_editor.rb#301 + # source://reline//lib/reline/line_editor.rb#300 def split_by_width(str, max_width, offset: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#2027 + # source://reline//lib/reline/line_editor.rb#2010 def transpose_chars(key); end - # source://reline//lib/reline/line_editor.rb#2044 + # source://reline//lib/reline/line_editor.rb#2027 def transpose_words(key); end - # source://reline//lib/reline/line_editor.rb#2530 + # source://reline//lib/reline/line_editor.rb#2517 def undo(_key); end # Editline:: +vi-kill-line-prev+ (vi: +Ctrl-U+) Delete the string from the @@ -1750,75 +1762,75 @@ class Reline::LineEditor # GNU Readline:: +unix-line-discard+ (+C-u+) Kill backward from the cursor # to the beginning of the current line. # - # source://reline//lib/reline/line_editor.rb#1918 + # source://reline//lib/reline/line_editor.rb#1902 def unix_line_discard(key); end - # source://reline//lib/reline/line_editor.rb#2093 + # source://reline//lib/reline/line_editor.rb#2076 def unix_word_rubout(key); end - # source://reline//lib/reline/line_editor.rb#2080 + # source://reline//lib/reline/line_editor.rb#2063 def upcase_word(key); end - # source://reline//lib/reline/line_editor.rb#714 + # source://reline//lib/reline/line_editor.rb#698 def update_each_dialog(dialog, cursor_column, cursor_row, key = T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#2113 + # source://reline//lib/reline/line_editor.rb#2096 def vi_add(key); end - # source://reline//lib/reline/line_editor.rb#2209 + # source://reline//lib/reline/line_editor.rb#2192 def vi_add_at_eol(key); end - # source://reline//lib/reline/line_editor.rb#2228 + # source://reline//lib/reline/line_editor.rb#2211 def vi_change_meta(key, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#2240 + # source://reline//lib/reline/line_editor.rb#2223 def vi_change_meta_confirm(byte_pointer_diff); end # Editline:: +vi_change_to_eol+ (vi command: +C+) + Kill and change from the cursor to the end of the line. # - # source://reline//lib/reline/line_editor.rb#1907 + # source://reline//lib/reline/line_editor.rb#1891 def vi_change_to_eol(key); end - # source://reline//lib/reline/line_editor.rb#2118 + # source://reline//lib/reline/line_editor.rb#2101 def vi_command_mode(key); end - # source://reline//lib/reline/line_editor.rb#2246 + # source://reline//lib/reline/line_editor.rb#2229 def vi_delete_meta(key, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#2257 + # source://reline//lib/reline/line_editor.rb#2240 def vi_delete_meta_confirm(byte_pointer_diff); end - # source://reline//lib/reline/line_editor.rb#2190 + # source://reline//lib/reline/line_editor.rb#2173 def vi_delete_prev_char(key); end - # source://reline//lib/reline/line_editor.rb#2526 + # source://reline//lib/reline/line_editor.rb#2513 def vi_editing_mode(key); end - # source://reline//lib/reline/line_editor.rb#2175 + # source://reline//lib/reline/line_editor.rb#2158 def vi_end_big_word(key, arg: T.unsafe(nil), inclusive: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#2287 + # source://reline//lib/reline/line_editor.rb#2274 def vi_end_of_transmission(key); end - # source://reline//lib/reline/line_editor.rb#2142 + # source://reline//lib/reline/line_editor.rb#2125 def vi_end_word(key, arg: T.unsafe(nil), inclusive: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#2287 + # source://reline//lib/reline/line_editor.rb#2274 def vi_eof_maybe(key); end - # source://reline//lib/reline/line_editor.rb#1584 + # source://reline//lib/reline/line_editor.rb#1568 def vi_first_print(key); end - # source://reline//lib/reline/line_editor.rb#2321 + # source://reline//lib/reline/line_editor.rb#2308 def vi_histedit(key); end - # source://reline//lib/reline/line_editor.rb#2109 + # source://reline//lib/reline/line_editor.rb#2092 def vi_insert(key); end - # source://reline//lib/reline/line_editor.rb#2204 + # source://reline//lib/reline/line_editor.rb#2187 def vi_insert_at_bol(key); end - # source://reline//lib/reline/line_editor.rb#2500 + # source://reline//lib/reline/line_editor.rb#2487 def vi_join_lines(key, arg: T.unsafe(nil)); end # Editline:: +vi-kill-line-prev+ (vi: +Ctrl-U+) Delete the string from the @@ -1827,73 +1839,73 @@ class Reline::LineEditor # GNU Readline:: +unix-line-discard+ (+C-u+) Kill backward from the cursor # to the beginning of the current line. # - # source://reline//lib/reline/line_editor.rb#1918 + # source://reline//lib/reline/line_editor.rb#1902 def vi_kill_line_prev(key); end - # source://reline//lib/reline/line_editor.rb#2287 + # source://reline//lib/reline/line_editor.rb#2274 def vi_list_or_eof(key); end - # source://reline//lib/reline/line_editor.rb#2118 + # source://reline//lib/reline/line_editor.rb#2101 def vi_movement_mode(key); end - # source://reline//lib/reline/line_editor.rb#2157 + # source://reline//lib/reline/line_editor.rb#2140 def vi_next_big_word(key, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#2402 + # source://reline//lib/reline/line_editor.rb#2389 def vi_next_char(key, arg: T.unsafe(nil), inclusive: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#2124 + # source://reline//lib/reline/line_editor.rb#2107 def vi_next_word(key, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#2342 + # source://reline//lib/reline/line_editor.rb#2329 def vi_paste_next(key, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#2333 + # source://reline//lib/reline/line_editor.rb#2320 def vi_paste_prev(key, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#2166 + # source://reline//lib/reline/line_editor.rb#2149 def vi_prev_big_word(key, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#2454 + # source://reline//lib/reline/line_editor.rb#2441 def vi_prev_char(key, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#2133 + # source://reline//lib/reline/line_editor.rb#2116 def vi_prev_word(key, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#2378 + # source://reline//lib/reline/line_editor.rb#2365 def vi_replace_char(key, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#1744 + # source://reline//lib/reline/line_editor.rb#1728 def vi_search_next(key); end - # source://reline//lib/reline/line_editor.rb#1739 + # source://reline//lib/reline/line_editor.rb#1723 def vi_search_prev(key); end - # source://reline//lib/reline/line_editor.rb#2369 + # source://reline//lib/reline/line_editor.rb#2356 def vi_to_column(key, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#2314 + # source://reline//lib/reline/line_editor.rb#2301 def vi_to_history_line(key); end - # source://reline//lib/reline/line_editor.rb#2406 + # source://reline//lib/reline/line_editor.rb#2393 def vi_to_next_char(key, arg: T.unsafe(nil), inclusive: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#2458 + # source://reline//lib/reline/line_editor.rb#2445 def vi_to_prev_char(key, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#2267 + # source://reline//lib/reline/line_editor.rb#2252 def vi_yank(key, arg: T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#2278 + # source://reline//lib/reline/line_editor.rb#2263 def vi_yank_confirm(byte_pointer_diff); end - # source://reline//lib/reline/line_editor.rb#1588 + # source://reline//lib/reline/line_editor.rb#1572 def vi_zero(key); end - # source://reline//lib/reline/line_editor.rb#1966 + # source://reline//lib/reline/line_editor.rb#1950 def yank(key); end - # source://reline//lib/reline/line_editor.rb#1972 + # source://reline//lib/reline/line_editor.rb#1956 def yank_pop(key); end end @@ -1989,161 +2001,161 @@ Reline::LineEditor::CompletionState::NORMAL = T.let(T.unsafe(nil), Symbol) # source://reline//lib/reline/line_editor.rb#42 Reline::LineEditor::CompletionState::PERFECT_MATCH = T.let(T.unsafe(nil), Symbol) -# source://reline//lib/reline/line_editor.rb#706 +# source://reline//lib/reline/line_editor.rb#690 Reline::LineEditor::DIALOG_DEFAULT_HEIGHT = T.let(T.unsafe(nil), Integer) -# source://reline//lib/reline/line_editor.rb#652 +# source://reline//lib/reline/line_editor.rb#636 class Reline::LineEditor::Dialog # @return [Dialog] a new instance of Dialog # - # source://reline//lib/reline/line_editor.rb#656 + # source://reline//lib/reline/line_editor.rb#640 def initialize(name, config, proc_scope); end - # source://reline//lib/reline/line_editor.rb#680 + # source://reline//lib/reline/line_editor.rb#664 def call(key); end # Returns the value of attribute column. # - # source://reline//lib/reline/line_editor.rb#654 + # source://reline//lib/reline/line_editor.rb#638 def column; end # Sets the attribute column # # @param value the value to set the attribute column to. # - # source://reline//lib/reline/line_editor.rb#654 + # source://reline//lib/reline/line_editor.rb#638 def column=(_arg0); end # Returns the value of attribute contents. # - # source://reline//lib/reline/line_editor.rb#653 + # source://reline//lib/reline/line_editor.rb#637 def contents; end - # source://reline//lib/reline/line_editor.rb#673 + # source://reline//lib/reline/line_editor.rb#657 def contents=(contents); end # Returns the value of attribute name. # - # source://reline//lib/reline/line_editor.rb#653 + # source://reline//lib/reline/line_editor.rb#637 def name; end # Returns the value of attribute pointer. # - # source://reline//lib/reline/line_editor.rb#654 + # source://reline//lib/reline/line_editor.rb#638 def pointer; end # Sets the attribute pointer # # @param value the value to set the attribute pointer to. # - # source://reline//lib/reline/line_editor.rb#654 + # source://reline//lib/reline/line_editor.rb#638 def pointer=(_arg0); end # Returns the value of attribute scroll_top. # - # source://reline//lib/reline/line_editor.rb#654 + # source://reline//lib/reline/line_editor.rb#638 def scroll_top; end # Sets the attribute scroll_top # # @param value the value to set the attribute scroll_top to. # - # source://reline//lib/reline/line_editor.rb#654 + # source://reline//lib/reline/line_editor.rb#638 def scroll_top=(_arg0); end - # source://reline//lib/reline/line_editor.rb#665 + # source://reline//lib/reline/line_editor.rb#649 def set_cursor_pos(col, row); end # Returns the value of attribute trap_key. # - # source://reline//lib/reline/line_editor.rb#654 + # source://reline//lib/reline/line_editor.rb#638 def trap_key; end # Sets the attribute trap_key # # @param value the value to set the attribute trap_key to. # - # source://reline//lib/reline/line_editor.rb#654 + # source://reline//lib/reline/line_editor.rb#638 def trap_key=(_arg0); end # Returns the value of attribute vertical_offset. # - # source://reline//lib/reline/line_editor.rb#654 + # source://reline//lib/reline/line_editor.rb#638 def vertical_offset; end # Sets the attribute vertical_offset # # @param value the value to set the attribute vertical_offset to. # - # source://reline//lib/reline/line_editor.rb#654 + # source://reline//lib/reline/line_editor.rb#638 def vertical_offset=(_arg0); end # Returns the value of attribute width. # - # source://reline//lib/reline/line_editor.rb#653 + # source://reline//lib/reline/line_editor.rb#637 def width; end - # source://reline//lib/reline/line_editor.rb#669 + # source://reline//lib/reline/line_editor.rb#653 def width=(v); end end -# source://reline//lib/reline/line_editor.rb#574 +# source://reline//lib/reline/line_editor.rb#558 class Reline::LineEditor::DialogProcScope # @return [DialogProcScope] a new instance of DialogProcScope # - # source://reline//lib/reline/line_editor.rb#577 + # source://reline//lib/reline/line_editor.rb#561 def initialize(line_editor, config, proc_to_exec, context); end - # source://reline//lib/reline/line_editor.rb#647 + # source://reline//lib/reline/line_editor.rb#631 def call; end - # source://reline//lib/reline/line_editor.rb#593 + # source://reline//lib/reline/line_editor.rb#577 def call_completion_proc_with_checking_args(pre, target, post); end - # source://reline//lib/reline/line_editor.rb#639 + # source://reline//lib/reline/line_editor.rb#623 def completion_journey_data; end - # source://reline//lib/reline/line_editor.rb#643 + # source://reline//lib/reline/line_editor.rb#627 def config; end - # source://reline//lib/reline/line_editor.rb#585 + # source://reline//lib/reline/line_editor.rb#569 def context; end - # source://reline//lib/reline/line_editor.rb#618 + # source://reline//lib/reline/line_editor.rb#602 def cursor_pos; end - # source://reline//lib/reline/line_editor.rb#601 + # source://reline//lib/reline/line_editor.rb#585 def dialog; end - # source://reline//lib/reline/line_editor.rb#622 + # source://reline//lib/reline/line_editor.rb#606 def just_cursor_moving; end - # source://reline//lib/reline/line_editor.rb#614 + # source://reline//lib/reline/line_editor.rb#598 def key; end - # source://reline//lib/reline/line_editor.rb#634 + # source://reline//lib/reline/line_editor.rb#618 def preferred_dialog_height; end - # source://reline//lib/reline/line_editor.rb#589 + # source://reline//lib/reline/line_editor.rb#573 def retrieve_completion_block(set_completion_quote_character = T.unsafe(nil)); end - # source://reline//lib/reline/line_editor.rb#630 + # source://reline//lib/reline/line_editor.rb#614 def screen_height; end - # source://reline//lib/reline/line_editor.rb#626 + # source://reline//lib/reline/line_editor.rb#610 def screen_width; end - # source://reline//lib/reline/line_editor.rb#605 + # source://reline//lib/reline/line_editor.rb#589 def set_cursor_pos(col, row); end - # source://reline//lib/reline/line_editor.rb#597 + # source://reline//lib/reline/line_editor.rb#581 def set_dialog(dialog); end - # source://reline//lib/reline/line_editor.rb#610 + # source://reline//lib/reline/line_editor.rb#594 def set_key(key); end end -# source://reline//lib/reline/line_editor.rb#575 +# source://reline//lib/reline/line_editor.rb#559 class Reline::LineEditor::DialogProcScope::CompletionJourneyData < ::Struct # Returns the value of attribute list # @@ -2198,7 +2210,7 @@ class Reline::LineEditor::DialogProcScope::CompletionJourneyData < ::Struct end end -# source://reline//lib/reline/line_editor.rb#1163 +# source://reline//lib/reline/line_editor.rb#1147 Reline::LineEditor::MAX_INPUT_LINES = T.let(T.unsafe(nil), Integer) # source://reline//lib/reline/line_editor.rb#73 @@ -2332,66 +2344,66 @@ Reline::USERNAME_COMPLETION_PROC = T.let(T.unsafe(nil), T.untyped) # source://reline//lib/reline/unicode.rb#1 class Reline::Unicode class << self - # source://reline//lib/reline/unicode.rb#107 + # source://reline//lib/reline/unicode.rb#82 def calculate_width(str, allow_escape_code = T.unsafe(nil)); end - # source://reline//lib/reline/unicode.rb#361 + # source://reline//lib/reline/unicode.rb#336 def ed_transpose_words(line, byte_pointer); end - # source://reline//lib/reline/unicode.rb#321 + # source://reline//lib/reline/unicode.rb#296 def em_backward_word(line, byte_pointer); end - # source://reline//lib/reline/unicode.rb#341 + # source://reline//lib/reline/unicode.rb#316 def em_big_backward_word(line, byte_pointer); end - # source://reline//lib/reline/unicode.rb#272 + # source://reline//lib/reline/unicode.rb#247 def em_forward_word(line, byte_pointer); end - # source://reline//lib/reline/unicode.rb#292 + # source://reline//lib/reline/unicode.rb#267 def em_forward_word_with_capitalization(line, byte_pointer); end # source://reline//lib/reline/unicode.rb#44 def escape_for_print(str); end - # source://reline//lib/reline/unicode.rb#87 + # source://reline//lib/reline/unicode.rb#59 def get_mbchar_width(mbchar); end - # source://reline//lib/reline/unicode.rb#258 + # source://reline//lib/reline/unicode.rb#233 def get_next_mbchar_size(line, byte_pointer); end - # source://reline//lib/reline/unicode.rb#263 + # source://reline//lib/reline/unicode.rb#238 def get_prev_mbchar_size(line, byte_pointer); end - # source://reline//lib/reline/unicode.rb#133 + # source://reline//lib/reline/unicode.rb#108 def split_by_width(str, max_width, encoding = T.unsafe(nil), offset: T.unsafe(nil)); end - # source://reline//lib/reline/unicode.rb#187 + # source://reline//lib/reline/unicode.rb#162 def take_mbchar_range(str, start_col, width, cover_begin: T.unsafe(nil), cover_end: T.unsafe(nil), padding: T.unsafe(nil)); end # Take a chunk of a String cut by width with escape sequences. # - # source://reline//lib/reline/unicode.rb#183 + # source://reline//lib/reline/unicode.rb#158 def take_range(str, start_col, max_width); end - # source://reline//lib/reline/unicode.rb#650 + # source://reline//lib/reline/unicode.rb#625 def vi_backward_word(line, byte_pointer); end - # source://reline//lib/reline/unicode.rb#512 + # source://reline//lib/reline/unicode.rb#487 def vi_big_backward_word(line, byte_pointer); end - # source://reline//lib/reline/unicode.rb#482 + # source://reline//lib/reline/unicode.rb#457 def vi_big_forward_end_word(line, byte_pointer); end - # source://reline//lib/reline/unicode.rb#462 + # source://reline//lib/reline/unicode.rb#437 def vi_big_forward_word(line, byte_pointer); end - # source://reline//lib/reline/unicode.rb#682 + # source://reline//lib/reline/unicode.rb#657 def vi_first_print(line); end - # source://reline//lib/reline/unicode.rb#573 + # source://reline//lib/reline/unicode.rb#548 def vi_forward_end_word(line, byte_pointer); end - # source://reline//lib/reline/unicode.rb#532 + # source://reline//lib/reline/unicode.rb#507 def vi_forward_word(line, byte_pointer, drop_terminate_spaces = T.unsafe(nil)); end end end @@ -2399,35 +2411,11 @@ end # source://reline//lib/reline/unicode.rb#40 Reline::Unicode::CSI_REGEXP = T.let(T.unsafe(nil), Regexp) -# Ambiguous -# -# source://reline//lib/reline/unicode/east_asian_width.rb#158 -Reline::Unicode::EastAsianWidth::TYPE_A = T.let(T.unsafe(nil), Regexp) - -# Fullwidth -# -# source://reline//lib/reline/unicode/east_asian_width.rb#6 -Reline::Unicode::EastAsianWidth::TYPE_F = T.let(T.unsafe(nil), Regexp) - -# Halfwidth -# -# source://reline//lib/reline/unicode/east_asian_width.rb#13 -Reline::Unicode::EastAsianWidth::TYPE_H = T.let(T.unsafe(nil), Regexp) +# source://reline//lib/reline/unicode/east_asian_width.rb#5 +Reline::Unicode::EastAsianWidth::CHUNK_LAST = T.let(T.unsafe(nil), Array) -# Neutral -# -# source://reline//lib/reline/unicode/east_asian_width.rb#341 -Reline::Unicode::EastAsianWidth::TYPE_N = T.let(T.unsafe(nil), Regexp) - -# Narrow -# -# source://reline//lib/reline/unicode/east_asian_width.rb#147 -Reline::Unicode::EastAsianWidth::TYPE_NA = T.let(T.unsafe(nil), Regexp) - -# Wide -# -# source://reline//lib/reline/unicode/east_asian_width.rb#24 -Reline::Unicode::EastAsianWidth::TYPE_W = T.let(T.unsafe(nil), Regexp) +# source://reline//lib/reline/unicode/east_asian_width.rb#5 +Reline::Unicode::EastAsianWidth::CHUNK_WIDTH = T.let(T.unsafe(nil), Array) # C-? C-8 # @@ -2437,12 +2425,6 @@ Reline::Unicode::EscapedChars = T.let(T.unsafe(nil), Array) # source://reline//lib/reline/unicode.rb#2 Reline::Unicode::EscapedPairs = T.let(T.unsafe(nil), Hash) -# source://reline//lib/reline/unicode.rb#59 -Reline::Unicode::HalfwidthDakutenHandakuten = T.let(T.unsafe(nil), Regexp) - -# source://reline//lib/reline/unicode.rb#61 -Reline::Unicode::MBCharWidthRE = T.let(T.unsafe(nil), Regexp) - # source://reline//lib/reline/unicode.rb#39 Reline::Unicode::NON_PRINTING_END = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/rexml@3.3.6.rbi b/sorbet/rbi/gems/rexml@3.3.6.rbi deleted file mode 100644 index ba7066b..0000000 --- a/sorbet/rbi/gems/rexml@3.3.6.rbi +++ /dev/null @@ -1,4813 +0,0 @@ -# typed: false - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `rexml` gem. -# Please instead update this file by running `bin/tapioca gem rexml`. - - -# This class needs: -# * Documentation -# * Work! Not all types of attlists are intelligently parsed, so we just -# spew back out what we get in. This works, but it would be better if -# we formatted the output ourselves. -# -# AttlistDecls provide *just* enough support to allow namespace -# declarations. If you need some sort of generalized support, or have an -# interesting idea about how to map the hideous, terrible design of DTD -# AttlistDecls onto an intuitive Ruby interface, let me know. I'm desperate -# for anything to make DTDs more palateable. -# -# source://rexml//lib/rexml/attlistdecl.rb#18 -class REXML::AttlistDecl < ::REXML::Child - include ::Enumerable - - # Create an AttlistDecl, pulling the information from a Source. Notice - # that this isn't very convenient; to create an AttlistDecl, you basically - # have to format it yourself, and then have the initializer parse it. - # Sorry, but for the foreseeable future, DTD support in REXML is pretty - # weak on convenience. Have I mentioned how much I hate DTDs? - # - # @return [AttlistDecl] a new instance of AttlistDecl - # - # source://rexml//lib/rexml/attlistdecl.rb#29 - def initialize(source); end - - # Access the attlist attribute/value pairs. - # value = attlist_decl[ attribute_name ] - # - # source://rexml//lib/rexml/attlistdecl.rb#38 - def [](key); end - - # Iterate over the key/value pairs: - # attlist_decl.each { |attribute_name, attribute_value| ... } - # - # source://rexml//lib/rexml/attlistdecl.rb#50 - def each(&block); end - - # What is this? Got me. - # - # source://rexml//lib/rexml/attlistdecl.rb#22 - def element_name; end - - # Whether an attlist declaration includes the given attribute definition - # if attlist_decl.include? "xmlns:foobar" - # - # @return [Boolean] - # - # source://rexml//lib/rexml/attlistdecl.rb#44 - def include?(key); end - - # source://rexml//lib/rexml/attlistdecl.rb#59 - def node_type; end - - # Write out exactly what we got in. - # - # source://rexml//lib/rexml/attlistdecl.rb#55 - def write(out, indent = T.unsafe(nil)); end -end - -# Defines an Element Attribute; IE, a attribute=value pair, as in: -# . Attributes can be in their own -# namespaces. General users of REXML will not interact with the -# Attribute class much. -# -# source://rexml//lib/rexml/attribute.rb#10 -class REXML::Attribute - include ::REXML::Node - include ::REXML::XMLTokens - include ::REXML::Namespace - - # Constructor. - # FIXME: The parser doesn't catch illegal characters in attributes - # - # first:: - # Either: an Attribute, which this new attribute will become a - # clone of; or a String, which is the name of this attribute - # second:: - # If +first+ is an Attribute, then this may be an Element, or nil. - # If nil, then the Element parent of this attribute is the parent - # of the +first+ Attribute. If the first argument is a String, - # then this must also be a String, and is the content of the attribute. - # If this is the content, it must be fully normalized (contain no - # illegal characters). - # parent:: - # Ignored unless +first+ is a String; otherwise, may be the Element - # parent of this attribute, or nil. - # - # - # Attribute.new( attribute_to_clone ) - # Attribute.new( attribute_to_clone, parent_element ) - # Attribute.new( "attr", "attr_value" ) - # Attribute.new( "attr", "attr_value", parent_element ) - # - # @return [Attribute] a new instance of Attribute - # - # source://rexml//lib/rexml/attribute.rb#42 - def initialize(first, second = T.unsafe(nil), parent = T.unsafe(nil)); end - - # Returns true if other is an Attribute and has the same name and value, - # false otherwise. - # - # source://rexml//lib/rexml/attribute.rb#106 - def ==(other); end - - # Returns a copy of this attribute - # - # source://rexml//lib/rexml/attribute.rb#163 - def clone; end - - # source://rexml//lib/rexml/attribute.rb#132 - def doctype; end - - # The element to which this attribute belongs - # - # source://rexml//lib/rexml/attribute.rb#15 - def element; end - - # Sets the element of which this object is an attribute. Normally, this - # is not directly called. - # - # Returns this attribute - # - # source://rexml//lib/rexml/attribute.rb#171 - def element=(element); end - - # Creates (and returns) a hash from both the name and value - # - # source://rexml//lib/rexml/attribute.rb#111 - def hash; end - - # source://rexml//lib/rexml/attribute.rb#197 - def inspect; end - - # Returns the namespace URL, if defined, or nil otherwise - # - # e = Element.new("el") - # e.add_namespace("ns", "http://url") - # e.add_attribute("ns:a", "b") - # e.add_attribute("nsx:a", "c") - # e.attribute("ns:a").namespace # => "http://url" - # e.attribute("nsx:a").namespace # => nil - # - # This method always returns "" for no namespace attribute. Because - # the default namespace doesn't apply to attribute names. - # - # From https://www.w3.org/TR/xml-names/#uniqAttrs - # - # > the default namespace does not apply to attribute names - # - # e = REXML::Element.new("el") - # e.add_namespace("", "http://example.com/") - # e.namespace # => "http://example.com/" - # e.add_attribute("a", "b") - # e.attribute("a").namespace # => "" - # - # source://rexml//lib/rexml/attribute.rb#95 - def namespace(arg = T.unsafe(nil)); end - - # source://rexml//lib/rexml/attribute.rb#193 - def node_type; end - - # The normalized value of this attribute. That is, the attribute with - # entities intact. - # - # source://rexml//lib/rexml/attribute.rb#157 - def normalized=(new_normalized); end - - # Returns the namespace of the attribute. - # - # e = Element.new( "elns:myelement" ) - # e.add_attribute( "nsa:a", "aval" ) - # e.add_attribute( "b", "bval" ) - # e.attributes.get_attribute( "a" ).prefix # -> "nsa" - # e.attributes.get_attribute( "b" ).prefix # -> "" - # a = Attribute.new( "x", "y" ) - # a.prefix # -> "" - # - # source://rexml//lib/rexml/attribute.rb#70 - def prefix; end - - # Removes this Attribute from the tree, and returns true if successful - # - # This method is usually not called directly. - # - # source://rexml//lib/rexml/attribute.rb#184 - def remove; end - - # Returns the attribute value, with entities replaced - # - # source://rexml//lib/rexml/attribute.rb#140 - def to_s; end - - # Returns this attribute out as XML source, expanding the name - # - # a = Attribute.new( "x", "y" ) - # a.to_string # -> "x='y'" - # b = Attribute.new( "ns:x", "y" ) - # b.to_string # -> "ns:x='y'" - # - # source://rexml//lib/rexml/attribute.rb#121 - def to_string; end - - # Returns the UNNORMALIZED value of this attribute. That is, entities - # have been expanded to their values - # - # source://rexml//lib/rexml/attribute.rb#149 - def value; end - - # Writes this attribute (EG, puts 'key="value"' to the output) - # - # source://rexml//lib/rexml/attribute.rb#189 - def write(output, indent = T.unsafe(nil)); end - - # source://rexml//lib/rexml/attribute.rb#203 - def xpath; end -end - -# A class that defines the set of Attributes of an Element and provides -# operations for accessing elements in that set. -# -# source://rexml//lib/rexml/element.rb#2137 -class REXML::Attributes < ::Hash - # :call-seq: - # new(element) - # - # Creates and returns a new \REXML::Attributes object. - # The element given by argument +element+ is stored, - # but its own attributes are not modified: - # - # ele = REXML::Element.new('foo') - # attrs = REXML::Attributes.new(ele) - # attrs.object_id == ele.attributes.object_id # => false - # - # Other instance methods in class \REXML::Attributes may refer to: - # - # - +element.document+. - # - +element.prefix+. - # - +element.expanded_name+. - # - # @return [Attributes] a new instance of Attributes - # - # source://rexml//lib/rexml/element.rb#2156 - def initialize(element); end - - # :call-seq: - # add(attribute) -> attribute - # - # Adds attribute +attribute+, replacing the previous - # attribute of the same name if it exists; - # returns +attribute+: - # - # xml_string = <<-EOT - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # ele = d.root.elements['//ele'] # => - # attrs = ele.attributes - # attrs # => {"att"=>{"foo"=>foo:att='1', "bar"=>bar:att='2', ""=>att='<'}} - # attrs.add(REXML::Attribute.new('foo:att', '2')) # => foo:att='2' - # attrs.add(REXML::Attribute.new('baz', '3')) # => baz='3' - # attrs.include?('baz') # => true - # - # source://rexml//lib/rexml/element.rb#2522 - def <<(attribute); end - - # :call-seq: - # [name] -> attribute_value or nil - # - # Returns the value for the attribute given by +name+, - # if it exists; otherwise +nil+. - # The value returned is the unnormalized attribute value, - # with entities expanded: - # - # xml_string = <<-EOT - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # ele = d.elements['//ele'] # => - # ele.attributes['att'] # => "<" - # ele.attributes['bar:att'] # => "2" - # ele.attributes['nosuch'] # => nil - # - # Related: get_attribute (returns an \Attribute object). - # - # source://rexml//lib/rexml/element.rb#2181 - def [](name); end - - # :call-seq: - # [name] = value -> value - # - # When +value+ is non-+nil+, - # assigns that to the attribute for the given +name+, - # overwriting the previous value if it exists: - # - # xml_string = <<-EOT - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # ele = d.root.elements['//ele'] # => - # attrs = ele.attributes - # attrs['foo:att'] = '2' # => "2" - # attrs['baz:att'] = '3' # => "3" - # - # When +value+ is +nil+, deletes the attribute if it exists: - # - # attrs['baz:att'] = nil - # attrs.include?('baz:att') # => false - # - # source://rexml//lib/rexml/element.rb#2365 - def []=(name, value); end - - # :call-seq: - # add(attribute) -> attribute - # - # Adds attribute +attribute+, replacing the previous - # attribute of the same name if it exists; - # returns +attribute+: - # - # xml_string = <<-EOT - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # ele = d.root.elements['//ele'] # => - # attrs = ele.attributes - # attrs # => {"att"=>{"foo"=>foo:att='1', "bar"=>bar:att='2', ""=>att='<'}} - # attrs.add(REXML::Attribute.new('foo:att', '2')) # => foo:att='2' - # attrs.add(REXML::Attribute.new('baz', '3')) # => baz='3' - # attrs.include?('baz') # => true - # - # source://rexml//lib/rexml/element.rb#2522 - def add(attribute); end - - # :call-seq: - # delete(name) -> element - # delete(attribute) -> element - # - # Removes a specified attribute if it exists; - # returns the attributes' element. - # - # When string argument +name+ is given, - # removes the attribute of that name if it exists: - # - # xml_string = <<-EOT - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # ele = d.root.elements['//ele'] # => - # attrs = ele.attributes - # attrs.delete('foo:att') # => - # attrs.delete('foo:att') # => - # - # When attribute argument +attribute+ is given, - # removes that attribute if it exists: - # - # attr = REXML::Attribute.new('bar:att', '2') - # attrs.delete(attr) # => # => - # attrs.delete(attr) # => # => - # - # source://rexml//lib/rexml/element.rb#2475 - def delete(attribute); end - - # :call-seq: - # delete_all(name) -> array_of_removed_attributes - # - # Removes all attributes matching the given +name+; - # returns an array of the removed attributes: - # - # xml_string = <<-EOT - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # ele = d.root.elements['//ele'] # => - # attrs = ele.attributes - # attrs.delete_all('att') # => [att='<'] - # - # source://rexml//lib/rexml/element.rb#2544 - def delete_all(name); end - - # :call-seq: - # each {|expanded_name, value| ... } - # - # Calls the given block with each expanded-name/value pair: - # - # xml_string = <<-EOT - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # ele = d.root.elements['//ele'] # => - # ele.attributes.each do |expanded_name, value| - # p [expanded_name, value] - # end - # - # Output: - # - # ["foo:att", "1"] - # ["bar:att", "2"] - # ["att", "<"] - # - # source://rexml//lib/rexml/element.rb#2283 - def each; end - - # :call-seq: - # each_attribute {|attr| ... } - # - # Calls the given block with each \REXML::Attribute object: - # - # xml_string = <<-EOT - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # ele = d.root.elements['//ele'] # => - # ele.attributes.each_attribute do |attr| - # p [attr.class, attr] - # end - # - # Output: - # - # [REXML::Attribute, foo:att='1'] - # [REXML::Attribute, bar:att='2'] - # [REXML::Attribute, att='<'] - # - # source://rexml//lib/rexml/element.rb#2250 - def each_attribute; end - - # :call-seq: - # get_attribute(name) -> attribute_object or nil - # - # Returns the \REXML::Attribute object for the given +name+: - # - # xml_string = <<-EOT - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # ele = d.root.elements['//ele'] # => - # attrs = ele.attributes - # attrs.get_attribute('foo:att') # => foo:att='1' - # attrs.get_attribute('foo:att').class # => REXML::Attribute - # attrs.get_attribute('bar:att') # => bar:att='2' - # attrs.get_attribute('att') # => att='<' - # attrs.get_attribute('nosuch') # => nil - # - # source://rexml//lib/rexml/element.rb#2309 - def get_attribute(name); end - - # :call-seq: - # get_attribute_ns(namespace, name) - # - # Returns the \REXML::Attribute object among the attributes - # that matches the given +namespace+ and +name+: - # - # xml_string = <<-EOT - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # ele = d.root.elements['//ele'] # => - # attrs = ele.attributes - # attrs.get_attribute_ns('http://foo', 'att') # => foo:att='1' - # attrs.get_attribute_ns('http://foo', 'nosuch') # => nil - # - # source://rexml//lib/rexml/element.rb#2570 - def get_attribute_ns(namespace, name); end - - # :call-seq: - # length - # - # Returns the count of attributes: - # - # xml_string = <<-EOT - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # ele = d.root.elements['//ele'] # => - # ele.attributes.length # => 3 - # - # source://rexml//lib/rexml/element.rb#2221 - def length; end - - # :call-seq: - # namespaces - # - # Returns a hash of name/value pairs for the namespaces: - # - # xml_string = '' - # d = REXML::Document.new(xml_string) - # d.root.attributes.namespaces # => {"xmlns"=>"foo", "x"=>"bar", "y"=>"twee"} - # - # source://rexml//lib/rexml/element.rb#2431 - def namespaces; end - - # :call-seq: - # prefixes -> array_of_prefix_strings - # - # Returns an array of prefix strings in the attributes. - # The array does not include the default - # namespace declaration, if one exists. - # - # xml_string = '' - # d = REXML::Document.new(xml_string) - # d.root.attributes.prefixes # => ["x", "y"] - # - # source://rexml//lib/rexml/element.rb#2406 - def prefixes; end - - # :call-seq: - # length - # - # Returns the count of attributes: - # - # xml_string = <<-EOT - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # ele = d.root.elements['//ele'] # => - # ele.attributes.length # => 3 - # - # source://rexml//lib/rexml/element.rb#2221 - def size; end - - # :call-seq: - # to_a -> array_of_attribute_objects - # - # Returns an array of \REXML::Attribute objects representing - # the attributes: - # - # xml_string = <<-EOT - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # ele = d.root.elements['//ele'] # => - # attrs = ele.attributes.to_a # => [foo:att='1', bar:att='2', att='<'] - # attrs.first.class # => REXML::Attribute - # - # source://rexml//lib/rexml/element.rb#2203 - def to_a; end -end - -# source://rexml//lib/rexml/cdata.rb#5 -class REXML::CData < ::REXML::Text - # Constructor. CData is data between - # - # _Examples_ - # CData.new( source ) - # CData.new( "Here is some CDATA" ) - # CData.new( "Some unprocessed data", respect_whitespace_TF, parent_element ) - # - # @return [CData] a new instance of CData - # - # source://rexml//lib/rexml/cdata.rb#16 - def initialize(first, whitespace = T.unsafe(nil), parent = T.unsafe(nil)); end - - # Make a copy of this object - # - # _Examples_ - # c = CData.new( "Some text" ) - # d = c.clone - # d.to_s # -> "Some text" - # - # source://rexml//lib/rexml/cdata.rb#26 - def clone; end - - # Returns the content of this CData object - # - # _Examples_ - # c = CData.new( "Some text" ) - # c.to_s # -> "Some text" - # - # source://rexml//lib/rexml/cdata.rb#35 - def to_s; end - - # source://rexml//lib/rexml/cdata.rb#39 - def value; end - - # == DEPRECATED - # See the rexml/formatters package - # - # Generates XML output of this object - # - # output:: - # Where to write the string. Defaults to $stdout - # indent:: - # The amount to indent this node by - # transitive:: - # Ignored - # ie_hack:: - # Ignored - # - # _Examples_ - # c = CData.new( " Some text " ) - # c.write( $stdout ) #-> - # - # source://rexml//lib/rexml/cdata.rb#60 - def write(output = T.unsafe(nil), indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end -end - -# A Child object is something contained by a parent, and this class -# contains methods to support that. Most user code will not use this -# class directly. -# -# source://rexml//lib/rexml/child.rb#9 -class REXML::Child - include ::REXML::Node - - # Constructor. Any inheritors of this class should call super to make - # sure this method is called. - # parent:: - # if supplied, the parent of this child will be set to the - # supplied value, and self will be added to the parent - # - # @return [Child] a new instance of Child - # - # source://rexml//lib/rexml/child.rb#18 - def initialize(parent = T.unsafe(nil)); end - - # This doesn't yet handle encodings - # - # source://rexml//lib/rexml/child.rb#91 - def bytes; end - - # Returns:: the document this child belongs to, or nil if this child - # belongs to no document - # - # source://rexml//lib/rexml/child.rb#85 - def document; end - - # source://rexml//lib/rexml/node.rb#11 - def next_sibling; end - - # Sets the next sibling of this child. This can be used to insert a child - # after some other child. - # a = Element.new("a") - # b = a.add_element("b") - # c = Element.new("c") - # b.next_sibling = c - # # => - # - # source://rexml//lib/rexml/child.rb#68 - def next_sibling=(other); end - - # The Parent of this object - # - # source://rexml//lib/rexml/child.rb#11 - def parent; end - - # Sets the parent of this child to the supplied argument. - # - # other:: - # Must be a Parent object. If this object is the same object as the - # existing parent of this child, no action is taken. Otherwise, this - # child is removed from the current parent (if one exists), and is added - # to the new parent. - # Returns:: The parent added - # - # source://rexml//lib/rexml/child.rb#52 - def parent=(other); end - - # source://rexml//lib/rexml/node.rb#17 - def previous_sibling; end - - # Sets the previous sibling of this child. This can be used to insert a - # child before some other child. - # a = Element.new("a") - # b = a.add_element("b") - # c = Element.new("c") - # b.previous_sibling = c - # # => - # - # source://rexml//lib/rexml/child.rb#79 - def previous_sibling=(other); end - - # Removes this child from the parent. - # - # Returns:: self - # - # source://rexml//lib/rexml/child.rb#37 - def remove; end - - # Replaces this object with another object. Basically, calls - # Parent.replace_child - # - # Returns:: self - # - # source://rexml//lib/rexml/child.rb#29 - def replace_with(child); end -end - -# Represents an XML comment; that is, text between \ -# -# source://rexml//lib/rexml/comment.rb#7 -class REXML::Comment < ::REXML::Child - include ::Comparable - - # Constructor. The first argument can be one of three types: - # argument. If Comment, the argument is duplicated. If - # Source, the argument is scanned for a comment. - # should be nil, not supplied, or a Parent to be set as the parent - # of this object - # - # @param first If String, the contents of this comment are set to the - # @param second If the first argument is a Source, this argument - # @return [Comment] a new instance of Comment - # - # source://rexml//lib/rexml/comment.rb#24 - def initialize(first, second = T.unsafe(nil)); end - - # Compares this Comment to another; the contents of the comment are used - # in the comparison. - # - # source://rexml//lib/rexml/comment.rb#63 - def <=>(other); end - - # Compares this Comment to another; the contents of the comment are used - # in the comparison. - # - # source://rexml//lib/rexml/comment.rb#70 - def ==(other); end - - # source://rexml//lib/rexml/comment.rb#33 - def clone; end - - # source://rexml//lib/rexml/comment.rb#75 - def node_type; end - - # The content text - # - # source://rexml//lib/rexml/comment.rb#14 - def string; end - - # The content text - # - # source://rexml//lib/rexml/comment.rb#14 - def string=(_arg0); end - - # The content text - # - # source://rexml//lib/rexml/comment.rb#14 - def to_s; end - - # == DEPRECATED - # See REXML::Formatters - # - # output:: - # Where to write the string - # indent:: - # An integer. If -1, no indenting will be used; otherwise, the - # indentation will be this number of spaces, and children will be - # indented an additional amount. - # transitive:: - # Ignored by this class. The contents of comments are never modified. - # ie_hack:: - # Needed for conformity to the child API, but not used by this class. - # - # source://rexml//lib/rexml/comment.rb#50 - def write(output, indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end -end - -# source://rexml//lib/rexml/xpath_parser.rb#11 -module REXML::DClonable; end - -# This is an abstract class. You never use this directly; it serves as a -# parent class for the specific declarations. -# -# source://rexml//lib/rexml/doctype.rb#242 -class REXML::Declaration < ::REXML::Child - # @return [Declaration] a new instance of Declaration - # - # source://rexml//lib/rexml/doctype.rb#243 - def initialize(src); end - - # source://rexml//lib/rexml/doctype.rb#248 - def to_s; end - - # == DEPRECATED - # See REXML::Formatters - # - # source://rexml//lib/rexml/doctype.rb#255 - def write(output, indent); end -end - -# Represents an XML DOCTYPE declaration; that is, the contents of . DOCTYPES can be used to declare the DTD of a document, as well as -# being used to declare entities used in the document. -# -# source://rexml//lib/rexml/doctype.rb#51 -class REXML::DocType < ::REXML::Parent - include ::REXML::XMLTokens - - # Constructor - # - # dt = DocType.new( 'foo', '-//I/Hate/External/IDs' ) - # # - # dt = DocType.new( doctype_to_clone ) - # # Incomplete. Shallow clone of doctype - # - # +Note+ that the constructor: - # - # Doctype.new( Source.new( "" ) ) - # - # is _deprecated_. Do not use it. It will probably disappear. - # - # @return [DocType] a new instance of DocType - # - # source://rexml//lib/rexml/doctype.rb#80 - def initialize(first, parent = T.unsafe(nil)); end - - # source://rexml//lib/rexml/doctype.rb#185 - def add(child); end - - # source://rexml//lib/rexml/doctype.rb#125 - def attribute_of(element, attribute); end - - # source://rexml//lib/rexml/doctype.rb#115 - def attributes_of(element); end - - # source://rexml//lib/rexml/doctype.rb#135 - def clone; end - - # source://rexml//lib/rexml/doctype.rb#173 - def context; end - - # name is the name of the doctype - # external_id is the referenced DTD, if given - # - # source://rexml//lib/rexml/doctype.rb#66 - def entities; end - - # source://rexml//lib/rexml/doctype.rb#181 - def entity(name); end - - # name is the name of the doctype - # external_id is the referenced DTD, if given - # - # source://rexml//lib/rexml/doctype.rb#66 - def external_id; end - - # name is the name of the doctype - # external_id is the referenced DTD, if given - # - # source://rexml//lib/rexml/doctype.rb#66 - def name; end - - # name is the name of the doctype - # external_id is the referenced DTD, if given - # - # source://rexml//lib/rexml/doctype.rb#66 - def namespaces; end - - # source://rexml//lib/rexml/doctype.rb#111 - def node_type; end - - # Retrieves a named notation. Only notations declared in the internal - # DTD subset can be retrieved. - # - # Method contributed by Henrik Martensson - # - # source://rexml//lib/rexml/doctype.rb#229 - def notation(name); end - - # This method returns a list of notations that have been declared in the - # _internal_ DTD subset. Notations in the external DTD subset are not - # listed. - # - # Method contributed by Henrik Martensson - # - # source://rexml//lib/rexml/doctype.rb#221 - def notations; end - - # This method retrieves the public identifier identifying the document's - # DTD. - # - # Method contributed by Henrik Martensson - # - # source://rexml//lib/rexml/doctype.rb#195 - def public; end - - # This method retrieves the system identifier identifying the document's DTD - # - # Method contributed by Henrik Martensson - # - # source://rexml//lib/rexml/doctype.rb#207 - def system; end - - # output:: - # Where to write the string - # indent:: - # An integer. If -1, no indentation will be used; otherwise, the - # indentation will be this number of spaces, and children will be - # indented an additional amount. - # transitive:: - # Ignored - # ie_hack:: - # Ignored - # - # source://rexml//lib/rexml/doctype.rb#149 - def write(output, indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end -end - -# Represents an XML document. -# -# A document may have: -# -# - A single child that may be accessed via method #root. -# - An XML declaration. -# - A document type. -# - Processing instructions. -# -# == In a Hurry? -# -# If you're somewhat familiar with XML -# and have a particular task in mind, -# you may want to see the -# {tasks pages}[../doc/rexml/tasks/tocs/master_toc_rdoc.html], -# and in particular, the -# {tasks page for documents}[../doc/rexml/tasks/tocs/document_toc_rdoc.html]. -# -# source://rexml//lib/rexml/document.rb#35 -class REXML::Document < ::REXML::Element - # :call-seq: - # new(string = nil, context = {}) -> new_document - # new(io_stream = nil, context = {}) -> new_document - # new(document = nil, context = {}) -> new_document - # - # Returns a new \REXML::Document object. - # - # When no arguments are given, - # returns an empty document: - # - # d = REXML::Document.new - # d.to_s # => "" - # - # When argument +string+ is given, it must be a string - # containing a valid XML document: - # - # xml_string = 'FooBar' - # d = REXML::Document.new(xml_string) - # d.to_s # => "FooBar" - # - # When argument +io_stream+ is given, it must be an \IO object - # that is opened for reading, and when read must return a valid XML document: - # - # File.write('t.xml', xml_string) - # d = File.open('t.xml', 'r') do |io| - # REXML::Document.new(io) - # end - # d.to_s # => "FooBar" - # - # When argument +document+ is given, it must be an existing - # document object, whose context and attributes (but not children) - # are cloned into the new document: - # - # d = REXML::Document.new(xml_string) - # d.children # => [ ... ] - # d.context = {raw: :all, compress_whitespace: :all} - # d.add_attributes({'bar' => 0, 'baz' => 1}) - # d1 = REXML::Document.new(d) - # d1.children # => [] - # d1.context # => {:raw=>:all, :compress_whitespace=>:all} - # d1.attributes # => {"bar"=>bar='0', "baz"=>baz='1'} - # - # When argument +context+ is given, it must be a hash - # containing context entries for the document; - # see {Element Context}[../doc/rexml/context_rdoc.html]: - # - # context = {raw: :all, compress_whitespace: :all} - # d = REXML::Document.new(xml_string, context) - # d.context # => {:raw=>:all, :compress_whitespace=>:all} - # - # @return [Document] a new instance of Document - # - # source://rexml//lib/rexml/document.rb#92 - def initialize(source = T.unsafe(nil), context = T.unsafe(nil)); end - - # :call-seq: - # add(xml_decl) -> self - # add(doc_type) -> self - # add(object) -> self - # - # Adds an object to the document; returns +self+. - # - # When argument +xml_decl+ is given, - # it must be an REXML::XMLDecl object, - # which becomes the XML declaration for the document, - # replacing the previous XML declaration if any: - # - # d = REXML::Document.new - # d.xml_decl.to_s # => "" - # d.add(REXML::XMLDecl.new('2.0')) - # d.xml_decl.to_s # => "" - # - # When argument +doc_type+ is given, - # it must be an REXML::DocType object, - # which becomes the document type for the document, - # replacing the previous document type, if any: - # - # d = REXML::Document.new - # d.doctype.to_s # => "" - # d.add(REXML::DocType.new('foo')) - # d.doctype.to_s # => "" - # - # When argument +object+ (not an REXML::XMLDecl or REXML::DocType object) - # is given it is added as the last child: - # - # d = REXML::Document.new - # d.add(REXML::Element.new('foo')) - # d.to_s # => "" - # - # source://rexml//lib/rexml/document.rb#170 - def <<(child); end - - # :call-seq: - # add(xml_decl) -> self - # add(doc_type) -> self - # add(object) -> self - # - # Adds an object to the document; returns +self+. - # - # When argument +xml_decl+ is given, - # it must be an REXML::XMLDecl object, - # which becomes the XML declaration for the document, - # replacing the previous XML declaration if any: - # - # d = REXML::Document.new - # d.xml_decl.to_s # => "" - # d.add(REXML::XMLDecl.new('2.0')) - # d.xml_decl.to_s # => "" - # - # When argument +doc_type+ is given, - # it must be an REXML::DocType object, - # which becomes the document type for the document, - # replacing the previous document type, if any: - # - # d = REXML::Document.new - # d.doctype.to_s # => "" - # d.add(REXML::DocType.new('foo')) - # d.doctype.to_s # => "" - # - # When argument +object+ (not an REXML::XMLDecl or REXML::DocType object) - # is given it is added as the last child: - # - # d = REXML::Document.new - # d.add(REXML::Element.new('foo')) - # d.to_s # => "" - # - # source://rexml//lib/rexml/document.rb#170 - def add(child); end - - # :call-seq: - # add_element(name_or_element = nil, attributes = nil) -> new_element - # - # Adds an element to the document by calling REXML::Element.add_element: - # - # REXML::Element.add_element(name_or_element, attributes) - # - # source://rexml//lib/rexml/document.rb#209 - def add_element(arg = T.unsafe(nil), arg2 = T.unsafe(nil)); end - - # :call-seq: - # clone -> new_document - # - # Returns the new document resulting from executing - # Document.new(self). See Document.new. - # - # source://rexml//lib/rexml/document.rb#120 - def clone; end - - # :call-seq: - # doctype -> doc_type or nil - # - # Returns the DocType object for the document, if it exists, otherwise +nil+: - # - # d = REXML::Document.new('') - # d.doctype.class # => REXML::DocType - # d = REXML::Document.new('') - # d.doctype.class # => nil - # - # source://rexml//lib/rexml/document.rb#241 - def doctype; end - - # source://rexml//lib/rexml/document.rb#442 - def document; end - - # :call-seq: - # encoding -> encoding_string - # - # Returns the XMLDecl encoding of the document, - # - # d = REXML::Document.new('') - # d.encoding # => "UTF-16" - # d = REXML::Document.new('') - # d.encoding # => "UTF-8" - # - # source://rexml//lib/rexml/document.rb#290 - def encoding; end - - # Returns the value of attribute entity_expansion_count. - # - # source://rexml//lib/rexml/document.rb#433 - def entity_expansion_count; end - - # :call-seq: - # expanded_name -> empty_string - # - # Returns an empty string. - # - # source://rexml//lib/rexml/document.rb#129 - def expanded_name; end - - # :call-seq: - # expanded_name -> empty_string - # - # Returns an empty string. - # d = doc_type - # d ? d.name : "UNDEFINED" - # - # source://rexml//lib/rexml/document.rb#129 - def name; end - - # :call-seq: - # node_type -> :document - # - # Returns the symbol +:document+. - # - # source://rexml//lib/rexml/document.rb#110 - def node_type; end - - # source://rexml//lib/rexml/document.rb#435 - def record_entity_expansion; end - - # :call-seq: - # root -> root_element or nil - # - # Returns the root element of the document, if it exists, otherwise +nil+: - # - # d = REXML::Document.new('') - # d.root # => - # d = REXML::Document.new('') - # d.root # => nil - # - # source://rexml//lib/rexml/document.rb#225 - def root; end - - # :call-seq: - # stand_alone? - # - # Returns the XMLDecl standalone value of the document as a string, - # if it has been set, otherwise the default standalone value: - # - # d = REXML::Document.new('') - # d.stand_alone? # => "yes" - # d = REXML::Document.new('') - # d.stand_alone? # => nil - # - # @return [Boolean] - # - # source://rexml//lib/rexml/document.rb#305 - def stand_alone?; end - - # :call-seq: - # version -> version_string - # - # Returns the XMLDecl version of this document as a string, - # if it has been set, otherwise the default version: - # - # d = REXML::Document.new('') - # d.version # => "2.0" - # d = REXML::Document.new('') - # d.version # => "1.0" - # - # source://rexml//lib/rexml/document.rb#275 - def version; end - - # :call-seq: - # doc.write(output=$stdout, indent=-1, transtive=false, ie_hack=false, encoding=nil) - # doc.write(options={:output => $stdout, :indent => -1, :transtive => false, :ie_hack => false, :encoding => nil}) - # - # Write the XML tree out, optionally with indent. This writes out the - # entire XML document, including XML declarations, doctype declarations, - # and processing instructions (if any are given). - # - # A controversial point is whether Document should always write the XML - # declaration () whether or not one is given by the - # user (or source document). REXML does not write one if one was not - # specified, because it adds unnecessary bandwidth to applications such - # as XML-RPC. - # - # Accept Nth argument style and options Hash style as argument. - # The recommended style is options Hash style for one or more - # arguments case. - # - # _Examples_ - # Document.new("").write - # - # output = "" - # Document.new("").write(output) - # - # output = "" - # Document.new("").write(:output => output, :indent => 2) - # - # See also the classes in the rexml/formatters package for the proper way - # to change the default formatting of XML output. - # - # _Examples_ - # - # output = "" - # tr = Transitive.new - # tr.write(Document.new(""), output) - # - # output:: - # output an object which supports '<< string'; this is where the - # document will be written. - # indent:: - # An integer. If -1, no indenting will be used; otherwise, the - # indentation will be twice this number of spaces, and children will be - # indented an additional amount. For a value of 3, every item will be - # indented 3 more levels, or 6 more spaces (2 * 3). Defaults to -1 - # transitive:: - # If transitive is true and indent is >= 0, then the output will be - # pretty-printed in such a way that the added whitespace does not affect - # the absolute *value* of the document -- that is, it leaves the value - # and number of Text nodes in the document unchanged. - # ie_hack:: - # This hack inserts a space before the /> on empty tags to address - # a limitation of Internet Explorer. Defaults to false - # Encoding name as String. Change output encoding to specified encoding - # instead of encoding in XML declaration. - # Defaults to nil. It means encoding in XML declaration is used. - # - # source://rexml//lib/rexml/document.rb#365 - def write(*arguments); end - - # :call-seq: - # xml_decl -> xml_decl - # - # Returns the XMLDecl object for the document, if it exists, - # otherwise the default XMLDecl object: - # - # d = REXML::Document.new('') - # d.xml_decl.class # => REXML::XMLDecl - # d.xml_decl.to_s # => "" - # d = REXML::Document.new('') - # d.xml_decl.class # => REXML::XMLDecl - # d.xml_decl.to_s # => "" - # - # source://rexml//lib/rexml/document.rb#258 - def xml_decl; end - - private - - # source://rexml//lib/rexml/document.rb#447 - def build(source); end - - class << self - # Get the entity expansion limit. By default the limit is set to 10000. - # - # Deprecated. Use REXML::Security.entity_expansion_limit= instead. - # - # source://rexml//lib/rexml/document.rb#415 - def entity_expansion_limit; end - - # Set the entity expansion limit. By default the limit is set to 10000. - # - # Deprecated. Use REXML::Security.entity_expansion_limit= instead. - # - # source://rexml//lib/rexml/document.rb#408 - def entity_expansion_limit=(val); end - - # Get the entity expansion limit. By default the limit is set to 10240. - # - # Deprecated. Use REXML::Security.entity_expansion_text_limit instead. - # - # source://rexml//lib/rexml/document.rb#429 - def entity_expansion_text_limit; end - - # Set the entity expansion limit. By default the limit is set to 10240. - # - # Deprecated. Use REXML::Security.entity_expansion_text_limit= instead. - # - # source://rexml//lib/rexml/document.rb#422 - def entity_expansion_text_limit=(val); end - - # source://rexml//lib/rexml/document.rb#401 - def parse_stream(source, listener); end - end -end - -# An \REXML::Element object represents an XML element. -# -# An element: -# -# - Has a name (string). -# - May have a parent (another element). -# - Has zero or more children -# (other elements, text, CDATA, processing instructions, and comments). -# - Has zero or more siblings -# (other elements, text, CDATA, processing instructions, and comments). -# - Has zero or more named attributes. -# -# == In a Hurry? -# -# If you're somewhat familiar with XML -# and have a particular task in mind, -# you may want to see the -# {tasks pages}[../doc/rexml/tasks/tocs/master_toc_rdoc.html], -# and in particular, the -# {tasks page for elements}[../doc/rexml/tasks/tocs/element_toc_rdoc.html]. -# -# === Name -# -# An element has a name, which is initially set when the element is created: -# -# e = REXML::Element.new('foo') -# e.name # => "foo" -# -# The name may be changed: -# -# e.name = 'bar' -# e.name # => "bar" -# -# -# === \Parent -# -# An element may have a parent. -# -# Its parent may be assigned explicitly when the element is created: -# -# e0 = REXML::Element.new('foo') -# e1 = REXML::Element.new('bar', e0) -# e1.parent # => ... -# -# Note: the representation of an element always shows the element's name. -# If the element has children, the representation indicates that -# by including an ellipsis (...). -# -# The parent may be assigned explicitly at any time: -# -# e2 = REXML::Element.new('baz') -# e1.parent = e2 -# e1.parent # => -# -# When an element is added as a child, its parent is set automatically: -# -# e1.add_element(e0) -# e0.parent # => ... -# -# For an element that has no parent, method +parent+ returns +nil+. -# -# === Children -# -# An element has zero or more children. -# The children are an ordered collection -# of all objects whose parent is the element itself. -# -# The children may include any combination of elements, text, comments, -# processing instructions, and CDATA. -# (This example keeps things clean by controlling whitespace -# via a +context+ setting.) -# -# xml_string = <<-EOT -# -# -# text 0 -# -# -# -# -# text 1 -# -# -# -# -# EOT -# context = {ignore_whitespace_nodes: :all, compress_whitespace: :all} -# d = REXML::Document.new(xml_string, context) -# root = d.root -# root.children.size # => 10 -# root.each {|child| p "#{child.class}: #{child}" } -# -# Output: -# -# "REXML::Element: " -# "REXML::Text: \n text 0\n " -# "REXML::Comment: comment 0" -# "REXML::Instruction: " -# "REXML::CData: cdata 0" -# "REXML::Element: " -# "REXML::Text: \n text 1\n " -# "REXML::Comment: comment 1" -# "REXML::Instruction: " -# "REXML::CData: cdata 1" -# -# A child may be added using inherited methods -# Parent#insert_before or Parent#insert_after: -# -# xml_string = '' -# d = REXML::Document.new(xml_string) -# root = d.root -# c = d.root[1] # => -# root.insert_before(c, REXML::Element.new('b')) -# root.to_a # => [, , , ] -# -# A child may be replaced using Parent#replace_child: -# -# root.replace_child(c, REXML::Element.new('x')) -# root.to_a # => [, , , ] -# -# A child may be removed using Parent#delete: -# -# x = root[2] # => -# root.delete(x) -# root.to_a # => [, , ] -# -# === Siblings -# -# An element has zero or more siblings, -# which are the other children of the element's parent. -# -# In the example above, element +ele_1+ is between a CDATA sibling -# and a text sibling: -# -# ele_1 = root[5] # => -# ele_1.previous_sibling # => "cdata 0" -# ele_1.next_sibling # => "\n text 1\n " -# -# === \Attributes -# -# An element has zero or more named attributes. -# -# A new element has no attributes: -# -# e = REXML::Element.new('foo') -# e.attributes # => {} -# -# Attributes may be added: -# -# e.add_attribute('bar', 'baz') -# e.add_attribute('bat', 'bam') -# e.attributes.size # => 2 -# e['bar'] # => "baz" -# e['bat'] # => "bam" -# -# An existing attribute may be modified: -# -# e.add_attribute('bar', 'bad') -# e.attributes.size # => 2 -# e['bar'] # => "bad" -# -# An existing attribute may be deleted: -# -# e.delete_attribute('bar') -# e.attributes.size # => 1 -# e['bar'] # => nil -# -# == What's Here -# -# To begin with, what's elsewhere? -# -# \Class \REXML::Element inherits from its ancestor classes: -# -# - REXML::Child -# - REXML::Parent -# -# \REXML::Element itself and its ancestors also include modules: -# -# - {Enumerable}[https://docs.ruby-lang.org/en/master/Enumerable.html] -# - REXML::Namespace -# - REXML::Node -# - REXML::XMLTokens -# -# === Methods for Creating an \Element -# -# ::new:: Returns a new empty element. -# #clone:: Returns a clone of another element. -# -# === Methods for Attributes -# -# {[attribute_name]}[#method-i-5B-5D]:: Returns an attribute value. -# #add_attribute:: Adds a new attribute. -# #add_attributes:: Adds multiple new attributes. -# #attribute:: Returns the attribute value for a given name and optional namespace. -# #delete_attribute:: Removes an attribute. -# -# === Methods for Children -# -# {[index]}[#method-i-5B-5D]:: Returns the child at the given offset. -# #add_element:: Adds an element as the last child. -# #delete_element:: Deletes a child element. -# #each_element:: Calls the given block with each child element. -# #each_element_with_attribute:: Calls the given block with each child element -# that meets given criteria, -# which can include the attribute name. -# #each_element_with_text:: Calls the given block with each child element -# that meets given criteria, -# which can include text. -# #get_elements:: Returns an array of element children that match a given xpath. -# -# === Methods for \Text Children -# -# #add_text:: Adds a text node to the element. -# #get_text:: Returns a text node that meets specified criteria. -# #text:: Returns the text string from the first node that meets specified criteria. -# #texts:: Returns an array of the text children of the element. -# #text=:: Adds, removes, or replaces the first text child of the element -# -# === Methods for Other Children -# -# #cdatas:: Returns an array of the cdata children of the element. -# #comments:: Returns an array of the comment children of the element. -# #instructions:: Returns an array of the instruction children of the element. -# -# === Methods for Namespaces -# -# #add_namespace:: Adds a namespace to the element. -# #delete_namespace:: Removes a namespace from the element. -# #namespace:: Returns the string namespace URI for the element. -# #namespaces:: Returns a hash of all defined namespaces in the element. -# #prefixes:: Returns an array of the string prefixes (names) -# of all defined namespaces in the element -# -# === Methods for Querying -# -# #document:: Returns the document, if any, that the element belongs to. -# #root:: Returns the most distant element (not document) ancestor of the element. -# #root_node:: Returns the most distant ancestor of the element. -# #xpath:: Returns the string xpath to the element -# relative to the most distant parent -# #has_attributes?:: Returns whether the element has attributes. -# #has_elements?:: Returns whether the element has elements. -# #has_text?:: Returns whether the element has text. -# #next_element:: Returns the next sibling that is an element. -# #previous_element:: Returns the previous sibling that is an element. -# #raw:: Returns whether raw mode is set for the element. -# #whitespace:: Returns whether whitespace is respected for the element. -# #ignore_whitespace_nodes:: Returns whether whitespace nodes -# are to be ignored for the element. -# #node_type:: Returns symbol :element. -# -# === One More Method -# -# #inspect:: Returns a string representation of the element. -# -# === Accessors -# -# #elements:: Returns the REXML::Elements object for the element. -# #attributes:: Returns the REXML::Attributes object for the element. -# #context:: Returns or sets the context hash for the element. -# -# source://rexml//lib/rexml/element.rb#271 -class REXML::Element < ::REXML::Parent - include ::REXML::XMLTokens - include ::REXML::Namespace - - # :call-seq: - # Element.new(name = 'UNDEFINED', parent = nil, context = nil) -> new_element - # Element.new(element, parent = nil, context = nil) -> new_element - # - # Returns a new \REXML::Element object. - # - # When no arguments are given, - # returns an element with name 'UNDEFINED': - # - # e = REXML::Element.new # => - # e.class # => REXML::Element - # e.name # => "UNDEFINED" - # - # When only argument +name+ is given, - # returns an element of the given name: - # - # REXML::Element.new('foo') # => - # - # When only argument +element+ is given, it must be an \REXML::Element object; - # returns a shallow copy of the given element: - # - # e0 = REXML::Element.new('foo') - # e1 = REXML::Element.new(e0) # => - # - # When argument +parent+ is also given, it must be an REXML::Parent object: - # - # e = REXML::Element.new('foo', REXML::Parent.new) - # e.parent # => #]> - # - # When argument +context+ is also given, it must be a hash - # representing the context for the element; - # see {Element Context}[../doc/rexml/context_rdoc.html]: - # - # e = REXML::Element.new('foo', nil, {raw: :all}) - # e.context # => {:raw=>:all} - # - # @return [Element] a new instance of Element - # - # source://rexml//lib/rexml/element.rb#319 - def initialize(arg = T.unsafe(nil), parent = T.unsafe(nil), context = T.unsafe(nil)); end - - # :call-seq: - # [index] -> object - # [attr_name] -> attr_value - # [attr_sym] -> attr_value - # - # With integer argument +index+ given, - # returns the child at offset +index+, or +nil+ if none: - # - # d = REXML::Document.new '>textmore' - # root = d.root - # (0..root.size).each do |index| - # node = root[index] - # p "#{index}: #{node} (#{node.class})" - # end - # - # Output: - # - # "0: (REXML::Element)" - # "1: text (REXML::Text)" - # "2: (REXML::Element)" - # "3: more (REXML::Text)" - # "4: (REXML::Element)" - # "5: (NilClass)" - # - # With string argument +attr_name+ given, - # returns the string value for the given attribute name if it exists, - # otherwise +nil+: - # - # d = REXML::Document.new('') - # root = d.root - # root['attr'] # => "value" - # root['nosuch'] # => nil - # - # With symbol argument +attr_sym+ given, - # returns [attr_sym.to_s]: - # - # root[:attr] # => "value" - # root[:nosuch] # => nil - # - # source://rexml//lib/rexml/element.rb#1246 - def [](name_or_index); end - - # :call-seq: - # add_attribute(name, value) -> value - # add_attribute(attribute) -> attribute - # - # Adds an attribute to this element, overwriting any existing attribute - # by the same name. - # - # With string argument +name+ and object +value+ are given, - # adds the attribute created with that name and value: - # - # e = REXML::Element.new - # e.add_attribute('attr', 'value') # => "value" - # e['attr'] # => "value" - # e.add_attribute('attr', 'VALUE') # => "VALUE" - # e['attr'] # => "VALUE" - # - # With only attribute object +attribute+ given, - # adds the given attribute: - # - # a = REXML::Attribute.new('attr', 'value') - # e.add_attribute(a) # => attr='value' - # e['attr'] # => "value" - # a = REXML::Attribute.new('attr', 'VALUE') - # e.add_attribute(a) # => attr='VALUE' - # e['attr'] # => "VALUE" - # - # source://rexml//lib/rexml/element.rb#1345 - def add_attribute(key, value = T.unsafe(nil)); end - - # :call-seq: - # add_attributes(hash) -> hash - # add_attributes(array) - # - # Adds zero or more attributes to the element; - # returns the argument. - # - # If hash argument +hash+ is given, - # each key must be a string; - # adds each attribute created with the key/value pair: - # - # e = REXML::Element.new - # h = {'foo' => 'bar', 'baz' => 'bat'} - # e.add_attributes(h) - # - # If argument +array+ is given, - # each array member must be a 2-element array [name, value]; - # each name must be a string: - # - # e = REXML::Element.new - # a = [['foo' => 'bar'], ['baz' => 'bat']] - # e.add_attributes(a) - # - # source://rexml//lib/rexml/element.rb#1376 - def add_attributes(hash); end - - # :call-seq: - # add_element(name, attributes = nil) -> new_element - # add_element(element, attributes = nil) -> element - # - # Adds a child element, optionally setting attributes - # on the added element; returns the added element. - # - # With string argument +name+, creates a new element with that name - # and adds the new element as a child: - # - # e0 = REXML::Element.new('foo') - # e0.add_element('bar') - # e0[0] # => - # - # - # With argument +name+ and hash argument +attributes+, - # sets attributes on the new element: - # - # e0.add_element('baz', {'bat' => '0', 'bam' => '1'}) - # e0[1] # => - # - # With element argument +element+, adds that element as a child: - # - # e0 = REXML::Element.new('foo') - # e1 = REXML::Element.new('bar') - # e0.add_element(e1) - # e0[0] # => - # - # With argument +element+ and hash argument +attributes+, - # sets attributes on the added element: - # - # e0.add_element(e1, {'bat' => '0', 'bam' => '1'}) - # e0[1] # => - # - # source://rexml//lib/rexml/element.rb#732 - def add_element(element, attrs = T.unsafe(nil)); end - - # :call-seq: - # add_namespace(prefix, uri = nil) -> self - # - # Adds a namespace to the element; returns +self+. - # - # With the single argument +prefix+, - # adds a namespace using the given +prefix+ and the namespace URI: - # - # e = REXML::Element.new('foo') - # e.add_namespace('bar') - # e.namespaces # => {"xmlns"=>"bar"} - # - # With both arguments +prefix+ and +uri+ given, - # adds a namespace using both arguments: - # - # e.add_namespace('baz', 'bat') - # e.namespaces # => {"xmlns"=>"bar", "baz"=>"bat"} - # - # source://rexml//lib/rexml/element.rb#655 - def add_namespace(prefix, uri = T.unsafe(nil)); end - - # :call-seq: - # add_text(string) -> nil - # add_text(text_node) -> self - # - # Adds text to the element. - # - # When string argument +string+ is given, returns +nil+. - # - # If the element has no child text node, - # creates a \REXML::Text object using the string, - # honoring the current settings for whitespace and raw, - # then adds that node to the element: - # - # d = REXML::Document.new('') - # a = d.root - # a.add_text('foo') - # a.to_a # => [, "foo"] - # - # If the element has child text nodes, - # appends the string to the _last_ text node: - # - # d = REXML::Document.new('foobar') - # a = d.root - # a.add_text('baz') - # a.to_a # => ["foo", , "barbaz"] - # a.add_text('baz') - # a.to_a # => ["foo", , "barbazbaz"] - # - # When text node argument +text_node+ is given, - # appends the node as the last text node in the element; - # returns +self+: - # - # d = REXML::Document.new('foobar') - # a = d.root - # a.add_text(REXML::Text.new('baz')) - # a.to_a # => ["foo", , "bar", "baz"] - # a.add_text(REXML::Text.new('baz')) - # a.to_a # => ["foo", , "bar", "baz", "baz"] - # - # source://rexml//lib/rexml/element.rb#1147 - def add_text(text); end - - # :call-seq: - # attribute(name, namespace = nil) - # - # Returns the string value for the given attribute name. - # - # With only argument +name+ given, - # returns the value of the named attribute if it exists, otherwise +nil+: - # - # xml_string = <<-EOT - # - # - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # root = d.root - # a = root[1] # => - # a.attribute('attr') # => attr='value' - # a.attribute('nope') # => nil - # - # With arguments +name+ and +namespace+ given, - # returns the value of the named attribute if it exists, otherwise +nil+: - # - # xml_string = "" - # document = REXML::Document.new(xml_string) - # document.root.attribute("x") # => x='x' - # document.root.attribute("x", "a") # => a:x='a:x' - # - # source://rexml//lib/rexml/element.rb#1287 - def attribute(name, namespace = T.unsafe(nil)); end - - # Mechanisms for accessing attributes and child elements of this - # element. - # - # source://rexml//lib/rexml/element.rb#278 - def attributes; end - - # :call-seq: - # cdatas -> array_of_cdata_children - # - # Returns a frozen array of the REXML::CData children of the element: - # - # xml_string = <<-EOT - # - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # cds = d.root.cdatas # => ["foo", "bar"] - # cds.frozen? # => true - # cds.map {|cd| cd.class } # => [REXML::CData, REXML::CData] - # - # source://rexml//lib/rexml/element.rb#1420 - def cdatas; end - - # :call-seq: - # clone -> new_element - # - # Returns a shallow copy of the element, containing the name and attributes, - # but not the parent or children: - # - # e = REXML::Element.new('foo') - # e.add_attributes({'bar' => 0, 'baz' => 1}) - # e.clone # => - # - # source://rexml//lib/rexml/element.rb#383 - def clone; end - - # :call-seq: - # comments -> array_of_comment_children - # - # Returns a frozen array of the REXML::Comment children of the element: - # - # xml_string = <<-EOT - # - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # cs = d.root.comments - # cs.frozen? # => true - # cs.map {|c| c.class } # => [REXML::Comment, REXML::Comment] - # cs.map {|c| c.to_s } # => ["foo", "bar"] - # - # source://rexml//lib/rexml/element.rb#1441 - def comments; end - - # The context holds information about the processing environment, such as - # whitespace handling. - # - # source://rexml//lib/rexml/element.rb#281 - def context; end - - # The context holds information about the processing environment, such as - # whitespace handling. - # - # source://rexml//lib/rexml/element.rb#281 - def context=(_arg0); end - - # :call-seq: - # delete_attribute(name) -> removed_attribute or nil - # - # Removes a named attribute if it exists; - # returns the removed attribute if found, otherwise +nil+: - # - # e = REXML::Element.new('foo') - # e.add_attribute('bar', 'baz') - # e.delete_attribute('bar') # => - # e.delete_attribute('bar') # => nil - # - # source://rexml//lib/rexml/element.rb#1395 - def delete_attribute(key); end - - # :call-seq: - # delete_element(index) -> removed_element or nil - # delete_element(element) -> removed_element or nil - # delete_element(xpath) -> removed_element or nil - # - # Deletes a child element. - # - # When 1-based integer argument +index+ is given, - # removes and returns the child element at that offset if it exists; - # indexing does not include text nodes; - # returns +nil+ if the element does not exist: - # - # d = REXML::Document.new 'text' - # a = d.root # => ... - # a.delete_element(1) # => - # a.delete_element(1) # => - # a.delete_element(1) # => nil - # - # When element argument +element+ is given, - # removes and returns that child element if it exists, - # otherwise returns +nil+: - # - # d = REXML::Document.new 'text' - # a = d.root # => ... - # c = a[2] # => - # a.delete_element(c) # => - # a.delete_element(c) # => nil - # - # When xpath argument +xpath+ is given, - # removes and returns the element at xpath if it exists, - # otherwise returns +nil+: - # - # d = REXML::Document.new 'text' - # a = d.root # => ... - # a.delete_element('//c') # => - # a.delete_element('//c') # => nil - # - # source://rexml//lib/rexml/element.rb#778 - def delete_element(element); end - - # :call-seq: - # delete_namespace(namespace = 'xmlns') -> self - # - # Removes a namespace from the element. - # - # With no argument, removes the default namespace: - # - # d = REXML::Document.new "" - # d.to_s # => "" - # d.root.delete_namespace # => - # d.to_s # => "" - # - # With argument +namespace+, removes the specified namespace: - # - # d.root.delete_namespace('foo') - # d.to_s # => "" - # - # Does nothing if no such namespace is found: - # - # d.root.delete_namespace('nosuch') - # d.to_s # => "" - # - # source://rexml//lib/rexml/element.rb#687 - def delete_namespace(namespace = T.unsafe(nil)); end - - # :call-seq: - # document -> document or nil - # - # If the element is part of a document, returns that document: - # - # d = REXML::Document.new('') - # top_element = d.first - # child = top_element.first - # top_element.document == d # => true - # child.document == d # => true - # - # If the element is not part of a document, returns +nil+: - # - # REXML::Element.new.document # => nil - # - # For a document, returns +self+: - # - # d.document == d # => true - # - # Related: #root, #root_node. - # - # source://rexml//lib/rexml/element.rb#475 - def document; end - - # :call-seq: - # each_element {|e| ... } - # - # Calls the given block with each child element: - # - # d = REXML::Document.new 'bbd' - # a = d.root - # a.each_element {|e| p e } - # - # Output: - # - # ... - # ... - # ... - # - # - # source://rexml//lib/rexml/element.rb#930 - def each_element(xpath = T.unsafe(nil), &block); end - - # :call-seq: - # each_element_with_attribute(attr_name, value = nil, max = 0, xpath = nil) {|e| ... } - # - # Calls the given block with each child element that meets given criteria. - # - # When only string argument +attr_name+ is given, - # calls the block with each child element that has that attribute: - # - # d = REXML::Document.new '' - # a = d.root - # a.each_element_with_attribute('id') {|e| p e } - # - # Output: - # - # - # - # - # - # With argument +attr_name+ and string argument +value+ given, - # calls the block with each child element that has that attribute - # with that value: - # - # a.each_element_with_attribute('id', '1') {|e| p e } - # - # Output: - # - # - # - # - # With arguments +attr_name+, +value+, and integer argument +max+ given, - # calls the block with at most +max+ child elements: - # - # a.each_element_with_attribute('id', '1', 1) {|e| p e } - # - # Output: - # - # - # - # With all arguments given, including +xpath+, - # calls the block with only those child elements - # that meet the first three criteria, - # and also match the given +xpath+: - # - # a.each_element_with_attribute('id', '1', 2, '//d') {|e| p e } - # - # Output: - # - # - # - # source://rexml//lib/rexml/element.rb#847 - def each_element_with_attribute(key, value = T.unsafe(nil), max = T.unsafe(nil), name = T.unsafe(nil), &block); end - - # :call-seq: - # each_element_with_text(text = nil, max = 0, xpath = nil) {|e| ... } - # - # Calls the given block with each child element that meets given criteria. - # - # With no arguments, calls the block with each child element that has text: - # - # d = REXML::Document.new 'bbd' - # a = d.root - # a.each_element_with_text {|e| p e } - # - # Output: - # - # ... - # ... - # ... - # - # With the single string argument +text+, - # calls the block with each element that has exactly that text: - # - # a.each_element_with_text('b') {|e| p e } - # - # Output: - # - # ... - # ... - # - # With argument +text+ and integer argument +max+, - # calls the block with at most +max+ elements: - # - # a.each_element_with_text('b', 1) {|e| p e } - # - # Output: - # - # ... - # - # With all arguments given, including +xpath+, - # calls the block with only those child elements - # that meet the first two criteria, - # and also match the given +xpath+: - # - # a.each_element_with_text('b', 2, '//c') {|e| p e } - # - # Output: - # - # ... - # - # source://rexml//lib/rexml/element.rb#904 - def each_element_with_text(text = T.unsafe(nil), max = T.unsafe(nil), name = T.unsafe(nil), &block); end - - # Mechanisms for accessing attributes and child elements of this - # element. - # - # source://rexml//lib/rexml/element.rb#278 - def elements; end - - # :call-seq: - # get_elements(xpath) - # - # Returns an array of the elements that match the given +xpath+: - # - # xml_string = <<-EOT - # - # - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # d.root.get_elements('//a') # => [ ... , ] - # - # source://rexml//lib/rexml/element.rb#949 - def get_elements(xpath); end - - # :call-seq: - # get_text(xpath = nil) -> text_node or nil - # - # Returns the first text node child in a specified element, if it exists, - # +nil+ otherwise. - # - # With no argument, returns the first text node from +self+: - # - # d = REXML::Document.new "

some text this is bold! more text

" - # d.root.get_text.class # => REXML::Text - # d.root.get_text # => "some text " - # - # With argument +xpath+, returns the first text node from the element - # that matches +xpath+: - # - # d.root.get_text(1) # => "this is bold!" - # - # source://rexml//lib/rexml/element.rb#1053 - def get_text(path = T.unsafe(nil)); end - - # :call-seq: - # has_attributes? -> true or false - # - # Returns +true+ if the element has attributes, +false+ otherwise: - # - # d = REXML::Document.new('
') - # a, b = *d.root - # a.has_attributes? # => true - # b.has_attributes? # => false - # - # @return [Boolean] - # - # source://rexml//lib/rexml/element.rb#1315 - def has_attributes?; end - - # :call-seq: - # has_elements? - # - # Returns +true+ if the element has one or more element children, - # +false+ otherwise: - # - # d = REXML::Document.new 'text' - # a = d.root # => ... - # a.has_elements? # => true - # b = a[0] # => - # b.has_elements? # => false - # - # @return [Boolean] - # - # source://rexml//lib/rexml/element.rb#794 - def has_elements?; end - - # :call-seq: - # has_text? -> true or false - # - # Returns +true+ if the element has one or more text noded, - # +false+ otherwise: - # - # d = REXML::Document.new 'text' - # a = d.root - # a.has_text? # => true - # b = a[0] - # b.has_text? # => false - # - # @return [Boolean] - # - # source://rexml//lib/rexml/element.rb#1002 - def has_text?; end - - # :call-seq: - # ignore_whitespace_nodes - # - # Returns +true+ if whitespace nodes are ignored for the element. - # - # See {Element Context}[../doc/rexml/context_rdoc.html]. - # - # source://rexml//lib/rexml/element.rb#513 - def ignore_whitespace_nodes; end - - # :call-seq: - # inspect -> string - # - # Returns a string representation of the element. - # - # For an element with no attributes and no children, shows the element name: - # - # REXML::Element.new.inspect # => "" - # - # Shows attributes, if any: - # - # e = REXML::Element.new('foo') - # e.add_attributes({'bar' => 0, 'baz' => 1}) - # e.inspect # => "" - # - # Shows an ellipsis (...), if there are child elements: - # - # e.add_element(REXML::Element.new('bar')) - # e.add_element(REXML::Element.new('baz')) - # e.inspect # => " ... " - # - # source://rexml//lib/rexml/element.rb#358 - def inspect; end - - # :call-seq: - # instructions -> array_of_instruction_children - # - # Returns a frozen array of the REXML::Instruction children of the element: - # - # xml_string = <<-EOT - # - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # is = d.root.instructions - # is.frozen? # => true - # is.map {|i| i.class } # => [REXML::Instruction, REXML::Instruction] - # is.map {|i| i.to_s } # => ["", ""] - # - # source://rexml//lib/rexml/element.rb#1462 - def instructions; end - - # :call-seq: - # namespace(prefix = nil) -> string_uri or nil - # - # Returns the string namespace URI for the element, - # possibly deriving from one of its ancestors. - # - # xml_string = <<-EOT - # - # - # - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # b = d.elements['//b'] - # b.namespace # => "1" - # b.namespace('y') # => "2" - # b.namespace('nosuch') # => nil - # - # source://rexml//lib/rexml/element.rb#618 - def namespace(prefix = T.unsafe(nil)); end - - # :call-seq: - # namespaces -> array_of_namespace_names - # - # Returns a hash of all defined namespaces - # in the element and its ancestors: - # - # xml_string = <<-EOT - # - # - # - # - # - # - # EOT - # d = REXML::Document.new(xml_string) - # d.elements['//a'].namespaces # => {"x"=>"1", "y"=>"2"} - # d.elements['//b'].namespaces # => {"x"=>"1", "y"=>"2"} - # d.elements['//c'].namespaces # => {"x"=>"1", "y"=>"2", "z"=>"3"} - # - # source://rexml//lib/rexml/element.rb#591 - def namespaces; end - - # :call-seq: - # next_element - # - # Returns the next sibling that is an element if it exists, - # +niL+ otherwise: - # - # d = REXML::Document.new 'text' - # d.root.elements['b'].next_element #-> - # d.root.elements['c'].next_element #-> nil - # - # source://rexml//lib/rexml/element.rb#963 - def next_element; end - - # :call-seq: - # node_type -> :element - # - # Returns symbol :element: - # - # d = REXML::Document.new('') - # a = d.root # => - # a.node_type # => :element - # - # source://rexml//lib/rexml/element.rb#1168 - def node_type; end - - # :call-seq: - # prefixes -> array_of_namespace_prefixes - # - # Returns an array of the string prefixes (names) of all defined namespaces - # in the element and its ancestors: - # - # xml_string = <<-EOT - # - # - # - # - # - # - # EOT - # d = REXML::Document.new(xml_string, {compress_whitespace: :all}) - # d.elements['//a'].prefixes # => ["x", "y"] - # d.elements['//b'].prefixes # => ["x", "y"] - # d.elements['//c'].prefixes # => ["x", "y", "z"] - # - # source://rexml//lib/rexml/element.rb#565 - def prefixes; end - - # :call-seq: - # previous_element - # - # Returns the previous sibling that is an element if it exists, - # +niL+ otherwise: - # - # d = REXML::Document.new 'text' - # d.root.elements['c'].previous_element #-> - # d.root.elements['b'].previous_element #-> nil - # - # source://rexml//lib/rexml/element.rb#979 - def previous_element; end - - # :call-seq: - # raw - # - # Returns +true+ if raw mode is set for the element. - # - # See {Element Context}[../doc/rexml/context_rdoc.html]. - # - # The evaluation is tested against +expanded_name+, and so is namespace - # sensitive. - # - # source://rexml//lib/rexml/element.rb#533 - def raw; end - - # :call-seq: - # root -> element - # - # Returns the most distant _element_ (not document) ancestor of the element: - # - # d = REXML::Document.new('') - # top_element = d.first - # child = top_element.first - # top_element.root == top_element # => true - # child.root == top_element # => true - # - # For a document, returns the topmost element: - # - # d.root == top_element # => true - # - # Related: #root_node, #document. - # - # source://rexml//lib/rexml/element.rb#443 - def root; end - - # :call-seq: - # root_node -> document or element - # - # Returns the most distant ancestor of +self+. - # - # When the element is part of a document, - # returns the root node of the document. - # Note that the root node is different from the document element; - # in this example +a+ is document element and the root node is its parent: - # - # d = REXML::Document.new('') - # top_element = d.first # => ... - # child = top_element.first # => ... - # d.root_node == d # => true - # top_element.root_node == d # => true - # child.root_node == d # => true - # - # When the element is not part of a document, but does have ancestor elements, - # returns the most distant ancestor element: - # - # e0 = REXML::Element.new('foo') - # e1 = REXML::Element.new('bar') - # e1.parent = e0 - # e2 = REXML::Element.new('baz') - # e2.parent = e1 - # e2.root_node == e0 # => true - # - # When the element has no ancestor elements, - # returns +self+: - # - # e = REXML::Element.new('foo') - # e.root_node == e # => true - # - # Related: #root, #document. - # - # source://rexml//lib/rexml/element.rb#422 - def root_node; end - - # :call-seq: - # text(xpath = nil) -> text_string or nil - # - # Returns the text string from the first text node child - # in a specified element, if it exists, +nil+ otherwise. - # - # With no argument, returns the text from the first text node in +self+: - # - # d = REXML::Document.new "

some text this is bold! more text

" - # d.root.text.class # => String - # d.root.text # => "some text " - # - # With argument +xpath+, returns text from the first text node - # in the element that matches +xpath+: - # - # d.root.text(1) # => "this is bold!" - # - # Note that an element may have multiple text nodes, - # possibly separated by other non-text children, as above. - # Even so, the returned value is the string text from the first such node. - # - # Note also that the text note is retrieved by method get_text, - # and so is always normalized text. - # - # source://rexml//lib/rexml/element.rb#1030 - def text(path = T.unsafe(nil)); end - - # :call-seq: - # text = string -> string - # text = nil -> nil - # - # Adds, replaces, or removes the first text node child in the element. - # - # With string argument +string+, - # creates a new \REXML::Text node containing that string, - # honoring the current settings for whitespace and row, - # then places the node as the first text child in the element; - # returns +string+. - # - # If the element has no text child, the text node is added: - # - # d = REXML::Document.new '
' - # d.root.text = 'foo' #-> 'foo' - # - # If the element has a text child, it is replaced: - # - # d.root.text = 'bar' #-> 'bar' - # - # With argument +nil+, removes the first text child: - # - # d.root.text = nil #-> '' - # - # source://rexml//lib/rexml/element.rb#1089 - def text=(text); end - - # :call-seq: - # texts -> array_of_text_children - # - # Returns a frozen array of the REXML::Text children of the element: - # - # xml_string = 'textmore' - # d = REXML::Document.new(xml_string) - # ts = d.root.texts - # ts.frozen? # => true - # ts.map {|t| t.class } # => [REXML::Text, REXML::Text] - # ts.map {|t| t.to_s } # => ["text", "more"] - # - # source://rexml//lib/rexml/element.rb#1478 - def texts; end - - # :call-seq: - # whitespace - # - # Returns +true+ if whitespace is respected for this element, - # +false+ otherwise. - # - # See {Element Context}[../doc/rexml/context_rdoc.html]. - # - # The evaluation is tested against the element's +expanded_name+, - # and so is namespace-sensitive. - # - # source://rexml//lib/rexml/element.rb#490 - def whitespace; end - - # == DEPRECATED - # See REXML::Formatters - # - # Writes out this element, and recursively, all children. - # output:: - # output an object which supports '<< string'; this is where the - # document will be written. - # indent:: - # An integer. If -1, no indenting will be used; otherwise, the - # indentation will be this number of spaces, and children will be - # indented an additional amount. Defaults to -1 - # transitive:: - # If transitive is true and indent is >= 0, then the output will be - # pretty-printed in such a way that the added whitespace does not affect - # the parse tree of the document - # ie_hack:: - # This hack inserts a space before the /> on empty tags to address - # a limitation of Internet Explorer. Defaults to false - # - # out = '' - # doc.write( out ) #-> doc is written to the string 'out' - # doc.write( $stdout ) #-> doc written to the console - # - # source://rexml//lib/rexml/element.rb#1504 - def write(output = T.unsafe(nil), indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end - - # :call-seq: - # xpath -> string_xpath - # - # Returns the string xpath to the element - # relative to the most distant parent: - # - # d = REXML::Document.new('') - # a = d.root # => ... - # b = a[0] # => ... - # c = b[0] # => - # d.xpath # => "" - # a.xpath # => "/a" - # b.xpath # => "/a/b" - # c.xpath # => "/a/b/c" - # - # If there is no parent, returns the expanded name of the element: - # - # e = REXML::Element.new('foo') - # e.xpath # => "foo" - # - # source://rexml//lib/rexml/element.rb#1192 - def xpath; end - - private - - # source://rexml//lib/rexml/element.rb#1521 - def __to_xpath_helper(node); end - - # A private helper method - # - # source://rexml//lib/rexml/element.rb#1536 - def each_with_something(test, max = T.unsafe(nil), name = T.unsafe(nil)); end -end - -# source://rexml//lib/rexml/doctype.rb#261 -class REXML::ElementDecl < ::REXML::Declaration - # @return [ElementDecl] a new instance of ElementDecl - # - # source://rexml//lib/rexml/doctype.rb#262 - def initialize(src); end -end - -# A class which provides filtering of children for Elements, and -# XPath search support. You are expected to only encounter this class as -# the element.elements object. Therefore, you are -# _not_ expected to instantiate this yourself. -# -# xml_string = <<-EOT -# -# -# -# Everyday Italian -# Giada De Laurentiis -# 2005 -# 30.00 -# -# -# Harry Potter -# J K. Rowling -# 2005 -# 29.99 -# -# -# XQuery Kick Start -# James McGovern -# Per Bothner -# Kurt Cagle -# James Linn -# Vaidyanathan Nagarajan -# 2003 -# 49.99 -# -# -# Learning XML -# Erik T. Ray -# 2003 -# 39.95 -# -# -# EOT -# d = REXML::Document.new(xml_string) -# elements = d.root.elements -# elements # => # ... > -# -# source://rexml//lib/rexml/element.rb#1591 -class REXML::Elements - include ::Enumerable - - # :call-seq: - # new(parent) -> new_elements_object - # - # Returns a new \Elements object with the given +parent+. - # Does _not_ assign parent.elements = self: - # - # d = REXML::Document.new(xml_string) - # eles = REXML::Elements.new(d.root) - # eles # => # ... > - # eles == d.root.elements # => false - # - # @return [Elements] a new instance of Elements - # - # source://rexml//lib/rexml/element.rb#1604 - def initialize(parent); end - - # :call-seq: - # add -> new_element - # add(name) -> new_element - # add(element) -> element - # - # Adds an element; returns the element added. - # - # With no argument, creates and adds a new element. - # The new element has: - # - # - No name. - # - \Parent from the \Elements object. - # - Context from the that parent. - # - # Example: - # - # d = REXML::Document.new(xml_string) - # elements = d.root.elements - # parent = elements.parent # => ... - # parent.context = {raw: :all} - # elements.size # => 4 - # new_element = elements.add # => - # elements.size # => 5 - # new_element.name # => nil - # new_element.parent # => ... - # new_element.context # => {:raw=>:all} - # - # With string argument +name+, creates and adds a new element. - # The new element has: - # - # - Name +name+. - # - \Parent from the \Elements object. - # - Context from the that parent. - # - # Example: - # - # d = REXML::Document.new(xml_string) - # elements = d.root.elements - # parent = elements.parent # => ... - # parent.context = {raw: :all} - # elements.size # => 4 - # new_element = elements.add('foo') # => - # elements.size # => 5 - # new_element.name # => "foo" - # new_element.parent # => ... - # new_element.context # => {:raw=>:all} - # - # With argument +element+, - # creates and adds a clone of the given +element+. - # The new element has name, parent, and context from the given +element+. - # - # d = REXML::Document.new(xml_string) - # elements = d.root.elements - # elements.size # => 4 - # e0 = REXML::Element.new('foo') - # e1 = REXML::Element.new('bar', e0, {raw: :all}) - # element = elements.add(e1) # => - # elements.size # => 5 - # element.name # => "bar" - # element.parent # => ... - # element.context # => {:raw=>:all} - # - # source://rexml//lib/rexml/element.rb#1921 - def <<(element = T.unsafe(nil)); end - - # :call-seq: - # elements[index] -> element or nil - # elements[xpath] -> element or nil - # elements[n, name] -> element or nil - # - # Returns the first \Element object selected by the arguments, - # if any found, or +nil+ if none found. - # - # Notes: - # - The +index+ is 1-based, not 0-based, so that: - # - The first element has index 1 - # - The _nth_ element has index +n+. - # - The selection ignores non-\Element nodes. - # - # When the single argument +index+ is given, - # returns the element given by the index, if any; otherwise, +nil+: - # - # d = REXML::Document.new(xml_string) - # eles = d.root.elements - # eles # => # ... > - # eles[1] # => ... - # eles.size # => 4 - # eles[4] # => ... - # eles[5] # => nil - # - # The node at this index is not an \Element, and so is not returned: - # - # eles = d.root.first.first # => ... </> - # eles.to_a # => ["Everyday Italian"] - # eles[1] # => nil - # - # When the single argument +xpath+ is given, - # returns the first element found via that +xpath+, if any; otherwise, +nil+: - # - # eles = d.root.elements # => #<REXML::Elements @element=<bookstore> ... </>> - # eles['/bookstore'] # => <bookstore> ... </> - # eles['//book'] # => <book category='cooking'> ... </> - # eles['//book [@category="children"]'] # => <book category='children'> ... </> - # eles['/nosuch'] # => nil - # eles['//nosuch'] # => nil - # eles['//book [@category="nosuch"]'] # => nil - # eles['.'] # => <bookstore> ... </> - # eles['..'].class # => REXML::Document - # - # With arguments +n+ and +name+ given, - # returns the _nth_ found element that has the given +name+, - # or +nil+ if there is no such _nth_ element: - # - # eles = d.root.elements # => #<REXML::Elements @element=<bookstore> ... </>> - # eles[1, 'book'] # => <book category='cooking'> ... </> - # eles[4, 'book'] # => <book category='web' cover='paperback'> ... </> - # eles[5, 'book'] # => nil - # - # source://rexml//lib/rexml/element.rb#1676 - def [](index, name = T.unsafe(nil)); end - - # :call-seq: - # elements[] = index, replacement_element -> replacement_element or nil - # - # Replaces or adds an element. - # - # When <tt>eles[index]</tt> exists, replaces it with +replacement_element+ - # and returns +replacement_element+: - # - # d = REXML::Document.new(xml_string) - # eles = d.root.elements # => #<REXML::Elements @element=<bookstore> ... </>> - # eles[1] # => <book category='cooking'> ... </> - # eles[1] = REXML::Element.new('foo') - # eles[1] # => <foo/> - # - # Does nothing (or raises an exception) - # if +replacement_element+ is not an \Element: - # eles[2] # => <book category='web' cover='paperback'> ... </> - # eles[2] = REXML::Text.new('bar') - # eles[2] # => <book category='web' cover='paperback'> ... </> - # - # When <tt>eles[index]</tt> does not exist, - # adds +replacement_element+ to the element and returns - # - # d = REXML::Document.new(xml_string) - # eles = d.root.elements # => #<REXML::Elements @element=<bookstore> ... </>> - # eles.size # => 4 - # eles[50] = REXML::Element.new('foo') # => <foo/> - # eles.size # => 5 - # eles[5] # => <foo/> - # - # Does nothing (or raises an exception) - # if +replacement_element+ is not an \Element: - # - # eles[50] = REXML::Text.new('bar') # => "bar" - # eles.size # => 5 - # - # source://rexml//lib/rexml/element.rb#1731 - def []=(index, element); end - - # :call-seq: - # add -> new_element - # add(name) -> new_element - # add(element) -> element - # - # Adds an element; returns the element added. - # - # With no argument, creates and adds a new element. - # The new element has: - # - # - No name. - # - \Parent from the \Elements object. - # - Context from the that parent. - # - # Example: - # - # d = REXML::Document.new(xml_string) - # elements = d.root.elements - # parent = elements.parent # => <bookstore> ... </> - # parent.context = {raw: :all} - # elements.size # => 4 - # new_element = elements.add # => </> - # elements.size # => 5 - # new_element.name # => nil - # new_element.parent # => <bookstore> ... </> - # new_element.context # => {:raw=>:all} - # - # With string argument +name+, creates and adds a new element. - # The new element has: - # - # - Name +name+. - # - \Parent from the \Elements object. - # - Context from the that parent. - # - # Example: - # - # d = REXML::Document.new(xml_string) - # elements = d.root.elements - # parent = elements.parent # => <bookstore> ... </> - # parent.context = {raw: :all} - # elements.size # => 4 - # new_element = elements.add('foo') # => <foo/> - # elements.size # => 5 - # new_element.name # => "foo" - # new_element.parent # => <bookstore> ... </> - # new_element.context # => {:raw=>:all} - # - # With argument +element+, - # creates and adds a clone of the given +element+. - # The new element has name, parent, and context from the given +element+. - # - # d = REXML::Document.new(xml_string) - # elements = d.root.elements - # elements.size # => 4 - # e0 = REXML::Element.new('foo') - # e1 = REXML::Element.new('bar', e0, {raw: :all}) - # element = elements.add(e1) # => <bar/> - # elements.size # => 5 - # element.name # => "bar" - # element.parent # => <bookstore> ... </> - # element.context # => {:raw=>:all} - # - # source://rexml//lib/rexml/element.rb#1921 - def add(element = T.unsafe(nil)); end - - # :call-seq: - # collect(xpath = nil) {|element| ... } -> array - # - # Iterates over the elements; returns the array of block return values. - # - # With no argument, iterates over all elements: - # - # d = REXML::Document.new(xml_string) - # elements = d.root.elements - # elements.collect {|element| element.size } # => [9, 9, 17, 9] - # - # With argument +xpath+, iterates over elements that match - # the given +xpath+: - # - # xpath = '//book [@category="web"]' - # elements.collect(xpath) {|element| element.size } # => [17, 9] - # - # source://rexml//lib/rexml/element.rb#1984 - def collect(xpath = T.unsafe(nil)); end - - # :call-seq: - # delete(index) -> removed_element or nil - # delete(element) -> removed_element or nil - # delete(xpath) -> removed_element or nil - # - # Removes an element; returns the removed element, or +nil+ if none removed. - # - # With integer argument +index+ given, - # removes the child element at that offset: - # - # d = REXML::Document.new(xml_string) - # elements = d.root.elements - # elements.size # => 4 - # elements[2] # => <book category='children'> ... </> - # elements.delete(2) # => <book category='children'> ... </> - # elements.size # => 3 - # elements[2] # => <book category='web'> ... </> - # elements.delete(50) # => nil - # - # With element argument +element+ given, - # removes that child element: - # - # d = REXML::Document.new(xml_string) - # elements = d.root.elements - # ele_1, ele_2, ele_3, ele_4 = *elements - # elements.size # => 4 - # elements[2] # => <book category='children'> ... </> - # elements.delete(ele_2) # => <book category='children'> ... </> - # elements.size # => 3 - # elements[2] # => <book category='web'> ... </> - # elements.delete(ele_2) # => nil - # - # With string argument +xpath+ given, - # removes the first element found via that xpath: - # - # d = REXML::Document.new(xml_string) - # elements = d.root.elements - # elements.delete('//book') # => <book category='cooking'> ... </> - # elements.delete('//book [@category="children"]') # => <book category='children'> ... </> - # elements.delete('//nosuch') # => nil - # - # source://rexml//lib/rexml/element.rb#1821 - def delete(element); end - - # :call-seq: - # delete_all(xpath) - # - # Removes all elements found via the given +xpath+; - # returns the array of removed elements, if any, else +nil+. - # - # d = REXML::Document.new(xml_string) - # elements = d.root.elements - # elements.size # => 4 - # deleted_elements = elements.delete_all('//book [@category="web"]') - # deleted_elements.size # => 2 - # elements.size # => 2 - # deleted_elements = elements.delete_all('//book') - # deleted_elements.size # => 2 - # elements.size # => 0 - # elements.delete_all('//book') # => [] - # - # source://rexml//lib/rexml/element.rb#1847 - def delete_all(xpath); end - - # :call-seq: - # each(xpath = nil) {|element| ... } -> self - # - # Iterates over the elements. - # - # With no argument, calls the block with each element: - # - # d = REXML::Document.new(xml_string) - # elements = d.root.elements - # elements.each {|element| p element } - # - # Output: - # - # <book category='cooking'> ... </> - # <book category='children'> ... </> - # <book category='web'> ... </> - # <book category='web' cover='paperback'> ... </> - # - # With argument +xpath+, calls the block with each element - # that matches the given +xpath+: - # - # elements.each('//book [@category="web"]') {|element| p element } - # - # Output: - # - # <book category='web'> ... </> - # <book category='web' cover='paperback'> ... </> - # - # source://rexml//lib/rexml/element.rb#1963 - def each(xpath = T.unsafe(nil)); end - - # :call-seq: - # empty? -> true or false - # - # Returns +true+ if there are no children, +false+ otherwise. - # - # d = REXML::Document.new('') - # d.elements.empty? # => true - # d = REXML::Document.new(xml_string) - # d.elements.empty? # => false - # - # @return [Boolean] - # - # source://rexml//lib/rexml/element.rb#1751 - def empty?; end - - # :call-seq: - # index(element) - # - # Returns the 1-based index of the given +element+, if found; - # otherwise, returns -1: - # - # d = REXML::Document.new(xml_string) - # elements = d.root.elements - # ele_1, ele_2, ele_3, ele_4 = *elements - # elements.index(ele_4) # => 4 - # elements.delete(ele_3) - # elements.index(ele_4) # => 3 - # elements.index(ele_3) # => -1 - # - # source://rexml//lib/rexml/element.rb#1769 - def index(element); end - - # :call-seq: - # inject(xpath = nil, initial = nil) -> object - # - # Calls the block with elements; returns the last block return value. - # - # With no argument, iterates over the elements, calling the block - # <tt>elements.size - 1</tt> times. - # - # - The first call passes the first and second elements. - # - The second call passes the first block return value and the third element. - # - The third call passes the second block return value and the fourth element. - # - And so on. - # - # In this example, the block returns the passed element, - # which is then the object argument to the next call: - # - # d = REXML::Document.new(xml_string) - # elements = d.root.elements - # elements.inject do |object, element| - # p [elements.index(object), elements.index(element)] - # element - # end - # - # Output: - # - # [1, 2] - # [2, 3] - # [3, 4] - # - # With the single argument +xpath+, calls the block only with - # elements matching that xpath: - # - # elements.inject('//book [@category="web"]') do |object, element| - # p [elements.index(object), elements.index(element)] - # element - # end - # - # Output: - # - # [3, 4] - # - # With argument +xpath+ given as +nil+ - # and argument +initial+ also given, - # calls the block once for each element. - # - # - The first call passes the +initial+ and the first element. - # - The second call passes the first block return value and the second element. - # - The third call passes the second block return value and the third element. - # - And so on. - # - # In this example, the first object index is <tt>-1</tt> - # - # elements.inject(nil, 'Initial') do |object, element| - # p [elements.index(object), elements.index(element)] - # element - # end - # - # Output: - # - # [-1, 1] - # [1, 2] - # [2, 3] - # [3, 4] - # - # In this form the passed object can be used as an accumulator: - # - # elements.inject(nil, 0) do |total, element| - # total += element.size - # end # => 44 - # - # With both arguments +xpath+ and +initial+ are given, - # calls the block only with elements matching that xpath: - # - # elements.inject('//book [@category="web"]', 0) do |total, element| - # total += element.size - # end # => 26 - # - # source://rexml//lib/rexml/element.rb#2069 - def inject(xpath = T.unsafe(nil), initial = T.unsafe(nil)); end - - # :call-seq: - # parent - # - # Returns the parent element cited in creating the \Elements object. - # This element is also the default starting point for searching - # in the \Elements object. - # - # d = REXML::Document.new(xml_string) - # elements = REXML::Elements.new(d.root) - # elements.parent == d.root # => true - # - # source://rexml//lib/rexml/element.rb#1619 - def parent; end - - # :call-seq: - # size -> integer - # - # Returns the count of \Element children: - # - # d = REXML::Document.new '<a>sean<b/>elliott<b/>russell<b/></a>' - # d.root.elements.size # => 3 # Three elements. - # d.root.size # => 6 # Three elements plus three text nodes.. - # - # source://rexml//lib/rexml/element.rb#2093 - def size; end - - # :call-seq: - # to_a(xpath = nil) -> array_of_elements - # - # Returns an array of element children (not including non-element children). - # - # With no argument, returns an array of all element children: - # - # d = REXML::Document.new '<a>sean<b/>elliott<c/></a>' - # elements = d.root.elements - # elements.to_a # => [<b/>, <c/>] # Omits non-element children. - # children = d.root.children - # children # => ["sean", <b/>, "elliott", <c/>] # Includes non-element children. - # - # With argument +xpath+, returns an array of element children - # that match the xpath: - # - # elements.to_a('//c') # => [<c/>] - # - # source://rexml//lib/rexml/element.rb#2117 - def to_a(xpath = T.unsafe(nil)); end - - private - - # Private helper class. Removes quotes from quoted strings - # - # source://rexml//lib/rexml/element.rb#2125 - def literalize(name); end -end - -# source://rexml//lib/rexml/encoding.rb#4 -module REXML::Encoding - # source://rexml//lib/rexml/encoding.rb#29 - def decode(string); end - - # source://rexml//lib/rexml/encoding.rb#25 - def encode(string); end - - # ID ---> Encoding name - # - # source://rexml//lib/rexml/encoding.rb#6 - def encoding; end - - # source://rexml//lib/rexml/encoding.rb#7 - def encoding=(encoding); end - - private - - # source://rexml//lib/rexml/encoding.rb#34 - def find_encoding(name); end -end - -# source://rexml//lib/rexml/entity.rb#7 -class REXML::Entity < ::REXML::Child - include ::REXML::XMLTokens - - # Create a new entity. Simple entities can be constructed by passing a - # name, value to the constructor; this creates a generic, plain entity - # reference. For anything more complicated, you have to pass a Source to - # the constructor with the entity definition, or use the accessor methods. - # +WARNING+: There is no validation of entity state except when the entity - # is read from a stream. If you start poking around with the accessors, - # you can easily create a non-conformant Entity. - # - # e = Entity.new( 'amp', '&' ) - # - # @return [Entity] a new instance of Entity - # - # source://rexml//lib/rexml/entity.rb#34 - def initialize(stream, value = T.unsafe(nil), parent = T.unsafe(nil), reference = T.unsafe(nil)); end - - # Returns the value of attribute external. - # - # source://rexml//lib/rexml/entity.rb#23 - def external; end - - # Returns the value of attribute name. - # - # source://rexml//lib/rexml/entity.rb#23 - def name; end - - # Returns the value of attribute ndata. - # - # source://rexml//lib/rexml/entity.rb#23 - def ndata; end - - # Returns the value of this entity unprocessed -- raw. This is the - # normalized value; that is, with all %ent; and &ent; entities intact - # - # source://rexml//lib/rexml/entity.rb#83 - def normalized; end - - # Returns the value of attribute pubid. - # - # source://rexml//lib/rexml/entity.rb#23 - def pubid; end - - # Returns the value of attribute ref. - # - # source://rexml//lib/rexml/entity.rb#23 - def ref; end - - # Returns this entity as a string. See write(). - # - # source://rexml//lib/rexml/entity.rb#117 - def to_s; end - - # Evaluates to the unnormalized value of this entity; that is, replacing - # &ent; entities. - # - # source://rexml//lib/rexml/entity.rb#73 - def unnormalized; end - - # Returns the value of attribute value. - # - # source://rexml//lib/rexml/entity.rb#23 - def value; end - - # Write out a fully formed, correct entity definition (assuming the Entity - # object itself is valid.) - # - # out:: - # An object implementing <TT><<</TT> to which the entity will be - # output - # indent:: - # *DEPRECATED* and ignored - # - # source://rexml//lib/rexml/entity.rb#95 - def write(out, indent = T.unsafe(nil)); end - - class << self - # Evaluates whether the given string matches an entity definition, - # returning true if so, and false otherwise. - # - # @return [Boolean] - # - # source://rexml//lib/rexml/entity.rb#67 - def matches?(string); end - end -end - -# source://rexml//lib/rexml/doctype.rb#267 -class REXML::ExternalEntity < ::REXML::Child - # @return [ExternalEntity] a new instance of ExternalEntity - # - # source://rexml//lib/rexml/doctype.rb#268 - def initialize(src); end - - # source://rexml//lib/rexml/doctype.rb#272 - def to_s; end - - # source://rexml//lib/rexml/doctype.rb#275 - def write(output, indent); end -end - -# source://rexml//lib/rexml/formatters/default.rb#5 -class REXML::Formatters::Default - # Prints out the XML document with no formatting -- except if ie_hack is - # set. - # - # ie_hack:: - # If set to true, then inserts whitespace before the close of an empty - # tag, so that IE's bad XML parser doesn't choke. - # - # @return [Default] a new instance of Default - # - # source://rexml//lib/rexml/formatters/default.rb#12 - def initialize(ie_hack = T.unsafe(nil)); end - - # Writes the node to some output. - # - # node:: - # The node to write - # output:: - # A class implementing <TT><<</TT>. Pass in an Output object to - # change the output encoding. - # - # source://rexml//lib/rexml/formatters/default.rb#23 - def write(node, output); end - - protected - - # source://rexml//lib/rexml/formatters/default.rb#98 - def write_cdata(node, output); end - - # source://rexml//lib/rexml/formatters/default.rb#92 - def write_comment(node, output); end - - # source://rexml//lib/rexml/formatters/default.rb#61 - def write_document(node, output); end - - # source://rexml//lib/rexml/formatters/default.rb#65 - def write_element(node, output); end - - # source://rexml//lib/rexml/formatters/default.rb#104 - def write_instruction(node, output); end - - # source://rexml//lib/rexml/formatters/default.rb#88 - def write_text(node, output); end -end - -# Pretty-prints an XML document. This destroys whitespace in text nodes -# and will insert carriage returns and indentations. -# -# TODO: Add an option to print attributes on new lines -# -# source://rexml//lib/rexml/formatters/pretty.rb#10 -class REXML::Formatters::Pretty < ::REXML::Formatters::Default - # Create a new pretty printer. - # - # output:: - # An object implementing '<<(String)', to which the output will be written. - # indentation:: - # An integer greater than 0. The indentation of each level will be - # this number of spaces. If this is < 1, the behavior of this object - # is undefined. Defaults to 2. - # ie_hack:: - # If true, the printer will insert whitespace before closing empty - # tags, thereby allowing Internet Explorer's XML parser to - # function. Defaults to false. - # - # @return [Pretty] a new instance of Pretty - # - # source://rexml//lib/rexml/formatters/pretty.rb#30 - def initialize(indentation = T.unsafe(nil), ie_hack = T.unsafe(nil)); end - - # If compact is set to true, then the formatter will attempt to use as - # little space as possible - # - # source://rexml//lib/rexml/formatters/pretty.rb#14 - def compact; end - - # If compact is set to true, then the formatter will attempt to use as - # little space as possible - # - # source://rexml//lib/rexml/formatters/pretty.rb#14 - def compact=(_arg0); end - - # The width of a page. Used for formatting text - # - # source://rexml//lib/rexml/formatters/pretty.rb#16 - def width; end - - # The width of a page. Used for formatting text - # - # source://rexml//lib/rexml/formatters/pretty.rb#16 - def width=(_arg0); end - - protected - - # source://rexml//lib/rexml/formatters/pretty.rb#102 - def write_cdata(node, output); end - - # source://rexml//lib/rexml/formatters/pretty.rb#97 - def write_comment(node, output); end - - # source://rexml//lib/rexml/formatters/pretty.rb#107 - def write_document(node, output); end - - # source://rexml//lib/rexml/formatters/pretty.rb#39 - def write_element(node, output); end - - # source://rexml//lib/rexml/formatters/pretty.rb#88 - def write_text(node, output); end - - private - - # source://rexml//lib/rexml/formatters/pretty.rb#124 - def indent_text(string, level = T.unsafe(nil), style = T.unsafe(nil), indentfirstline = T.unsafe(nil)); end - - # source://rexml//lib/rexml/formatters/pretty.rb#129 - def wrap(string, width); end -end - -# A Source that wraps an IO. See the Source class for method -# documentation -# -# source://rexml//lib/rexml/source.rb#182 -class REXML::IOSource < ::REXML::Source - # block_size has been deprecated - # - # @return [IOSource] a new instance of IOSource - # - # source://rexml//lib/rexml/source.rb#186 - def initialize(arg, block_size = T.unsafe(nil), encoding = T.unsafe(nil)); end - - # @return the current line in the source - # - # source://rexml//lib/rexml/source.rb#274 - def current_line; end - - # @return [Boolean] - # - # source://rexml//lib/rexml/source.rb#269 - def empty?; end - - # source://rexml//lib/rexml/source.rb#246 - def ensure_buffer; end - - # source://rexml//lib/rexml/source.rb#250 - def match(pattern, cons = T.unsafe(nil)); end - - # source://rexml//lib/rexml/source.rb#207 - def read(term = T.unsafe(nil), min_bytes = T.unsafe(nil)); end - - # source://rexml//lib/rexml/source.rb#228 - def read_until(term); end - - private - - # source://rexml//lib/rexml/source.rb#316 - def encoding_updated; end - - # source://rexml//lib/rexml/source.rb#296 - def readline(term = T.unsafe(nil)); end -end - -# Represents an XML Instruction; IE, <? ... ?> -# TODO: Add parent arg (3rd arg) to constructor -# -# source://rexml//lib/rexml/instruction.rb#9 -class REXML::Instruction < ::REXML::Child - # Constructs a new Instruction - # the target of this instruction is set to this. If an Instruction, - # then the Instruction is shallowly cloned (target and content are - # copied). - # be a Parent if the target argument is a Source. Otherwise, this - # String is set as the content of this instruction. - # - # @param target can be one of a number of things. If String, then - # @param content Must be either a String, or a Parent. Can only - # @return [Instruction] a new instance of Instruction - # - # source://rexml//lib/rexml/instruction.rb#25 - def initialize(target, content = T.unsafe(nil)); end - - # of the other matches the target and content of this object. - # - # @return true if other is an Instruction, and the content and target - # - # source://rexml//lib/rexml/instruction.rb#65 - def ==(other); end - - # source://rexml//lib/rexml/instruction.rb#44 - def clone; end - - # target is the "name" of the Instruction; IE, the "tag" in <?tag ...?> - # content is everything else. - # - # source://rexml//lib/rexml/instruction.rb#15 - def content; end - - # target is the "name" of the Instruction; IE, the "tag" in <?tag ...?> - # content is everything else. - # - # source://rexml//lib/rexml/instruction.rb#15 - def content=(_arg0); end - - # source://rexml//lib/rexml/instruction.rb#75 - def inspect; end - - # source://rexml//lib/rexml/instruction.rb#71 - def node_type; end - - # target is the "name" of the Instruction; IE, the "tag" in <?tag ...?> - # content is everything else. - # - # source://rexml//lib/rexml/instruction.rb#15 - def target; end - - # target is the "name" of the Instruction; IE, the "tag" in <?tag ...?> - # content is everything else. - # - # source://rexml//lib/rexml/instruction.rb#15 - def target=(_arg0); end - - # == DEPRECATED - # See the rexml/formatters package - # - # source://rexml//lib/rexml/instruction.rb#51 - def write(writer, indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end -end - -# Adds named attributes to an object. -# -# source://rexml//lib/rexml/namespace.rb#7 -module REXML::Namespace - include ::REXML::XMLTokens - - # The name of the object, valid if set - # - # source://rexml//lib/rexml/namespace.rb#9 - def expanded_name; end - - # Fully expand the name, even if the prefix wasn't specified in the - # source file. - # - # source://rexml//lib/rexml/namespace.rb#57 - def fully_expanded_name; end - - # Compares names optionally WITH namespaces - # - # @return [Boolean] - # - # source://rexml//lib/rexml/namespace.rb#43 - def has_name?(other, ns = T.unsafe(nil)); end - - # The name of the object, valid if set - # - # source://rexml//lib/rexml/namespace.rb#9 - def name; end - - # Sets the name and the expanded name - # - # source://rexml//lib/rexml/namespace.rb#17 - def name=(name); end - - # The expanded name of the object, valid if name is set - # - # source://rexml//lib/rexml/namespace.rb#11 - def prefix; end - - # The expanded name of the object, valid if name is set - # - # source://rexml//lib/rexml/namespace.rb#11 - def prefix=(_arg0); end -end - -# source://rexml//lib/rexml/namespace.rb#13 -REXML::Namespace::NAME_WITHOUT_NAMESPACE = T.let(T.unsafe(nil), Regexp) - -# source://rexml//lib/rexml/doctype.rb#280 -class REXML::NotationDecl < ::REXML::Child - # @return [NotationDecl] a new instance of NotationDecl - # - # source://rexml//lib/rexml/doctype.rb#282 - def initialize(name, middle, pub, sys); end - - # This method retrieves the name of the notation. - # - # Method contributed by Henrik Martensson - # - # source://rexml//lib/rexml/doctype.rb#307 - def name; end - - # Returns the value of attribute public. - # - # source://rexml//lib/rexml/doctype.rb#281 - def public; end - - # Sets the attribute public - # - # @param value the value to set the attribute public to. - # - # source://rexml//lib/rexml/doctype.rb#281 - def public=(_arg0); end - - # Returns the value of attribute system. - # - # source://rexml//lib/rexml/doctype.rb#281 - def system; end - - # Sets the attribute system - # - # @param value the value to set the attribute system to. - # - # source://rexml//lib/rexml/doctype.rb#281 - def system=(_arg0); end - - # source://rexml//lib/rexml/doctype.rb#290 - def to_s; end - - # source://rexml//lib/rexml/doctype.rb#300 - def write(output, indent = T.unsafe(nil)); end -end - -# source://rexml//lib/rexml/output.rb#5 -class REXML::Output - include ::REXML::Encoding - - # @return [Output] a new instance of Output - # - # source://rexml//lib/rexml/output.rb#10 - def initialize(real_IO, encd = T.unsafe(nil)); end - - # source://rexml//lib/rexml/output.rb#22 - def <<(content); end - - # Returns the value of attribute encoding. - # - # source://rexml//lib/rexml/output.rb#8 - def encoding; end - - # source://rexml//lib/rexml/output.rb#26 - def to_s; end -end - -# A parent has children, and has methods for accessing them. The Parent -# class is never encountered except as the superclass for some other -# object. -# -# source://rexml//lib/rexml/parent.rb#8 -class REXML::Parent < ::REXML::Child - include ::Enumerable - - # Constructor - # - # @param parent if supplied, will be set as the parent of this object - # @return [Parent] a new instance of Parent - # - # source://rexml//lib/rexml/parent.rb#13 - def initialize(parent = T.unsafe(nil)); end - - # source://rexml//lib/rexml/parent.rb#18 - def <<(object); end - - # Fetches a child at a given index - # - # @param index the Integer index of the child to fetch - # - # source://rexml//lib/rexml/parent.rb#57 - def [](index); end - - # Set an index entry. See Array.[]= - # - # @param index the index of the element to set - # @param opt either the object to set, or an Integer length - # @param child if opt is an Integer, this is the child to set - # @return the parent (self) - # - # source://rexml//lib/rexml/parent.rb#70 - def []=(*args); end - - # source://rexml//lib/rexml/parent.rb#18 - def add(object); end - - # source://rexml//lib/rexml/parent.rb#115 - def children; end - - # Deeply clones this object. This creates a complete duplicate of this - # Parent, including all descendants. - # - # source://rexml//lib/rexml/parent.rb#148 - def deep_clone; end - - # source://rexml//lib/rexml/parent.rb#32 - def delete(object); end - - # source://rexml//lib/rexml/parent.rb#47 - def delete_at(index); end - - # source://rexml//lib/rexml/parent.rb#43 - def delete_if(&block); end - - # source://rexml//lib/rexml/parent.rb#39 - def each(&block); end - - # source://rexml//lib/rexml/parent.rb#39 - def each_child(&block); end - - # source://rexml//lib/rexml/parent.rb#51 - def each_index(&block); end - - # Fetches the index of a given child - # of this parent. - # - # @param child the child to get the index of - # @return the index of the child, or nil if the object is not a child - # - # source://rexml//lib/rexml/parent.rb#123 - def index(child); end - - # Inserts an child after another child - # child2 will be inserted after child1 in the child list of the parent. - # If an xpath, child2 will be inserted after the first child to match - # the xpath. - # - # @param child1 this is either an xpath or an Element. If an Element, - # @param child2 the child to insert - # @return the parent (self) - # - # source://rexml//lib/rexml/parent.rb#102 - def insert_after(child1, child2); end - - # Inserts an child before another child - # child2 will be inserted before child1 in the child list of the parent. - # If an xpath, child2 will be inserted before the first child to match - # the xpath. - # - # @param child1 this is either an xpath or an Element. If an Element, - # @param child2 the child to insert - # @return the parent (self) - # - # source://rexml//lib/rexml/parent.rb#82 - def insert_before(child1, child2); end - - # @return the number of children of this parent - # - # source://rexml//lib/rexml/parent.rb#130 - def length; end - - # @return [Boolean] - # - # source://rexml//lib/rexml/parent.rb#162 - def parent?; end - - # source://rexml//lib/rexml/parent.rb#18 - def push(object); end - - # Replaces one child with another, making sure the nodelist is correct - # Child) - # - # @param to_replace the child to replace (must be a Child) - # @param replacement the child to insert into the nodelist (must be a - # - # source://rexml//lib/rexml/parent.rb#140 - def replace_child(to_replace, replacement); end - - # @return the number of children of this parent - # - # source://rexml//lib/rexml/parent.rb#130 - def size; end - - # source://rexml//lib/rexml/parent.rb#115 - def to_a; end - - # source://rexml//lib/rexml/parent.rb#27 - def unshift(object); end -end - -# source://rexml//lib/rexml/parseexception.rb#3 -class REXML::ParseException < ::RuntimeError - # @return [ParseException] a new instance of ParseException - # - # source://rexml//lib/rexml/parseexception.rb#6 - def initialize(message, source = T.unsafe(nil), parser = T.unsafe(nil), exception = T.unsafe(nil)); end - - # source://rexml//lib/rexml/parseexception.rb#49 - def context; end - - # Returns the value of attribute continued_exception. - # - # source://rexml//lib/rexml/parseexception.rb#4 - def continued_exception; end - - # Sets the attribute continued_exception - # - # @param value the value to set the attribute continued_exception to. - # - # source://rexml//lib/rexml/parseexception.rb#4 - def continued_exception=(_arg0); end - - # source://rexml//lib/rexml/parseexception.rb#44 - def line; end - - # Returns the value of attribute parser. - # - # source://rexml//lib/rexml/parseexception.rb#4 - def parser; end - - # Sets the attribute parser - # - # @param value the value to set the attribute parser to. - # - # source://rexml//lib/rexml/parseexception.rb#4 - def parser=(_arg0); end - - # source://rexml//lib/rexml/parseexception.rb#39 - def position; end - - # Returns the value of attribute source. - # - # source://rexml//lib/rexml/parseexception.rb#4 - def source; end - - # Sets the attribute source - # - # @param value the value to set the attribute source to. - # - # source://rexml//lib/rexml/parseexception.rb#4 - def source=(_arg0); end - - # source://rexml//lib/rexml/parseexception.rb#13 - def to_s; end -end - -# = Using the Pull Parser -# <em>This API is experimental, and subject to change.</em> -# parser = PullParser.new( "<a>text<b att='val'/>txet</a>" ) -# while parser.has_next? -# res = parser.next -# puts res[1]['att'] if res.start_tag? and res[0] == 'b' -# end -# See the PullEvent class for information on the content of the results. -# The data is identical to the arguments passed for the various events to -# the StreamListener API. -# -# Notice that: -# parser = PullParser.new( "<a>BAD DOCUMENT" ) -# while parser.has_next? -# res = parser.next -# raise res[1] if res.error? -# end -# -# Nat Price gave me some good ideas for the API. -# -# source://rexml//lib/rexml/parsers/baseparser.rb#57 -class REXML::Parsers::BaseParser - # @return [BaseParser] a new instance of BaseParser - # - # source://rexml//lib/rexml/parsers/baseparser.rb#162 - def initialize(source); end - - # source://rexml//lib/rexml/parsers/baseparser.rb#169 - def add_listener(listener); end - - # Returns true if there are no more events - # - # @return [Boolean] - # - # source://rexml//lib/rexml/parsers/baseparser.rb#198 - def empty?; end - - # source://rexml//lib/rexml/parsers/baseparser.rb#530 - def entity(reference, entities); end - - # Returns the value of attribute entity_expansion_count. - # - # source://rexml//lib/rexml/parsers/baseparser.rb#174 - def entity_expansion_count; end - - # Returns true if there are more events. Synonymous with !empty? - # - # @return [Boolean] - # - # source://rexml//lib/rexml/parsers/baseparser.rb#203 - def has_next?; end - - # Escapes all possible entities - # - # source://rexml//lib/rexml/parsers/baseparser.rb#541 - def normalize(input, entities = T.unsafe(nil), entity_filter = T.unsafe(nil)); end - - # Peek at the +depth+ event in the stack. The first element on the stack - # is at depth 0. If +depth+ is -1, will parse to the end of the input - # stream and return the last event, which is always :end_document. - # Be aware that this causes the stream to be parsed up to the +depth+ - # event, so you can effectively pre-parse the entire document (pull the - # entire thing into memory) using this method. - # - # source://rexml//lib/rexml/parsers/baseparser.rb#219 - def peek(depth = T.unsafe(nil)); end - - # source://rexml//lib/rexml/parsers/baseparser.rb#188 - def position; end - - # Returns the next event. This is a +PullEvent+ object. - # - # source://rexml//lib/rexml/parsers/baseparser.rb#234 - def pull; end - - # Returns the value of attribute source. - # - # source://rexml//lib/rexml/parsers/baseparser.rb#173 - def source; end - - # source://rexml//lib/rexml/parsers/baseparser.rb#176 - def stream=(source); end - - # Unescapes all possible entities - # - # source://rexml//lib/rexml/parsers/baseparser.rb#557 - 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#209 - def unshift(token); end - - private - - # source://rexml//lib/rexml/parsers/baseparser.rb#602 - def add_namespace(prefix, uri); end - - # @return [Boolean] - # - # source://rexml//lib/rexml/parsers/baseparser.rb#635 - def need_source_encoding_update?(xml_declaration_encoding); end - - # source://rexml//lib/rexml/parsers/baseparser.rb#755 - def parse_attributes(prefixes); end - - # source://rexml//lib/rexml/parsers/baseparser.rb#654 - def parse_id(base_error_message, accept_external_id:, accept_public_id:); end - - # source://rexml//lib/rexml/parsers/baseparser.rb#682 - def parse_id_invalid_details(accept_external_id:, accept_public_id:); end - - # source://rexml//lib/rexml/parsers/baseparser.rb#641 - def parse_name(base_error_message); end - - # source://rexml//lib/rexml/parsers/baseparser.rb#617 - def pop_namespaces_restore; end - - # source://rexml//lib/rexml/parsers/baseparser.rb#720 - def process_instruction; end - - # source://rexml//lib/rexml/parsers/baseparser.rb#244 - def pull_event; end - - # source://rexml//lib/rexml/parsers/baseparser.rb#611 - def push_namespaces_restore; end - - # source://rexml//lib/rexml/parsers/baseparser.rb#628 - def record_entity_expansion(delta = T.unsafe(nil)); end -end - -# source://rexml//lib/rexml/parsers/baseparser.rb#130 -REXML::Parsers::BaseParser::EXTERNAL_ID_PUBLIC = T.let(T.unsafe(nil), Regexp) - -# source://rexml//lib/rexml/parsers/baseparser.rb#131 -REXML::Parsers::BaseParser::EXTERNAL_ID_SYSTEM = T.let(T.unsafe(nil), Regexp) - -# source://rexml//lib/rexml/parsers/baseparser.rb#132 -REXML::Parsers::BaseParser::PUBLIC_ID = T.let(T.unsafe(nil), Regexp) - -# source://rexml//lib/rexml/parsers/baseparser.rb#143 -module REXML::Parsers::BaseParser::Private; end - -# source://rexml//lib/rexml/parsers/baseparser.rb#147 -REXML::Parsers::BaseParser::Private::ATTLISTDECL_END = T.let(T.unsafe(nil), Regexp) - -# source://rexml//lib/rexml/parsers/baseparser.rb#152 -REXML::Parsers::BaseParser::Private::CARRIAGE_RETURN_NEWLINE_PATTERN = T.let(T.unsafe(nil), Regexp) - -# source://rexml//lib/rexml/parsers/baseparser.rb#153 -REXML::Parsers::BaseParser::Private::CHARACTER_REFERENCES = T.let(T.unsafe(nil), Regexp) - -# source://rexml//lib/rexml/parsers/baseparser.rb#146 -REXML::Parsers::BaseParser::Private::CLOSE_PATTERN = T.let(T.unsafe(nil), Regexp) - -# source://rexml//lib/rexml/parsers/baseparser.rb#154 -REXML::Parsers::BaseParser::Private::DEFAULT_ENTITIES_PATTERNS = T.let(T.unsafe(nil), Hash) - -# source://rexml//lib/rexml/parsers/baseparser.rb#151 -REXML::Parsers::BaseParser::Private::ENTITYDECL_PATTERN = T.let(T.unsafe(nil), Regexp) - -# source://rexml//lib/rexml/parsers/baseparser.rb#149 -REXML::Parsers::BaseParser::Private::GEDECL_PATTERN = T.let(T.unsafe(nil), String) - -# source://rexml//lib/rexml/parsers/baseparser.rb#148 -REXML::Parsers::BaseParser::Private::NAME_PATTERN = T.let(T.unsafe(nil), Regexp) - -# source://rexml//lib/rexml/parsers/baseparser.rb#150 -REXML::Parsers::BaseParser::Private::PEDECL_PATTERN = T.let(T.unsafe(nil), String) - -# source://rexml//lib/rexml/parsers/baseparser.rb#144 -REXML::Parsers::BaseParser::Private::PEREFERENCE_PATTERN = T.let(T.unsafe(nil), Regexp) - -# source://rexml//lib/rexml/parsers/baseparser.rb#145 -REXML::Parsers::BaseParser::Private::TAG_PATTERN = T.let(T.unsafe(nil), Regexp) - -# source://rexml//lib/rexml/parsers/baseparser.rb#66 -REXML::Parsers::BaseParser::QNAME = T.let(T.unsafe(nil), Regexp) - -# source://rexml//lib/rexml/parsers/baseparser.rb#65 -REXML::Parsers::BaseParser::QNAME_STR = T.let(T.unsafe(nil), String) - -# source://rexml//lib/rexml/parsers/streamparser.rb#6 -class REXML::Parsers::StreamParser - # @return [StreamParser] a new instance of StreamParser - # - # source://rexml//lib/rexml/parsers/streamparser.rb#7 - def initialize(source, listener); end - - # source://rexml//lib/rexml/parsers/streamparser.rb#13 - def add_listener(listener); end - - # source://rexml//lib/rexml/parsers/streamparser.rb#17 - def entity_expansion_count; end - - # source://rexml//lib/rexml/parsers/streamparser.rb#21 - def parse; end -end - -# source://rexml//lib/rexml/parsers/treeparser.rb#7 -class REXML::Parsers::TreeParser - # @return [TreeParser] a new instance of TreeParser - # - # source://rexml//lib/rexml/parsers/treeparser.rb#8 - def initialize(source, build_context = T.unsafe(nil)); end - - # source://rexml//lib/rexml/parsers/treeparser.rb#13 - def add_listener(listener); end - - # source://rexml//lib/rexml/parsers/treeparser.rb#17 - def parse; end -end - -# You don't want to use this class. Really. Use XPath, which is a wrapper -# for this class. Believe me. You don't want to poke around in here. -# There is strange, dark magic at work in this code. Beware. Go back! Go -# back while you still can! -# -# source://rexml//lib/rexml/parsers/xpathparser.rb#12 -class REXML::Parsers::XPathParser - include ::REXML::XMLTokens - - # source://rexml//lib/rexml/parsers/xpathparser.rb#42 - def abbreviate(path_or_parsed); end - - # source://rexml//lib/rexml/parsers/xpathparser.rb#132 - def expand(path_or_parsed); end - - # source://rexml//lib/rexml/parsers/xpathparser.rb#16 - def namespaces=(namespaces); end - - # source://rexml//lib/rexml/parsers/xpathparser.rb#21 - def parse(path); end - - # For backward compatibility - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#174 - def preciate_to_string(parsed, &block); end - - # source://rexml//lib/rexml/parsers/xpathparser.rb#36 - def predicate(path); end - - # source://rexml//lib/rexml/parsers/xpathparser.rb#174 - def predicate_to_path(parsed, &block); end - - private - - # | AdditiveExpr ('+' | '-') MultiplicativeExpr - # | MultiplicativeExpr - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#505 - def AdditiveExpr(path, parsed); end - - # | AndExpr S 'and' S EqualityExpr - # | EqualityExpr - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#438 - def AndExpr(path, parsed); end - - # | EqualityExpr ('=' | '!=') RelationalExpr - # | RelationalExpr - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#457 - def EqualityExpr(path, parsed); end - - # | FilterExpr Predicate - # | PrimaryExpr - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#608 - def FilterExpr(path, parsed); end - - # | FUNCTION_NAME '(' ( expr ( ',' expr )* )? ')' - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#663 - def FunctionCall(rest, parsed); end - - # LocationPath - # | RelativeLocationPath - # | '/' RelativeLocationPath? - # | '//' RelativeLocationPath - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#243 - def LocationPath(path, parsed); end - - # | MultiplicativeExpr ('*' | S ('div' | 'mod') S) UnaryExpr - # | UnaryExpr - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#528 - def MultiplicativeExpr(path, parsed); end - - # source://rexml//lib/rexml/parsers/xpathparser.rb#343 - def NodeTest(path, parsed); end - - # | OrExpr S 'or' S AndExpr - # | AndExpr - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#419 - def OrExpr(path, parsed); end - - # | LocationPath - # | FilterExpr ('/' | '//') RelativeLocationPath - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#590 - def PathExpr(path, parsed); end - - # Filters the supplied nodeset on the predicate(s) - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#395 - def Predicate(path, parsed); end - - # source://rexml//lib/rexml/parsers/xpathparser.rb#626 - def PrimaryExpr(path, parsed); end - - # | RelationalExpr ('<' | '>' | '<=' | '>=') AdditiveExpr - # | AdditiveExpr - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#480 - def RelationalExpr(path, parsed); end - - # source://rexml//lib/rexml/parsers/xpathparser.rb#267 - def RelativeLocationPath(path, parsed); end - - # | '-' UnaryExpr - # | UnionExpr - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#553 - def UnaryExpr(path, parsed); end - - # | UnionExpr '|' PathExpr - # | PathExpr - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#571 - def UnionExpr(path, parsed); end - - # get_group( '[foo]bar' ) -> ['bar', '[foo]'] - # - # source://rexml//lib/rexml/parsers/xpathparser.rb#676 - def get_group(string); end - - # source://rexml//lib/rexml/parsers/xpathparser.rb#694 - def parse_args(string); end - - # source://rexml//lib/rexml/parsers/xpathparser.rb#224 - def quote_literal(literal); end -end - -# source://rexml//lib/rexml/parsers/xpathparser.rb#339 -REXML::Parsers::XPathParser::LOCAL_NAME_WILDCARD = T.let(T.unsafe(nil), Regexp) - -# Returns a 1-1 map of the nodeset -# The contents of the resulting array are either: -# true/false, if a positive match -# String, if a name match -# NodeTest -# | ('*' | NCNAME ':' '*' | QNAME) NameTest -# | '*' ':' NCNAME NameTest since XPath 2.0 -# | NODE_TYPE '(' ')' NodeType -# | PI '(' LITERAL ')' PI -# | '[' expr ']' Predicate -# -# source://rexml//lib/rexml/parsers/xpathparser.rb#338 -REXML::Parsers::XPathParser::PREFIX_WILDCARD = T.let(T.unsafe(nil), Regexp) - -# source://rexml//lib/rexml/doctype.rb#10 -class REXML::ReferenceWriter - # @return [ReferenceWriter] a new instance of ReferenceWriter - # - # source://rexml//lib/rexml/doctype.rb#11 - def initialize(id_type, public_id_literal, system_literal, context = T.unsafe(nil)); end - - # source://rexml//lib/rexml/doctype.rb#25 - def write(output); end -end - -# A Source can be searched for patterns, and wraps buffers and other -# objects and provides consumption of text -# -# source://rexml//lib/rexml/source.rb#51 -class REXML::Source - include ::REXML::Encoding - - # Constructor - # value, overriding all encoding detection - # - # @param arg must be a String, and should be a valid XML document - # @param encoding if non-null, sets the encoding of the source to this - # @return [Source] a new instance of Source - # - # source://rexml//lib/rexml/source.rb#71 - def initialize(arg, encoding = T.unsafe(nil)); end - - # The current buffer (what we're going to read next) - # - # source://rexml//lib/rexml/source.rb#83 - def buffer; end - - # source://rexml//lib/rexml/source.rb#93 - def buffer_encoding=(encoding); end - - # @return the current line in the source - # - # source://rexml//lib/rexml/source.rb#142 - def current_line; end - - # source://rexml//lib/rexml/source.rb#87 - def drop_parsed_content; end - - # @return [Boolean] true if the Source is exhausted - # - # source://rexml//lib/rexml/source.rb#137 - def empty?; end - - # Returns the value of attribute encoding. - # - # source://rexml//lib/rexml/source.rb#55 - def encoding; end - - # Inherited from Encoding - # Overridden to support optimized en/decoding - # - # source://rexml//lib/rexml/source.rb#99 - def encoding=(enc); end - - # source://rexml//lib/rexml/source.rb#117 - def ensure_buffer; end - - # The line number of the last consumed text - # - # source://rexml//lib/rexml/source.rb#54 - def line; end - - # source://rexml//lib/rexml/source.rb#120 - def match(pattern, cons = T.unsafe(nil)); end - - # source://rexml//lib/rexml/source.rb#128 - def position; end - - # source://rexml//lib/rexml/source.rb#132 - def position=(pos); end - - # source://rexml//lib/rexml/source.rb#104 - def read(term = T.unsafe(nil)); end - - # source://rexml//lib/rexml/source.rb#107 - def read_until(term); end - - private - - # source://rexml//lib/rexml/source.rb#151 - def detect_encoding; end - - # source://rexml//lib/rexml/source.rb#169 - def encoding_updated; end -end - -# source://rexml//lib/rexml/source.rb#57 -module REXML::Source::Private; end - -# source://rexml//lib/rexml/source.rb#59 -REXML::Source::Private::PRE_DEFINED_TERM_PATTERNS = T.let(T.unsafe(nil), Hash) - -# source://rexml//lib/rexml/source.rb#58 -REXML::Source::Private::SCANNER_RESET_SIZE = T.let(T.unsafe(nil), Integer) - -# Represents text nodes in an XML document -# -# source://rexml//lib/rexml/text.rb#11 -class REXML::Text < ::REXML::Child - include ::Comparable - - # Constructor - # +arg+ if a String, the content is set to the String. If a Text, - # the object is shallowly cloned. - # - # +respect_whitespace+ (boolean, false) if true, whitespace is - # respected - # - # +parent+ (nil) if this is a Parent object, the parent - # will be set to this. - # - # +raw+ (nil) This argument can be given three values. - # If true, then the value of used to construct this object is expected to - # contain no unescaped XML markup, and REXML will not change the text. If - # this value is false, the string may contain any characters, and REXML will - # escape any and all defined entities whose values are contained in the - # text. If this value is nil (the default), then the raw value of the - # parent will be used as the raw value for this node. If there is no raw - # value for the parent, and no value is supplied, the default is false. - # Use this field if you have entities defined for some text, and you don't - # want REXML to escape that text in output. - # Text.new( "<&", false, nil, false ) #-> "<&" - # Text.new( "<&", false, nil, false ) #-> "&lt;&amp;" - # Text.new( "<&", false, nil, true ) #-> Parse exception - # Text.new( "<&", false, nil, true ) #-> "<&" - # # Assume that the entity "s" is defined to be "sean" - # # and that the entity "r" is defined to be "russell" - # Text.new( "sean russell" ) #-> "&s; &r;" - # Text.new( "sean russell", false, nil, true ) #-> "sean russell" - # - # +entity_filter+ (nil) This can be an array of entities to match in the - # supplied text. This argument is only useful if +raw+ is set to false. - # Text.new( "sean russell", false, nil, false, ["s"] ) #-> "&s; russell" - # Text.new( "sean russell", false, nil, true, ["s"] ) #-> "sean russell" - # In the last example, the +entity_filter+ argument is ignored. - # - # +illegal+ INTERNAL USE ONLY - # - # @return [Text] a new instance of Text - # - # source://rexml//lib/rexml/text.rb#94 - def initialize(arg, respect_whitespace = T.unsafe(nil), parent = T.unsafe(nil), raw = T.unsafe(nil), entity_filter = T.unsafe(nil), illegal = T.unsafe(nil)); end - - # Appends text to this text node. The text is appended in the +raw+ mode - # of this text node. - # - # +returns+ the text itself to enable method chain like - # 'text << "XXX" << "YYY"'. - # - # source://rexml//lib/rexml/text.rb#214 - def <<(to_append); end - - # +other+ a String or a Text - # +returns+ the result of (to_s <=> arg.to_s) - # - # source://rexml//lib/rexml/text.rb#223 - def <=>(other); end - - # source://rexml//lib/rexml/text.rb#204 - def clone; end - - # source://rexml//lib/rexml/text.rb#227 - def doctype; end - - # @return [Boolean] - # - # source://rexml//lib/rexml/text.rb#199 - def empty?; end - - # source://rexml//lib/rexml/text.rb#298 - def indent_text(string, level = T.unsafe(nil), style = T.unsafe(nil), indentfirstline = T.unsafe(nil)); end - - # source://rexml//lib/rexml/text.rb#253 - def inspect; end - - # source://rexml//lib/rexml/text.rb#195 - def node_type; end - - # source://rexml//lib/rexml/text.rb#125 - def parent=(parent); end - - # If +raw+ is true, then REXML leaves the value alone - # - # source://rexml//lib/rexml/text.rb#21 - def raw; end - - # If +raw+ is true, then REXML leaves the value alone - # - # source://rexml//lib/rexml/text.rb#21 - def raw=(_arg0); end - - # Returns the string value of this text node. This string is always - # escaped, meaning that it is a valid XML text node string, and all - # entities that can be escaped, have been inserted. This method respects - # the entity filter set in the constructor. - # - # # Assume that the entity "s" is defined to be "sean", and that the - # # entity "r" is defined to be "russell" - # t = Text.new( "< & sean russell", false, nil, false, ['s'] ) - # t.to_s #-> "< & &s; russell" - # t = Text.new( "< & &s; russell", false, nil, false ) - # t.to_s #-> "< & &s; russell" - # u = Text.new( "sean russell", false, nil, true ) - # u.to_s #-> "sean russell" - # - # source://rexml//lib/rexml/text.rb#248 - def to_s; end - - # Returns the string value of this text. This is the text without - # entities, as it might be used programmatically, or printed to the - # console. This ignores the 'raw' attribute setting, and any - # entity_filter. - # - # # Assume that the entity "s" is defined to be "sean", and that the - # # entity "r" is defined to be "russell" - # t = Text.new( "< & sean russell", false, nil, false, ['s'] ) - # t.value #-> "< & sean russell" - # t = Text.new( "< & &s; russell", false, nil, false ) - # t.value #-> "< & sean russell" - # u = Text.new( "sean russell", false, nil, true ) - # u.value #-> "sean russell" - # - # source://rexml//lib/rexml/text.rb#270 - def value; end - - # Sets the contents of this text node. This expects the text to be - # unnormalized. It returns self. - # - # e = Element.new( "a" ) - # e.add_text( "foo" ) # <a>foo</a> - # e[0].value = "bar" # <a>bar</a> - # e[0].value = "<a>" # <a><a></a> - # - # source://rexml//lib/rexml/text.rb#281 - def value=(val); end - - # source://rexml//lib/rexml/text.rb#287 - def wrap(string, width, addnewline = T.unsafe(nil)); end - - # == DEPRECATED - # See REXML::Formatters - # - # source://rexml//lib/rexml/text.rb#313 - def write(writer, indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end - - # Writes out text, substituting special characters beforehand. - # +out+ A String, IO, or any other object supporting <<( String ) - # +input+ the text to substitute and the write out - # - # z=utf8.unpack("U*") - # ascOut="" - # z.each{|r| - # if r < 0x100 - # ascOut.concat(r.chr) - # else - # ascOut.concat(sprintf("&#x%x;", r)) - # end - # } - # puts ascOut - # - # source://rexml//lib/rexml/text.rb#345 - def write_with_substitution(out, input); end - - # FIXME - # This probably won't work properly - # - # source://rexml//lib/rexml/text.rb#325 - def xpath; end - - private - - # source://rexml//lib/rexml/text.rb#358 - def clear_cache; end - - class << self - # check for illegal characters - # - # source://rexml//lib/rexml/text.rb#131 - def check(string, pattern, doctype); end - - # source://rexml//lib/rexml/text.rb#427 - def expand(ref, doctype, filter); end - - # Escapes all possible entities - # - # source://rexml//lib/rexml/text.rb#390 - def normalize(input, doctype = T.unsafe(nil), entity_filter = T.unsafe(nil)); end - - # Reads text, substituting entities - # - # source://rexml//lib/rexml/text.rb#364 - def read_with_substitution(input, illegal = T.unsafe(nil)); end - - # Unescapes all possible entities - # - # source://rexml//lib/rexml/text.rb#414 - def unnormalize(string, doctype = T.unsafe(nil), filter = T.unsafe(nil), illegal = T.unsafe(nil)); end - end -end - -# source://rexml//lib/rexml/undefinednamespaceexception.rb#4 -class REXML::UndefinedNamespaceException < ::REXML::ParseException - # @return [UndefinedNamespaceException] a new instance of UndefinedNamespaceException - # - # source://rexml//lib/rexml/undefinednamespaceexception.rb#5 - def initialize(prefix, source, parser); end -end - -# source://rexml//lib/rexml/validation/validationexception.rb#4 -class REXML::Validation::ValidationException < ::RuntimeError - # @return [ValidationException] a new instance of ValidationException - # - # source://rexml//lib/rexml/validation/validationexception.rb#5 - def initialize(msg); end -end - -# NEEDS DOCUMENTATION -# -# source://rexml//lib/rexml/xmldecl.rb#8 -class REXML::XMLDecl < ::REXML::Child - include ::REXML::Encoding - - # @return [XMLDecl] a new instance of XMLDecl - # - # source://rexml//lib/rexml/xmldecl.rb#20 - def initialize(version = T.unsafe(nil), encoding = T.unsafe(nil), standalone = T.unsafe(nil)); end - - # source://rexml//lib/rexml/xmldecl.rb#56 - def ==(other); end - - # source://rexml//lib/rexml/xmldecl.rb#39 - def clone; end - - # source://rexml//lib/rexml/xmldecl.rb#102 - def dowrite; end - - # source://rexml//lib/rexml/xmldecl.rb#76 - def encoding=(enc); end - - # source://rexml//lib/rexml/xmldecl.rb#106 - def inspect; end - - # source://rexml//lib/rexml/xmldecl.rb#69 - def node_type; end - - # source://rexml//lib/rexml/xmldecl.rb#98 - def nowrite; end - - # source://rexml//lib/rexml/encoding.rb#7 - def old_enc=(encoding); end - - # Returns the value of attribute standalone. - # - # source://rexml//lib/rexml/xmldecl.rb#17 - def stand_alone?; end - - # Returns the value of attribute standalone. - # - # source://rexml//lib/rexml/xmldecl.rb#17 - def standalone; end - - # Sets the attribute standalone - # - # @param value the value to set the attribute standalone to. - # - # source://rexml//lib/rexml/xmldecl.rb#17 - def standalone=(_arg0); end - - # Returns the value of attribute version. - # - # source://rexml//lib/rexml/xmldecl.rb#17 - def version; end - - # Sets the attribute version - # - # @param value the value to set the attribute version to. - # - # source://rexml//lib/rexml/xmldecl.rb#17 - def version=(_arg0); end - - # indent:: - # Ignored. There must be no whitespace before an XML declaration - # transitive:: - # Ignored - # ie_hack:: - # Ignored - # - # source://rexml//lib/rexml/xmldecl.rb#49 - def write(writer, indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end - - # Returns the value of attribute writeencoding. - # - # source://rexml//lib/rexml/xmldecl.rb#18 - def writeencoding; end - - # Returns the value of attribute writethis. - # - # source://rexml//lib/rexml/xmldecl.rb#18 - def writethis; end - - # source://rexml//lib/rexml/xmldecl.rb#63 - def xmldecl(version, encoding, standalone); end - - private - - # source://rexml//lib/rexml/xmldecl.rb#111 - def content(enc); end - - class << self - # Only use this if you do not want the XML declaration to be written; - # this object is ignored by the XML writer. Otherwise, instantiate your - # own XMLDecl and add it to the document. - # - # Note that XML 1.1 documents *must* include an XML declaration - # - # source://rexml//lib/rexml/xmldecl.rb#92 - def default; end - end -end - -# @private -# -# 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#965 - def initialize(node, context = T.unsafe(nil)); end - - # Returns the value of attribute context. - # - # source://rexml//lib/rexml/xpath_parser.rb#964 - def context; end - - # 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#964 - def raw_node; end -end - -# You don't want to use this class. Really. Use XPath, which is a wrapper -# for this class. Believe me. You don't want to poke around in here. -# There is strange, dark magic at work in this code. Beware. Go back! Go -# back while you still can! -# -# source://rexml//lib/rexml/xpath_parser.rb#54 -class REXML::XPathParser - include ::REXML::XMLTokens - - # @return [XPathParser] a new instance of XPathParser - # - # source://rexml//lib/rexml/xpath_parser.rb#60 - def initialize(strict: T.unsafe(nil)); end - - # source://rexml//lib/rexml/xpath_parser.rb#94 - def []=(variable_name, value); end - - # Performs a depth-first (document order) XPath search, and returns the - # first match. This is the fastest, lightest way to return a single result. - # - # FIXME: This method is incomplete! - # - # source://rexml//lib/rexml/xpath_parser.rb#103 - def first(path_stack, node); end - - # source://rexml//lib/rexml/xpath_parser.rb#84 - def get_first(path, nodeset); end - - # source://rexml//lib/rexml/xpath_parser.rb#139 - def match(path_stack, nodeset); end - - # source://rexml//lib/rexml/xpath_parser.rb#69 - def namespaces=(namespaces = T.unsafe(nil)); end - - # source://rexml//lib/rexml/xpath_parser.rb#79 - def parse(path, nodeset); end - - # source://rexml//lib/rexml/xpath_parser.rb#89 - def predicate(path, nodeset); end - - # source://rexml//lib/rexml/xpath_parser.rb#74 - def variables=(vars = T.unsafe(nil)); end - - private - - # source://rexml//lib/rexml/xpath_parser.rb#779 - def child(nodeset); end - - # source://rexml//lib/rexml/xpath_parser.rb#920 - def compare(a, operator, b); end - - # source://rexml//lib/rexml/xpath_parser.rb#682 - def descendant(nodeset, include_self); end - - # 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#942 - def each_unnode(nodeset); end - - # source://rexml//lib/rexml/xpath_parser.rb#641 - def enter(tag, *args); end - - # source://rexml//lib/rexml/xpath_parser.rb#819 - def equality_relational_compare(set1, op, set2); end - - # source://rexml//lib/rexml/xpath_parser.rb#591 - def evaluate_predicate(expression, nodesets); end - - # Expr takes a stack of path elements and a set of nodes (either a Parent - # or an Array and returns an Array of matching nodes - # - # source://rexml//lib/rexml/xpath_parser.rb#175 - def expr(path_stack, nodeset, context = T.unsafe(nil)); end - - # source://rexml//lib/rexml/xpath_parser.rb#582 - def filter_nodeset(nodeset); end - - # source://rexml//lib/rexml/xpath_parser.rb#749 - def following(node); end - - # source://rexml//lib/rexml/xpath_parser.rb#760 - def following_node_of(node); end - - # Returns a String namespace for a node, given a prefix - # The rules are: - # - # 1. Use the supplied namespace mapping first. - # 2. If no mapping was supplied, use the context node to look up the namespace - # - # source://rexml//lib/rexml/xpath_parser.rb#163 - def get_namespace(node, prefix); end - - # source://rexml//lib/rexml/xpath_parser.rb#646 - def leave(tag, *args); end - - # 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#806 - def norm(b); end - - # 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, - # in reverse document order - # preceding:: includes every element in the document that precedes this node, - # except for ancestors - # - # source://rexml//lib/rexml/xpath_parser.rb#712 - def preceding(node); end - - # 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 - # It tries to do this efficiently. - # - # FIXME: I need to get rid of this, but the issue is that most of the XPath - # interpreter functions as a filter, which means that we lose context going - # in and out of function calls. If I knew what the index of the nodes was, - # 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#659 - def sort(array_of_nodes, order); end - - # source://rexml//lib/rexml/xpath_parser.rb#441 - def step(path_stack, any_type: T.unsafe(nil), order: T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rexml//lib/rexml/xpath_parser.rb#154 - def strict?; end - - # source://rexml//lib/rexml/xpath_parser.rb#634 - def trace(*args); end - - # source://rexml//lib/rexml/xpath_parser.rb#954 - def unnode(nodeset); end - - # source://rexml//lib/rexml/xpath_parser.rb#881 - def value_type(value); end -end - -# source://rexml//lib/rexml/xpath_parser.rb#58 -REXML::XPathParser::DEBUG = T.let(T.unsafe(nil), FalseClass) diff --git a/sorbet/rbi/gems/rubocop-ast@1.32.1.rbi b/sorbet/rbi/gems/rubocop-ast@1.32.3.rbi similarity index 86% rename from sorbet/rbi/gems/rubocop-ast@1.32.1.rbi rename to sorbet/rbi/gems/rubocop-ast@1.32.3.rbi index d63e4a9..976757e 100644 --- a/sorbet/rbi/gems/rubocop-ast@1.32.1.rbi +++ b/sorbet/rbi/gems/rubocop-ast@1.32.3.rbi @@ -628,514 +628,514 @@ end # # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#6 module RuboCop::AST::CollectionNode - extend ::Forwardable + extend ::RuboCop::SimpleForwardable - # source://forwardable/1.3.3/forwardable.rb#231 - def &(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def &(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def *(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def *(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def +(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def +(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def -(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def -(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def <<(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def <<(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def [](*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def [](*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def []=(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def []=(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def all?(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def all?(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def any?(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def any?(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def append(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def append(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def assoc(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def assoc(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def at(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def at(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def bsearch(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def bsearch(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def bsearch_index(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def bsearch_index(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def chain(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def chain(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def chunk(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def chunk(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def chunk_while(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def chunk_while(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def clear(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def clear(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def collect(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def collect(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def collect!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def collect!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def collect_concat(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def collect_concat(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def combination(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def combination(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def compact(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def compact(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def compact!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def compact!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def compact_blank(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def compact_blank(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def compact_blank!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def compact_blank!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def concat(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def concat(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def count(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def count(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def cycle(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def cycle(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def deconstruct(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def deconstruct(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def delete(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def delete(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def delete_at(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def delete_at(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def delete_if(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def delete_if(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def detect(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def detect(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def difference(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def difference(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def dig(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def dig(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def drop(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def drop(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def drop_while(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def drop_while(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def each(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def each_cons(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each_cons(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def each_entry(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each_entry(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def each_index(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each_index(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def each_slice(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each_slice(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def each_with_index(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each_with_index(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def each_with_object(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each_with_object(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def empty?(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def empty?(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def entries(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def entries(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def exclude?(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def exclude?(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def excluding(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def excluding(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def extract!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def extract!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def extract_options!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def extract_options!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def fetch(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def fetch(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def fifth(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def fifth(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def fill(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def fill(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def filter(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def filter(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def filter!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def filter!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def filter_map(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def filter_map(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def find(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def find(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def find_all(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def find_all(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def find_index(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def find_index(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def first(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def first(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def flat_map(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def flat_map(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def flatten(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def flatten(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def flatten!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def flatten!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def forty_two(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def forty_two(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def fourth(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def fourth(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def from(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def from(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def grep(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def grep(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def grep_v(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def grep_v(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def group_by(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def group_by(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def in_groups(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def in_groups(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def in_groups_of(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def in_groups_of(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def in_order_of(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def in_order_of(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def include?(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def include?(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def including(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def including(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def index(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def index(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def index_by(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def index_by(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def index_with(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def index_with(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def inject(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def inject(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def inquiry(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def inquiry(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def insert(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def insert(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def intersect?(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def intersect?(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def intersection(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def intersection(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def join(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def join(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def keep_if(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def keep_if(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def last(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def last(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def lazy(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def lazy(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def length(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def length(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def many?(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def many?(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def map(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def map(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def map!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def map!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def max(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def max(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def max_by(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def max_by(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def maximum(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def maximum(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def member?(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def member?(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def min(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def min(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def min_by(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def min_by(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def minimum(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def minimum(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def minmax(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def minmax(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def minmax_by(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def minmax_by(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def none?(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def none?(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def one?(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def one?(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def pack(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def pack(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def partition(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def partition(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def permutation(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def permutation(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def pick(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def pick(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def place(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def place(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def pluck(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def pluck(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def pop(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def pop(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def prepend(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def prepend(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def product(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def product(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def push(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def push(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def rassoc(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def rassoc(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def reduce(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def reduce(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def reject(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def reject(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def reject!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def reject!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def repeated_combination(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def repeated_combination(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def repeated_permutation(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def repeated_permutation(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def replace(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def replace(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def reverse(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def reverse(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def reverse!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def reverse!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def reverse_each(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def reverse_each(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def rindex(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def rindex(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def rotate(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def rotate(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def rotate!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def rotate!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def sample(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def sample(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def second(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def second(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def second_to_last(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def second_to_last(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def select(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def select(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def select!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def select!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def shelljoin(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def shelljoin(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def shift(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def shift(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def shuffle(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def shuffle(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def shuffle!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def shuffle!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def size(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def size(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def slice(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def slice(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def slice!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def slice!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def slice_after(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def slice_after(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def slice_before(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def slice_before(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def slice_when(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def slice_when(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def sole(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def sole(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def sort(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def sort(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def sort!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def sort!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def sort_by(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def sort_by(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def sort_by!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def sort_by!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def split(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def split(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def sum(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def sum(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def take(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def take(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def take_while(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def take_while(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def tally(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def tally(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def third(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def third(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def third_to_last(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def third_to_last(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def to(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def to_ary(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to_ary(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def to_formatted_s(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to_formatted_s(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def to_fs(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to_fs(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def to_h(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to_h(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def to_sentence(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to_sentence(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def to_set(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to_set(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def to_xml(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to_xml(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def transpose(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def transpose(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def union(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def union(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def uniq(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def uniq(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def uniq!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def uniq!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def unshift(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def unshift(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def values_at(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def values_at(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def without(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def without(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def zip(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def zip(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def |(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def |(*_arg0, **_arg1, &_arg2); end end # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#9 @@ -3629,7 +3629,7 @@ RuboCop::AST::Node::VARIABLES = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#5 class RuboCop::AST::NodePattern include ::RuboCop::AST::NodePattern::MethodDefiner - extend ::Forwardable + extend ::RuboCop::SimpleForwardable # @return [NodePattern] a new instance of NodePattern # @@ -3647,8 +3647,8 @@ class RuboCop::AST::NodePattern # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#73 def ast; end - # source://forwardable/1.3.3/forwardable.rb#231 - def captures(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def captures(*_arg0, **_arg1, &_arg2); end # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#111 def encode_with(coder); end @@ -3676,16 +3676,16 @@ class RuboCop::AST::NodePattern # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#73 def match_code; end - # source://forwardable/1.3.3/forwardable.rb#231 - def named_parameters(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def named_parameters(*_arg0, **_arg1, &_arg2); end # Returns the value of attribute pattern. # # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#73 def pattern; end - # source://forwardable/1.3.3/forwardable.rb#231 - def positional_parameters(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def positional_parameters(*_arg0, **_arg1, &_arg2); end # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#95 def to_s; end @@ -3790,15 +3790,15 @@ end # # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#11 class RuboCop::AST::NodePattern::Compiler - extend ::Forwardable + extend ::RuboCop::SimpleForwardable # @return [Compiler] a new instance of Compiler # # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#15 def initialize; end - # source://forwardable/1.3.3/forwardable.rb#231 - def bind(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def bind(*_arg0, **_arg1, &_arg2); end # Returns the value of attribute binding. # @@ -3944,8 +3944,8 @@ class RuboCop::AST::NodePattern::Compiler::Debug < ::RuboCop::AST::NodePattern:: # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#123 def initialize; end - # source://forwardable/1.3.3/forwardable.rb#231 - def comments(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def comments(*_arg0, **_arg1, &_arg2); end # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#128 def named_parameters; end @@ -3958,8 +3958,8 @@ class RuboCop::AST::NodePattern::Compiler::Debug < ::RuboCop::AST::NodePattern:: # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#132 def parser; end - # source://forwardable/1.3.3/forwardable.rb#231 - def tokens(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def tokens(*_arg0, **_arg1, &_arg2); end end # @api private @@ -4561,7 +4561,7 @@ class RuboCop::AST::NodePattern::LexerRex # The current location in the parse. # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#103 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#104 def location; end # The StringScanner for this lexer. @@ -4576,22 +4576,22 @@ class RuboCop::AST::NodePattern::LexerRex # Lex the next token. # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#112 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#113 def next_token; end # Parse the given string. # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#83 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#84 def parse(str); end # Read in and parse the file at +path+. # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#93 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#94 def parse_file(path); end # The current scanner class. Must be overridden in subclasses. # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#76 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/lexer.rex.rb#77 def scanner_class; end # The StringScanner for this lexer. @@ -4735,7 +4735,7 @@ end # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#7 class RuboCop::AST::NodePattern::Node < ::Parser::AST::Node include ::RuboCop::AST::Descendence - extend ::Forwardable + extend ::RuboCop::SimpleForwardable # Note: `arity.end` may be `Float::INFINITY` # @@ -4828,8 +4828,8 @@ RuboCop::AST::NodePattern::Node::AnyOrder::ARITIES = T.let(T.unsafe(nil), Hash) # # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#96 class RuboCop::AST::NodePattern::Node::Capture < ::RuboCop::AST::NodePattern::Node - # source://forwardable/1.3.3/forwardable.rb#231 - def arity(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def arity(*_arg0, **_arg1, &_arg2); end # @return [Boolean] # @@ -4842,8 +4842,8 @@ class RuboCop::AST::NodePattern::Node::Capture < ::RuboCop::AST::NodePattern::No # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#104 def nb_captures; end - # source://forwardable/1.3.3/forwardable.rb#231 - def rest?(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def rest?(*_arg0, **_arg1, &_arg2); end end # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#85 @@ -4958,148 +4958,148 @@ end # # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#12 class RuboCop::AST::NodePattern::Parser < ::Racc::Parser - extend ::Forwardable + extend ::RuboCop::SimpleForwardable # @return [Parser] a new instance of Parser # # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.rb#19 def initialize(builder = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#335 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#333 def _reduce_10(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#339 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#337 def _reduce_11(val, _values); end # reduce 12 omitted # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#345 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#343 def _reduce_13(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#349 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#347 def _reduce_14(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#353 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#351 def _reduce_15(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#357 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#355 def _reduce_16(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#361 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#359 def _reduce_17(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#365 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#363 def _reduce_18(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#369 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#367 def _reduce_19(val, _values); end # reduce 1 omitted # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#303 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#301 def _reduce_2(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#373 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#371 def _reduce_20(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#377 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#375 def _reduce_21(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#381 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#379 def _reduce_22(val, _values); end # reduce 24 omitted # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#389 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#387 def _reduce_25(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#395 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#393 def _reduce_26(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#307 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#305 def _reduce_3(val, _values); end # reduce 32 omitted # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#415 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#413 def _reduce_33(val, _values); end # reduce 36 omitted # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#425 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#423 def _reduce_37(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#429 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#427 def _reduce_38(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#433 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#431 def _reduce_39(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#311 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#309 def _reduce_4(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#437 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#435 def _reduce_40(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#441 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#439 def _reduce_41(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#445 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#443 def _reduce_42(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#449 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#447 def _reduce_43(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#453 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#451 def _reduce_44(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#457 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#455 def _reduce_45(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#461 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#459 def _reduce_46(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#315 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#313 def _reduce_5(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#319 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#317 def _reduce_6(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#323 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#321 def _reduce_7(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#327 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#325 def _reduce_8(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#331 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#329 def _reduce_9(val, _values); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#465 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#463 def _reduce_none(val, _values); end - # source://forwardable/1.3.3/forwardable.rb#231 - def emit_atom(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def emit_atom(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def emit_call(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def emit_call(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def emit_capture(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def emit_capture(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def emit_list(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def emit_list(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def emit_unary_op(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def emit_unary_op(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def emit_union(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def emit_union(*_arg0, **_arg1, &_arg2); end # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.rb#40 def inspect; end - # source://forwardable/1.3.3/forwardable.rb#231 - def next_token(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def next_token(*_arg0, **_arg1, &_arg2); end # (Similar API to `parser` gem) # Parses a source and returns the AST. @@ -5134,10 +5134,10 @@ RuboCop::AST::NodePattern::Parser::Lexer = RuboCop::AST::NodePattern::Lexer # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#227 RuboCop::AST::NodePattern::Parser::Racc_arg = T.let(T.unsafe(nil), Array) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#295 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#293 RuboCop::AST::NodePattern::Parser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#244 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#243 RuboCop::AST::NodePattern::Parser::Racc_token_to_s_table = T.let(T.unsafe(nil), Array) # Overrides Parser to use `WithMeta` variants and provide additional methods @@ -5457,7 +5457,7 @@ RuboCop::AST::NodePattern::Sets::SET_READ_BINREAD = T.let(T.unsafe(nil), Set) RuboCop::AST::NodePattern::Sets::SET_REDUCE_INJECT = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_REJECT_DELETE_IF_REJECT = T.let(T.unsafe(nil), Set) +RuboCop::AST::NodePattern::Sets::SET_REJECT_REJECT = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_REQUIRE_REQUIRE_RELATIVE = T.let(T.unsafe(nil), Set) @@ -5469,7 +5469,7 @@ RuboCop::AST::NodePattern::Sets::SET_SELECT_FILTER_FIND_ALL = T.let(T.unsafe(nil RuboCop::AST::NodePattern::Sets::SET_SELECT_FILTER_FIND_ALL_REJECT = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_SELECT_SELECT = T.let(T.unsafe(nil), Set) +RuboCop::AST::NodePattern::Sets::SET_SELECT_SELECT_FILTER_FILTER = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_SEND_PUBLIC_SEND___SEND__ = T.let(T.unsafe(nil), Set) @@ -7227,3 +7227,340 @@ class RuboCop::AST::YieldNode < ::RuboCop::AST::Node # source://rubocop-ast//lib/rubocop/ast/node/yield_node.rb#16 def node_parts; end end + +class RuboCop::CommentConfig + # source://rubocop/1.67.0/lib/rubocop/comment_config.rb#34 + def initialize(processed_source); end + + # source://rubocop/1.67.0/lib/rubocop/comment_config.rb#63 + def comment_only_line?(line_number); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def config(*_arg0, **_arg1, &_arg2); end + + # source://rubocop/1.67.0/lib/rubocop/comment_config.rb#51 + def cop_disabled_line_ranges; end + + # source://rubocop/1.67.0/lib/rubocop/comment_config.rb#39 + def cop_enabled_at_line?(cop, line_number); end + + # source://rubocop/1.67.0/lib/rubocop/comment_config.rb#47 + def cop_opted_in?(cop); end + + # source://rubocop/1.67.0/lib/rubocop/comment_config.rb#55 + def extra_enabled_comments; end + + # source://rubocop/1.67.0/lib/rubocop/comment_config.rb#30 + def processed_source; end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def registry(*_arg0, **_arg1, &_arg2); end + + private + + # source://rubocop/1.67.0/lib/rubocop/comment_config.rb#96 + def analyze; end + + # source://rubocop/1.67.0/lib/rubocop/comment_config.rb#124 + def analyze_cop(analysis, directive); end + + # source://rubocop/1.67.0/lib/rubocop/comment_config.rb#144 + def analyze_disabled(analysis, directive); end + + # source://rubocop/1.67.0/lib/rubocop/comment_config.rb#155 + def analyze_rest(analysis, directive); end + + # source://rubocop/1.67.0/lib/rubocop/comment_config.rb#135 + def analyze_single_line(analysis, directive); end + + # source://rubocop/1.67.0/lib/rubocop/comment_config.rb#164 + def cop_line_ranges(analysis); end + + # source://rubocop/1.67.0/lib/rubocop/comment_config.rb#170 + def each_directive; end + + # source://rubocop/1.67.0/lib/rubocop/comment_config.rb#69 + def extra_enabled_comments_with_names(extras:, names:); end + + # source://rubocop/1.67.0/lib/rubocop/comment_config.rb#190 + def handle_enable_all(directive, names, extras); end + + # source://rubocop/1.67.0/lib/rubocop/comment_config.rb#204 + def handle_switch(directive, names, extras); end + + # source://rubocop/1.67.0/lib/rubocop/comment_config.rb#115 + def inject_disabled_cops_directives(analyses); end + + # source://rubocop/1.67.0/lib/rubocop/comment_config.rb#183 + def non_comment_token_line_numbers; end + + # source://rubocop/1.67.0/lib/rubocop/comment_config.rb#83 + def opt_in_cops; end + + # source://rubocop/1.67.0/lib/rubocop/comment_config.rb#179 + def qualified_cop_name(cop_name); end +end + +class RuboCop::Config + # source://rubocop/1.67.0/lib/rubocop/config.rb#30 + def initialize(hash = T.unsafe(nil), loaded_path = T.unsafe(nil)); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def [](*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def []=(*_arg0, **_arg1, &_arg2); end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#170 + def active_support_extensions_enabled?; end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#96 + def add_excludes_from_higher_level(highest_config); end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#197 + def allowed_camel_case_file?(file); end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#241 + def base_dir_for_path_parameters; end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#271 + def bundler_lock_file_path; end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#51 + def check; end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#142 + def clusivity_config_for_badge?(badge); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def delete(*_arg0, **_arg1, &_arg2); end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#108 + def deprecation_check; end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def dig(*_arg0, **_arg1, &_arg2); end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#162 + def disabled_new_cops?; end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each_key(*_arg0, **_arg1, &_arg2); end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#166 + def enabled_new_cops?; end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def fetch(*_arg0, **_arg1, &_arg2); end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#219 + def file_to_exclude?(file); end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#178 + def file_to_include?(file); end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#158 + def for_all_cops; end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#128 + def for_badge(badge); end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#122 + def for_cop(cop); end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#153 + def for_department(department_name); end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#296 + def gem_versions_in_target; end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#300 + def inspect; end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#76 + def internal?; end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def key?(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def keys(*_arg0, **_arg1, &_arg2); end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#47 + def loaded_features; end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#20 + def loaded_path; end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#81 + def make_excludes_absolute; end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def map(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def merge(*_arg0, **_arg1, &_arg2); end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#251 + def parser_engine; end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#232 + def path_relative_to_config(path); end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#228 + def patterns_to_exclude; end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#224 + def patterns_to_include; end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#282 + def pending_cops; end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#211 + def possibly_include_hidden?; end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def replace(*_arg0, **_arg1, &_arg2); end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#71 + def signature; end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#266 + def smart_loaded_path; end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#174 + def string_literals_frozen_by_default?; end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#255 + def target_rails_version; end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def target_ruby_version(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to_h(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to_hash(*_arg0, **_arg1, &_arg2); end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#67 + def to_s; end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def transform_values(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def validate(*_arg0, **_arg1, &_arg2); end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#58 + def validate_after_resolution; end + + private + + # source://rubocop/1.67.0/lib/rubocop/config.rb#350 + def department_of(qualified_cop_name); end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#338 + def enable_cop?(qualified_cop_name, cop_options); end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#325 + def gem_version_to_major_minor_float(gem_version); end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#331 + def read_gem_versions_from_target_lockfile; end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#312 + def read_rails_version_from_bundler_lock_file; end + + # source://rubocop/1.67.0/lib/rubocop/config.rb#307 + def target_rails_version_from_bundler_lock_file; end + + class << self + # source://rubocop/1.67.0/lib/rubocop/config.rb#22 + def create(hash, path, check: T.unsafe(nil)); end + end +end + +class RuboCop::ConfigValidator + # source://rubocop/1.67.0/lib/rubocop/config_validator.rb#27 + def initialize(config); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def for_all_cops(*_arg0, **_arg1, &_arg2); end + + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def smart_loaded_path(*_arg0, **_arg1, &_arg2); end + + # source://rubocop/1.67.0/lib/rubocop/config_validator.rb#63 + def target_ruby_version; end + + # source://rubocop/1.67.0/lib/rubocop/config_validator.rb#33 + def validate; end + + # source://rubocop/1.67.0/lib/rubocop/config_validator.rb#59 + def validate_after_resolution; end + + # source://rubocop/1.67.0/lib/rubocop/config_validator.rb#67 + def validate_section_presence(name); end + + private + + # source://rubocop/1.67.0/lib/rubocop/config_validator.rb#104 + def alert_about_unrecognized_cops(invalid_cop_names); end + + # source://rubocop/1.67.0/lib/rubocop/config_validator.rb#254 + def check_cop_config_value(hash, parent = T.unsafe(nil)); end + + # source://rubocop/1.67.0/lib/rubocop/config_validator.rb#77 + def check_obsoletions; end + + # source://rubocop/1.67.0/lib/rubocop/config_validator.rb#84 + def check_target_ruby; end + + # source://rubocop/1.67.0/lib/rubocop/config_validator.rb#195 + def each_invalid_parameter(cop_name); end + + # source://rubocop/1.67.0/lib/rubocop/config_validator.rb#120 + def list_unknown_cops(invalid_cop_names); end + + # source://rubocop/1.67.0/lib/rubocop/config_validator.rb#274 + def param_error_message(parent, key, value, supposed_values); end + + # source://rubocop/1.67.0/lib/rubocop/config_validator.rb#242 + def reject_conflicting_safe_settings; end + + # source://rubocop/1.67.0/lib/rubocop/config_validator.rb#233 + def reject_mutually_exclusive_defaults; end + + # source://rubocop/1.67.0/lib/rubocop/config_validator.rb#142 + def suggestion(name); end + + # source://rubocop/1.67.0/lib/rubocop/config_validator.rb#75 + def target_ruby; end + + # source://rubocop/1.67.0/lib/rubocop/config_validator.rb#207 + def validate_enforced_styles(valid_cop_names); end + + # source://rubocop/1.67.0/lib/rubocop/config_validator.rb#169 + def validate_new_cops_parameter; end + + # source://rubocop/1.67.0/lib/rubocop/config_validator.rb#180 + def validate_parameter_names(valid_cop_names); end + + # source://rubocop/1.67.0/lib/rubocop/config_validator.rb#227 + def validate_support_and_has_list(name, formats, valid); end + + # source://rubocop/1.67.0/lib/rubocop/config_validator.rb#158 + def validate_syntax_cop; end +end + +# Similar to `Forwardable#def_delegators`, but simpler & faster +# +# source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#5 +module RuboCop::SimpleForwardable + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#6 + def def_delegators(accessor, *methods); end +end diff --git a/sorbet/rbi/gems/rubocop-minitest@0.35.1.rbi b/sorbet/rbi/gems/rubocop-minitest@0.36.0.rbi similarity index 99% rename from sorbet/rbi/gems/rubocop-minitest@0.35.1.rbi rename to sorbet/rbi/gems/rubocop-minitest@0.36.0.rbi index 2c46584..12bffdd 100644 --- a/sorbet/rbi/gems/rubocop-minitest@0.35.1.rbi +++ b/sorbet/rbi/gems/rubocop-minitest@0.36.0.rbi @@ -1271,7 +1271,7 @@ class RuboCop::Cop::Minitest::MultipleAssertions < ::RuboCop::Cop::Base include ::RuboCop::Cop::DefNode include ::RuboCop::Cop::MinitestExplorationHelpers - # source://rubocop/1.65.1/lib/rubocop/cop/exclude_limit.rb#11 + # source://rubocop/1.67.0/lib/rubocop/cop/exclude_limit.rb#11 def max=(value); end # source://rubocop-minitest//lib/rubocop/cop/minitest/multiple_assertions.rb#37 @@ -1288,10 +1288,10 @@ class RuboCop::Cop::Minitest::MultipleAssertions < ::RuboCop::Cop::Base # source://rubocop-minitest//lib/rubocop/cop/minitest/multiple_assertions.rb#77 def assertions_count_in_assignment(node); end - # source://rubocop-minitest//lib/rubocop/cop/minitest/multiple_assertions.rb#95 + # source://rubocop-minitest//lib/rubocop/cop/minitest/multiple_assertions.rb#99 def assertions_count_in_branches(branches); end - # source://rubocop-minitest//lib/rubocop/cop/minitest/multiple_assertions.rb#99 + # source://rubocop-minitest//lib/rubocop/cop/minitest/multiple_assertions.rb#103 def max_assertions; end end @@ -2198,12 +2198,12 @@ class RuboCop::Cop::Minitest::SkipEnsure < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop-minitest//lib/rubocop/cop/minitest/skip_ensure.rb#81 + # source://rubocop-minitest//lib/rubocop/cop/minitest/skip_ensure.rb#83 def use_skip_in_rescue?(skip_method); end # @return [Boolean] # - # source://rubocop-minitest//lib/rubocop/cop/minitest/skip_ensure.rb#85 + # source://rubocop-minitest//lib/rubocop/cop/minitest/skip_ensure.rb#87 def valid_conditional_skip?(skip_method, ensure_node); end end diff --git a/sorbet/rbi/gems/rubocop-performance@1.21.1.rbi b/sorbet/rbi/gems/rubocop-performance@1.22.1.rbi similarity index 98% rename from sorbet/rbi/gems/rubocop-performance@1.21.1.rbi rename to sorbet/rbi/gems/rubocop-performance@1.22.1.rbi index b8a19bc..afb57bf 100644 --- a/sorbet/rbi/gems/rubocop-performance@1.21.1.rbi +++ b/sorbet/rbi/gems/rubocop-performance@1.22.1.rbi @@ -14,28 +14,28 @@ module RuboCop::Cop; end module RuboCop::Cop::Lint; end class RuboCop::Cop::Lint::UnusedMethodArgument < ::RuboCop::Cop::Base - # source://rubocop/1.65.1/lib/rubocop/cop/lint/unused_method_argument.rb#66 + # source://rubocop/1.67.0/lib/rubocop/cop/lint/unused_method_argument.rb#66 def not_implemented?(param0 = T.unsafe(nil)); end private - # source://rubocop/1.65.1/lib/rubocop/cop/lint/unused_method_argument.rb#81 + # source://rubocop/1.67.0/lib/rubocop/cop/lint/unused_method_argument.rb#81 def autocorrect(corrector, node); end - # source://rubocop/1.65.1/lib/rubocop/cop/lint/unused_method_argument.rb#85 + # source://rubocop/1.67.0/lib/rubocop/cop/lint/unused_method_argument.rb#85 def check_argument(variable); end - # source://rubocop/1.65.1/lib/rubocop/cop/lint/unused_method_argument.rb#93 + # source://rubocop/1.67.0/lib/rubocop/cop/lint/unused_method_argument.rb#93 def ignored_method?(body); end - # source://rubocop/1.65.1/lib/rubocop/cop/lint/unused_method_argument.rb#98 + # source://rubocop/1.67.0/lib/rubocop/cop/lint/unused_method_argument.rb#98 def message(variable); end class << self # source://rubocop-performance//lib/rubocop-performance.rb#15 def autocorrect_incompatible_with; end - # source://rubocop/1.65.1/lib/rubocop/cop/lint/unused_method_argument.rb#75 + # source://rubocop/1.67.0/lib/rubocop/cop/lint/unused_method_argument.rb#75 def joining_forces; end end end @@ -128,41 +128,51 @@ RuboCop::Cop::Performance::ArraySemiInfiniteRangeSlice::RESTRICT_ON_SEND = T.let # source://rubocop-performance//lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb#38 RuboCop::Cop::Performance::ArraySemiInfiniteRangeSlice::SLICE_METHODS = T.let(T.unsafe(nil), Set) -# Identifies places where numeric argument to BigDecimal should be -# converted to string. Initializing from String is faster -# than from Numeric for BigDecimal. +# Identifies places where a float argument to BigDecimal should be converted to a string. +# Initializing from String is faster than from Float for BigDecimal. +# +# Also identifies places where an integer string argument to BigDecimal should be converted to +# an integer. Initializing from Integer is faster than from String for BigDecimal. # # @example # # bad -# BigDecimal(1, 2) -# 4.to_d(6) # BigDecimal(1.2, 3, exception: true) # 4.5.to_d(6, exception: true) # # # good -# BigDecimal('1', 2) -# BigDecimal('4', 6) # BigDecimal('1.2', 3, exception: true) # BigDecimal('4.5', 6, exception: true) # -# source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#23 +# # bad +# BigDecimal('1', 2) +# BigDecimal('4', 6) +# +# # good +# BigDecimal(1, 2) +# 4.to_d(6) +# +# source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#29 class RuboCop::Cop::Performance::BigDecimalWithNumericArgument < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#29 - def big_decimal_with_numeric_argument?(param0 = T.unsafe(nil)); end + # source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#39 + def big_decimal_with_numeric_argument(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#37 + # source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#48 def on_send(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#33 - def to_d?(param0 = T.unsafe(nil)); end + # source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#43 + def to_d(param0 = T.unsafe(nil)); end end -# source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#26 -RuboCop::Cop::Performance::BigDecimalWithNumericArgument::MSG = T.let(T.unsafe(nil), String) +# source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#35 +RuboCop::Cop::Performance::BigDecimalWithNumericArgument::MSG_FROM_FLOAT_TO_STRING = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#27 +# source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#36 +RuboCop::Cop::Performance::BigDecimalWithNumericArgument::MSG_FROM_INTEGER_TO_STRING = T.let(T.unsafe(nil), String) + +# source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#37 RuboCop::Cop::Performance::BigDecimalWithNumericArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # In Ruby 2.7, `UnboundMethod#bind_call` has been added. @@ -214,6 +224,9 @@ RuboCop::Cop::Performance::BindCall::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr # Identifies unnecessary use of a `block_given?` where explicit check # of block argument would suffice. # +# NOTE: This cop produces code with significantly worse performance when a +# block is being passed to the method and as such should not be enabled. +# # @example # # bad # def method(&block) @@ -232,26 +245,26 @@ RuboCop::Cop::Performance::BindCall::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr # # ... # end # -# source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#27 +# source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#30 class RuboCop::Cop::Performance::BlockGivenWithExplicitBlock < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#35 + # source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#38 def on_send(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#33 + # source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#36 def reassigns_block_arg?(param0 = T.unsafe(nil), param1); end class << self - # source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#51 + # source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#54 def autocorrect_incompatible_with; end end end -# source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#31 +# source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#34 RuboCop::Cop::Performance::BlockGivenWithExplicitBlock::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#30 +# source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#33 RuboCop::Cop::Performance::BlockGivenWithExplicitBlock::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Identifies places where `caller[n]` can be replaced by `caller(n..n).first`. @@ -1110,7 +1123,7 @@ class RuboCop::Cop::Performance::DoubleStartEndWith < ::RuboCop::Cop::Base def combine_args(first_call_args, second_call_args); end # source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#76 - def message(node, receiver, method, combined_args); end + def message(node, receiver, first_call_args, method, combined_args); end # source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#68 def process_source(node); end @@ -1962,10 +1975,10 @@ class RuboCop::Cop::Performance::RedundantMerge < ::RuboCop::Cop::Base # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#98 def kwsplat_used?(pairs); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#146 + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#144 def leading_spaces(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#150 + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#148 def max_key_value_pairs; end # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#71 @@ -1999,44 +2012,44 @@ RuboCop::Cop::Performance::RedundantMerge::AREF_ASGN = T.let(T.unsafe(nil), Stri # A utility class for checking the use of values within an # `each_with_object` call. # -# source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#156 +# source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#154 class RuboCop::Cop::Performance::RedundantMerge::EachWithObjectInspector extend ::RuboCop::AST::NodePattern::Macros # @return [EachWithObjectInspector] a new instance of EachWithObjectInspector # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#159 + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#157 def initialize(node, receiver); end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#190 + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#188 def each_with_object_node(param0 = T.unsafe(nil)); end # @return [Boolean] # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#164 + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#162 def value_used?; end private # @return [Boolean] # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#174 + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#172 def eligible_receiver?; end # Returns the value of attribute node. # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#172 + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#170 def node; end # Returns the value of attribute receiver. # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#172 + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#170 def receiver; end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#178 + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#176 def second_argument; end - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#185 + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_merge.rb#183 def unwind(receiver); end end diff --git a/sorbet/rbi/gems/rubocop-sorbet@0.8.5.rbi b/sorbet/rbi/gems/rubocop-sorbet@0.8.6.rbi similarity index 97% rename from sorbet/rbi/gems/rubocop-sorbet@0.8.5.rbi rename to sorbet/rbi/gems/rubocop-sorbet@0.8.6.rbi index 4efc8f3..ce85893 100644 --- a/sorbet/rbi/gems/rubocop-sorbet@0.8.5.rbi +++ b/sorbet/rbi/gems/rubocop-sorbet@0.8.6.rbi @@ -276,6 +276,9 @@ RuboCop::Cop::Sorbet::CheckedTrueInSignature::MESSAGE = T.let(T.unsafe(nil), Str # # 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_csend(node); end + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/constants_from_strings.rb#46 def on_send(node); end end @@ -678,7 +681,7 @@ class RuboCop::Cop::Sorbet::ForbidRBIOutsideOfAllowedPaths < ::RuboCop::Cop::Bas private - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/forbid_rbi_outside_of_allowed_paths.rb#55 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/rbi/forbid_rbi_outside_of_allowed_paths.rb#48 def allowed_paths; end end @@ -1254,6 +1257,46 @@ RuboCop::Cop::Sorbet::RedundantExtendTSig::MSG = T.let(T.unsafe(nil), String) # source://rubocop-sorbet//lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb#33 RuboCop::Cop::Sorbet::RedundantExtendTSig::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) +# Checks for the use of Ruby Refinements library. Refinements add +# complexity and incur a performance penalty that can be significant +# for large code bases. Good examples are cases of unrelated +# methods that happen to have the same name as these module methods. +# +# @example +# # bad +# module Foo +# refine(Date) do +# end +# end +# +# # bad +# module Foo +# using(Date) do +# end +# end +# +# # good +# module Foo +# bar.refine(Date) +# end +# +# # good +# module Foo +# bar.using(Date) +# end +# +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/refinement.rb#34 +class RuboCop::Cop::Sorbet::Refinement < ::RuboCop::Cop::Base + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/refinement.rb#38 + def on_send(node); end +end + +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/refinement.rb#35 +RuboCop::Cop::Sorbet::Refinement::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/refinement.rb#36 +RuboCop::Cop::Sorbet::Refinement::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Checks for the correct order of `sig` builder methods. # # Options: diff --git a/sorbet/rbi/gems/rubocop@1.65.1.rbi b/sorbet/rbi/gems/rubocop@1.67.0.rbi similarity index 97% rename from sorbet/rbi/gems/rubocop@1.65.1.rbi rename to sorbet/rbi/gems/rubocop@1.67.0.rbi index 8f6c375..e1556ae 100644 --- a/sorbet/rbi/gems/rubocop@1.65.1.rbi +++ b/sorbet/rbi/gems/rubocop@1.67.0.rbi @@ -222,12 +222,6 @@ class RuboCop::CLI::Command::AutoGenerateConfig < ::RuboCop::CLI::Command::Base # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#73 def only_exclude?; end - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#162 - def options_config_in_root?; end - # @api private # @return [Boolean] # @@ -440,11 +434,11 @@ RuboCop::CLI::Command::InitDotfile::DOTFILE = T.let(T.unsafe(nil), String) # # @api private # -# source://rubocop//lib/rubocop/cli/command/lsp.rb#10 +# source://rubocop//lib/rubocop/cli/command/lsp.rb#8 class RuboCop::CLI::Command::LSP < ::RuboCop::CLI::Command::Base # @api private # - # source://rubocop//lib/rubocop/cli/command/lsp.rb#13 + # source://rubocop//lib/rubocop/cli/command/lsp.rb#11 def run; end end @@ -765,7 +759,7 @@ end # # source://rubocop//lib/rubocop/comment_config.rb#6 class RuboCop::CommentConfig - extend ::Forwardable + extend ::RuboCop::SimpleForwardable # @return [CommentConfig] a new instance of CommentConfig # @@ -777,8 +771,8 @@ class RuboCop::CommentConfig # source://rubocop//lib/rubocop/comment_config.rb#63 def comment_only_line?(line_number); end - # source://forwardable/1.3.3/forwardable.rb#231 - def config(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def config(*_arg0, **_arg1, &_arg2); end # source://rubocop//lib/rubocop/comment_config.rb#51 def cop_disabled_line_ranges; end @@ -801,8 +795,8 @@ class RuboCop::CommentConfig # source://rubocop//lib/rubocop/comment_config.rb#30 def processed_source; end - # source://forwardable/1.3.3/forwardable.rb#231 - def registry(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def registry(*_arg0, **_arg1, &_arg2); end private @@ -970,18 +964,18 @@ end class RuboCop::Config include ::RuboCop::PathUtil include ::RuboCop::FileFinder - extend ::Forwardable + extend ::RuboCop::SimpleForwardable # @return [Config] a new instance of Config # # source://rubocop//lib/rubocop/config.rb#30 def initialize(hash = T.unsafe(nil), loaded_path = T.unsafe(nil)); end - # source://forwardable/1.3.3/forwardable.rb#231 - def [](*args, **_arg1, &block); end + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def [](*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def []=(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def []=(*_arg0, **_arg1, &_arg2); end # @return [Boolean] # @@ -993,7 +987,7 @@ class RuboCop::Config # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#193 + # source://rubocop//lib/rubocop/config.rb#197 def allowed_camel_case_file?(file); end # Paths specified in configuration files starting with .rubocop are @@ -1002,12 +996,12 @@ class RuboCop::Config # config/default.yml, for example, are not relative to RuboCop's config # directory since that wouldn't work. # - # source://rubocop//lib/rubocop/config.rb#237 + # source://rubocop//lib/rubocop/config.rb#241 def base_dir_for_path_parameters; end # @return [String, nil] # - # source://rubocop//lib/rubocop/config.rb#267 + # source://rubocop//lib/rubocop/config.rb#271 def bundler_lock_file_path; end # source://rubocop//lib/rubocop/config.rb#51 @@ -1019,42 +1013,42 @@ class RuboCop::Config # source://rubocop//lib/rubocop/config.rb#142 def clusivity_config_for_badge?(badge); end - # source://forwardable/1.3.3/forwardable.rb#231 - def delete(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def delete(*_arg0, **_arg1, &_arg2); end # source://rubocop//lib/rubocop/config.rb#108 def deprecation_check; end - # source://forwardable/1.3.3/forwardable.rb#231 - def dig(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def dig(*_arg0, **_arg1, &_arg2); end # @return [Boolean] # # source://rubocop//lib/rubocop/config.rb#162 def disabled_new_cops?; end - # source://forwardable/1.3.3/forwardable.rb#231 - def each(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def each_key(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each_key(*_arg0, **_arg1, &_arg2); end # @return [Boolean] # # source://rubocop//lib/rubocop/config.rb#166 def enabled_new_cops?; end - # source://forwardable/1.3.3/forwardable.rb#231 - def fetch(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def fetch(*_arg0, **_arg1, &_arg2); end # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#215 + # source://rubocop//lib/rubocop/config.rb#219 def file_to_exclude?(file); end # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#174 + # source://rubocop//lib/rubocop/config.rb#178 def file_to_include?(file); end # source://rubocop//lib/rubocop/config.rb#158 @@ -1085,10 +1079,10 @@ class RuboCop::Config # Returns target's locked gem versions (i.e. from Gemfile.lock or gems.locked) # - # source://rubocop//lib/rubocop/config.rb#292 + # source://rubocop//lib/rubocop/config.rb#296 def gem_versions_in_target; end - # source://rubocop//lib/rubocop/config.rb#296 + # source://rubocop//lib/rubocop/config.rb#300 def inspect; end # True if this is a config file that is shipped with RuboCop @@ -1098,11 +1092,11 @@ class RuboCop::Config # source://rubocop//lib/rubocop/config.rb#76 def internal?; end - # source://forwardable/1.3.3/forwardable.rb#231 - def key?(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def key?(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def keys(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def keys(*_arg0, **_arg1, &_arg2); end # source://rubocop//lib/rubocop/config.rb#47 def loaded_features; end @@ -1115,25 +1109,25 @@ class RuboCop::Config # source://rubocop//lib/rubocop/config.rb#81 def make_excludes_absolute; end - # source://forwardable/1.3.3/forwardable.rb#231 - def map(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def map(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def merge(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def merge(*_arg0, **_arg1, &_arg2); end - # source://rubocop//lib/rubocop/config.rb#247 + # source://rubocop//lib/rubocop/config.rb#251 def parser_engine; end - # source://rubocop//lib/rubocop/config.rb#228 + # source://rubocop//lib/rubocop/config.rb#232 def path_relative_to_config(path); end - # source://rubocop//lib/rubocop/config.rb#224 + # source://rubocop//lib/rubocop/config.rb#228 def patterns_to_exclude; end - # source://rubocop//lib/rubocop/config.rb#220 + # source://rubocop//lib/rubocop/config.rb#224 def patterns_to_include; end - # source://rubocop//lib/rubocop/config.rb#278 + # source://rubocop//lib/rubocop/config.rb#282 def pending_cops; end # Returns true if there's a chance that an Include pattern matches hidden @@ -1141,69 +1135,74 @@ class RuboCop::Config # # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#207 + # source://rubocop//lib/rubocop/config.rb#211 def possibly_include_hidden?; end - # source://forwardable/1.3.3/forwardable.rb#231 - def replace(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def replace(*_arg0, **_arg1, &_arg2); end # source://rubocop//lib/rubocop/config.rb#71 def signature; end - # source://rubocop//lib/rubocop/config.rb#262 + # source://rubocop//lib/rubocop/config.rb#266 def smart_loaded_path; end - # source://rubocop//lib/rubocop/config.rb#251 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/config.rb#174 + def string_literals_frozen_by_default?; end + + # source://rubocop//lib/rubocop/config.rb#255 def target_rails_version; end - # source://forwardable/1.3.3/forwardable.rb#231 - def target_ruby_version(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def target_ruby_version(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def to_h(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to_h(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def to_hash(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to_hash(*_arg0, **_arg1, &_arg2); end # source://rubocop//lib/rubocop/config.rb#67 def to_s; end - # source://forwardable/1.3.3/forwardable.rb#231 - def transform_values(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def transform_values(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def validate(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def validate(*_arg0, **_arg1, &_arg2); end # source://rubocop//lib/rubocop/config.rb#58 def validate_after_resolution; end private - # source://rubocop//lib/rubocop/config.rb#346 + # source://rubocop//lib/rubocop/config.rb#350 def department_of(qualified_cop_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#334 + # source://rubocop//lib/rubocop/config.rb#338 def enable_cop?(qualified_cop_name, cop_options); end # @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 + # source://rubocop//lib/rubocop/config.rb#325 def gem_version_to_major_minor_float(gem_version); end - # source://rubocop//lib/rubocop/config.rb#327 + # source://rubocop//lib/rubocop/config.rb#331 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 + # source://rubocop//lib/rubocop/config.rb#312 def read_rails_version_from_bundler_lock_file; end # @return [Float, nil] The Rails version as a `major.minor` Float. # - # source://rubocop//lib/rubocop/config.rb#303 + # source://rubocop//lib/rubocop/config.rb#307 def target_rails_version_from_bundler_lock_file; end class << self @@ -1520,10 +1519,10 @@ class RuboCop::ConfigLoader def resolver; end # source://rubocop//lib/rubocop/config_loader.rb#238 - def yaml_safe_load(yaml_code, filename); end + def yaml_tree_to_hash(yaml_tree); end # source://rubocop//lib/rubocop/config_loader.rb#248 - def yaml_safe_load!(yaml_code, filename); end + def yaml_tree_to_hash!(yaml_tree); end end end @@ -1630,12 +1629,12 @@ class RuboCop::ConfigLoaderResolver # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#268 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#267 def gem_config_path(gem_name, relative_config_path); end # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#246 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#245 def handle_disabled_by_default(config, new_default_configuration); end # @api private @@ -1675,7 +1674,7 @@ class RuboCop::ConfigLoaderResolver # @api private # - # source://rubocop//lib/rubocop/config_loader_resolver.rb#264 + # source://rubocop//lib/rubocop/config_loader_resolver.rb#263 def transform(config, &block); end # @api private @@ -2257,23 +2256,23 @@ end # # source://rubocop//lib/rubocop/config_validator.rb#6 class RuboCop::ConfigValidator - extend ::Forwardable + extend ::RuboCop::SimpleForwardable # @return [ConfigValidator] a new instance of ConfigValidator # - # source://rubocop//lib/rubocop/config_validator.rb#26 + # source://rubocop//lib/rubocop/config_validator.rb#27 def initialize(config); end - # source://forwardable/1.3.3/forwardable.rb#231 - def for_all_cops(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def for_all_cops(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def smart_loaded_path(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def smart_loaded_path(*_arg0, **_arg1, &_arg2); end - # source://rubocop//lib/rubocop/config_validator.rb#62 + # source://rubocop//lib/rubocop/config_validator.rb#63 def target_ruby_version; end - # source://rubocop//lib/rubocop/config_validator.rb#32 + # source://rubocop//lib/rubocop/config_validator.rb#33 def validate; end # Validations that should only be run after all config resolving has @@ -2282,76 +2281,76 @@ class RuboCop::ConfigValidator # chain has been loaded so that only the final value is validated, and # any obsolete but overridden values are ignored. # - # source://rubocop//lib/rubocop/config_validator.rb#58 + # source://rubocop//lib/rubocop/config_validator.rb#59 def validate_after_resolution; end # @raise [ValidationError] # - # source://rubocop//lib/rubocop/config_validator.rb#66 + # source://rubocop//lib/rubocop/config_validator.rb#67 def validate_section_presence(name); end private # @raise [ValidationError] # - # source://rubocop//lib/rubocop/config_validator.rb#103 + # source://rubocop//lib/rubocop/config_validator.rb#104 def alert_about_unrecognized_cops(invalid_cop_names); end - # source://rubocop//lib/rubocop/config_validator.rb#253 + # source://rubocop//lib/rubocop/config_validator.rb#254 def check_cop_config_value(hash, parent = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/config_validator.rb#76 + # source://rubocop//lib/rubocop/config_validator.rb#77 def check_obsoletions; end # @raise [ValidationError] # - # source://rubocop//lib/rubocop/config_validator.rb#83 + # source://rubocop//lib/rubocop/config_validator.rb#84 def check_target_ruby; end - # source://rubocop//lib/rubocop/config_validator.rb#194 + # source://rubocop//lib/rubocop/config_validator.rb#195 def each_invalid_parameter(cop_name); end - # source://rubocop//lib/rubocop/config_validator.rb#119 + # source://rubocop//lib/rubocop/config_validator.rb#120 def list_unknown_cops(invalid_cop_names); end # FIXME: Handling colors in exception messages like this is ugly. # - # source://rubocop//lib/rubocop/config_validator.rb#273 + # source://rubocop//lib/rubocop/config_validator.rb#274 def param_error_message(parent, key, value, supposed_values); end - # source://rubocop//lib/rubocop/config_validator.rb#241 + # source://rubocop//lib/rubocop/config_validator.rb#242 def reject_conflicting_safe_settings; end # @raise [ValidationError] # - # source://rubocop//lib/rubocop/config_validator.rb#232 + # source://rubocop//lib/rubocop/config_validator.rb#233 def reject_mutually_exclusive_defaults; end - # source://rubocop//lib/rubocop/config_validator.rb#141 + # source://rubocop//lib/rubocop/config_validator.rb#142 def suggestion(name); end # Returns the value of attribute target_ruby. # - # source://rubocop//lib/rubocop/config_validator.rb#74 + # source://rubocop//lib/rubocop/config_validator.rb#75 def target_ruby; end - # source://rubocop//lib/rubocop/config_validator.rb#206 + # source://rubocop//lib/rubocop/config_validator.rb#207 def validate_enforced_styles(valid_cop_names); end # @raise [ValidationError] # - # source://rubocop//lib/rubocop/config_validator.rb#168 + # source://rubocop//lib/rubocop/config_validator.rb#169 def validate_new_cops_parameter; end - # source://rubocop//lib/rubocop/config_validator.rb#179 + # source://rubocop//lib/rubocop/config_validator.rb#180 def validate_parameter_names(valid_cop_names); end - # source://rubocop//lib/rubocop/config_validator.rb#226 + # source://rubocop//lib/rubocop/config_validator.rb#227 def validate_support_and_has_list(name, formats, valid); end # @raise [ValidationError] # - # source://rubocop//lib/rubocop/config_validator.rb#157 + # source://rubocop//lib/rubocop/config_validator.rb#158 def validate_syntax_cop; end end @@ -2360,25 +2359,25 @@ end # source://rubocop//lib/rubocop/config_validator.rb#10 RuboCop::ConfigValidator::COMMON_PARAMS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/config_validator.rb#21 +# source://rubocop//lib/rubocop/config_validator.rb#22 RuboCop::ConfigValidator::CONFIG_CHECK_AUTOCORRECTS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/config_validator.rb#20 +# source://rubocop//lib/rubocop/config_validator.rb#21 RuboCop::ConfigValidator::CONFIG_CHECK_DEPARTMENTS = T.let(T.unsafe(nil), Array) # @api private # -# source://rubocop//lib/rubocop/config_validator.rb#19 +# source://rubocop//lib/rubocop/config_validator.rb#20 RuboCop::ConfigValidator::CONFIG_CHECK_KEYS = T.let(T.unsafe(nil), Set) # @api private # -# source://rubocop//lib/rubocop/config_validator.rb#12 +# source://rubocop//lib/rubocop/config_validator.rb#13 RuboCop::ConfigValidator::INTERNAL_PARAMS = T.let(T.unsafe(nil), Array) # @api private # -# source://rubocop//lib/rubocop/config_validator.rb#16 +# source://rubocop//lib/rubocop/config_validator.rb#17 RuboCop::ConfigValidator::NEW_COPS_VALUES = T.let(T.unsafe(nil), Array) # source://rubocop//lib/rubocop/cop/util.rb#4 @@ -2627,85 +2626,83 @@ RuboCop::Cop::AmbiguousCopName::MSG = T.let(T.unsafe(nil), String) # # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#6 class RuboCop::Cop::AnnotationComment - extend ::Forwardable - # @param comment [Parser::Source::Comment] # @param keywords [Array<String>] # @return [AnnotationComment] a new instance of AnnotationComment # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#13 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#11 def initialize(comment, keywords); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#19 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#17 def annotation?; end # Returns the range bounds for just the annotation # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#31 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#29 def bounds; end # Returns the value of attribute colon. # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#9 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#7 def colon; end # Returns the value of attribute comment. # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#9 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#7 def comment; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#23 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#21 def correct?(colon:); end # Returns the value of attribute keyword. # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#9 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#7 def keyword; end # Returns the value of attribute margin. # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#9 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#7 def margin; end # Returns the value of attribute note. # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#9 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#7 def note; end # Returns the value of attribute space. # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#9 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#7 def space; end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#67 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#65 def just_keyword_of_sentence?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#63 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#61 def keyword_appearance?; end # Returns the value of attribute keywords. # - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#39 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#37 def keywords; end - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#53 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#51 def regex; end - # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#41 + # source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#39 def split_comment(comment); end end -# source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#50 +# source://rubocop//lib/rubocop/cop/mixin/annotation_comment.rb#48 RuboCop::Cop::AnnotationComment::KEYWORDS_REGEX_CACHE = T.let(T.unsafe(nil), Hash) # Handles the `MinSize` configuration option for array-based cops @@ -2963,19 +2960,19 @@ class RuboCop::Cop::Base # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#343 + # source://rubocop//lib/rubocop/cop/base.rb#351 def always_autocorrect?; end # Called before any investigation # # @api private # - # source://rubocop//lib/rubocop/cop/base.rb#329 + # source://rubocop//lib/rubocop/cop/base.rb#337 def begin_investigation(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end # @api private # - # source://rubocop//lib/rubocop/cop/base.rb#314 + # source://rubocop//lib/rubocop/cop/base.rb#318 def callbacks_needed; end # Returns the value of attribute config. @@ -2992,7 +2989,7 @@ class RuboCop::Cop::Base # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#349 + # source://rubocop//lib/rubocop/cop/base.rb#357 def contextual_autocorrect?; end # Configuration Helpers @@ -3005,7 +3002,7 @@ class RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#285 + # source://rubocop//lib/rubocop/cop/base.rb#289 def excluded_file?(file); end # This method should be overridden when a cop's behavior depends @@ -3027,7 +3024,7 @@ class RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/base.rb#234 def external_dependency_checksum; end - # source://rubocop//lib/rubocop/cop/base.rb#353 + # source://rubocop//lib/rubocop/cop/base.rb#361 def inspect; end # Gets called if no message is specified when calling `add_offense` or @@ -3042,7 +3039,7 @@ class RuboCop::Cop::Base # @deprecated Make potential errors with previous API more obvious # - # source://rubocop//lib/rubocop/cop/base.rb#305 + # source://rubocop//lib/rubocop/cop/base.rb#309 def offenses; end # Called after all on_... have been called @@ -3065,7 +3062,7 @@ class RuboCop::Cop::Base # There should be very limited reasons for a Cop to do it's own parsing # - # source://rubocop//lib/rubocop/cop/base.rb#290 + # source://rubocop//lib/rubocop/cop/base.rb#294 def parse(source, path = T.unsafe(nil)); end # source://rubocop//lib/rubocop/cop/base.rb#264 @@ -3080,14 +3077,19 @@ class RuboCop::Cop::Base # # @api private # - # source://rubocop//lib/rubocop/cop/base.rb#296 + # source://rubocop//lib/rubocop/cop/base.rb#300 def ready; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#276 + # source://rubocop//lib/rubocop/cop/base.rb#280 def relevant_file?(file); end + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/base.rb#276 + def string_literals_frozen_by_default?; end + # source://rubocop//lib/rubocop/cop/base.rb#268 def target_rails_version; end @@ -3096,90 +3098,90 @@ class RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/base.rb#471 + # source://rubocop//lib/rubocop/cop/base.rb#479 def annotate(message); end - # source://rubocop//lib/rubocop/cop/base.rb#365 + # source://rubocop//lib/rubocop/cop/base.rb#373 def apply_correction(corrector); end # @return [Symbol] offense status # - # source://rubocop//lib/rubocop/cop/base.rb#435 + # source://rubocop//lib/rubocop/cop/base.rb#443 def attempt_correction(range, corrector); end # Reserved for Cop::Cop # - # source://rubocop//lib/rubocop/cop/base.rb#361 + # source://rubocop//lib/rubocop/cop/base.rb#369 def callback_argument(range); end # Called to complete an investigation # - # source://rubocop//lib/rubocop/cop/base.rb#394 + # source://rubocop//lib/rubocop/cop/base.rb#402 def complete_investigation; end # @return [Symbol, Corrector] offense status # - # source://rubocop//lib/rubocop/cop/base.rb#409 + # source://rubocop//lib/rubocop/cop/base.rb#417 def correct(range); end - # source://rubocop//lib/rubocop/cop/base.rb#379 + # source://rubocop//lib/rubocop/cop/base.rb#387 def current_corrector; end # Reserved for Commissioner: # - # source://rubocop//lib/rubocop/cop/base.rb#371 + # source://rubocop//lib/rubocop/cop/base.rb#379 def current_offense_locations; end - # source://rubocop//lib/rubocop/cop/base.rb#383 + # source://rubocop//lib/rubocop/cop/base.rb#391 def current_offenses; end - # source://rubocop//lib/rubocop/cop/base.rb#375 + # source://rubocop//lib/rubocop/cop/base.rb#383 def currently_disabled_lines; end - # source://rubocop//lib/rubocop/cop/base.rb#499 + # source://rubocop//lib/rubocop/cop/base.rb#507 def custom_severity; end - # source://rubocop//lib/rubocop/cop/base.rb#495 + # source://rubocop//lib/rubocop/cop/base.rb#503 def default_severity; end - # source://rubocop//lib/rubocop/cop/base.rb#449 + # source://rubocop//lib/rubocop/cop/base.rb#457 def disable_uncorrectable(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#485 + # source://rubocop//lib/rubocop/cop/base.rb#493 def enabled_line?(line_number); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#477 + # source://rubocop//lib/rubocop/cop/base.rb#485 def file_name_matches_any?(file, parameter, default_result); end - # source://rubocop//lib/rubocop/cop/base.rb#467 + # source://rubocop//lib/rubocop/cop/base.rb#475 def find_message(range, message); end - # source://rubocop//lib/rubocop/cop/base.rb#491 + # source://rubocop//lib/rubocop/cop/base.rb#499 def find_severity(_range, severity); end - # source://rubocop//lib/rubocop/cop/base.rb#512 + # source://rubocop//lib/rubocop/cop/base.rb#520 def range_for_original(range); end - # source://rubocop//lib/rubocop/cop/base.rb#456 + # source://rubocop//lib/rubocop/cop/base.rb#464 def range_from_node_or_range(node_or_range); end # Actually private methods # - # source://rubocop//lib/rubocop/cop/base.rb#404 + # source://rubocop//lib/rubocop/cop/base.rb#412 def reset_investigation; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#520 + # source://rubocop//lib/rubocop/cop/base.rb#528 def target_satisfies_all_gem_version_requirements?; end # @return [Symbol] offense status # - # source://rubocop//lib/rubocop/cop/base.rb#424 + # source://rubocop//lib/rubocop/cop/base.rb#432 def use_corrector(range, corrector); end class << self @@ -3199,7 +3201,7 @@ class RuboCop::Cop::Base # @api private # - # source://rubocop//lib/rubocop/cop/base.rb#319 + # source://rubocop//lib/rubocop/cop/base.rb#323 def callbacks_needed; end # source://rubocop//lib/rubocop/cop/base.rb#97 @@ -3290,12 +3292,12 @@ class RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/base.rb#387 + # source://rubocop//lib/rubocop/cop/base.rb#395 def restrict_on_send; end end end -# source://rubocop//lib/rubocop/cop/base.rb#391 +# source://rubocop//lib/rubocop/cop/base.rb#399 RuboCop::Cop::Base::EMPTY_OFFENSES = T.let(T.unsafe(nil), Array) # Reports of an investigation. @@ -3813,56 +3815,56 @@ class RuboCop::Cop::Bundler::GemVersion < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle include ::RuboCop::Cop::GemDeclaration - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#67 + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#68 def includes_commit_reference?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#62 + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#63 def includes_version_specification?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#71 + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#72 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#85 + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#86 def allowed_gem?(node); end - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#89 + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#90 def allowed_gems; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#111 + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#112 def forbidden_offense?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#117 + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#118 def forbidden_style?; end - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#93 + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#94 def message(_range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#101 + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#102 def offense?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#105 + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#106 def required_offense?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#121 + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#122 def required_style?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#125 + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#126 def version_specification?(expression); end end @@ -3873,6 +3875,9 @@ RuboCop::Cop::Bundler::GemVersion::FORBIDDEN_MSG = T.let(T.unsafe(nil), String) RuboCop::Cop::Bundler::GemVersion::REQUIRED_MSG = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#59 +RuboCop::Cop::Bundler::GemVersion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#60 RuboCop::Cop::Bundler::GemVersion::VERSION_SPECIFICATION_REGEX = T.let(T.unsafe(nil), Regexp) # Passing symbol arguments to `source` (e.g. `source :rubygems`) is @@ -4901,22 +4906,22 @@ RuboCop::Cop::ConfigurableNumbering::FORMATS = T.let(T.unsafe(nil), Hash) # # source://rubocop//lib/rubocop/cop/cop.rb#11 class RuboCop::Cop::Cop < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/cop.rb#65 + # source://rubocop//lib/rubocop/cop/cop.rb#73 def add_offense(node_or_range, location: T.unsafe(nil), message: T.unsafe(nil), severity: T.unsafe(nil), &block); end # Called before any investigation # # @api private # - # source://rubocop//lib/rubocop/cop/cop.rb#121 + # source://rubocop//lib/rubocop/cop/cop.rb#129 def begin_investigation(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end # @deprecated # - # source://rubocop//lib/rubocop/cop/cop.rb#97 + # source://rubocop//lib/rubocop/cop/cop.rb#105 def corrections; end - # source://rubocop//lib/rubocop/cop/cop.rb#82 + # source://rubocop//lib/rubocop/cop/cop.rb#90 def find_location(node, loc); end # Returns the value of attribute offenses. @@ -4926,71 +4931,76 @@ class RuboCop::Cop::Cop < ::RuboCop::Cop::Base # Called after all on_... have been called # - # source://rubocop//lib/rubocop/cop/cop.rb#114 + # source://rubocop//lib/rubocop/cop/cop.rb#122 def on_investigation_end; end # Called before all on_... have been called # - # source://rubocop//lib/rubocop/cop/cop.rb#108 + # source://rubocop//lib/rubocop/cop/cop.rb#116 def on_new_investigation; end # @deprecated Use class method # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/cop.rb#88 + # source://rubocop//lib/rubocop/cop/cop.rb#96 def support_autocorrect?; end private - # source://rubocop//lib/rubocop/cop/cop.rb#139 + # source://rubocop//lib/rubocop/cop/cop.rb#147 def apply_correction(corrector); end # Override Base # - # source://rubocop//lib/rubocop/cop/cop.rb#135 + # source://rubocop//lib/rubocop/cop/cop.rb#143 def callback_argument(_range); end - # source://rubocop//lib/rubocop/cop/cop.rb#156 + # source://rubocop//lib/rubocop/cop/cop.rb#164 def correction_lambda; end - # source://rubocop//lib/rubocop/cop/cop.rb#162 + # source://rubocop//lib/rubocop/cop/cop.rb#170 def dedupe_on_node(node); end # Just for legacy # # @yield [corrector] # - # source://rubocop//lib/rubocop/cop/cop.rb#144 + # source://rubocop//lib/rubocop/cop/cop.rb#152 def emulate_v0_callsequence(corrector); end - # source://rubocop//lib/rubocop/cop/cop.rb#175 + # source://rubocop//lib/rubocop/cop/cop.rb#183 def range_for_original(range); end - # source://rubocop//lib/rubocop/cop/cop.rb#169 + # source://rubocop//lib/rubocop/cop/cop.rb#177 def suppress_clobbering; end class << self # @deprecated Use Registry.all # - # source://rubocop//lib/rubocop/cop/cop.rb#48 + # source://rubocop//lib/rubocop/cop/cop.rb#56 def all; end - # source://rubocop//lib/rubocop/cop/cop.rb#29 + # @private + # + # source://rubocop//lib/rubocop/cop/cop.rb#25 + def inherited(_subclass); end + + # source://rubocop//lib/rubocop/cop/cop.rb#37 def joining_forces; end # @deprecated Use Registry.qualified_cop_name # - # source://rubocop//lib/rubocop/cop/cop.rb#57 + # source://rubocop//lib/rubocop/cop/cop.rb#65 def qualified_cop_name(name, origin); end # @deprecated Use Registry.global # - # source://rubocop//lib/rubocop/cop/cop.rb#39 + # source://rubocop//lib/rubocop/cop/cop.rb#47 def registry; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/cop.rb#25 + # source://rubocop//lib/rubocop/cop/cop.rb#33 def support_autocorrect?; end end end @@ -5092,7 +5102,7 @@ class RuboCop::Cop::Corrector < ::Parser::Source::TreeRewriter # Legacy # - # source://parser/3.3.4.2/lib/parser/source/tree_rewriter.rb#252 + # source://parser/3.3.5.0/lib/parser/source/tree_rewriter.rb#252 def rewrite; end # Swaps sources at the given ranges. @@ -5158,24 +5168,34 @@ module RuboCop::Cop::Documentation # @api private # - # source://rubocop//lib/rubocop/cop/documentation.rb#24 + # source://rubocop//lib/rubocop/cop/documentation.rb#25 def base_url_for(cop_class, config); end # @api private # - # source://rubocop//lib/rubocop/cop/documentation.rb#40 + # source://rubocop//lib/rubocop/cop/documentation.rb#57 def builtin?(cop_class); end # @api private # - # source://rubocop//lib/rubocop/cop/documentation.rb#35 + # source://rubocop//lib/rubocop/cop/documentation.rb#47 def default_base_url; end + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#52 + def default_extension; end + # @api private # # source://rubocop//lib/rubocop/cop/documentation.rb#10 def department_to_basename(department); end + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#36 + def extension_for(cop_class, config); end + # @api private # # source://rubocop//lib/rubocop/cop/documentation.rb#15 @@ -5184,25 +5204,35 @@ module RuboCop::Cop::Documentation class << self # @api private # - # source://rubocop//lib/rubocop/cop/documentation.rb#24 + # source://rubocop//lib/rubocop/cop/documentation.rb#25 def base_url_for(cop_class, config); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/documentation.rb#40 + # source://rubocop//lib/rubocop/cop/documentation.rb#57 def builtin?(cop_class); end # @api private # - # source://rubocop//lib/rubocop/cop/documentation.rb#35 + # source://rubocop//lib/rubocop/cop/documentation.rb#47 def default_base_url; end + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#52 + def default_extension; end + # @api private # # source://rubocop//lib/rubocop/cop/documentation.rb#10 def department_to_basename(department); end + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#36 + def extension_for(cop_class, config); end + # @api private # # source://rubocop//lib/rubocop/cop/documentation.rb#15 @@ -5597,21 +5627,24 @@ module RuboCop::Cop::FrozenStringLiteral # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#15 def frozen_string_literal_comment_exists?; end - # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#66 + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#76 def frozen_string_literal_specified?; end - # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#60 + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#70 def frozen_string_literals_disabled?; end - # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#41 + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#42 def frozen_string_literals_enabled?; end - # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#76 + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#86 def leading_comment_lines; end - # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#72 + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#82 def leading_magic_comments; end + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#35 + def uninterpolated_heredoc?(node); end + # source://rubocop//lib/rubocop/cop/mixin/frozen_string_literal.rb#31 def uninterpolated_string?(node); end @@ -7301,19 +7334,19 @@ class RuboCop::Cop::Layout::AccessModifierIndentation < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#58 def check_body(body, node); end - # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#65 + # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#69 def check_modifier(send_node, end_range); end - # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#88 + # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#92 def expected_indent_offset; end - # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#84 + # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#88 def message(range); end # An offset that is not expected, but correct if the configuration is # changed. # - # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#94 + # source://rubocop//lib/rubocop/cop/layout/access_modifier_indentation.rb#98 def unexpected_indent_offset; end end @@ -7605,7 +7638,7 @@ RuboCop::Cop::Layout::BeginEndAlignment::MSG = T.let(T.unsafe(nil), String) # start of the line where the expression started. # # `either` (which is the default) : the `end` is allowed to be in either -# location. The autofixer will default to `start_of_line`. +# location. The autocorrect will default to `start_of_line`. # # @example EnforcedStyleAlignWith: either (default) # # bad @@ -7670,54 +7703,63 @@ class RuboCop::Cop::Layout::BlockAlignment < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#228 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#246 def add_space_before(corrector, loc, delta); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#205 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#223 def alt_start_msg(start_loc, source_line_column); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#155 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#145 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#105 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#95 def block_end_align_target(node); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#123 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#113 def check_block_alignment(start_node, block_node); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#178 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#196 def compute_do_source_line_column(node, end_loc); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#220 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#238 def compute_start_col(ancestor_node, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#119 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#109 def disqualified_parent?(parent, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#115 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#105 def end_align_target?(node, parent); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#168 + # In offense message, we want to show the assignment LHS rather than + # the entire assignment. + # + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#191 + def find_lhs_node(node); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#162 def format_message(start_loc, end_loc, do_source_line_column, error_source_line_column); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#215 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#233 def format_source_line_column(source_line_column); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#197 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#215 def loc_to_source_line_column(loc); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#136 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#126 def register_offense(block_node, start_loc, end_loc, do_source_line_column); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#232 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#250 def remove_space_before(corrector, end_pos, delta); end - # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#95 + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#172 def start_for_block_node(block_node); end + + # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#179 + def start_for_line_node(block_node); end end # source://rubocop//lib/rubocop/cop/layout/block_alignment.rb#71 @@ -9283,84 +9325,84 @@ class RuboCop::Cop::Layout::EmptyLineBetweenDefs < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#290 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#291 def allowance_range?; end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#274 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#275 def autocorrect_insert_lines(corrector, newline_pos, count); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#267 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#268 def autocorrect_remove_lines(corrector, newline_pos, count); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#227 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#228 def blank_lines_count_between(first_def_node, second_def_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#171 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#172 def candidate?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#191 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#192 def class_candidate?(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#255 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#256 def def_end(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#163 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#164 def def_location(correction_node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#247 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#248 def def_start(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#178 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#179 def empty_line_between_macros; end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#259 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#260 def end_loc(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#205 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#206 def expected_lines; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#223 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#224 def line_count_allowed?(count); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#239 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#240 def lines_between_defs(first_def_node, second_def_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#182 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#183 def macro_candidate?(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#235 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#236 def maximum_empty_lines; end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#199 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#200 def message(node, count: T.unsafe(nil)); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#187 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#188 def method_candidate?(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#231 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#232 def minimum_empty_lines; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#195 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#196 def module_candidate?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#214 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#215 def multiple_blank_lines_groups?(first_def_node, second_def_node); end - # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#281 + # source://rubocop//lib/rubocop/cop/layout/empty_line_between_defs.rb#282 def node_type(node); end class << self @@ -10054,22 +10096,24 @@ class RuboCop::Cop::Layout::EmptyLinesAroundExceptionHandlingKeywords < ::RuboCo # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#81 def check_body(body, line_of_def_or_kwbegin); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#108 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#113 def keyword_locations(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#125 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#130 def keyword_locations_in_ensure(node); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#121 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#126 def keyword_locations_in_rescue(node); end + # @return [Boolean] + # # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#96 - def last_rescue_and_end_on_same_line(body); end + def last_body_and_end_on_same_line?(body); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#100 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#105 def message(location, keyword); end - # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#104 + # source://rubocop//lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb#109 def style; end end @@ -10728,7 +10772,6 @@ RuboCop::Cop::Layout::FirstArgumentIndentation::MSG = T.let(T.unsafe(nil), Strin # # defined inside a method call. # # # bad -# # consistent # array = [ # :value # ] @@ -10748,68 +10791,66 @@ RuboCop::Cop::Layout::FirstArgumentIndentation::MSG = T.let(T.unsafe(nil), Strin # # brackets are indented to the same position. # # # bad -# # align_brackets # and_now_for_something = [ # :completely_different # ] # # # good -# # align_brackets # and_now_for_something = [ # :completely_different # ] # -# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#85 +# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#82 class RuboCop::Cop::Layout::FirstArrayElementIndentation < ::RuboCop::Cop::Base include ::RuboCop::Cop::Alignment include ::RuboCop::Cop::ConfigurableEnforcedStyle include ::RuboCop::Cop::MultilineElementIndentation extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#94 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#91 def on_array(node); end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#100 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#97 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#100 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#97 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#191 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#188 def array_alignment_config; end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#111 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#108 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#149 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#146 def base_description(indent_base_type); end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#115 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#112 def brace_alignment_style; end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#119 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#116 def check(array_node, left_parenthesis); end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#133 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#130 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#185 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#182 def enforce_first_argument_with_fixed_indentation?; end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#162 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#159 def message(base_description); end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#170 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#167 def message_for_right_bracket(indent_base_type); end end -# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#91 +# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#88 RuboCop::Cop::Layout::FirstArrayElementIndentation::MSG = T.let(T.unsafe(nil), String) # Checks for a line break before the first element in a @@ -11151,30 +11192,36 @@ RuboCop::Cop::Layout::FirstHashElementLineBreak::MSG = T.let(T.unsafe(nil), Stri # qux: "b", # } # ) +# @example AllowedMethods: ['some_method'] # -# source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#66 +# # good +# some_method(foo, bar, +# baz) +# +# source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#71 class RuboCop::Cop::Layout::FirstMethodArgumentLineBreak < ::RuboCop::Cop::Base include ::RuboCop::Cop::FirstElementLineBreak + include ::RuboCop::Cop::AllowedMethods extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#72 + # source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#78 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#72 + # source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#78 def on_send(node); end - # source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#72 + # source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#78 def on_super(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#91 + # source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#99 def ignore_last_element?; end end -# source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#70 +# source://rubocop//lib/rubocop/cop/layout/first_method_argument_line_break.rb#76 RuboCop::Cop::Layout::FirstMethodArgumentLineBreak::MSG = T.let(T.unsafe(nil), String) # Checks for a line break before the first parameter in a @@ -12124,13 +12171,12 @@ end # source://rubocop//lib/rubocop/cop/layout/indentation_style.rb#40 RuboCop::Cop::Layout::IndentationStyle::MSG = T.let(T.unsafe(nil), String) -# Checks for indentation that doesn't use the specified number -# of spaces. +# Checks for indentation that doesn't use the specified number of spaces. +# The indentation width can be configured using the `Width` setting. The default width is 2. # -# See also the IndentationConsistency cop which is the companion to this -# one. +# See also the `Layout/IndentationConsistency` cop which is the companion to this one. # -# @example +# @example Width: 2 (default) # # bad # class A # def test @@ -12163,7 +12209,7 @@ RuboCop::Cop::Layout::IndentationStyle::MSG = T.let(T.unsafe(nil), String) # end # end # -# source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#45 +# source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#44 class RuboCop::Cop::Layout::IndentationWidth < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle include ::RuboCop::Cop::RangeHelp @@ -12173,126 +12219,126 @@ class RuboCop::Cop::Layout::IndentationWidth < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedPattern extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#57 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#56 def access_modifier?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#81 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#80 def on_block(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#138 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#137 def on_case(case_node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#146 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#145 def on_case_match(case_match); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#95 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#94 def on_class(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#104 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#103 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#121 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#120 def on_def(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#121 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#120 def on_defs(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#66 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#65 def on_ensure(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#66 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#65 def on_for(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#156 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#155 def on_if(node, base = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#73 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#72 def on_kwbegin(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#95 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#94 def on_module(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#81 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#80 def on_numblock(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#66 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#65 def on_resbody(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#61 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#60 def on_rescue(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#95 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#94 def on_sclass(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#104 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#103 def on_send(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#128 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#127 def on_until(node, base = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#128 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#127 def on_while(node, base = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#227 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#226 def access_modifier_indentation_style; end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#165 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#164 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#235 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#234 def check_assignment(node, rhs); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#255 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#254 def check_if(node, body, else_clause, base_loc); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#268 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#267 def check_indentation(base_loc, body_node, style = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#169 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#168 def check_members(base, members); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#193 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#192 def check_members_for_indented_internal_methods_style(members); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#199 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#198 def check_members_for_normal_style(base, members); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#341 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#340 def check_rescue?(rescue_node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#377 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#376 def configured_indentation_width; end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#207 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#206 def each_member(members); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#231 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#230 def indentation_consistency_style; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#323 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#322 def indentation_to_check?(base_loc, body_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#219 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#218 def indented_internal_methods_style?; end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#381 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#380 def leftmost_modifier_of(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#302 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#301 def message(configured_indentation_width, indentation, name); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#360 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#359 def offending_range(body_node, indentation); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#278 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#277 def offense(body_node, indentation, style); end # Returns true if the given node is within another node that has @@ -12300,29 +12346,29 @@ class RuboCop::Cop::Layout::IndentationWidth < ::RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#313 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#312 def other_offense_in_same_range?(node); end - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#181 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#180 def select_check_member(member); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#345 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#344 def skip_check?(base_loc, body_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#223 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#222 def special_modifier?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#368 + # source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#367 def starts_with_access_modifier?(body_node); end end -# source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#53 +# source://rubocop//lib/rubocop/cop/layout/indentation_width.rb#52 RuboCop::Cop::Layout::IndentationWidth::MSG = T.let(T.unsafe(nil), String) # Checks for indentation of the first non-blank non-comment @@ -12402,72 +12448,98 @@ RuboCop::Cop::Layout::InitialIndentation::MSG = T.let(T.unsafe(nil), String) # # #ruby=2.7.0 # #ruby-gemset=myproject +# @example AllowRBSInlineAnnotation: false (default) +# +# # bad +# +# include Enumerable #[Integer] +# +# attr_reader :name #: String +# attr_reader :age #: Integer? +# @example AllowRBSInlineAnnotation: true +# +# # good # -# source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#52 +# include Enumerable #[Integer] +# +# attr_reader :name #: String +# attr_reader :age #: Integer? +# +# source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#70 class RuboCop::Cop::Layout::LeadingCommentSpace < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#58 + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#76 def on_new_investigation; end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#95 + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#114 def allow_doxygen_comment?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#103 + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#122 def allow_gemfile_ruby_comment?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#79 + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#138 + def allow_rbs_inline_annotation?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#98 def allowed_on_first_line?(comment); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#99 + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#118 def doxygen_comment_style?(comment); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#107 + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#126 def gemfile?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#115 + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#134 def gemfile_ruby_comment?(comment); end - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#75 + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#94 def hash_mark(expr); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#91 + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#110 def rackup_config_file?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#87 + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#106 def rackup_options?(comment); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#111 + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#142 + def rbs_inline_annotation?(comment); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#130 def ruby_comment_in_gemfile?(comment); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#83 + # source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#102 def shebang?(comment); end end -# source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#56 +# source://rubocop//lib/rubocop/cop/layout/leading_comment_space.rb#74 RuboCop::Cop::Layout::LeadingCommentSpace::MSG = T.let(T.unsafe(nil), String) # Checks for unnecessary leading blank lines at the beginning @@ -12806,20 +12878,20 @@ RuboCop::Cop::Layout::LineEndStringConcatenationIndentation::PARENT_TYPES_FOR_IN # * `Layout/ArrayAlignment` # * `Layout/BlockAlignment` # * `Layout/BlockEndNewline` -# * `LayoutClosingParenthesisIndentation` -# * `LayoutFirstArgumentIndentation` -# * `LayoutFirstArrayElementIndentation` -# * `LayoutFirstHashElementIndentation` -# * `LayoutFirstParameterIndentation` -# * `LayoutHashAlignment` -# * `LayoutIndentationWidth` -# * `LayoutMultilineArrayLineBreaks` -# * `LayoutMultilineBlockLayout` -# * `LayoutMultilineHashBraceLayout` -# * `LayoutMultilineHashKeyLineBreaks` -# * `LayoutMultilineMethodArgumentLineBreaks` -# * `LayoutMultilineMethodParameterLineBreaks` -# * `Layout/ParameterAlignment` +# * `Layout/ClosingParenthesisIndentation` +# * `Layout/FirstArgumentIndentation` +# * `Layout/FirstArrayElementIndentation` +# * `Layout/FirstHashElementIndentation` +# * `Layout/FirstParameterIndentation` +# * `Layout/HashAlignment` +# * `Layout/IndentationWidth` +# * `Layout/MultilineArrayLineBreaks` +# * `Layout/MultilineBlockLayout` +# * `Layout/MultilineHashBraceLayout` +# * `Layout/MultilineHashKeyLineBreaks` +# * `Layout/MultilineMethodArgumentLineBreaks` +# * `Layout/MultilineMethodParameterLineBreaks` +# * `Layout//ParameterAlignment` # * `Style/BlockDelimiters` # # Together, these cops will pretty print hashes, arrays, @@ -16546,7 +16618,7 @@ class RuboCop::Cop::LineBreakCorrector # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/correctors/line_break_corrector.rb#58 + # source://rubocop//lib/rubocop/cop/correctors/line_break_corrector.rb#60 def trailing_class_definition?(token, body); end end end @@ -16591,7 +16663,7 @@ module RuboCop::Cop::LineLengthHelp # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#32 def line_length(line); end - # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#105 + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#110 def line_length_without_directive(line); end # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#51 @@ -16605,7 +16677,7 @@ module RuboCop::Cop::LineLengthHelp # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#98 + # source://rubocop//lib/rubocop/cop/mixin/line_length_help.rb#103 def valid_uri?(uri_ish_string); end end @@ -16914,38 +16986,39 @@ RuboCop::Cop::Lint::AmbiguousOperatorPrecedence::RESTRICT_ON_SEND = T.let(T.unsa # # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#59 class RuboCop::Cop::Lint::AmbiguousRange < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RationalLiteral extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#64 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#65 def on_erange(node); end - # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#64 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#65 def on_irange(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#82 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#84 def acceptable?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#89 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#92 def acceptable_call?(node); end # @yield [range.begin] # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#77 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#78 def each_boundary(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#99 + # source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#102 def require_parentheses_for_method_chain?; end end -# source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#62 +# source://rubocop//lib/rubocop/cop/lint/ambiguous_range.rb#63 RuboCop::Cop::Lint::AmbiguousRange::MSG = T.let(T.unsafe(nil), String) # Checks for ambiguous regexp literals in the first argument of @@ -17085,17 +17158,17 @@ RuboCop::Cop::Lint::AssignmentInCondition::MSG_WITH_SAFE_ASSIGNMENT_ALLOWED = T. class RuboCop::Cop::Lint::BigDecimalNew < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/big_decimal_new.rb#25 + # source://rubocop//lib/rubocop/cop/lint/big_decimal_new.rb#24 def big_decimal_new(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/big_decimal_new.rb#30 + # source://rubocop//lib/rubocop/cop/lint/big_decimal_new.rb#29 def on_send(node); end end # source://rubocop//lib/rubocop/cop/lint/big_decimal_new.rb#20 RuboCop::Cop::Lint::BigDecimalNew::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/big_decimal_new.rb#22 +# source://rubocop//lib/rubocop/cop/lint/big_decimal_new.rb#21 RuboCop::Cop::Lint::BigDecimalNew::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for places where binary operator has identical operands. @@ -18425,6 +18498,53 @@ end # source://rubocop//lib/rubocop/cop/lint/duplicate_rescue_exception.rb#31 RuboCop::Cop::Lint::DuplicateRescueException::MSG = T.let(T.unsafe(nil), String) +# Checks for duplicate literal, constant, or variable elements in Set. +# +# @example +# +# # bad +# Set[:foo, :bar, :foo] +# +# # good +# Set[:foo, :bar] +# +# # bad +# Set.new([:foo, :bar, :foo]) +# +# # good +# Set.new([:foo, :bar]) +# +# # bad +# [:foo, :bar, :foo].to_set +# +# # good +# [:foo, :bar].to_set +# +# source://rubocop//lib/rubocop/cop/lint/duplicate_set_element.rb#28 +class RuboCop::Cop::Lint::DuplicateSetElement < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/duplicate_set_element.rb#43 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_set_element.rb#43 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/duplicate_set_element.rb#35 + def set_init_elements(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/lint/duplicate_set_element.rb#64 + def register_offense(current_element, prev_element); end +end + +# source://rubocop//lib/rubocop/cop/lint/duplicate_set_element.rb#31 +RuboCop::Cop::Lint::DuplicateSetElement::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/duplicate_set_element.rb#32 +RuboCop::Cop::Lint::DuplicateSetElement::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Checks if each_with_object is called with an immutable # argument. Since the argument is the object that the given block shall # make calls on to build something based on the enumerable that @@ -18739,52 +18859,55 @@ class RuboCop::Cop::Lint::EmptyConditionalBody < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#70 + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#71 def on_if(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#156 + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#177 def all_branches_body_missing?(node); end - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#83 + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#95 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#142 + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#163 def branch_range(node); end - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#104 + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#125 def correct_other_branches(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#162 + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#183 def deletion_range(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#137 + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#158 def else_branch?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#131 + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#152 def empty_elsif_branch?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#123 + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#144 def empty_if_branch?(node); end - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#89 + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#87 + def offense_range(node); end + + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#101 def remove_comments(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#96 + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#109 def remove_empty_branch(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#116 + # source://rubocop//lib/rubocop/cop/lint/empty_conditional_body.rb#137 def require_other_branches_correction?(node); end end @@ -19068,14 +19191,11 @@ RuboCop::Cop::Lint::EmptyWhen::MSG = T.let(T.unsafe(nil), String) # # source://rubocop//lib/rubocop/cop/lint/ensure_return.rb#42 class RuboCop::Cop::Lint::EnsureReturn < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop//lib/rubocop/cop/lint/ensure_return.rb#48 + # source://rubocop//lib/rubocop/cop/lint/ensure_return.rb#45 def on_ensure(node); end end -# source://rubocop//lib/rubocop/cop/lint/ensure_return.rb#46 +# source://rubocop//lib/rubocop/cop/lint/ensure_return.rb#43 RuboCop::Cop::Lint::EnsureReturn::MSG = T.let(T.unsafe(nil), String) # Emulates the following Ruby warnings in Ruby 2.6. @@ -19219,7 +19339,15 @@ RuboCop::Cop::Lint::FlipFlop::MSG = T.let(T.unsafe(nil), String) # floating-point value representation to be exactly the same, which is very unlikely # if you perform any arithmetic operations involving precision loss. # -# # good - comparing against zero +# @example +# # bad +# x == 0.1 +# x != 0.1 +# +# # good - using BigDecimal +# x.to_d == 0.1.to_d +# +# # good - comparing against zero # x == 0.0 # x != 0.0 # @@ -19233,14 +19361,6 @@ RuboCop::Cop::Lint::FlipFlop::MSG = T.let(T.unsafe(nil), String) # # Or some other epsilon based type of comparison: # # https://www.embeddeduse.com/2019/08/26/qt-compare-two-floats/ # -# @example -# # bad -# x == 0.1 -# x != 0.1 -# -# # good - using BigDecimal -# x.to_d == 0.1.to_d -# # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#35 class RuboCop::Cop::Lint::FloatComparison < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#44 @@ -19248,10 +19368,10 @@ class RuboCop::Cop::Lint::FloatComparison < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#91 + # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#89 def check_numeric_returning_method(node); end - # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#75 + # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#73 def check_send(node); end # @return [Boolean] @@ -19635,26 +19755,26 @@ class RuboCop::Cop::Lint::ImplicitStringConcatenation < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#86 + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#92 def display_str(node); end - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#53 + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#59 def each_bad_cons(node); end - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#68 + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#74 def ending_delimiter(str); end - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#94 + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#100 def str_content(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#78 + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#84 def string_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#82 + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#88 def string_literals?(node1, node2); end end @@ -19928,16 +20048,19 @@ class RuboCop::Cop::Lint::ItWithoutArgumentsInBlock < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/it_without_arguments_in_block.rb#48 + # source://rubocop//lib/rubocop/cop/lint/it_without_arguments_in_block.rb#41 def deprecated_it_method?(node); end - # source://rubocop//lib/rubocop/cop/lint/it_without_arguments_in_block.rb#33 - def on_block(node); end + # source://rubocop//lib/rubocop/cop/lint/it_without_arguments_in_block.rb#34 + def on_send(node); end end # source://rubocop//lib/rubocop/cop/lint/it_without_arguments_in_block.rb#30 RuboCop::Cop::Lint::ItWithoutArgumentsInBlock::MSG = T.let(T.unsafe(nil), String) +# source://rubocop//lib/rubocop/cop/lint/it_without_arguments_in_block.rb#32 +RuboCop::Cop::Lint::ItWithoutArgumentsInBlock::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Checks uses of lambda without a literal block. # It emulates the following warning in Ruby 3.0: # @@ -20158,57 +20281,60 @@ class RuboCop::Cop::Lint::LiteralInInterpolation < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#58 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#60 def autocorrected_value(node); end - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#104 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#127 def autocorrected_value_for_array(node); end - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#110 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#133 def autocorrected_value_for_hash(node); end - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#80 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#103 def autocorrected_value_for_string(node); end - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#88 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#111 def autocorrected_value_for_symbol(node); end - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#121 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#144 def autocorrected_value_in_hash(node); end - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#95 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#118 def autocorrected_value_in_hash_for_symbol(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#151 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#174 def ends_heredoc_line?(node); end + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#82 + def handle_special_regexp_chars(begin_node, value); end + # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#159 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#182 def in_array_percent_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#44 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#46 def offending?(node); end # Does node print its own source when converted to a string? # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#142 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#165 def prints_as_self?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#147 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#170 def space_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#52 + # source://rubocop//lib/rubocop/cop/lint/literal_in_interpolation.rb#54 def special_keyword?(node); end end @@ -21511,28 +21637,28 @@ class RuboCop::Cop::Lint::ParenthesesAsGroupedExpression < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#61 + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#60 def chained_calls?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#49 - def first_argument_block_type?(first_arg); end + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#56 + def compound_range?(first_arg); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#57 - def first_argument_starts_with_left_parenthesis?(node); end + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#47 + def first_argument_block_type?(first_arg); end - # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#86 + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#85 def space_range(expr, space_length); end - # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#70 + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#69 def spaces_before_left_parenthesis(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#66 + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#65 def ternary_expression?(node); end # @return [Boolean] @@ -21542,7 +21668,7 @@ class RuboCop::Cop::Lint::ParenthesesAsGroupedExpression < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#53 + # source://rubocop//lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#51 def valid_first_argument?(first_arg); end end @@ -22961,58 +23087,99 @@ RuboCop::Cop::Lint::SafeNavigationChain::MSG = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#30 RuboCop::Cop::Lint::SafeNavigationChain::PLUS_MINUS_METHODS = T.let(T.unsafe(nil), Array) -# Check to make sure that if safe navigation is used for a method -# call in an `&&` or `||` condition that safe navigation is used for all -# method calls on that same object. +# Check to make sure that if safe navigation is used in an `&&` or `||` condition, +# consistent and appropriate safe navigation, without excess or deficiency, +# is used for all method calls on the same object. # # @example # # bad -# foo&.bar && foo.baz +# foo&.bar && foo&.baz # -# # bad -# foo.bar || foo&.baz +# # good +# foo&.bar && foo.baz # # # bad -# foo&.bar && (foobar.baz || foo.baz) +# foo.bar && foo&.baz # # # good # foo.bar && foo.baz # +# # bad +# foo&.bar || foo.baz +# # # good # foo&.bar || foo&.baz # +# # bad +# foo.bar || foo&.baz +# # # good +# foo.bar || foo.baz +# +# # bad # foo&.bar && (foobar.baz || foo&.baz) # -# source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#29 +# # good +# foo&.bar && (foobar.baz || foo.baz) +# +# source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#41 class RuboCop::Cop::Lint::SafeNavigationConsistency < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedMethods include ::RuboCop::Cop::NilMethods extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#42 - def check(node); end + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#48 + def on_and(node); end - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#36 - def on_csend(node); end + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#48 + def on_or(node); end private - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#61 - def autocorrect(corrector, node); end + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#96 + def already_appropriate_call?(operand, dot_op); end # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#67 - def location(node, unsafe_method_call); end + def collect_operands(node, operand_nodes); end + + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#83 + def find_consistent_parts(grouped_operands); end + + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#120 + def most_left_indices(grouped_operands); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#150 + def nilable?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#134 + def operand_in_and?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#142 + def operand_in_or?(node); end - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#71 - def top_conditional_ancestor(node); end + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#111 + def operand_nodes(operand, operand_nodes); end - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#82 - def unsafe_method_calls(method_calls, safe_nav_receiver); end + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#74 + def receiver_name_as_key(method, fully_receivers); end + + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#100 + def register_offense(operand, dot_operator); end end -# source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#34 -RuboCop::Cop::Lint::SafeNavigationConsistency::MSG = T.let(T.unsafe(nil), String) +# source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#45 +RuboCop::Cop::Lint::SafeNavigationConsistency::USE_DOT_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/safe_navigation_consistency.rb#46 +RuboCop::Cop::Lint::SafeNavigationConsistency::USE_SAFE_NAVIGATION_MSG = T.let(T.unsafe(nil), String) # Checks to make sure safe navigation isn't used with `empty?` in # a conditional. @@ -24741,7 +24908,7 @@ class RuboCop::Cop::Lint::UnusedMethodArgument < ::RuboCop::Cop::Base def message(variable); end class << self - # source://rubocop-performance/1.21.1/lib/rubocop-performance.rb#15 + # source://rubocop-performance/1.22.1/lib/rubocop-performance.rb#15 def autocorrect_incompatible_with; end # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#75 @@ -24800,33 +24967,46 @@ RuboCop::Cop::Lint::UriEscapeUnescape::MSG = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/lint/uri_escape_unescape.rb#48 RuboCop::Cop::Lint::UriEscapeUnescape::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# Identifies places where `URI.regexp` is obsolete and should -# not be used. Instead, use `URI::DEFAULT_PARSER.make_regexp`. +# Identifies places where `URI.regexp` is obsolete and should not be used. +# +# For Ruby 3.3 or lower, use `URI::DEFAULT_PARSER.make_regexp`. +# For Ruby 3.4 or higher, use `URI::RFC2396_PARSER.make_regexp`. +# +# NOTE: If you need to support both Ruby 3.3 and lower as well as Ruby 3.4 and higher, +# consider manually changing the code as follows: +# +# [source,ruby] +# ---- +# defined?(URI::RFC2396_PARSER) ? URI::RFC2396_PARSER : URI::DEFAULT_PARSER +# ---- # # @example # # bad # URI.regexp('http://example.com') # -# # good +# # good - Ruby 3.3 or lower # URI::DEFAULT_PARSER.make_regexp('http://example.com') # -# source://rubocop//lib/rubocop/cop/lint/uri_regexp.rb#16 +# # good - Ruby 3.4 or higher +# URI::RFC2396_PARSER.make_regexp('http://example.com') +# +# source://rubocop//lib/rubocop/cop/lint/uri_regexp.rb#29 class RuboCop::Cop::Lint::UriRegexp < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/uri_regexp.rb#23 + # source://rubocop//lib/rubocop/cop/lint/uri_regexp.rb#40 def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/uri_regexp.rb#36 + def uri_constant?(param0 = T.unsafe(nil)); end end -# source://rubocop//lib/rubocop/cop/lint/uri_regexp.rb#19 +# source://rubocop//lib/rubocop/cop/lint/uri_regexp.rb#32 RuboCop::Cop::Lint::UriRegexp::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/uri_regexp.rb#21 +# source://rubocop//lib/rubocop/cop/lint/uri_regexp.rb#33 RuboCop::Cop::Lint::UriRegexp::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/uri_regexp.rb#20 -RuboCop::Cop::Lint::UriRegexp::URI_CONSTANTS = T.let(T.unsafe(nil), Array) - # Checks for redundant access modifiers, including those with no # code, those which are repeated, and leading `public` modifiers in a # class or module body. Conditionally-defined methods are considered as @@ -25048,6 +25228,11 @@ RuboCop::Cop::Lint::UselessAccessModifier::MSG = T.let(T.unsafe(nil), String) # reassignments and properly handles varied cases such as branch, loop, # rescue, ensure, etc. # +# This cop's autocorrection avoids cases like `a ||= 1` because removing assignment from +# operator assignment can cause NameError if this assignment has been used to declare +# a local variable. For example, replacing `a ||= 1` with `a || 1` may cause +# "undefined local variable or method `a' for main:Object (NameError)". +# # NOTE: Given the assignment `foo = 1, bar = 2`, removing unused variables # can lead to a syntax error, so this case is not autocorrected. # @@ -25065,83 +25250,83 @@ RuboCop::Cop::Lint::UselessAccessModifier::MSG = T.let(T.unsafe(nil), String) # do_something(some_var) # end # -# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#41 +# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#40 class RuboCop::Cop::Lint::UselessAssignment < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#52 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#51 def after_leaving_scope(scope, _variable_table); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#158 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#165 def autocorrect(corrector, assignment); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#99 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#106 def chained_assignment?(node); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#57 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#56 def check_for_unused_assignments(variable); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#142 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#149 def collect_variable_like_names(scope); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#75 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#82 def message_for_useless_assignment(assignment); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#103 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#110 def message_specification(assignment, variable); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#113 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#120 def multiple_assignment_message(variable_name); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#81 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#88 def offense_range(assignment); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#118 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#125 def operator_assignment_message(scope, assignment); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#175 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#182 def remove_exception_assignment_part(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#199 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#206 def remove_local_variable_assignment_part(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#188 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#195 def remove_trailing_character_from_operator(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#184 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#191 def rename_variable_with_underscore(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#192 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#199 def replace_named_capture_group_with_non_capturing_group(corrector, node, variable_name); end # TODO: More precise handling (rescue, ensure, nested begin, etc.) # - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#132 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#139 def return_value_node_of_scope(scope); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#89 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#96 def sequential_assignment?(node); end - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#125 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#132 def similar_name_message(variable); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#151 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#158 def variable_like_method_invocation?(node); end class << self - # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#48 + # source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#47 def joining_forces; end end end -# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#46 +# source://rubocop//lib/rubocop/cop/lint/useless_assignment.rb#45 RuboCop::Cop::Lint::UselessAssignment::MSG = T.let(T.unsafe(nil), String) # Checks for useless `else` in `begin..end` without `rescue`. @@ -25234,6 +25419,62 @@ end # source://rubocop//lib/rubocop/cop/lint/useless_method_definition.rb#41 RuboCop::Cop::Lint::UselessMethodDefinition::MSG = T.let(T.unsafe(nil), String) +# Certain numeric operations have no impact, being: +# Adding or subtracting 0, multiplying or dividing by 1 or raising to the power of 1. +# These are probably leftover from debugging, or are mistakes. +# +# @example +# +# # bad +# x + 0 +# x - 0 +# x * 1 +# x / 1 +# x ** 1 +# +# # good +# x +# +# # bad +# x += 0 +# x -= 0 +# x *= 1 +# x /= 1 +# x **= 1 +# +# # good +# x = x +# +# source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#32 +class RuboCop::Cop::Lint::UselessNumericOperation < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#54 + def on_op_asgn(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#43 + def on_send(node); end + + # source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#41 + def useless_abbreviated_assignment?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#38 + def useless_operation?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#67 + def useless?(operation, number); end +end + +# source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#34 +RuboCop::Cop::Lint::UselessNumericOperation::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/useless_numeric_operation.rb#35 +RuboCop::Cop::Lint::UselessNumericOperation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Checks for useless `rescue`s, which only reraise rescued exceptions. # # @example @@ -25595,61 +25836,77 @@ class RuboCop::Cop::Lint::Void < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/void.rb#92 + # source://rubocop//lib/rubocop/cop/lint/void.rb#90 def on_begin(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#82 + # source://rubocop//lib/rubocop/cop/lint/void.rb#81 def on_block(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#92 + # source://rubocop//lib/rubocop/cop/lint/void.rb#95 + def on_ensure(node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#90 def on_kwbegin(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#82 + # source://rubocop//lib/rubocop/cop/lint/void.rb#81 def on_numblock(node); end private - # source://rubocop//lib/rubocop/cop/lint/void.rb#222 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/void.rb#258 + def all_keys_entirely_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/void.rb#262 + def all_values_entirely_literal?(node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#236 def autocorrect_nonmutating_send(corrector, node, suggestion); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#216 + # source://rubocop//lib/rubocop/cop/lint/void.rb#230 def autocorrect_void_expression(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#204 + # source://rubocop//lib/rubocop/cop/lint/void.rb#218 def autocorrect_void_op(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#99 + # source://rubocop//lib/rubocop/cop/lint/void.rb#101 def check_begin(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#113 + # source://rubocop//lib/rubocop/cop/lint/void.rb#198 + def check_ensure(node); end + + # source://rubocop//lib/rubocop/cop/lint/void.rb#115 def check_expression(expr); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#154 + # source://rubocop//lib/rubocop/cop/lint/void.rb#156 def check_literal(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#178 + # source://rubocop//lib/rubocop/cop/lint/void.rb#180 def check_nonmutating(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#162 + # source://rubocop//lib/rubocop/cop/lint/void.rb#164 def check_self(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#136 + # source://rubocop//lib/rubocop/cop/lint/void.rb#138 def check_var(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#170 + # source://rubocop//lib/rubocop/cop/lint/void.rb#172 def check_void_expression(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#125 + # source://rubocop//lib/rubocop/cop/lint/void.rb#127 def check_void_op(node, &block); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/void.rb#231 + # source://rubocop//lib/rubocop/cop/lint/void.rb#245 def entirely_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/void.rb#196 + # source://rubocop//lib/rubocop/cop/lint/void.rb#211 def in_void_context?(node); end end @@ -25665,13 +25922,13 @@ RuboCop::Cop::Lint::Void::EXPRESSION_MSG = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/lint/void.rb#61 RuboCop::Cop::Lint::Void::LIT_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/void.rb#77 +# source://rubocop//lib/rubocop/cop/lint/void.rb#76 RuboCop::Cop::Lint::Void::METHODS_REPLACEABLE_BY_EACH = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/void.rb#79 +# source://rubocop//lib/rubocop/cop/lint/void.rb#78 RuboCop::Cop::Lint::Void::NONMUTATING_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/void.rb#70 +# source://rubocop//lib/rubocop/cop/lint/void.rb#69 RuboCop::Cop::Lint::Void::NONMUTATING_METHODS_WITH_BANG_VERSION = T.let(T.unsafe(nil), Array) # source://rubocop//lib/rubocop/cop/lint/void.rb#64 @@ -25692,9 +25949,6 @@ RuboCop::Cop::Lint::Void::UNARY_OPERATORS = T.let(T.unsafe(nil), Array) # source://rubocop//lib/rubocop/cop/lint/void.rb#59 RuboCop::Cop::Lint::Void::VAR_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/void.rb#69 -RuboCop::Cop::Lint::Void::VOID_CONTEXT_TYPES = T.let(T.unsafe(nil), Array) - # Common functionality for obtaining source ranges from regexp matches # # source://rubocop//lib/rubocop/cop/mixin/match_range.rb#6 @@ -25957,8 +26211,9 @@ RuboCop::Cop::Metrics::AbcSize::MSG = T.let(T.unsafe(nil), String) # The cop can be configured to ignore blocks passed to certain methods. # # You can set constructs you want to fold with `CountAsOne`. -# Available are: 'array', 'hash', 'heredoc', and 'method_call'. Each construct -# will be counted as one line regardless of its actual size. +# +# Available are: 'array', 'hash', 'heredoc', and 'method_call'. +# Each construct will be counted as one line regardless of its actual size. # # NOTE: This cop does not apply for `Struct` definitions. # @@ -25966,7 +26221,7 @@ RuboCop::Cop::Metrics::AbcSize::MSG = T.let(T.unsafe(nil), String) # for backwards compatibility. Please use `AllowedMethods` and `AllowedPatterns` # instead. By default, there are no methods to allowed. # -# @example CountAsOne: ['array', 'heredoc', 'method_call'] +# @example CountAsOne: ['array', 'hash', 'heredoc', 'method_call'] # # something do # array = [ # +1 @@ -25974,7 +26229,7 @@ RuboCop::Cop::Metrics::AbcSize::MSG = T.let(T.unsafe(nil), String) # 2 # ] # -# hash = { # +3 +# hash = { # +1 # key: 'value' # } # @@ -25987,32 +26242,32 @@ RuboCop::Cop::Metrics::AbcSize::MSG = T.let(T.unsafe(nil), String) # 1, # 2 # ) -# end # 6 points +# end # 4 points # -# source://rubocop//lib/rubocop/cop/metrics/block_length.rb#44 +# source://rubocop//lib/rubocop/cop/metrics/block_length.rb#45 class RuboCop::Cop::Metrics::BlockLength < ::RuboCop::Cop::Base include ::RuboCop::Cop::CodeLength include ::RuboCop::Cop::AllowedMethods include ::RuboCop::Cop::AllowedPattern - # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#51 + # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#52 def on_block(node); end - # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#51 + # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#52 def on_numblock(node); end private - # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#80 + # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#81 def cop_label; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#62 + # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#63 def method_receiver_excluded?(node); end end -# source://rubocop//lib/rubocop/cop/metrics/block_length.rb#49 +# source://rubocop//lib/rubocop/cop/metrics/block_length.rb#50 RuboCop::Cop::Metrics::BlockLength::LABEL = T.let(T.unsafe(nil), String) # Checks for excessive nesting of conditional and looping constructs. @@ -26069,12 +26324,13 @@ RuboCop::Cop::Metrics::BlockNesting::NESTING_BLOCKS = T.let(T.unsafe(nil), Array # The maximum allowed length is configurable. # # You can set constructs you want to fold with `CountAsOne`. -# Available are: 'array', 'hash', 'heredoc', and 'method_call'. Each construct -# will be counted as one line regardless of its actual size. +# +# Available are: 'array', 'hash', 'heredoc', and 'method_call'. +# Each construct will be counted as one line regardless of its actual size. # # NOTE: This cop also applies for `Struct` definitions. # -# @example CountAsOne: ['array', 'heredoc', 'method_call'] +# @example CountAsOne: ['array', 'hash', 'heredoc', 'method_call'] # # class Foo # ARRAY = [ # +1 @@ -26082,7 +26338,7 @@ RuboCop::Cop::Metrics::BlockNesting::NESTING_BLOCKS = T.let(T.unsafe(nil), Array # 2 # ] # -# HASH = { # +3 +# HASH = { # +1 # key: 'value' # } # @@ -26095,24 +26351,24 @@ RuboCop::Cop::Metrics::BlockNesting::NESTING_BLOCKS = T.let(T.unsafe(nil), Array # 1, # 2 # ) -# end # 6 points +# end # 4 points # -# source://rubocop//lib/rubocop/cop/metrics/class_length.rb#39 +# source://rubocop//lib/rubocop/cop/metrics/class_length.rb#40 class RuboCop::Cop::Metrics::ClassLength < ::RuboCop::Cop::Base include ::RuboCop::Cop::CodeLength - # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#52 + # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#53 def on_casgn(node); end - # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#42 + # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#43 def on_class(node); end - # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#46 + # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#47 def on_sclass(node); end private - # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#70 + # source://rubocop//lib/rubocop/cop/metrics/class_length.rb#71 def message(length, max_length); end end @@ -26243,15 +26499,16 @@ RuboCop::Cop::Metrics::CyclomaticComplexity::MSG = T.let(T.unsafe(nil), String) # The maximum allowed length is configurable. # # You can set constructs you want to fold with `CountAsOne`. -# Available are: 'array', 'hash', 'heredoc', and 'method_call'. Each construct -# will be counted as one line regardless of its actual size. +# +# Available are: 'array', 'hash', 'heredoc', and 'method_call'. +# Each construct will be counted as one line regardless of its actual size. # # NOTE: The `ExcludedMethods` and `IgnoredMethods` configuration is # deprecated and only kept for backwards compatibility. # Please use `AllowedMethods` and `AllowedPatterns` instead. # By default, there are no methods to allowed. # -# @example CountAsOne: ['array', 'heredoc', 'method_call'] +# @example CountAsOne: ['array', 'hash', 'heredoc', 'method_call'] # # def m # array = [ # +1 @@ -26259,7 +26516,7 @@ RuboCop::Cop::Metrics::CyclomaticComplexity::MSG = T.let(T.unsafe(nil), String) # 2 # ] # -# hash = { # +3 +# hash = { # +1 # key: 'value' # } # @@ -26272,33 +26529,33 @@ RuboCop::Cop::Metrics::CyclomaticComplexity::MSG = T.let(T.unsafe(nil), String) # 1, # 2 # ) -# end # 6 points +# end # 4 points # -# source://rubocop//lib/rubocop/cop/metrics/method_length.rb#42 +# source://rubocop//lib/rubocop/cop/metrics/method_length.rb#43 class RuboCop::Cop::Metrics::MethodLength < ::RuboCop::Cop::Base include ::RuboCop::Cop::CodeLength include ::RuboCop::Cop::AllowedMethods include ::RuboCop::Cop::AllowedPattern - # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#56 + # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#57 def on_block(node); end - # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#49 + # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#50 def on_def(node); end - # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#49 + # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#50 def on_defs(node); end - # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#56 + # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#57 def on_numblock(node); end private - # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#65 + # source://rubocop//lib/rubocop/cop/metrics/method_length.rb#66 def cop_label; end end -# source://rubocop//lib/rubocop/cop/metrics/method_length.rb#47 +# source://rubocop//lib/rubocop/cop/metrics/method_length.rb#48 RuboCop::Cop::Metrics::MethodLength::LABEL = T.let(T.unsafe(nil), String) # Checks if the length of a module exceeds some maximum value. @@ -26306,10 +26563,11 @@ RuboCop::Cop::Metrics::MethodLength::LABEL = T.let(T.unsafe(nil), String) # The maximum allowed length is configurable. # # You can set constructs you want to fold with `CountAsOne`. -# Available are: 'array', 'hash', 'heredoc', and 'method_call'. Each construct -# will be counted as one line regardless of its actual size. # -# @example CountAsOne: ['array', 'heredoc', 'method_call'] +# Available are: 'array', 'hash', 'heredoc', and 'method_call'. +# Each construct will be counted as one line regardless of its actual size. +# +# @example CountAsOne: ['array', 'hash', 'heredoc', 'method_call'] # # module M # ARRAY = [ # +1 @@ -26317,7 +26575,7 @@ RuboCop::Cop::Metrics::MethodLength::LABEL = T.let(T.unsafe(nil), String) # 2 # ] # -# HASH = { # +3 +# HASH = { # +1 # key: 'value' # } # @@ -26330,24 +26588,24 @@ RuboCop::Cop::Metrics::MethodLength::LABEL = T.let(T.unsafe(nil), String) # 1, # 2 # ) -# end # 6 points +# end # 4 points # -# source://rubocop//lib/rubocop/cop/metrics/module_length.rb#37 +# source://rubocop//lib/rubocop/cop/metrics/module_length.rb#38 class RuboCop::Cop::Metrics::ModuleLength < ::RuboCop::Cop::Base include ::RuboCop::Cop::CodeLength - # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#51 + # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#52 def module_definition?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#44 + # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#45 def on_casgn(node); end - # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#40 + # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#41 def on_module(node); end private - # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#55 + # source://rubocop//lib/rubocop/cop/metrics/module_length.rb#56 def message(length, max_length); end end @@ -26933,24 +27191,24 @@ class RuboCop::Cop::Minitest::MultipleAssertions < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/exclude_limit.rb#11 def max=(value); end - # source://rubocop-minitest/0.35.1/lib/rubocop/cop/minitest/multiple_assertions.rb#37 + # source://rubocop-minitest/0.36.0/lib/rubocop/cop/minitest/multiple_assertions.rb#37 def on_class(class_node); end private - # source://rubocop-minitest/0.35.1/lib/rubocop/cop/minitest/multiple_assertions.rb#54 + # source://rubocop-minitest/0.36.0/lib/rubocop/cop/minitest/multiple_assertions.rb#54 def assertions_count(node); end - # source://rubocop-minitest/0.35.1/lib/rubocop/cop/minitest/multiple_assertions.rb#62 + # source://rubocop-minitest/0.36.0/lib/rubocop/cop/minitest/multiple_assertions.rb#62 def assertions_count_based_on_type(node); end - # source://rubocop-minitest/0.35.1/lib/rubocop/cop/minitest/multiple_assertions.rb#77 + # source://rubocop-minitest/0.36.0/lib/rubocop/cop/minitest/multiple_assertions.rb#77 def assertions_count_in_assignment(node); end - # source://rubocop-minitest/0.35.1/lib/rubocop/cop/minitest/multiple_assertions.rb#95 + # source://rubocop-minitest/0.36.0/lib/rubocop/cop/minitest/multiple_assertions.rb#99 def assertions_count_in_branches(branches); end - # source://rubocop-minitest/0.35.1/lib/rubocop/cop/minitest/multiple_assertions.rb#99 + # source://rubocop-minitest/0.36.0/lib/rubocop/cop/minitest/multiple_assertions.rb#103 def max_assertions; end end @@ -27371,16 +27629,21 @@ class RuboCop::Cop::Naming::AccessorMethodName < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#61 + # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#66 def bad_reader_name?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#65 + # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#70 def bad_writer_name?(node); end - # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#53 + # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#54 def message(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#62 + def proper_attribute_name?(node); end end # source://rubocop//lib/rubocop/cop/naming/accessor_method_name.rb#39 @@ -28064,10 +28327,10 @@ class RuboCop::Cop::Naming::InclusiveLanguage < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#111 def add_offenses_for_token(token, word_locations); end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#167 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#176 def add_to_flagged_term_hash(regex_string, term, term_definition); end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#193 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#202 def array_to_ignorecase_regex(strings); end # @return [Boolean] @@ -28075,55 +28338,58 @@ 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#243 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#252 def create_message(word, message = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#217 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#226 def create_multiple_word_message_for_file(words); end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#213 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#222 def create_single_word_message_for_file(word); end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#189 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#198 def ensure_regex_string(regex); end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#160 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#169 def extract_regexp(term, term_definition); end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#251 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#260 def find_flagged_term(word); end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#265 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#274 def format_suggestions(suggestions); end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#197 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#206 def investigate_filepath; end # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#100 def investigate_tokens; end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#231 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#240 def mask_input(str); end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#280 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#289 def offense_range(token, word); end + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#160 + def preferred_sole_term(suggestions); end + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#130 def preprocess_check_config; end # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#144 def preprocess_flagged_terms; end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#258 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#267 def preprocess_suggestions(suggestions); end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#179 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#188 def process_allowed_regex(allowed); end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#221 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#230 def scan_for_words(input); end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#174 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#183 def set_regexes(flagged_term_strings, allowed_strings); end end @@ -28532,7 +28798,7 @@ end # def_node_matcher(:is_even) { |value| } # # # good -# # def_node_matcher(:even?) { |value| } +# def_node_matcher(:even?) { |value| } # # source://rubocop//lib/rubocop/cop/naming/predicate_name.rb#75 class RuboCop::Cop::Naming::PredicateName < ::RuboCop::Cop::Base @@ -28982,8 +29248,8 @@ class RuboCop::Cop::Offense def cop_name; end # @api public - # @return [Boolean] whether this offense can be automatically corrected via - # autocorrect or a todo. + # @return [Boolean] whether this offense can be automatically corrected via autocorrect. + # This includes todo comments, for example when requested with `--disable-uncorrectable`. # # source://rubocop//lib/rubocop/cop/offense.rb#102 def correctable?; end @@ -30485,64 +30751,63 @@ end module RuboCop::Cop::StatementModifier include ::RuboCop::Cop::Alignment include ::RuboCop::Cop::LineLengthHelp - include ::RuboCop::Cop::RangeHelp private - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#79 + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#80 def code_after(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#103 + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#104 def comment_disables_cop?(comment); end - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#71 + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#72 def first_line_comment(node); end - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#58 + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#57 def if_body_source(if_body); end - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#44 + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#43 def length_in_modifier_form(node); end - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#97 + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#98 def max_line_length; end - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#67 + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#66 def method_source(if_body); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#38 + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#37 def modifier_fits_on_single_line?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#27 + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#26 def non_eligible_body?(body); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#34 + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#33 def non_eligible_condition?(condition); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#20 + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#19 def non_eligible_node?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#85 + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#86 def parenthesize?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#12 + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#11 def single_line_as_modifier?(node); end - # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#51 + # source://rubocop//lib/rubocop/cop/mixin/statement_modifier.rb#50 def to_modifier_form(node); end end @@ -30586,6 +30851,17 @@ end module RuboCop::Cop::StringLiteralsHelp private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/string_literals_help.rb#24 + def enforce_double_quotes?; end + + # source://rubocop//lib/rubocop/cop/mixin/string_literals_help.rb#20 + def preferred_string_literal; end + + # source://rubocop//lib/rubocop/cop/mixin/string_literals_help.rb#28 + def string_literals_config; end + # @return [Boolean] # # source://rubocop//lib/rubocop/cop/mixin/string_literals_help.rb#9 @@ -30653,6 +30929,8 @@ module RuboCop::Cop::Style; end # class Foo # # private :bar, :baz +# private *%i[qux quux] +# private *METHOD_NAMES # # end # @example AllowModifiersOnSymbols: false @@ -30660,6 +30938,8 @@ module RuboCop::Cop::Style; end # class Foo # # private :bar, :baz +# private *%i[qux quux] +# private *METHOD_NAMES # # end # @example AllowModifiersOnAttrs: true (default) @@ -30689,101 +30969,106 @@ module RuboCop::Cop::Style; end # # end # -# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#109 +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#113 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#135 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#141 def access_modifier_with_attr?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#130 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#134 def access_modifier_with_symbol?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#140 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#146 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#195 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#205 def access_modifier_is_inlined?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#199 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#209 def access_modifier_is_not_inlined?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#177 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#187 def allow_modifiers_on_attrs?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#173 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#183 def allow_modifiers_on_symbols?(node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#158 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#164 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#269 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#279 def def_source(node, def_node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#230 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#240 def find_argument_less_modifier_node(node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#219 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#229 def find_corresponding_def_node(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#187 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#197 def group_style?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#191 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#201 def inline_style?; end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#261 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#271 def insert_inline_modifier(corrector, node, modifier_name); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#209 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#219 def message(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#181 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#191 def offense?(node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#265 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#179 + def percent_symbol_array?(node); end + + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#275 def remove_node(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#244 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#254 def replace_def(corrector, node, def_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#203 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#213 def right_siblings_same_inline_method?(node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#238 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#248 def select_grouped_def_nodes(node); end end -# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#127 +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#131 RuboCop::Cop::Style::AccessModifierDeclarations::ALLOWED_NODE_TYPES = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#115 +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#119 RuboCop::Cop::Style::AccessModifierDeclarations::GROUP_STYLE_MESSAGE = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#120 +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#124 RuboCop::Cop::Style::AccessModifierDeclarations::INLINE_STYLE_MESSAGE = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#125 +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#129 RuboCop::Cop::Style::AccessModifierDeclarations::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for grouping of accessors in `class` and `module` bodies. @@ -30793,6 +31078,9 @@ RuboCop::Cop::Style::AccessModifierDeclarations::RESTRICT_ON_SEND = T.let(T.unsa # NOTE: If there is a method call before the accessor method it is always allowed # as it might be intended like Sorbet. # +# NOTE: If there is a RBS::Inline annotation comment just after the accessor method +# it is always allowed. +# # @example EnforcedStyle: grouped (default) # # bad # class Foo @@ -30829,73 +31117,73 @@ RuboCop::Cop::Style::AccessModifierDeclarations::RESTRICT_ON_SEND = T.let(T.unsa # attr_reader :baz # end # -# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#50 +# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#53 class RuboCop::Cop::Style::AccessorGrouping < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::VisibilityHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#59 + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#62 def on_class(node); end - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#59 + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#62 def on_module(node); end - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#59 + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#62 def on_sclass(node); end private - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#82 + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#85 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#71 + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#74 def check(send_node); end - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#114 + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#122 def class_send_elements(class_node); end - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#157 + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#165 def group_accessors(node, accessors); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#96 + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#99 def groupable_accessor?(node); end - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#134 + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#142 def groupable_sibling_accessors(send_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#126 + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#134 def grouped_style?; end - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#143 + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#151 def message(send_node); end - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#148 + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#156 def preferred_accessors(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#91 + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#94 def previous_line_comment?(node); end - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#163 + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#171 def separate_accessors(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#130 + # source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#138 def separated_style?; end end -# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#56 +# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#59 RuboCop::Cop::Style::AccessorGrouping::GROUPED_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#57 +# source://rubocop//lib/rubocop/cop/style/accessor_grouping.rb#60 RuboCop::Cop::Style::AccessorGrouping::SEPARATED_MSG = T.let(T.unsafe(nil), String) # Enforces the use of either `#alias` or `#alias_method` @@ -31223,38 +31511,38 @@ class RuboCop::Cop::Style::ArgumentsForwarding < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#187 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#188 def add_forward_all_offenses(node, send_classifications, forwardable_args); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#353 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#366 def add_parens_if_missing(node, corrector); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#214 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#215 def add_post_ruby_32_offenses(def_node, send_classifications, forwardable_args); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#345 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#352 def allow_only_rest_arguments?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#337 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#340 def arguments_range(node, first_node); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#265 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#267 def classification_and_forwards(def_node, send_node, referenced_lvars, forwardable_args); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#250 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#252 def classify_send_nodes(def_node, send_nodes, referenced_lvars, forwardable_args); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#497 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#542 def explicit_block_name?; end # 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#240 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#242 def non_splat_or_block_pass_lvar_references(body); end # @return [Boolean] @@ -31264,30 +31552,35 @@ class RuboCop::Cop::Style::ArgumentsForwarding < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#294 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#296 def outside_block?(node); end # 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#284 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#286 def redundant_named_arg(arg, config_name, keyword); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#327 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#329 def register_forward_all_offense(def_or_send, send_or_arguments, rest_or_splat); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#300 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#302 def register_forward_args_offense(def_arguments_or_send, rest_arg_or_splat); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#316 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#318 def register_forward_block_arg_offense(add_parens, def_arguments_or_send, block_arg); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#308 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#310 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#349 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#360 + def send_inside_block?(send_classifications); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#356 def use_anonymous_forwarding?; end class << self @@ -31316,115 +31609,133 @@ 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#360 +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#374 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#372 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#403 def initialize(def_node, send_node, referenced_lvars, forwardable_args, **config); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#400 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#431 def classification; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#367 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#387 + def def_all_anonymous_args?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#381 def extract_forwarded_kwrest_arg(param0 = T.unsafe(nil), param1); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#394 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#425 def forwarded_block_arg; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#370 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#384 def forwarded_block_arg?(param0 = T.unsafe(nil), param1); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#388 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#419 def forwarded_kwrest_arg; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#382 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#413 def forwarded_rest_arg; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#364 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#378 def forwarded_rest_arg?(param0 = T.unsafe(nil), param1); end + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#396 + def send_all_anonymous_args?(param0 = T.unsafe(nil)); end + private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#468 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#513 def additional_kwargs?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#464 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#509 def additional_kwargs_or_forwarded_kwargs?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#478 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#523 def allow_offense_for_no_block?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#449 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#494 def any_arg_referenced?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#433 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#478 def arguments; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#412 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#446 def can_forward_all?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#472 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#517 def forward_additional_kwargs?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#429 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#474 def forwarded_rest_and_kwrest_args; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#491 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#536 def missing_rest_arg_or_kwrest_arg?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#482 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#527 def no_additional_args?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#457 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#502 def no_post_splat_args?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#425 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#470 def offensive_block_forwarding?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#445 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#490 def referenced_block_arg?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#441 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#486 def referenced_kwrest_arg?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#437 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#482 def referenced_rest_arg?; end + # def foo(a = 41, ...) is a syntax error in 3.0. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#458 + def ruby_30_or_lower_optarg?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#462 + def ruby_32_only_anonymous_forwarding?; end + # @return [Boolean] # - # 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#466 + def ruby_32_or_higher_missing_rest_or_kwest?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#453 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#498 def target_ruby_version; end end @@ -32162,165 +32473,175 @@ class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#194 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#198 def on_block(node); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#194 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#198 def on_numblock(node); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#179 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#183 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#459 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#472 def array_or_range?(node); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#208 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#212 def autocorrect(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#463 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#476 def begin_required?(block_node); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#236 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#240 def braces_for_chaining_message(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#400 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#413 def braces_for_chaining_style?(node); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#248 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#252 def braces_required_message(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#377 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#390 def braces_required_method?(method_name); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#381 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#394 def braces_required_methods; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#410 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#423 def braces_style?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#455 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#468 def conditional?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#414 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#427 def correction_would_break_code?(node); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#309 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#313 def end_of_chain(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#424 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#437 def functional_block?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#420 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#433 def functional_method?(method_name); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#326 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#330 def get_blocks(node, &block); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#385 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#398 def line_count_based_block_style?(node); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#218 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#222 def line_count_based_message(node); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#252 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#256 def message(node); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#300 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#304 def move_comment_before_block(corrector, comment, block_node, closing_brace); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#432 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#445 def procedural_method?(method_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#428 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#441 def procedural_oneliners_may_have_braces?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#344 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#349 def proper_block_style?(node); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#316 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#320 def remove_trailing_whitespace(corrector, range, comment); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#263 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#267 def replace_braces_with_do_end(corrector, loc); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#279 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#283 def replace_do_end_with_braces(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#356 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#362 def require_braces?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#448 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#370 + def require_do_end?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#461 def return_value_of_scope?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#436 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#449 def return_value_used?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#389 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#402 def semantic_block_style?(node); end - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#226 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#230 def semantic_message(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#364 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#377 def special_method?(method_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#370 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#383 def special_method_proper_block_style?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#296 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#300 def whitespace_after?(range, length = T.unsafe(nil)); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#292 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#296 def whitespace_before?(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#322 + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#326 def with_block?(node); end + + class << self + # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#179 + def autocorrect_incompatible_with; end + end end # source://rubocop//lib/rubocop/cop/style/block_delimiters.rb#175 @@ -33024,6 +33345,7 @@ RuboCop::Cop::Style::ClassVars::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # array.reject(&:nil?) # array.reject { |e| e.nil? } # array.select { |e| !e.nil? } +# array.filter { |e| !e.nil? } # array.grep_v(nil) # array.grep_v(NilClass) # @@ -33032,10 +33354,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? } +# hash.filter! { |k, v| !v.nil? } # # # good # hash.compact! @@ -33050,22 +33371,22 @@ class RuboCop::Cop::Style::CollectionCompact < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#85 + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#86 def grep_v_with_nil?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#89 + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#90 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#89 + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#90 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#64 + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#65 def reject_method?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#57 + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#58 def reject_method_with_block_pass?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#74 + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#75 def select_method?(param0 = T.unsafe(nil)); end private @@ -33085,6 +33406,9 @@ class RuboCop::Cop::Style::CollectionCompact < ::RuboCop::Cop::Base def to_enum_method?(node); end end +# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#53 +RuboCop::Cop::Style::CollectionCompact::FILTER_METHODS = T.let(T.unsafe(nil), Array) + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#50 RuboCop::Cop::Style::CollectionCompact::MSG = T.let(T.unsafe(nil), String) @@ -33227,6 +33551,9 @@ RuboCop::Cop::Style::ColonMethodDefinition::MSG = T.let(T.unsafe(nil), String) # can be combined into a single loop. It is very likely that combining them # will make the code more efficient and more concise. # +# NOTE: Autocorrection is not applied when the block variable names differ in separate loops, +# as it is impossible to determine which variable name should be prioritized. +# # @example # # bad # def method @@ -33272,44 +33599,44 @@ RuboCop::Cop::Style::ColonMethodDefinition::MSG = T.let(T.unsafe(nil), String) # each_slice(3) { |slice| do_something(slice) } # end # -# source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#59 +# source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#62 class RuboCop::Cop::Style::CombinableLoops < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#64 + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#68 def on_block(node); end - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#77 + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#84 def on_for(node); end - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#64 + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#68 def on_numblock(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#88 + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#95 def collection_looping_method?(node); end - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#105 + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#112 def combine_with_left_sibling(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#112 + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#119 def correct_end_of_block(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#93 + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#100 def same_collection_looping_block?(node, sibling); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#101 + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#108 def same_collection_looping_for?(node, sibling); end end -# source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#62 +# source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#65 RuboCop::Cop::Style::CombinableLoops::MSG = T.let(T.unsafe(nil), String) # Enforces using `` or %x around command literals. @@ -33558,7 +33885,7 @@ RuboCop::Cop::Style::CommentAnnotation::MSG_SPACE_STYLE = T.let(T.unsafe(nil), S # These keywords are: `class`, `module`, `def`, `begin`, `end`. # # Note that some comments -# are allowed. +# and RBS::Inline annotation comments are allowed. # # Autocorrection removes comments from `end` keyword and keeps comments # for `class`, `module`, `def` and `begin` above the keyword. @@ -33602,10 +33929,15 @@ class RuboCop::Cop::Style::CommentedKeyword < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#83 def offensive?(comment); end + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#95 + def rbs_inline_annotation?(line, comment); end + # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#70 def register_offense(comment, matched_keyword); end - # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#89 + # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#91 def source_line(comment); end end @@ -35416,10 +35748,10 @@ class RuboCop::Cop::Style::EmptyElse < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/empty_else.rb#193 + # source://rubocop//lib/rubocop/cop/style/empty_else.rb#194 def autocorrect_forbidden?(type); end - # source://rubocop//lib/rubocop/cop/style/empty_else.rb#186 + # source://rubocop//lib/rubocop/cop/style/empty_else.rb#187 def base_node(node); end # source://rubocop//lib/rubocop/cop/style/empty_else.rb#145 @@ -35428,7 +35760,7 @@ class RuboCop::Cop::Style::EmptyElse < ::RuboCop::Cop::Base # @return [Boolean] # # source://rubocop//lib/rubocop/cop/style/empty_else.rb#180 - def comment_in_else?(loc); end + def comment_in_else?(node); end # source://rubocop//lib/rubocop/cop/style/empty_else.rb#160 def empty_check(node); end @@ -35438,7 +35770,7 @@ class RuboCop::Cop::Style::EmptyElse < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/empty_else.rb#156 def empty_style?; end - # source://rubocop//lib/rubocop/cop/style/empty_else.rb#197 + # source://rubocop//lib/rubocop/cop/style/empty_else.rb#198 def missing_else_style; end # source://rubocop//lib/rubocop/cop/style/empty_else.rb#166 @@ -35487,26 +35819,14 @@ RuboCop::Cop::Style::EmptyElse::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Style::EmptyHeredoc < ::RuboCop::Cop::Base include ::RuboCop::Cop::Heredoc include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::StringLiteralsHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/empty_heredoc.rb#43 + # source://rubocop//lib/rubocop/cop/style/empty_heredoc.rb#44 def on_heredoc(node); end - - private - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/empty_heredoc.rb#63 - def enforce_double_quotes?; end - - # source://rubocop//lib/rubocop/cop/style/empty_heredoc.rb#59 - def preferred_string_literal; end - - # source://rubocop//lib/rubocop/cop/style/empty_heredoc.rb#67 - def string_literals_config; end end -# source://rubocop//lib/rubocop/cop/style/empty_heredoc.rb#41 +# source://rubocop//lib/rubocop/cop/style/empty_heredoc.rb#42 RuboCop::Cop::Style::EmptyHeredoc::MSG = T.let(T.unsafe(nil), String) # Checks for parentheses for empty lambda parameters. Parentheses @@ -35547,7 +35867,9 @@ RuboCop::Cop::Style::EmptyLambdaParameter::MSG = T.let(T.unsafe(nil), String) # @example # # bad # a = Array.new +# a = Array[] # h = Hash.new +# h = Hash[] # s = String.new # # # good @@ -35555,83 +35877,79 @@ RuboCop::Cop::Style::EmptyLambdaParameter::MSG = T.let(T.unsafe(nil), String) # h = {} # s = '' # -# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#19 +# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#21 class RuboCop::Cop::Style::EmptyLiteral < ::RuboCop::Cop::Base include ::RuboCop::Cop::FrozenStringLiteral include ::RuboCop::Cop::RangeHelp + include ::RuboCop::Cop::StringLiteralsHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#31 + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#34 def array_node(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#40 + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#43 def array_with_block(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#34 + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#54 + def array_with_index(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#37 def hash_node(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#43 + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#46 def hash_with_block(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#50 + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#62 + def hash_with_index(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#69 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#37 + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#40 def str_node(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#111 + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#118 def correction(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#74 - def enforce_double_quotes?; end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#82 + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#89 def first_argument_unparenthesized?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#129 + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#136 def frozen_strings?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#102 + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#109 def offense_array_node?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#106 + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#113 def offense_hash_node?(node); end - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#60 + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#79 def offense_message(node); end - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#70 - def preferred_string_literal; end - - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#89 + # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#96 def replacement_range(node); end - - # source://rubocop//lib/rubocop/cop/style/empty_literal.rb#78 - def string_literals_config; end end -# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#24 +# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#27 RuboCop::Cop::Style::EmptyLiteral::ARR_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#25 +# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#28 RuboCop::Cop::Style::EmptyLiteral::HASH_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#28 +# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#31 RuboCop::Cop::Style::EmptyLiteral::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#26 +# source://rubocop//lib/rubocop/cop/style/empty_literal.rb#29 RuboCop::Cop::Style::EmptyLiteral::STR_MSG = T.let(T.unsafe(nil), String) # Checks for the formatting of empty method definitions. @@ -36947,8 +37265,8 @@ RuboCop::Cop::Style::FormatString::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array # The reason is that _unannotated_ format is very similar # to encoded URLs or Date/Time formatting strings. # -# This cop can be customized allowed methods with `AllowedMethods`. -# By default, there are no methods to allowed. +# This cop's allowed methods can be customized with `AllowedMethods`. +# By default, there are no allowed methods. # # It is allowed to contain unannotated token # if the number of them is less than or equals to @@ -37431,10 +37749,10 @@ RuboCop::Cop::Style::GlobalVars::MSG = T.let(T.unsafe(nil), String) # # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#114 class RuboCop::Cop::Style::GuardClause < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::LineLengthHelp include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::MinBodyLength + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::LineLengthHelp include ::RuboCop::Cop::StatementModifier extend ::RuboCop::Cop::AutoCorrector @@ -37462,12 +37780,12 @@ class RuboCop::Cop::Style::GuardClause < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#283 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#285 def accepted_if?(node, ending); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#297 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#299 def allowed_consecutive_conditionals?; end # @return [Boolean] @@ -37506,7 +37824,7 @@ class RuboCop::Cop::Style::GuardClause < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#188 def register_offense(node, scope_exiting_keyword, conditional_keyword, guard = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#293 + # source://rubocop//lib/rubocop/cop/style/guard_clause.rb#295 def remove_whole_lines(corrector, range); end # @return [Boolean] @@ -37702,80 +38020,83 @@ class RuboCop::Cop::Style::HashEachMethods < ::RuboCop::Cop::Base include ::RuboCop::Cop::Lint::UnusedArgument extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#74 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#79 def check_unused_block_args(node, key, value); end # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#51 def each_arguments(param0 = T.unsafe(nil)); end + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#61 + def hash_mutated?(param0 = T.unsafe(nil), param1); end + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#46 def kv_each(param0 = T.unsafe(nil)); end # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#56 def kv_each_with_block_pass(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#60 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#65 def on_block(node); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#95 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#100 def on_block_pass(node); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#60 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#65 def on_numblock(node); end private - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#180 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#186 def check_argument(variable); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#204 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#210 def correct_args(node, corrector); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#190 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#196 def correct_implicit(node, corrector, method_name); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#195 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#201 def correct_key_value_each(node, corrector); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#176 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#182 def format_message(method_name, current); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#103 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#108 def handleable?(node); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#211 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#217 def kv_range(outer_node); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#133 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#139 def message(prefer, method_name, unused_code); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#139 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#145 def register_each_args_offense(node, message, prefer, unused_range); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#110 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#116 def register_kv_offense(target, method); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#146 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#152 def register_kv_with_block_pass_offense(node, target, method); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#167 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#173 def root_receiver(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#121 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#127 def unused_block_arg_exist?(node, block_arg); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#157 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#163 def use_array_converter_method_as_preceding?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#186 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#192 def used?(arg); end end @@ -37999,7 +38320,7 @@ RuboCop::Cop::Style::HashLikeCase::MSG = T.let(T.unsafe(nil), String) # # good # {a: 1, b: 2} # {:c => 3, 'd' => 4} -# @example EnforcedShorthandSyntax: always (default) +# @example EnforcedShorthandSyntax: always # # # bad # {foo: foo, bar: bar} @@ -38013,7 +38334,7 @@ RuboCop::Cop::Style::HashLikeCase::MSG = T.let(T.unsafe(nil), String) # # # good # {foo: foo, bar: bar} -# @example EnforcedShorthandSyntax: either +# @example EnforcedShorthandSyntax: either (default) # # # good # {foo: foo, bar: bar} @@ -38546,9 +38867,9 @@ RuboCop::Cop::Style::IfInsideElse::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Style::IfUnlessModifier < ::RuboCop::Cop::Base include ::RuboCop::Cop::Alignment include ::RuboCop::Cop::LineLengthHelp - include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::StatementModifier include ::RuboCop::Cop::AllowedPattern + include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::CommentsHelp extend ::RuboCop::Cop::AutoCorrector @@ -38692,7 +39013,6 @@ RuboCop::Cop::Style::IfUnlessModifier::MSG_USE_NORMAL = T.let(T.unsafe(nil), Str class RuboCop::Cop::Style::IfUnlessModifierOfIfUnless < ::RuboCop::Cop::Base include ::RuboCop::Cop::Alignment include ::RuboCop::Cop::LineLengthHelp - include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::StatementModifier extend ::RuboCop::Cop::AutoCorrector @@ -38825,25 +39145,47 @@ class RuboCop::Cop::Style::IfWithSemicolon < ::RuboCop::Cop::Base include ::RuboCop::Cop::OnNormalIfUnless extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#23 + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#24 def on_normal_if_unless(node); end private - # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#38 - def autocorrect(node); end + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#54 + def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#56 + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#93 def build_else_branch(second_condition); end - # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#47 + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#84 + def build_expression(expr); end + + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#75 def correct_elsif(node); end + + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#40 + def message(node); end + + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#66 + def replacement(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#113 + def require_argument_parentheses?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#62 + def use_block_in_branches?(node); end end # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#20 RuboCop::Cop::Style::IfWithSemicolon::MSG_IF_ELSE = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#21 +RuboCop::Cop::Style::IfWithSemicolon::MSG_NEWLINE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/if_with_semicolon.rb#22 RuboCop::Cop::Style::IfWithSemicolon::MSG_TERNARY = T.let(T.unsafe(nil), String) # Checks for `raise` or `fail` statements which do not specify an @@ -38900,6 +39242,9 @@ class RuboCop::Cop::Style::InPatternThen < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/in_pattern_then.rb#46 def alternative_pattern_source(pattern); end + + # source://rubocop//lib/rubocop/cop/style/in_pattern_then.rb#50 + def collect_alternative_patterns(pattern); end end # source://rubocop//lib/rubocop/cop/style/in_pattern_then.rb#27 @@ -39730,7 +40075,7 @@ end # # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#107 class RuboCop::Cop::Style::MagicCommentFormat::CommentRange - extend ::Forwardable + extend ::RuboCop::SimpleForwardable # @return [CommentRange] a new instance of CommentRange # @@ -39748,11 +40093,11 @@ class RuboCop::Cop::Style::MagicCommentFormat::CommentRange # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#125 def directives; end - # source://forwardable/1.3.3/forwardable.rb#231 - def loc(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def loc(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def text(*args, **_arg1, &block); end + # source://rubocop-ast/1.32.3/lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def text(*_arg0, **_arg1, &_arg2); end # A magic comment can contain one value (normal style) or # multiple directives (emacs style) @@ -39881,8 +40226,10 @@ RuboCop::Cop::Style::MapCompactWithConditionalBlock::RESTRICT_ON_SEND = T.let(T. # 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. +# NOTE: It only detects when the mapping destination is either: +# * a local variable initialized as an empty array and referred to only by the +# pushing operation; +# * or, if it is the single block argument to a `[].tap` block. # This is because, if not, it's challenging to statically guarantee that the # mapping destination variable remains an empty array: # @@ -39904,74 +40251,93 @@ RuboCop::Cop::Style::MapCompactWithConditionalBlock::RESTRICT_ON_SEND = T.let(T. # # good # dest = src.map { |e| e * 2 } # +# # bad +# [].tap do |dest| +# src.each { |e| dest << e * 2 } +# end +# +# # 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 +# source://rubocop//lib/rubocop/cop/style/map_into_array.rb#60 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 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#104 def after_leaving_scope(scope, _variable_table); end - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#57 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#67 def each_block_with_push?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#66 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#76 def empty_array_asgn?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#69 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#88 + def empty_array_tap(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#98 def lvar_ref?(param0 = T.unsafe(nil), param1); end - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#79 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#108 def on_block(node); end - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#79 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#108 def on_numblock(node); end private - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#155 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#208 def correct_push_node(corrector, push_node); end - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#163 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#216 def correct_return_value_handling(corrector, block, dest_var); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#108 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#151 def dest_used_only_for_mapping?(block, dest_var, asgn); end - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#102 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#145 def find_closest_assignment(block, dest_var); end - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#94 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#128 def find_dest_var(block); end - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#127 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#176 def new_method_name; end - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#116 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#136 + def offending_empty_array_tap?(node, dest_var); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#159 def register_offense(block, dest_var, asgn); end - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#148 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#195 def remove_assignment(corrector, asgn); end + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#202 + def remove_tap(corrector, node, block_node); end + # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#133 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#182 def return_value_used?(node); end class << self - # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#71 + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#100 def joining_forces; end end end -# source://rubocop//lib/rubocop/cop/style/map_into_array.rb#54 +# source://rubocop//lib/rubocop/cop/style/map_into_array.rb#64 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 @@ -40257,6 +40623,7 @@ class RuboCop::Cop::Style::MethodCallWithArgsParentheses < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedMethods include ::RuboCop::Cop::AllowedPattern include ::RuboCop::Cop::Style::MethodCallWithArgsParentheses::RequireParentheses + include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses extend ::RuboCop::Cop::AutoCorrector @@ -40292,114 +40659,116 @@ end # # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#9 module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses + include ::RuboCop::Cop::RangeHelp + private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#75 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#80 def allowed_camel_case_method_call?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#179 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#184 def allowed_chained_call_with_parentheses?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#175 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#180 def allowed_multiline_call_with_parentheses?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#80 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#85 def allowed_string_interpolation_method_call?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#188 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#193 def ambiguous_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#217 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#222 def assigned_before?(node, target); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#225 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#230 def assignment_in_condition?(node); end - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#32 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#34 def autocorrect(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#156 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#161 def call_as_argument_or_chain?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#149 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#154 def call_in_argument_with_block?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#105 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#110 def call_in_literals?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#116 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#121 def call_in_logical_operators?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#162 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#167 def call_in_match_pattern?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#125 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#130 def call_in_optional_arguments?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#129 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#134 def call_in_single_line_inheritance?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#133 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#138 def call_with_ambiguous_arguments?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#145 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#150 def call_with_braced_block?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#235 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#240 def forwards_anonymous_rest_arguments?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#204 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#209 def hash_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#168 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#173 def hash_literal_in_arguments?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#45 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#50 def inside_endless_method_def?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#221 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#226 def inside_string_interpolation?(node); end # Require hash value omission be enclosed in parentheses to prevent the following issue: @@ -40407,75 +40776,75 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#59 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#64 def last_expression?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#92 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#97 def legitimate_call_with_parentheses?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#200 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#205 def logical_operator?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#67 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#72 def method_call_before_constant_resolution?(node); end - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#41 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#46 def offense_range(node); end - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#16 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#18 def omit_parentheses(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#85 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#90 def parentheses_at_the_end_of_multiline_call?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#208 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#213 def regexp_slash_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#50 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#55 def require_parentheses_for_hash_value_omission?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#192 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#197 def splat?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#71 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#76 def super_call_without_arguments?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#63 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#68 def syntax_like_method_call?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#196 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#201 def ternary_if?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#212 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#217 def unary_literal?(node); end end -# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#11 +# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#13 RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses::OMIT_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#10 +# source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#12 RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses::TRAILING_WHITESPACE_REGEX = T.let(T.unsafe(nil), Regexp) # Style require_parentheses @@ -40511,8 +40880,8 @@ RuboCop::Cop::Style::MethodCallWithArgsParentheses::RequireParentheses::REQUIRE_ # Checks for unwanted parentheses in parameterless method calls. # -# This cop can be customized allowed methods with `AllowedMethods`. -# By default, there are no methods to allowed. +# This cop's allowed methods can be customized with `AllowedMethods`. +# By default, there are no allowed methods. # # NOTE: This cop allows the use of `it()` without arguments in blocks, # as in `0.times { it() }`, following `Lint/ItWithoutArgumentsInBlock` cop. @@ -41368,7 +41737,6 @@ RuboCop::Cop::Style::MultilineBlockChain::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Style::MultilineIfModifier < ::RuboCop::Cop::Base include ::RuboCop::Cop::Alignment include ::RuboCop::Cop::LineLengthHelp - include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::StatementModifier extend ::RuboCop::Cop::AutoCorrector @@ -41765,58 +42133,53 @@ class RuboCop::Cop::Style::MultipleComparison < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#62 def on_or(node); end - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#88 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#86 def simple_comparison_lhs?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#93 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#91 def simple_comparison_rhs?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#85 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#83 def simple_double_comparison?(param0 = T.unsafe(nil)); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#161 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#153 def allow_method_comparison?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#136 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#134 def comparison?(node); end - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#165 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#157 def comparisons_threshold; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#128 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#126 def nested_comparison?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#97 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#95 def nested_variable_comparison?(node); end - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#156 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#148 def reset_comparison; end - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#140 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#138 def root_of_or_node(or_node); end - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#150 - def switch_comparison?(node); end - - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#124 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#122 def variable_name(node); end - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#103 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#101 def variables_in_node(node); end - # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#111 + # source://rubocop//lib/rubocop/cop/style/multiple_comparison.rb#109 def variables_in_simple_node(node); end end @@ -41899,7 +42262,7 @@ class RuboCop::Cop::Style::MutableConstant < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-sorbet/0.8.5/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#18 + # source://rubocop-sorbet/0.8.6/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 @@ -41917,7 +42280,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.5/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#12 + # source://rubocop-sorbet/0.8.6/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#12 def t_let(param0 = T.unsafe(nil)); end private @@ -43161,8 +43524,8 @@ RuboCop::Cop::Style::NumericLiterals::MSG = T.let(T.unsafe(nil), String) # These can be replaced by their respective predicate methods. # This cop can also be configured to do the reverse. # -# This cop can be customized allowed methods with `AllowedMethods`. -# By default, there are no methods to allowed. +# This cop's allowed methods can be customized with `AllowedMethods`. +# By default, there are no allowed methods. # # This cop disregards `#nonzero?` as its value is truthy or falsey, # but not `true` and `false`, and thus not always interchangeable with @@ -43373,42 +43736,42 @@ class RuboCop::Cop::Style::OneLineConditional < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#77 + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#81 def always_multiline?; end - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#59 + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#63 def autocorrect(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#81 + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#85 def cannot_replace_to_ternary?(node); end - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#93 + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#97 def expr_replacement(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#114 + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#118 def keyword_with_changed_precedence?(node); end - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#55 + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#59 def message(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#107 + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#111 def method_call_with_changed_precedence?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#99 + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#103 def requires_parentheses?(node); end - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#67 + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#71 def ternary_correction(node); end - # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#85 + # source://rubocop//lib/rubocop/cop/style/one_line_conditional.rb#89 def ternary_replacement(node); end end @@ -43474,27 +43837,35 @@ RuboCop::Cop::Style::OpenStructUse::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Style::OperatorMethodCall < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#27 + # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#30 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#53 - def anonymous_forwarding?(argument); end + # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#75 + def insert_space_after?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#58 + def invalid_syntax_argument?(argument); end # Checks for an acceptable case of `foo.+(bar).baz`. # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#47 + # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#52 def method_call_with_parenthesized_arg?(argument); end - # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#60 + # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#64 def wrap_in_parentheses_if_chained(corrector, node); end end +# source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#25 +RuboCop::Cop::Style::OperatorMethodCall::INVALID_SYNTAX_ARG_TYPES = T.let(T.unsafe(nil), Array) + # source://rubocop//lib/rubocop/cop/style/operator_method_call.rb#23 RuboCop::Cop::Style::OperatorMethodCall::MSG = T.let(T.unsafe(nil), String) @@ -43844,14 +44215,14 @@ class RuboCop::Cop::Style::ParallelAssignment::GenericCorrector private - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#233 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#234 def cop_config; end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#229 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#230 def extract_sources(node); end # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#219 - def source(node); end + def source(node, loc); end end # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#29 @@ -43860,37 +44231,37 @@ RuboCop::Cop::Style::ParallelAssignment::MSG = T.let(T.unsafe(nil), String) # An internal class for correcting parallel assignment # guarded by if, unless, while, or until # -# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#275 +# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#276 class RuboCop::Cop::Style::ParallelAssignment::ModifierCorrector < ::RuboCop::Cop::Style::ParallelAssignment::GenericCorrector - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#276 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#277 def correction; end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#285 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#286 def correction_range; end private - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#291 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#292 def modifier_range(node); end end # An internal class for correcting parallel assignment # protected by rescue # -# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#240 +# source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#241 class RuboCop::Cop::Style::ParallelAssignment::RescueCorrector < ::RuboCop::Cop::Style::ParallelAssignment::GenericCorrector - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#241 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#242 def correction; end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#252 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#253 def correction_range; end private - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#263 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#264 def begin_correction(rescue_result); end - # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#258 + # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#259 def def_correction(rescue_result); end end @@ -44333,7 +44704,7 @@ class RuboCop::Cop::Style::QuotedSymbols < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#108 + # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#106 def alternative_style; end # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#71 @@ -44354,7 +44725,7 @@ class RuboCop::Cop::Style::QuotedSymbols < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#112 + # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#110 def quoted?(sym_node); end # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#99 @@ -44362,7 +44733,7 @@ class RuboCop::Cop::Style::QuotedSymbols < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#116 + # source://rubocop//lib/rubocop/cop/style/quoted_symbols.rb#114 def wrong_quotes?(node); end end @@ -44795,81 +45166,86 @@ class RuboCop::Cop::Style::RedundantBegin < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#72 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#76 def offensive_kwbegins(param0); end - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#84 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#88 def on_block(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#76 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#80 def on_def(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#76 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#80 def on_defs(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#95 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#99 def on_kwbegin(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#84 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#88 def on_numblock(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#103 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#107 def allowable_kwbegin?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#177 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#181 def begin_block_has_multiline_statements?(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#169 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#173 def condition_range(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#181 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#185 def contain_rescue_or_ensure?(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#162 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#166 def correct_modifier_form_after_multiline_begin_block(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#173 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#177 def empty_begin?(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#110 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#114 def register_offense(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#139 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#143 def remove_begin(corrector, offense_range, node); end - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#127 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#131 def replace_begin_with_statement(corrector, offense_range, node); end # Restore comments that occur between "begin" and "first_child". # These comments will be moved to above the assignment line. # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#149 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#153 def restore_removed_comments(corrector, offense_range, node, first_child); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#156 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#160 def use_modifier_form_after_multiline_begin_block?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#194 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#198 def valid_begin_assignment?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#187 + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#191 def valid_context_using_only_begin?(node); end + + class << self + # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#71 + def autocorrect_incompatible_with; end + end end # source://rubocop//lib/rubocop/cop/style/redundant_begin.rb#69 @@ -44941,7 +45317,7 @@ class RuboCop::Cop::Style::RedundantCondition < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#42 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#43 def on_if(node); end private @@ -44951,106 +45327,106 @@ class RuboCop::Cop::Style::RedundantCondition < ::RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#166 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#167 def argument_with_operator?(argument); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#141 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#142 def asgn_type?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#131 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#132 def branches_have_assignment?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#145 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#146 def branches_have_method?(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#239 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#240 def correct_ternary(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#186 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#187 def else_source(else_branch, arithmetic_operation); end - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#212 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#213 def else_source_if_has_assignment(else_branch); end - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#202 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#203 def else_source_if_has_method(else_branch); end - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#174 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#175 def if_source(if_branch, arithmetic_operation); end - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#222 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#223 def make_ternary_form(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#63 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#64 def message(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#78 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#79 def offense?(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#71 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#72 def range_of_offense(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#87 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#88 def redundant_condition?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#254 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#255 def require_braces?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#247 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#248 def require_parentheses?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#160 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#161 def same_method?(if_branch, else_branch); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#154 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#155 def single_argument_method?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#103 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#104 def synonymous_condition_and_branch?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#258 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#259 def use_arithmetic_operation?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#99 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#100 def use_hash_key_access?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#95 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#96 def use_hash_key_assignment?(else_branch); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#91 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#92 def use_if_branch?(else_branch); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#262 + # source://rubocop//lib/rubocop/cop/style/redundant_condition.rb#263 def without_argument_parentheses_method?(node); end end @@ -45910,6 +46286,37 @@ end # source://rubocop//lib/rubocop/cop/style/redundant_interpolation.rb#43 RuboCop::Cop::Style::RedundantInterpolation::MSG = T.let(T.unsafe(nil), String) +# Before Ruby 3.0, interpolated strings followed the frozen string literal +# magic comment which sometimes made it necessary to explicitly unfreeze them. +# Ruby 3.0 changed interpolated strings to always be unfrozen which makes +# unfreezing them redundant. +# +# @example +# # bad +# +"#{foo} bar" +# +# # bad +# "#{foo} bar".dup +# +# # good +# "#{foo} bar" +# +# source://rubocop//lib/rubocop/cop/style/redundant_interpolation_unfreeze.rb#21 +class RuboCop::Cop::Style::RedundantInterpolationUnfreeze < ::RuboCop::Cop::Base + include ::RuboCop::Cop::FrozenStringLiteral + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + + # source://rubocop//lib/rubocop/cop/style/redundant_interpolation_unfreeze.rb#32 + def on_send(node); end +end + +# source://rubocop//lib/rubocop/cop/style/redundant_interpolation_unfreeze.rb#26 +RuboCop::Cop::Style::RedundantInterpolationUnfreeze::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/redundant_interpolation_unfreeze.rb#28 +RuboCop::Cop::Style::RedundantInterpolationUnfreeze::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Check for redundant line continuation. # # This cop marks a line continuation as redundant if removing the backslash @@ -45998,7 +46405,7 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base def ends_with_backslash_without_comment?(source_line); end # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#163 - def find_node_for_line(line); end + def find_node_for_line(last_line); end # @return [Boolean] # @@ -46369,38 +46776,39 @@ RuboCop::Cop::Style::RedundantPercentQ::STRING_INTERPOLATION_REGEXP = T.let(T.un # # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#35 class RuboCop::Cop::Style::RedundantRegexpArgument < ::RuboCop::Cop::Base + include ::RuboCop::Cop::StringLiteralsHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#47 + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#48 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#47 + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#48 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#64 + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#65 def determinist_regexp?(regexp_node); end - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#68 + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#69 def preferred_argument(regexp_node); end - # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#81 + # source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#84 def replacement(regexp_node); end end -# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#42 +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#43 RuboCop::Cop::Style::RedundantRegexpArgument::DETERMINISTIC_REGEX = T.let(T.unsafe(nil), Regexp) -# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#38 +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#39 RuboCop::Cop::Style::RedundantRegexpArgument::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#39 +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#40 RuboCop::Cop::Style::RedundantRegexpArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#43 +# source://rubocop//lib/rubocop/cop/style/redundant_regexp_argument.rb#44 RuboCop::Cop::Style::RedundantRegexpArgument::STR_SPECIAL_CHARS = T.let(T.unsafe(nil), Array) # Checks for unnecessary single-element Regexp character classes. @@ -47605,6 +48013,9 @@ class RuboCop::Cop::Style::RescueModifier < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#70 def correct_rescue_block(corrector, node, parenthesized); end + # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#96 + def heredoc_end(node); end + # source://rubocop//lib/rubocop/cop/style/rescue_modifier.rb#86 def indentation_and_offset(node, parenthesized); end @@ -47791,7 +48202,8 @@ RuboCop::Cop::Style::ReturnNil::RETURN_MSG = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/style/return_nil.rb#40 RuboCop::Cop::Style::ReturnNil::RETURN_NIL_MSG = T.let(T.unsafe(nil), String) -# Checks if `return` or `return nil` is used in predicate method definitions. +# Checks for predicate method definitions that return `nil`. +# A predicate method should only return a boolean value. # # @example # # bad @@ -47814,6 +48226,24 @@ RuboCop::Cop::Style::ReturnNil::RETURN_NIL_MSG = T.let(T.unsafe(nil), String) # # do_something? # end +# +# # bad +# def foo? +# if condition +# nil +# else +# true +# end +# end +# +# # good +# def foo? +# if condition +# false +# else +# true +# end +# end # @example AllowedMethods: ['foo?'] # # good # def foo? @@ -47829,31 +48259,48 @@ RuboCop::Cop::Style::ReturnNil::RETURN_NIL_MSG = T.let(T.unsafe(nil), String) # do_something? # end # -# source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#50 +# source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#69 class RuboCop::Cop::Style::ReturnNilInPredicateMethodDefinition < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedMethods include ::RuboCop::Cop::AllowedPattern extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#62 + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#81 def on_def(node); end - # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#62 + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#81 def on_defs(node); end - # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#58 + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#77 def return_nil?(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#79 - def nil_node_at_the_end_of_method_body(body); end + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#128 + def handle_if(if_node); end + + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#113 + def handle_implicit_return_values(node); end + + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#122 + def handle_nil(nil_node); end - # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#87 + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#118 + def handle_return(return_node); end + + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#94 + def last_node_of_type(node, type); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#103 + def node_type?(node, type); end + + # source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#107 def register_offense(offense_node, replacement); end end -# source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#55 +# source://rubocop//lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#74 RuboCop::Cop::Style::ReturnNilInPredicateMethodDefinition::MSG = T.let(T.unsafe(nil), String) # Transforms usages of a method call safeguarded by a non `nil` @@ -47870,9 +48317,9 @@ RuboCop::Cop::Style::ReturnNilInPredicateMethodDefinition::MSG = T.let(T.unsafe( # `foo&.bar` can start returning `nil` as well as what the method # returns. # -# The default for `MaxChainLength` is `2` +# The default for `MaxChainLength` is `2`. # We have limited the cop to not register an offense for method chains -# that exceed this option is set. +# that exceed this option's value. # # @example # # bad @@ -47932,6 +48379,9 @@ class RuboCop::Cop::Style::SafeNavigation < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#128 + def and_inside_begin?(param0 = T.unsafe(nil)); end + # if format: (if checked_variable body nil) # unless format: (if checked_variable nil body) # @@ -47941,96 +48391,104 @@ class RuboCop::Cop::Style::SafeNavigation < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#125 def not_nil_check?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#133 + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#149 def on_and(node); end - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#127 + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#133 def on_if(node); end + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#173 + def report_offense(node, rhs, rhs_receiver, *removal_ranges, offense_range: T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#131 + def strip_begin(param0 = T.unsafe(nil)); end + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#114 def ternary_safe_navigation_candidate(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#307 + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#348 def add_safe_nav_to_all_methods_in_chain(corrector, start_method, method_chain); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#200 + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#265 def allowed_if_condition?(node); end - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#154 - def autocorrect(corrector, node); end + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#210 + def and_parts(node); end - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#299 + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#340 def begin_range(node, method_call); end - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#261 + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#302 def chain_length(method_chain, method); end - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#139 - def check_node(node); end + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#192 + def collect_and_clauses(node); end - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#181 + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#246 def comments(node); end - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#303 - def end_range(node, method_call); end + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#204 + def concat_nodes(nodes, and_node); end - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#166 - def extract_body(node); end + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#344 + def end_range(node, method_call); end - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#243 + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#284 def extract_common_parts(method_chain, checked_variable); end - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#209 - def extract_parts(node); end - - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#233 - def extract_parts_from_and(node); end + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#231 + def extract_if_body(node); end - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#218 + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#269 def extract_parts_from_if(node); end - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#251 + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#292 def find_matching_receiver_invocation(method_chain, checked_variable); end - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#174 + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#186 + def find_method_chain(node); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#239 def handle_comments(corrector, node, method_call); end - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#320 + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#362 def max_chain_length; end - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#204 - def method_call(node); end - # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#295 + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#336 def method_called?(send_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#287 + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#328 def negated?(send_node); end - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#187 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#217 + def offending_node?(node, lhs_receiver, rhs, rhs_receiver); end + + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#252 def relevant_comment_ranges(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#281 + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#322 def unsafe_method?(send_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#269 + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#310 def unsafe_method_used?(method_chain, method); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#150 + # source://rubocop//lib/rubocop/cop/style/safe_navigation.rb#227 def use_var_only_in_unless_modifier?(node, variable); end end @@ -48134,7 +48592,7 @@ RuboCop::Cop::Style::Sample::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # See https://bugs.ruby-lang.org/issues/17030 # # @example -# # bad (select or find_all) +# # bad (select, filter, or find_all) # array.select { |x| x.match? /regexp/ } # array.select { |x| /regexp/.match?(x) } # array.select { |x| x =~ /regexp/ } @@ -48155,53 +48613,53 @@ class RuboCop::Cop::Style::SelectByRegexp < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#79 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#81 def calls_lvar?(param0 = T.unsafe(nil), param1); end # Returns true if a node appears to return a hash # - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#65 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#67 def creates_hash?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#74 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#76 def env_const?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#88 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#90 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#88 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#90 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#56 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#58 def regexp_match?(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#133 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#136 def extract_send_node(block_node); end - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#146 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#149 def find_regexp(node, block); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#157 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#160 def match_predicate_without_receiver?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#142 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#145 def opposite?(regexp_method_send_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#107 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#110 def receiver_allowed?(node); end - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#121 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#124 def register_offense(node, block_node, regexp, replacement); end - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#113 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#116 def replacement(regexp_method_send_node, node); end end @@ -48211,7 +48669,7 @@ RuboCop::Cop::Style::SelectByRegexp::MSG = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#52 RuboCop::Cop::Style::SelectByRegexp::OPPOSITE_REPLACEMENTS = T.let(T.unsafe(nil), Hash) -# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#53 +# source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#55 RuboCop::Cop::Style::SelectByRegexp::REGEXP_METHODS = T.let(T.unsafe(nil), Set) # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#51 @@ -51657,7 +52115,6 @@ RuboCop::Cop::Style::WhileUntilDo::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Style::WhileUntilModifier < ::RuboCop::Cop::Base include ::RuboCop::Cop::Alignment include ::RuboCop::Cop::LineLengthHelp - include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::StatementModifier extend ::RuboCop::Cop::AutoCorrector @@ -52243,138 +52700,138 @@ end # first the ones needed for autocorrection (if any), then the rest # (unless autocorrections happened). # -# source://rubocop//lib/rubocop/cop/team.rb#12 +# source://rubocop//lib/rubocop/cop/team.rb#13 class RuboCop::Cop::Team # @return [Team] a new instance of Team # - # source://rubocop//lib/rubocop/cop/team.rb#55 + # source://rubocop//lib/rubocop/cop/team.rb#61 def initialize(cops, config = T.unsafe(nil), options = T.unsafe(nil)); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/team.rb#66 + # source://rubocop//lib/rubocop/cop/team.rb#72 def autocorrect?; end # Returns the value of attribute cops. # - # source://rubocop//lib/rubocop/cop/team.rb#51 + # source://rubocop//lib/rubocop/cop/team.rb#57 def cops; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/team.rb#70 + # source://rubocop//lib/rubocop/cop/team.rb#76 def debug?; end # Returns the value of attribute errors. # - # source://rubocop//lib/rubocop/cop/team.rb#51 + # source://rubocop//lib/rubocop/cop/team.rb#57 def errors; end - # source://rubocop//lib/rubocop/cop/team.rb#122 + # source://rubocop//lib/rubocop/cop/team.rb#128 def external_dependency_checksum; end # @deprecated # - # source://rubocop//lib/rubocop/cop/team.rb#114 + # source://rubocop//lib/rubocop/cop/team.rb#120 def forces; end - # source://rubocop//lib/rubocop/cop/team.rb#76 + # source://rubocop//lib/rubocop/cop/team.rb#82 def inspect_file(processed_source); end # @return [Commissioner::InvestigationReport] # - # source://rubocop//lib/rubocop/cop/team.rb#85 + # source://rubocop//lib/rubocop/cop/team.rb#91 def investigate(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end # Returns the value of attribute updated_source_file. # - # source://rubocop//lib/rubocop/cop/team.rb#51 + # source://rubocop//lib/rubocop/cop/team.rb#57 def updated_source_file; end # Returns the value of attribute updated_source_file. # - # source://rubocop//lib/rubocop/cop/team.rb#51 + # source://rubocop//lib/rubocop/cop/team.rb#57 def updated_source_file?; end # Returns the value of attribute warnings. # - # source://rubocop//lib/rubocop/cop/team.rb#51 + # source://rubocop//lib/rubocop/cop/team.rb#57 def warnings; end private - # source://rubocop//lib/rubocop/cop/team.rb#129 + # source://rubocop//lib/rubocop/cop/team.rb#139 def autocorrect(processed_source, report, original:, offset:); end - # source://rubocop//lib/rubocop/cop/team.rb#193 + # source://rubocop//lib/rubocop/cop/team.rb#203 def autocorrect_report(report, offset:, original:); end - # source://rubocop//lib/rubocop/cop/team.rb#148 + # source://rubocop//lib/rubocop/cop/team.rb#158 def be_ready; end - # source://rubocop//lib/rubocop/cop/team.rb#199 + # source://rubocop//lib/rubocop/cop/team.rb#209 def collate_corrections(report, offset:, original:); end - # source://rubocop//lib/rubocop/cop/team.rb#215 + # source://rubocop//lib/rubocop/cop/team.rb#225 def each_corrector(report); end - # source://rubocop//lib/rubocop/cop/team.rb#267 + # source://rubocop//lib/rubocop/cop/team.rb#277 def handle_error(error, location, cop); end - # source://rubocop//lib/rubocop/cop/team.rb#259 + # source://rubocop//lib/rubocop/cop/team.rb#269 def handle_warning(error, location); end # @return [Commissioner::InvestigationReport] # - # source://rubocop//lib/rubocop/cop/team.rb#162 + # source://rubocop//lib/rubocop/cop/team.rb#172 def investigate_partial(cops, processed_source, offset:, original:); end - # source://rubocop//lib/rubocop/cop/team.rb#242 + # source://rubocop//lib/rubocop/cop/team.rb#252 def process_errors(file, errors); end - # source://rubocop//lib/rubocop/cop/team.rb#156 + # source://rubocop//lib/rubocop/cop/team.rb#166 def reset; end # @return [Array<cop>] # - # source://rubocop//lib/rubocop/cop/team.rb#168 + # source://rubocop//lib/rubocop/cop/team.rb#178 def roundup_relevant_cops(processed_source); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/team.rb#184 + # source://rubocop//lib/rubocop/cop/team.rb#194 def support_target_rails_version?(cop); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/team.rb#178 + # source://rubocop//lib/rubocop/cop/team.rb#188 def support_target_ruby_version?(cop); end - # source://rubocop//lib/rubocop/cop/team.rb#230 + # source://rubocop//lib/rubocop/cop/team.rb#240 def suppress_clobbering; end - # source://rubocop//lib/rubocop/cop/team.rb#236 + # source://rubocop//lib/rubocop/cop/team.rb#246 def validate_config; end class << self # @return [Array<Force>] needed for the given cops # - # source://rubocop//lib/rubocop/cop/team.rb#37 + # source://rubocop//lib/rubocop/cop/team.rb#43 def forces_for(cops); end # @return [Team] with cops assembled from the given `cop_classes` # - # source://rubocop//lib/rubocop/cop/team.rb#22 + # source://rubocop//lib/rubocop/cop/team.rb#28 def mobilize(cop_classes, config, options = T.unsafe(nil)); end # @return [Array<Cop::Base>] # - # source://rubocop//lib/rubocop/cop/team.rb#28 + # source://rubocop//lib/rubocop/cop/team.rb#34 def mobilize_cops(cop_classes, config, options = T.unsafe(nil)); end # @return [Team] # - # source://rubocop//lib/rubocop/cop/team.rb#14 + # source://rubocop//lib/rubocop/cop/team.rb#15 def new(cop_or_classes, config, options = T.unsafe(nil)); end end end @@ -54697,11 +55154,16 @@ module RuboCop::FileFinder # source://rubocop//lib/rubocop/file_finder.rb#20 def find_last_file_upwards(filename, start_dir, stop_dir = T.unsafe(nil)); end + # @api private + # + # source://rubocop//lib/rubocop/file_finder.rb#26 + def traverse_directories_upwards(start_dir, stop_dir = T.unsafe(nil)); end + private # @api private # - # source://rubocop//lib/rubocop/file_finder.rb#28 + # source://rubocop//lib/rubocop/file_finder.rb#36 def traverse_files_upwards(filename, start_dir, stop_dir); end class << self @@ -55525,40 +55987,92 @@ end # This formatter formats the report data in JUnit format. # -# source://rubocop//lib/rubocop/formatter/junit_formatter.rb#17 +# source://rubocop//lib/rubocop/formatter/junit_formatter.rb#15 class RuboCop::Formatter::JUnitFormatter < ::RuboCop::Formatter::BaseFormatter # @return [JUnitFormatter] a new instance of JUnitFormatter # - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#18 + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#24 def initialize(output, options = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#55 - def add_testcase_element_to_testsuite_element(file, target_offenses, cop); end - - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#64 - def classname_attribute_value(file); end - - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#29 + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#32 def file_finished(file, offenses); end - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#71 + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#51 def finished(_inspected_files); end - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#51 + private + + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#106 + def add_failure_to(testcase, offenses, cop_name); end + + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#85 + def add_testcase_element_to_testsuite_element(file, target_offenses, cop); end + + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#94 + def classname_attribute_value(file); end + + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#81 def offenses_for_cop(all_offenses, cop); end # @return [Boolean] # - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#47 + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#77 def relevant_for_output?(options, target_offenses); end - private + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#101 + def reset_count; end - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#83 - def add_failure_to(testcase, offenses, cop_name); end + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#118 + def xml_escape(string); end +end - # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#78 - def reset_count; end +# source://rubocop//lib/rubocop/formatter/junit_formatter.rb#16 +RuboCop::Formatter::JUnitFormatter::ESCAPE_MAP = T.let(T.unsafe(nil), Hash) + +# source://rubocop//lib/rubocop/formatter/junit_formatter.rb#132 +class RuboCop::Formatter::JUnitFormatter::FailureElement + # @return [FailureElement] a new instance of FailureElement + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#135 + def initialize(type:, message:, text:); end + + # Returns the value of attribute message. + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#133 + def message; end + + # Returns the value of attribute text. + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#133 + def text; end + + # Returns the value of attribute type. + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#133 + def type; end +end + +# source://rubocop//lib/rubocop/formatter/junit_formatter.rb#122 +class RuboCop::Formatter::JUnitFormatter::TestCaseElement + # @return [TestCaseElement] a new instance of TestCaseElement + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#125 + def initialize(classname:, name:); end + + # Returns the value of attribute classname. + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#123 + def classname; end + + # Returns the value of attribute failures. + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#123 + def failures; end + + # Returns the value of attribute name. + # + # source://rubocop//lib/rubocop/formatter/junit_formatter.rb#123 + def name; end end # This formatter displays the report data in markdown @@ -55965,227 +56479,6 @@ module RuboCop::LSP end end -# Log for Language Server Protocol of RuboCop. -# -# @api private -# -# source://rubocop//lib/rubocop/lsp/logger.rb#16 -class RuboCop::LSP::Logger - class << self - # @api private - # - # source://rubocop//lib/rubocop/lsp/logger.rb#17 - def log(message); end - end -end - -# Routes for Language Server Protocol of RuboCop. -# -# @api private -# -# source://rubocop//lib/rubocop/lsp/routes.rb#18 -class RuboCop::LSP::Routes - # @api private - # @return [Routes] a new instance of Routes - # - # source://rubocop//lib/rubocop/lsp/routes.rb#25 - def initialize(server); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/routes.rb#31 - def for(name); end - - # source://rubocop//lib/rubocop/lsp/routes.rb#38 - def handle_initialize(request); end - - # source://rubocop//lib/rubocop/lsp/routes.rb#57 - def handle_initialized(_request); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/routes.rb#167 - def handle_method_missing(request); end - - # source://rubocop//lib/rubocop/lsp/routes.rb#64 - def handle_shutdown(request); end - - # @api private - # - # 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#205 - def diagnostic(file_uri, text); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/routes.rb#175 - def extract_initialization_options_from(request); end - - # @api private - # - # 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#219 - def remove_file_protocol_from(uri); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/routes.rb#223 - def to_diagnostic(offense); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/routes.rb#235 - def to_range(location); end - - class << self - private - - # @api private - # - # source://rubocop//lib/rubocop/lsp/routes.rb#19 - def handle(name, &block); end - end -end - -# Runtime for Language Server Protocol of RuboCop. -# -# @api private -# -# source://rubocop//lib/rubocop/lsp/runtime.rb#16 -class RuboCop::LSP::Runtime - # @api private - # @return [Runtime] a new instance of Runtime - # - # source://rubocop//lib/rubocop/lsp/runtime.rb#19 - def initialize(config_store); end - - # This abuses the `--stdin` option of rubocop and reads the formatted text - # from the `options[:stdin]` that rubocop mutates. This depends on - # `parallel: false` as well as the fact that RuboCop doesn't otherwise dup - # or reassign that options object. Risky business! - # - # Reassigning `options[:stdin]` is done here: - # https://github.com/rubocop/rubocop/blob/v1.52.0/lib/rubocop/cop/team.rb#L131 - # Printing `options[:stdin]` - # https://github.com/rubocop/rubocop/blob/v1.52.0/lib/rubocop/cli/command/execute_runner.rb#L95 - # Setting `parallel: true` would break this here: - # https://github.com/rubocop/rubocop/blob/v1.52.0/lib/rubocop/runner.rb#L72 - # - # @api private - # - # source://rubocop//lib/rubocop/lsp/runtime.rb#38 - def format(path, text, command:); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/runtime.rb#17 - def layout_mode=(_arg0); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/runtime.rb#17 - def lint_mode=(_arg0); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/runtime.rb#55 - def offenses(path, text); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/runtime.rb#17 - def safe_autocorrect=(_arg0); end - - private - - # @api private - # - # source://rubocop//lib/rubocop/lsp/runtime.rb#77 - def config_only_options; end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/runtime.rb#84 - def redirect_stdout(&block); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/runtime.rb#92 - def run_rubocop(options, path); end -end - -# Language Server Protocol of RuboCop. -# -# @api private -# -# source://rubocop//lib/rubocop/lsp/server.rb#22 -class RuboCop::LSP::Server - # @api private - # @return [Server] a new instance of Server - # - # source://rubocop//lib/rubocop/lsp/server.rb#23 - def initialize(config_store); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/server.rb#61 - def configure(options); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/server.rb#53 - def format(path, text, command:); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/server.rb#57 - def offenses(path, text); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/server.rb#34 - def start; end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/server.rb#67 - def stop(&block); end - - # @api private - # - # source://rubocop//lib/rubocop/lsp/server.rb#49 - def write(response); end -end - -# Severity for Language Server Protocol of RuboCop. -# -# @api private -# -# source://rubocop//lib/rubocop/lsp/severity.rb#7 -class RuboCop::LSP::Severity - class << self - # @api private - # - # source://rubocop//lib/rubocop/lsp/severity.rb#17 - def find_by(rubocop_severity); end - end -end - -# @api private -# -# source://rubocop//lib/rubocop/lsp/severity.rb#8 -RuboCop::LSP::Severity::SEVERITIES = T.let(T.unsafe(nil), Hash) - # Encapsulation of a lockfile for use when checking for gems. # Does not actually resolve gems, just parses the lockfile. # @@ -56236,17 +56529,17 @@ class RuboCop::Lockfile private - # @api private - # @return [Boolean] - # - # 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#72 def parser; end + + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/lockfile.rb#85 + def use_bundler_lock_parser?; end end # Parse different formats of magic comments. @@ -57128,12 +57421,12 @@ class RuboCop::RemoteConfig # @api private # - # source://rubocop//lib/rubocop/remote_config.rb#19 + # source://rubocop//lib/rubocop/remote_config.rb#23 def file; end # @api private # - # source://rubocop//lib/rubocop/remote_config.rb#32 + # source://rubocop//lib/rubocop/remote_config.rb#36 def inherit_from_remote(file, path); end # @api private @@ -57145,46 +57438,46 @@ class RuboCop::RemoteConfig # @api private # - # source://rubocop//lib/rubocop/remote_config.rb#95 + # source://rubocop//lib/rubocop/remote_config.rb#99 def cache_name_from_uri; end # @api private # - # source://rubocop//lib/rubocop/remote_config.rb#78 + # source://rubocop//lib/rubocop/remote_config.rb#82 def cache_path; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/remote_config.rb#82 + # source://rubocop//lib/rubocop/remote_config.rb#86 def cache_path_exists?; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/remote_config.rb#86 + # source://rubocop//lib/rubocop/remote_config.rb#90 def cache_path_expired?; end # @api private # - # source://rubocop//lib/rubocop/remote_config.rb#101 + # source://rubocop//lib/rubocop/remote_config.rb#105 def cloned_url; end # @api private # @yield [request] # - # source://rubocop//lib/rubocop/remote_config.rb#53 + # source://rubocop//lib/rubocop/remote_config.rb#57 def generate_request(uri); end # @api private # - # source://rubocop//lib/rubocop/remote_config.rb#62 + # source://rubocop//lib/rubocop/remote_config.rb#66 def handle_response(response, limit, &block); end # @api private # @raise [ArgumentError] # - # source://rubocop//lib/rubocop/remote_config.rb#40 + # source://rubocop//lib/rubocop/remote_config.rb#44 def request(uri = T.unsafe(nil), limit = T.unsafe(nil), &block); end end @@ -57247,7 +57540,7 @@ class RuboCop::ResultCache # # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#236 + # source://rubocop//lib/rubocop/result_cache.rb#229 def context_checksum(team, options); end # @api private @@ -57287,14 +57580,6 @@ class RuboCop::ResultCache # source://rubocop//lib/rubocop/result_cache.rb#142 def symlink_protection_triggered?(path); end - # The external dependency checksums are cached per RuboCop team so that - # the checksums don't need to be recomputed for each file. - # - # @api private - # - # source://rubocop//lib/rubocop/result_cache.rb#227 - def team_checksum(team); end - class << self # @api private # @return [Boolean] @@ -57440,10 +57725,10 @@ class RuboCop::Runner # @return [Boolean] # - # source://rubocop//lib/rubocop/runner.rb#427 + # source://rubocop//lib/rubocop/runner.rb#430 def considered_failure?(offense); end - # source://rubocop//lib/rubocop/runner.rb#460 + # source://rubocop//lib/rubocop/runner.rb#463 def default_config(cop_name); end # source://rubocop//lib/rubocop/runner.rb#276 @@ -57472,16 +57757,16 @@ class RuboCop::Runner # source://rubocop//lib/rubocop/runner.rb#244 def file_started(file); end - # source://rubocop//lib/rubocop/runner.rb#407 + # source://rubocop//lib/rubocop/runner.rb#410 def filter_cop_classes(cop_classes, config); end # source://rubocop//lib/rubocop/runner.rb#108 def find_target_files(paths); end - # source://rubocop//lib/rubocop/runner.rb#418 + # source://rubocop//lib/rubocop/runner.rb#421 def formatter_set; end - # source://rubocop//lib/rubocop/runner.rb#475 + # source://rubocop//lib/rubocop/runner.rb#478 def get_processed_source(file); end # source://rubocop//lib/rubocop/runner.rb#346 @@ -57498,25 +57783,25 @@ class RuboCop::Runner # @return [Boolean] # - # source://rubocop//lib/rubocop/runner.rb#456 + # source://rubocop//lib/rubocop/runner.rb#459 def mark_as_safe_by_config?(config); end - # source://rubocop//lib/rubocop/runner.rb#464 + # source://rubocop//lib/rubocop/runner.rb#467 def minimum_severity_to_fail; end - # source://rubocop//lib/rubocop/runner.rb#368 + # source://rubocop//lib/rubocop/runner.rb#371 def mobilize_team(processed_source); end - # source://rubocop//lib/rubocop/runner.rb#373 + # source://rubocop//lib/rubocop/runner.rb#376 def mobilized_cop_classes(config); end - # source://rubocop//lib/rubocop/runner.rb#436 + # source://rubocop//lib/rubocop/runner.rb#439 def offenses_to_report(offenses); end # source://rubocop//lib/rubocop/runner.rb#156 def process_file(file); end - # source://rubocop//lib/rubocop/runner.rb#397 + # source://rubocop//lib/rubocop/runner.rb#400 def qualify_option_cop_names; end # @yield [cop] @@ -57532,17 +57817,17 @@ class RuboCop::Runner # otherwise dormant team that can be used for config- and option- # level caching in ResultCache. # - # source://rubocop//lib/rubocop/runner.rb#503 + # source://rubocop//lib/rubocop/runner.rb#506 def standby_team(config); end # @return [Boolean] # - # source://rubocop//lib/rubocop/runner.rb#414 + # source://rubocop//lib/rubocop/runner.rb#417 def style_guide_cops_only?(config); end # @return [Boolean] # - # source://rubocop//lib/rubocop/runner.rb#448 + # source://rubocop//lib/rubocop/runner.rb#451 def supports_safe_autocorrect?(offense); end # @yield [team] @@ -57814,34 +58099,34 @@ class RuboCop::TargetRuby # @api private # @return [TargetRuby] a new instance of TargetRuby # - # source://rubocop//lib/rubocop/target_ruby.rb#254 + # source://rubocop//lib/rubocop/target_ruby.rb#258 def initialize(config); end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#270 + # source://rubocop//lib/rubocop/target_ruby.rb#274 def rubocop_version_with_support; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#258 + # source://rubocop//lib/rubocop/target_ruby.rb#262 def source; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_ruby.rb#266 + # source://rubocop//lib/rubocop/target_ruby.rb#270 def supported?; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#262 + # source://rubocop//lib/rubocop/target_ruby.rb#266 def version; end class << self # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#240 + # source://rubocop//lib/rubocop/target_ruby.rb#244 def supported_versions; end end end @@ -57850,23 +58135,23 @@ end # # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#187 +# source://rubocop//lib/rubocop/target_ruby.rb#191 class RuboCop::TargetRuby::BundlerLockFile < ::RuboCop::TargetRuby::Source # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#188 + # source://rubocop//lib/rubocop/target_ruby.rb#192 def name; end private # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#221 + # source://rubocop//lib/rubocop/target_ruby.rb#225 def bundler_lock_file_path; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#194 + # source://rubocop//lib/rubocop/target_ruby.rb#198 def find_version; end end @@ -57879,18 +58164,18 @@ RuboCop::TargetRuby::DEFAULT_VERSION = T.let(T.unsafe(nil), Float) # # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#228 +# source://rubocop//lib/rubocop/target_ruby.rb#232 class RuboCop::TargetRuby::Default < ::RuboCop::TargetRuby::Source # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#229 + # source://rubocop//lib/rubocop/target_ruby.rb#233 def name; end private # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#235 + # source://rubocop//lib/rubocop/target_ruby.rb#239 def find_version; end end @@ -57902,42 +58187,37 @@ end class RuboCop::TargetRuby::GemspecFile < ::RuboCop::TargetRuby::Source extend ::RuboCop::AST::NodePattern::Macros - # source://rubocop//lib/rubocop/target_ruby.rb#64 + # source://rubocop//lib/rubocop/target_ruby.rb#62 def gem_requirement_versions(param0 = T.unsafe(nil)); end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#70 + # source://rubocop//lib/rubocop/target_ruby.rb#68 def name; end - # source://rubocop//lib/rubocop/target_ruby.rb#59 + # source://rubocop//lib/rubocop/target_ruby.rb#57 def required_ruby_version(param0); end private # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#121 - def find_default_minimal_known_ruby(right_hand_side); end + # source://rubocop//lib/rubocop/target_ruby.rb#123 + def find_minimal_known_ruby(right_hand_side); end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#76 + # source://rubocop//lib/rubocop/target_ruby.rb#74 def find_version; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#86 - def gemspec_filename; end - - # @api private - # - # source://rubocop//lib/rubocop/target_ruby.rb#93 + # source://rubocop//lib/rubocop/target_ruby.rb#84 def gemspec_filepath; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#117 + # source://rubocop//lib/rubocop/target_ruby.rb#119 def version_from_array(array); end # @api private @@ -57947,15 +58227,10 @@ class RuboCop::TargetRuby::GemspecFile < ::RuboCop::TargetRuby::Source # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#105 + # source://rubocop//lib/rubocop/target_ruby.rb#107 def version_from_right_hand_side(right_hand_side); end end -# @api private -# -# source://rubocop//lib/rubocop/target_ruby.rb#56 -RuboCop::TargetRuby::GemspecFile::GEMSPEC_EXTENSION = T.let(T.unsafe(nil), String) - # @api private # # source://rubocop//lib/rubocop/target_ruby.rb#7 @@ -57989,49 +58264,49 @@ end # # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#133 +# source://rubocop//lib/rubocop/target_ruby.rb#137 class RuboCop::TargetRuby::RubyVersionFile < ::RuboCop::TargetRuby::Source # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#137 + # source://rubocop//lib/rubocop/target_ruby.rb#141 def name; end private # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#143 + # source://rubocop//lib/rubocop/target_ruby.rb#147 def filename; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#151 + # source://rubocop//lib/rubocop/target_ruby.rb#155 def find_version; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#147 + # source://rubocop//lib/rubocop/target_ruby.rb#151 def pattern; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#158 + # source://rubocop//lib/rubocop/target_ruby.rb#162 def version_file; end end # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#134 +# source://rubocop//lib/rubocop/target_ruby.rb#138 RuboCop::TargetRuby::RubyVersionFile::RUBY_VERSION_FILENAME = T.let(T.unsafe(nil), String) # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#135 +# source://rubocop//lib/rubocop/target_ruby.rb#139 RuboCop::TargetRuby::RubyVersionFile::RUBY_VERSION_PATTERN = T.let(T.unsafe(nil), Regexp) # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#244 +# source://rubocop//lib/rubocop/target_ruby.rb#248 RuboCop::TargetRuby::SOURCES = T.let(T.unsafe(nil), Array) # A place where information about a target ruby version is found. @@ -58067,34 +58342,34 @@ end # # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#166 +# source://rubocop//lib/rubocop/target_ruby.rb#170 class RuboCop::TargetRuby::ToolVersionsFile < ::RuboCop::TargetRuby::RubyVersionFile # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#170 + # source://rubocop//lib/rubocop/target_ruby.rb#174 def name; end private # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#176 + # source://rubocop//lib/rubocop/target_ruby.rb#180 def filename; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#180 + # source://rubocop//lib/rubocop/target_ruby.rb#184 def pattern; end end # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#167 +# source://rubocop//lib/rubocop/target_ruby.rb#171 RuboCop::TargetRuby::ToolVersionsFile::TOOL_VERSIONS_FILENAME = T.let(T.unsafe(nil), String) # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#168 +# source://rubocop//lib/rubocop/target_ruby.rb#172 RuboCop::TargetRuby::ToolVersionsFile::TOOL_VERSIONS_PATTERN = T.let(T.unsafe(nil), Regexp) # source://rubocop//lib/rubocop/ast_aliases.rb#7 @@ -58120,12 +58395,12 @@ module RuboCop::Version class << self # @api private # - # source://rubocop//lib/rubocop/version.rb#108 + # source://rubocop//lib/rubocop/version.rb#110 def document_version; end # @api private # - # source://rubocop//lib/rubocop/version.rb#58 + # source://rubocop//lib/rubocop/version.rb#60 def extension_versions(env); end # Returns feature version in one of two ways: @@ -58135,30 +58410,30 @@ module RuboCop::Version # # @api private # - # source://rubocop//lib/rubocop/version.rb#92 + # source://rubocop//lib/rubocop/version.rb#94 def feature_version(feature); end # @api private # - # source://rubocop//lib/rubocop/version.rb#43 + # source://rubocop//lib/rubocop/version.rb#45 def parser_version; end # @api private # - # source://rubocop//lib/rubocop/version.rb#113 + # source://rubocop//lib/rubocop/version.rb#115 def server_mode; end # @api private # - # source://rubocop//lib/rubocop/version.rb#21 + # source://rubocop//lib/rubocop/version.rb#22 def version(debug: T.unsafe(nil), env: T.unsafe(nil)); end end end -# source://rubocop//lib/rubocop/version.rb#12 +# source://rubocop//lib/rubocop/version.rb#13 RuboCop::Version::CANONICAL_FEATURE_NAMES = T.let(T.unsafe(nil), Hash) -# source://rubocop//lib/rubocop/version.rb#16 +# source://rubocop//lib/rubocop/version.rb#17 RuboCop::Version::EXTENSION_PATH_NAMES = T.let(T.unsafe(nil), Hash) # source://rubocop//lib/rubocop/version.rb#8 @@ -58187,14 +58462,23 @@ module RuboCop::YAMLDuplicationChecker # # source://rubocop//lib/rubocop/yaml_duplication_checker.rb#7 def check(yaml_string, filename, &on_duplicated); end + end +end - private +# @api private +# +# source://rubocop//lib/rubocop/yaml_duplication_checker.rb#14 +class RuboCop::YAMLDuplicationChecker::DuplicationCheckHandler < ::Psych::TreeBuilder + # @api private + # @return [DuplicationCheckHandler] a new instance of DuplicationCheckHandler + # + # source://rubocop//lib/rubocop/yaml_duplication_checker.rb#15 + def initialize(&block); end - # @api private - # - # source://rubocop//lib/rubocop/yaml_duplication_checker.rb#21 - def traverse(tree, &on_duplicated); end - end + # @api private + # + # source://rubocop//lib/rubocop/yaml_duplication_checker.rb#20 + def end_mapping; end end # Extensions to the core String class diff --git a/sorbet/rbi/gems/simplecov-html@0.12.3.rbi b/sorbet/rbi/gems/simplecov-html@0.13.1.rbi similarity index 84% rename from sorbet/rbi/gems/simplecov-html@0.12.3.rbi rename to sorbet/rbi/gems/simplecov-html@0.13.1.rbi index c69f05a..2cd96d3 100644 --- a/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +++ b/sorbet/rbi/gems/simplecov-html@0.13.1.rbi @@ -147,71 +147,79 @@ class SimpleCov::Formatter::HTMLFormatter # source://simplecov-html//lib/simplecov-html.rb#19 def initialize; end - # @return [Boolean] - # - # source://simplecov-html//lib/simplecov-html.rb#38 - def branchable_result?; end - - # source://simplecov-html//lib/simplecov-html.rb#23 + # source://simplecov-html//lib/simplecov-html.rb#26 def format(result); end - # @return [Boolean] - # - # source://simplecov-html//lib/simplecov-html.rb#45 - def line_status?(source_file, line); end - - # source://simplecov-html//lib/simplecov-html.rb#34 - def output_message(result); end - private - # source://simplecov-html//lib/simplecov-html.rb#64 - def asset_output_path; end + # source://simplecov-html//lib/simplecov-html.rb#94 + def asset_inline(name); end # source://simplecov-html//lib/simplecov-html.rb#72 + def asset_output_path; end + + # source://simplecov-html//lib/simplecov-html.rb#80 def assets_path(name); end - # source://simplecov-html//lib/simplecov-html.rb#97 + # @return [Boolean] + # + # source://simplecov-html//lib/simplecov-html.rb#41 + def branchable_result?; end + + # source://simplecov-html//lib/simplecov-html.rb#125 def coverage_css_class(covered_percent); end - # source://simplecov-html//lib/simplecov-html.rb#93 + # source://simplecov-html//lib/simplecov-html.rb#121 def covered_percent(percent); end # Returns a table containing the given source files # - # source://simplecov-html//lib/simplecov-html.rb#84 + # source://simplecov-html//lib/simplecov-html.rb#112 def formatted_file_list(title, source_files); end # Returns the html for the given source_file # - # source://simplecov-html//lib/simplecov-html.rb#77 + # source://simplecov-html//lib/simplecov-html.rb#105 def formatted_source_file(source_file); end # Return a (kind of) unique id for the source file given. Uses SHA1 on path for the id # - # source://simplecov-html//lib/simplecov-html.rb#118 + # source://simplecov-html//lib/simplecov-html.rb#146 def id(source_file); end - # source://simplecov-html//lib/simplecov-html.rb#130 + # @return [Boolean] + # + # source://simplecov-html//lib/simplecov-html.rb#48 + def line_status?(source_file, line); end + + # source://simplecov-html//lib/simplecov-html.rb#158 def link_to_source_file(source_file); end - # source://simplecov-html//lib/simplecov-html.rb#60 + # source://simplecov-html//lib/simplecov-html.rb#56 + def output_message(result); end + + # source://simplecov-html//lib/simplecov-html.rb#68 def output_path; end - # source://simplecov-html//lib/simplecov-html.rb#126 + # source://simplecov-html//lib/simplecov-html.rb#154 def shortened_filename(source_file); end - # source://simplecov-html//lib/simplecov-html.rb#107 + # source://simplecov-html//lib/simplecov-html.rb#135 def strength_css_class(covered_strength); end # Returns the an erb instance for the template of given name # - # source://simplecov-html//lib/simplecov-html.rb#56 + # source://simplecov-html//lib/simplecov-html.rb#64 def template(name); end - # source://simplecov-html//lib/simplecov-html.rb#122 + # source://simplecov-html//lib/simplecov-html.rb#150 def timeago(time); end end +# Only have a few content types, just hardcode them +# +# source://simplecov-html//lib/simplecov-html.rb#87 +SimpleCov::Formatter::HTMLFormatter::CONTENT_TYPES = T.let(T.unsafe(nil), Hash) + # source://simplecov-html//lib/simplecov-html/version.rb#6 SimpleCov::Formatter::HTMLFormatter::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/spoom@1.4.2.rbi b/sorbet/rbi/gems/spoom@1.5.0.rbi similarity index 99% rename from sorbet/rbi/gems/spoom@1.4.2.rbi rename to sorbet/rbi/gems/spoom@1.5.0.rbi index 6a92ad3..837705b 100644 --- a/sorbet/rbi/gems/spoom@1.4.2.rbi +++ b/sorbet/rbi/gems/spoom@1.5.0.rbi @@ -134,13 +134,13 @@ class Spoom::Cli::Main < ::Thor # source://spoom//lib/spoom/cli.rb#65 def coverage(*args); end - # source://thor/1.3.1/lib/thor.rb#334 + # source://thor/1.3.2/lib/thor.rb#334 def deadcode(*args); end # source://spoom//lib/spoom/cli.rb#75 def lsp(*args); end - # source://thor/1.3.1/lib/thor.rb#334 + # source://thor/1.3.2/lib/thor.rb#334 def srb(*args); end # source://spoom//lib/spoom/cli.rb#94 @@ -278,18 +278,18 @@ end # source://spoom//lib/spoom/cli/srb.rb#12 class Spoom::Cli::Srb::Main < ::Thor - # source://thor/1.3.1/lib/thor.rb#334 + # source://thor/1.3.2/lib/thor.rb#334 def bump(*args); end - # source://thor/1.3.1/lib/thor.rb#334 + # source://thor/1.3.2/lib/thor.rb#334 def coverage(*args); end def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end - # source://thor/1.3.1/lib/thor.rb#334 + # source://thor/1.3.2/lib/thor.rb#334 def lsp(*args); end - # source://thor/1.3.1/lib/thor.rb#334 + # source://thor/1.3.2/lib/thor.rb#334 def tc(*args); end end @@ -325,24 +325,24 @@ Spoom::Cli::Srb::Tc::SORT_LOC = T.let(T.unsafe(nil), String) # source://spoom//lib/spoom/colors.rb#5 class Spoom::Color < ::T::Enum enums do - CLEAR = new - BOLD = new BLACK = new - RED = new - GREEN = new - YELLOW = new BLUE = new - MAGENTA = new + BOLD = new + CLEAR = new CYAN = new - WHITE = new + GREEN = new LIGHT_BLACK = new - LIGHT_RED = new - LIGHT_GREEN = new - LIGHT_YELLOW = new LIGHT_BLUE = new - LIGHT_MAGENTA = new LIGHT_CYAN = new + LIGHT_GREEN = new + LIGHT_MAGENTA = new + LIGHT_RED = new LIGHT_WHITE = new + LIGHT_YELLOW = new + MAGENTA = new + RED = new + WHITE = new + YELLOW = new end # source://spoom//lib/spoom/colors.rb#32 @@ -426,7 +426,7 @@ module Spoom::Context::Bundle # Returns `nil` if `gem` cannot be found in the Gemfile. # # source://spoom//lib/spoom/context/bundle.rb#62 - sig { params(gem: ::String).returns(T.nilable(::String)) } + sig { params(gem: ::String).returns(T.nilable(::Gem::Version)) } def gem_version_from_gemfile_lock(gem); end # source://spoom//lib/spoom/context/bundle.rb#51 @@ -1004,7 +1004,7 @@ class Spoom::Coverage::D3::ColorPalette < ::T::Struct prop :strong, ::String class << self - # source://sorbet-runtime/0.5.11547/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11620/lib/types/struct.rb#13 def inherited(s); end end end @@ -1344,7 +1344,7 @@ class Spoom::Coverage::Snapshot < ::T::Struct sig { params(obj: T::Hash[::String, T.untyped]).returns(::Spoom::Coverage::Snapshot) } def from_obj(obj); end - # source://sorbet-runtime/0.5.11547/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11620/lib/types/struct.rb#13 def inherited(s); end end end @@ -1480,7 +1480,7 @@ class Spoom::Deadcode::Definition < ::T::Struct def to_json(*args); end class << self - # source://sorbet-runtime/0.5.11547/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11620/lib/types/struct.rb#13 def inherited(s); end end end @@ -2102,7 +2102,7 @@ class Spoom::Deadcode::Plugins::Ruby < ::Spoom::Deadcode::Plugins::Base private - # source://spoom//lib/spoom/deadcode/plugins/ruby.rb#43 + # source://spoom//lib/spoom/deadcode/plugins/ruby.rb#46 sig { params(send: ::Spoom::Deadcode::Send, node: ::Prism::Node).void } def reference_symbol_as_constant(send, node); end end @@ -2368,7 +2368,7 @@ class Spoom::Deadcode::Send < ::T::Struct def each_arg_assoc(&block); end class << self - # source://sorbet-runtime/0.5.11547/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11620/lib/types/struct.rb#13 def inherited(s); end end end @@ -2388,7 +2388,7 @@ class Spoom::ExecResult < ::T::Struct def to_s; end class << self - # source://sorbet-runtime/0.5.11547/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11620/lib/types/struct.rb#13 def inherited(s); end end end @@ -2586,7 +2586,7 @@ class Spoom::FileTree::Node < ::T::Struct def path; end class << self - # source://sorbet-runtime/0.5.11547/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11620/lib/types/struct.rb#13 def inherited(s); end end end @@ -2652,7 +2652,7 @@ class Spoom::Git::Commit < ::T::Struct def timestamp; end class << self - # source://sorbet-runtime/0.5.11547/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11620/lib/types/struct.rb#13 def inherited(s); end # Parse a line formatted as `%h %at` into a `Commit` @@ -2764,7 +2764,7 @@ class Spoom::LSP::Diagnostic < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Diagnostic) } def from_json(json); end - # source://sorbet-runtime/0.5.11547/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11620/lib/types/struct.rb#13 def inherited(s); end end end @@ -2797,7 +2797,7 @@ class Spoom::LSP::DocumentSymbol < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::DocumentSymbol) } def from_json(json); end - # source://sorbet-runtime/0.5.11547/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11620/lib/types/struct.rb#13 def inherited(s); end end end @@ -2855,7 +2855,7 @@ class Spoom::LSP::Hover < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Hover) } def from_json(json); end - # source://sorbet-runtime/0.5.11547/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11620/lib/types/struct.rb#13 def inherited(s); end end end @@ -2880,7 +2880,7 @@ class Spoom::LSP::Location < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Location) } def from_json(json); end - # source://sorbet-runtime/0.5.11547/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11620/lib/types/struct.rb#13 def inherited(s); end end end @@ -2943,7 +2943,7 @@ class Spoom::LSP::Position < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Position) } def from_json(json); end - # source://sorbet-runtime/0.5.11547/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11620/lib/types/struct.rb#13 def inherited(s); end end end @@ -2981,7 +2981,7 @@ class Spoom::LSP::Range < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Range) } def from_json(json); end - # source://sorbet-runtime/0.5.11547/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11620/lib/types/struct.rb#13 def inherited(s); end end end @@ -3047,7 +3047,7 @@ class Spoom::LSP::SignatureHelp < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::SignatureHelp) } def from_json(json); end - # source://sorbet-runtime/0.5.11547/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11620/lib/types/struct.rb#13 def inherited(s); end end end @@ -3473,7 +3473,7 @@ class Spoom::Model::Reference < ::T::Struct sig { params(name: ::String, location: ::Spoom::Location).returns(::Spoom::Model::Reference) } def constant(name, location); end - # source://sorbet-runtime/0.5.11547/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11620/lib/types/struct.rb#13 def inherited(s); end # source://spoom//lib/spoom/model/reference.rb#29 @@ -3718,9 +3718,9 @@ end # source://spoom//lib/spoom/model/model.rb#187 class Spoom::Model::Visibility < ::T::Enum enums do - Public = new - Protected = new Private = new + Protected = new + Public = new end end diff --git a/sorbet/rbi/gems/strscan@3.1.0.rbi b/sorbet/rbi/gems/strscan@3.1.0.rbi deleted file mode 100644 index 1f754d9..0000000 --- a/sorbet/rbi/gems/strscan@3.1.0.rbi +++ /dev/null @@ -1,9 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `strscan` gem. -# Please instead update this file by running `bin/tapioca gem strscan`. - - -# THIS IS AN EMPTY RBI FILE. -# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/tapioca@0.16.1.rbi b/sorbet/rbi/gems/tapioca@0.16.3.rbi similarity index 97% rename from sorbet/rbi/gems/tapioca@0.16.1.rbi rename to sorbet/rbi/gems/tapioca@0.16.3.rbi index 6671c88..9f87567 100644 --- a/sorbet/rbi/gems/tapioca@0.16.1.rbi +++ b/sorbet/rbi/gems/tapioca@0.16.3.rbi @@ -55,7 +55,7 @@ module RBI; end # source://tapioca//lib/tapioca/rbi_ext/model.rb#5 class RBI::Tree < ::RBI::NodeWithComments - # source://rbi/0.1.14/lib/rbi/model.rb#121 + # source://rbi/0.2.1/lib/rbi/model.rb#121 sig do params( loc: T.nilable(::RBI::Loc), @@ -65,15 +65,15 @@ class RBI::Tree < ::RBI::NodeWithComments end def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi/0.1.14/lib/rbi/model.rb#128 + # source://rbi/0.2.1/lib/rbi/model.rb#128 sig { params(node: ::RBI::Node).void } def <<(node); end - # source://rbi/0.1.14/lib/rbi/rewriters/add_sig_templates.rb#66 + # source://rbi/0.2.1/lib/rbi/rewriters/add_sig_templates.rb#66 sig { params(with_todo_comment: T::Boolean).void } def add_sig_templates!(with_todo_comment: T.unsafe(nil)); end - # source://rbi/0.1.14/lib/rbi/rewriters/annotate.rb#49 + # source://rbi/0.2.1/lib/rbi/rewriters/annotate.rb#49 sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void } def annotate!(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end @@ -138,27 +138,35 @@ 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.14/lib/rbi/rewriters/deannotate.rb#41 + # source://rbi/0.2.1/lib/rbi/rewriters/deannotate.rb#41 sig { params(annotation: ::String).void } def deannotate!(annotation); end - # source://rbi/0.1.14/lib/rbi/model.rb#134 + # source://rbi/0.2.1/lib/rbi/model.rb#134 sig { returns(T::Boolean) } def empty?; end - # source://rbi/0.1.14/lib/rbi/rewriters/filter_versions.rb#118 + # source://rbi/0.2.1/lib/rbi/rewriters/filter_versions.rb#118 sig { params(version: ::Gem::Version).void } def filter_versions!(version); end - # source://rbi/0.1.14/lib/rbi/rewriters/group_nodes.rb#81 + # source://rbi/0.2.1/lib/rbi/rewriters/flatten_singleton_methods.rb#60 + sig { void } + def flatten_singleton_methods!; end + + # source://rbi/0.2.1/lib/rbi/rewriters/flatten_visibilities.rb#60 + sig { void } + def flatten_visibilities!; end + + # source://rbi/0.2.1/lib/rbi/rewriters/group_nodes.rb#81 sig { void } def group_nodes!; end - # source://rbi/0.1.14/lib/rbi/index.rb#68 + # source://rbi/0.2.1/lib/rbi/index.rb#68 sig { returns(::RBI::Index) } def index; end - # source://rbi/0.1.14/lib/rbi/rewriters/merge_trees.rb#324 + # source://rbi/0.2.1/lib/rbi/rewriters/merge_trees.rb#324 sig do params( other: ::RBI::Tree, @@ -169,23 +177,27 @@ 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.14/lib/rbi/rewriters/nest_non_public_methods.rb#46 + # source://rbi/0.2.1/lib/rbi/rewriters/nest_non_public_members.rb#46 sig { void } - def nest_non_public_methods!; end + def nest_non_public_members!; end - # source://rbi/0.1.14/lib/rbi/rewriters/nest_singleton_methods.rb#36 + # source://rbi/0.2.1/lib/rbi/rewriters/nest_singleton_methods.rb#36 sig { void } def nest_singleton_methods!; end - # source://rbi/0.1.14/lib/rbi/model.rb#112 + # source://rbi/0.2.1/lib/rbi/rewriters/nest_top_level_members.rb#63 + sig { void } + def nest_top_level_members!; end + + # source://rbi/0.2.1/lib/rbi/model.rb#112 sig { returns(T::Array[::RBI::Node]) } def nodes; end - # source://rbi/0.1.14/lib/rbi/rewriters/attr_to_methods.rb#53 + # source://rbi/0.2.1/lib/rbi/rewriters/attr_to_methods.rb#53 sig { void } def replace_attributes_with_methods!; end - # source://rbi/0.1.14/lib/rbi/rewriters/sort_nodes.rb#119 + # source://rbi/0.2.1/lib/rbi/rewriters/sort_nodes.rb#119 sig { void } def sort_nodes!; end @@ -206,7 +218,7 @@ class RBI::TypedParam < ::T::Struct const :type, ::String class << self - # source://sorbet-runtime/0.5.11547/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11620/lib/types/struct.rb#13 def inherited(s); end end end @@ -867,7 +879,7 @@ class Tapioca::Commands::Command sig { void } def initialize; end - # source://thor/1.3.1/lib/thor/base.rb#155 + # source://thor/1.3.2/lib/thor/base.rb#155 sig { returns(::Thor::Actions) } def file_writer; end @@ -1129,7 +1141,7 @@ class Tapioca::ConfigHelper::ConfigError < ::T::Struct const :message_parts, T::Array[::Tapioca::ConfigHelper::ConfigErrorMessagePart] class << self - # source://sorbet-runtime/0.5.11547/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11620/lib/types/struct.rb#13 def inherited(s); end end end @@ -1140,7 +1152,7 @@ class Tapioca::ConfigHelper::ConfigErrorMessagePart < ::T::Struct const :colors, T::Array[::Symbol] class << self - # source://sorbet-runtime/0.5.11547/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11620/lib/types/struct.rb#13 def inherited(s); end end end @@ -1197,7 +1209,7 @@ class Tapioca::Dsl::Compiler ConstantType = type_member { { upper: Module } } - # source://tapioca//lib/tapioca/dsl/compiler.rb#74 + # source://tapioca//lib/tapioca/dsl/compiler.rb#107 sig do params( pipeline: ::Tapioca::Dsl::Pipeline, @@ -1210,11 +1222,11 @@ class Tapioca::Dsl::Compiler # NOTE: This should eventually accept an `Error` object or `Exception` rather than simply a `String`. # - # source://tapioca//lib/tapioca/dsl/compiler.rb#92 + # source://tapioca//lib/tapioca/dsl/compiler.rb#125 sig { params(error: ::String).void } def add_error(error); end - # source://tapioca//lib/tapioca/dsl/compiler.rb#83 + # source://tapioca//lib/tapioca/dsl/compiler.rb#116 sig { params(compiler_name: ::String).returns(T::Boolean) } def compiler_enabled?(compiler_name); end @@ -1224,7 +1236,7 @@ class Tapioca::Dsl::Compiler # @abstract # - # source://tapioca//lib/tapioca/dsl/compiler.rb#88 + # source://tapioca//lib/tapioca/dsl/compiler.rb#121 sig { abstract.void } def decorate; end @@ -1238,48 +1250,61 @@ class Tapioca::Dsl::Compiler private - # source://tapioca//lib/tapioca/dsl/compiler.rb#141 + # source://tapioca//lib/tapioca/dsl/compiler.rb#174 sig { params(method_def: T.any(::Method, ::UnboundMethod)).returns(T::Array[::RBI::TypedParam]) } def compile_method_parameters_to_rbi(method_def); end - # source://tapioca//lib/tapioca/dsl/compiler.rb#177 + # source://tapioca//lib/tapioca/dsl/compiler.rb#210 sig { params(method_def: T.any(::Method, ::UnboundMethod)).returns(::String) } def compile_method_return_type_to_rbi(method_def); end - # source://tapioca//lib/tapioca/dsl/compiler.rb#131 + # source://tapioca//lib/tapioca/dsl/compiler.rb#164 sig { params(scope: ::RBI::Scope, method_def: T.any(::Method, ::UnboundMethod), class_method: T::Boolean).void } def create_method_from_def(scope, method_def, class_method: T.unsafe(nil)); end # Get the types of each parameter from a method signature # - # source://tapioca//lib/tapioca/dsl/compiler.rb#105 + # source://tapioca//lib/tapioca/dsl/compiler.rb#138 sig { params(method_def: T.any(::Method, ::UnboundMethod), signature: T.untyped).returns(T::Array[::String]) } def parameters_types_from_signature(method_def, signature); end class << self # @abstract # - # source://tapioca//lib/tapioca/dsl/compiler.rb#37 + # source://tapioca//lib/tapioca/dsl/compiler.rb#39 sig { abstract.returns(T::Enumerable[::Module]) } def gather_constants; end - # source://tapioca//lib/tapioca/dsl/compiler.rb#32 + # source://tapioca//lib/tapioca/dsl/compiler.rb#34 sig { params(constant: ::Module).returns(T::Boolean) } def handles?(constant); end - # source://tapioca//lib/tapioca/dsl/compiler.rb#40 + # source://tapioca//lib/tapioca/dsl/compiler.rb#42 sig { returns(T::Set[::Module]) } def processable_constants; end + # source://tapioca//lib/tapioca/dsl/compiler.rb#50 + sig { params(constants: T::Array[::Module]).void } + def requested_constants=(constants); end + private - # source://tapioca//lib/tapioca/dsl/compiler.rb#50 + # source://tapioca//lib/tapioca/dsl/compiler.rb#75 sig { returns(T::Enumerable[T::Class[T.anything]]) } def all_classes; end - # source://tapioca//lib/tapioca/dsl/compiler.rb#58 + # source://tapioca//lib/tapioca/dsl/compiler.rb#87 sig { returns(T::Enumerable[::Module]) } def all_modules; end + + # source://tapioca//lib/tapioca/dsl/compiler.rb#61 + sig do + type_parameters(:U) + .params( + klass: T.all(T.type_parameter(:U), T::Class[T.anything]) + ).returns(T::Array[T.type_parameter(:U)]) + end + def descendants_of(klass); end end end @@ -1360,11 +1385,11 @@ class Tapioca::Dsl::Pipeline private - # source://tapioca//lib/tapioca/dsl/pipeline.rb#223 + # source://tapioca//lib/tapioca/dsl/pipeline.rb#224 sig { void } def abort_if_pending_migrations!; end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#168 + # source://tapioca//lib/tapioca/dsl/pipeline.rb#169 sig { params(constants: T::Set[::Module]).returns(T::Set[::Module]) } def filter_anonymous_and_reloaded_constants(constants); end @@ -1387,11 +1412,11 @@ class Tapioca::Dsl::Pipeline end def gather_constants(requested_constants, requested_paths, skipped_constants); end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#197 + # source://tapioca//lib/tapioca/dsl/pipeline.rb#198 sig { params(constant: ::Module).returns(T.nilable(::RBI::File)) } def rbi_for_constant(constant); end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#216 + # source://tapioca//lib/tapioca/dsl/pipeline.rb#217 sig { params(error: ::String).returns(T.noreturn) } def report_error(error); end end @@ -1691,7 +1716,7 @@ end class Tapioca::Gem::Listeners::SorbetEnums < ::Tapioca::Gem::Listeners::Base private - # source://tapioca//lib/tapioca/gem/listeners/sorbet_enums.rb#25 + # source://tapioca//lib/tapioca/gem/listeners/sorbet_enums.rb#28 sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } def ignore?(event); end @@ -2196,7 +2221,7 @@ class Tapioca::GemInfo < ::T::Struct sig { params(spec: ::Bundler::LazySpecification).returns(::Tapioca::GemInfo) } def from_spec(spec); end - # source://sorbet-runtime/0.5.11547/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11620/lib/types/struct.rb#13 def inherited(s); end end end @@ -3442,9 +3467,9 @@ end class Tapioca::Runtime::Trackers::Mixin::Type < ::T::Enum enums do - Prepend = new - Include = new Extend = new + Include = new + Prepend = new end end @@ -3696,9 +3721,9 @@ Tapioca::TypeVariableModule::DEFAULT_BOUNDS_PROC = T.let(T.unsafe(nil), Proc) # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#125 class Tapioca::TypeVariableModule::Type < ::T::Enum enums do + HasAttachedClass = new Member = new Template = new - HasAttachedClass = new end end @@ -3707,30 +3732,30 @@ Tapioca::VERSION = T.let(T.unsafe(nil), String) # source://tapioca//lib/tapioca/helpers/source_uri.rb#7 class URI::Source < ::URI::File - # source://tapioca//lib/tapioca/helpers/source_uri.rb#58 + # source://tapioca//lib/tapioca/helpers/source_uri.rb#65 sig { params(v: T.nilable(::String)).returns(T::Boolean) } def check_host(v); end - # source://uri/0.13.0/uri/generic.rb#243 + # source://uri/0.13.1/uri/generic.rb#243 def gem_name; end - # source://tapioca//lib/tapioca/helpers/source_uri.rb#25 + # source://tapioca//lib/tapioca/helpers/source_uri.rb#32 sig { returns(T.nilable(::String)) } def gem_version; end - # source://uri/0.13.0/uri/generic.rb#283 + # source://uri/0.13.1/uri/generic.rb#283 def line_number; end - # source://tapioca//lib/tapioca/helpers/source_uri.rb#51 + # source://tapioca//lib/tapioca/helpers/source_uri.rb#58 sig { params(v: T.nilable(::String)).void } def set_path(v); end - # source://tapioca//lib/tapioca/helpers/source_uri.rb#70 + # source://tapioca//lib/tapioca/helpers/source_uri.rb#77 sig { returns(::String) } def to_s; end class << self - # source://tapioca//lib/tapioca/helpers/source_uri.rb#38 + # source://tapioca//lib/tapioca/helpers/source_uri.rb#45 sig do params( gem_name: ::String, @@ -3745,3 +3770,12 @@ end # source://tapioca//lib/tapioca/helpers/source_uri.rb#10 URI::Source::COMPONENT = T.let(T.unsafe(nil), Array) + +# `uri` for Ruby 3.4 switched the default parser from RFC2396 to RFC3986. The new parser emits a deprecation +# warning on a few methods and delegates them to RFC2396, namely `extract`/`make_regexp`/`escape`/`unescape`. +# On earlier versions of the uri gem, the RFC2396_PARSER constant doesn't exist, so it needs some special +# handling to select a parser that doesn't emit deprecations. While it was backported to Ruby 3.1, users may +# have the uri gem in their own bundle and thus not use a compatible version. +# +# source://tapioca//lib/tapioca/helpers/source_uri.rb#26 +URI::Source::PARSER = T.let(T.unsafe(nil), URI::RFC2396_Parser) diff --git a/sorbet/rbi/gems/thor@1.3.1.rbi b/sorbet/rbi/gems/thor@1.3.2.rbi similarity index 98% rename from sorbet/rbi/gems/thor@1.3.1.rbi rename to sorbet/rbi/gems/thor@1.3.2.rbi index 18cf035..10202a5 100644 --- a/sorbet/rbi/gems/thor@1.3.1.rbi +++ b/sorbet/rbi/gems/thor@1.3.2.rbi @@ -37,7 +37,7 @@ class Thor extend ::Thor::Base::ClassMethods extend ::Thor::Invocation::ClassMethods - # source://thor//lib/thor.rb#652 + # source://thor//lib/thor.rb#663 def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end class << self @@ -96,6 +96,19 @@ class Thor # source://thor//lib/thor.rb#363 def check_unknown_options?(config); end + # Checks if a specified command exists. + # + # ==== Parameters + # command_name<String>:: The name of the command to check for existence. + # + # ==== Returns + # Boolean:: +true+ if the command exists, +false+ otherwise. + # + # @return [Boolean] + # + # source://thor//lib/thor.rb#449 + def command_exists?(command_name); end + # Prints help information for the given command. # # ==== Parameters @@ -471,48 +484,48 @@ class Thor # the command that is going to be invoked and a boolean which indicates if # the namespace should be displayed as arguments. # - # source://thor//lib/thor.rb#535 + # source://thor//lib/thor.rb#546 def banner(command, namespace = T.unsafe(nil), subcommand = T.unsafe(nil)); end - # source://thor//lib/thor.rb#541 + # source://thor//lib/thor.rb#552 def baseclass; end - # source://thor//lib/thor.rb#549 + # source://thor//lib/thor.rb#560 def create_command(meth); end - # source://thor//lib/thor.rb#549 + # source://thor//lib/thor.rb#560 def create_task(meth); end # help command has the required check disabled by default. # - # source://thor//lib/thor.rb#467 + # source://thor//lib/thor.rb#478 def disable_required_check; end # The method responsible for dispatching given the args. # # @yield [instance] # - # source://thor//lib/thor.rb#494 + # source://thor//lib/thor.rb#505 def dispatch(meth, given_args, given_opts, config); end - # source://thor//lib/thor.rb#545 + # source://thor//lib/thor.rb#556 def dynamic_command_class; end # this is the logic that takes the command name passed in by the user # and determines whether it is an unambiguous substrings of a command or # alias name. # - # source://thor//lib/thor.rb#615 + # source://thor//lib/thor.rb#626 def find_command_possibilities(meth); end # this is the logic that takes the command name passed in by the user # and determines whether it is an unambiguous substrings of a command or # alias name. # - # source://thor//lib/thor.rb#615 + # source://thor//lib/thor.rb#626 def find_task_possibilities(meth); end - # source://thor//lib/thor.rb#575 + # source://thor//lib/thor.rb#586 def initialize_added; end # Returns this class at least one of required options array set. @@ -520,7 +533,7 @@ class Thor # ==== Returns # Array[Array[Thor::Option.name]] # - # source://thor//lib/thor.rb#458 + # source://thor//lib/thor.rb#469 def method_at_least_one_option_names; end # Returns this class exclusive options array set. @@ -528,7 +541,7 @@ class Thor # ==== Returns # Array[Array[Thor::Option.name]] # - # source://thor//lib/thor.rb#449 + # source://thor//lib/thor.rb#460 def method_exclusive_option_names; end # receives a (possibly nil) command name and returns a name that is in @@ -541,7 +554,7 @@ class Thor # # @raise [AmbiguousTaskError] # - # source://thor//lib/thor.rb#594 + # source://thor//lib/thor.rb#605 def normalize_command_name(meth); end # receives a (possibly nil) command name and returns a name that is in @@ -554,23 +567,23 @@ class Thor # # @raise [AmbiguousTaskError] # - # source://thor//lib/thor.rb#594 + # source://thor//lib/thor.rb#605 def normalize_task_name(meth); end - # source://thor//lib/thor.rb#482 + # source://thor//lib/thor.rb#493 def print_at_least_one_required_options(shell, command = T.unsafe(nil)); end - # source://thor//lib/thor.rb#471 + # source://thor//lib/thor.rb#482 def print_exclusive_options(shell, command = T.unsafe(nil)); end # Retrieve the command name from given args. # - # source://thor//lib/thor.rb#581 + # source://thor//lib/thor.rb#592 def retrieve_command_name(args); end # Retrieve the command name from given args. # - # source://thor//lib/thor.rb#581 + # source://thor//lib/thor.rb#592 def retrieve_task_name(args); end # Sort the commands, lexicographically by default. @@ -578,16 +591,16 @@ class Thor # Can be overridden in the subclass to change the display order of the # commands. # - # source://thor//lib/thor.rb#642 + # source://thor//lib/thor.rb#653 def sort_commands!(list); end - # source://thor//lib/thor.rb#462 + # source://thor//lib/thor.rb#473 def stop_on_unknown_option; end - # source://thor//lib/thor.rb#630 + # source://thor//lib/thor.rb#641 def subcommand_help(cmd); end - # source://thor//lib/thor.rb#630 + # source://thor//lib/thor.rb#641 def subtask_help(cmd); end end end @@ -2630,7 +2643,7 @@ class Thor::Group # Shortcut to invoke with padding and block handling. Use internally by # invoke and invoke_from_option class methods. # - # source://thor//lib/thor/group.rb#265 + # source://thor//lib/thor/group.rb#276 def _invoke_for_class_method(klass, command = T.unsafe(nil), *args, &block); end class << self @@ -2640,6 +2653,19 @@ class Thor::Group # source://thor//lib/thor/group.rb#161 def class_options_help(shell, groups = T.unsafe(nil)); end + # Checks if a specified command exists. + # + # ==== Parameters + # command_name<String>:: The name of the command to check for existence. + # + # ==== Returns + # Boolean:: +true+ if the command exists, +false+ otherwise. + # + # @return [Boolean] + # + # source://thor//lib/thor/group.rb#221 + def command_exists?(command_name); end + # The description for this Thor::Group. If none is provided, but a source root # exists, tries to find the USAGE one folder above it, otherwise searches # in the superclass. @@ -2747,33 +2773,33 @@ class Thor::Group # The banner for this class. You can customize it if you are invoking the # thor class by another ways which is not the Thor::Runner. # - # source://thor//lib/thor/group.rb#238 + # source://thor//lib/thor/group.rb#249 def banner; end - # source://thor//lib/thor/group.rb#248 + # source://thor//lib/thor/group.rb#259 def baseclass; end - # source://thor//lib/thor/group.rb#252 + # source://thor//lib/thor/group.rb#263 def create_command(meth); end - # source://thor//lib/thor/group.rb#252 + # source://thor//lib/thor/group.rb#263 def create_task(meth); end # The method responsible for dispatching given the args. # # @yield [instance] # - # source://thor//lib/thor/group.rb#217 + # source://thor//lib/thor/group.rb#228 def dispatch(command, given_args, given_opts, config); end # Represents the whole class as a command. # - # source://thor//lib/thor/group.rb#243 + # source://thor//lib/thor/group.rb#254 def self_command; end # Represents the whole class as a command. # - # source://thor//lib/thor/group.rb#243 + # source://thor//lib/thor/group.rb#254 def self_task; end end end diff --git a/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi b/sorbet/rbi/gems/unicode-display_width@2.6.0.rbi similarity index 100% rename from sorbet/rbi/gems/unicode-display_width@2.5.0.rbi rename to sorbet/rbi/gems/unicode-display_width@2.6.0.rbi diff --git a/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi b/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi index 5e5265c..f250226 100644 --- a/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +++ b/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi @@ -388,7 +388,7 @@ class YARDSorbet::TStructProp < ::T::Struct const :types, T::Array[::String] class << self - # source://sorbet-runtime/0.5.11547/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11620/lib/types/struct.rb#13 def inherited(s); end end end diff --git a/sorbet/rbi/gems/yard@0.9.36.rbi b/sorbet/rbi/gems/yard@0.9.37.rbi similarity index 97% rename from sorbet/rbi/gems/yard@0.9.36.rbi rename to sorbet/rbi/gems/yard@0.9.37.rbi index 3f22b57..b7622a2 100644 --- a/sorbet/rbi/gems/yard@0.9.36.rbi +++ b/sorbet/rbi/gems/yard@0.9.37.rbi @@ -3265,11 +3265,11 @@ YARD::CodeObjects::METHODNAMEMATCH = T.let(T.unsafe(nil), Regexp) # # Extra data added to docstring # property :bar # -# source://yard//lib/yard/code_objects/macro_object.rb#30 +# source://yard//lib/yard/code_objects/macro_object.rb#29 class YARD::CodeObjects::MacroObject < ::YARD::CodeObjects::Base # @return [Boolean] whether this macro is attached to a method # - # source://yard//lib/yard/code_objects/macro_object.rb#149 + # source://yard//lib/yard/code_objects/macro_object.rb#148 def attached?; end # Expands the macro using @@ -3284,39 +3284,39 @@ class YARD::CodeObjects::MacroObject < ::YARD::CodeObjects::Base # call, if there is a block. # @see expand # - # source://yard//lib/yard/code_objects/macro_object.rb#167 + # source://yard//lib/yard/code_objects/macro_object.rb#166 def expand(call_params = T.unsafe(nil), full_source = T.unsafe(nil), block_source = T.unsafe(nil)); end # @return [String] the macro data stored on the object # - # source://yard//lib/yard/code_objects/macro_object.rb#142 + # source://yard//lib/yard/code_objects/macro_object.rb#141 def macro_data; end # @return [String] the macro data stored on the object # - # source://yard//lib/yard/code_objects/macro_object.rb#142 + # source://yard//lib/yard/code_objects/macro_object.rb#141 def macro_data=(_arg0); end # @return [CodeObjects::Base] the method object that this macro is # attached to. # - # source://yard//lib/yard/code_objects/macro_object.rb#146 + # source://yard//lib/yard/code_objects/macro_object.rb#145 def method_object; end # @return [CodeObjects::Base] the method object that this macro is # attached to. # - # source://yard//lib/yard/code_objects/macro_object.rb#146 + # source://yard//lib/yard/code_objects/macro_object.rb#145 def method_object=(_arg0); end # Overrides {Base#path} so the macro path is ".macro.MACRONAME" # - # source://yard//lib/yard/code_objects/macro_object.rb#152 + # source://yard//lib/yard/code_objects/macro_object.rb#151 def path; end # Overrides the separator to be '.' # - # source://yard//lib/yard/code_objects/macro_object.rb#155 + # source://yard//lib/yard/code_objects/macro_object.rb#154 def sep; end class << self @@ -3334,7 +3334,7 @@ class YARD::CodeObjects::MacroObject < ::YARD::CodeObjects::Base # @return [String] the expanded macro data # @see find_or_create # - # source://yard//lib/yard/code_objects/macro_object.rb#120 + # source://yard//lib/yard/code_objects/macro_object.rb#119 def apply(docstring, call_params = T.unsafe(nil), full_source = T.unsafe(nil), block_source = T.unsafe(nil), _method_object = T.unsafe(nil)); end # Applies a macro to a docstring, interpolating the macro's data on the @@ -3350,7 +3350,7 @@ class YARD::CodeObjects::MacroObject < ::YARD::CodeObjects::Base # interpolating the block data as a variable. # @return [String] the expanded macro data # - # source://yard//lib/yard/code_objects/macro_object.rb#136 + # source://yard//lib/yard/code_objects/macro_object.rb#135 def apply_macro(macro, docstring, call_params = T.unsafe(nil), full_source = T.unsafe(nil), block_source = T.unsafe(nil)); end # Creates a new macro and fills in the relevant properties. @@ -3361,7 +3361,7 @@ class YARD::CodeObjects::MacroObject < ::YARD::CodeObjects::Base # macro to. If supplied, {#attached?} will be true # @return [MacroObject] the newly created object # - # source://yard//lib/yard/code_objects/macro_object.rb#40 + # source://yard//lib/yard/code_objects/macro_object.rb#39 def create(macro_name, data, method_object = T.unsafe(nil)); end # Parses a given docstring and determines if the macro is "new" or @@ -3381,7 +3381,7 @@ class YARD::CodeObjects::MacroObject < ::YARD::CodeObjects::Base # @return [nil] if the +data+ has no macro tag or if the macro is # not new and no macro by the macro name is found. # - # source://yard//lib/yard/code_objects/macro_object.rb#71 + # source://yard//lib/yard/code_objects/macro_object.rb#70 def create_docstring(macro_name, data, method_object = T.unsafe(nil)); end # Expands +macro_data+ using the interpolation parameters. @@ -3394,7 +3394,7 @@ class YARD::CodeObjects::MacroObject < ::YARD::CodeObjects::Base # # @param macro_data [String] the macro data to expand (taken from {#macro_data}) # - # source://yard//lib/yard/code_objects/macro_object.rb#93 + # source://yard//lib/yard/code_objects/macro_object.rb#92 def expand(macro_data, call_params = T.unsafe(nil), full_source = T.unsafe(nil), block_source = T.unsafe(nil)); end # Finds a macro using +macro_name+ @@ -3403,7 +3403,7 @@ class YARD::CodeObjects::MacroObject < ::YARD::CodeObjects::Base # @return [MacroObject] if a macro is found # @return [nil] if there is no registered macro by that name # - # source://yard//lib/yard/code_objects/macro_object.rb#51 + # source://yard//lib/yard/code_objects/macro_object.rb#50 def find(macro_name); end # Parses a given docstring and determines if the macro is "new" or @@ -3423,12 +3423,12 @@ class YARD::CodeObjects::MacroObject < ::YARD::CodeObjects::Base # @return [nil] if the +data+ has no macro tag or if the macro is # not new and no macro by the macro name is found. # - # source://yard//lib/yard/code_objects/macro_object.rb#71 + # source://yard//lib/yard/code_objects/macro_object.rb#70 def find_or_create(macro_name, data, method_object = T.unsafe(nil)); end end end -# source://yard//lib/yard/code_objects/macro_object.rb#31 +# source://yard//lib/yard/code_objects/macro_object.rb#30 YARD::CodeObjects::MacroObject::MACRO_MATCH = T.let(T.unsafe(nil), Regexp) # Represents a Ruby method in source @@ -4763,7 +4763,7 @@ YARD::Docstring::META_MATCH = T.let(T.unsafe(nil), Regexp) # @see #parse_content # @since 0.8.0 # -# source://yard//lib/yard/docstring_parser.rb#30 +# source://yard//lib/yard/docstring_parser.rb#29 class YARD::DocstringParser # Creates a new parser to parse docstring data # @@ -4772,7 +4772,7 @@ class YARD::DocstringParser # @return [DocstringParser] a new instance of DocstringParser # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#81 + # source://yard//lib/yard/docstring_parser.rb#80 def initialize(library = T.unsafe(nil)); end # Creates a new directive using the registered {#library} @@ -4780,14 +4780,14 @@ class YARD::DocstringParser # @return [Tags::Directive] the directive object that is created # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#232 + # source://yard//lib/yard/docstring_parser.rb#231 def create_directive(tag_name, tag_buf); end # Creates a {Tags::RefTag} # # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#226 + # source://yard//lib/yard/docstring_parser.rb#225 def create_ref_tag(tag_name, name, object_name); end # Creates a tag from the {Tags::DefaultFactory tag factory}. @@ -4799,7 +4799,7 @@ class YARD::DocstringParser # @return [Tags::Tag, Tags::RefTag] a tag # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#209 + # source://yard//lib/yard/docstring_parser.rb#208 def create_tag(tag_name, tag_buf = T.unsafe(nil)); end # @return [Array<Tags::Directive>] a list of directives identified @@ -4807,7 +4807,7 @@ class YARD::DocstringParser # Docstring object. # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#45 + # source://yard//lib/yard/docstring_parser.rb#44 def directives; end # @return [Array<Tags::Directive>] a list of directives identified @@ -4815,7 +4815,7 @@ class YARD::DocstringParser # Docstring object. # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#45 + # source://yard//lib/yard/docstring_parser.rb#44 def directives=(_arg0); end # @return [Handlers::Base, nil] the handler parsing this @@ -4823,7 +4823,7 @@ class YARD::DocstringParser # initialized through # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#66 + # source://yard//lib/yard/docstring_parser.rb#65 def handler; end # @return [Handlers::Base, nil] the handler parsing this @@ -4831,21 +4831,21 @@ class YARD::DocstringParser # initialized through # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#66 + # source://yard//lib/yard/docstring_parser.rb#65 def handler=(_arg0); end # @return [Tags::Library] the tag library being used to # identify registered tags in the docstring. # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#70 + # source://yard//lib/yard/docstring_parser.rb#69 def library; end # @return [Tags::Library] the tag library being used to # identify registered tags in the docstring. # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#70 + # source://yard//lib/yard/docstring_parser.rb#69 def library=(_arg0); end # @return [CodeObjects::Base, nil] the object associated with @@ -4853,7 +4853,7 @@ class YARD::DocstringParser # not attached to any object. # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#56 + # source://yard//lib/yard/docstring_parser.rb#55 def object; end # @return [CodeObjects::Base, nil] the object associated with @@ -4861,7 +4861,7 @@ class YARD::DocstringParser # not attached to any object. # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#56 + # source://yard//lib/yard/docstring_parser.rb#55 def object=(_arg0); end # Parses all content and returns itself. @@ -4878,7 +4878,7 @@ class YARD::DocstringParser # @see #to_docstring # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#113 + # source://yard//lib/yard/docstring_parser.rb#112 def parse(content, object = T.unsafe(nil), handler = T.unsafe(nil)); end # Parses a given block of text. @@ -4888,7 +4888,7 @@ class YARD::DocstringParser # @param content [String] the content to parse # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#129 + # source://yard//lib/yard/docstring_parser.rb#128 def parse_content(content); end # Call post processing callbacks on parser. @@ -4898,19 +4898,19 @@ class YARD::DocstringParser # @return [void] # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#196 + # source://yard//lib/yard/docstring_parser.rb#195 def post_process; end # @return [String] the complete input string to the parser. # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#36 + # source://yard//lib/yard/docstring_parser.rb#35 def raw_text; end # @return [String] the complete input string to the parser. # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#36 + # source://yard//lib/yard/docstring_parser.rb#35 def raw_text=(_arg0); end # @return [CodeObjects::Base, nil] the object referenced by @@ -4918,7 +4918,7 @@ class YARD::DocstringParser # refer to any object. # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#61 + # source://yard//lib/yard/docstring_parser.rb#60 def reference; end # @return [CodeObjects::Base, nil] the object referenced by @@ -4926,7 +4926,7 @@ class YARD::DocstringParser # refer to any object. # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#61 + # source://yard//lib/yard/docstring_parser.rb#60 def reference=(_arg0); end # @return [OpenStruct] any arbitrary state to be passed between @@ -4935,7 +4935,7 @@ class YARD::DocstringParser # used in a docstring). # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#51 + # source://yard//lib/yard/docstring_parser.rb#50 def state; end # @return [OpenStruct] any arbitrary state to be passed between @@ -4944,7 +4944,7 @@ class YARD::DocstringParser # used in a docstring). # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#51 + # source://yard//lib/yard/docstring_parser.rb#50 def state=(_arg0); end # Backward compatibility to detect old tags that should be specified @@ -4953,42 +4953,42 @@ class YARD::DocstringParser # @return [Boolean] # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#252 + # source://yard//lib/yard/docstring_parser.rb#251 def tag_is_directive?(tag_name); end # @return [Array<Tags::Tag>] the list of meta-data tags identified # by the parser # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#40 + # source://yard//lib/yard/docstring_parser.rb#39 def tags; end # @return [Array<Tags::Tag>] the list of meta-data tags identified # by the parser # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#40 + # source://yard//lib/yard/docstring_parser.rb#39 def tags=(_arg0); end # @return [String] the parsed text portion of the docstring, # with tags removed. # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#33 + # source://yard//lib/yard/docstring_parser.rb#32 def text; end # @return [String] the parsed text portion of the docstring, # with tags removed. # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#33 + # source://yard//lib/yard/docstring_parser.rb#32 def text=(_arg0); end # @return [Docstring] translates parsed text into # a Docstring object. # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#95 + # source://yard//lib/yard/docstring_parser.rb#94 def to_docstring; end private @@ -4997,7 +4997,7 @@ class YARD::DocstringParser # # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#324 + # source://yard//lib/yard/docstring_parser.rb#323 def call_after_parse_callbacks; end # Calls the {Tags::Directive#after_parse} callback on all the @@ -5005,17 +5005,17 @@ class YARD::DocstringParser # # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#319 + # source://yard//lib/yard/docstring_parser.rb#318 def call_directives_after_parse; end # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#305 + # source://yard//lib/yard/docstring_parser.rb#304 def detect_reference(content); end # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#301 + # source://yard//lib/yard/docstring_parser.rb#300 def namespace; end class << self @@ -5030,13 +5030,13 @@ class YARD::DocstringParser # with all directives and tags created. # @yieldreturn [void] # - # source://yard//lib/yard/docstring_parser.rb#266 + # source://yard//lib/yard/docstring_parser.rb#265 def after_parse(&block); end # @return [Array<Proc>] the {after_parse} callback proc objects # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#271 + # source://yard//lib/yard/docstring_parser.rb#270 def after_parse_callbacks; end end end @@ -5045,7 +5045,7 @@ end # # @since 0.8.0 # -# source://yard//lib/yard/docstring_parser.rb#73 +# source://yard//lib/yard/docstring_parser.rb#72 YARD::DocstringParser::META_MATCH = T.let(T.unsafe(nil), Regexp) # source://yard//lib/yard/gem_index.rb#6 @@ -5954,14 +5954,14 @@ end # # @see Handlers::Base # -# source://yard//lib/yard/handlers/processor.rb#20 +# source://yard//lib/yard/handlers/processor.rb#19 class YARD::Handlers::Processor # Creates a new Processor for a +file+. # # @param parser [Parser::SourceParser] the parser used to initialize the processor # @return [Processor] a new instance of Processor # - # source://yard//lib/yard/handlers/processor.rb#92 + # source://yard//lib/yard/handlers/processor.rb#91 def initialize(parser); end # Share state across different handlers inside of a file. @@ -5974,7 +5974,7 @@ class YARD::Handlers::Processor # @return [OpenStruct] an open structure that can store arbitrary data # @see #globals # - # source://yard//lib/yard/handlers/processor.rb#88 + # source://yard//lib/yard/handlers/processor.rb#87 def extra_state; end # Share state across different handlers inside of a file. @@ -5987,17 +5987,17 @@ class YARD::Handlers::Processor # @return [OpenStruct] an open structure that can store arbitrary data # @see #globals # - # source://yard//lib/yard/handlers/processor.rb#88 + # source://yard//lib/yard/handlers/processor.rb#87 def extra_state=(_arg0); end # @return [String] the filename # - # source://yard//lib/yard/handlers/processor.rb#41 + # source://yard//lib/yard/handlers/processor.rb#40 def file; end # @return [String] the filename # - # source://yard//lib/yard/handlers/processor.rb#41 + # source://yard//lib/yard/handlers/processor.rb#40 def file=(_arg0); end # Searches for all handlers in {Base.subclasses} that match the +statement+ @@ -6005,7 +6005,7 @@ class YARD::Handlers::Processor # @param statement the statement object to match. # @return [Array<Base>] a list of handlers to process the statement with. # - # source://yard//lib/yard/handlers/processor.rb#151 + # source://yard//lib/yard/handlers/processor.rb#150 def find_handlers(statement); end # Handlers can share state for the entire post processing stage through @@ -6025,7 +6025,7 @@ class YARD::Handlers::Processor # @return [OpenStruct] global shared state for post-processing stage # @see #extra_state # - # source://yard//lib/yard/handlers/processor.rb#77 + # source://yard//lib/yard/handlers/processor.rb#76 def globals; end # Handlers can share state for the entire post processing stage through @@ -6045,17 +6045,17 @@ class YARD::Handlers::Processor # @return [OpenStruct] global shared state for post-processing stage # @see #extra_state # - # source://yard//lib/yard/handlers/processor.rb#77 + # source://yard//lib/yard/handlers/processor.rb#76 def globals=(_arg0); end # @return [CodeObjects::NamespaceObject] the current namespace # - # source://yard//lib/yard/handlers/processor.rb#44 + # source://yard//lib/yard/handlers/processor.rb#43 def namespace; end # @return [CodeObjects::NamespaceObject] the current namespace # - # source://yard//lib/yard/handlers/processor.rb#44 + # source://yard//lib/yard/handlers/processor.rb#43 def namespace=(_arg0); end # @return [CodeObjects::Base, nil] unlike the namespace, the owner @@ -6063,7 +6063,7 @@ class YARD::Handlers::Processor # For instance, when parsing a method body, the {CodeObjects::MethodObject} # is set as the owner, in case any extra method information is processed. # - # source://yard//lib/yard/handlers/processor.rb#56 + # source://yard//lib/yard/handlers/processor.rb#55 def owner; end # @return [CodeObjects::Base, nil] unlike the namespace, the owner @@ -6071,7 +6071,7 @@ class YARD::Handlers::Processor # For instance, when parsing a method body, the {CodeObjects::MethodObject} # is set as the owner, in case any extra method information is processed. # - # source://yard//lib/yard/handlers/processor.rb#56 + # source://yard//lib/yard/handlers/processor.rb#55 def owner=(_arg0); end # Continue parsing the remainder of the files in the +globals.ordered_parser+ @@ -6081,17 +6081,17 @@ class YARD::Handlers::Processor # @return [void] # @see Parser::OrderedParser # - # source://yard//lib/yard/handlers/processor.rb#140 + # source://yard//lib/yard/handlers/processor.rb#139 def parse_remaining_files; end # @return [Symbol] the parser type (:ruby, :ruby18, :c) # - # source://yard//lib/yard/handlers/processor.rb#59 + # source://yard//lib/yard/handlers/processor.rb#58 def parser_type; end # @return [Symbol] the parser type (:ruby, :ruby18, :c) # - # source://yard//lib/yard/handlers/processor.rb#59 + # source://yard//lib/yard/handlers/processor.rb#58 def parser_type=(_arg0); end # Processes a list of statements by finding handlers to process each @@ -6100,27 +6100,27 @@ class YARD::Handlers::Processor # @param statements [Array] a list of statements # @return [void] # - # source://yard//lib/yard/handlers/processor.rb#110 + # source://yard//lib/yard/handlers/processor.rb#109 def process(statements); end # @return [Symbol] the current scope (class, instance) # - # source://yard//lib/yard/handlers/processor.rb#50 + # source://yard//lib/yard/handlers/processor.rb#49 def scope; end # @return [Symbol] the current scope (class, instance) # - # source://yard//lib/yard/handlers/processor.rb#50 + # source://yard//lib/yard/handlers/processor.rb#49 def scope=(_arg0); end # @return [Symbol] the current visibility (public, private, protected) # - # source://yard//lib/yard/handlers/processor.rb#47 + # source://yard//lib/yard/handlers/processor.rb#46 def visibility; end # @return [Symbol] the current visibility (public, private, protected) # - # source://yard//lib/yard/handlers/processor.rb#47 + # source://yard//lib/yard/handlers/processor.rb#46 def visibility=(_arg0); end private @@ -6129,7 +6129,7 @@ class YARD::Handlers::Processor # # @return [Base] the base class # - # source://yard//lib/yard/handlers/processor.rb#172 + # source://yard//lib/yard/handlers/processor.rb#171 def handler_base_class; end # The module holding the handlers to be loaded @@ -6137,12 +6137,12 @@ class YARD::Handlers::Processor # @return [Module] the module containing the handlers depending on # {#parser_type}. # - # source://yard//lib/yard/handlers/processor.rb#180 + # source://yard//lib/yard/handlers/processor.rb#179 def handler_base_namespace; end # @return [Boolean] # - # source://yard//lib/yard/handlers/processor.rb#161 + # source://yard//lib/yard/handlers/processor.rb#160 def handles?(handler, statement); end # Loads handlers from {#handler_base_namespace}. This ensures that @@ -6151,7 +6151,7 @@ class YARD::Handlers::Processor # # @return [void] # - # source://yard//lib/yard/handlers/processor.rb#188 + # source://yard//lib/yard/handlers/processor.rb#187 def load_handlers; end class << self @@ -6159,14 +6159,14 @@ class YARD::Handlers::Processor # @return [Hash] a list of registered parser type extensions # @since 0.6.0 # - # source://yard//lib/yard/handlers/processor.rb#33 + # source://yard//lib/yard/handlers/processor.rb#32 def namespace_for_handler; end # Registers a new namespace for handlers of the given type. # # @since 0.6.0 # - # source://yard//lib/yard/handlers/processor.rb#24 + # source://yard//lib/yard/handlers/processor.rb#23 def register_handler_namespace(type, ns); end end end @@ -6999,6 +6999,11 @@ end # source://yard//lib/yard/handlers/ruby/visibility_handler.rb#3 class YARD::Handlers::Ruby::VisibilityHandler < ::YARD::Handlers::Ruby::Base include ::YARD::Handlers::Ruby::DecoratorHandlerMethods + + # @return [Boolean] + # + # source://yard//lib/yard/handlers/ruby/visibility_handler.rb#31 + def is_attribute_method?(node); end end # Handles 'yield' calls @@ -7461,13 +7466,16 @@ end # Handles console logging for info, warnings and errors. # Uses the stdlib Logger class in Ruby for all the backend logic. # -# source://yard//lib/yard/logging.rb#9 -class YARD::Logger < ::Logger +# source://yard//lib/yard/logging.rb#8 +class YARD::Logger + include ::YARD::Logger::Severity + # Creates a new logger # + # @private # @return [Logger] a new instance of Logger # - # source://yard//lib/yard/logging.rb#43 + # source://yard//lib/yard/logging.rb#82 def initialize(pipe, *args); end # Displays an unformatted line to the logger output stream. @@ -7476,7 +7484,7 @@ class YARD::Logger < ::Logger # @return [void] # @since 0.8.2 # - # source://yard//lib/yard/logging.rb#143 + # source://yard//lib/yard/logging.rb#205 def <<(msg = T.unsafe(nil)); end # Prints the backtrace +exc+ to the logger as error data. @@ -7485,7 +7493,7 @@ class YARD::Logger < ::Logger # @param level_meth [Symbol] the level to log backtrace at # @return [void] # - # source://yard//lib/yard/logging.rb#154 + # source://yard//lib/yard/logging.rb#216 def backtrace(exc, level_meth = T.unsafe(nil)); end # Captures the duration of a block of code for benchmark analysis. Also @@ -7498,7 +7506,7 @@ class YARD::Logger < ::Logger # @todo Implement capture storage for reporting of benchmarks # @yield a block of arbitrary code to benchmark # - # source://yard//lib/yard/logging.rb#80 + # source://yard//lib/yard/logging.rb#234 def capture(msg, nontty_log = T.unsafe(nil)); end # Clears the progress indicator in the TTY display. @@ -7506,14 +7514,18 @@ class YARD::Logger < ::Logger # @return [void] # @since 0.8.2 # - # source://yard//lib/yard/logging.rb#121 + # source://yard//lib/yard/logging.rb#186 def clear_progress; end - # Changes the debug level to DEBUG if $DEBUG is set - # and writes a debugging message. + # Changes the debug level to DEBUG if $DEBUG is set and writes a debugging message. + # Logs a message with the debug severity level. # - # source://yard//lib/yard/logging.rb#59 - def debug(*args); end + # @param message [String] the message to log + # @return [void] + # @see #log + # + # source://yard//lib/yard/logging.rb#103 + def debug(message); end # Sets the logger level for the duration of the block # @@ -7525,17 +7537,65 @@ class YARD::Logger < ::Logger # values can be found in Ruby's Logger class. # @yield the block with the logger temporarily set to +new_level+ # - # source://yard//lib/yard/logging.rb#179 + # source://yard//lib/yard/logging.rb#142 def enter_level(new_level = T.unsafe(nil)); end + # Logs a message with the error severity level. + # + # @param message [String] the message to log + # @return [void] + # @see #log + # + # source://yard//lib/yard/logging.rb#103 + def error(message); end + + # Logs a message with the fatal severity level. + # + # @param message [String] the message to log + # @return [void] + # @see #log + # + # source://yard//lib/yard/logging.rb#103 + def fatal(message); end + + # Logs a message with the info severity level. + # + # @param message [String] the message to log + # @return [void] + # @see #log + # + # source://yard//lib/yard/logging.rb#103 + def info(message); end + # @return [IO] the IO object being logged to # @since 0.8.2 # - # source://yard//lib/yard/logging.rb#17 + # source://yard//lib/yard/logging.rb#49 def io; end - # source://yard//lib/yard/logging.rb#18 - def io=(pipe); end + # @return [IO] the IO object being logged to + # @since 0.8.2 + # + # source://yard//lib/yard/logging.rb#49 + def io=(_arg0); end + + # @return [DEBUG, INFO, WARN, ERROR, FATAL, UNKNOWN] the logging level + # + # source://yard//lib/yard/logging.rb#57 + def level; end + + # @return [DEBUG, INFO, WARN, ERROR, FATAL, UNKNOWN] the logging level + # + # source://yard//lib/yard/logging.rb#57 + def level=(_arg0); end + + # Logs a message with a given severity + # + # @param severity [DEBUG, INFO, WARN, ERROR, FATAL, UNKNOWN] the severity level + # @param message [String] the message to log + # + # source://yard//lib/yard/logging.rb#122 + def log(severity, message); end # Displays an unformatted line to the logger output stream. # @@ -7543,7 +7603,7 @@ class YARD::Logger < ::Logger # @return [void] # @since 0.8.2 # - # source://yard//lib/yard/logging.rb#143 + # source://yard//lib/yard/logging.rb#205 def print(msg = T.unsafe(nil)); end # Displays a progress indicator for a given message. This progress report @@ -7556,7 +7616,7 @@ class YARD::Logger < ::Logger # @return [void] # @since 0.8.2 # - # source://yard//lib/yard/logging.rb#96 + # source://yard//lib/yard/logging.rb#161 def progress(msg, nontty_log = T.unsafe(nil)); end # Displays an unformatted line to the logger output stream, adding @@ -7566,86 +7626,91 @@ class YARD::Logger < ::Logger # @return [void] # @since 0.8.2 # - # source://yard//lib/yard/logging.rb#132 + # source://yard//lib/yard/logging.rb#197 def puts(msg = T.unsafe(nil)); end # @return [Boolean] whether backtraces should be shown (by default # this is on). # - # source://yard//lib/yard/logging.rb#22 + # source://yard//lib/yard/logging.rb#53 def show_backtraces; end # Sets the attribute show_backtraces # # @param value the value to set the attribute show_backtraces to. # - # source://yard//lib/yard/logging.rb#23 + # source://yard//lib/yard/logging.rb#54 def show_backtraces=(_arg0); end # @return [Boolean] whether progress indicators should be shown when # logging CLIs (by default this is off). # - # source://yard//lib/yard/logging.rb#27 + # source://yard//lib/yard/logging.rb#64 def show_progress; end # Sets the attribute show_progress # # @param value the value to set the attribute show_progress to. # - # source://yard//lib/yard/logging.rb#34 + # source://yard//lib/yard/logging.rb#70 def show_progress=(_arg0); end + # Logs a message with the unknown severity level. + # + # @param message [String] the message to log + # @return [void] + # @see #log + # + # source://yard//lib/yard/logging.rb#103 + def unknown(message); end + # Remembers when a warning occurs and writes a warning message. + # Logs a message with the warn severity level. # - # source://yard//lib/yard/logging.rb#65 - def warn(*args); end + # @param message [String] the message to log + # @return [void] + # @see #log + # + # source://yard//lib/yard/logging.rb#103 + def warn(message); end # Warns that the Ruby environment does not support continuations. Applies # to JRuby, Rubinius and MacRuby. This warning will only display once # per Ruby process. # # @deprecated Continuations are no longer needed by YARD 0.8.0+. + # @private # @return [void] # - # source://yard//lib/yard/logging.rb#167 + # source://yard//lib/yard/logging.rb#250 def warn_no_continuations; end - # Returns the value of attribute warned. + # @return [Boolean] whether a warn message has been emitted. Used for status tracking. # - # source://yard//lib/yard/logging.rb#69 + # source://yard//lib/yard/logging.rb#60 def warned; end - # Sets the attribute warned + # @return [Boolean] whether a warn message has been emitted. Used for status tracking. # - # @param value the value to set the attribute warned to. - # - # source://yard//lib/yard/logging.rb#69 + # source://yard//lib/yard/logging.rb#60 def warned=(_arg0); end private - # Override this internal Logger method to clear line - # - # source://yard//lib/yard/logging.rb#190 - def add(*args); end - - # source://yard//lib/yard/logging.rb#195 + # source://yard//lib/yard/logging.rb#255 def clear_line; end - # Log format (from Logger implementation). Used by Logger internally - # - # source://yard//lib/yard/logging.rb#201 - def format_log(sev, _time, _prog, msg); end - - # source://logger/1.6.0/lib/logger.rb#684 - def print_no_newline(msg); end - class << self + # @private + # + # source://yard//lib/yard/logging.rb#101 + def create_log_method(name); end + # The logger instance # # @return [Logger] the logger instance # - # source://yard//lib/yard/logging.rb#38 + # source://yard//lib/yard/logging.rb#76 def instance(pipe = T.unsafe(nil)); end end end @@ -7655,9 +7720,97 @@ end # # @since 0.8.2 # -# source://yard//lib/yard/logging.rb#13 +# source://yard//lib/yard/logging.rb#45 YARD::Logger::PROGRESS_INDICATORS = T.let(T.unsafe(nil), Array) +# Log severity levels +# +# source://yard//lib/yard/logging.rb#10 +module YARD::Logger::Severity; end + +# Debugging log level +# +# source://yard//lib/yard/logging.rb#12 +YARD::Logger::Severity::DEBUG = T.let(T.unsafe(nil), Integer) + +# Error log level +# +# source://yard//lib/yard/logging.rb#21 +YARD::Logger::Severity::ERROR = T.let(T.unsafe(nil), Integer) + +# Fatal log level +# +# source://yard//lib/yard/logging.rb#24 +YARD::Logger::Severity::FATAL = T.let(T.unsafe(nil), Integer) + +# Information log level +# +# source://yard//lib/yard/logging.rb#15 +YARD::Logger::Severity::INFO = T.let(T.unsafe(nil), Integer) + +# @private +# +# source://yard//lib/yard/logging.rb#30 +YARD::Logger::Severity::SEVERITIES = T.let(T.unsafe(nil), Hash) + +# Unknown log level +# +# source://yard//lib/yard/logging.rb#27 +YARD::Logger::Severity::UNKNOWN = T.let(T.unsafe(nil), Integer) + +# Warning log level +# +# source://yard//lib/yard/logging.rb#18 +YARD::Logger::Severity::WARN = T.let(T.unsafe(nil), Integer) + +# An OpenStruct compatible struct class that allows for basic access of attributes +# via +struct.attr_name+ and +struct.attr_name = value+. +# +# source://yard//lib/yard/open_struct.rb#4 +class YARD::OpenStruct + # @return [OpenStruct] a new instance of OpenStruct + # + # source://yard//lib/yard/open_struct.rb#5 + def initialize(hash = T.unsafe(nil)); end + + # source://yard//lib/yard/open_struct.rb#25 + def ==(other); end + + # source://yard//lib/yard/open_struct.rb#41 + def [](key); end + + # source://yard//lib/yard/open_struct.rb#37 + def []=(key, value); end + + # source://yard//lib/yard/open_struct.rb#33 + def dig(*keys); end + + # source://yard//lib/yard/open_struct.rb#45 + def each_pair(&block); end + + # source://yard//lib/yard/open_struct.rb#29 + def hash; end + + # source://yard//lib/yard/open_struct.rb#49 + def marshal_dump; end + + # source://yard//lib/yard/open_struct.rb#53 + def marshal_load(data); end + + # @private + # + # source://yard//lib/yard/open_struct.rb#10 + def method_missing(name, *args); end + + # source://yard//lib/yard/open_struct.rb#21 + def to_h; end + + private + + # source://yard//lib/yard/open_struct.rb#59 + def __cache_lookup__(name); end +end + # Generalized options class for passing around large amounts of options between objects. # # The options class exists for better visibility and documentability of options being @@ -8209,7 +8362,7 @@ end # # @see Processor#parse_remaining_files # -# source://yard//lib/yard/parser/source_parser.rb#21 +# source://yard//lib/yard/parser/source_parser.rb#20 class YARD::Parser::OrderedParser # Creates a new OrderedParser with the global state and a list # of files to parse. @@ -8221,30 +8374,30 @@ class YARD::Parser::OrderedParser # @param files [Array<String>] the list of files to parse # @return [OrderedParser] a new instance of OrderedParser # - # source://yard//lib/yard/parser/source_parser.rb#33 + # source://yard//lib/yard/parser/source_parser.rb#32 def initialize(global_state, files); end # @return [Array<String>] the list of remaining files to parse # - # source://yard//lib/yard/parser/source_parser.rb#23 + # source://yard//lib/yard/parser/source_parser.rb#22 def files; end # @return [Array<String>] the list of remaining files to parse # - # source://yard//lib/yard/parser/source_parser.rb#23 + # source://yard//lib/yard/parser/source_parser.rb#22 def files=(_arg0); end # Parses the remainder of the {#files} list. # # @see Processor#parse_remaining_files # - # source://yard//lib/yard/parser/source_parser.rb#42 + # source://yard//lib/yard/parser/source_parser.rb#41 def parse; end end # Raised when the parser sees a Ruby syntax error # -# source://yard//lib/yard/parser/source_parser.rb#13 +# source://yard//lib/yard/parser/source_parser.rb#12 class YARD::Parser::ParserSyntaxError < ::YARD::Parser::UndocumentableError; end # Ruby parsing components. @@ -8689,6 +8842,9 @@ class YARD::Parser::Ruby::Legacy::RubyLex # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#430 def continue; end + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1116 + def dedent(str); end + # Returns the value of attribute exception_on_syntax_error. # # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#463 @@ -8713,7 +8869,7 @@ class YARD::Parser::Ruby::Legacy::RubyLex # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#488 def gets; end - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1257 + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1272 def identify_comment; end # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#945 @@ -8725,13 +8881,13 @@ class YARD::Parser::Ruby::Legacy::RubyLex # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#980 def identify_identifier; end - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1130 + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1145 def identify_number(start); end - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1111 + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1126 def identify_quotation(initial_char); end - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1192 + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1207 def identify_string(ltype, quoted = T.unsafe(nil), opener = T.unsafe(nil), initial_char = T.unsafe(nil)); end # Returns the value of attribute indent. @@ -8778,10 +8934,10 @@ class YARD::Parser::Ruby::Legacy::RubyLex # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#462 def read_auto_clean_up=(_arg0); end - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1280 + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1295 def read_escape; end - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1242 + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1257 def skip_inner_expression; end # Returns the value of attribute skip_space. @@ -10970,7 +11126,7 @@ end # @see Handlers::Base # @see CodeObjects::Base # -# source://yard//lib/yard/parser/source_parser.rb#64 +# source://yard//lib/yard/parser/source_parser.rb#63 class YARD::Parser::SourceParser # @overload initialize # @return [SourceParser] a new instance of SourceParser @@ -11226,7 +11382,7 @@ class YARD::Parser::SourceParser # {YARD::Logger} # @return [void] # - # source://yard//lib/yard/parser/source_parser.rb#100 + # source://yard//lib/yard/parser/source_parser.rb#99 def parse(paths = T.unsafe(nil), excluded = T.unsafe(nil), level = T.unsafe(nil)); end # Parses a string +content+ @@ -11240,10 +11396,10 @@ class YARD::Parser::SourceParser # @return [Symbol] the default parser type (defaults to :ruby) # - # source://yard//lib/yard/parser/source_parser.rb#86 + # source://yard//lib/yard/parser/source_parser.rb#85 def parser_type; end - # source://yard//lib/yard/parser/source_parser.rb#88 + # source://yard//lib/yard/parser/source_parser.rb#87 def parser_type=(value); end # @private @@ -11324,30 +11480,30 @@ end # # @since 0.9.0 # -# source://yard//lib/yard/parser/source_parser.rb#71 +# source://yard//lib/yard/parser/source_parser.rb#70 YARD::Parser::SourceParser::DEFAULT_PATH_GLOB = T.let(T.unsafe(nil), Array) # Byte order marks for various encodings # # @since 0.7.0 # -# source://yard//lib/yard/parser/source_parser.rb#75 +# source://yard//lib/yard/parser/source_parser.rb#74 YARD::Parser::SourceParser::ENCODING_BYTE_ORDER_MARKS = T.let(T.unsafe(nil), Hash) -# source://yard//lib/yard/parser/source_parser.rb#66 +# source://yard//lib/yard/parser/source_parser.rb#65 YARD::Parser::SourceParser::ENCODING_LINE = T.let(T.unsafe(nil), Regexp) -# source://yard//lib/yard/parser/source_parser.rb#67 +# source://yard//lib/yard/parser/source_parser.rb#66 YARD::Parser::SourceParser::FROZEN_STRING_LINE = T.let(T.unsafe(nil), Regexp) -# source://yard//lib/yard/parser/source_parser.rb#65 +# source://yard//lib/yard/parser/source_parser.rb#64 YARD::Parser::SourceParser::SHEBANG_LINE = T.let(T.unsafe(nil), Regexp) # Raised when an object is recognized but cannot be documented. This # generally occurs when the Ruby syntax used to declare an object is # too dynamic in nature. # -# source://yard//lib/yard/parser/source_parser.rb#10 +# source://yard//lib/yard/parser/source_parser.rb#9 class YARD::Parser::UndocumentableError < ::RuntimeError; end # The root path for YARD source libraries @@ -14622,42 +14778,42 @@ module YARD::Tags; end # @see tag:!method # @since 0.7.0 # -# source://yard//lib/yard/tags/directives.rb#461 +# source://yard//lib/yard/tags/directives.rb#460 class YARD::Tags::AttributeDirective < ::YARD::Tags::MethodDirective # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#462 + # source://yard//lib/yard/tags/directives.rb#461 def after_parse; end protected # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#470 + # source://yard//lib/yard/tags/directives.rb#469 def method_name; end # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#476 + # source://yard//lib/yard/tags/directives.rb#475 def method_signature; end private # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#486 + # source://yard//lib/yard/tags/directives.rb#485 def create_attribute_data(object); end # @return [Boolean] # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#516 + # source://yard//lib/yard/tags/directives.rb#515 def readable?; end # @return [Boolean] # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#512 + # source://yard//lib/yard/tags/directives.rb#511 def writable?; end end @@ -14791,14 +14947,14 @@ end # @see Library.define_directive # @since 0.8.0 # -# source://yard//lib/yard/tags/directives.rb#23 +# source://yard//lib/yard/tags/directives.rb#22 class YARD::Tags::Directive # @param tag [Tag] the meta-data tag containing all input to the docstring # @param parser [DocstringParser] the docstring parser object # @return [Directive] a new instance of Directive # @since 0.8.0 # - # source://yard//lib/yard/tags/directives.rb#55 + # source://yard//lib/yard/tags/directives.rb#54 def initialize(tag, parser); end # Called after parsing all directives and tags in the docstring. Used @@ -14807,7 +14963,7 @@ class YARD::Tags::Directive # @return [void] # @since 0.8.0 # - # source://yard//lib/yard/tags/directives.rb#74 + # source://yard//lib/yard/tags/directives.rb#73 def after_parse; end # Called when processing the directive. Subclasses should implement @@ -14819,7 +14975,7 @@ class YARD::Tags::Directive # @return [void] # @since 0.8.0 # - # source://yard//lib/yard/tags/directives.rb#69 + # source://yard//lib/yard/tags/directives.rb#68 def call; end # Set this field to replace the directive definition inside of a docstring @@ -14831,7 +14987,7 @@ class YARD::Tags::Directive # @return [nil] if no expansion should take place for this directive # @since 0.8.0 # - # source://yard//lib/yard/tags/directives.rb#34 + # source://yard//lib/yard/tags/directives.rb#33 def expanded_text; end # Set this field to replace the directive definition inside of a docstring @@ -14843,7 +14999,7 @@ class YARD::Tags::Directive # @return [nil] if no expansion should take place for this directive # @since 0.8.0 # - # source://yard//lib/yard/tags/directives.rb#34 + # source://yard//lib/yard/tags/directives.rb#33 def expanded_text=(_arg0); end # @return [Handlers::Base, nil] the handler object the docstring parser @@ -14851,33 +15007,33 @@ class YARD::Tags::Directive # through {Parser::SourceParser}. # @since 0.8.0 # - # source://yard//lib/yard/tags/directives.rb#49 + # source://yard//lib/yard/tags/directives.rb#48 def handler; end # @return [CodeObjects::Base, nil] the object the parent docstring is # attached to. May be nil. # @since 0.8.0 # - # source://yard//lib/yard/tags/directives.rb#43 + # source://yard//lib/yard/tags/directives.rb#42 def object; end # @return [DocstringParser] the parser that is parsing all tag # information out of the docstring # @since 0.8.0 # - # source://yard//lib/yard/tags/directives.rb#38 + # source://yard//lib/yard/tags/directives.rb#37 def parser=(_arg0); end # @return [Tag] the meta-data tag containing data input to the directive # @since 0.8.0 # - # source://yard//lib/yard/tags/directives.rb#25 + # source://yard//lib/yard/tags/directives.rb#24 def tag; end # @return [Tag] the meta-data tag containing data input to the directive # @since 0.8.0 # - # source://yard//lib/yard/tags/directives.rb#25 + # source://yard//lib/yard/tags/directives.rb#24 def tag=(_arg0); end protected @@ -14885,14 +15041,14 @@ class YARD::Tags::Directive # @return [Boolean] # @since 0.8.0 # - # source://yard//lib/yard/tags/directives.rb#80 + # source://yard//lib/yard/tags/directives.rb#79 def inside_directive?; end # @return [DocstringParser] the parser that is parsing all tag # information out of the docstring # @since 0.8.0 # - # source://yard//lib/yard/tags/directives.rb#38 + # source://yard//lib/yard/tags/directives.rb#37 def parser; end end @@ -14916,11 +15072,11 @@ end # @see tag:!group # @since 0.6.0 # -# source://yard//lib/yard/tags/directives.rb#105 +# source://yard//lib/yard/tags/directives.rb#104 class YARD::Tags::EndGroupDirective < ::YARD::Tags::Directive # @since 0.6.0 # - # source://yard//lib/yard/tags/directives.rb#106 + # source://yard//lib/yard/tags/directives.rb#105 def call; end end @@ -14941,11 +15097,11 @@ end # @see tag:!endgroup # @since 0.6.0 # -# source://yard//lib/yard/tags/directives.rb#128 +# source://yard//lib/yard/tags/directives.rb#127 class YARD::Tags::GroupDirective < ::YARD::Tags::Directive # @since 0.6.0 # - # source://yard//lib/yard/tags/directives.rb#129 + # source://yard//lib/yard/tags/directives.rb#128 def call; end end @@ -15710,12 +15866,12 @@ end # end # @since 0.7.0 # -# source://yard//lib/yard/tags/directives.rb#258 +# source://yard//lib/yard/tags/directives.rb#257 class YARD::Tags::MacroDirective < ::YARD::Tags::Directive # @raise [TagFormatError] # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#259 + # source://yard//lib/yard/tags/directives.rb#258 def call; end private @@ -15723,40 +15879,40 @@ class YARD::Tags::MacroDirective < ::YARD::Tags::Directive # @return [Boolean] # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#288 + # source://yard//lib/yard/tags/directives.rb#287 def anonymous?; end # @return [Boolean] # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#277 + # source://yard//lib/yard/tags/directives.rb#276 def attach?; end # @return [Boolean] # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#283 + # source://yard//lib/yard/tags/directives.rb#282 def class_method?; end # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#292 + # source://yard//lib/yard/tags/directives.rb#291 def expand(macro_data); end # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#308 + # source://yard//lib/yard/tags/directives.rb#307 def find_or_create; end # @return [Boolean] # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#272 + # source://yard//lib/yard/tags/directives.rb#271 def new?; end # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#332 + # source://yard//lib/yard/tags/directives.rb#331 def warn; end end @@ -15789,49 +15945,49 @@ end # @see tag:!attribute # @since 0.7.0 # -# source://yard//lib/yard/tags/directives.rb#368 +# source://yard//lib/yard/tags/directives.rb#367 class YARD::Tags::MethodDirective < ::YARD::Tags::Directive # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#373 + # source://yard//lib/yard/tags/directives.rb#372 def after_parse; end # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#371 + # source://yard//lib/yard/tags/directives.rb#370 def call; end protected # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#413 + # source://yard//lib/yard/tags/directives.rb#412 def create_object; end # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#381 + # source://yard//lib/yard/tags/directives.rb#380 def method_name; end # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#390 + # source://yard//lib/yard/tags/directives.rb#389 def method_signature; end # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#394 + # source://yard//lib/yard/tags/directives.rb#393 def sanitized_tag_signature; end # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#403 + # source://yard//lib/yard/tags/directives.rb#402 def use_indented_text; end end # @since 0.7.0 # -# source://yard//lib/yard/tags/directives.rb#369 +# source://yard//lib/yard/tags/directives.rb#368 YARD::Tags::MethodDirective::SCOPE_MATCH = T.let(T.unsafe(nil), Regexp) # source://yard//lib/yard/tags/option_tag.rb#4 @@ -15943,11 +16099,11 @@ end # # } # @since 0.8.0 # -# source://yard//lib/yard/tags/directives.rb#545 +# source://yard//lib/yard/tags/directives.rb#544 class YARD::Tags::ParseDirective < ::YARD::Tags::Directive # @since 0.8.0 # - # source://yard//lib/yard/tags/directives.rb#546 + # source://yard//lib/yard/tags/directives.rb#545 def call; end end @@ -16031,11 +16187,11 @@ end # def method2; end # @since 0.7.0 # -# source://yard//lib/yard/tags/directives.rb#579 +# source://yard//lib/yard/tags/directives.rb#578 class YARD::Tags::ScopeDirective < ::YARD::Tags::Directive # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#580 + # source://yard//lib/yard/tags/directives.rb#579 def call; end end @@ -16066,7 +16222,7 @@ class YARD::Tags::Tag # @param name [String] optional key name which the tag refers to # @return [Tag] a new instance of Tag # - # source://yard//lib/yard/tags/tag.rb#44 + # source://yard//lib/yard/tags/tag.rb#45 def initialize(tag_name, text, types = T.unsafe(nil), name = T.unsafe(nil)); end # Provides a plain English summary of the type specification, or nil @@ -16075,27 +16231,29 @@ class YARD::Tags::Tag # @return [String] a plain English description of the associated types # @return [nil] if no types are provided or not parsable # - # source://yard//lib/yard/tags/tag.rb#65 + # source://yard//lib/yard/tags/tag.rb#66 def explain_types; end # @return [String] a name associated with the tag + # @return [nil] if no tag name is supplied # - # source://yard//lib/yard/tags/tag.rb#26 + # source://yard//lib/yard/tags/tag.rb#27 def name; end # @return [String] a name associated with the tag + # @return [nil] if no tag name is supplied # - # source://yard//lib/yard/tags/tag.rb#26 + # source://yard//lib/yard/tags/tag.rb#27 def name=(_arg0); end # @return [CodeObjects::Base] the associated object # - # source://yard//lib/yard/tags/tag.rb#29 + # source://yard//lib/yard/tags/tag.rb#30 def object; end # @return [CodeObjects::Base] the associated object # - # source://yard//lib/yard/tags/tag.rb#29 + # source://yard//lib/yard/tags/tag.rb#30 def object=(_arg0); end # @return [String] the name of the tag @@ -16126,7 +16284,7 @@ class YARD::Tags::Tag # @return [String] the first of the list of specified types # @see #types # - # source://yard//lib/yard/tags/tag.rb#56 + # source://yard//lib/yard/tags/tag.rb#57 def type; end # @return [Array<String>] a list of types associated with the tag @@ -16317,11 +16475,11 @@ end # def method2; end # @since 0.7.0 # -# source://yard//lib/yard/tags/directives.rb#611 +# source://yard//lib/yard/tags/directives.rb#610 class YARD::Tags::VisibilityDirective < ::YARD::Tags::Directive # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#612 + # source://yard//lib/yard/tags/directives.rb#611 def call; end end @@ -16337,7 +16495,7 @@ module YARD::Templates; end # * To render a template, call {render}. # * To register a template path in the lookup paths, call {register_template_path}. # -# source://yard//lib/yard/templates/engine.rb#12 +# source://yard//lib/yard/templates/engine.rb#11 module YARD::Templates::Engine class << self # Passes a set of objects to the +:fulldoc+ template for full documentation generation. @@ -16349,7 +16507,7 @@ module YARD::Templates::Engine # @param options [Hash] (see {render}) # @return [void] # - # source://yard//lib/yard/templates/engine.rb#101 + # source://yard//lib/yard/templates/engine.rb#100 def generate(objects, options = T.unsafe(nil)); end # Registers a new template path in {template_paths} @@ -16357,7 +16515,7 @@ module YARD::Templates::Engine # @param path [String] a new template path # @return [void] # - # source://yard//lib/yard/templates/engine.rb#21 + # source://yard//lib/yard/templates/engine.rb#20 def register_template_path(path); end # Renders a template on a {CodeObjects::Base code object} using @@ -16378,7 +16536,7 @@ module YARD::Templates::Engine # @param options [Hash] the options hash # @return [String] the rendered template # - # source://yard//lib/yard/templates/engine.rb#82 + # source://yard//lib/yard/templates/engine.rb#81 def render(options = T.unsafe(nil)); end # Creates a template module representing the path. Searches on disk @@ -16392,7 +16550,7 @@ module YARD::Templates::Engine # {template_paths} on disk. # @return [Template] the module representing the template # - # source://yard//lib/yard/templates/engine.rb#35 + # source://yard//lib/yard/templates/engine.rb#34 def template(*path); end # Forces creation of a template at +path+ within a +full_path+. @@ -16401,17 +16559,17 @@ module YARD::Templates::Engine # @param full_paths [Array<String>] the full path on disk of the template # @return [Template] the template module representing the +path+ # - # source://yard//lib/yard/templates/engine.rb#53 + # source://yard//lib/yard/templates/engine.rb#52 def template!(path, full_paths = T.unsafe(nil)); end # @return [Array<String>] the list of registered template paths # - # source://yard//lib/yard/templates/engine.rb#15 + # source://yard//lib/yard/templates/engine.rb#14 def template_paths; end # @return [Array<String>] the list of registered template paths # - # source://yard//lib/yard/templates/engine.rb#15 + # source://yard//lib/yard/templates/engine.rb#14 def template_paths=(_arg0); end # Serializes the results of a block with a +serializer+ object. @@ -16422,7 +16580,7 @@ module YARD::Templates::Engine # @yield a block whose result will be serialize # @yieldreturn [String] the contents to serialize # - # source://yard//lib/yard/templates/engine.rb#115 + # source://yard//lib/yard/templates/engine.rb#114 def with_serializer(object, serializer); end private @@ -16437,7 +16595,7 @@ module YARD::Templates::Engine # @return [Array<String>] a list of full paths that are existing # candidates for a template module # - # source://yard//lib/yard/templates/engine.rb#161 + # source://yard//lib/yard/templates/engine.rb#160 def find_template_paths(from_template, path); end # Sets default options on the options hash @@ -16448,7 +16606,7 @@ module YARD::Templates::Engine # @param options [Hash] the options hash # @return [void] # - # source://yard//lib/yard/templates/engine.rb#141 + # source://yard//lib/yard/templates/engine.rb#140 def set_default_options(options = T.unsafe(nil)); end # The name of the module that represents a +path+ @@ -16456,7 +16614,7 @@ module YARD::Templates::Engine # @param path [String] the path to generate a module name for # @return [String] the module name # - # source://yard//lib/yard/templates/engine.rb#176 + # source://yard//lib/yard/templates/engine.rb#175 def template_module_name(path); end end end @@ -17867,7 +18025,7 @@ end # # @see CLI::YardocOptions # -# source://yard//lib/yard/templates/template_options.rb#10 +# source://yard//lib/yard/templates/template_options.rb#9 class YARD::Templates::TemplateOptions < ::YARD::Options # @return [OpenStruct] an open struct containing any global state across all # generated objects in a template. @@ -17910,7 +18068,7 @@ class YARD::Templates::TemplateOptions < ::YARD::Options # @return [Boolean] whether a mixin matches the embed_mixins list # @return [nil] if the mixin is not a module object # - # source://yard//lib/yard/templates/template_options.rb#78 + # source://yard//lib/yard/templates/template_options.rb#77 def embed_mixins_match?(mixin); end # @return [Symbol] the template output format @@ -17957,12 +18115,12 @@ class YARD::Templates::TemplateOptions < ::YARD::Options # @return [Boolean] whether the page is the "index" # - # source://yard//lib/yard/templates/template_options.rb#64 + # source://yard//lib/yard/templates/template_options.rb#63 def index; end # @return [Boolean] whether the page is the "index" # - # source://yard//lib/yard/templates/template_options.rb#64 + # source://yard//lib/yard/templates/template_options.rb#63 def index=(_arg0); end # @return [Symbol] the markup format to use when parsing docstrings @@ -17977,51 +18135,51 @@ class YARD::Templates::TemplateOptions < ::YARD::Options # @return [Class] the markup provider class for the markup format # - # source://yard//lib/yard/templates/template_options.rb#30 + # source://yard//lib/yard/templates/template_options.rb#29 def markup_provider; end # @return [Class] the markup provider class for the markup format # - # source://yard//lib/yard/templates/template_options.rb#30 + # source://yard//lib/yard/templates/template_options.rb#29 def markup_provider=(_arg0); end # @deprecated use {#highlight} instead. # @return [Boolean] whether highlighting should be ignored # - # source://yard//lib/yard/templates/template_options.rb#57 + # source://yard//lib/yard/templates/template_options.rb#56 def no_highlight; end - # source://yard//lib/yard/templates/template_options.rb#58 + # source://yard//lib/yard/templates/template_options.rb#57 def no_highlight=(value); end # @return [CodeObjects::Base] the main object being generated in the template # - # source://yard//lib/yard/templates/template_options.rb#38 + # source://yard//lib/yard/templates/template_options.rb#37 def object; end # @return [CodeObjects::Base] the main object being generated in the template # - # source://yard//lib/yard/templates/template_options.rb#38 + # source://yard//lib/yard/templates/template_options.rb#37 def object=(_arg0); end # @return [CodeObjects::Base] the owner of the generated object # - # source://yard//lib/yard/templates/template_options.rb#41 + # source://yard//lib/yard/templates/template_options.rb#40 def owner; end # @return [CodeObjects::Base] the owner of the generated object # - # source://yard//lib/yard/templates/template_options.rb#41 + # source://yard//lib/yard/templates/template_options.rb#40 def owner=(_arg0); end # @return [String] the title of a given page # - # source://yard//lib/yard/templates/template_options.rb#61 + # source://yard//lib/yard/templates/template_options.rb#60 def page_title; end # @return [String] the title of a given page # - # source://yard//lib/yard/templates/template_options.rb#61 + # source://yard//lib/yard/templates/template_options.rb#60 def page_title=(_arg0); end # @return [Boolean] whether serialization should be performed @@ -18037,13 +18195,13 @@ class YARD::Templates::TemplateOptions < ::YARD::Options # @return [Serializers::Base] the serializer used to generate links and serialize # output. Serialization output only occurs if {#serialize} is +true+. # - # source://yard//lib/yard/templates/template_options.rb#51 + # source://yard//lib/yard/templates/template_options.rb#50 def serializer; end # @return [Serializers::Base] the serializer used to generate links and serialize # output. Serialization output only occurs if {#serialize} is +true+. # - # source://yard//lib/yard/templates/template_options.rb#51 + # source://yard//lib/yard/templates/template_options.rb#50 def serializer=(_arg0); end # @return [Symbol] the template name used to render output @@ -18058,22 +18216,22 @@ class YARD::Templates::TemplateOptions < ::YARD::Options # @return [Symbol] the template type used to generate output # - # source://yard//lib/yard/templates/template_options.rb#44 + # source://yard//lib/yard/templates/template_options.rb#43 def type; end # @return [Symbol] the template type used to generate output # - # source://yard//lib/yard/templates/template_options.rb#44 + # source://yard//lib/yard/templates/template_options.rb#43 def type=(_arg0); end # @return [Verifier] the verifier object # - # source://yard//lib/yard/templates/template_options.rb#89 + # source://yard//lib/yard/templates/template_options.rb#88 def verifier; end # @return [Verifier] the verifier object # - # source://yard//lib/yard/templates/template_options.rb#89 + # source://yard//lib/yard/templates/template_options.rb#88 def verifier=(_arg0); end end diff --git a/sorbet/rbi/gems/zeitwerk@2.6.17.rbi b/sorbet/rbi/gems/zeitwerk@2.7.1.rbi similarity index 87% rename from sorbet/rbi/gems/zeitwerk@2.6.17.rbi rename to sorbet/rbi/gems/zeitwerk@2.7.1.rbi index 30d7464..a1aaa2d 100644 --- a/sorbet/rbi/gems/zeitwerk@2.6.17.rbi +++ b/sorbet/rbi/gems/zeitwerk@2.7.1.rbi @@ -5,29 +5,39 @@ # Please instead update this file by running `bin/tapioca gem zeitwerk`. -# source://zeitwerk//lib/zeitwerk/kernel.rb#3 +# source://zeitwerk//lib/zeitwerk/core_ext/kernel.rb#3 module Kernel private - # source://zeitwerk//lib/zeitwerk/kernel.rb#23 + # source://zeitwerk//lib/zeitwerk/core_ext/kernel.rb#23 def require(path); end class << self - # source://zeitwerk//lib/zeitwerk/kernel.rb#23 + # source://zeitwerk//lib/zeitwerk/core_ext/kernel.rb#23 def require(path); end end end +class Module + include ::Zeitwerk::ConstAdded +end + # source://zeitwerk//lib/zeitwerk.rb#3 module Zeitwerk class << self # This is a dangerous method. # - # source://zeitwerk//lib/zeitwerk.rb#22 + # source://zeitwerk//lib/zeitwerk.rb#24 def with_loader; end end end +# source://zeitwerk//lib/zeitwerk/core_ext/module.rb#3 +module Zeitwerk::ConstAdded + # source://zeitwerk//lib/zeitwerk/core_ext/module.rb#4 + def const_added(cname); end +end + # This private class encapsulates pairs (mod, cname). # # Objects represent the constant cname in the class or module object mod, and @@ -48,100 +58,103 @@ class Zeitwerk::Cref # # @return [Cref] a new instance of Cref # - # source://zeitwerk//lib/zeitwerk/cref.rb#23 + # source://zeitwerk//lib/zeitwerk/cref.rb#26 def initialize(mod, cname); end - # source://zeitwerk//lib/zeitwerk/cref.rb#74 + # source://zeitwerk//lib/zeitwerk/cref.rb#43 def autoload(abspath); end # @return [Boolean] # - # source://zeitwerk//lib/zeitwerk/cref.rb#68 + # source://zeitwerk//lib/zeitwerk/cref.rb#38 def autoload?; end # Returns the value of attribute cname. # - # source://zeitwerk//lib/zeitwerk/cref.rb#17 + # source://zeitwerk//lib/zeitwerk/cref.rb#20 def cname; end # @return [Boolean] # - # source://zeitwerk//lib/zeitwerk/cref.rb#79 + # source://zeitwerk//lib/zeitwerk/cref.rb#48 def defined?; end # @raise [NameError] # - # source://zeitwerk//lib/zeitwerk/cref.rb#90 + # source://zeitwerk//lib/zeitwerk/cref.rb#59 def get; end - # source://zeitwerk//lib/zeitwerk/cref.rb#34 + # Returns the value of attribute mod. + # + # source://zeitwerk//lib/zeitwerk/cref.rb#17 + def mod; end + + # source://zeitwerk//lib/zeitwerk/cref.rb#33 def path; end # @raise [NameError] # - # source://zeitwerk//lib/zeitwerk/cref.rb#96 + # source://zeitwerk//lib/zeitwerk/cref.rb#65 def remove; end - # source://zeitwerk//lib/zeitwerk/cref.rb#84 + # source://zeitwerk//lib/zeitwerk/cref.rb#53 def set(value); end end # source://zeitwerk//lib/zeitwerk/error.rb#4 class Zeitwerk::Error < ::StandardError; end -# Centralizes the logic for the trace point used to detect the creation of -# explicit namespaces, needed to descend into matching subdirectories right -# after the constant has been defined. +# This module is essentially a registry for explicit namespaces. +# +# When a loader determines that a certain file should define an explicit +# namespace, it registers it here, associating its cref with itself. +# +# If the namespace is autoloaded, our const_added callback retrieves its +# loader by calling loader_for. That way, the loader is able to scan the +# subdirectories that conform the namespace and set autoloads for their +# expected constants just in time. +# +# Once autoloaded, the namespace is unregistered. # # The implementation assumes an explicit namespace is managed by one loader. # Loaders that reopen namespaces owned by other projects are responsible for # loading their constant before setup. This is documented. # -# source://zeitwerk//lib/zeitwerk/explicit_namespace.rb#11 +# source://zeitwerk//lib/zeitwerk/explicit_namespace.rb#19 module Zeitwerk::ExplicitNamespace extend ::Zeitwerk::RealModName class << self - # source://zeitwerk//lib/zeitwerk/explicit_namespace.rb#35 - def __register(cpath, loader); end + # source://zeitwerk//lib/zeitwerk/explicit_namespace.rb#80 + def __clear; end - # source://zeitwerk//lib/zeitwerk/explicit_namespace.rb#53 - def __registered?(cpath); end + # source://zeitwerk//lib/zeitwerk/explicit_namespace.rb#57 + def __loader_for(mod, cname); end - # source://zeitwerk//lib/zeitwerk/explicit_namespace.rb#45 - def __unregister_loader(loader); end + # source://zeitwerk//lib/zeitwerk/explicit_namespace.rb#48 + def __register(cref, loader); end - private + # source://zeitwerk//lib/zeitwerk/explicit_namespace.rb#73 + def __registered?(cname_or_cpath); end - # Maps constant paths that correspond to explicit namespaces according to - # the file system, to the loader responsible for them. - # - # source://zeitwerk//lib/zeitwerk/explicit_namespace.rb#20 - def cpaths; end - - # source://zeitwerk//lib/zeitwerk/explicit_namespace.rb#58 - def disable_tracer_if_unneeded; end + # source://zeitwerk//lib/zeitwerk/explicit_namespace.rb#66 + def __unregister_loader(loader); end - # Returns the value of attribute mutex. - # - # source://zeitwerk//lib/zeitwerk/explicit_namespace.rb#24 - def mutex; end + private - # source://zeitwerk//lib/zeitwerk/explicit_namespace.rb#35 - def register(cpath, loader); end + # source://zeitwerk//lib/zeitwerk/explicit_namespace.rb#80 + def clear; end - # source://zeitwerk//lib/zeitwerk/explicit_namespace.rb#53 - def registered?(cpath); end + # source://zeitwerk//lib/zeitwerk/explicit_namespace.rb#57 + def loader_for(mod, cname); end - # source://zeitwerk//lib/zeitwerk/explicit_namespace.rb#65 - def tracepoint_class_callback(event); end + # source://zeitwerk//lib/zeitwerk/explicit_namespace.rb#48 + def register(cref, loader); end - # Returns the value of attribute tracer. - # - # source://zeitwerk//lib/zeitwerk/explicit_namespace.rb#28 - def tracer; end + # source://zeitwerk//lib/zeitwerk/explicit_namespace.rb#73 + def registered?(cname_or_cpath); end - # source://zeitwerk//lib/zeitwerk/explicit_namespace.rb#45 + # source://zeitwerk//lib/zeitwerk/explicit_namespace.rb#66 def unregister_loader(loader); end end end @@ -332,7 +345,7 @@ class Zeitwerk::Loader # @return [Boolean] # - # source://zeitwerk//lib/zeitwerk/loader.rb#544 + # source://zeitwerk//lib/zeitwerk/loader.rb#546 def autoload_path_set_by_me_for?(cref); end # source://zeitwerk//lib/zeitwerk/loader.rb#462 @@ -357,7 +370,7 @@ class Zeitwerk::Loader # source://zeitwerk//lib/zeitwerk/loader.rb#32 def autoloads; end - # source://zeitwerk//lib/zeitwerk/loader.rb#523 + # source://zeitwerk//lib/zeitwerk/loader.rb#525 def define_autoload(cref, abspath); end # source://zeitwerk//lib/zeitwerk/loader.rb#444 @@ -396,13 +409,13 @@ class Zeitwerk::Loader # source://zeitwerk//lib/zeitwerk/loader.rb#512 def promote_namespace_from_implicit_to_explicit(dir:, file:, cref:); end - # source://zeitwerk//lib/zeitwerk/loader.rb#558 + # source://zeitwerk//lib/zeitwerk/loader.rb#560 def raise_if_conflicting_directory(dir); end - # source://zeitwerk//lib/zeitwerk/loader.rb#553 - def register_explicit_namespace(cpath); end + # source://zeitwerk//lib/zeitwerk/loader.rb#555 + def register_explicit_namespace(cref); end - # source://zeitwerk//lib/zeitwerk/loader.rb#582 + # source://zeitwerk//lib/zeitwerk/loader.rb#584 def run_on_unload_callbacks(cpath, value, abspath); end # source://zeitwerk//lib/zeitwerk/loader.rb#344 @@ -435,10 +448,10 @@ class Zeitwerk::Loader # source://zeitwerk//lib/zeitwerk/loader.rb#60 def to_unload; end - # source://zeitwerk//lib/zeitwerk/loader.rb#589 + # source://zeitwerk//lib/zeitwerk/loader.rb#591 def unload_autoload(cref); end - # source://zeitwerk//lib/zeitwerk/loader.rb#595 + # source://zeitwerk//lib/zeitwerk/loader.rb#597 def unload_cref(cref); end class << self @@ -515,30 +528,30 @@ module Zeitwerk::Loader::Callbacks include ::Zeitwerk::RealModName extend ::Zeitwerk::Internal - # source://zeitwerk//lib/zeitwerk/loader/callbacks.rb#40 + # source://zeitwerk//lib/zeitwerk/loader/callbacks.rb#41 def __on_dir_autoloaded(dir); end - # source://zeitwerk//lib/zeitwerk/loader/callbacks.rb#10 + # source://zeitwerk//lib/zeitwerk/loader/callbacks.rb#11 def __on_file_autoloaded(file); end # Invoked when a class or module is created or reopened, either from the - # tracer or from module autovivification. If the namespace has matching + # const_added or from module autovivification. If the namespace has matching # subdirectories, we descend into them now. # # @private # - # source://zeitwerk//lib/zeitwerk/loader/callbacks.rb#80 + # source://zeitwerk//lib/zeitwerk/loader/callbacks.rb#81 def on_namespace_loaded(namespace); end private - # source://zeitwerk//lib/zeitwerk/loader/callbacks.rb#40 + # source://zeitwerk//lib/zeitwerk/loader/callbacks.rb#41 def on_dir_autoloaded(dir); end - # source://zeitwerk//lib/zeitwerk/loader/callbacks.rb#10 + # source://zeitwerk//lib/zeitwerk/loader/callbacks.rb#11 def on_file_autoloaded(file); end - # source://zeitwerk//lib/zeitwerk/loader/callbacks.rb#91 + # source://zeitwerk//lib/zeitwerk/loader/callbacks.rb#92 def run_on_load_callbacks(cpath, value, abspath); end end @@ -847,12 +860,12 @@ module Zeitwerk::Loader::Helpers # @raise [Zeitwerk::NameError] # - # source://zeitwerk//lib/zeitwerk/loader/helpers.rb#110 + # source://zeitwerk//lib/zeitwerk/loader/helpers.rb#108 def cname_for(basename, abspath); end # @return [Boolean] # - # source://zeitwerk//lib/zeitwerk/loader/helpers.rb#85 + # source://zeitwerk//lib/zeitwerk/loader/helpers.rb#83 def dir?(path); end # Looks for a Ruby file using breadth-first search. This type of search is @@ -866,7 +879,7 @@ module Zeitwerk::Loader::Helpers # @return [Boolean] # - # source://zeitwerk//lib/zeitwerk/loader/helpers.rb#90 + # source://zeitwerk//lib/zeitwerk/loader/helpers.rb#88 def hidden?(basename); end # source://zeitwerk//lib/zeitwerk/loader/helpers.rb#7 @@ -877,16 +890,16 @@ module Zeitwerk::Loader::Helpers # @return [Boolean] # - # source://zeitwerk//lib/zeitwerk/loader/helpers.rb#80 + # source://zeitwerk//lib/zeitwerk/loader/helpers.rb#78 def ruby?(path); end - # source://zeitwerk//lib/zeitwerk/loader/helpers.rb#95 + # source://zeitwerk//lib/zeitwerk/loader/helpers.rb#93 def walk_up(abspath); end end # --- Inflection -------------------------------------------------------------------------------- # -# source://zeitwerk//lib/zeitwerk/loader/helpers.rb#105 +# source://zeitwerk//lib/zeitwerk/loader/helpers.rb#103 module Zeitwerk::Loader::Helpers::CNAME_VALIDATOR; end # source://zeitwerk//lib/zeitwerk/loader.rb#21 @@ -903,7 +916,12 @@ end # source://zeitwerk//lib/zeitwerk/real_mod_name.rb#3 module Zeitwerk::RealModName - # source://zeitwerk//lib/zeitwerk/real_mod_name.rb#14 + # Returns the real name of the class or module, as set after the first + # constant to which it was assigned (or nil). + # + # The name method can be overridden, hence the indirection in this method. + # + # source://zeitwerk//lib/zeitwerk/real_mod_name.rb#13 def real_mod_name(mod); end end @@ -934,7 +952,7 @@ module Zeitwerk::Registry # @return [Boolean] # # source://zeitwerk//lib/zeitwerk/registry.rb#113 - def inception?(cpath); end + def inception?(cpath, registered_by_loader = T.unsafe(nil)); end # This hash table addresses an edge case in which an autoload is ignored. # @@ -978,7 +996,7 @@ module Zeitwerk::Registry # @private # - # source://zeitwerk//lib/zeitwerk/registry.rb#121 + # source://zeitwerk//lib/zeitwerk/registry.rb#124 def loader_for(path); end # This method returns always a loader, the same instance for the same root @@ -999,7 +1017,7 @@ module Zeitwerk::Registry # @private # - # source://zeitwerk//lib/zeitwerk/registry.rb#127 + # source://zeitwerk//lib/zeitwerk/registry.rb#130 def on_unload(loader); end # @private